var Purs_EntryPoints_Livestream_Livestream=(()=>{var $Y=Object.create;var Ig=Object.defineProperty;var zY=Object.getOwnPropertyDescriptor;var VY=Object.getOwnPropertyNames;var QY=Object.getPrototypeOf,KY=Object.prototype.hasOwnProperty;var JL=e=>Ig(e,"__esModule",{value:!0});var YY=(e,n)=>()=>(e&&(n=e(e=0)),n);var Ae=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),$L=(e,n)=>{JL(e);for(var a in n)Ig(e,a,{get:n[a],enumerable:!0})},XY=(e,n,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of VY(n))!KY.call(e,t)&&t!=="default"&&Ig(e,t,{get:()=>n[t],enumerable:!(a=zY(n,t))||a.enumerable});return e},Fu=e=>XY(JL(Ig(e!=null?$Y(QY(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var NR={};$L(NR,{Children:()=>Bf,Component:()=>Hf,Fragment:()=>PT,Suspense:()=>iae,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>oae,cloneElement:()=>Im,createContext:()=>LT,createElement:()=>_t,createRef:()=>xR,default:()=>Ua,forwardRef:()=>Di,isValidElement:()=>xT,lazy:()=>uae,useCallback:()=>Tm,useContext:()=>lae,useEffect:()=>At,useImperativeHandle:()=>ps,useLayoutEffect:()=>Sm,useMemo:()=>Cm,useReducer:()=>cae,useRef:()=>ct,useState:()=>Fl,version:()=>sae});var Ua,oae,Bf,Im,Hf,LT,_t,xR,Di,PT,xT,uae,iae,Tm,lae,At,ps,Sm,Cm,cae,ct,Fl,sae,Wa=YY(()=>{Ua=window.React,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:oae,Children:Bf,cloneElement:Im,Component:Hf,createContext:LT,createElement:_t,createRef:xR,forwardRef:Di,Fragment:PT,isValidElement:xT,lazy:uae,Suspense:iae,useCallback:Tm,useContext:lae,useEffect:At,useImperativeHandle:ps,useLayoutEffect:Sm,useMemo:Cm,useReducer:cae,useRef:ct,useState:Fl,version:sae}=window.React});var jT=Ae((tZe,Vx)=>{"use strict";var zx=Object.getOwnPropertySymbols,Tae=Object.prototype.hasOwnProperty,Sae=Object.prototype.propertyIsEnumerable;function Cae(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Fae(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var n={},a=0;a<10;a++)n["_"+String.fromCharCode(a)]=a;var t=Object.getOwnPropertyNames(n).map(function(u){return n[u]});if(t.join("")!=="0123456789")return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(u){r[u]=u}),Object.keys(Object.assign({},r)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Vx.exports=Fae()?Object.assign:function(e,n){for(var a,t=Cae(e),r,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var i in a)Tae.call(a,i)&&(t[i]=a[i]);if(zx){r=zx(a);for(var l=0;l<r.length;l++)Sae.call(a,r[l])&&(t[r[l]]=a[r[l]])}}return t}});var sN=Ae(Dt=>{"use strict";var UT=jT(),J0=60103,Qx=60106;Dt.Fragment=60107;Dt.StrictMode=60108;Dt.Profiler=60114;var Kx=60109,Yx=60110,Xx=60112;Dt.Suspense=60113;var Zx=60115,eN=60116;typeof Symbol=="function"&&Symbol.for&&(Xi=Symbol.for,J0=Xi("react.element"),Qx=Xi("react.portal"),Dt.Fragment=Xi("react.fragment"),Dt.StrictMode=Xi("react.strict_mode"),Dt.Profiler=Xi("react.profiler"),Kx=Xi("react.provider"),Yx=Xi("react.context"),Xx=Xi("react.forward_ref"),Dt.Suspense=Xi("react.suspense"),Zx=Xi("react.memo"),eN=Xi("react.lazy"));var Xi,nN=typeof Symbol=="function"&&Symbol.iterator;function Gae(e){return e===null||typeof e!="object"?null:(e=nN&&e[nN]||e["@@iterator"],typeof e=="function"?e:null)}function Mm(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var aN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tN={};function $0(e,n,a){this.props=e,this.context=n,this.refs=tN,this.updater=a||aN}$0.prototype.isReactComponent={};$0.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Mm(85));this.updater.enqueueSetState(this,e,n,"setState")};$0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rN(){}rN.prototype=$0.prototype;function OT(e,n,a){this.props=e,this.context=n,this.refs=tN,this.updater=a||aN}var kT=OT.prototype=new rN;kT.constructor=OT;UT(kT,$0.prototype);kT.isPureReactComponent=!0;var BT={current:null},oN=Object.prototype.hasOwnProperty,uN={key:!0,ref:!0,__self:!0,__source:!0};function iN(e,n,a){var t,r={},u=null,i=null;if(n!=null)for(t in n.ref!==void 0&&(i=n.ref),n.key!==void 0&&(u=""+n.key),n)oN.call(n,t)&&!uN.hasOwnProperty(t)&&(r[t]=n[t]);var l=arguments.length-2;if(l===1)r.children=a;else if(1<l){for(var s=Array(l),h=0;h<l;h++)s[h]=arguments[h+2];r.children=s}if(e&&e.defaultProps)for(t in l=e.defaultProps,l)r[t]===void 0&&(r[t]=l[t]);return{$$typeof:J0,type:e,key:u,ref:i,props:r,_owner:BT.current}}function Mae(e,n){return{$$typeof:J0,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function HT(e){return typeof e=="object"&&e!==null&&e.$$typeof===J0}function Aae(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return n[a]})}var lN=/\/+/g;function qT(e,n){return typeof e=="object"&&e!==null&&e.key!=null?Aae(""+e.key):n.toString(36)}function UR(e,n,a,t,r){var u=typeof e;(u==="undefined"||u==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(u){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case J0:case Qx:i=!0}}if(i)return i=e,r=r(i),e=t===""?"."+qT(i,0):t,Array.isArray(r)?(a="",e!=null&&(a=e.replace(lN,"$&/")+"/"),UR(r,n,a,"",function(h){return h})):r!=null&&(HT(r)&&(r=Mae(r,a+(!r.key||i&&i.key===r.key?"":(""+r.key).replace(lN,"$&/")+"/")+e)),n.push(r)),1;if(i=0,t=t===""?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){u=e[l];var s=t+qT(u,l);i+=UR(u,n,a,s,r)}else if(s=Gae(e),typeof s=="function")for(e=s.call(e),l=0;!(u=e.next()).done;)u=u.value,s=t+qT(u,l++),i+=UR(u,n,a,s,r);else if(u==="object")throw n=""+e,Error(Mm(31,n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n));return i}function OR(e,n,a){if(e==null)return e;var t=[],r=0;return UR(e,t,"","",function(u){return n.call(a,u,r++)}),t}function Lae(e){if(e._status===-1){var n=e._result;n=n(),e._status=0,e._result=n,n.then(function(a){e._status===0&&(a=a.default,e._status=1,e._result=a)},function(a){e._status===0&&(e._status=2,e._result=a)})}if(e._status===1)return e._result;throw e._result}var cN={current:null};function ds(){var e=cN.current;if(e===null)throw Error(Mm(321));return e}var Pae={ReactCurrentDispatcher:cN,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:BT,IsSomeRendererActing:{current:!1},assign:UT};Dt.Children={map:OR,forEach:function(e,n,a){OR(e,function(){n.apply(this,arguments)},a)},count:function(e){var n=0;return OR(e,function(){n++}),n},toArray:function(e){return OR(e,function(n){return n})||[]},only:function(e){if(!HT(e))throw Error(Mm(143));return e}};Dt.Component=$0;Dt.PureComponent=OT;Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Pae;Dt.cloneElement=function(e,n,a){if(e==null)throw Error(Mm(267,e));var t=UT({},e.props),r=e.key,u=e.ref,i=e._owner;if(n!=null){if(n.ref!==void 0&&(u=n.ref,i=BT.current),n.key!==void 0&&(r=""+n.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(s in n)oN.call(n,s)&&!uN.hasOwnProperty(s)&&(t[s]=n[s]===void 0&&l!==void 0?l[s]:n[s])}var s=arguments.length-2;if(s===1)t.children=a;else if(1<s){l=Array(s);for(var h=0;h<s;h++)l[h]=arguments[h+2];t.children=l}return{$$typeof:J0,type:e.type,key:r,ref:u,props:t,_owner:i}};Dt.createContext=function(e,n){return n===void 0&&(n=null),e={$$typeof:Yx,_calculateChangedBits:n,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Kx,_context:e},e.Consumer=e};Dt.createElement=iN;Dt.createFactory=function(e){var n=iN.bind(null,e);return n.type=e,n};Dt.createRef=function(){return{current:null}};Dt.forwardRef=function(e){return{$$typeof:Xx,render:e}};Dt.isValidElement=HT;Dt.lazy=function(e){return{$$typeof:eN,_payload:{_status:-1,_result:e},_init:Lae}};Dt.memo=function(e,n){return{$$typeof:Zx,type:e,compare:n===void 0?null:n}};Dt.useCallback=function(e,n){return ds().useCallback(e,n)};Dt.useContext=function(e,n){return ds().useContext(e,n)};Dt.useDebugValue=function(){};Dt.useEffect=function(e,n){return ds().useEffect(e,n)};Dt.useImperativeHandle=function(e,n,a){return ds().useImperativeHandle(e,n,a)};Dt.useLayoutEffect=function(e,n){return ds().useLayoutEffect(e,n)};Dt.useMemo=function(e,n){return ds().useMemo(e,n)};Dt.useReducer=function(e,n,a){return ds().useReducer(e,n,a)};Dt.useRef=function(e){return ds().useRef(e)};Dt.useState=function(e){return ds().useState(e)};Dt.version="17.0.2"});var fN=Ae((oZe,vN)=>{"use strict";vN.exports=sN()});var xN=Ae(z0=>{"use strict";var Gl=jT(),ms=fN();function pr(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var WT=60106,kR=60107,JT=60108,$T=60114,BR=60109,zT=60110,VT=60112,HR=60113,QT=60120,KT=60115,YT=60116,_N=60121,pN=60117,dN=60119,mN=60129,hN=60131;typeof Symbol=="function"&&Symbol.for&&(Ao=Symbol.for,WT=Ao("react.portal"),kR=Ao("react.fragment"),JT=Ao("react.strict_mode"),$T=Ao("react.profiler"),BR=Ao("react.provider"),zT=Ao("react.context"),VT=Ao("react.forward_ref"),HR=Ao("react.suspense"),QT=Ao("react.suspense_list"),KT=Ao("react.memo"),YT=Ao("react.lazy"),_N=Ao("react.block"),pN=Ao("react.fundamental"),dN=Ao("react.scope"),mN=Ao("react.debug_trace_mode"),hN=Ao("react.legacy_hidden"));var Ao;function Am(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case kR:return"Fragment";case WT:return"Portal";case $T:return"Profiler";case JT:return"StrictMode";case HR:return"Suspense";case QT:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case zT:return(e.displayName||"Context")+".Consumer";case BR:return(e._context.displayName||"Context")+".Provider";case VT:var n=e.render;return n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case KT:return Am(e.type);case _N:return Am(e._render);case YT:n=e._payload,e=e._init;try{return Am(e(n))}catch{}}return null}var xae=ms.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,DN={};function Lm(e,n){for(var a=e._threadCount|0;a<=n;a++)e[a]=e._currentValue2,e._threadCount=a+1}function Nae(e,n,a,t){if(t&&(t=e.contextType,typeof t=="object"&&t!==null))return Lm(t,a),t[a];if(e=e.contextTypes){a={};for(var r in e)a[r]=n[r];n=a}else n=DN;return n}for(Lo=new Uint16Array(16),Pm=0;15>Pm;Pm++)Lo[Pm]=Pm+1;var Lo,Pm;Lo[15]=0;var jae=/^[: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]*$/,gN=Object.prototype.hasOwnProperty,RN={},yN={};function bN(e){return gN.call(yN,e)?!0:gN.call(RN,e)?!1:jae.test(e)?yN[e]=!0:(RN[e]=!0,!1)}function Uae(e,n,a,t){if(a!==null&&a.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return t?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Oae(e,n,a,t){if(n===null||typeof n=="undefined"||Uae(e,n,a,t))return!0;if(t)return!1;if(a!==null)switch(a.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function Ru(e,n,a,t,r,u,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=t,this.attributeNamespace=r,this.mustUseProperty=a,this.propertyName=e,this.type=n,this.sanitizeURL=u,this.removeEmptyString=i}var Po={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Po[e]=new Ru(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Po[n]=new Ru(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Po[e]=new Ru(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Po[e]=new Ru(e,2,!1,e,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(e){Po[e]=new Ru(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Po[e]=new Ru(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Po[e]=new Ru(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Po[e]=new Ru(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Po[e]=new Ru(e,5,!1,e.toLowerCase(),null,!1,!1)});var XT=/[\-:]([a-z])/g;function ZT(e){return e[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(e){var n=e.replace(XT,ZT);Po[n]=new Ru(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(XT,ZT);Po[n]=new Ru(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(XT,ZT);Po[n]=new Ru(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Po[e]=new Ru(e,1,!1,e.toLowerCase(),null,!1,!1)});Po.xlinkHref=new Ru("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Po[e]=new Ru(e,1,!1,e.toLowerCase(),null,!0,!0)});var kae=/["'&<>]/;function Jf(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var n=kae.exec(e);if(n){var a="",t,r=0;for(t=n.index;t<e.length;t++){switch(e.charCodeAt(t)){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;default:continue}r!==t&&(a+=e.substring(r,t)),r=t+1,a+=n}e=r!==t?a+e.substring(r,t):a}return e}function Bae(e,n){var a=Po.hasOwnProperty(e)?Po[e]:null,t;return(t=e!=="style")&&(t=a!==null?a.type===0:!(!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")),t||Oae(e,n,a,!1)?"":a!==null?(e=a.attributeName,t=a.type,t===3||t===4&&n===!0?e+'=""':(a.sanitizeURL&&(n=""+n),e+'="'+(Jf(n)+'"'))):bN(e)?e+'="'+(Jf(n)+'"'):""}function Hae(e,n){return e===n&&(e!==0||1/e==1/n)||e!==e&&n!==n}var qae=typeof Object.is=="function"?Object.is:Hae,mc=null,qR=null,ar=null,xm=!1,WR=!1,dv=null,JR=0;function $f(){if(mc===null)throw Error(pr(321));return mc}function wN(){if(0<JR)throw Error(pr(312));return{memoizedState:null,queue:null,next:null}}function eS(){return ar===null?qR===null?(xm=!1,qR=ar=wN()):(xm=!0,ar=qR):ar.next===null?(xm=!1,ar=ar.next=wN()):(xm=!0,ar=ar.next),ar}function EN(e,n,a,t){for(;WR;)WR=!1,JR+=1,ar=null,a=e(n,t);return IN(),a}function IN(){mc=null,WR=!1,qR=null,JR=0,ar=dv=null}function TN(e,n){return typeof n=="function"?n(e):n}function SN(e,n,a){if(mc=$f(),ar=eS(),xm){var t=ar.queue;if(n=t.dispatch,dv!==null&&(a=dv.get(t),a!==void 0)){dv.delete(t),t=ar.memoizedState;do t=e(t,a.action),a=a.next;while(a!==null);return ar.memoizedState=t,[t,n]}return[ar.memoizedState,n]}return e=e===TN?typeof n=="function"?n():n:a!==void 0?a(n):n,ar.memoizedState=e,e=ar.queue={last:null,dispatch:null},e=e.dispatch=Wae.bind(null,mc,e),[ar.memoizedState,e]}function CN(e,n){if(mc=$f(),ar=eS(),n=n===void 0?null:n,ar!==null){var a=ar.memoizedState;if(a!==null&&n!==null){var t=a[1];e:if(t===null)t=!1;else{for(var r=0;r<t.length&&r<n.length;r++)if(!qae(n[r],t[r])){t=!1;break e}t=!0}if(t)return a[0]}}return e=e(),ar.memoizedState=[e,n],e}function Wae(e,n,a){if(!(25>JR))throw Error(pr(301));if(e===mc)if(WR=!0,e={action:a,next:null},dv===null&&(dv=new Map),a=dv.get(n),a===void 0)dv.set(n,e);else{for(n=a;n.next!==null;)n=n.next;n.next=e}}function nS(){}var zf=null,Jae={readContext:function(e){var n=zf.threadID;return Lm(e,n),e[n]},useContext:function(e){$f();var n=zf.threadID;return Lm(e,n),e[n]},useMemo:CN,useReducer:SN,useRef:function(e){mc=$f(),ar=eS();var n=ar.memoizedState;return n===null?(e={current:e},ar.memoizedState=e):n},useState:function(e){return SN(TN,e)},useLayoutEffect:function(){},useCallback:function(e,n){return CN(function(){return e},n)},useImperativeHandle:nS,useEffect:nS,useDebugValue:nS,useDeferredValue:function(e){return $f(),e},useTransition:function(){return $f(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(zf.identifierPrefix||"")+"R:"+(zf.uniqueID++).toString(36)},useMutableSource:function(e,n){return $f(),n(e._source)}},FN={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function GN(e){switch(e){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"}}var MN={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},$ae=Gl({menuitem:!0},MN),Nm={animationIterationCount:!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},zae=["Webkit","ms","Moz","O"];Object.keys(Nm).forEach(function(e){zae.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Nm[n]=Nm[e]})});var Vae=/([A-Z])/g,Qae=/^ms-/,mv=ms.Children.toArray,aS=xae.ReactCurrentDispatcher,Kae={listing:!0,pre:!0,textarea:!0},Yae=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,AN={},tS={};function Xae(e){if(e==null)return e;var n="";return ms.Children.forEach(e,function(a){a!=null&&(n+=a)}),n}var Zae=Object.prototype.hasOwnProperty,ete={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function LN(e,n){if(e===void 0)throw Error(pr(152,Am(n)||"Component"))}function nte(e,n,a){function t(i,l){var s=l.prototype&&l.prototype.isReactComponent,h=Nae(l,n,a,s),p=[],y=!1,E={isMounted:function(){return!1},enqueueForceUpdate:function(){if(p===null)return null},enqueueReplaceState:function(Z,ue){y=!0,p=[ue]},enqueueSetState:function(Z,ue){if(p===null)return null;p.push(ue)}};if(s){if(s=new l(i.props,h,E),typeof l.getDerivedStateFromProps=="function"){var b=l.getDerivedStateFromProps.call(null,i.props,s.state);b!=null&&(s.state=Gl({},s.state,b))}}else if(mc={},s=l(i.props,h,E),s=EN(l,i.props,s,h),s==null||s.render==null){e=s,LN(e,l);return}if(s.props=i.props,s.context=h,s.updater=E,E=s.state,E===void 0&&(s.state=E=null),typeof s.UNSAFE_componentWillMount=="function"||typeof s.componentWillMount=="function")if(typeof s.componentWillMount=="function"&&typeof l.getDerivedStateFromProps!="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&typeof l.getDerivedStateFromProps!="function"&&s.UNSAFE_componentWillMount(),p.length){E=p;var T=y;if(p=null,y=!1,T&&E.length===1)s.state=E[0];else{b=T?E[0]:s.state;var L=!0;for(T=T?1:0;T<E.length;T++){var U=E[T];U=typeof U=="function"?U.call(s,b,i.props,h):U,U!=null&&(L?(L=!1,b=Gl({},b,U)):Gl(b,U))}s.state=b}}else p=null;if(e=s.render(),LN(e,l),typeof s.getChildContext=="function"&&(i=l.childContextTypes,typeof i=="object")){var $=s.getChildContext();for(var z in $)if(!(z in i))throw Error(pr(108,Am(l)||"Unknown",z))}$&&(n=Gl({},n,$))}for(;ms.isValidElement(e);){var r=e,u=r.type;if(typeof u!="function")break;t(r,u)}return{child:e,context:n}}var PN=function(){function e(a,t,r){ms.isValidElement(a)?a.type!==kR?a=[a]:(a=a.props.children,a=ms.isValidElement(a)?[a]:mv(a)):a=mv(a),a={type:null,domNamespace:FN.html,children:a,childIndex:0,context:DN,footer:""};var u=Lo[0];if(u===0){var i=Lo;u=i.length;var l=2*u;if(!(65536>=l))throw Error(pr(304));var s=new Uint16Array(l);for(s.set(i),Lo=s,Lo[0]=u+1,i=u;i<l-1;i++)Lo[i]=i+1;Lo[l-1]=0}else Lo[0]=Lo[u];this.threadID=u,this.stack=[a],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[],this.uniqueID=0,this.identifierPrefix=r&&r.identifierPrefix||""}var n=e.prototype;return n.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var a=this.threadID;Lo[a]=Lo[0],Lo[0]=a}},n.pushProvider=function(a){var t=++this.contextIndex,r=a.type._context,u=this.threadID;Lm(r,u);var i=r[u];this.contextStack[t]=r,this.contextValueStack[t]=i,r[u]=a.props.value},n.popProvider=function(){var a=this.contextIndex,t=this.contextStack[a],r=this.contextValueStack[a];this.contextStack[a]=null,this.contextValueStack[a]=null,this.contextIndex--,t[this.threadID]=r},n.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]},n.read=function(a){if(this.exhausted)return null;var t=zf;zf=this;var r=aS.current;aS.current=Jae;try{for(var u=[""],i=!1;u[0].length<a;){if(this.stack.length===0){this.exhausted=!0;var l=this.threadID;Lo[l]=Lo[0],Lo[0]=l;break}var s=this.stack[this.stack.length-1];if(i||s.childIndex>=s.children.length){var h=s.footer;if(h!==""&&(this.previousWasTextNode=!1),this.stack.pop(),s.type==="select")this.currentSelectValue=null;else if(s.type!=null&&s.type.type!=null&&s.type.type.$$typeof===BR)this.popProvider(s.type);else if(s.type===HR){this.suspenseDepth--;var p=u.pop();if(i){i=!1;var y=s.fallbackFrame;if(!y)throw Error(pr(303));this.stack.push(y),u[this.suspenseDepth]+="<!--$!-->";continue}else u[this.suspenseDepth]+=p}u[this.suspenseDepth]+=h}else{var E=s.children[s.childIndex++],b="";try{b+=this.render(E,s.context,s.domNamespace)}catch(T){throw T!=null&&typeof T.then=="function"?Error(pr(294)):T}finally{}u.length<=this.suspenseDepth&&u.push(""),u[this.suspenseDepth]+=b}}return u[0]}finally{aS.current=r,zf=t,IN()}},n.render=function(a,t,r){if(typeof a=="string"||typeof a=="number")return r=""+a,r===""?"":this.makeStaticMarkup?Jf(r):this.previousWasTextNode?"<!-- -->"+Jf(r):(this.previousWasTextNode=!0,Jf(r));if(t=nte(a,t,this.threadID),a=t.child,t=t.context,a===null||a===!1)return"";if(!ms.isValidElement(a)){if(a!=null&&a.$$typeof!=null)throw r=a.$$typeof,Error(r===WT?pr(257):pr(258,r.toString()));return a=mv(a),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}var u=a.type;if(typeof u=="string")return this.renderDOM(a,t,r);switch(u){case hN:case mN:case JT:case $T:case QT:case kR:return a=mv(a.props.children),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case HR:throw Error(pr(294));case dN:throw Error(pr(343))}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case VT:mc={};var i=u.render(a.props,a.ref);return i=EN(u.render,a.props,i,a.ref),i=mv(i),this.stack.push({type:null,domNamespace:r,children:i,childIndex:0,context:t,footer:""}),"";case KT:return a=[ms.createElement(u.type,Gl({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case BR:return u=mv(a.props.children),r={type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""},this.pushProvider(a),this.stack.push(r),"";case zT:u=a.type,i=a.props;var l=this.threadID;return Lm(u,l),u=mv(i.children(u[l])),this.stack.push({type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""}),"";case pN:throw Error(pr(338));case YT:return u=a.type,i=u._init,u=i(u._payload),a=[ms.createElement(u,Gl({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}throw Error(pr(130,u==null?u:typeof u,""))},n.renderDOM=function(a,t,r){var u=a.type.toLowerCase();if(r===FN.html&&GN(u),!AN.hasOwnProperty(u)){if(!Yae.test(u))throw Error(pr(65,u));AN[u]=!0}var i=a.props;if(u==="input")i=Gl({type:void 0},i,{defaultChecked:void 0,defaultValue:void 0,value:i.value!=null?i.value:i.defaultValue,checked:i.checked!=null?i.checked:i.defaultChecked});else if(u==="textarea"){var l=i.value;if(l==null){l=i.defaultValue;var s=i.children;if(s!=null){if(l!=null)throw Error(pr(92));if(Array.isArray(s)){if(!(1>=s.length))throw Error(pr(93));s=s[0]}l=""+s}l==null&&(l="")}i=Gl({},i,{value:void 0,children:""+l})}else if(u==="select")this.currentSelectValue=i.value!=null?i.value:i.defaultValue,i=Gl({},i,{value:void 0});else if(u==="option"){s=this.currentSelectValue;var h=Xae(i.children);if(s!=null){var p=i.value!=null?i.value+"":h;if(l=!1,Array.isArray(s)){for(var y=0;y<s.length;y++)if(""+s[y]===p){l=!0;break}}else l=""+s===p;i=Gl({selected:void 0,children:void 0},i,{selected:l,children:h})}}if(l=i){if($ae[u]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(pr(137,u));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(pr(60));if(!(typeof l.dangerouslySetInnerHTML=="object"&&"__html"in l.dangerouslySetInnerHTML))throw Error(pr(61))}if(l.style!=null&&typeof l.style!="object")throw Error(pr(62))}l=i,s=this.makeStaticMarkup,h=this.stack.length===1,p="<"+a.type;e:if(u.indexOf("-")===-1)y=typeof l.is=="string";else switch(u){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":y=!1;break e;default:y=!0}for(ue in l)if(Zae.call(l,ue)){var E=l[ue];if(E!=null){if(ue==="style"){var b=void 0,T="",L="";for(b in E)if(E.hasOwnProperty(b)){var U=b.indexOf("--")===0,$=E[b];if($!=null){if(U)var z=b;else if(z=b,tS.hasOwnProperty(z))z=tS[z];else{var Z=z.replace(Vae,"-$1").toLowerCase().replace(Qae,"-ms-");z=tS[z]=Z}T+=L+z+":",L=b,U=$==null||typeof $=="boolean"||$===""?"":U||typeof $!="number"||$===0||Nm.hasOwnProperty(L)&&Nm[L]?(""+$).trim():$+"px",T+=U,L=";"}}E=T||null}b=null,y?ete.hasOwnProperty(ue)||(b=ue,b=bN(b)&&E!=null?b+'="'+(Jf(E)+'"'):""):b=Bae(ue,E),b&&(p+=" "+b)}}s||h&&(p+=' data-reactroot=""');var ue=p;l="",MN.hasOwnProperty(u)?ue+="/>":(ue+=">",l="</"+a.type+">");e:{if(s=i.dangerouslySetInnerHTML,s!=null){if(s.__html!=null){s=s.__html;break e}}else if(s=i.children,typeof s=="string"||typeof s=="number"){s=Jf(s);break e}s=null}return s!=null?(i=[],Kae.hasOwnProperty(u)&&s.charAt(0)===` `&&(ue+=` `),ue+=s):i=mv(i.children),a=a.type,r=r==null||r==="http://www.w3.org/1999/xhtml"?GN(a):r==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":r,this.stack.push({domNamespace:r,type:u,children:i,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,ue},e}();z0.renderToNodeStream=function(){throw Error(pr(207))};z0.renderToStaticMarkup=function(e,n){e=new PN(e,!0,n);try{return e.read(1/0)}finally{e.destroy()}};z0.renderToStaticNodeStream=function(){throw Error(pr(208))};z0.renderToString=function(e,n){e=new PN(e,!1,n);try{return e.read(1/0)}finally{e.destroy()}};z0.version="17.0.2"});var jN=Ae((iZe,NN)=>{"use strict";NN.exports=xN()});var FU=Ae((ob,JC)=>{(function(n,a){typeof ob=="object"&&typeof JC=="object"?JC.exports=a():typeof define=="function"&&define.amd?define([],a):typeof ob=="object"?ob.Pusher=a():n.Pusher=a()})(window,function(){return function(e){var n={};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=n,a.d=function(t,r,u){a.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,r){if(r&1&&(t=a(t)),r&8||r&4&&typeof t=="object"&&t&&t.__esModule)return t;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:t}),r&2&&typeof t!="string")for(var i in t)a.d(u,i,function(l){return t[l]}.bind(null,i));return u},a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,"a",r),r},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},a.p="",a(a.s=2)}([function(e,n,a){"use strict";var t=this&&this.__extends||function(){var b=function(T,L){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(U,$){U.__proto__=$}||function(U,$){for(var z in $)$.hasOwnProperty(z)&&(U[z]=$[z])},b(T,L)};return function(T,L){b(T,L);function U(){this.constructor=T}T.prototype=L===null?Object.create(L):(U.prototype=L.prototype,new U)}}();Object.defineProperty(n,"__esModule",{value:!0});var r=256,u=function(){function b(T){T===void 0&&(T="="),this._paddingCharacter=T}return b.prototype.encodedLength=function(T){return this._paddingCharacter?(T+2)/3*4|0:(T*8+5)/6|0},b.prototype.encode=function(T){for(var L="",U=0;U<T.length-2;U+=3){var $=T[U]<<16|T[U+1]<<8|T[U+2];L+=this._encodeByte($>>>3*6&63),L+=this._encodeByte($>>>2*6&63),L+=this._encodeByte($>>>1*6&63),L+=this._encodeByte($>>>0*6&63)}var z=T.length-U;if(z>0){var $=T[U]<<16|(z===2?T[U+1]<<8:0);L+=this._encodeByte($>>>3*6&63),L+=this._encodeByte($>>>2*6&63),z===2?L+=this._encodeByte($>>>1*6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},b.prototype.maxDecodedLength=function(T){return this._paddingCharacter?T/4*3|0:(T*6+7)/8|0},b.prototype.decodedLength=function(T){return this.maxDecodedLength(T.length-this._getPaddingLength(T))},b.prototype.decode=function(T){if(T.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(T),U=T.length-L,$=new Uint8Array(this.maxDecodedLength(U)),z=0,Z=0,ue=0,X=0,Y=0,ae=0,me=0;Z<U-4;Z+=4)X=this._decodeChar(T.charCodeAt(Z+0)),Y=this._decodeChar(T.charCodeAt(Z+1)),ae=this._decodeChar(T.charCodeAt(Z+2)),me=this._decodeChar(T.charCodeAt(Z+3)),$[z++]=X<<2|Y>>>4,$[z++]=Y<<4|ae>>>2,$[z++]=ae<<6|me,ue|=X&r,ue|=Y&r,ue|=ae&r,ue|=me&r;if(Z<U-1&&(X=this._decodeChar(T.charCodeAt(Z)),Y=this._decodeChar(T.charCodeAt(Z+1)),$[z++]=X<<2|Y>>>4,ue|=X&r,ue|=Y&r),Z<U-2&&(ae=this._decodeChar(T.charCodeAt(Z+2)),$[z++]=Y<<4|ae>>>2,ue|=ae&r),Z<U-3&&(me=this._decodeChar(T.charCodeAt(Z+3)),$[z++]=ae<<6|me,ue|=me&r),ue!==0)throw new Error("Base64Coder: incorrect characters for decoding");return $},b.prototype._encodeByte=function(T){var L=T;return L+=65,L+=25-T>>>8&0-65-26+97,L+=51-T>>>8&26-97-52+48,L+=61-T>>>8&52-48-62+43,L+=62-T>>>8&62-43-63+47,String.fromCharCode(L)},b.prototype._decodeChar=function(T){var L=r;return L+=(42-T&T-44)>>>8&-r+T-43+62,L+=(46-T&T-48)>>>8&-r+T-47+63,L+=(47-T&T-58)>>>8&-r+T-48+52,L+=(64-T&T-91)>>>8&-r+T-65+0,L+=(96-T&T-123)>>>8&-r+T-97+26,L},b.prototype._getPaddingLength=function(T){var L=0;if(this._paddingCharacter){for(var U=T.length-1;U>=0&&T[U]===this._paddingCharacter;U--)L++;if(T.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},b}();n.Coder=u;var i=new u;function l(b){return i.encode(b)}n.encode=l;function s(b){return i.decode(b)}n.decode=s;var h=function(b){t(T,b);function T(){return b!==null&&b.apply(this,arguments)||this}return T.prototype._encodeByte=function(L){var U=L;return U+=65,U+=25-L>>>8&0-65-26+97,U+=51-L>>>8&26-97-52+48,U+=61-L>>>8&52-48-62+45,U+=62-L>>>8&62-45-63+95,String.fromCharCode(U)},T.prototype._decodeChar=function(L){var U=r;return U+=(44-L&L-46)>>>8&-r+L-45+62,U+=(94-L&L-96)>>>8&-r+L-95+63,U+=(47-L&L-58)>>>8&-r+L-48+52,U+=(64-L&L-91)>>>8&-r+L-65+0,U+=(96-L&L-123)>>>8&-r+L-97+26,U},T}(u);n.URLSafeCoder=h;var p=new h;function y(b){return p.encode(b)}n.encodeURLSafe=y;function E(b){return p.decode(b)}n.decodeURLSafe=E,n.encodedLength=function(b){return i.encodedLength(b)},n.maxDecodedLength=function(b){return i.maxDecodedLength(b)},n.decodedLength=function(b){return i.decodedLength(b)}},function(e,n,a){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t="utf8: invalid string",r="utf8: invalid source encoding";function u(s){for(var h=new Uint8Array(i(s)),p=0,y=0;y<s.length;y++){var E=s.charCodeAt(y);E<128?h[p++]=E:E<2048?(h[p++]=192|E>>6,h[p++]=128|E&63):E<55296?(h[p++]=224|E>>12,h[p++]=128|E>>6&63,h[p++]=128|E&63):(y++,E=(E&1023)<<10,E|=s.charCodeAt(y)&1023,E+=65536,h[p++]=240|E>>18,h[p++]=128|E>>12&63,h[p++]=128|E>>6&63,h[p++]=128|E&63)}return h}n.encode=u;function i(s){for(var h=0,p=0;p<s.length;p++){var y=s.charCodeAt(p);if(y<128)h+=1;else if(y<2048)h+=2;else if(y<55296)h+=3;else if(y<=57343){if(p>=s.length-1)throw new Error(t);p++,h+=4}else throw new Error(t)}return h}n.encodedLength=i;function l(s){for(var h=[],p=0;p<s.length;p++){var y=s[p];if(y&128){var E=void 0;if(y<224){if(p>=s.length)throw new Error(r);var b=s[++p];if((b&192)!=128)throw new Error(r);y=(y&31)<<6|b&63,E=128}else if(y<240){if(p>=s.length-1)throw new Error(r);var b=s[++p],T=s[++p];if((b&192)!=128||(T&192)!=128)throw new Error(r);y=(y&15)<<12|(b&63)<<6|T&63,E=2048}else if(y<248){if(p>=s.length-2)throw new Error(r);var b=s[++p],T=s[++p],L=s[++p];if((b&192)!=128||(T&192)!=128||(L&192)!=128)throw new Error(r);y=(y&15)<<18|(b&63)<<12|(T&63)<<6|L&63,E=65536}else throw new Error(r);if(y<E||y>=55296&&y<=57343)throw new Error(r);if(y>=65536){if(y>1114111)throw new Error(r);y-=65536,h.push(String.fromCharCode(55296|y>>10)),y=56320|y&1023}}h.push(String.fromCharCode(y))}return h.join("")}n.decode=l},function(e,n,a){e.exports=a(3).default},function(e,n,a){"use strict";a.r(n);var t=function(){function m(d,g){this.lastId=0,this.prefix=d,this.name=g}return m.prototype.create=function(d){this.lastId++;var g=this.lastId,G=this.prefix+g,A=this.name+"["+g+"]",Q=!1,Te=function(){Q||(d.apply(null,arguments),Q=!0)};return this[g]=Te,{number:g,id:G,name:A,callback:Te}},m.prototype.remove=function(d){delete this[d.number]},m}(),r=new t("_pusher_script_","Pusher.ScriptReceivers"),u={VERSION:"6.0.3",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},i=u,l=function(){function m(d){this.options=d,this.receivers=d.receivers||r,this.loading={}}return m.prototype.load=function(d,g,G){var A=this;if(A.loading[d]&&A.loading[d].length>0)A.loading[d].push(G);else{A.loading[d]=[G];var Q=Va.createScriptRequest(A.getPath(d,g)),Te=A.receivers.create(function(_n){if(A.receivers.remove(Te),A.loading[d]){var ma=A.loading[d];delete A.loading[d];for(var yt=function(Io){Io||Q.cleanup()},Zt=0;Zt<ma.length;Zt++)ma[Zt](_n,yt)}});Q.send(Te)}},m.prototype.getRoot=function(d){var g,G=Va.getDocument().location.protocol;return d&&d.useTLS||G==="https:"?g=this.options.cdn_https:g=this.options.cdn_http,g.replace(/\/*$/,"")+"/"+this.options.version},m.prototype.getPath=function(d,g){return this.getRoot(g)+"/"+d+this.options.suffix+".js"},m}(),s=l,h=new t("_pusher_dependencies","Pusher.DependenciesReceivers"),p=new s({cdn_http:i.cdn_http,cdn_https:i.cdn_https,version:i.VERSION,suffix:i.dependency_suffix,receivers:h});function y(m){return ue(z(m))}for(var E=String.fromCharCode,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T={},L=0,U=b.length;L<U;L++)T[b.charAt(L)]=L;var $=function(m){var d=m.charCodeAt(0);return d<128?m:d<2048?E(192|d>>>6)+E(128|d&63):E(224|d>>>12&15)+E(128|d>>>6&63)+E(128|d&63)},z=function(m){return m.replace(/[^\x00-\x7F]/g,$)},Z=function(m){var d=[0,2,1][m.length%3],g=m.charCodeAt(0)<<16|(m.length>1?m.charCodeAt(1):0)<<8|(m.length>2?m.charCodeAt(2):0),G=[b.charAt(g>>>18),b.charAt(g>>>12&63),d>=2?"=":b.charAt(g>>>6&63),d>=1?"=":b.charAt(g&63)];return G.join("")},ue=window.btoa||function(m){return m.replace(/[\s\S]{1,3}/g,Z)},X=function(){function m(d,g,G,A){var Q=this;this.clear=g,this.timer=d(function(){Q.timer&&(Q.timer=A(Q.timer))},G)}return m.prototype.isRunning=function(){return this.timer!==null},m.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},m}(),Y=X,ae=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}();function me(m){window.clearTimeout(m)}function ke(m){window.clearInterval(m)}var ce=function(m){ae(d,m);function d(g,G){return m.call(this,setTimeout,me,g,function(A){return G(),null})||this}return d}(Y),le=function(m){ae(d,m);function d(g,G){return m.call(this,setInterval,ke,g,function(A){return G(),A})||this}return d}(Y),Ce={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(m){return new ce(0,m)},method:function(m){for(var d=[],g=1;g<arguments.length;g++)d[g-1]=arguments[g];var G=Array.prototype.slice.call(arguments,1);return function(A){return A[m].apply(A,G.concat(arguments))}}},Ie=Ce;function je(m){for(var d=[],g=1;g<arguments.length;g++)d[g-1]=arguments[g];for(var G=0;G<d.length;G++){var A=d[G];for(var Q in A)A[Q]&&A[Q].constructor&&A[Q].constructor===Object?m[Q]=je(m[Q]||{},A[Q]):m[Q]=A[Q]}return m}function Ke(){for(var m=["Pusher"],d=0;d<arguments.length;d++)typeof arguments[d]=="string"?m.push(arguments[d]):m.push(Ma(arguments[d]));return m.join(" : ")}function Tn(m,d){var g=Array.prototype.indexOf;if(m===null)return-1;if(g&&m.indexOf===g)return m.indexOf(d);for(var G=0,A=m.length;G<A;G++)if(m[G]===d)return G;return-1}function Qn(m,d){for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&d(m[g],g,m)}function En(m){var d=[];return Qn(m,function(g,G){d.push(G)}),d}function qn(m){var d=[];return Qn(m,function(g){d.push(g)}),d}function Vn(m,d,g){for(var G=0;G<m.length;G++)d.call(g||window,m[G],G,m)}function Wn(m,d){for(var g=[],G=0;G<m.length;G++)g.push(d(m[G],G,m,g));return g}function pt(m,d){var g={};return Qn(m,function(G,A){g[A]=d(G)}),g}function He(m,d){d=d||function(A){return!!A};for(var g=[],G=0;G<m.length;G++)d(m[G],G,m,g)&&g.push(m[G]);return g}function ia(m,d){var g={};return Qn(m,function(G,A){(d&&d(G,A,m,g)||Boolean(G))&&(g[A]=G)}),g}function Ia(m){var d=[];return Qn(m,function(g,G){d.push([G,g])}),d}function Sn(m,d){for(var g=0;g<m.length;g++)if(d(m[g],g,m))return!0;return!1}function gn(m,d){for(var g=0;g<m.length;g++)if(!d(m[g],g,m))return!1;return!0}function Ve(m){return pt(m,function(d){return typeof d=="object"&&(d=Ma(d)),encodeURIComponent(y(d.toString()))})}function na(m){var d=ia(m,function(G){return G!==void 0}),g=Wn(Ia(Ve(d)),Ie.method("join","=")).join("&");return g}function va(m){var d=[],g=[];return function G(A,Q){var Te,_n,ma;switch(typeof A){case"object":if(!A)return null;for(Te=0;Te<d.length;Te+=1)if(d[Te]===A)return{$ref:g[Te]};if(d.push(A),g.push(Q),Object.prototype.toString.apply(A)==="[object Array]")for(ma=[],Te=0;Te<A.length;Te+=1)ma[Te]=G(A[Te],Q+"["+Te+"]");else{ma={};for(_n in A)Object.prototype.hasOwnProperty.call(A,_n)&&(ma[_n]=G(A[_n],Q+"["+JSON.stringify(_n)+"]"))}return ma;case"number":case"string":case"boolean":return A}}(m,"$")}function Ma(m){try{return JSON.stringify(m)}catch{return JSON.stringify(va(m))}}var dt=function(){function m(){this.globalLog=function(d){window.console&&window.console.log&&window.console.log(d)}}return m.prototype.debug=function(){for(var d=[],g=0;g<arguments.length;g++)d[g]=arguments[g];this.log(this.globalLog,d)},m.prototype.warn=function(){for(var d=[],g=0;g<arguments.length;g++)d[g]=arguments[g];this.log(this.globalLogWarn,d)},m.prototype.error=function(){for(var d=[],g=0;g<arguments.length;g++)d[g]=arguments[g];this.log(this.globalLogError,d)},m.prototype.globalLogWarn=function(d){window.console&&window.console.warn?window.console.warn(d):this.globalLog(d)},m.prototype.globalLogError=function(d){window.console&&window.console.error?window.console.error(d):this.globalLogWarn(d)},m.prototype.log=function(d){for(var g=[],G=1;G<arguments.length;G++)g[G-1]=arguments[G];var A=Ke.apply(this,arguments);if(Ed.log)Ed.log(A);else if(Ed.logToConsole){var Q=d.bind(this);Q(A)}},m}(),vn=new dt,la={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/authenticating_users"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},Et=function(m){var d="See:",g=la.urls[m];if(!g)return"";var G;return g.fullUrl?G=g.fullUrl:g.path&&(G=la.baseUrl+g.path),G?d+" "+G:""},Da={buildLogSuffix:Et},ot=function(m,d,g){var G=this,A;A=Va.createXHR(),A.open("POST",G.options.authEndpoint,!0),A.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var Q in this.authOptions.headers)A.setRequestHeader(Q,this.authOptions.headers[Q]);return A.onreadystatechange=function(){if(A.readyState===4)if(A.status===200){var Te,_n=!1;try{Te=JSON.parse(A.responseText),_n=!0}catch{g(!0,"JSON returned from auth endpoint was invalid, yet status code was 200. Data was: "+A.responseText)}_n&&g(!1,Te)}else{var ma=Da.buildLogSuffix("authenticationEndpoint");vn.error("Unable to retrieve auth string from auth endpoint - "+("received status "+A.status+" from "+G.options.authEndpoint+". ")+("Clients must be authenticated to join private or presence channels. "+ma)),g(!0,A.status)}},A.send(this.composeQuery(d)),A},q=ot,K=function(m,d,g){this.authOptions.headers!==void 0&&vn.warn("To send headers with the auth request, you must use AJAX, rather than JSONP.");var G=m.nextAuthCallbackID.toString();m.nextAuthCallbackID++;var A=m.getDocument(),Q=A.createElement("script");m.auth_callbacks[G]=function(ma){g(!1,ma)};var Te="Pusher.auth_callbacks['"+G+"']";Q.src=this.options.authEndpoint+"?callback="+encodeURIComponent(Te)+"&"+this.composeQuery(d);var _n=A.getElementsByTagName("head")[0]||A.documentElement;_n.insertBefore(Q,_n.firstChild)},j=K,I=function(){function m(d){this.src=d}return m.prototype.send=function(d){var g=this,G="Error loading "+g.src;g.script=document.createElement("script"),g.script.id=d.id,g.script.src=g.src,g.script.type="text/javascript",g.script.charset="UTF-8",g.script.addEventListener?(g.script.onerror=function(){d.callback(G)},g.script.onload=function(){d.callback(null)}):g.script.onreadystatechange=function(){(g.script.readyState==="loaded"||g.script.readyState==="complete")&&d.callback(null)},g.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(g.errorScript=document.createElement("script"),g.errorScript.id=d.id+"_error",g.errorScript.text=d.name+"('"+G+"');",g.script.async=g.errorScript.async=!1):g.script.async=!0;var A=document.getElementsByTagName("head")[0];A.insertBefore(g.script,A.firstChild),g.errorScript&&A.insertBefore(g.errorScript,g.script.nextSibling)},m.prototype.cleanup=function(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null},m}(),P=I,N=function(){function m(d,g){this.url=d,this.data=g}return m.prototype.send=function(d){if(!this.request){var g=na(this.data),G=this.url+"/"+d.number+"?"+g;this.request=Va.createScriptRequest(G),this.request.send(d)}},m.prototype.cleanup=function(){this.request&&this.request.cleanup()},m}(),J=N,V=function(m,d){return function(g,G){var A="http"+(d?"s":"")+"://",Q=A+(m.host||m.options.host)+m.options.path,Te=Va.createJSONPRequest(Q,g),_n=Va.ScriptReceivers.create(function(ma,yt){r.remove(_n),Te.cleanup(),yt&&yt.host&&(m.host=yt.host),G&&G(ma,yt)});Te.send(_n)}},se={name:"jsonp",getAgent:V},ie=se;function De(m,d,g){var G=m+(d.useTLS?"s":""),A=d.useTLS?d.hostTLS:d.hostNonTLS;return G+"://"+A+g}function Se(m,d){var g="/app/"+m,G="?protocol="+i.PROTOCOL+"&client=js&version="+i.VERSION+(d?"&"+d:"");return g+G}var Me={getInitial:function(m,d){var g=(d.httpPath||"")+Se(m,"flash=false");return De("ws",d,g)}},Le={getInitial:function(m,d){var g=(d.httpPath||"/pusher")+Se(m);return De("http",d,g)}},sn={getInitial:function(m,d){return De("http",d,d.httpPath||"/pusher")},getPath:function(m,d){return Se(m)}},mn=function(){function m(){this._callbacks={}}return m.prototype.get=function(d){return this._callbacks[bn(d)]},m.prototype.add=function(d,g,G){var A=bn(d);this._callbacks[A]=this._callbacks[A]||[],this._callbacks[A].push({fn:g,context:G})},m.prototype.remove=function(d,g,G){if(!d&&!g&&!G){this._callbacks={};return}var A=d?[bn(d)]:En(this._callbacks);g||G?this.removeCallback(A,g,G):this.removeAllCallbacks(A)},m.prototype.removeCallback=function(d,g,G){Vn(d,function(A){this._callbacks[A]=He(this._callbacks[A]||[],function(Q){return g&&g!==Q.fn||G&&G!==Q.context}),this._callbacks[A].length===0&&delete this._callbacks[A]},this)},m.prototype.removeAllCallbacks=function(d){Vn(d,function(g){delete this._callbacks[g]},this)},m}(),Ue=mn;function bn(m){return"_"+m}var zn=function(){function m(d){this.callbacks=new Ue,this.global_callbacks=[],this.failThrough=d}return m.prototype.bind=function(d,g,G){return this.callbacks.add(d,g,G),this},m.prototype.bind_global=function(d){return this.global_callbacks.push(d),this},m.prototype.unbind=function(d,g,G){return this.callbacks.remove(d,g,G),this},m.prototype.unbind_global=function(d){return d?(this.global_callbacks=He(this.global_callbacks||[],function(g){return g!==d}),this):(this.global_callbacks=[],this)},m.prototype.unbind_all=function(){return this.unbind(),this.unbind_global(),this},m.prototype.emit=function(d,g,G){for(var A=0;A<this.global_callbacks.length;A++)this.global_callbacks[A](d,g);var Q=this.callbacks.get(d),Te=[];if(G?Te.push(g,G):g&&Te.push(g),Q&&Q.length>0)for(var A=0;A<Q.length;A++)Q[A].fn.apply(Q[A].context||window,Te);else this.failThrough&&this.failThrough(d,g);return this},m}(),pa=zn,at=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),Pt=function(m){at(d,m);function d(g,G,A,Q,Te){var _n=m.call(this)||this;return _n.initialize=Va.transportConnectionInitializer,_n.hooks=g,_n.name=G,_n.priority=A,_n.key=Q,_n.options=Te,_n.state="new",_n.timeline=Te.timeline,_n.activityTimeout=Te.activityTimeout,_n.id=_n.timeline.generateUniqueID(),_n}return d.prototype.handlesActivityChecks=function(){return Boolean(this.hooks.handlesActivityChecks)},d.prototype.supportsPing=function(){return Boolean(this.hooks.supportsPing)},d.prototype.connect=function(){var g=this;if(this.socket||this.state!=="initialized")return!1;var G=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(G,this.options)}catch(A){return Ie.defer(function(){g.onError(A),g.changeState("closed")}),!1}return this.bindListeners(),vn.debug("Connecting",{transport:this.name,url:G}),this.changeState("connecting"),!0},d.prototype.close=function(){return this.socket?(this.socket.close(),!0):!1},d.prototype.send=function(g){var G=this;return this.state==="open"?(Ie.defer(function(){G.socket&&G.socket.send(g)}),!0):!1},d.prototype.ping=function(){this.state==="open"&&this.supportsPing()&&this.socket.ping()},d.prototype.onOpen=function(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0},d.prototype.onError=function(g){this.emit("error",{type:"WebSocketError",error:g}),this.timeline.error(this.buildTimelineMessage({error:g.toString()}))},d.prototype.onClose=function(g){g?this.changeState("closed",{code:g.code,reason:g.reason,wasClean:g.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0},d.prototype.onMessage=function(g){this.emit("message",g)},d.prototype.onActivity=function(){this.emit("activity")},d.prototype.bindListeners=function(){var g=this;this.socket.onopen=function(){g.onOpen()},this.socket.onerror=function(G){g.onError(G)},this.socket.onclose=function(G){g.onClose(G)},this.socket.onmessage=function(G){g.onMessage(G)},this.supportsPing()&&(this.socket.onactivity=function(){g.onActivity()})},d.prototype.unbindListeners=function(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))},d.prototype.changeState=function(g,G){this.state=g,this.timeline.info(this.buildTimelineMessage({state:g,params:G})),this.emit(g,G)},d.prototype.buildTimelineMessage=function(g){return je({cid:this.id},g)},d}(pa),ba=Pt,mt=function(){function m(d){this.hooks=d}return m.prototype.isSupported=function(d){return this.hooks.isSupported(d)},m.prototype.createConnection=function(d,g,G,A){return new ba(this.hooks,d,g,G,A)},m}(),Na=mt,Ot=new Na({urls:Me,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(Va.getWebSocketAPI())},isSupported:function(){return Boolean(Va.getWebSocketAPI())},getSocket:function(m){return Va.createWebSocket(m)}}),$a={urls:Le,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},It=je({getSocket:function(m){return Va.HTTPFactory.createStreamingSocket(m)}},$a),sr=je({getSocket:function(m){return Va.HTTPFactory.createPollingSocket(m)}},$a),Sr={isSupported:function(){return Va.isXHRSupported()}},so=new Na(je({},It,Sr)),hr=new Na(je({},sr,Sr)),Oo={ws:Ot,xhr_streaming:so,xhr_polling:hr},Cr=Oo,rr=new Na({file:"sockjs",urls:sn,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(m,d){return new window.SockJS(m,null,{js_path:p.getPath("sockjs",{useTLS:d.useTLS}),ignore_null_origin:d.ignoreNullOrigin})},beforeOpen:function(m,d){m.send(JSON.stringify({path:d}))}}),Hr={isSupported:function(m){var d=Va.isXDRSupported(m.useTLS);return d}},tu=new Na(je({},It,Hr)),ru=new Na(je({},sr,Hr));Cr.xdr_streaming=tu,Cr.xdr_polling=ru,Cr.sockjs=rr;var Eo=Cr,qr=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),Tu=function(m){qr(d,m);function d(){var g=m.call(this)||this,G=g;return window.addEventListener!==void 0&&(window.addEventListener("online",function(){G.emit("online")},!1),window.addEventListener("offline",function(){G.emit("offline")},!1)),g}return d.prototype.isOnline=function(){return window.navigator.onLine===void 0?!0:window.navigator.onLine},d}(pa),oi=new Tu,xi=function(){function m(d,g,G){this.manager=d,this.transport=g,this.minPingDelay=G.minPingDelay,this.maxPingDelay=G.maxPingDelay,this.pingDelay=void 0}return m.prototype.createConnection=function(d,g,G,A){var Q=this;A=je({},A,{activityTimeout:this.pingDelay});var Te=this.transport.createConnection(d,g,G,A),_n=null,ma=function(){Te.unbind("open",ma),Te.bind("closed",yt),_n=Ie.now()},yt=function(Zt){if(Te.unbind("closed",yt),Zt.code===1002||Zt.code===1003)Q.manager.reportDeath();else if(!Zt.wasClean&&_n){var Io=Ie.now()-_n;Io<2*Q.maxPingDelay&&(Q.manager.reportDeath(),Q.pingDelay=Math.max(Io/2,Q.minPingDelay))}};return Te.bind("open",ma),Te},m.prototype.isSupported=function(d){return this.manager.isAlive()&&this.transport.isSupported(d)},m}(),Kl=xi,Wc={decodeMessage:function(m){try{var d=JSON.parse(m.data),g=d.data;if(typeof g=="string")try{g=JSON.parse(d.data)}catch{}var G={event:d.event,channel:d.channel,data:g};return d.user_id&&(G.user_id=d.user_id),G}catch(A){throw{type:"MessageParseError",error:A,data:m.data}}},encodeMessage:function(m){return JSON.stringify(m)},processHandshake:function(m){var d=Wc.decodeMessage(m);if(d.event==="pusher:connection_established"){if(!d.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:d.data.socket_id,activityTimeout:d.data.activity_timeout*1e3}}else{if(d.event==="pusher:error")return{action:this.getCloseAction(d.data),error:this.getCloseError(d.data)};throw"Invalid handshake"}},getCloseAction:function(m){return m.code<4e3?m.code>=1002&&m.code<=1004?"backoff":null:m.code===4e3?"tls_only":m.code<4100?"refused":m.code<4200?"backoff":m.code<4300?"retry":"refused"},getCloseError:function(m){return m.code!==1e3&&m.code!==1001?{type:"PusherError",data:{code:m.code,message:m.reason||m.message}}:null}},fe=Wc,gl=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),Rl=function(m){gl(d,m);function d(g,G){var A=m.call(this)||this;return A.id=g,A.transport=G,A.activityTimeout=G.activityTimeout,A.bindListeners(),A}return d.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},d.prototype.send=function(g){return this.transport.send(g)},d.prototype.send_event=function(g,G,A){var Q={event:g,data:G};return A&&(Q.channel=A),vn.debug("Event sent",Q),this.send(fe.encodeMessage(Q))},d.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},d.prototype.close=function(){this.transport.close()},d.prototype.bindListeners=function(){var g=this,G={message:function(Q){var Te;try{Te=fe.decodeMessage(Q)}catch(_n){g.emit("error",{type:"MessageParseError",error:_n,data:Q.data})}if(Te!==void 0){switch(vn.debug("Event recd",Te),Te.event){case"pusher:error":g.emit("error",{type:"PusherError",data:Te.data});break;case"pusher:ping":g.emit("ping");break;case"pusher:pong":g.emit("pong");break}g.emit("message",Te)}},activity:function(){g.emit("activity")},error:function(Q){g.emit("error",{type:"WebSocketError",error:Q})},closed:function(Q){A(),Q&&Q.code&&g.handleCloseEvent(Q),g.transport=null,g.emit("closed")}},A=function(){Qn(G,function(Q,Te){g.transport.unbind(Te,Q)})};Qn(G,function(Q,Te){g.transport.bind(Te,Q)})},d.prototype.handleCloseEvent=function(g){var G=fe.getCloseAction(g),A=fe.getCloseError(g);A&&this.emit("error",A),G&&this.emit(G,{action:G,error:A})},d}(pa),Jc=Rl,yl=function(){function m(d,g){this.transport=d,this.callback=g,this.bindListeners()}return m.prototype.close=function(){this.unbindListeners(),this.transport.close()},m.prototype.bindListeners=function(){var d=this;this.onMessage=function(g){d.unbindListeners();var G;try{G=fe.processHandshake(g)}catch(A){d.finish("error",{error:A}),d.transport.close();return}G.action==="connected"?d.finish("connected",{connection:new Jc(G.id,d.transport),activityTimeout:G.activityTimeout}):(d.finish(G.action,{error:G.error}),d.transport.close())},this.onClosed=function(g){d.unbindListeners();var G=fe.getCloseAction(g)||"backoff",A=fe.getCloseError(g);d.finish(G,{error:A})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},m.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},m.prototype.finish=function(d,g){this.callback(je({transport:this.transport,action:d},g))},m}(),Ni=yl,_d=function(){function m(d,g){this.channel=d;var G=g.authTransport;if(typeof Va.getAuthorizers()[G]=="undefined")throw"'"+G+"' is not a recognized auth transport";this.type=G,this.options=g,this.authOptions=g.auth||{}}return m.prototype.composeQuery=function(d){var g="socket_id="+encodeURIComponent(d)+"&channel_name="+encodeURIComponent(this.channel.name);for(var G in this.authOptions.params)g+="&"+encodeURIComponent(G)+"="+encodeURIComponent(this.authOptions.params[G]);return g},m.prototype.authorize=function(d,g){m.authorizers=m.authorizers||Va.getAuthorizers(),m.authorizers[this.type].call(this,Va,d,g)},m}(),uf=_d,J_=function(){function m(d,g){this.timeline=d,this.options=g||{}}return m.prototype.send=function(d,g){this.timeline.isEmpty()||this.timeline.send(Va.TimelineTransport.getAgent(this,d),g)},m}(),$_=J_,ji=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),ou=function(m){ji(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),$c=function(m){ji(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),z_=function(m){ji(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),pd=function(m){ji(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),V_=function(m){ji(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),$D=function(m){ji(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),$s=function(m){ji(d,m);function d(g){var G=this.constructor,A=m.call(this,g)||this;return Object.setPrototypeOf(A,G.prototype),A}return d}(Error),IE=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),TE=function(m){IE(d,m);function d(g,G){var A=m.call(this,function(Q,Te){vn.debug("No callbacks on "+g+" for "+Q)})||this;return A.name=g,A.pusher=G,A.subscribed=!1,A.subscriptionPending=!1,A.subscriptionCancelled=!1,A}return d.prototype.authorize=function(g,G){return G(!1,{auth:""})},d.prototype.trigger=function(g,G){if(g.indexOf("client-")!==0)throw new ou("Event '"+g+"' does not start with 'client-'");if(!this.subscribed){var A=Da.buildLogSuffix("triggeringClientEvents");vn.warn("Client event triggered before channel 'subscription_succeeded' event . "+A)}return this.pusher.send_event(g,G,this.name)},d.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},d.prototype.handleEvent=function(g){var G=g.event,A=g.data;if(G==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(g);else if(G.indexOf("pusher_internal:")!==0){var Q={};this.emit(G,A,Q)}},d.prototype.handleSubscriptionSucceededEvent=function(g){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",g.data)},d.prototype.subscribe=function(){var g=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(G,A){G?(vn.error(A),g.emit("pusher:subscription_error",A)):(A=A,g.pusher.send_event("pusher:subscribe",{auth:A.auth,channel_data:A.channel_data,channel:g.name}))}))},d.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},d.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},d.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},d}(pa),zD=TE,SE=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),CE=function(m){SE(d,m);function d(){return m!==null&&m.apply(this,arguments)||this}return d.prototype.authorize=function(g,G){var A=Ui.createAuthorizer(this,this.pusher.config);return A.authorize(g,G)},d}(zD),dd=CE,VD=function(){function m(){this.reset()}return m.prototype.get=function(d){return Object.prototype.hasOwnProperty.call(this.members,d)?{id:d,info:this.members[d]}:null},m.prototype.each=function(d){var g=this;Qn(this.members,function(G,A){d(g.get(A))})},m.prototype.setMyID=function(d){this.myID=d},m.prototype.onSubscription=function(d){this.members=d.presence.hash,this.count=d.presence.count,this.me=this.get(this.myID)},m.prototype.addMember=function(d){return this.get(d.user_id)===null&&this.count++,this.members[d.user_id]=d.user_info,this.get(d.user_id)},m.prototype.removeMember=function(d){var g=this.get(d.user_id);return g&&(delete this.members[d.user_id],this.count--),g},m.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},m}(),FE=VD,GE=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),QD=function(m){GE(d,m);function d(g,G){var A=m.call(this,g,G)||this;return A.members=new FE,A}return d.prototype.authorize=function(g,G){var A=this;m.prototype.authorize.call(this,g,function(Q,Te){if(!Q){if(Te=Te,Te.channel_data===void 0){var _n=Da.buildLogSuffix("authenticationEndpoint");vn.error("Invalid auth response for channel '"+A.name+"',"+("expected 'channel_data' field. "+_n)),G("Invalid auth response");return}var ma=JSON.parse(Te.channel_data);A.members.setMyID(ma.user_id)}G(Q,Te)})},d.prototype.handleEvent=function(g){var G=g.event;if(G.indexOf("pusher_internal:")===0)this.handleInternalEvent(g);else{var A=g.data,Q={};g.user_id&&(Q.user_id=g.user_id),this.emit(G,A,Q)}},d.prototype.handleInternalEvent=function(g){var G=g.event,A=g.data;switch(G){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(g);break;case"pusher_internal:member_added":var Q=this.members.addMember(A);this.emit("pusher:member_added",Q);break;case"pusher_internal:member_removed":var Te=this.members.removeMember(A);Te&&this.emit("pusher:member_removed",Te);break}},d.prototype.handleSubscriptionSucceededEvent=function(g){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(g.data),this.emit("pusher:subscription_succeeded",this.members))},d.prototype.disconnect=function(){this.members.reset(),m.prototype.disconnect.call(this)},d}(dd),ME=QD,KD=a(1),md=a(0),AE=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),LE=function(m){AE(d,m);function d(g,G,A){var Q=m.call(this,g,G)||this;return Q.key=null,Q.nacl=A,Q}return d.prototype.authorize=function(g,G){var A=this;m.prototype.authorize.call(this,g,function(Q,Te){if(Q){G(!0,Te);return}var _n=Te.shared_secret;if(!_n){var ma="No shared_secret key in auth payload for encrypted channel: "+A.name;G(!0,ma);return}A.key=Object(md.decode)(_n),delete Te.shared_secret,G(!1,Te)})},d.prototype.trigger=function(g,G){throw new V_("Client events are not currently supported for encrypted channels")},d.prototype.handleEvent=function(g){var G=g.event,A=g.data;if(G.indexOf("pusher_internal:")===0||G.indexOf("pusher:")===0){m.prototype.handleEvent.call(this,g);return}this.handleEncryptedEvent(G,A)},d.prototype.handleEncryptedEvent=function(g,G){var A=this;if(!this.key){vn.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!G.ciphertext||!G.nonce){vn.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+G);return}var Q=Object(md.decode)(G.ciphertext);if(Q.length<this.nacl.secretbox.overheadLength){vn.error("Expected encrypted event ciphertext length to be "+this.nacl.secretbox.overheadLength+", got: "+Q.length);return}var Te=Object(md.decode)(G.nonce);if(Te.length<this.nacl.secretbox.nonceLength){vn.error("Expected encrypted event nonce length to be "+this.nacl.secretbox.nonceLength+", got: "+Te.length);return}var _n=this.nacl.secretbox.open(Q,Te,this.key);if(_n===null){vn.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,function(ma,yt){if(ma){vn.error("Failed to make a request to the authEndpoint: "+yt+". Unable to fetch new key, so dropping encrypted event");return}if(_n=A.nacl.secretbox.open(Q,Te,A.key),_n===null){vn.error("Failed to decrypt event with new key. Dropping encrypted event");return}A.emitJSON(g,Object(KD.decode)(_n))});return}this.emitJSON(g,Object(KD.decode)(_n))},d.prototype.emitJSON=function(g,G){try{this.emit(g,JSON.parse(G))}catch{this.emit(g,G)}return this},d}(dd),PE=LE,xE=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),NE=function(m){xE(d,m);function d(g,G){var A=m.call(this)||this;A.state="initialized",A.connection=null,A.key=g,A.options=G,A.timeline=A.options.timeline,A.usingTLS=A.options.useTLS,A.errorCallbacks=A.buildErrorCallbacks(),A.connectionCallbacks=A.buildConnectionCallbacks(A.errorCallbacks),A.handshakeCallbacks=A.buildHandshakeCallbacks(A.errorCallbacks);var Q=Va.getNetwork();return Q.bind("online",function(){A.timeline.info({netinfo:"online"}),(A.state==="connecting"||A.state==="unavailable")&&A.retryIn(0)}),Q.bind("offline",function(){A.timeline.info({netinfo:"offline"}),A.connection&&A.sendActivityCheck()}),A.updateStrategy(),A}return d.prototype.connect=function(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}},d.prototype.send=function(g){return this.connection?this.connection.send(g):!1},d.prototype.send_event=function(g,G,A){return this.connection?this.connection.send_event(g,G,A):!1},d.prototype.disconnect=function(){this.disconnectInternally(),this.updateState("disconnected")},d.prototype.isUsingTLS=function(){return this.usingTLS},d.prototype.startConnecting=function(){var g=this,G=function(A,Q){A?g.runner=g.strategy.connect(0,G):Q.action==="error"?(g.emit("error",{type:"HandshakeError",error:Q.error}),g.timeline.error({handshakeError:Q.error})):(g.abortConnecting(),g.handshakeCallbacks[Q.action](Q))};this.runner=this.strategy.connect(0,G)},d.prototype.abortConnecting=function(){this.runner&&(this.runner.abort(),this.runner=null)},d.prototype.disconnectInternally=function(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var g=this.abandonConnection();g.close()}},d.prototype.updateStrategy=function(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})},d.prototype.retryIn=function(g){var G=this;this.timeline.info({action:"retry",delay:g}),g>0&&this.emit("connecting_in",Math.round(g/1e3)),this.retryTimer=new ce(g||0,function(){G.disconnectInternally(),G.connect()})},d.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},d.prototype.setUnavailableTimer=function(){var g=this;this.unavailableTimer=new ce(this.options.unavailableTimeout,function(){g.updateState("unavailable")})},d.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},d.prototype.sendActivityCheck=function(){var g=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new ce(this.options.pongTimeout,function(){g.timeline.error({pong_timed_out:g.options.pongTimeout}),g.retryIn(0)})},d.prototype.resetActivityCheck=function(){var g=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new ce(this.activityTimeout,function(){g.sendActivityCheck()}))},d.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},d.prototype.buildConnectionCallbacks=function(g){var G=this;return je({},g,{message:function(A){G.resetActivityCheck(),G.emit("message",A)},ping:function(){G.send_event("pusher:pong",{})},activity:function(){G.resetActivityCheck()},error:function(A){G.emit("error",{type:"WebSocketError",error:A})},closed:function(){G.abandonConnection(),G.shouldRetry()&&G.retryIn(1e3)}})},d.prototype.buildHandshakeCallbacks=function(g){var G=this;return je({},g,{connected:function(A){G.activityTimeout=Math.min(G.options.activityTimeout,A.activityTimeout,A.connection.activityTimeout||1/0),G.clearUnavailableTimer(),G.setConnection(A.connection),G.socket_id=G.connection.id,G.updateState("connected",{socket_id:G.socket_id})}})},d.prototype.buildErrorCallbacks=function(){var g=this,G=function(A){return function(Q){Q.error&&g.emit("error",{type:"WebSocketError",error:Q.error}),A(Q)}};return{tls_only:G(function(){g.usingTLS=!0,g.updateStrategy(),g.retryIn(0)}),refused:G(function(){g.disconnect()}),backoff:G(function(){g.retryIn(1e3)}),retry:G(function(){g.retryIn(0)})}},d.prototype.setConnection=function(g){this.connection=g;for(var G in this.connectionCallbacks)this.connection.bind(G,this.connectionCallbacks[G]);this.resetActivityCheck()},d.prototype.abandonConnection=function(){if(!!this.connection){this.stopActivityCheck();for(var g in this.connectionCallbacks)this.connection.unbind(g,this.connectionCallbacks[g]);var G=this.connection;return this.connection=null,G}},d.prototype.updateState=function(g,G){var A=this.state;if(this.state=g,A!==g){var Q=g;Q==="connected"&&(Q+=" with new socket ID "+G.socket_id),vn.debug("State changed",A+" -> "+Q),this.timeline.info({state:g,params:G}),this.emit("state_change",{previous:A,current:g}),this.emit(g,G)}},d.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},d}(pa),YD=NE,jE=function(){function m(){this.channels={}}return m.prototype.add=function(d,g){return this.channels[d]||(this.channels[d]=XD(d,g)),this.channels[d]},m.prototype.all=function(){return qn(this.channels)},m.prototype.find=function(d){return this.channels[d]},m.prototype.remove=function(d){var g=this.channels[d];return delete this.channels[d],g},m.prototype.disconnect=function(){Qn(this.channels,function(d){d.disconnect()})},m}(),UE=jE;function XD(m,d){if(m.indexOf("private-encrypted-")===0){if(d.config.nacl)return Ui.createEncryptedChannel(m,d,d.config.nacl);var g="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",G=Da.buildLogSuffix("encryptedChannelSupport");throw new V_(g+". "+G)}else return m.indexOf("private-")===0?Ui.createPrivateChannel(m,d):m.indexOf("presence-")===0?Ui.createPresenceChannel(m,d):Ui.createChannel(m,d)}var OE={createChannels:function(){return new UE},createConnectionManager:function(m,d){return new YD(m,d)},createChannel:function(m,d){return new zD(m,d)},createPrivateChannel:function(m,d){return new dd(m,d)},createPresenceChannel:function(m,d){return new ME(m,d)},createEncryptedChannel:function(m,d,g){return new PE(m,d,g)},createTimelineSender:function(m,d){return new $_(m,d)},createAuthorizer:function(m,d){return d.authorizer?d.authorizer(m,d):new uf(m,d)},createHandshake:function(m,d){return new Ni(m,d)},createAssistantToTheTransportManager:function(m,d,g){return new Kl(m,d,g)}},Ui=OE,kE=function(){function m(d){this.options=d||{},this.livesLeft=this.options.lives||1/0}return m.prototype.getAssistant=function(d){return Ui.createAssistantToTheTransportManager(this,d,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},m.prototype.isAlive=function(){return this.livesLeft>0},m.prototype.reportDeath=function(){this.livesLeft-=1},m}(),ZD=kE,BE=function(){function m(d,g){this.strategies=d,this.loop=Boolean(g.loop),this.failFast=Boolean(g.failFast),this.timeout=g.timeout,this.timeoutLimit=g.timeoutLimit}return m.prototype.isSupported=function(){return Sn(this.strategies,Ie.method("isSupported"))},m.prototype.connect=function(d,g){var G=this,A=this.strategies,Q=0,Te=this.timeout,_n=null,ma=function(yt,Zt){Zt?g(null,Zt):(Q=Q+1,G.loop&&(Q=Q%A.length),Q<A.length?(Te&&(Te=Te*2,G.timeoutLimit&&(Te=Math.min(Te,G.timeoutLimit))),_n=G.tryStrategy(A[Q],d,{timeout:Te,failFast:G.failFast},ma)):g(!0))};return _n=this.tryStrategy(A[Q],d,{timeout:Te,failFast:this.failFast},ma),{abort:function(){_n.abort()},forceMinPriority:function(yt){d=yt,_n&&_n.forceMinPriority(yt)}}},m.prototype.tryStrategy=function(d,g,G,A){var Q=null,Te=null;return G.timeout>0&&(Q=new ce(G.timeout,function(){Te.abort(),A(!0)})),Te=d.connect(g,function(_n,ma){_n&&Q&&Q.isRunning()&&!G.failFast||(Q&&Q.ensureAborted(),A(_n,ma))}),{abort:function(){Q&&Q.ensureAborted(),Te.abort()},forceMinPriority:function(_n){Te.forceMinPriority(_n)}}},m}(),zc=BE,HE=function(){function m(d){this.strategies=d}return m.prototype.isSupported=function(){return Sn(this.strategies,Ie.method("isSupported"))},m.prototype.connect=function(d,g){return qE(this.strategies,d,function(G,A){return function(Q,Te){if(A[G].error=Q,Q){eg(A)&&g(!0);return}Vn(A,function(_n){_n.forceMinPriority(Te.transport.priority)}),g(null,Te)}})},m}(),hd=HE;function qE(m,d,g){var G=Wn(m,function(A,Q,Te,_n){return A.connect(d,g(Q,_n))});return{abort:function(){Vn(G,Dd)},forceMinPriority:function(A){Vn(G,function(Q){Q.forceMinPriority(A)})}}}function eg(m){return gn(m,function(d){return Boolean(d.error)})}function Dd(m){!m.error&&!m.aborted&&(m.abort(),m.aborted=!0)}var WE=function(){function m(d,g,G){this.strategy=d,this.transports=g,this.ttl=G.ttl||1800*1e3,this.usingTLS=G.useTLS,this.timeline=G.timeline}return m.prototype.isSupported=function(){return this.strategy.isSupported()},m.prototype.connect=function(d,g){var G=this.usingTLS,A=ng(G),Q=[this.strategy];if(A&&A.timestamp+this.ttl>=Ie.now()){var Te=this.transports[A.transport];Te&&(this.timeline.info({cached:!0,transport:A.transport,latency:A.latency}),Q.push(new zc([Te],{timeout:A.latency*2+1e3,failFast:!0})))}var _n=Ie.now(),ma=Q.pop().connect(d,function yt(Zt,Io){Zt?(ag(G),Q.length>0?(_n=Ie.now(),ma=Q.pop().connect(d,yt)):g(Zt)):($E(G,Io.transport.name,Ie.now()-_n),g(null,Io))});return{abort:function(){ma.abort()},forceMinPriority:function(yt){d=yt,ma&&ma.forceMinPriority(yt)}}},m}(),JE=WE;function gd(m){return"pusherTransport"+(m?"TLS":"NonTLS")}function ng(m){var d=Va.getLocalStorage();if(d)try{var g=d[gd(m)];if(g)return JSON.parse(g)}catch{ag(m)}return null}function $E(m,d,g){var G=Va.getLocalStorage();if(G)try{G[gd(m)]=Ma({timestamp:Ie.now(),transport:d,latency:g})}catch{}}function ag(m){var d=Va.getLocalStorage();if(d)try{delete d[gd(m)]}catch{}}var zE=function(){function m(d,g){var G=g.delay;this.strategy=d,this.options={delay:G}}return m.prototype.isSupported=function(){return this.strategy.isSupported()},m.prototype.connect=function(d,g){var G=this.strategy,A,Q=new ce(this.options.delay,function(){A=G.connect(d,g)});return{abort:function(){Q.ensureAborted(),A&&A.abort()},forceMinPriority:function(Te){d=Te,A&&A.forceMinPriority(Te)}}},m}(),Q_=zE,tg=function(){function m(d,g,G){this.test=d,this.trueBranch=g,this.falseBranch=G}return m.prototype.isSupported=function(){var d=this.test()?this.trueBranch:this.falseBranch;return d.isSupported()},m.prototype.connect=function(d,g){var G=this.test()?this.trueBranch:this.falseBranch;return G.connect(d,g)},m}(),lf=tg,VE=function(){function m(d){this.strategy=d}return m.prototype.isSupported=function(){return this.strategy.isSupported()},m.prototype.connect=function(d,g){var G=this.strategy.connect(d,function(A,Q){Q&&G.abort(),g(A,Q)});return G},m}(),QE=VE;function bl(m){return function(){return m.isSupported()}}var rg=function(m,d,g){var G={};function A(Fr,bg,wg,EI,Eg){var w=g(m,Fr,bg,wg,EI,Eg);return G[Fr]=w,w}var Q=Object.assign({},d,{hostNonTLS:m.wsHost+":"+m.wsPort,hostTLS:m.wsHost+":"+m.wssPort,httpPath:m.wsPath}),Te=Object.assign({},Q,{useTLS:!0}),_n=Object.assign({},d,{hostNonTLS:m.httpHost+":"+m.httpPort,hostTLS:m.httpHost+":"+m.httpsPort,httpPath:m.httpPath}),ma={loop:!0,timeout:15e3,timeoutLimit:6e4},yt=new ZD({lives:2,minPingDelay:1e4,maxPingDelay:m.activityTimeout}),Zt=new ZD({lives:2,minPingDelay:1e4,maxPingDelay:m.activityTimeout}),Io=A("ws","ws",3,Q,yt),ui=A("wss","ws",3,Te,yt),RI=A("sockjs","sockjs",1,_n),dg=A("xhr_streaming","xhr_streaming",1,_n,Zt),mg=A("xdr_streaming","xdr_streaming",1,_n,Zt),hg=A("xhr_polling","xhr_polling",1,_n),yI=A("xdr_polling","xdr_polling",1,_n),Dg=new zc([Io],ma),bI=new zc([ui],ma),wI=new zc([RI],ma),gg=new zc([new lf(bl(dg),dg,mg)],ma),Rg=new zc([new lf(bl(hg),hg,yI)],ma),yg=new zc([new lf(bl(gg),new hd([gg,new Q_(Rg,{delay:4e3})]),Rg)],ma),Id=new lf(bl(yg),yg,wI),Td;return d.useTLS?Td=new hd([Dg,new Q_(Id,{delay:2e3})]):Td=new hd([Dg,new Q_(bI,{delay:2e3}),new Q_(Id,{delay:5e3})]),new JE(new QE(new lf(bl(Io),Td,Id)),G,{ttl:18e5,timeline:d.timeline,useTLS:d.useTLS})},KE=rg,YE=function(){var m=this;m.timeline.info(m.buildTimelineMessage({transport:m.name+(m.options.useTLS?"s":"")})),m.hooks.isInitialized()?m.changeState("initialized"):m.hooks.file?(m.changeState("initializing"),p.load(m.hooks.file,{useTLS:m.options.useTLS},function(d,g){m.hooks.isInitialized()?(m.changeState("initialized"),g(!0)):(d&&m.onError(d),m.onClose(),g(!1))})):m.onClose()},og={getRequest:function(m){var d=new window.XDomainRequest;return d.ontimeout=function(){m.emit("error",new $c),m.close()},d.onerror=function(g){m.emit("error",g),m.close()},d.onprogress=function(){d.responseText&&d.responseText.length>0&&m.onChunk(200,d.responseText)},d.onload=function(){d.responseText&&d.responseText.length>0&&m.onChunk(200,d.responseText),m.emit("finished",200),m.close()},d},abortRequest:function(m){m.ontimeout=m.onerror=m.onprogress=m.onload=null,m.abort()}},XE=og,ug=function(){var m=function(d,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(d,g)};return function(d,g){m(d,g);function G(){this.constructor=d}d.prototype=g===null?Object.create(g):(G.prototype=g.prototype,new G)}}(),ZE=256*1024,ig=function(m){ug(d,m);function d(g,G,A){var Q=m.call(this)||this;return Q.hooks=g,Q.method=G,Q.url=A,Q}return d.prototype.start=function(g){var G=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){G.close()},Va.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(g)},d.prototype.close=function(){this.unloader&&(Va.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},d.prototype.onChunk=function(g,G){for(;;){var A=this.advanceBuffer(G);if(A)this.emit("chunk",{status:g,data:A});else break}this.isBufferTooLong(G)&&this.emit("buffer_too_long")},d.prototype.advanceBuffer=function(g){var G=g.slice(this.position),A=G.indexOf(` `);return A!==-1?(this.position+=A+1,G.slice(0,A)):null},d.prototype.isBufferTooLong=function(g){return this.position===g.length&&g.length>ZE},d}(pa),lg=ig,cf;(function(m){m[m.CONNECTING=0]="CONNECTING",m[m.OPEN=1]="OPEN",m[m.CLOSED=3]="CLOSED"})(cf||(cf={}));var Oi=cf,eI=1,cg=function(){function m(d,g){this.hooks=d,this.session=Su(1e3)+"/"+wl(8),this.location=nI(g),this.readyState=Oi.CONNECTING,this.openStream()}return m.prototype.send=function(d){return this.sendRaw(JSON.stringify([d]))},m.prototype.ping=function(){this.hooks.sendHeartbeat(this)},m.prototype.close=function(d,g){this.onClose(d,g,!0)},m.prototype.sendRaw=function(d){if(this.readyState===Oi.OPEN)try{return Va.createSocketRequest("POST",Rd(aI(this.location,this.session))).start(d),!0}catch{return!1}else return!1},m.prototype.reconnect=function(){this.closeStream(),this.openStream()},m.prototype.onClose=function(d,g,G){this.closeStream(),this.readyState=Oi.CLOSED,this.onclose&&this.onclose({code:d,reason:g,wasClean:G})},m.prototype.onChunk=function(d){if(d.status===200){this.readyState===Oi.OPEN&&this.onActivity();var g,G=d.data.slice(0,1);switch(G){case"o":g=JSON.parse(d.data.slice(1)||"{}"),this.onOpen(g);break;case"a":g=JSON.parse(d.data.slice(1)||"[]");for(var A=0;A<g.length;A++)this.onEvent(g[A]);break;case"m":g=JSON.parse(d.data.slice(1)||"null"),this.onEvent(g);break;case"h":this.hooks.onHeartbeat(this);break;case"c":g=JSON.parse(d.data.slice(1)||"[]"),this.onClose(g[0],g[1],!0);break}}},m.prototype.onOpen=function(d){this.readyState===Oi.CONNECTING?(d&&d.hostname&&(this.location.base=sg(this.location.base,d.hostname)),this.readyState=Oi.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)},m.prototype.onEvent=function(d){this.readyState===Oi.OPEN&&this.onmessage&&this.onmessage({data:d})},m.prototype.onActivity=function(){this.onactivity&&this.onactivity()},m.prototype.onError=function(d){this.onerror&&this.onerror(d)},m.prototype.openStream=function(){var d=this;this.stream=Va.createSocketRequest("POST",Rd(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",function(g){d.onChunk(g)}),this.stream.bind("finished",function(g){d.hooks.onFinished(d,g)}),this.stream.bind("buffer_too_long",function(){d.reconnect()});try{this.stream.start()}catch(g){Ie.defer(function(){d.onError(g),d.onClose(1006,"Could not start streaming",!1)})}},m.prototype.closeStream=function(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)},m}();function nI(m){var d=/([^\?]*)\/*(\??.*)/.exec(m);return{base:d[1],queryString:d[2]}}function aI(m,d){return m.base+"/"+d+"/xhr_send"}function Rd(m){var d=m.indexOf("?")===-1?"?":"&";return m+d+"t="+ +new Date+"&n="+eI++}function sg(m,d){var g=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(m);return g[1]+d+g[3]}function Su(m){return Math.floor(Math.random()*m)}function wl(m){for(var d=[],g=0;g<m;g++)d.push(Su(32).toString(32));return d.join("")}var tI=cg,rI={getReceiveURL:function(m,d){return m.base+"/"+d+"/xhr_streaming"+m.queryString},onHeartbeat:function(m){m.sendRaw("[]")},sendHeartbeat:function(m){m.sendRaw("[]")},onFinished:function(m,d){m.onClose(1006,"Connection interrupted ("+d+")",!1)}},oI=rI,uI={getReceiveURL:function(m,d){return m.base+"/"+d+"/xhr"+m.queryString},onHeartbeat:function(){},sendHeartbeat:function(m){m.sendRaw("[]")},onFinished:function(m,d){d===200?m.reconnect():m.onClose(1006,"Connection interrupted ("+d+")",!1)}},iI=uI,vg={getRequest:function(m){var d=Va.getXHRAPI(),g=new d;return g.onreadystatechange=g.onprogress=function(){switch(g.readyState){case 3:g.responseText&&g.responseText.length>0&&m.onChunk(g.status,g.responseText);break;case 4:g.responseText&&g.responseText.length>0&&m.onChunk(g.status,g.responseText),m.emit("finished",g.status),m.close();break}},g},abortRequest:function(m){m.onreadystatechange=null,m.abort()}},za=vg,Vc={createStreamingSocket:function(m){return this.createSocket(oI,m)},createPollingSocket:function(m){return this.createSocket(iI,m)},createSocket:function(m,d){return new tI(m,d)},createXHR:function(m,d){return this.createRequest(za,m,d)},createRequest:function(m,d,g){return new lg(m,d,g)}},yd=Vc;yd.createXDR=function(m,d){return this.createRequest(XE,m,d)};var lI=yd,cI={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:r,DependenciesReceivers:h,getDefaultStrategy:KE,Transports:Eo,transportConnectionInitializer:YE,HTTPFactory:lI,TimelineTransport:ie,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(m){var d=this;window.Pusher=m;var g=function(){d.onDocumentBody(m.ready)};window.JSON?g():p.load("json2",{},g)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:q,jsonp:j}},onDocumentBody:function(m){var d=this;document.body?m():setTimeout(function(){d.onDocumentBody(m)},0)},createJSONPRequest:function(m,d){return new J(m,d)},createScriptRequest:function(m){return new P(m)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var m=this.getXHRAPI();return new m},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return oi},createWebSocket:function(m){var d=this.getWebSocketAPI();return new d(m)},createSocketRequest:function(m,d){if(this.isXHRSupported())return this.HTTPFactory.createXHR(m,d);if(this.isXDRSupported(d.indexOf("https:")===0))return this.HTTPFactory.createXDR(m,d);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var m=this.getXHRAPI();return Boolean(m)&&new m().withCredentials!==void 0},isXDRSupported:function(m){var d=m?"https:":"http:",g=this.getProtocol();return Boolean(window.XDomainRequest)&&g===d},addUnloadListener:function(m){window.addEventListener!==void 0?window.addEventListener("unload",m,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",m)},removeUnloadListener:function(m){window.addEventListener!==void 0?window.removeEventListener("unload",m,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",m)}},Va=cI,K_;(function(m){m[m.ERROR=3]="ERROR",m[m.INFO=6]="INFO",m[m.DEBUG=7]="DEBUG"})(K_||(K_={}));var Y_=K_,sI=function(){function m(d,g,G){this.key=d,this.session=g,this.events=[],this.options=G||{},this.sent=0,this.uniqueID=0}return m.prototype.log=function(d,g){d<=this.options.level&&(this.events.push(je({},g,{timestamp:Ie.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},m.prototype.error=function(d){this.log(Y_.ERROR,d)},m.prototype.info=function(d){this.log(Y_.INFO,d)},m.prototype.debug=function(d){this.log(Y_.DEBUG,d)},m.prototype.isEmpty=function(){return this.events.length===0},m.prototype.send=function(d,g){var G=this,A=je({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],d(A,function(Q,Te){Q||G.sent++,g&&g(Q,Te)}),!0},m.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},m}(),fg=sI,bd=function(){function m(d,g,G,A){this.name=d,this.priority=g,this.transport=G,this.options=A||{}}return m.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},m.prototype.connect=function(d,g){var G=this;if(this.isSupported()){if(this.priority<d)return X_(new z_,g)}else return X_(new $s,g);var A=!1,Q=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),Te=null,_n=function(){Q.unbind("initialized",_n),Q.connect()},ma=function(){Te=Ui.createHandshake(Q,function(ui){A=!0,Io(),g(null,ui)})},yt=function(ui){Io(),g(ui)},Zt=function(){Io();var ui;ui=Ma(Q),g(new pd(ui))},Io=function(){Q.unbind("initialized",_n),Q.unbind("open",ma),Q.unbind("error",yt),Q.unbind("closed",Zt)};return Q.bind("initialized",_n),Q.bind("open",ma),Q.bind("error",yt),Q.bind("closed",Zt),Q.initialize(),{abort:function(){A||(Io(),Te?Te.close():Q.close())},forceMinPriority:function(ui){A||G.priority<ui&&(Te?Te.close():Q.close())}}},m}(),vI=bd;function X_(m,d){return Ie.defer(function(){d(m)}),{abort:function(){},forceMinPriority:function(){}}}var fI=Va.Transports,_I=function(m,d,g,G,A,Q){var Te=fI[g];if(!Te)throw new $D(g);var _n=(!m.enabledTransports||Tn(m.enabledTransports,d)!==-1)&&(!m.disabledTransports||Tn(m.disabledTransports,d)===-1),ma;return _n?(A=Object.assign({ignoreNullOrigin:m.ignoreNullOrigin},A),ma=new vI(d,G,Q?Q.getAssistant(Te):Te,A)):ma=pI,ma},pI={isSupported:function(){return!1},connect:function(m,d){var g=Ie.defer(function(){d(new $s)});return{abort:function(){g.ensureAborted()},forceMinPriority:function(){}}}};function _g(m){var d={activityTimeout:m.activityTimeout||i.activityTimeout,authEndpoint:m.authEndpoint||i.authEndpoint,authTransport:m.authTransport||i.authTransport,cluster:m.cluster||i.cluster,httpPath:m.httpPath||i.httpPath,httpPort:m.httpPort||i.httpPort,httpsPort:m.httpsPort||i.httpsPort,pongTimeout:m.pongTimeout||i.pongTimeout,statsHost:m.statsHost||i.stats_host,unavailableTimeout:m.unavailableTimeout||i.unavailableTimeout,wsPath:m.wsPath||i.wsPath,wsPort:m.wsPort||i.wsPort,wssPort:m.wssPort||i.wssPort,enableStats:DI(m),httpHost:dI(m),useTLS:hI(m),wsHost:mI(m)};return"auth"in m&&(d.auth=m.auth),"authorizer"in m&&(d.authorizer=m.authorizer),"disabledTransports"in m&&(d.disabledTransports=m.disabledTransports),"enabledTransports"in m&&(d.enabledTransports=m.enabledTransports),"ignoreNullOrigin"in m&&(d.ignoreNullOrigin=m.ignoreNullOrigin),"timelineParams"in m&&(d.timelineParams=m.timelineParams),"nacl"in m&&(d.nacl=m.nacl),d}function dI(m){return m.httpHost?m.httpHost:m.cluster?"sockjs-"+m.cluster+".pusher.com":i.httpHost}function mI(m){return m.wsHost?m.wsHost:m.cluster?pg(m.cluster):pg(i.cluster)}function pg(m){return"ws-"+m+".pusher.com"}function hI(m){return Va.getProtocol()==="https:"?!0:m.forceTLS!==!1}function DI(m){return"enableStats"in m?m.enableStats:"disableStats"in m?!m.disableStats:!1}var wd=function(){function m(d,g){var G=this;if(gI(d),g=g||{},!g.cluster&&!(g.wsHost||g.httpHost)){var A=Da.buildLogSuffix("javascriptQuickStart");vn.warn("You should always specify a cluster when connecting. "+A)}"disableStats"in g&&vn.warn("The disableStats option is deprecated in favor of enableStats"),this.key=d,this.config=_g(g),this.channels=Ui.createChannels(),this.global_emitter=new pa,this.sessionID=Math.floor(Math.random()*1e9),this.timeline=new fg(this.key,this.sessionID,{cluster:this.config.cluster,features:m.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:Y_.INFO,version:i.VERSION}),this.config.enableStats&&(this.timelineSender=Ui.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+Va.TimelineTransport.name}));var Q=function(Te){return Va.getDefaultStrategy(G.config,Te,_I)};this.connection=Ui.createConnectionManager(this.key,{getStrategy:Q,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:Boolean(this.config.useTLS)}),this.connection.bind("connected",function(){G.subscribeAll(),G.timelineSender&&G.timelineSender.send(G.connection.isUsingTLS())}),this.connection.bind("message",function(Te){var _n=Te.event,ma=_n.indexOf("pusher_internal:")===0;if(Te.channel){var yt=G.channel(Te.channel);yt&&yt.handleEvent(Te)}ma||G.global_emitter.emit(Te.event,Te.data)}),this.connection.bind("connecting",function(){G.channels.disconnect()}),this.connection.bind("disconnected",function(){G.channels.disconnect()}),this.connection.bind("error",function(Te){vn.warn(Te)}),m.instances.push(this),this.timeline.info({instances:m.instances.length}),m.isReady&&this.connect()}return m.ready=function(){m.isReady=!0;for(var d=0,g=m.instances.length;d<g;d++)m.instances[d].connect()},m.getClientFeatures=function(){return En(ia({ws:Va.Transports.ws},function(d){return d.isSupported({})}))},m.prototype.channel=function(d){return this.channels.find(d)},m.prototype.allChannels=function(){return this.channels.all()},m.prototype.connect=function(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var d=this.connection.isUsingTLS(),g=this.timelineSender;this.timelineSenderTimer=new le(6e4,function(){g.send(d)})}},m.prototype.disconnect=function(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)},m.prototype.bind=function(d,g,G){return this.global_emitter.bind(d,g,G),this},m.prototype.unbind=function(d,g,G){return this.global_emitter.unbind(d,g,G),this},m.prototype.bind_global=function(d){return this.global_emitter.bind_global(d),this},m.prototype.unbind_global=function(d){return this.global_emitter.unbind_global(d),this},m.prototype.unbind_all=function(d){return this.global_emitter.unbind_all(),this},m.prototype.subscribeAll=function(){var d;for(d in this.channels.channels)this.channels.channels.hasOwnProperty(d)&&this.subscribe(d)},m.prototype.subscribe=function(d){var g=this.channels.add(d,this);return g.subscriptionPending&&g.subscriptionCancelled?g.reinstateSubscription():!g.subscriptionPending&&this.connection.state==="connected"&&g.subscribe(),g},m.prototype.unsubscribe=function(d){var g=this.channels.find(d);g&&g.subscriptionPending?g.cancelSubscription():(g=this.channels.remove(d),g&&this.connection.state==="connected"&&g.unsubscribe())},m.prototype.send_event=function(d,g,G){return this.connection.send_event(d,g,G)},m.prototype.shouldUseTLS=function(){return this.config.useTLS},m.instances=[],m.isReady=!1,m.logToConsole=!1,m.Runtime=Va,m.ScriptReceivers=Va.ScriptReceivers,m.DependenciesReceivers=Va.DependenciesReceivers,m.auth_callbacks=Va.auth_callbacks,m}(),Ed=n.default=wd;function gI(m){if(m==null)throw"You must pass your app key when you instantiate Pusher."}Va.setup(wd)}])})});var fO=Ae((Eva,vO)=>{"use strict";var Xse="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";vO.exports=Xse});var mO=Ae((Iva,dO)=>{"use strict";var Zse=fO();function _O(){}function pO(){}pO.resetWarningCache=_O;dO.exports=function(){function e(t,r,u,i,l,s){if(s!==Zse){var h=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 h.name="Invariant Violation",h}}e.isRequired=e;function n(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:pO,resetWarningCache:_O};return a.PropTypes=a,a}});var DO=Ae((Cva,hO)=>{hO.exports=mO()();var Tva,Sva});var _F=Ae(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});var gO=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],mb=gO.join(","),RO=typeof Element=="undefined",s_=RO?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,vF=!RO&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},yO=function(n,a,t){var r=Array.prototype.slice.apply(n.querySelectorAll(mb));return a&&s_.call(n,mb)&&r.unshift(n),r=r.filter(t),r},bO=function e(n,a,t){for(var r=[],u=Array.from(n);u.length;){var i=u.shift();if(i.tagName==="SLOT"){var l=i.assignedElements(),s=l.length?l:i.children,h=e(s,!0,t);t.flatten?r.push.apply(r,h):r.push({scope:i,candidates:h})}else{var p=s_.call(i,mb);p&&t.filter(i)&&(a||!n.includes(i))&&r.push(i);var y=i.shadowRoot||typeof t.getShadowRoot=="function"&&t.getShadowRoot(i),E=!t.shadowRootFilter||t.shadowRootFilter(i);if(y&&E){var b=e(y===!0?i.children:y.children,!0,t);t.flatten?r.push.apply(r,b):r.push({scope:i,candidates:b})}else u.unshift.apply(u,i.children)}}return r},wO=function(n,a){return n.tabIndex<0&&(a||/^(AUDIO|VIDEO|DETAILS)$/.test(n.tagName)||n.isContentEditable)&&isNaN(parseInt(n.getAttribute("tabindex"),10))?0:n.tabIndex},eve=function(n,a){return n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex},EO=function(n){return n.tagName==="INPUT"},nve=function(n){return EO(n)&&n.type==="hidden"},ave=function(n){var a=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(t){return t.tagName==="SUMMARY"});return a},tve=function(n,a){for(var t=0;t<n.length;t++)if(n[t].checked&&n[t].form===a)return n[t]},rve=function(n){if(!n.name)return!0;var a=n.form||vF(n),t=function(l){return a.querySelectorAll('input[type="radio"][name="'+l+'"]')},r;if(typeof window!="undefined"&&typeof window.CSS!="undefined"&&typeof window.CSS.escape=="function")r=t(window.CSS.escape(n.name));else try{r=t(n.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var u=tve(r,n.form);return!u||u===n},ove=function(n){return EO(n)&&n.type==="radio"},uve=function(n){return ove(n)&&!rve(n)},IO=function(n){var a=n.getBoundingClientRect(),t=a.width,r=a.height;return t===0&&r===0},ive=function(n,a){var t=a.displayCheck,r=a.getShadowRoot;if(getComputedStyle(n).visibility==="hidden")return!0;var u=s_.call(n,"details>summary:first-of-type"),i=u?n.parentElement:n;if(s_.call(i,"details:not([open]) *"))return!0;var l=vF(n).host,s=(l==null?void 0:l.ownerDocument.contains(l))||n.ownerDocument.contains(n);if(!t||t==="full"){if(typeof r=="function"){for(var h=n;n;){var p=n.parentElement,y=vF(n);if(p&&!p.shadowRoot&&r(p)===!0)return IO(n);n.assignedSlot?n=n.assignedSlot:!p&&y!==n.ownerDocument?n=y.host:n=p}n=h}if(s)return!n.getClientRects().length}else if(t==="non-zero-area")return IO(n);return!1},lve=function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var a=n.parentElement;a;){if(a.tagName==="FIELDSET"&&a.disabled){for(var t=0;t<a.children.length;t++){var r=a.children.item(t);if(r.tagName==="LEGEND")return s_.call(a,"fieldset[disabled] *")?!0:!r.contains(n)}return!0}a=a.parentElement}return!1},hb=function(n,a){return!(a.disabled||nve(a)||ive(a,n)||ave(a)||lve(a))},fF=function(n,a){return!(uve(a)||wO(a)<0||!hb(n,a))},cve=function(n){var a=parseInt(n.getAttribute("tabindex"),10);return!!(isNaN(a)||a>=0)},sve=function e(n){var a=[],t=[];return n.forEach(function(r,u){var i=!!r.scope,l=i?r.scope:r,s=wO(l,i),h=i?e(r.candidates):l;s===0?i?a.push.apply(a,h):a.push(l):t.push({documentOrder:u,tabIndex:s,item:r,isScope:i,content:h})}),t.sort(eve).reduce(function(r,u){return u.isScope?r.push.apply(r,u.content):r.push(u.content),r},[]).concat(a)},vve=function(n,a){a=a||{};var t;return a.getShadowRoot?t=bO([n],a.includeContainer,{filter:fF.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:cve}):t=yO(n,a.includeContainer,fF.bind(null,a)),sve(t)},fve=function(n,a){a=a||{};var t;return a.getShadowRoot?t=bO([n],a.includeContainer,{filter:hb.bind(null,a),flatten:!0,getShadowRoot:a.getShadowRoot}):t=yO(n,a.includeContainer,hb.bind(null,a)),t},_ve=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return s_.call(n,mb)===!1?!1:fF(a,n)},pve=gO.concat("iframe").join(","),dve=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return s_.call(n,pve)===!1?!1:hb(a,n)};mp.focusable=fve;mp.isFocusable=dve;mp.isTabbable=_ve;mp.tabbable=vve});var MO=Ae(pF=>{"use strict";Object.defineProperty(pF,"__esModule",{value:!0});var Ms=_F();function TO(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,t)}return a}function SO(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?TO(Object(a),!0).forEach(function(t){mve(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):TO(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function mve(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}var CO=function(){var e=[];return{activateTrap:function(a){if(e.length>0){var t=e[e.length-1];t!==a&&t.pause()}var r=e.indexOf(a);r===-1||e.splice(r,1),e.push(a)},deactivateTrap:function(a){var t=e.indexOf(a);t!==-1&&e.splice(t,1),e.length>0&&e[e.length-1].unpause()}}}(),hve=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},Dve=function(n){return n.key==="Escape"||n.key==="Esc"||n.keyCode===27},gve=function(n){return n.key==="Tab"||n.keyCode===9},FO=function(n){return setTimeout(n,0)},GO=function(n,a){var t=-1;return n.every(function(r,u){return a(r)?(t=u,!1):!0}),t},vh=function(n){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r<a;r++)t[r-1]=arguments[r];return typeof n=="function"?n.apply(void 0,t):n},Db=function(n){return n.target.shadowRoot&&typeof n.composedPath=="function"?n.composedPath()[0]:n.target},Rve=function(n,a){var t=(a==null?void 0:a.document)||document,r=SO({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},a),u={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},i,l=function(Y,ae,me){return Y&&Y[ae]!==void 0?Y[ae]:r[me||ae]},s=function(Y){return u.containerGroups.findIndex(function(ae){var me=ae.container,ke=ae.tabbableNodes;return me.contains(Y)||ke.find(function(ce){return ce===Y})})},h=function(Y){var ae=r[Y];if(typeof ae=="function"){for(var me=arguments.length,ke=new Array(me>1?me-1:0),ce=1;ce<me;ce++)ke[ce-1]=arguments[ce];ae=ae.apply(void 0,ke)}if(ae===!0&&(ae=void 0),!ae){if(ae===void 0||ae===!1)return ae;throw new Error("`".concat(Y,"` was specified but was not a node, or did not return a node"))}var le=ae;if(typeof ae=="string"&&(le=t.querySelector(ae),!le))throw new Error("`".concat(Y,"` as selector refers to no known node"));return le},p=function(){var Y=h("initialFocus");if(Y===!1)return!1;if(Y===void 0)if(s(t.activeElement)>=0)Y=t.activeElement;else{var ae=u.tabbableGroups[0],me=ae&&ae.firstTabbableNode;Y=me||h("fallbackFocus")}if(!Y)throw new Error("Your focus-trap needs to have at least one focusable element");return Y},y=function(){if(u.containerGroups=u.containers.map(function(Y){var ae=Ms.tabbable(Y,r.tabbableOptions),me=Ms.focusable(Y,r.tabbableOptions);return{container:Y,tabbableNodes:ae,focusableNodes:me,firstTabbableNode:ae.length>0?ae[0]:null,lastTabbableNode:ae.length>0?ae[ae.length-1]:null,nextTabbableNode:function(ce){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Ce=me.findIndex(function(Ie){return Ie===ce});if(!(Ce<0))return le?me.slice(Ce+1).find(function(Ie){return Ms.isTabbable(Ie,r.tabbableOptions)}):me.slice(0,Ce).reverse().find(function(Ie){return Ms.isTabbable(Ie,r.tabbableOptions)})}}}),u.tabbableGroups=u.containerGroups.filter(function(Y){return Y.tabbableNodes.length>0}),u.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},E=function X(Y){if(Y!==!1&&Y!==t.activeElement){if(!Y||!Y.focus){X(p());return}Y.focus({preventScroll:!!r.preventScroll}),u.mostRecentlyFocusedNode=Y,hve(Y)&&Y.select()}},b=function(Y){var ae=h("setReturnFocus",Y);return ae||(ae===!1?!1:Y)},T=function(Y){var ae=Db(Y);if(!(s(ae)>=0)){if(vh(r.clickOutsideDeactivates,Y)){i.deactivate({returnFocus:r.returnFocusOnDeactivate&&!Ms.isFocusable(ae,r.tabbableOptions)});return}vh(r.allowOutsideClick,Y)||Y.preventDefault()}},L=function(Y){var ae=Db(Y),me=s(ae)>=0;me||ae instanceof Document?me&&(u.mostRecentlyFocusedNode=ae):(Y.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||p()))},U=function(Y){var ae=Db(Y);y();var me=null;if(u.tabbableGroups.length>0){var ke=s(ae),ce=ke>=0?u.containerGroups[ke]:void 0;if(ke<0)Y.shiftKey?me=u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:me=u.tabbableGroups[0].firstTabbableNode;else if(Y.shiftKey){var le=GO(u.tabbableGroups,function(Qn){var En=Qn.firstTabbableNode;return ae===En});if(le<0&&(ce.container===ae||Ms.isFocusable(ae,r.tabbableOptions)&&!Ms.isTabbable(ae,r.tabbableOptions)&&!ce.nextTabbableNode(ae,!1))&&(le=ke),le>=0){var Ce=le===0?u.tabbableGroups.length-1:le-1,Ie=u.tabbableGroups[Ce];me=Ie.lastTabbableNode}}else{var je=GO(u.tabbableGroups,function(Qn){var En=Qn.lastTabbableNode;return ae===En});if(je<0&&(ce.container===ae||Ms.isFocusable(ae,r.tabbableOptions)&&!Ms.isTabbable(ae,r.tabbableOptions)&&!ce.nextTabbableNode(ae))&&(je=ke),je>=0){var Ke=je===u.tabbableGroups.length-1?0:je+1,Tn=u.tabbableGroups[Ke];me=Tn.firstTabbableNode}}}else me=h("fallbackFocus");me&&(Y.preventDefault(),E(me))},$=function(Y){if(Dve(Y)&&vh(r.escapeDeactivates,Y)!==!1){Y.preventDefault(),i.deactivate();return}if(gve(Y)){U(Y);return}},z=function(Y){var ae=Db(Y);s(ae)>=0||vh(r.clickOutsideDeactivates,Y)||vh(r.allowOutsideClick,Y)||(Y.preventDefault(),Y.stopImmediatePropagation())},Z=function(){if(!!u.active)return CO.activateTrap(i),u.delayInitialFocusTimer=r.delayInitialFocus?FO(function(){E(p())}):E(p()),t.addEventListener("focusin",L,!0),t.addEventListener("mousedown",T,{capture:!0,passive:!1}),t.addEventListener("touchstart",T,{capture:!0,passive:!1}),t.addEventListener("click",z,{capture:!0,passive:!1}),t.addEventListener("keydown",$,{capture:!0,passive:!1}),i},ue=function(){if(!!u.active)return t.removeEventListener("focusin",L,!0),t.removeEventListener("mousedown",T,!0),t.removeEventListener("touchstart",T,!0),t.removeEventListener("click",z,!0),t.removeEventListener("keydown",$,!0),i};return i={get active(){return u.active},get paused(){return u.paused},activate:function(Y){if(u.active)return this;var ae=l(Y,"onActivate"),me=l(Y,"onPostActivate"),ke=l(Y,"checkCanFocusTrap");ke||y(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=t.activeElement,ae&&ae();var ce=function(){ke&&y(),Z(),me&&me()};return ke?(ke(u.containers.concat()).then(ce,ce),this):(ce(),this)},deactivate:function(Y){if(!u.active)return this;var ae=SO({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},Y);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,ue(),u.active=!1,u.paused=!1,CO.deactivateTrap(i);var me=l(ae,"onDeactivate"),ke=l(ae,"onPostDeactivate"),ce=l(ae,"checkCanReturnFocus"),le=l(ae,"returnFocus","returnFocusOnDeactivate");me&&me();var Ce=function(){FO(function(){le&&E(b(u.nodeFocusedBeforeActivation)),ke&&ke()})};return le&&ce?(ce(b(u.nodeFocusedBeforeActivation)).then(Ce,Ce),this):(Ce(),this)},pause:function(){return u.paused||!u.active?this:(u.paused=!0,ue(),this)},unpause:function(){return!u.paused||!u.active?this:(u.paused=!1,y(),Z(),this)},updateContainerElements:function(Y){var ae=[].concat(Y).filter(Boolean);return u.containers=ae.map(function(me){return typeof me=="string"?t.querySelector(me):me}),u.active&&y(),this}},i.updateContainerElements(n),i};pF.createFocusTrap=Rve});var PO=Ae((Mva,LO)=>{"use strict";function dF(e){return dF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},dF(e)}function yve(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function AO(e,n){for(var a=0;a<n.length;a++){var t=n[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function bve(e,n,a){return n&&AO(e.prototype,n),a&&AO(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function wve(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&mF(e,n)}function mF(e,n){return mF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},mF(e,n)}function Eve(e){var n=Tve();return function(){var t=gb(e),r;if(n){var u=gb(this).constructor;r=Reflect.construct(t,arguments,u)}else r=t.apply(this,arguments);return Ive(this,r)}}function Ive(e,n){if(n&&(dF(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fh(e)}function fh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tve(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gb(e){return gb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},gb(e)}function Sve(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}var Rb=(Wa(),NR),xa=DO(),Cve=MO(),Fve=Cve.createFocusTrap,Gve=_F(),Mve=Gve.isFocusable,hF=function(e){wve(a,e);var n=Eve(a);function a(t){var r;yve(this,a),r=n.call(this,t),Sve(fh(r),"getNodeForOption",function(l){var s,h=(s=this.internalOptions[l])!==null&&s!==void 0?s:this.originalOptions[l];if(typeof h=="function"){for(var p=arguments.length,y=new Array(p>1?p-1:0),E=1;E<p;E++)y[E-1]=arguments[E];h=h.apply(void 0,y)}if(h===!0&&(h=void 0),!h){if(h===void 0||h===!1)return h;throw new Error("`".concat(l,"` was specified but was not a node, or did not return a node"))}var b=h;if(typeof h=="string"){var T;if(b=(T=this.getDocument())===null||T===void 0?void 0:T.querySelector(h),!b)throw new Error("`".concat(l,"` as selector refers to no known node"))}return b}),r.handleDeactivate=r.handleDeactivate.bind(fh(r)),r.handlePostDeactivate=r.handlePostDeactivate.bind(fh(r)),r.handleClickOutsideDeactivates=r.handleClickOutsideDeactivates.bind(fh(r)),r.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:r.handleDeactivate,onPostDeactivate:r.handlePostDeactivate,clickOutsideDeactivates:r.handleClickOutsideDeactivates},r.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var u=t.focusTrapOptions;for(var i in u)if(!!Object.prototype.hasOwnProperty.call(u,i)){if(i==="returnFocusOnDeactivate"||i==="onDeactivate"||i==="onPostDeactivate"||i==="checkCanReturnFocus"||i==="clickOutsideDeactivates"){r.originalOptions[i]=u[i];continue}r.internalOptions[i]=u[i]}return r.outsideClick=null,r.focusTrapElements=t.containerElements||[],r.updatePreviousElement(),r}return bve(a,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document!="undefined"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var r=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return r||(r===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var r=this.getDocument();r&&(this.previouslyFocusedElement=r.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(r){var u=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,r):this.originalOptions.clickOutsideDeactivates;return u&&(this.outsideClick={target:r.target,allowDeactivation:u}),u}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var r=this,u=function(){var l=r.getReturnFocusNode(),s=!!(r.originalOptions.returnFocusOnDeactivate&&l!==null&&l!==void 0&&l.focus&&(!r.outsideClick||r.outsideClick.allowDeactivation&&!Mve(r.outsideClick.target,r.internalOptions.tabbableOptions))),h=r.internalOptions.preventScroll,p=h===void 0?!1:h;s&&l.focus({preventScroll:p}),r.originalOptions.onPostDeactivate&&r.originalOptions.onPostDeactivate.call(null),r.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(u,u):u()}},{key:"setupFocusTrap",value:function(){if(this.focusTrap)this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause());else{var r=this.focusTrapElements.some(Boolean);r&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(r){if(this.focusTrap){r.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var u=!r.active&&this.props.active,i=r.active&&!this.props.active,l=!r.paused&&this.props.paused,s=r.paused&&!this.props.paused;if(u&&(this.updatePreviousElement(),this.focusTrap.activate()),i){this.deactivateTrap();return}l&&this.focusTrap.pause(),s&&this.focusTrap.unpause()}else r.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var r=this,u=this.props.children?Rb.Children.only(this.props.children):void 0;if(u){if(u.type&&u.type===Rb.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var i=function(h){var p=r.props.containerElements;u&&(typeof u.ref=="function"?u.ref(h):u.ref&&(u.ref.current=h)),r.focusTrapElements=p||[h]},l=Rb.cloneElement(u,{ref:i});return l}return null}}]),a}(Rb.Component),_h=typeof Element=="undefined"?Function:Element;hF.propTypes={active:xa.bool,paused:xa.bool,focusTrapOptions:xa.shape({document:xa.object,onActivate:xa.func,onPostActivate:xa.func,checkCanFocusTrap:xa.func,onDeactivate:xa.func,onPostDeactivate:xa.func,checkCanReturnFocus:xa.func,initialFocus:xa.oneOfType([xa.instanceOf(_h),xa.string,xa.bool,xa.func]),fallbackFocus:xa.oneOfType([xa.instanceOf(_h),xa.string,xa.func]),escapeDeactivates:xa.oneOfType([xa.bool,xa.func]),clickOutsideDeactivates:xa.oneOfType([xa.bool,xa.func]),returnFocusOnDeactivate:xa.bool,setReturnFocus:xa.oneOfType([xa.instanceOf(_h),xa.string,xa.bool,xa.func]),allowOutsideClick:xa.oneOfType([xa.bool,xa.func]),preventScroll:xa.bool,tabbableOptions:xa.shape({displayCheck:xa.oneOf(["full","non-zero-area","none"]),getShadowRoot:xa.oneOfType([xa.bool,xa.func])})}),containerElements:xa.arrayOf(xa.instanceOf(_h)),children:xa.oneOfType([xa.element,xa.instanceOf(_h)])};hF.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:Fve};LO.exports=hF});var B6=Ae(Ut=>{"use strict";var yo=typeof Symbol=="function"&&Symbol.for,KF=yo?Symbol.for("react.element"):60103,YF=yo?Symbol.for("react.portal"):60106,Mb=yo?Symbol.for("react.fragment"):60107,Ab=yo?Symbol.for("react.strict_mode"):60108,Lb=yo?Symbol.for("react.profiler"):60114,Pb=yo?Symbol.for("react.provider"):60109,xb=yo?Symbol.for("react.context"):60110,XF=yo?Symbol.for("react.async_mode"):60111,Nb=yo?Symbol.for("react.concurrent_mode"):60111,jb=yo?Symbol.for("react.forward_ref"):60112,Ub=yo?Symbol.for("react.suspense"):60113,ume=yo?Symbol.for("react.suspense_list"):60120,Ob=yo?Symbol.for("react.memo"):60115,kb=yo?Symbol.for("react.lazy"):60116,ime=yo?Symbol.for("react.block"):60121,lme=yo?Symbol.for("react.fundamental"):60117,cme=yo?Symbol.for("react.responder"):60118,sme=yo?Symbol.for("react.scope"):60119;function Si(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case KF:switch(e=e.type,e){case XF:case Nb:case Mb:case Lb:case Ab:case Ub:return e;default:switch(e=e&&e.$$typeof,e){case xb:case jb:case kb:case Ob:case Pb:return e;default:return n}}case YF:return n}}}function k6(e){return Si(e)===Nb}Ut.AsyncMode=XF;Ut.ConcurrentMode=Nb;Ut.ContextConsumer=xb;Ut.ContextProvider=Pb;Ut.Element=KF;Ut.ForwardRef=jb;Ut.Fragment=Mb;Ut.Lazy=kb;Ut.Memo=Ob;Ut.Portal=YF;Ut.Profiler=Lb;Ut.StrictMode=Ab;Ut.Suspense=Ub;Ut.isAsyncMode=function(e){return k6(e)||Si(e)===XF};Ut.isConcurrentMode=k6;Ut.isContextConsumer=function(e){return Si(e)===xb};Ut.isContextProvider=function(e){return Si(e)===Pb};Ut.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===KF};Ut.isForwardRef=function(e){return Si(e)===jb};Ut.isFragment=function(e){return Si(e)===Mb};Ut.isLazy=function(e){return Si(e)===kb};Ut.isMemo=function(e){return Si(e)===Ob};Ut.isPortal=function(e){return Si(e)===YF};Ut.isProfiler=function(e){return Si(e)===Lb};Ut.isStrictMode=function(e){return Si(e)===Ab};Ut.isSuspense=function(e){return Si(e)===Ub};Ut.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Mb||e===Nb||e===Lb||e===Ab||e===Ub||e===ume||typeof e=="object"&&e!==null&&(e.$$typeof===kb||e.$$typeof===Ob||e.$$typeof===Pb||e.$$typeof===xb||e.$$typeof===jb||e.$$typeof===lme||e.$$typeof===cme||e.$$typeof===sme||e.$$typeof===ime)};Ut.typeOf=Si});var q6=Ae((O2a,H6)=>{"use strict";H6.exports=B6()});var g_=Ae((Z2a,qb)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=t(r,a(i)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)e.call(r,i)&&r[i]&&(u=t(u,i));return u}function t(r,u){return u?r?r+" "+u:r+u:r}typeof qb!="undefined"&&qb.exports?(n.default=n,qb.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var x5=Ae((HPa,P5)=>{function Kme(){this.__data__=[],this.size=0}P5.exports=Kme});var bG=Ae((qPa,N5)=>{function Yme(e,n){return e===n||e!==e&&n!==n}N5.exports=Yme});var Ch=Ae((WPa,j5)=>{var Xme=bG();function Zme(e,n){for(var a=e.length;a--;)if(Xme(e[a][0],n))return a;return-1}j5.exports=Zme});var O5=Ae((JPa,U5)=>{var ehe=Ch(),nhe=Array.prototype,ahe=nhe.splice;function the(e){var n=this.__data__,a=ehe(n,e);if(a<0)return!1;var t=n.length-1;return a==t?n.pop():ahe.call(n,a,1),--this.size,!0}U5.exports=the});var B5=Ae(($Pa,k5)=>{var rhe=Ch();function ohe(e){var n=this.__data__,a=rhe(n,e);return a<0?void 0:n[a][1]}k5.exports=ohe});var q5=Ae((zPa,H5)=>{var uhe=Ch();function ihe(e){return uhe(this.__data__,e)>-1}H5.exports=ihe});var J5=Ae((VPa,W5)=>{var lhe=Ch();function che(e,n){var a=this.__data__,t=lhe(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this}W5.exports=che});var Fh=Ae((QPa,$5)=>{var she=x5(),vhe=O5(),fhe=B5(),_he=q5(),phe=J5();function Ip(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n<a;){var t=e[n];this.set(t[0],t[1])}}Ip.prototype.clear=she;Ip.prototype.delete=vhe;Ip.prototype.get=fhe;Ip.prototype.has=_he;Ip.prototype.set=phe;$5.exports=Ip});var V5=Ae((KPa,z5)=>{var dhe=Fh();function mhe(){this.__data__=new dhe,this.size=0}z5.exports=mhe});var K5=Ae((YPa,Q5)=>{function hhe(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a}Q5.exports=hhe});var X5=Ae((XPa,Y5)=>{function Dhe(e){return this.__data__.get(e)}Y5.exports=Dhe});var e9=Ae((ZPa,Z5)=>{function ghe(e){return this.__data__.has(e)}Z5.exports=ghe});var wG=Ae((exa,n9)=>{var Rhe=typeof global=="object"&&global&&global.Object===Object&&global;n9.exports=Rhe});var Lc=Ae((nxa,a9)=>{var yhe=wG(),bhe=typeof self=="object"&&self&&self.Object===Object&&self,whe=yhe||bhe||Function("return this")();a9.exports=whe});var vw=Ae((axa,t9)=>{var Ehe=Lc(),Ihe=Ehe.Symbol;t9.exports=Ihe});var i9=Ae((txa,u9)=>{var r9=vw(),o9=Object.prototype,The=o9.hasOwnProperty,She=o9.toString,Gh=r9?r9.toStringTag:void 0;function Che(e){var n=The.call(e,Gh),a=e[Gh];try{e[Gh]=void 0;var t=!0}catch{}var r=She.call(e);return t&&(n?e[Gh]=a:delete e[Gh]),r}u9.exports=Che});var c9=Ae((rxa,l9)=>{var Fhe=Object.prototype,Ghe=Fhe.toString;function Mhe(e){return Ghe.call(e)}l9.exports=Mhe});var Mh=Ae((oxa,f9)=>{var s9=vw(),Ahe=i9(),Lhe=c9(),Phe="[object Null]",xhe="[object Undefined]",v9=s9?s9.toStringTag:void 0;function Nhe(e){return e==null?e===void 0?xhe:Phe:v9&&v9 in Object(e)?Ahe(e):Lhe(e)}f9.exports=Nhe});var EG=Ae((uxa,_9)=>{function jhe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}_9.exports=jhe});var IG=Ae((ixa,p9)=>{var Uhe=Mh(),Ohe=EG(),khe="[object AsyncFunction]",Bhe="[object Function]",Hhe="[object GeneratorFunction]",qhe="[object Proxy]";function Whe(e){if(!Ohe(e))return!1;var n=Uhe(e);return n==Bhe||n==Hhe||n==khe||n==qhe}p9.exports=Whe});var m9=Ae((lxa,d9)=>{var Jhe=Lc(),$he=Jhe["__core-js_shared__"];d9.exports=$he});var g9=Ae((cxa,D9)=>{var TG=m9(),h9=function(){var e=/[^.]+$/.exec(TG&&TG.keys&&TG.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function zhe(e){return!!h9&&h9 in e}D9.exports=zhe});var SG=Ae((sxa,R9)=>{var Vhe=Function.prototype,Qhe=Vhe.toString;function Khe(e){if(e!=null){try{return Qhe.call(e)}catch{}try{return e+""}catch{}}return""}R9.exports=Khe});var b9=Ae((vxa,y9)=>{var Yhe=IG(),Xhe=g9(),Zhe=EG(),eDe=SG(),nDe=/[\\^$.*+?()[\]{}|]/g,aDe=/^\[object .+?Constructor\]$/,tDe=Function.prototype,rDe=Object.prototype,oDe=tDe.toString,uDe=rDe.hasOwnProperty,iDe=RegExp("^"+oDe.call(uDe).replace(nDe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lDe(e){if(!Zhe(e)||Xhe(e))return!1;var n=Yhe(e)?iDe:aDe;return n.test(eDe(e))}y9.exports=lDe});var E9=Ae((fxa,w9)=>{function cDe(e,n){return e==null?void 0:e[n]}w9.exports=cDe});var y_=Ae((_xa,I9)=>{var sDe=b9(),vDe=E9();function fDe(e,n){var a=vDe(e,n);return sDe(a)?a:void 0}I9.exports=fDe});var fw=Ae((pxa,T9)=>{var _De=y_(),pDe=Lc(),dDe=_De(pDe,"Map");T9.exports=dDe});var Ah=Ae((dxa,S9)=>{var mDe=y_(),hDe=mDe(Object,"create");S9.exports=hDe});var G9=Ae((mxa,F9)=>{var C9=Ah();function DDe(){this.__data__=C9?C9(null):{},this.size=0}F9.exports=DDe});var A9=Ae((hxa,M9)=>{function gDe(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}M9.exports=gDe});var P9=Ae((Dxa,L9)=>{var RDe=Ah(),yDe="__lodash_hash_undefined__",bDe=Object.prototype,wDe=bDe.hasOwnProperty;function EDe(e){var n=this.__data__;if(RDe){var a=n[e];return a===yDe?void 0:a}return wDe.call(n,e)?n[e]:void 0}L9.exports=EDe});var N9=Ae((gxa,x9)=>{var IDe=Ah(),TDe=Object.prototype,SDe=TDe.hasOwnProperty;function CDe(e){var n=this.__data__;return IDe?n[e]!==void 0:SDe.call(n,e)}x9.exports=CDe});var U9=Ae((Rxa,j9)=>{var FDe=Ah(),GDe="__lodash_hash_undefined__";function MDe(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=FDe&&n===void 0?GDe:n,this}j9.exports=MDe});var k9=Ae((yxa,O9)=>{var ADe=G9(),LDe=A9(),PDe=P9(),xDe=N9(),NDe=U9();function Tp(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n<a;){var t=e[n];this.set(t[0],t[1])}}Tp.prototype.clear=ADe;Tp.prototype.delete=LDe;Tp.prototype.get=PDe;Tp.prototype.has=xDe;Tp.prototype.set=NDe;O9.exports=Tp});var q9=Ae((bxa,H9)=>{var B9=k9(),jDe=Fh(),UDe=fw();function ODe(){this.size=0,this.__data__={hash:new B9,map:new(UDe||jDe),string:new B9}}H9.exports=ODe});var J9=Ae((wxa,W9)=>{function kDe(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}W9.exports=kDe});var Lh=Ae((Exa,$9)=>{var BDe=J9();function HDe(e,n){var a=e.__data__;return BDe(n)?a[typeof n=="string"?"string":"hash"]:a.map}$9.exports=HDe});var V9=Ae((Ixa,z9)=>{var qDe=Lh();function WDe(e){var n=qDe(this,e).delete(e);return this.size-=n?1:0,n}z9.exports=WDe});var K9=Ae((Txa,Q9)=>{var JDe=Lh();function $De(e){return JDe(this,e).get(e)}Q9.exports=$De});var X9=Ae((Sxa,Y9)=>{var zDe=Lh();function VDe(e){return zDe(this,e).has(e)}Y9.exports=VDe});var ek=Ae((Cxa,Z9)=>{var QDe=Lh();function KDe(e,n){var a=QDe(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this}Z9.exports=KDe});var CG=Ae((Fxa,nk)=>{var YDe=q9(),XDe=V9(),ZDe=K9(),ege=X9(),nge=ek();function Sp(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n<a;){var t=e[n];this.set(t[0],t[1])}}Sp.prototype.clear=YDe;Sp.prototype.delete=XDe;Sp.prototype.get=ZDe;Sp.prototype.has=ege;Sp.prototype.set=nge;nk.exports=Sp});var tk=Ae((Gxa,ak)=>{var age=Fh(),tge=fw(),rge=CG(),oge=200;function uge(e,n){var a=this.__data__;if(a instanceof age){var t=a.__data__;if(!tge||t.length<oge-1)return t.push([e,n]),this.size=++a.size,this;a=this.__data__=new rge(t)}return a.set(e,n),this.size=a.size,this}ak.exports=uge});var ok=Ae((Mxa,rk)=>{var ige=Fh(),lge=V5(),cge=K5(),sge=X5(),vge=e9(),fge=tk();function Cp(e){var n=this.__data__=new ige(e);this.size=n.size}Cp.prototype.clear=lge;Cp.prototype.delete=cge;Cp.prototype.get=sge;Cp.prototype.has=vge;Cp.prototype.set=fge;rk.exports=Cp});var ik=Ae((Axa,uk)=>{var _ge="__lodash_hash_undefined__";function pge(e){return this.__data__.set(e,_ge),this}uk.exports=pge});var ck=Ae((Lxa,lk)=>{function dge(e){return this.__data__.has(e)}lk.exports=dge});var vk=Ae((Pxa,sk)=>{var mge=CG(),hge=ik(),Dge=ck();function _w(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new mge;++n<a;)this.add(e[n])}_w.prototype.add=_w.prototype.push=hge;_w.prototype.has=Dge;sk.exports=_w});var _k=Ae((xxa,fk)=>{function gge(e,n){for(var a=-1,t=e==null?0:e.length;++a<t;)if(n(e[a],a,e))return!0;return!1}fk.exports=gge});var dk=Ae((Nxa,pk)=>{function Rge(e,n){return e.has(n)}pk.exports=Rge});var FG=Ae((jxa,mk)=>{var yge=vk(),bge=_k(),wge=dk(),Ege=1,Ige=2;function Tge(e,n,a,t,r,u){var i=a&Ege,l=e.length,s=n.length;if(l!=s&&!(i&&s>l))return!1;var h=u.get(e),p=u.get(n);if(h&&p)return h==n&&p==e;var y=-1,E=!0,b=a&Ige?new yge:void 0;for(u.set(e,n),u.set(n,e);++y<l;){var T=e[y],L=n[y];if(t)var U=i?t(L,T,y,n,e,u):t(T,L,y,e,n,u);if(U!==void 0){if(U)continue;E=!1;break}if(b){if(!bge(n,function($,z){if(!wge(b,z)&&(T===$||r(T,$,a,t,u)))return b.push(z)})){E=!1;break}}else if(!(T===L||r(T,L,a,t,u))){E=!1;break}}return u.delete(e),u.delete(n),E}mk.exports=Tge});var Dk=Ae((Uxa,hk)=>{var Sge=Lc(),Cge=Sge.Uint8Array;hk.exports=Cge});var Rk=Ae((Oxa,gk)=>{function Fge(e){var n=-1,a=Array(e.size);return e.forEach(function(t,r){a[++n]=[r,t]}),a}gk.exports=Fge});var bk=Ae((kxa,yk)=>{function Gge(e){var n=-1,a=Array(e.size);return e.forEach(function(t){a[++n]=t}),a}yk.exports=Gge});var Sk=Ae((Bxa,Tk)=>{var wk=vw(),Ek=Dk(),Mge=bG(),Age=FG(),Lge=Rk(),Pge=bk(),xge=1,Nge=2,jge="[object Boolean]",Uge="[object Date]",Oge="[object Error]",kge="[object Map]",Bge="[object Number]",Hge="[object RegExp]",qge="[object Set]",Wge="[object String]",Jge="[object Symbol]",$ge="[object ArrayBuffer]",zge="[object DataView]",Ik=wk?wk.prototype:void 0,GG=Ik?Ik.valueOf:void 0;function Vge(e,n,a,t,r,u,i){switch(a){case zge:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case $ge:return!(e.byteLength!=n.byteLength||!u(new Ek(e),new Ek(n)));case jge:case Uge:case Bge:return Mge(+e,+n);case Oge:return e.name==n.name&&e.message==n.message;case Hge:case Wge:return e==n+"";case kge:var l=Lge;case qge:var s=t&xge;if(l||(l=Pge),e.size!=n.size&&!s)return!1;var h=i.get(e);if(h)return h==n;t|=Nge,i.set(e,n);var p=Age(l(e),l(n),t,r,u,i);return i.delete(e),p;case Jge:if(GG)return GG.call(e)==GG.call(n)}return!1}Tk.exports=Vge});var Fk=Ae((Hxa,Ck)=>{function Qge(e,n){for(var a=-1,t=n.length,r=e.length;++a<t;)e[r+a]=n[a];return e}Ck.exports=Qge});var pw=Ae((qxa,Gk)=>{var Kge=Array.isArray;Gk.exports=Kge});var Ak=Ae((Wxa,Mk)=>{var Yge=Fk(),Xge=pw();function Zge(e,n,a){var t=n(e);return Xge(e)?t:Yge(t,a(e))}Mk.exports=Zge});var Pk=Ae((Jxa,Lk)=>{function eRe(e,n){for(var a=-1,t=e==null?0:e.length,r=0,u=[];++a<t;){var i=e[a];n(i,a,e)&&(u[r++]=i)}return u}Lk.exports=eRe});var Nk=Ae(($xa,xk)=>{function nRe(){return[]}xk.exports=nRe});var Ok=Ae((zxa,Uk)=>{var aRe=Pk(),tRe=Nk(),rRe=Object.prototype,oRe=rRe.propertyIsEnumerable,jk=Object.getOwnPropertySymbols,uRe=jk?function(e){return e==null?[]:(e=Object(e),aRe(jk(e),function(n){return oRe.call(e,n)}))}:tRe;Uk.exports=uRe});var Bk=Ae((Vxa,kk)=>{function iRe(e,n){for(var a=-1,t=Array(e);++a<e;)t[a]=n(a);return t}kk.exports=iRe});var Ph=Ae((Qxa,Hk)=>{function lRe(e){return e!=null&&typeof e=="object"}Hk.exports=lRe});var Wk=Ae((Kxa,qk)=>{var cRe=Mh(),sRe=Ph(),vRe="[object Arguments]";function fRe(e){return sRe(e)&&cRe(e)==vRe}qk.exports=fRe});var Vk=Ae((Yxa,zk)=>{var Jk=Wk(),_Re=Ph(),$k=Object.prototype,pRe=$k.hasOwnProperty,dRe=$k.propertyIsEnumerable,mRe=Jk(function(){return arguments}())?Jk:function(e){return _Re(e)&&pRe.call(e,"callee")&&!dRe.call(e,"callee")};zk.exports=mRe});var Kk=Ae((Xxa,Qk)=>{function hRe(){return!1}Qk.exports=hRe});var MG=Ae((xh,Fp)=>{var DRe=Lc(),gRe=Kk(),Yk=typeof xh=="object"&&xh&&!xh.nodeType&&xh,Xk=Yk&&typeof Fp=="object"&&Fp&&!Fp.nodeType&&Fp,RRe=Xk&&Xk.exports===Yk,Zk=RRe?DRe.Buffer:void 0,yRe=Zk?Zk.isBuffer:void 0,bRe=yRe||gRe;Fp.exports=bRe});var nB=Ae((Zxa,eB)=>{var wRe=9007199254740991,ERe=/^(?:0|[1-9]\d*)$/;function IRe(e,n){var a=typeof e;return n=n==null?wRe:n,!!n&&(a=="number"||a!="symbol"&&ERe.test(e))&&e>-1&&e%1==0&&e<n}eB.exports=IRe});var AG=Ae((eNa,aB)=>{var TRe=9007199254740991;function SRe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=TRe}aB.exports=SRe});var rB=Ae((nNa,tB)=>{var CRe=Mh(),FRe=AG(),GRe=Ph(),MRe="[object Arguments]",ARe="[object Array]",LRe="[object Boolean]",PRe="[object Date]",xRe="[object Error]",NRe="[object Function]",jRe="[object Map]",URe="[object Number]",ORe="[object Object]",kRe="[object RegExp]",BRe="[object Set]",HRe="[object String]",qRe="[object WeakMap]",WRe="[object ArrayBuffer]",JRe="[object DataView]",$Re="[object Float32Array]",zRe="[object Float64Array]",VRe="[object Int8Array]",QRe="[object Int16Array]",KRe="[object Int32Array]",YRe="[object Uint8Array]",XRe="[object Uint8ClampedArray]",ZRe="[object Uint16Array]",eye="[object Uint32Array]",cr={};cr[$Re]=cr[zRe]=cr[VRe]=cr[QRe]=cr[KRe]=cr[YRe]=cr[XRe]=cr[ZRe]=cr[eye]=!0;cr[MRe]=cr[ARe]=cr[WRe]=cr[LRe]=cr[JRe]=cr[PRe]=cr[xRe]=cr[NRe]=cr[jRe]=cr[URe]=cr[ORe]=cr[kRe]=cr[BRe]=cr[HRe]=cr[qRe]=!1;function nye(e){return GRe(e)&&FRe(e.length)&&!!cr[CRe(e)]}tB.exports=nye});var uB=Ae((aNa,oB)=>{function aye(e){return function(n){return e(n)}}oB.exports=aye});var lB=Ae((jh,Gp)=>{var tye=wG(),iB=typeof jh=="object"&&jh&&!jh.nodeType&&jh,Nh=iB&&typeof Gp=="object"&&Gp&&!Gp.nodeType&&Gp,rye=Nh&&Nh.exports===iB,LG=rye&&tye.process,oye=function(){try{var e=Nh&&Nh.require&&Nh.require("util").types;return e||LG&&LG.binding&&LG.binding("util")}catch{}}();Gp.exports=oye});var PG=Ae((tNa,vB)=>{var uye=rB(),iye=uB(),cB=lB(),sB=cB&&cB.isTypedArray,lye=sB?iye(sB):uye;vB.exports=lye});var _B=Ae((rNa,fB)=>{var cye=Bk(),sye=Vk(),vye=pw(),fye=MG(),_ye=nB(),pye=PG(),dye=Object.prototype,mye=dye.hasOwnProperty;function hye(e,n){var a=vye(e),t=!a&&sye(e),r=!a&&!t&&fye(e),u=!a&&!t&&!r&&pye(e),i=a||t||r||u,l=i?cye(e.length,String):[],s=l.length;for(var h in e)(n||mye.call(e,h))&&!(i&&(h=="length"||r&&(h=="offset"||h=="parent")||u&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||_ye(h,s)))&&l.push(h);return l}fB.exports=hye});var dB=Ae((oNa,pB)=>{var Dye=Object.prototype;function gye(e){var n=e&&e.constructor,a=typeof n=="function"&&n.prototype||Dye;return e===a}pB.exports=gye});var hB=Ae((uNa,mB)=>{function Rye(e,n){return function(a){return e(n(a))}}mB.exports=Rye});var gB=Ae((iNa,DB)=>{var yye=hB(),bye=yye(Object.keys,Object);DB.exports=bye});var yB=Ae((lNa,RB)=>{var wye=dB(),Eye=gB(),Iye=Object.prototype,Tye=Iye.hasOwnProperty;function Sye(e){if(!wye(e))return Eye(e);var n=[];for(var a in Object(e))Tye.call(e,a)&&a!="constructor"&&n.push(a);return n}RB.exports=Sye});var wB=Ae((cNa,bB)=>{var Cye=IG(),Fye=AG();function Gye(e){return e!=null&&Fye(e.length)&&!Cye(e)}bB.exports=Gye});var IB=Ae((sNa,EB)=>{var Mye=_B(),Aye=yB(),Lye=wB();function Pye(e){return Lye(e)?Mye(e):Aye(e)}EB.exports=Pye});var SB=Ae((vNa,TB)=>{var xye=Ak(),Nye=Ok(),jye=IB();function Uye(e){return xye(e,jye,Nye)}TB.exports=Uye});var GB=Ae((fNa,FB)=>{var CB=SB(),Oye=1,kye=Object.prototype,Bye=kye.hasOwnProperty;function Hye(e,n,a,t,r,u){var i=a&Oye,l=CB(e),s=l.length,h=CB(n),p=h.length;if(s!=p&&!i)return!1;for(var y=s;y--;){var E=l[y];if(!(i?E in n:Bye.call(n,E)))return!1}var b=u.get(e),T=u.get(n);if(b&&T)return b==n&&T==e;var L=!0;u.set(e,n),u.set(n,e);for(var U=i;++y<s;){E=l[y];var $=e[E],z=n[E];if(t)var Z=i?t(z,$,E,n,e,u):t($,z,E,e,n,u);if(!(Z===void 0?$===z||r($,z,a,t,u):Z)){L=!1;break}U||(U=E=="constructor")}if(L&&!U){var ue=e.constructor,X=n.constructor;ue!=X&&"constructor"in e&&"constructor"in n&&!(typeof ue=="function"&&ue instanceof ue&&typeof X=="function"&&X instanceof X)&&(L=!1)}return u.delete(e),u.delete(n),L}FB.exports=Hye});var AB=Ae((_Na,MB)=>{var qye=y_(),Wye=Lc(),Jye=qye(Wye,"DataView");MB.exports=Jye});var PB=Ae((pNa,LB)=>{var $ye=y_(),zye=Lc(),Vye=$ye(zye,"Promise");LB.exports=Vye});var NB=Ae((dNa,xB)=>{var Qye=y_(),Kye=Lc(),Yye=Qye(Kye,"Set");xB.exports=Yye});var UB=Ae((mNa,jB)=>{var Xye=y_(),Zye=Lc(),ebe=Xye(Zye,"WeakMap");jB.exports=ebe});var $B=Ae((hNa,JB)=>{var xG=AB(),NG=fw(),jG=PB(),UG=NB(),OG=UB(),OB=Mh(),Mp=SG(),kB="[object Map]",nbe="[object Object]",BB="[object Promise]",HB="[object Set]",qB="[object WeakMap]",WB="[object DataView]",abe=Mp(xG),tbe=Mp(NG),rbe=Mp(jG),obe=Mp(UG),ube=Mp(OG),b_=OB;(xG&&b_(new xG(new ArrayBuffer(1)))!=WB||NG&&b_(new NG)!=kB||jG&&b_(jG.resolve())!=BB||UG&&b_(new UG)!=HB||OG&&b_(new OG)!=qB)&&(b_=function(e){var n=OB(e),a=n==nbe?e.constructor:void 0,t=a?Mp(a):"";if(t)switch(t){case abe:return WB;case tbe:return kB;case rbe:return BB;case obe:return HB;case ube:return qB}return n});JB.exports=b_});var eH=Ae((DNa,ZB)=>{var kG=ok(),ibe=FG(),lbe=Sk(),cbe=GB(),zB=$B(),VB=pw(),QB=MG(),sbe=PG(),vbe=1,KB="[object Arguments]",YB="[object Array]",dw="[object Object]",fbe=Object.prototype,XB=fbe.hasOwnProperty;function _be(e,n,a,t,r,u){var i=VB(e),l=VB(n),s=i?YB:zB(e),h=l?YB:zB(n);s=s==KB?dw:s,h=h==KB?dw:h;var p=s==dw,y=h==dw,E=s==h;if(E&&QB(e)){if(!QB(n))return!1;i=!0,p=!1}if(E&&!p)return u||(u=new kG),i||sbe(e)?ibe(e,n,a,t,r,u):lbe(e,n,s,a,t,r,u);if(!(a&vbe)){var b=p&&XB.call(e,"__wrapped__"),T=y&&XB.call(n,"__wrapped__");if(b||T){var L=b?e.value():e,U=T?n.value():n;return u||(u=new kG),r(L,U,a,t,u)}}return E?(u||(u=new kG),cbe(e,n,a,t,r,u)):!1}ZB.exports=_be});var rH=Ae((gNa,tH)=>{var pbe=eH(),nH=Ph();function aH(e,n,a,t,r){return e===n?!0:e==null||n==null||!nH(e)&&!nH(n)?e!==e&&n!==n:pbe(e,n,a,t,aH,r)}tH.exports=aH});var uH=Ae((RNa,oH)=>{var dbe=rH();function mbe(e,n){return dbe(e,n)}oH.exports=mbe});var BH=Ae((_4a,Wbe)=>{Wbe.exports=`.rc-tooltip.rc-tooltip-zoom-appear, .rc-tooltip.rc-tooltip-zoom-enter { opacity: 0; } .rc-tooltip.rc-tooltip-zoom-enter, .rc-tooltip.rc-tooltip-zoom-leave { display: block; } .rc-tooltip-zoom-enter, .rc-tooltip-zoom-appear { opacity: 0; animation-duration: 0.3s; animation-fill-mode: both; animation-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1.28); animation-play-state: paused; } .rc-tooltip-zoom-leave { animation-duration: 0.3s; animation-fill-mode: both; animation-timing-function: cubic-bezier(0.6, -0.3, 0.74, 0.05); animation-play-state: paused; } .rc-tooltip-zoom-enter.rc-tooltip-zoom-enter-active, .rc-tooltip-zoom-appear.rc-tooltip-zoom-appear-active { animation-name: rcToolTipZoomIn; animation-play-state: running; } .rc-tooltip-zoom-leave.rc-tooltip-zoom-leave-active { animation-name: rcToolTipZoomOut; animation-play-state: running; } @keyframes rcToolTipZoomIn { 0% { opacity: 0; transform-origin: 50% 50%; transform: scale(0, 0); } 100% { opacity: 1; transform-origin: 50% 50%; transform: scale(1, 1); } } @keyframes rcToolTipZoomOut { 0% { opacity: 1; transform-origin: 50% 50%; transform: scale(1, 1); } 100% { opacity: 0; transform-origin: 50% 50%; transform: scale(0, 0); } } .rc-tooltip { position: absolute; z-index: 1070; display: block; visibility: visible; line-height: 1.5; font-size: 12px; background-color: rgba(0, 0, 0, 0.05); padding: 1px; opacity: 0.9; } .rc-tooltip-hidden { display: none; } .rc-tooltip-inner { padding: 8px 10px; color: #333333; text-align: left; text-decoration: none; background-color: #ffffff; border-radius: 3px; min-height: 34px; border: 1px solid #b1b1b1; } .rc-tooltip-arrow, .rc-tooltip-arrow-inner { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .rc-tooltip-placement-top .rc-tooltip-arrow, .rc-tooltip-placement-topLeft .rc-tooltip-arrow, .rc-tooltip-placement-topRight .rc-tooltip-arrow { bottom: -5px; margin-left: -6px; border-width: 6px 6px 0; border-top-color: #b1b1b1; } .rc-tooltip-placement-top .rc-tooltip-arrow-inner, .rc-tooltip-placement-topLeft .rc-tooltip-arrow-inner, .rc-tooltip-placement-topRight .rc-tooltip-arrow-inner { bottom: 1px; margin-left: -6px; border-width: 6px 6px 0; border-top-color: #ffffff; } .rc-tooltip-placement-top .rc-tooltip-arrow { left: 50%; } .rc-tooltip-placement-topLeft .rc-tooltip-arrow { left: 15%; } .rc-tooltip-placement-topRight .rc-tooltip-arrow { right: 15%; } .rc-tooltip-placement-right .rc-tooltip-arrow, .rc-tooltip-placement-rightTop .rc-tooltip-arrow, .rc-tooltip-placement-rightBottom .rc-tooltip-arrow { left: -5px; margin-top: -6px; border-width: 6px 6px 6px 0; border-right-color: #b1b1b1; } .rc-tooltip-placement-right .rc-tooltip-arrow-inner, .rc-tooltip-placement-rightTop .rc-tooltip-arrow-inner, .rc-tooltip-placement-rightBottom .rc-tooltip-arrow-inner { left: 1px; margin-top: -6px; border-width: 6px 6px 6px 0; border-right-color: #ffffff; } .rc-tooltip-placement-right .rc-tooltip-arrow { top: 50%; } .rc-tooltip-placement-rightTop .rc-tooltip-arrow { top: 15%; margin-top: 0; } .rc-tooltip-placement-rightBottom .rc-tooltip-arrow { bottom: 15%; } .rc-tooltip-placement-left .rc-tooltip-arrow, .rc-tooltip-placement-leftTop .rc-tooltip-arrow, .rc-tooltip-placement-leftBottom .rc-tooltip-arrow { right: -5px; margin-top: -6px; border-width: 6px 0 6px 6px; border-left-color: #b1b1b1; } .rc-tooltip-placement-left .rc-tooltip-arrow-inner, .rc-tooltip-placement-leftTop .rc-tooltip-arrow-inner, .rc-tooltip-placement-leftBottom .rc-tooltip-arrow-inner { right: 1px; margin-top: -6px; border-width: 6px 0 6px 6px; border-left-color: #ffffff; } .rc-tooltip-placement-left .rc-tooltip-arrow { top: 50%; } .rc-tooltip-placement-leftTop .rc-tooltip-arrow { top: 15%; margin-top: 0; } .rc-tooltip-placement-leftBottom .rc-tooltip-arrow { bottom: 15%; } .rc-tooltip-placement-bottom .rc-tooltip-arrow, .rc-tooltip-placement-bottomLeft .rc-tooltip-arrow, .rc-tooltip-placement-bottomRight .rc-tooltip-arrow { top: -5px; margin-left: -6px; border-width: 0 6px 6px; border-bottom-color: #b1b1b1; } .rc-tooltip-placement-bottom .rc-tooltip-arrow-inner, .rc-tooltip-placement-bottomLeft .rc-tooltip-arrow-inner, .rc-tooltip-placement-bottomRight .rc-tooltip-arrow-inner { top: 1px; margin-left: -6px; border-width: 0 6px 6px; border-bottom-color: #ffffff; } .rc-tooltip-placement-bottom .rc-tooltip-arrow { left: 50%; } .rc-tooltip-placement-bottomLeft .rc-tooltip-arrow { left: 15%; } .rc-tooltip-placement-bottomRight .rc-tooltip-arrow { right: 15%; } `});var dV=Ae((ED,xA)=>{typeof window!="undefined"&&function(n,a){typeof ED=="object"&&typeof xA=="object"?xA.exports=a():typeof define=="function"&&define.amd?define([],a):typeof ED=="object"?ED.Hls=a():n.Hls=a()}(ED,function(){return function(e){var n={};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=n,a.d=function(t,r,u){a.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,r){if(r&1&&(t=a(t)),r&8||r&4&&typeof t=="object"&&t&&t.__esModule)return t;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:t}),r&2&&typeof t!="string")for(var i in t)a.d(u,i,function(l){return t[l]}.bind(null,i));return u},a.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(r,"a",r),r},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},a.p="/dist/",a(a.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(e,n,a){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function u(){}Object.create&&(u.prototype=Object.create(null),new u().__proto__||(r=!1));function i(p,y,E){this.fn=p,this.context=y,this.once=E||!1}function l(p,y,E,b,T){if(typeof E!="function")throw new TypeError("The listener must be a function");var L=new i(E,b||p,T),U=r?r+y:y;return p._events[U]?p._events[U].fn?p._events[U]=[p._events[U],L]:p._events[U].push(L):(p._events[U]=L,p._eventsCount++),p}function s(p,y){--p._eventsCount==0?p._events=new u:delete p._events[y]}function h(){this._events=new u,this._eventsCount=0}h.prototype.eventNames=function(){var y=[],E,b;if(this._eventsCount===0)return y;for(b in E=this._events)t.call(E,b)&&y.push(r?b.slice(1):b);return Object.getOwnPropertySymbols?y.concat(Object.getOwnPropertySymbols(E)):y},h.prototype.listeners=function(y){var E=r?r+y:y,b=this._events[E];if(!b)return[];if(b.fn)return[b.fn];for(var T=0,L=b.length,U=new Array(L);T<L;T++)U[T]=b[T].fn;return U},h.prototype.listenerCount=function(y){var E=r?r+y:y,b=this._events[E];return b?b.fn?1:b.length:0},h.prototype.emit=function(y,E,b,T,L,U){var $=r?r+y:y;if(!this._events[$])return!1;var z=this._events[$],Z=arguments.length,ue,X;if(z.fn){switch(z.once&&this.removeListener(y,z.fn,void 0,!0),Z){case 1:return z.fn.call(z.context),!0;case 2:return z.fn.call(z.context,E),!0;case 3:return z.fn.call(z.context,E,b),!0;case 4:return z.fn.call(z.context,E,b,T),!0;case 5:return z.fn.call(z.context,E,b,T,L),!0;case 6:return z.fn.call(z.context,E,b,T,L,U),!0}for(X=1,ue=new Array(Z-1);X<Z;X++)ue[X-1]=arguments[X];z.fn.apply(z.context,ue)}else{var Y=z.length,ae;for(X=0;X<Y;X++)switch(z[X].once&&this.removeListener(y,z[X].fn,void 0,!0),Z){case 1:z[X].fn.call(z[X].context);break;case 2:z[X].fn.call(z[X].context,E);break;case 3:z[X].fn.call(z[X].context,E,b);break;case 4:z[X].fn.call(z[X].context,E,b,T);break;default:if(!ue)for(ae=1,ue=new Array(Z-1);ae<Z;ae++)ue[ae-1]=arguments[ae];z[X].fn.apply(z[X].context,ue)}}return!0},h.prototype.on=function(y,E,b){return l(this,y,E,b,!1)},h.prototype.once=function(y,E,b){return l(this,y,E,b,!0)},h.prototype.removeListener=function(y,E,b,T){var L=r?r+y:y;if(!this._events[L])return this;if(!E)return s(this,L),this;var U=this._events[L];if(U.fn)U.fn===E&&(!T||U.once)&&(!b||U.context===b)&&s(this,L);else{for(var $=0,z=[],Z=U.length;$<Z;$++)(U[$].fn!==E||T&&!U[$].once||b&&U[$].context!==b)&&z.push(U[$]);z.length?this._events[L]=z.length===1?z[0]:z:s(this,L)}return this},h.prototype.removeAllListeners=function(y){var E;return y?(E=r?r+y:y,this._events[E]&&s(this,E)):(this._events=new u,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=r,h.EventEmitter=h,e.exports=h},"./node_modules/url-toolkit/src/url-toolkit.js":function(e,n,a){(function(t){var r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,u=/^([^\/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,l=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(h,p,y){if(y=y||{},h=h.trim(),p=p.trim(),!p){if(!y.alwaysNormalize)return h;var E=s.parseURL(h);if(!E)throw new Error("Error trying to parse base URL.");return E.path=s.normalizePath(E.path),s.buildURLFromParts(E)}var b=s.parseURL(p);if(!b)throw new Error("Error trying to parse relative URL.");if(b.scheme)return y.alwaysNormalize?(b.path=s.normalizePath(b.path),s.buildURLFromParts(b)):p;var T=s.parseURL(h);if(!T)throw new Error("Error trying to parse base URL.");if(!T.netLoc&&T.path&&T.path[0]!=="/"){var L=u.exec(T.path);T.netLoc=L[1],T.path=L[2]}T.netLoc&&!T.path&&(T.path="/");var U={scheme:T.scheme,netLoc:b.netLoc,path:null,params:b.params,query:b.query,fragment:b.fragment};if(!b.netLoc&&(U.netLoc=T.netLoc,b.path[0]!=="/"))if(!b.path)U.path=T.path,b.params||(U.params=T.params,b.query||(U.query=T.query));else{var $=T.path,z=$.substring(0,$.lastIndexOf("/")+1)+b.path;U.path=s.normalizePath(z)}return U.path===null&&(U.path=y.alwaysNormalize?s.normalizePath(b.path):b.path),s.buildURLFromParts(U)},parseURL:function(h){var p=r.exec(h);return p?{scheme:p[1]||"",netLoc:p[2]||"",path:p[3]||"",params:p[4]||"",query:p[5]||"",fragment:p[6]||""}:null},normalizePath:function(h){for(h=h.split("").reverse().join("").replace(i,"");h.length!==(h=h.replace(l,"")).length;);return h.split("").reverse().join("")},buildURLFromParts:function(h){return h.scheme+h.netLoc+h.path+h.params+h.query+h.fragment}};e.exports=s})(this)},"./node_modules/webworkify-webpack/index.js":function(e,n,a){function t(y){var E={};function b(L){if(E[L])return E[L].exports;var U=E[L]={i:L,l:!1,exports:{}};return y[L].call(U.exports,U,U.exports,b),U.l=!0,U.exports}b.m=y,b.c=E,b.i=function(L){return L},b.d=function(L,U,$){b.o(L,U)||Object.defineProperty(L,U,{configurable:!1,enumerable:!0,get:$})},b.r=function(L){Object.defineProperty(L,"__esModule",{value:!0})},b.n=function(L){var U=L&&L.__esModule?function(){return L.default}:function(){return L};return b.d(U,"a",U),U},b.o=function(L,U){return Object.prototype.hasOwnProperty.call(L,U)},b.p="/",b.oe=function(L){throw console.error(L),L};var T=b(b.s=ENTRY_MODULE);return T.default||T}var r="[\\.|\\-|\\+|\\w|/|@]+",u="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+r+").*?\\)";function i(y){return(y+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function l(y){return!isNaN(1*y)}function s(y,E,b){var T={};T[b]=[];var L=E.toString(),U=L.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!U)return T;for(var $=U[1],z=new RegExp("(\\\\n|\\W)"+i($)+u,"g"),Z;Z=z.exec(L);)Z[3]!=="dll-reference"&&T[b].push(Z[3]);for(z=new RegExp("\\("+i($)+'\\("(dll-reference\\s('+r+'))"\\)\\)'+u,"g");Z=z.exec(L);)y[Z[2]]||(T[b].push(Z[1]),y[Z[2]]=a(Z[1]).m),T[Z[2]]=T[Z[2]]||[],T[Z[2]].push(Z[4]);for(var ue=Object.keys(T),X=0;X<ue.length;X++)for(var Y=0;Y<T[ue[X]].length;Y++)l(T[ue[X]][Y])&&(T[ue[X]][Y]=1*T[ue[X]][Y]);return T}function h(y){var E=Object.keys(y);return E.reduce(function(b,T){return b||y[T].length>0},!1)}function p(y,E){for(var b={main:[E]},T={main:[]},L={main:{}};h(b);)for(var U=Object.keys(b),$=0;$<U.length;$++){var z=U[$],Z=b[z],ue=Z.pop();if(L[z]=L[z]||{},!(L[z][ue]||!y[z][ue])){L[z][ue]=!0,T[z]=T[z]||[],T[z].push(ue);for(var X=s(y,y[z][ue],z),Y=Object.keys(X),ae=0;ae<Y.length;ae++)b[Y[ae]]=b[Y[ae]]||[],b[Y[ae]]=b[Y[ae]].concat(X[Y[ae]])}}return T}e.exports=function(y,E){E=E||{};var b={main:a.m},T=E.all?{main:Object.keys(b.main)}:p(b,y),L="";Object.keys(T).filter(function(ue){return ue!=="main"}).forEach(function(ue){for(var X=0;T[ue][X];)X++;T[ue].push(X),b[ue][X]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",L=L+"var "+ue+" = ("+t.toString().replace("ENTRY_MODULE",JSON.stringify(X))+")({"+T[ue].map(function(Y){return""+JSON.stringify(Y)+": "+b[ue][Y].toString()}).join(",")+`}); `}),L=L+"new (("+t.toString().replace("ENTRY_MODULE",JSON.stringify(y))+")({"+T.main.map(function(ue){return""+JSON.stringify(ue)+": "+b.main[ue].toString()}).join(",")+"}))(self);";var U=new window.Blob([L],{type:"text/javascript"});if(E.bare)return U;var $=window.URL||window.webkitURL||window.mozURL||window.msURL,z=$.createObjectURL(U),Z=new window.Worker(z);return Z.objectURL=z,Z}},"./src/crypt/decrypter.js":function(e,n,a){"use strict";a.r(n);var t=function(){function U(z,Z){this.subtle=z,this.aesIV=Z}var $=U.prototype;return $.decrypt=function(Z,ue){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},ue,Z)},U}(),r=function(){function U(z,Z){this.subtle=z,this.key=Z}var $=U.prototype;return $.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},U}(),u=r;function i(U){var $=U.byteLength,z=$&&new DataView(U).getUint8($-1);return z?U.slice(0,$-z):U}var l=function(){function U(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}var $=U.prototype;return $.uint8ArrayToUint32Array_=function(Z){for(var ue=new DataView(Z),X=new Uint32Array(4),Y=0;Y<4;Y++)X[Y]=ue.getUint32(Y*4);return X},$.initTable=function(){var Z=this.sBox,ue=this.invSBox,X=this.subMix,Y=X[0],ae=X[1],me=X[2],ke=X[3],ce=this.invSubMix,le=ce[0],Ce=ce[1],Ie=ce[2],je=ce[3],Ke=new Uint32Array(256),Tn=0,Qn=0,En=0;for(En=0;En<256;En++)En<128?Ke[En]=En<<1:Ke[En]=En<<1^283;for(En=0;En<256;En++){var qn=Qn^Qn<<1^Qn<<2^Qn<<3^Qn<<4;qn=qn>>>8^qn&255^99,Z[Tn]=qn,ue[qn]=Tn;var Vn=Ke[Tn],Wn=Ke[Vn],pt=Ke[Wn],He=Ke[qn]*257^qn*16843008;Y[Tn]=He<<24|He>>>8,ae[Tn]=He<<16|He>>>16,me[Tn]=He<<8|He>>>24,ke[Tn]=He,He=pt*16843009^Wn*65537^Vn*257^Tn*16843008,le[qn]=He<<24|He>>>8,Ce[qn]=He<<16|He>>>16,Ie[qn]=He<<8|He>>>24,je[qn]=He,Tn?(Tn=Vn^Ke[Ke[Ke[pt^Vn]]],Qn^=Ke[Ke[Qn]]):Tn=Qn=1}},$.expandKey=function(Z){for(var ue=this.uint8ArrayToUint32Array_(Z),X=!0,Y=0;Y<ue.length&&X;)X=ue[Y]===this.key[Y],Y++;if(!X){this.key=ue;var ae=this.keySize=ue.length;if(ae!==4&&ae!==6&&ae!==8)throw new Error("Invalid aes key size="+ae);var me=this.ksRows=(ae+6+1)*4,ke,ce,le=this.keySchedule=new Uint32Array(me),Ce=this.invKeySchedule=new Uint32Array(me),Ie=this.sBox,je=this.rcon,Ke=this.invSubMix,Tn=Ke[0],Qn=Ke[1],En=Ke[2],qn=Ke[3],Vn,Wn;for(ke=0;ke<me;ke++){if(ke<ae){Vn=le[ke]=ue[ke];continue}Wn=Vn,ke%ae==0?(Wn=Wn<<8|Wn>>>24,Wn=Ie[Wn>>>24]<<24|Ie[Wn>>>16&255]<<16|Ie[Wn>>>8&255]<<8|Ie[Wn&255],Wn^=je[ke/ae|0]<<24):ae>6&&ke%ae==4&&(Wn=Ie[Wn>>>24]<<24|Ie[Wn>>>16&255]<<16|Ie[Wn>>>8&255]<<8|Ie[Wn&255]),le[ke]=Vn=(le[ke-ae]^Wn)>>>0}for(ce=0;ce<me;ce++)ke=me-ce,ce&3?Wn=le[ke]:Wn=le[ke-4],ce<4||ke<=4?Ce[ce]=Wn:Ce[ce]=Tn[Ie[Wn>>>24]]^Qn[Ie[Wn>>>16&255]]^En[Ie[Wn>>>8&255]]^qn[Ie[Wn&255]],Ce[ce]=Ce[ce]>>>0}},$.networkToHostOrderSwap=function(Z){return Z<<24|(Z&65280)<<8|(Z&16711680)>>8|Z>>>24},$.decrypt=function(Z,ue,X,Y){for(var ae=this.keySize+6,me=this.invKeySchedule,ke=this.invSBox,ce=this.invSubMix,le=ce[0],Ce=ce[1],Ie=ce[2],je=ce[3],Ke=this.uint8ArrayToUint32Array_(X),Tn=Ke[0],Qn=Ke[1],En=Ke[2],qn=Ke[3],Vn=new Int32Array(Z),Wn=new Int32Array(Vn.length),pt,He,ia,Ia,Sn,gn,Ve,na,va,Ma,dt,vn,la,Et,Da=this.networkToHostOrderSwap;ue<Vn.length;){for(va=Da(Vn[ue]),Ma=Da(Vn[ue+1]),dt=Da(Vn[ue+2]),vn=Da(Vn[ue+3]),Sn=va^me[0],gn=vn^me[1],Ve=dt^me[2],na=Ma^me[3],la=4,Et=1;Et<ae;Et++)pt=le[Sn>>>24]^Ce[gn>>16&255]^Ie[Ve>>8&255]^je[na&255]^me[la],He=le[gn>>>24]^Ce[Ve>>16&255]^Ie[na>>8&255]^je[Sn&255]^me[la+1],ia=le[Ve>>>24]^Ce[na>>16&255]^Ie[Sn>>8&255]^je[gn&255]^me[la+2],Ia=le[na>>>24]^Ce[Sn>>16&255]^Ie[gn>>8&255]^je[Ve&255]^me[la+3],Sn=pt,gn=He,Ve=ia,na=Ia,la=la+4;pt=ke[Sn>>>24]<<24^ke[gn>>16&255]<<16^ke[Ve>>8&255]<<8^ke[na&255]^me[la],He=ke[gn>>>24]<<24^ke[Ve>>16&255]<<16^ke[na>>8&255]<<8^ke[Sn&255]^me[la+1],ia=ke[Ve>>>24]<<24^ke[na>>16&255]<<16^ke[Sn>>8&255]<<8^ke[gn&255]^me[la+2],Ia=ke[na>>>24]<<24^ke[Sn>>16&255]<<16^ke[gn>>8&255]<<8^ke[Ve&255]^me[la+3],la=la+3,Wn[ue]=Da(pt^Tn),Wn[ue+1]=Da(Ia^Qn),Wn[ue+2]=Da(ia^En),Wn[ue+3]=Da(He^qn),Tn=va,Qn=Ma,En=dt,qn=vn,ue=ue+4}return Y?i(Wn.buffer):Wn.buffer},$.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},U}(),s=l,h=a("./src/errors.ts"),p=a("./src/utils/logger.js"),y=a("./src/events.js"),E=a("./src/utils/get-self-scope.js"),b=Object(E.getSelfScope)(),T=function(){function U(z,Z,ue){var X=ue===void 0?{}:ue,Y=X.removePKCS7Padding,ae=Y===void 0?!0:Y;if(this.logEnabled=!0,this.observer=z,this.config=Z,this.removePKCS7Padding=ae,ae)try{var me=b.crypto;me&&(this.subtle=me.subtle||me.webkitSubtle)}catch{}this.disableWebCrypto=!this.subtle}var $=U.prototype;return $.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},$.decrypt=function(Z,ue,X,Y){var ae=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(p.logger.log("JS AES decrypt"),this.logEnabled=!1);var me=this.decryptor;me||(this.decryptor=me=new s),me.expandKey(ue),Y(me.decrypt(Z,0,X,this.removePKCS7Padding))}else{this.logEnabled&&(p.logger.log("WebCrypto AES decrypt"),this.logEnabled=!1);var ke=this.subtle;this.key!==ue&&(this.key=ue,this.fastAesKey=new u(ke,ue)),this.fastAesKey.expandKey().then(function(ce){var le=new t(ke,X);le.decrypt(Z,ce).catch(function(Ce){ae.onWebCryptoError(Ce,Z,ue,X,Y)}).then(function(Ce){Y(Ce)})}).catch(function(ce){ae.onWebCryptoError(ce,Z,ue,X,Y)})}},$.onWebCryptoError=function(Z,ue,X,Y,ae){this.config.enableSoftwareAES?(p.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(ue,X,Y,ae)):(p.logger.error("decrypting error : "+Z.message),this.observer.trigger(y.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:Z.message}))},$.destroy=function(){var Z=this.decryptor;Z&&(Z.destroy(),this.decryptor=void 0)},U}(),L=n.default=T},"./src/demux/demuxer-inline.js":function(e,n,a){"use strict";a.r(n);var t=a("./src/events.js"),r=a("./src/errors.ts"),u=a("./src/crypt/decrypter.js"),i=a("./src/polyfills/number-isFinite.js"),l=a("./src/utils/logger.js"),s=a("./src/utils/get-self-scope.js");function h(q,K,j,I){var P,N,J,V,se,ie=navigator.userAgent.toLowerCase(),De=I,Se=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(P=((K[j+2]&192)>>>6)+1,N=(K[j+2]&60)>>>2,N>Se.length-1){q.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+N});return}return V=(K[j+2]&1)<<2,V|=(K[j+3]&192)>>>6,l.logger.log("manifest codec:"+I+",ADTS data:type:"+P+",sampleingIndex:"+N+"["+Se[N]+"Hz],channelConfig:"+V),/firefox/i.test(ie)?N>=6?(P=5,se=new Array(4),J=N-3):(P=2,se=new Array(2),J=N):ie.indexOf("android")!==-1?(P=2,se=new Array(2),J=N):(P=5,se=new Array(4),I&&(I.indexOf("mp4a.40.29")!==-1||I.indexOf("mp4a.40.5")!==-1)||!I&&N>=6?J=N-3:((I&&I.indexOf("mp4a.40.2")!==-1&&(N>=6&&V===1||/vivaldi/i.test(ie))||!I&&V===1)&&(P=2,se=new Array(2)),J=N)),se[0]=P<<3,se[0]|=(N&14)>>1,se[1]|=(N&1)<<7,se[1]|=V<<3,P===5&&(se[1]|=(J&14)>>1,se[2]=(J&1)<<7,se[2]|=2<<2,se[3]=0),{config:se,samplerate:Se[N],channelCount:V,codec:"mp4a.40."+P,manifestCodec:De}}function p(q,K){return q[K]===255&&(q[K+1]&246)==240}function y(q,K){return q[K+1]&1?7:9}function E(q,K){return(q[K+3]&3)<<11|q[K+4]<<3|(q[K+5]&224)>>>5}function b(q,K){return!!(K+1<q.length&&p(q,K))}function T(q,K){if(b(q,K)){var j=y(q,K),I=j;K+5<q.length&&(I=E(q,K));var P=K+I;if(P===q.length||P+1<q.length&&p(q,P))return!0}return!1}function L(q,K,j,I,P){if(!q.samplerate){var N=h(K,j,I,P);q.config=N.config,q.samplerate=N.samplerate,q.channelCount=N.channelCount,q.codec=N.codec,q.manifestCodec=N.manifestCodec,l.logger.log("parsed codec:"+q.codec+",rate:"+N.samplerate+",nb channel:"+N.channelCount)}}function U(q){return 1024*9e4/q}function $(q,K,j,I,P){var N,J,V,se=q.length;if(N=y(q,K),J=E(q,K),J-=N,J>0&&K+N+J<=se)return V=j+I*P,{headerLength:N,frameLength:J,stamp:V}}function z(q,K,j,I,P){var N=U(q.samplerate),J=$(K,j,I,P,N);if(J){var V=J.stamp,se=J.headerLength,ie=J.frameLength,De={unit:K.subarray(j+se,j+se+ie),pts:V,dts:V};return q.samples.push(De),{sample:De,length:ie+se}}}var Z=a("./src/demux/id3.js"),ue=function(){function q(j,I,P){this.observer=j,this.config=P,this.remuxer=I}var K=q.prototype;return K.resetInitSegment=function(I,P,N,J){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:P,duration:J,inputTimeScale:9e4}},K.resetTimeStamp=function(){},q.probe=function(I){if(!I)return!1;for(var P=Z.default.getID3Data(I,0)||[],N=P.length,J=I.length;N<J;N++)if(T(I,N))return l.logger.log("ADTS sync word found !"),!0;return!1},K.append=function(I,P,N,J){for(var V=this._audioTrack,se=Z.default.getID3Data(I,0)||[],ie=Z.default.getTimeStamp(se),De=Object(i.isFiniteNumber)(ie)?ie*90:P*9e4,Se=0,Me=De,Le=I.length,sn=se.length,mn=[{pts:Me,dts:Me,data:se}];sn<Le-1;)if(b(I,sn)&&sn+5<Le){L(V,this.observer,I,sn,V.manifestCodec);var Ue=z(V,I,sn,De,Se);if(Ue)sn+=Ue.length,Me=Ue.sample.pts,Se++;else{l.logger.log("Unable to parse AAC frame");break}}else Z.default.isHeader(I,sn)?(se=Z.default.getID3Data(I,sn),mn.push({pts:Me,dts:Me,data:se}),sn+=se.length):sn++;this.remuxer.remux(V,{samples:[]},{samples:mn,inputTimeScale:9e4},{samples:[]},P,N,J)},K.destroy=function(){},q}(),X=ue,Y=a("./src/demux/mp4demuxer.js"),ae={BitratesMap:[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],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(K,j,I,P,N){if(!(I+24>j.length)){var J=this.parseHeader(j,I);if(J&&I+J.frameLength<=j.length){var V=J.samplesPerFrame*9e4/J.sampleRate,se=P+N*V,ie={unit:j.subarray(I,I+J.frameLength),pts:se,dts:se};return K.config=[],K.channelCount=J.channelCount,K.samplerate=J.sampleRate,K.samples.push(ie),{sample:ie,length:J.frameLength}}}},parseHeader:function(K,j){var I=K[j+1]>>3&3,P=K[j+1]>>1&3,N=K[j+2]>>4&15,J=K[j+2]>>2&3,V=K[j+2]>>1&1;if(I!==1&&N!==0&&N!==15&&J!==3){var se=I===3?3-P:P===3?3:4,ie=ae.BitratesMap[se*14+N-1]*1e3,De=I===3?0:I===2?1:2,Se=ae.SamplingRateMap[De*3+J],Me=K[j+3]>>6==3?1:2,Le=ae.SamplesCoefficients[I][P],sn=ae.BytesInSlot[P],mn=Le*8*sn,Ue=parseInt(Le*ie/Se+V,10)*sn;return{sampleRate:Se,channelCount:Me,frameLength:Ue,samplesPerFrame:mn}}},isHeaderPattern:function(K,j){return K[j]===255&&(K[j+1]&224)==224&&(K[j+1]&6)!=0},isHeader:function(K,j){return!!(j+1<K.length&&this.isHeaderPattern(K,j))},probe:function(K,j){if(j+1<K.length&&this.isHeaderPattern(K,j)){var I=4,P=this.parseHeader(K,j),N=I;P&&P.frameLength&&(N=P.frameLength);var J=j+N;if(J===K.length||J+1<K.length&&this.isHeaderPattern(K,J))return!0}return!1}},me=ae,ke=function(){function q(j){this.data=j,this.bytesAvailable=j.byteLength,this.word=0,this.bitsAvailable=0}var K=q.prototype;return K.loadWord=function(){var I=this.data,P=this.bytesAvailable,N=I.byteLength-P,J=new Uint8Array(4),V=Math.min(4,P);if(V===0)throw new Error("no bytes available");J.set(I.subarray(N,N+V)),this.word=new DataView(J.buffer).getUint32(0),this.bitsAvailable=V*8,this.bytesAvailable-=V},K.skipBits=function(I){var P;this.bitsAvailable>I?(this.word<<=I,this.bitsAvailable-=I):(I-=this.bitsAvailable,P=I>>3,I-=P>>3,this.bytesAvailable-=P,this.loadWord(),this.word<<=I,this.bitsAvailable-=I)},K.readBits=function(I){var P=Math.min(this.bitsAvailable,I),N=this.word>>>32-P;return I>32&&l.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=P,this.bitsAvailable>0?this.word<<=P:this.bytesAvailable>0&&this.loadWord(),P=I-P,P>0&&this.bitsAvailable?N<<P|this.readBits(P):N},K.skipLZ=function(){var I;for(I=0;I<this.bitsAvailable;++I)if((this.word&2147483648>>>I)!=0)return this.word<<=I,this.bitsAvailable-=I,I;return this.loadWord(),I+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var I=this.skipLZ();return this.readBits(I+1)-1},K.readEG=function(){var I=this.readUEG();return 1&I?1+I>>>1:-1*(I>>>1)},K.readBoolean=function(){return this.readBits(1)===1},K.readUByte=function(){return this.readBits(8)},K.readUShort=function(){return this.readBits(16)},K.readUInt=function(){return this.readBits(32)},K.skipScalingList=function(I){var P=8,N=8,J,V;for(J=0;J<I;J++)N!==0&&(V=this.readEG(),N=(P+V+256)%256),P=N===0?P:N},K.readSPS=function(){var I=0,P=0,N=0,J=0,V,se,ie,De,Se,Me,Le,sn,mn,Ue=this.readUByte.bind(this),bn=this.readBits.bind(this),zn=this.readUEG.bind(this),pa=this.readBoolean.bind(this),at=this.skipBits.bind(this),Pt=this.skipEG.bind(this),ba=this.skipUEG.bind(this),mt=this.skipScalingList.bind(this);if(Ue(),V=Ue(),se=bn(5),at(3),ie=Ue(),ba(),V===100||V===110||V===122||V===244||V===44||V===83||V===86||V===118||V===128){var Na=zn();if(Na===3&&at(1),ba(),ba(),at(1),pa())for(sn=Na!==3?8:12,mn=0;mn<sn;mn++)pa()&&(mn<6?mt(16):mt(64))}ba();var Ot=zn();if(Ot===0)zn();else if(Ot===1)for(at(1),Pt(),Pt(),De=zn(),mn=0;mn<De;mn++)Pt();ba(),at(1),Se=zn(),Me=zn(),Le=bn(1),Le===0&&at(1),at(1),pa()&&(I=zn(),P=zn(),N=zn(),J=zn());var $a=[1,1];if(pa()&&pa()){var It=Ue();switch(It){case 1:$a=[1,1];break;case 2:$a=[12,11];break;case 3:$a=[10,11];break;case 4:$a=[16,11];break;case 5:$a=[40,33];break;case 6:$a=[24,11];break;case 7:$a=[20,11];break;case 8:$a=[32,11];break;case 9:$a=[80,33];break;case 10:$a=[18,11];break;case 11:$a=[15,11];break;case 12:$a=[64,33];break;case 13:$a=[160,99];break;case 14:$a=[4,3];break;case 15:$a=[3,2];break;case 16:$a=[2,1];break;case 255:{$a=[Ue()<<8|Ue(),Ue()<<8|Ue()];break}}}return{width:Math.ceil((Se+1)*16-I*2-P*2),height:(2-Le)*(Me+1)*16-(Le?2:4)*(N+J),pixelRatio:$a}},K.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},q}(),ce=ke,le=function(){function q(j,I,P,N){this.decryptdata=P,this.discardEPB=N,this.decrypter=new u.default(j,I,{removePKCS7Padding:!1})}var K=q.prototype;return K.decryptBuffer=function(I,P){this.decrypter.decrypt(I,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,P)},K.decryptAacSample=function(I,P,N,J){var V=I[P].unit,se=V.subarray(16,V.length-V.length%16),ie=se.buffer.slice(se.byteOffset,se.byteOffset+se.length),De=this;this.decryptBuffer(ie,function(Se){Se=new Uint8Array(Se),V.set(Se,16),J||De.decryptAacSamples(I,P+1,N)})},K.decryptAacSamples=function(I,P,N){for(;;P++){if(P>=I.length){N();return}if(!(I[P].unit.length<32)){var J=this.decrypter.isSync();if(this.decryptAacSample(I,P,N,J),!J)return}}},K.getAvcEncryptedData=function(I){for(var P=Math.floor((I.length-48)/160)*16+16,N=new Int8Array(P),J=0,V=32;V<=I.length-16;V+=160,J+=16)N.set(I.subarray(V,V+16),J);return N},K.getAvcDecryptedUnit=function(I,P){P=new Uint8Array(P);for(var N=0,J=32;J<=I.length-16;J+=160,N+=16)I.set(P.subarray(N,N+16),J);return I},K.decryptAvcSample=function(I,P,N,J,V,se){var ie=this.discardEPB(V.data),De=this.getAvcEncryptedData(ie),Se=this;this.decryptBuffer(De.buffer,function(Me){V.data=Se.getAvcDecryptedUnit(ie,Me),se||Se.decryptAvcSamples(I,P,N+1,J)})},K.decryptAvcSamples=function(I,P,N,J){for(;;P++,N=0){if(P>=I.length){J();return}for(var V=I[P].units;!(N>=V.length);N++){var se=V[N];if(!(se.length<=48||se.type!==1&&se.type!==5)){var ie=this.decrypter.isSync();if(this.decryptAvcSample(I,P,N,J,se,ie),!ie)return}}}},q}(),Ce=le,Ie={video:1,audio:2,id3:3,text:4},je=function(){function q(j,I,P,N){this.observer=j,this.config=P,this.typeSupported=N,this.remuxer=I,this.sampleAes=null}var K=q.prototype;return K.setDecryptData=function(I){I!=null&&I.key!=null&&I.method==="SAMPLE-AES"?this.sampleAes=new Ce(this.observer,this.config,I,this.discardEPB):this.sampleAes=null},q.probe=function(I){var P=q._syncOffset(I);return P<0?!1:(P&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+P+", junk ahead ?"),!0)},q._syncOffset=function(I){for(var P=Math.min(1e3,I.length-3*188),N=0;N<P;){if(I[N]===71&&I[N+188]===71&&I[N+2*188]===71)return N;N++}return-1},q.createTrack=function(I,P){return{container:I==="video"||I==="audio"?"video/mp2t":void 0,type:I,id:Ie[I],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:I==="video"?0:void 0,isAAC:I==="audio"?!0:void 0,duration:I==="audio"?P:void 0}},K.resetInitSegment=function(I,P,N,J){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=q.createTrack("video",J),this._audioTrack=q.createTrack("audio",J),this._id3Track=q.createTrack("id3",J),this._txtTrack=q.createTrack("text",J),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=P,this.videoCodec=N,this._duration=J},K.resetTimeStamp=function(){},K.append=function(I,P,N,J){var V,se=I.length,ie,De,Se,Me,Le,sn=!1;this.contiguous=N;var mn=this.pmtParsed,Ue=this._avcTrack,bn=this._audioTrack,zn=this._id3Track,pa=Ue.pid,at=bn.pid,Pt=zn.pid,ba=this._pmtId,mt=Ue.pesData,Na=bn.pesData,Ot=zn.pesData,$a=this._parsePAT,It=this._parsePMT,sr=this._parsePES,Sr=this._parseAVCPES.bind(this),so=this._parseAACPES.bind(this),hr=this._parseMPEGPES.bind(this),Oo=this._parseID3PES.bind(this),Cr=q._syncOffset(I);for(se-=(se+Cr)%188,V=Cr;V<se;V+=188)if(I[V]===71){if(ie=!!(I[V+1]&64),De=((I[V+1]&31)<<8)+I[V+2],Se=(I[V+3]&48)>>4,Se>1){if(Me=V+5+I[V+4],Me===V+188)continue}else Me=V+4;switch(De){case pa:ie&&(mt&&(Le=sr(mt))&&Sr(Le,!1),mt={data:[],size:0}),mt&&(mt.data.push(I.subarray(Me,V+188)),mt.size+=V+188-Me);break;case at:ie&&(Na&&(Le=sr(Na))&&(bn.isAAC?so(Le):hr(Le)),Na={data:[],size:0}),Na&&(Na.data.push(I.subarray(Me,V+188)),Na.size+=V+188-Me);break;case Pt:ie&&(Ot&&(Le=sr(Ot))&&Oo(Le),Ot={data:[],size:0}),Ot&&(Ot.data.push(I.subarray(Me,V+188)),Ot.size+=V+188-Me);break;case 0:ie&&(Me+=I[Me]+1),ba=this._pmtId=$a(I,Me);break;case ba:ie&&(Me+=I[Me]+1);var rr=It(I,Me,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,this.sampleAes!=null);pa=rr.avc,pa>0&&(Ue.pid=pa),at=rr.audio,at>0&&(bn.pid=at,bn.isAAC=rr.isAAC),Pt=rr.id3,Pt>0&&(zn.pid=Pt),sn&&!mn&&(l.logger.log("reparse from beginning"),sn=!1,V=Cr-188),mn=this.pmtParsed=!0;break;case 17:case 8191:break;default:sn=!0;break}}else this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});mt&&(Le=sr(mt))?(Sr(Le,!0),Ue.pesData=null):Ue.pesData=mt,Na&&(Le=sr(Na))?(bn.isAAC?so(Le):hr(Le),bn.pesData=null):(Na&&Na.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),bn.pesData=Na),Ot&&(Le=sr(Ot))?(Oo(Le),zn.pesData=null):zn.pesData=Ot,this.sampleAes==null?this.remuxer.remux(bn,Ue,zn,this._txtTrack,P,N,J):this.decryptAndRemux(bn,Ue,zn,this._txtTrack,P,N,J)},K.decryptAndRemux=function(I,P,N,J,V,se,ie){if(I.samples&&I.isAAC){var De=this;this.sampleAes.decryptAacSamples(I.samples,0,function(){De.decryptAndRemuxAvc(I,P,N,J,V,se,ie)})}else this.decryptAndRemuxAvc(I,P,N,J,V,se,ie)},K.decryptAndRemuxAvc=function(I,P,N,J,V,se,ie){if(P.samples){var De=this;this.sampleAes.decryptAvcSamples(P.samples,0,0,function(){De.remuxer.remux(I,P,N,J,V,se,ie)})}else this.remuxer.remux(I,P,N,J,V,se,ie)},K.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},K._parsePAT=function(I,P){return(I[P+10]&31)<<8|I[P+11]},K._parsePMT=function(I,P,N,J){var V,se,ie,De,Se={audio:-1,avc:-1,id3:-1,isAAC:!0};for(V=(I[P+1]&15)<<8|I[P+2],se=P+3+V-4,ie=(I[P+10]&15)<<8|I[P+11],P+=12+ie;P<se;){switch(De=(I[P+1]&31)<<8|I[P+2],I[P]){case 207:if(!J){l.logger.log("unknown stream type:"+I[P]);break}case 15:Se.audio===-1&&(Se.audio=De);break;case 21:Se.id3===-1&&(Se.id3=De);break;case 219:if(!J){l.logger.log("unknown stream type:"+I[P]);break}case 27:Se.avc===-1&&(Se.avc=De);break;case 3:case 4:N?Se.audio===-1&&(Se.audio=De,Se.isAAC=!1):l.logger.log("MPEG audio found, not supported in this browser for now");break;case 36:l.logger.warn("HEVC stream type found, not supported for now");break;default:l.logger.log("unknown stream type:"+I[P]);break}P+=((I[P+3]&15)<<8|I[P+4])+5}return Se},K._parsePES=function(I){var P=0,N,J,V,se,ie,De,Se,Me,Le,sn=I.data;if(!I||I.size===0)return null;for(;sn[0].length<19&&sn.length>1;){var mn=new Uint8Array(sn[0].length+sn[1].length);mn.set(sn[0]),mn.set(sn[1],sn[0].length),sn[0]=mn,sn.splice(1,1)}if(N=sn[0],V=(N[0]<<16)+(N[1]<<8)+N[2],V===1){if(se=(N[4]<<8)+N[5],se&&se>I.size-6||(J=N[7],J&192&&(Se=(N[9]&14)*536870912+(N[10]&255)*4194304+(N[11]&254)*16384+(N[12]&255)*128+(N[13]&254)/2,Se>4294967295&&(Se-=8589934592),J&64?(Me=(N[14]&14)*536870912+(N[15]&255)*4194304+(N[16]&254)*16384+(N[17]&255)*128+(N[18]&254)/2,Me>4294967295&&(Me-=8589934592),Se-Me>60*9e4&&(l.logger.warn(Math.round((Se-Me)/9e4)+"s delta between PTS and DTS, align them"),Se=Me)):Me=Se),ie=N[8],Le=ie+9,I.size<=Le))return null;I.size-=Le,De=new Uint8Array(I.size);for(var Ue=0,bn=sn.length;Ue<bn;Ue++){N=sn[Ue];var zn=N.byteLength;if(Le)if(Le>zn){Le-=zn;continue}else N=N.subarray(Le),zn-=Le,Le=0;De.set(N,P),P+=zn}return se&&(se-=ie+3),{data:De,pts:Se,dts:Me,len:se}}else return null},K.pushAccesUnit=function(I,P){if(I.units.length&&I.frame){var N=P.samples,J=N.length;if(isNaN(I.pts))if(J){var V=N[J-1];I.pts=V.pts,I.dts=V.dts}else{P.dropped++;return}!this.config.forceKeyFrameOnDiscontinuity||I.key===!0||P.sps&&(J||this.contiguous)?(I.id=J,N.push(I)):P.dropped++}I.debug.length&&l.logger.log(I.pts+"/"+I.dts+":"+I.debug)},K._parseAVCPES=function(I,P){var N=this,J=this._avcTrack,V=this._parseAVCNALu(I.data),se=!1,ie,De=this.avcSample,Se,Me=!1,Le,sn=this.pushAccesUnit.bind(this),mn=function(bn,zn,pa,at){return{key:bn,pts:zn,dts:pa,units:[],debug:at}};I.data=null,De&&V.length&&!J.audFound&&(sn(De,J),De=this.avcSample=mn(!1,I.pts,I.dts,"")),V.forEach(function(Ue){switch(Ue.type){case 1:Se=!0,De||(De=N.avcSample=mn(!0,I.pts,I.dts,"")),se&&(De.debug+="NDR "),De.frame=!0;var bn=Ue.data;if(Me&&bn.length>4){var zn=new ce(bn).readSliceType();(zn===2||zn===4||zn===7||zn===9)&&(De.key=!0)}break;case 5:Se=!0,De||(De=N.avcSample=mn(!0,I.pts,I.dts,"")),se&&(De.debug+="IDR "),De.key=!0,De.frame=!0;break;case 6:Se=!0,se&&De&&(De.debug+="SEI "),ie=new ce(N.discardEPB(Ue.data)),ie.readUByte();for(var pa=0,at=0,Pt=!1,ba=0;!Pt&&ie.bytesAvailable>1;){pa=0;do ba=ie.readUByte(),pa+=ba;while(ba===255);at=0;do ba=ie.readUByte(),at+=ba;while(ba===255);if(pa===4&&ie.bytesAvailable!==0){Pt=!0;var mt=ie.readUByte();if(mt===181){var Na=ie.readUShort();if(Na===49){var Ot=ie.readUInt();if(Ot===1195456820){var $a=ie.readUByte();if($a===3){var It=ie.readUByte(),sr=ie.readUByte(),Sr=31&It,so=[It,sr];for(Le=0;Le<Sr;Le++)so.push(ie.readUByte()),so.push(ie.readUByte()),so.push(ie.readUByte());N._insertSampleInOrder(N._txtTrack.samples,{type:3,pts:I.pts,bytes:so})}}}}}else if(pa===5&&ie.bytesAvailable!==0){if(Pt=!0,at>16){var hr=[];for(Le=0;Le<16;Le++)hr.push(ie.readUByte().toString(16)),(Le===3||Le===5||Le===7||Le===9)&&hr.push("-");var Oo=at-16,Cr=new Uint8Array(Oo);for(Le=0;Le<Oo;Le++)Cr[Le]=ie.readUByte();N._insertSampleInOrder(N._txtTrack.samples,{pts:I.pts,payloadType:pa,uuid:hr.join(""),userDataBytes:Cr,userData:Object(Z.utf8ArrayToStr)(Cr.buffer)})}}else if(at<ie.bytesAvailable)for(Le=0;Le<at;Le++)ie.readUByte()}break;case 7:if(Se=!0,Me=!0,se&&De&&(De.debug+="SPS "),!J.sps){ie=new ce(Ue.data);var rr=ie.readSPS();J.width=rr.width,J.height=rr.height,J.pixelRatio=rr.pixelRatio,J.sps=[Ue.data],J.duration=N._duration;var Hr=Ue.data.subarray(1,4),tu="avc1.";for(Le=0;Le<3;Le++){var ru=Hr[Le].toString(16);ru.length<2&&(ru="0"+ru),tu+=ru}J.codec=tu}break;case 8:Se=!0,se&&De&&(De.debug+="PPS "),J.pps||(J.pps=[Ue.data]);break;case 9:Se=!1,J.audFound=!0,De&&sn(De,J),De=N.avcSample=mn(!1,I.pts,I.dts,se?"AUD ":"");break;case 12:Se=!1;break;default:Se=!1,De&&(De.debug+="unknown NAL "+Ue.type+" ");break}if(De&&Se){var Eo=De.units;Eo.push(Ue)}}),P&&De&&(sn(De,J),this.avcSample=null)},K._insertSampleInOrder=function(I,P){var N=I.length;if(N>0){if(P.pts>=I[N-1].pts)I.push(P);else for(var J=N-1;J>=0;J--)if(P.pts<I[J].pts){I.splice(J,0,P);break}}else I.push(P)},K._getLastNalUnit=function(){var I=this.avcSample,P;if(!I||I.units.length===0){var N=this._avcTrack,J=N.samples;I=J[J.length-1]}if(I){var V=I.units;P=V[V.length-1]}return P},K._parseAVCNALu=function(I){var P=0,N=I.byteLength,J,V,se=this._avcTrack,ie=se.naluState||0,De=ie,Se=[],Me,Le,sn=-1,mn;for(ie===-1&&(sn=0,mn=I[0]&31,ie=0,P=1);P<N;){if(J=I[P++],!ie){ie=J?0:1;continue}if(ie===1){ie=J?0:2;continue}if(!J)ie=3;else if(J===1){if(sn>=0)Me={data:I.subarray(sn,P-ie-1),type:mn},Se.push(Me);else{var Ue=this._getLastNalUnit();if(Ue&&(De&&P<=4-De&&Ue.state&&(Ue.data=Ue.data.subarray(0,Ue.data.byteLength-De)),V=P-ie-1,V>0)){var bn=new Uint8Array(Ue.data.byteLength+V);bn.set(Ue.data,0),bn.set(I.subarray(0,V),Ue.data.byteLength),Ue.data=bn}}P<N?(Le=I[P]&31,sn=P,mn=Le,ie=0):ie=-1}else ie=0}if(sn>=0&&ie>=0&&(Me={data:I.subarray(sn,N),type:mn,state:ie},Se.push(Me)),Se.length===0){var zn=this._getLastNalUnit();if(zn){var pa=new Uint8Array(zn.data.byteLength+I.byteLength);pa.set(zn.data,0),pa.set(I,zn.data.byteLength),zn.data=pa}}return se.naluState=ie,Se},K.discardEPB=function(I){for(var P=I.byteLength,N=[],J=1,V,se;J<P-2;)I[J]===0&&I[J+1]===0&&I[J+2]===3?(N.push(J+2),J+=2):J++;if(N.length===0)return I;V=P-N.length,se=new Uint8Array(V);var ie=0;for(J=0;J<V;ie++,J++)ie===N[0]&&(ie++,N.shift()),se[J]=I[ie];return se},K._parseAACPES=function(I){var P=this._audioTrack,N=I.data,J=I.pts,V=0,se=this.aacOverFlow,ie=this.aacLastPTS,De,Se,Me,Le,sn;if(se){var mn=new Uint8Array(se.byteLength+N.byteLength);mn.set(se,0),mn.set(N,se.byteLength),N=mn}for(Me=V,sn=N.length;Me<sn-1&&!b(N,Me);Me++);if(Me){var Ue,bn;if(Me<sn-1?(Ue="AAC PES did not start with ADTS header,offset:"+Me,bn=!1):(Ue="no ADTS header found in AAC PES",bn=!0),l.logger.warn("parsing error:"+Ue),this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:bn,reason:Ue}),bn)return}if(L(P,this.observer,N,Me,this.audioCodec),Se=0,De=U(P.samplerate),se&&ie){var zn=ie+De;Math.abs(zn-J)>1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((zn-J)/90)),J=zn)}for(;Me<sn;)if(b(N,Me)){if(Me+5<sn){var pa=z(P,N,Me,J,Se);if(pa){Me+=pa.length,Le=pa.sample.pts,Se++;continue}}break}else Me++;Me<sn?se=N.subarray(Me,sn):se=null,this.aacOverFlow=se,this.aacLastPTS=Le},K._parseMPEGPES=function(I){for(var P=I.data,N=P.length,J=0,V=0,se=I.pts;V<N;)if(me.isHeader(P,V)){var ie=me.appendFrame(this._audioTrack,P,V,se,J);if(ie)V+=ie.length,J++;else break}else V++},K._parseID3PES=function(I){this._id3Track.samples.push(I)},q}(),Ke=je,Tn=function(){function q(j,I,P){this.observer=j,this.config=P,this.remuxer=I}var K=q.prototype;return K.resetInitSegment=function(I,P,N,J){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:P,duration:J,inputTimeScale:9e4}},K.resetTimeStamp=function(){},q.probe=function(I){var P,N,J=Z.default.getID3Data(I,0);if(J&&Z.default.getTimeStamp(J)!==void 0){for(P=J.length,N=Math.min(I.length-1,P+100);P<N;P++)if(me.probe(I,P))return l.logger.log("MPEG Audio sync word found !"),!0}return!1},K.append=function(I,P,N,J){for(var V=Z.default.getID3Data(I,0),se=Z.default.getTimeStamp(V),ie=se?90*se:P*9e4,De=V.length,Se=I.length,Me=0,Le=0,sn=this._audioTrack,mn=[{pts:ie,dts:ie,data:V}];De<Se;)if(me.isHeader(I,De)){var Ue=me.appendFrame(sn,I,De,ie,Me);if(Ue)De+=Ue.length,Le=Ue.sample.pts,Me++;else break}else Z.default.isHeader(I,De)?(V=Z.default.getID3Data(I,De),mn.push({pts:Le,dts:Le,data:V}),De+=V.length):De++;this.remuxer.remux(sn,{samples:[]},{samples:mn,inputTimeScale:9e4},{samples:[]},P,N,J)},K.destroy=function(){},q}(),Qn=Tn,En=function(){function q(){}return q.getSilentFrame=function(j,I){switch(j){case"mp4a.40.2":if(I===1)return new Uint8Array([0,200,0,128,35,128]);if(I===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(I===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(I===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(I===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(I===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(I===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(I===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(I===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return null},q}(),qn=En,Vn=Math.pow(2,32)-1,Wn=function(){function q(){}return q.init=function(){q.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var j;for(j in q.types)q.types.hasOwnProperty(j)&&(q.types[j]=[j.charCodeAt(0),j.charCodeAt(1),j.charCodeAt(2),j.charCodeAt(3)]);var I=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]),P=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]);q.HDLR_TYPES={video:I,audio:P};var N=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),J=new Uint8Array([0,0,0,0,0,0,0,0]);q.STTS=q.STSC=q.STCO=J,q.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),q.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),q.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),q.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var V=new Uint8Array([105,115,111,109]),se=new Uint8Array([97,118,99,49]),ie=new Uint8Array([0,0,0,1]);q.FTYP=q.box(q.types.ftyp,V,ie,V,se),q.DINF=q.box(q.types.dinf,q.box(q.types.dref,N))},q.box=function(j){for(var I=Array.prototype.slice.call(arguments,1),P=8,N=I.length,J=N,V;N--;)P+=I[N].byteLength;for(V=new Uint8Array(P),V[0]=P>>24&255,V[1]=P>>16&255,V[2]=P>>8&255,V[3]=P&255,V.set(j,4),N=0,P=8;N<J;N++)V.set(I[N],P),P+=I[N].byteLength;return V},q.hdlr=function(j){return q.box(q.types.hdlr,q.HDLR_TYPES[j])},q.mdat=function(j){return q.box(q.types.mdat,j)},q.mdhd=function(j,I){I*=j;var P=Math.floor(I/(Vn+1)),N=Math.floor(I%(Vn+1));return q.box(q.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,j>>24&255,j>>16&255,j>>8&255,j&255,P>>24,P>>16&255,P>>8&255,P&255,N>>24,N>>16&255,N>>8&255,N&255,85,196,0,0]))},q.mdia=function(j){return q.box(q.types.mdia,q.mdhd(j.timescale,j.duration),q.hdlr(j.type),q.minf(j))},q.mfhd=function(j){return q.box(q.types.mfhd,new Uint8Array([0,0,0,0,j>>24,j>>16&255,j>>8&255,j&255]))},q.minf=function(j){return j.type==="audio"?q.box(q.types.minf,q.box(q.types.smhd,q.SMHD),q.DINF,q.stbl(j)):q.box(q.types.minf,q.box(q.types.vmhd,q.VMHD),q.DINF,q.stbl(j))},q.moof=function(j,I,P){return q.box(q.types.moof,q.mfhd(j),q.traf(P,I))},q.moov=function(j){for(var I=j.length,P=[];I--;)P[I]=q.trak(j[I]);return q.box.apply(null,[q.types.moov,q.mvhd(j[0].timescale,j[0].duration)].concat(P).concat(q.mvex(j)))},q.mvex=function(j){for(var I=j.length,P=[];I--;)P[I]=q.trex(j[I]);return q.box.apply(null,[q.types.mvex].concat(P))},q.mvhd=function(j,I){I*=j;var P=Math.floor(I/(Vn+1)),N=Math.floor(I%(Vn+1)),J=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,j>>24&255,j>>16&255,j>>8&255,j&255,P>>24,P>>16&255,P>>8&255,P&255,N>>24,N>>16&255,N>>8&255,N&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return q.box(q.types.mvhd,J)},q.sdtp=function(j){var I=j.samples||[],P=new Uint8Array(4+I.length),N,J;for(J=0;J<I.length;J++)N=I[J].flags,P[J+4]=N.dependsOn<<4|N.isDependedOn<<2|N.hasRedundancy;return q.box(q.types.sdtp,P)},q.stbl=function(j){return q.box(q.types.stbl,q.stsd(j),q.box(q.types.stts,q.STTS),q.box(q.types.stsc,q.STSC),q.box(q.types.stsz,q.STSZ),q.box(q.types.stco,q.STCO))},q.avc1=function(j){var I=[],P=[],N,J,V;for(N=0;N<j.sps.length;N++)J=j.sps[N],V=J.byteLength,I.push(V>>>8&255),I.push(V&255),I=I.concat(Array.prototype.slice.call(J));for(N=0;N<j.pps.length;N++)J=j.pps[N],V=J.byteLength,P.push(V>>>8&255),P.push(V&255),P=P.concat(Array.prototype.slice.call(J));var se=q.box(q.types.avcC,new Uint8Array([1,I[3],I[4],I[5],252|3,224|j.sps.length].concat(I).concat([j.pps.length]).concat(P))),ie=j.width,De=j.height,Se=j.pixelRatio[0],Me=j.pixelRatio[1];return q.box(q.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,ie>>8&255,ie&255,De>>8&255,De&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),se,q.box(q.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),q.box(q.types.pasp,new Uint8Array([Se>>24,Se>>16&255,Se>>8&255,Se&255,Me>>24,Me>>16&255,Me>>8&255,Me&255])))},q.esds=function(j){var I=j.config.length;return new Uint8Array([0,0,0,0,3,23+I,0,1,0,4,15+I,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([I]).concat(j.config).concat([6,1,2]))},q.mp4a=function(j){var I=j.samplerate;return q.box(q.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,j.channelCount,0,16,0,0,0,0,I>>8&255,I&255,0,0]),q.box(q.types.esds,q.esds(j)))},q.mp3=function(j){var I=j.samplerate;return q.box(q.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,j.channelCount,0,16,0,0,0,0,I>>8&255,I&255,0,0]))},q.stsd=function(j){return j.type==="audio"?!j.isAAC&&j.codec==="mp3"?q.box(q.types.stsd,q.STSD,q.mp3(j)):q.box(q.types.stsd,q.STSD,q.mp4a(j)):q.box(q.types.stsd,q.STSD,q.avc1(j))},q.tkhd=function(j){var I=j.id,P=j.duration*j.timescale,N=j.width,J=j.height,V=Math.floor(P/(Vn+1)),se=Math.floor(P%(Vn+1));return q.box(q.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,I>>24&255,I>>16&255,I>>8&255,I&255,0,0,0,0,V>>24,V>>16&255,V>>8&255,V&255,se>>24,se>>16&255,se>>8&255,se&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,N>>8&255,N&255,0,0,J>>8&255,J&255,0,0]))},q.traf=function(j,I){var P=q.sdtp(j),N=j.id,J=Math.floor(I/(Vn+1)),V=Math.floor(I%(Vn+1));return q.box(q.types.traf,q.box(q.types.tfhd,new Uint8Array([0,0,0,0,N>>24,N>>16&255,N>>8&255,N&255])),q.box(q.types.tfdt,new Uint8Array([1,0,0,0,J>>24,J>>16&255,J>>8&255,J&255,V>>24,V>>16&255,V>>8&255,V&255])),q.trun(j,P.length+16+20+8+16+8+8),P)},q.trak=function(j){return j.duration=j.duration||4294967295,q.box(q.types.trak,q.tkhd(j),q.mdia(j))},q.trex=function(j){var I=j.id;return q.box(q.types.trex,new Uint8Array([0,0,0,0,I>>24,I>>16&255,I>>8&255,I&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},q.trun=function(j,I){var P=j.samples||[],N=P.length,J=12+16*N,V=new Uint8Array(J),se,ie,De,Se,Me,Le;for(I+=8+J,V.set([0,0,15,1,N>>>24&255,N>>>16&255,N>>>8&255,N&255,I>>>24&255,I>>>16&255,I>>>8&255,I&255],0),se=0;se<N;se++)ie=P[se],De=ie.duration,Se=ie.size,Me=ie.flags,Le=ie.cts,V.set([De>>>24&255,De>>>16&255,De>>>8&255,De&255,Se>>>24&255,Se>>>16&255,Se>>>8&255,Se&255,Me.isLeading<<2|Me.dependsOn,Me.isDependedOn<<6|Me.hasRedundancy<<4|Me.paddingValue<<1|Me.isNonSync,Me.degradPrio&240<<8,Me.degradPrio&15,Le>>>24&255,Le>>>16&255,Le>>>8&255,Le&255],12+16*se);return q.box(q.types.trun,V)},q.initSegment=function(j){q.types||q.init();var I=q.moov(j),P;return P=new Uint8Array(q.FTYP.byteLength+I.byteLength),P.set(q.FTYP),P.set(I,q.FTYP.byteLength),P},q}(),pt=Wn,He=9e4;function ia(q,K,j,I){return j===void 0&&(j=1),I===void 0&&(I=!1),Ia(q,K,1/j)}function Ia(q,K,j,I){j===void 0&&(j=1),I===void 0&&(I=!1);var P=q*K*j;return I?Math.round(P):P}function Sn(q,K){return K===void 0&&(K=!1),Ia(q,1e3,1/He,K)}function gn(q,K){return K===void 0&&(K=1),Ia(q,He,1/K)}var Ve=gn(10),na=gn(.2),va=function(){function q(j,I,P,N){this.observer=j,this.config=I,this.typeSupported=P;var J=navigator.userAgent;this.isSafari=N&&N.indexOf("Apple")>-1&&J&&!J.match("CriOS"),this.ISGenerated=!1}var K=q.prototype;return K.destroy=function(){},K.resetTimeStamp=function(I){this._initPTS=this._initDTS=I},K.resetInitSegment=function(){this.ISGenerated=!1},K.remux=function(I,P,N,J,V,se,ie){if(this.ISGenerated||this.generateIS(I,P,V),this.ISGenerated){var De=I.samples.length,Se=P.samples.length,Me=V,Le=V;if(De&&Se){var sn=(I.samples[0].pts-P.samples[0].pts)/P.inputTimeScale;Me+=Math.max(0,sn),Le+=Math.max(0,-sn)}if(De){I.timescale||(l.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(I,P,V));var mn=this.remuxAudio(I,Me,se,ie);if(Se){var Ue;mn&&(Ue=mn.endPTS-mn.startPTS),P.timescale||(l.logger.warn("regenerate InitSegment as video detected"),this.generateIS(I,P,V)),this.remuxVideo(P,Le,se,Ue,ie)}}else if(Se){var bn=this.remuxVideo(P,Le,se,0,ie);bn&&I.codec&&this.remuxEmptyAudio(I,Me,se,bn)}}N.samples.length&&this.remuxID3(N,V),J.samples.length&&this.remuxText(J,V),this.observer.trigger(t.default.FRAG_PARSED)},K.generateIS=function(I,P,N){var J=this.observer,V=I.samples,se=P.samples,ie=this.typeSupported,De="audio/mp4",Se={},Me={tracks:Se},Le=this._initPTS===void 0,sn,mn;if(Le&&(sn=mn=1/0),I.config&&V.length&&(I.timescale=I.samplerate,l.logger.log("audio sampling rate : "+I.samplerate),I.isAAC||(ie.mpeg?(De="audio/mpeg",I.codec=""):ie.mp3&&(I.codec="mp3")),Se.audio={container:De,codec:I.codec,initSegment:!I.isAAC&&ie.mpeg?new Uint8Array:pt.initSegment([I]),metadata:{channelCount:I.channelCount}},Le&&(sn=mn=V[0].pts-I.inputTimeScale*N)),P.sps&&P.pps&&se.length){var Ue=P.inputTimeScale;P.timescale=Ue,Se.video={container:"video/mp4",codec:P.codec,initSegment:pt.initSegment([P]),metadata:{width:P.width,height:P.height}},Le&&(sn=Math.min(sn,se[0].pts-Ue*N),mn=Math.min(mn,se[0].dts-Ue*N),this.observer.trigger(t.default.INIT_PTS_FOUND,{initPTS:sn}))}Object.keys(Se).length?(J.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,Me),this.ISGenerated=!0,Le&&(this._initPTS=sn,this._initDTS=mn)):J.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},K.remuxVideo=function(I,P,N,J,V){var se=8,ie,De,Se,Me,Le,sn,mn,Ue=I.timescale,bn=I.samples,zn=[],pa=bn.length,at=this._PTSNormalize,Pt=this._initPTS,ba=this.nextAvcDts,mt=this.isSafari;if(pa!==0){mt&&(N|=bn.length&&ba&&(V&&Math.abs(P-ba/Ue)<.1||Math.abs(bn[0].pts-ba-Pt)<Ue/5)),N||(ba=P*Ue),bn.forEach(function(ou){ou.pts=at(ou.pts-Pt,ba),ou.dts=at(ou.dts-Pt,ba)}),bn.sort(function(ou,$c){var z_=ou.dts-$c.dts,pd=ou.pts-$c.pts;return z_||pd||ou.id-$c.id});var Na=bn.reduce(function(ou,$c){return Math.max(Math.min(ou,$c.pts-$c.dts),-1*na)},0);if(Na<0){l.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Sn(Na,!0)+" ms to overcome this issue");for(var Ot=0;Ot<bn.length;Ot++)bn[Ot].dts+=Na}var $a=bn[0];Le=Math.max($a.dts,0),Me=Math.max($a.pts,0);var It=Le-ba;N&&It&&(It>1?l.logger.log("AVC: "+Sn(It,!0)+" ms hole between fragments detected,filling it"):It<-1&&l.logger.log("AVC: "+Sn(-It,!0)+" ms overlapping between fragments detected"),Le=ba,bn[0].dts=Le,Me=Math.max(Me-It,ba),bn[0].pts=Me,l.logger.log("Video: PTS/DTS adjusted: "+Sn(Me,!0)+"/"+Sn(Le,!0)+", delta: "+Sn(It,!0)+" ms")),$a=bn[bn.length-1],mn=Math.max($a.dts,0),sn=Math.max($a.pts,0,mn),mt&&(ie=Math.round((mn-Le)/(bn.length-1)));for(var sr=0,Sr=0,so=0;so<pa;so++){for(var hr=bn[so],Oo=hr.units,Cr=Oo.length,rr=0,Hr=0;Hr<Cr;Hr++)rr+=Oo[Hr].data.length;Sr+=rr,sr+=Cr,hr.length=rr,mt?hr.dts=Le+so*ie:hr.dts=Math.max(hr.dts,Le),hr.pts=Math.max(hr.pts,hr.dts)}var tu=Sr+4*sr+8;try{De=new Uint8Array(tu)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:tu,reason:"fail allocating video mdat "+tu});return}var ru=new DataView(De.buffer);ru.setUint32(0,tu),De.set(pt.types.mdat,4);for(var Eo=0;Eo<pa;Eo++){for(var qr=bn[Eo],Tu=qr.units,oi=0,xi=void 0,Kl=0,Wc=Tu.length;Kl<Wc;Kl++){var fe=Tu[Kl],gl=fe.data,Rl=fe.data.byteLength;ru.setUint32(se,Rl),se+=4,De.set(gl,se),se+=Rl,oi+=4+Rl}if(mt)xi=Math.max(0,ie*Math.round((qr.pts-qr.dts)/ie));else{if(Eo<pa-1)ie=bn[Eo+1].dts-qr.dts;else{var Jc=this.config,yl=qr.dts-bn[Eo>0?Eo-1:Eo].dts;if(Jc.stretchShortVideoTrack){var Ni=Jc.maxBufferHole,_d=Math.floor(Ni*Ue),uf=(J?Me+J*Ue:this.nextAudioPts)-qr.pts;uf>_d?(ie=uf-yl,ie<0&&(ie=yl),l.logger.log("It is approximately "+Sn(uf,!1)+" ms to the next segment; using duration "+Sn(ie,!1)+" ms for the last video frame.")):ie=yl}else ie=yl}xi=Math.round(qr.pts-qr.dts)}zn.push({size:oi,duration:ie,cts:xi,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:qr.key?2:1,isNonSync:qr.key?0:1}})}this.nextAvcDts=mn+ie;var J_=I.dropped;if(I.nbNalu=0,I.dropped=0,zn.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var $_=zn[0].flags;$_.dependsOn=2,$_.isNonSync=0}I.samples=zn,Se=pt.moof(I.sequenceNumber++,Le,I),I.samples=[];var ji={data1:Se,data2:De,startPTS:Me/Ue,endPTS:(sn+ie)/Ue,startDTS:Le/Ue,endDTS:this.nextAvcDts/Ue,type:"video",hasAudio:!1,hasVideo:!0,nb:zn.length,dropped:J_};return this.observer.trigger(t.default.FRAG_PARSING_DATA,ji),ji}},K.remuxAudio=function(I,P,N,J){var V=I.inputTimeScale,se=I.timescale,ie=V/se,De=I.isAAC?1024:1152,Se=De*ie,Me=this._PTSNormalize,Le=this._initPTS,sn=!I.isAAC&&this.typeSupported.mpeg,mn,Ue,bn,zn,pa,at,Pt=sn?0:8,ba=I.samples,mt=[],Na=this.nextAudioPts;if(N|=ba.length&&Na&&(J&&Math.abs(P-Na/V)<.1||Math.abs(ba[0].pts-Na-Le)<20*Se),ba.forEach(function(Ni){Ni.pts=Ni.dts=Me(Ni.pts-Le,P*V)}),ba=ba.filter(function(Ni){return Ni.pts>=0}),ba.length!==0){if(N||(J?Na=P*V:Na=ba[0].pts),I.isAAC)for(var Ot=this.config.maxAudioFramesDrift,$a=0,It=Na;$a<ba.length;){var sr=ba[$a],Sr,so=sr.pts;if(Sr=so-It,Sr<=-Ot*Se)l.logger.warn("Dropping 1 audio frame @ "+Sn(It,!0)+" ms due to "+Sn(Sr,!0)+" ms overlap."),ba.splice($a,1);else if(Sr>=Ot*Se&&Sr<Ve&&It){var hr=Math.round(Sr/Se);l.logger.warn("Injecting "+hr+" audio frames @ "+Sn(It,!0)+" ms due to "+Sn(It,!0)+" ms gap.");for(var Oo=0;Oo<hr;Oo++){var Cr=Math.max(It,0);Ue=qn.getSilentFrame(I.manifestCodec||I.codec,I.channelCount),Ue||(l.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),Ue=sr.unit.subarray()),ba.splice($a,0,{unit:Ue,pts:Cr,dts:Cr}),It+=Se,$a++}sr.pts=sr.dts=It,It+=Se,$a++}else Math.abs(Sr)>.1*Se,sr.pts=sr.dts=It,It+=Se,$a++}for(var rr=ba.length,Hr=0;rr--;)Hr+=ba[rr].unit.byteLength;for(var tu=0,ru=ba.length;tu<ru;tu++){var Eo=ba[tu],qr=Eo.unit,Tu=Eo.pts;if(at!==void 0)mn.duration=Math.round((Tu-at)/ie);else{var oi=Tu-Na,xi=0;if(N&&I.isAAC&&oi){if(oi>0&&oi<Ve)xi=Math.round((Tu-Na)/Se),l.logger.log(Sn(oi,!0)+" ms hole between AAC samples detected,filling it"),xi>0&&(Ue=qn.getSilentFrame(I.manifestCodec||I.codec,I.channelCount),Ue||(Ue=qr.subarray()),Hr+=xi*Ue.length);else if(oi<-12){l.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+Sn(Na,!0)+" ms / "+Sn(Tu,!0)+" ms / "+Sn(-oi,!0)+" ms"),Hr-=qr.byteLength;continue}Tu=Na}if(pa=Tu,Hr>0){Hr+=Pt;try{bn=new Uint8Array(Hr)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Hr,reason:"fail allocating audio mdat "+Hr});return}if(!sn){var Kl=new DataView(bn.buffer);Kl.setUint32(0,Hr),bn.set(pt.types.mdat,4)}}else return;for(var Wc=0;Wc<xi;Wc++)Ue=qn.getSilentFrame(I.manifestCodec||I.codec,I.channelCount),Ue||(l.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),Ue=qr.subarray()),bn.set(Ue,Pt),Pt+=Ue.byteLength,mn={size:Ue.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},mt.push(mn)}bn.set(qr,Pt);var fe=qr.byteLength;Pt+=fe,mn={size:fe,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},mt.push(mn),at=Tu}var gl=0;if(rr=mt.length,rr>=2&&(gl=mt[rr-2].duration,mn.duration=gl),rr){this.nextAudioPts=Na=at+ie*gl,I.samples=mt,sn?zn=new Uint8Array:zn=pt.moof(I.sequenceNumber++,pa/ie,I),I.samples=[];var Rl=pa/V,Jc=Na/V,yl={data1:zn,data2:bn,startPTS:Rl,endPTS:Jc,startDTS:Rl,endDTS:Jc,type:"audio",hasAudio:!0,hasVideo:!1,nb:rr};return this.observer.trigger(t.default.FRAG_PARSING_DATA,yl),yl}return null}},K.remuxEmptyAudio=function(I,P,N,J){var V=I.inputTimeScale,se=I.samplerate?I.samplerate:V,ie=V/se,De=this.nextAudioPts,Se=(De!==void 0?De:J.startDTS*V)+this._initDTS,Me=J.endDTS*V+this._initDTS,Le=1024,sn=ie*Le,mn=Math.ceil((Me-Se)/sn),Ue=qn.getSilentFrame(I.manifestCodec||I.codec,I.channelCount);if(l.logger.warn("remux empty Audio"),!Ue){l.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");return}for(var bn=[],zn=0;zn<mn;zn++){var pa=Se+zn*sn;bn.push({unit:Ue,pts:pa,dts:pa})}I.samples=bn,this.remuxAudio(I,P,N)},K.remuxID3=function(I){var P=I.samples.length,N,J=I.inputTimeScale,V=this._initPTS,se=this._initDTS;if(P){for(var ie=0;ie<P;ie++)N=I.samples[ie],N.pts=(N.pts-V)/J,N.dts=(N.dts-se)/J;this.observer.trigger(t.default.FRAG_PARSING_METADATA,{samples:I.samples})}I.samples=[]},K.remuxText=function(I){I.samples.sort(function(ie,De){return ie.pts-De.pts});var P=I.samples.length,N,J=I.inputTimeScale,V=this._initPTS;if(P){for(var se=0;se<P;se++)N=I.samples[se],N.pts=(N.pts-V)/J;this.observer.trigger(t.default.FRAG_PARSING_USERDATA,{samples:I.samples})}I.samples=[]},K._PTSNormalize=function(I,P){var N;if(P===void 0)return I;for(P<I?N=-8589934592:N=8589934592;Math.abs(I-P)>4294967296;)I+=N;return I},q}(),Ma=va,dt=function(){function q(j){this.observer=j}var K=q.prototype;return K.destroy=function(){},K.resetTimeStamp=function(){},K.resetInitSegment=function(){},K.remux=function(I,P,N,J,V,se,ie,De){var Se=this.observer,Me="";I&&(Me+="audio"),P&&(Me+="video"),Se.trigger(t.default.FRAG_PARSING_DATA,{data1:De,startPTS:V,startDTS:V,type:Me,hasAudio:!!I,hasVideo:!!P,nb:1,dropped:0}),Se.trigger(t.default.FRAG_PARSED)},q}(),vn=dt,la=Object(s.getSelfScope)(),Et;try{Et=la.performance.now.bind(la.performance)}catch{l.logger.debug("Unable to use Performance API on this environment"),Et=la.Date.now}var Da=function(){function q(j,I,P,N){this.observer=j,this.typeSupported=I,this.config=P,this.vendor=N}var K=q.prototype;return K.destroy=function(){var I=this.demuxer;I&&I.destroy()},K.push=function(I,P,N,J,V,se,ie,De,Se,Me,Le,sn){var mn=this;if(I.byteLength>0&&P!=null&&P.key!=null&&P.method==="AES-128"){var Ue=this.decrypter;Ue==null&&(Ue=this.decrypter=new u.default(this.observer,this.config));var bn=Et();Ue.decrypt(I,P.key.buffer,P.iv.buffer,function(zn){var pa=Et();mn.observer.trigger(t.default.FRAG_DECRYPTED,{stats:{tstart:bn,tdecrypt:pa}}),mn.pushDecrypted(new Uint8Array(zn),P,new Uint8Array(N),J,V,se,ie,De,Se,Me,Le,sn)})}else this.pushDecrypted(new Uint8Array(I),P,new Uint8Array(N),J,V,se,ie,De,Se,Me,Le,sn)},K.pushDecrypted=function(I,P,N,J,V,se,ie,De,Se,Me,Le,sn){var mn=this.demuxer;if(!mn||(ie||De)&&!this.probe(I)){for(var Ue=this.observer,bn=this.typeSupported,zn=this.config,pa=[{demux:Ke,remux:Ma},{demux:Y.default,remux:vn},{demux:X,remux:Ma},{demux:Qn,remux:Ma}],at=0,Pt=pa.length;at<Pt;at++){var ba=pa[at],mt=ba.demux.probe;if(mt(I)){var Na=this.remuxer=new ba.remux(Ue,zn,bn,this.vendor);mn=new ba.demux(Ue,Na,zn,bn),this.probe=mt;break}}if(!mn){Ue.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});return}this.demuxer=mn}var Ot=this.remuxer;(ie||De)&&(mn.resetInitSegment(N,J,V,Me),Ot.resetInitSegment()),ie&&(mn.resetTimeStamp(sn),Ot.resetTimeStamp(sn)),typeof mn.setDecryptData=="function"&&mn.setDecryptData(P),mn.append(I,se,Se,Le)},q}(),ot=n.default=Da},"./src/demux/demuxer-worker.js":function(e,n,a){"use strict";a.r(n);var t=a("./src/demux/demuxer-inline.js"),r=a("./src/events.js"),u=a("./src/utils/logger.js"),i=a("./node_modules/eventemitter3/index.js"),l=a.n(i),s=function(p){var y=new i.EventEmitter;y.trigger=function(T){for(var L=arguments.length,U=new Array(L>1?L-1:0),$=1;$<L;$++)U[$-1]=arguments[$];y.emit.apply(y,[T,T].concat(U))},y.off=function(T){for(var L=arguments.length,U=new Array(L>1?L-1:0),$=1;$<L;$++)U[$-1]=arguments[$];y.removeListener.apply(y,[T].concat(U))};var E=function(T,L){p.postMessage({event:T,data:L})};p.addEventListener("message",function(b){var T=b.data;switch(T.cmd){case"init":var L=JSON.parse(T.config);p.demuxer=new t.default(y,T.typeSupported,L,T.vendor),Object(u.enableLogs)(L.debug),E("init",null);break;case"demux":p.demuxer.push(T.data,T.decryptdata,T.initSegment,T.audioCodec,T.videoCodec,T.timeOffset,T.discontinuity,T.trackSwitch,T.contiguous,T.duration,T.accurateTimeOffset,T.defaultInitPTS);break;default:break}}),y.on(r.default.FRAG_DECRYPTED,E),y.on(r.default.FRAG_PARSING_INIT_SEGMENT,E),y.on(r.default.FRAG_PARSED,E),y.on(r.default.ERROR,E),y.on(r.default.FRAG_PARSING_METADATA,E),y.on(r.default.FRAG_PARSING_USERDATA,E),y.on(r.default.INIT_PTS_FOUND,E),y.on(r.default.FRAG_PARSING_DATA,function(b,T){var L=[],U={event:b,data:T};T.data1&&(U.data1=T.data1.buffer,L.push(T.data1.buffer),delete T.data1),T.data2&&(U.data2=T.data2.buffer,L.push(T.data2.buffer),delete T.data2),p.postMessage(U,L)})};n.default=s},"./src/demux/id3.js":function(e,n,a){"use strict";a.r(n),a.d(n,"utf8ArrayToStr",function(){return l});var t=a("./src/utils/get-self-scope.js"),r=function(){function s(){}return s.isHeader=function(p,y){return y+10<=p.length&&p[y]===73&&p[y+1]===68&&p[y+2]===51&&p[y+3]<255&&p[y+4]<255&&p[y+6]<128&&p[y+7]<128&&p[y+8]<128&&p[y+9]<128},s.isFooter=function(p,y){return y+10<=p.length&&p[y]===51&&p[y+1]===68&&p[y+2]===73&&p[y+3]<255&&p[y+4]<255&&p[y+6]<128&&p[y+7]<128&&p[y+8]<128&&p[y+9]<128},s.getID3Data=function(p,y){for(var E=y,b=0;s.isHeader(p,y);){b+=10;var T=s._readSize(p,y+6);b+=T,s.isFooter(p,y+10)&&(b+=10),y+=b}if(b>0)return p.subarray(E,E+b)},s._readSize=function(p,y){var E=0;return E=(p[y]&127)<<21,E|=(p[y+1]&127)<<14,E|=(p[y+2]&127)<<7,E|=p[y+3]&127,E},s.getTimeStamp=function(p){for(var y=s.getID3Frames(p),E=0;E<y.length;E++){var b=y[E];if(s.isTimeStampFrame(b))return s._readTimeStamp(b)}},s.isTimeStampFrame=function(p){return p&&p.key==="PRIV"&&p.info==="com.apple.streaming.transportStreamTimestamp"},s._getFrameData=function(p){var y=String.fromCharCode(p[0],p[1],p[2],p[3]),E=s._readSize(p,4),b=10;return{type:y,size:E,data:p.subarray(b,b+E)}},s.getID3Frames=function(p){for(var y=0,E=[];s.isHeader(p,y);){var b=s._readSize(p,y+6);y+=10;for(var T=y+b;y+8<T;){var L=s._getFrameData(p.subarray(y)),U=s._decodeFrame(L);U&&E.push(U),y+=L.size+10}s.isFooter(p,y)&&(y+=10)}return E},s._decodeFrame=function(p){if(p.type==="PRIV")return s._decodePrivFrame(p);if(p.type[0]==="T")return s._decodeTextFrame(p);if(p.type[0]==="W")return s._decodeURLFrame(p)},s._readTimeStamp=function(p){if(p.data.byteLength===8){var y=new Uint8Array(p.data),E=y[3]&1,b=(y[4]<<23)+(y[5]<<15)+(y[6]<<7)+y[7];return b/=45,E&&(b+=4772185884e-2),Math.round(b)}},s._decodePrivFrame=function(p){if(!(p.size<2)){var y=s._utf8ArrayToStr(p.data,!0),E=new Uint8Array(p.data.subarray(y.length+1));return{key:p.type,info:y,data:E.buffer}}},s._decodeTextFrame=function(p){if(!(p.size<2))if(p.type==="TXXX"){var y=1,E=s._utf8ArrayToStr(p.data.subarray(y),!0);y+=E.length+1;var b=s._utf8ArrayToStr(p.data.subarray(y));return{key:p.type,info:E,data:b}}else{var T=s._utf8ArrayToStr(p.data.subarray(1));return{key:p.type,data:T}}},s._decodeURLFrame=function(p){if(p.type==="WXXX"){if(p.size<2)return;var y=1,E=s._utf8ArrayToStr(p.data.subarray(y));y+=E.length+1;var b=s._utf8ArrayToStr(p.data.subarray(y));return{key:p.type,info:E,data:b}}else{var T=s._utf8ArrayToStr(p.data);return{key:p.type,data:T}}},s._utf8ArrayToStr=function(p,y){y===void 0&&(y=!1);var E=i();if(E){var b=E.decode(p);if(y){var T=b.indexOf("\0");return T!==-1?b.substring(0,T):b}return b.replace(/\0/g,"")}for(var L=p.length,U,$,z,Z="",ue=0;ue<L;){if(U=p[ue++],U===0&&y)return Z;if(U===0||U===3)continue;switch(U>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:Z+=String.fromCharCode(U);break;case 12:case 13:$=p[ue++],Z+=String.fromCharCode((U&31)<<6|$&63);break;case 14:$=p[ue++],z=p[ue++],Z+=String.fromCharCode((U&15)<<12|($&63)<<6|(z&63)<<0);break;default:}}return Z},s}(),u;function i(){var s=Object(t.getSelfScope)();return!u&&typeof s.TextDecoder!="undefined"&&(u=new s.TextDecoder("utf-8")),u}var l=r._utf8ArrayToStr;n.default=r},"./src/demux/mp4demuxer.js":function(e,n,a){"use strict";a.r(n);var t=a("./src/utils/logger.js"),r=a("./src/events.js"),u=Math.pow(2,32)-1,i=function(){function l(h,p){this.observer=h,this.remuxer=p}var s=l.prototype;return s.resetTimeStamp=function(p){this.initPTS=p},s.resetInitSegment=function(p,y,E,b){if(p&&p.byteLength){var T=this.initData=l.parseInitSegment(p);y==null&&(y="mp4a.40.5"),E==null&&(E="avc1.42e01e");var L={};T.audio&&T.video?L.audiovideo={container:"video/mp4",codec:y+","+E,initSegment:b?p:null}:(T.audio&&(L.audio={container:"audio/mp4",codec:y,initSegment:b?p:null}),T.video&&(L.video={container:"video/mp4",codec:E,initSegment:b?p:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:L})}else y&&(this.audioCodec=y),E&&(this.videoCodec=E)},l.probe=function(p){return l.findBox({data:p,start:0,end:Math.min(p.length,16384)},["moof"]).length>0},l.bin2str=function(p){return String.fromCharCode.apply(null,p)},l.readUint16=function(p,y){p.data&&(y+=p.start,p=p.data);var E=p[y]<<8|p[y+1];return E<0?65536+E:E},l.readUint32=function(p,y){p.data&&(y+=p.start,p=p.data);var E=p[y]<<24|p[y+1]<<16|p[y+2]<<8|p[y+3];return E<0?4294967296+E:E},l.writeUint32=function(p,y,E){p.data&&(y+=p.start,p=p.data),p[y]=E>>24,p[y+1]=E>>16&255,p[y+2]=E>>8&255,p[y+3]=E&255},l.findBox=function(p,y){var E=[],b,T,L,U,$,z,Z;if(p.data?(z=p.start,U=p.end,p=p.data):(z=0,U=p.byteLength),!y.length)return null;for(b=z;b<U;)T=l.readUint32(p,b),L=l.bin2str(p.subarray(b+4,b+8)),Z=T>1?b+T:U,L===y[0]&&(y.length===1?E.push({data:p,start:b+8,end:Z}):($=l.findBox({data:p,start:b+8,end:Z},y.slice(1)),$.length&&(E=E.concat($)))),b=Z;return E},l.parseSegmentIndex=function(p){var y=l.findBox(p,["moov"])[0],E=y?y.end:null,b=0,T=l.findBox(p,["sidx"]),L;if(!T||!T[0])return null;L=[],T=T[0];var U=T.data[0];b=U===0?8:16;var $=l.readUint32(T,b);b+=4;var z=0,Z=0;U===0?b+=8:b+=16,b+=2;var ue=T.end+Z,X=l.readUint16(T,b);b+=2;for(var Y=0;Y<X;Y++){var ae=b,me=l.readUint32(T,ae);ae+=4;var ke=me&2147483647,ce=(me&2147483648)>>>31;if(ce===1){console.warn("SIDX has hierarchical references (not supported)");return}var le=l.readUint32(T,ae);ae+=4,L.push({referenceSize:ke,subsegmentDuration:le,info:{duration:le/$,start:ue,end:ue+ke-1}}),ue+=ke,ae+=4,b=ae}return{earliestPresentationTime:z,timescale:$,version:U,referencesCount:X,references:L,moovEndOffset:E}},l.parseInitSegment=function(p){var y=[],E=l.findBox(p,["moov","trak"]);return E.forEach(function(b){var T=l.findBox(b,["tkhd"])[0];if(T){var L=T.data[T.start],U=L===0?12:20,$=l.readUint32(T,U),z=l.findBox(b,["mdia","mdhd"])[0];if(z){L=z.data[z.start],U=L===0?12:20;var Z=l.readUint32(z,U),ue=l.findBox(b,["mdia","hdlr"])[0];if(ue){var X=l.bin2str(ue.data.subarray(ue.start+8,ue.start+12)),Y={soun:"audio",vide:"video"}[X];if(Y){var ae=l.findBox(b,["mdia","minf","stbl","stsd"]);if(ae.length){ae=ae[0];var me=l.bin2str(ae.data.subarray(ae.start+12,ae.start+16));t.logger.log("MP4Demuxer:"+Y+":"+me+" found")}y[$]={timescale:Z,type:Y},y[Y]={timescale:Z,id:$}}}}}}),y},l.getStartDTS=function(p,y){var E,b,T;return E=l.findBox(y,["moof","traf"]),b=[].concat.apply([],E.map(function(L){return l.findBox(L,["tfhd"]).map(function(U){var $,z,Z;return $=l.readUint32(U,4),z=p[$].timescale||9e4,Z=l.findBox(L,["tfdt"]).map(function(ue){var X,Y;return X=ue.data[ue.start],Y=l.readUint32(ue,4),X===1&&(Y*=Math.pow(2,32),Y+=l.readUint32(ue,8)),Y})[0],Z/z})})),T=Math.min.apply(null,b),isFinite(T)?T:0},l.offsetStartDTS=function(p,y,E){l.findBox(y,["moof","traf"]).map(function(b){return l.findBox(b,["tfhd"]).map(function(T){var L=l.readUint32(T,4),U=p[L].timescale||9e4;l.findBox(b,["tfdt"]).map(function($){var z=$.data[$.start],Z=l.readUint32($,4);if(z===0)l.writeUint32($,4,Z-E*U);else{Z*=Math.pow(2,32),Z+=l.readUint32($,8),Z-=E*U,Z=Math.max(Z,0);var ue=Math.floor(Z/(u+1)),X=Math.floor(Z%(u+1));l.writeUint32($,4,ue),l.writeUint32($,8,X)}})})})},s.append=function(p,y,E,b){var T=this.initData;T||(this.resetInitSegment(p,this.audioCodec,this.videoCodec,!1),T=this.initData);var L,U=this.initPTS;if(U===void 0){var $=l.getStartDTS(T,p);this.initPTS=U=$-y,this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:U})}l.offsetStartDTS(T,p,U),L=l.getStartDTS(T,p),this.remuxer.remux(T.audio,T.video,null,null,L,E,b,p)},s.destroy=function(){},l}();n.default=i},"./src/errors.ts":function(e,n,a){"use strict";a.r(n),a.d(n,"ErrorTypes",function(){return t}),a.d(n,"ErrorDetails",function(){return r});var t;(function(u){u.NETWORK_ERROR="networkError",u.MEDIA_ERROR="mediaError",u.KEY_SYSTEM_ERROR="keySystemError",u.MUX_ERROR="muxError",u.OTHER_ERROR="otherError"})(t||(t={}));var r;(function(u){u.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",u.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",u.KEY_SYSTEM_NO_SESSION="keySystemNoSession",u.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",u.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",u.MANIFEST_LOAD_ERROR="manifestLoadError",u.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",u.MANIFEST_PARSING_ERROR="manifestParsingError",u.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",u.LEVEL_LOAD_ERROR="levelLoadError",u.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",u.LEVEL_SWITCH_ERROR="levelSwitchError",u.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",u.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",u.FRAG_LOAD_ERROR="fragLoadError",u.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",u.FRAG_DECRYPT_ERROR="fragDecryptError",u.FRAG_PARSING_ERROR="fragParsingError",u.REMUX_ALLOC_ERROR="remuxAllocError",u.KEY_LOAD_ERROR="keyLoadError",u.KEY_LOAD_TIMEOUT="keyLoadTimeOut",u.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",u.BUFFER_APPEND_ERROR="bufferAppendError",u.BUFFER_APPENDING_ERROR="bufferAppendingError",u.BUFFER_STALLED_ERROR="bufferStalledError",u.BUFFER_FULL_ERROR="bufferFullError",u.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",u.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",u.INTERNAL_EXCEPTION="internalException"})(r||(r={}))},"./src/events.js":function(e,n,a){"use strict";a.r(n);var t={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"};n.default=t},"./src/hls.ts":function(e,n,a){"use strict";a.r(n);var t={};a.r(t),a.d(t,"newCue",function(){return aI});var r=a("./node_modules/url-toolkit/src/url-toolkit.js"),u=a("./src/errors.ts"),i=a("./src/polyfills/number-isFinite.js"),l=a("./src/events.js"),s=a("./src/utils/logger.js"),h={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},p=function(){function w(f){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=f,this.onEvent=this.onEvent.bind(this);for(var v=arguments.length,o=new Array(v>1?v-1:0),c=1;c<v;c++)o[c-1]=arguments[c];this.handledEvents=o,this.useGenericHandler=!0,this.registerListeners()}var D=w.prototype;return D.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},D.onHandlerDestroying=function(){},D.onHandlerDestroyed=function(){},D.isEventHandler=function(){return typeof this.handledEvents=="object"&&this.handledEvents.length&&typeof this.onEvent=="function"},D.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(v){if(h[v])throw new Error("Forbidden event-name: "+v);this.hls.on(v,this.onEvent)},this)},D.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(v){this.hls.off(v,this.onEvent)},this)},D.onEvent=function(v,o){this.onEventGeneric(v,o)},D.onEventGeneric=function(v,o){var c=function(R,C){var F="on"+R.replace("hls","");if(typeof this[F]!="function")throw new Error("Event "+R+" has no generic handler in this "+this.constructor.name+" class (tried "+F+")");return this[F].bind(this,C)};try{c.call(this,v,o).call()}catch(_){s.logger.error("An internal error happened while handling event "+v+'. Error message: "'+_.message+'". Here is a stacktrace:',_),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.OTHER_ERROR,details:u.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:v,err:_})}},w}(),y=p,E;(function(w){w.MANIFEST="manifest",w.LEVEL="level",w.AUDIO_TRACK="audioTrack",w.SUBTITLE_TRACK="subtitleTrack"})(E||(E={}));var b;(function(w){w.MAIN="main",w.AUDIO="audio",w.SUBTITLE="subtitle"})(b||(b={}));var T=a("./src/demux/mp4demuxer.js");function L(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function U(w,D,f){return D&&L(w.prototype,D),f&&L(w,f),w}var $=function(){function w(D,f){this._uri=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=null,this.baseuri=D,this.reluri=f}return U(w,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Object(r.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}]),w}();function z(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function Z(w,D,f){return D&&z(w.prototype,D),f&&z(w,f),w}var ue;(function(w){w.AUDIO="audio",w.VIDEO="video"})(ue||(ue={}));var X=function(){function w(){var f;this._url=null,this._byteRange=null,this._decryptdata=null,this._elementaryStreams=(f={},f[ue.AUDIO]=!1,f[ue.VIDEO]=!1,f),this.deltaPTS=0,this.rawProgramDateTime=null,this.programDateTime=null,this.title=null,this.tagList=[],this.cc=void 0,this.type=void 0,this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.start=void 0,this.sn=0,this.urlId=0,this.level=0,this.levelkey=void 0,this.loader=void 0}var D=w.prototype;return D.setByteRange=function(v,o){var c=v.split("@",2),_=[];c.length===1?_[0]=o?o.byteRangeEndOffset:0:_[0]=parseInt(c[1]),_[1]=parseInt(c[0])+_[0],this._byteRange=_},D.addElementaryStream=function(v){this._elementaryStreams[v]=!0},D.hasElementaryStream=function(v){return this._elementaryStreams[v]===!0},D.createInitializationVector=function(v){for(var o=new Uint8Array(16),c=12;c<16;c++)o[c]=v>>8*(15-c)&255;return o},D.setDecryptDataFromLevelKey=function(v,o){var c=v;return v&&v.method&&v.uri&&!v.iv&&(c=new $(v.baseuri,v.reluri),c.method=v.method,c.iv=this.createInitializationVector(o)),c},Z(w,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(r.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(v){this._url=v}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&s.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null||!Object(i.isFiniteNumber)(this.programDateTime))return null;var v=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){return!!(this.decryptdata&&this.decryptdata.uri!==null&&this.decryptdata.key===null)}}]),w}();function Y(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function ae(w,D,f){return D&&Y(w.prototype,D),f&&Y(w,f),w}var me=function(){function w(D){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=D,this.version=null}return ae(w,[{key:"hasProgramDateTime",get:function(){return!!(this.fragments[0]&&Object(i.isFiniteNumber)(this.fragments[0].programDateTime))}}]),w}(),ke=/^(\d+)x(\d+)$/,ce=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,le=function(){function w(f){typeof f=="string"&&(f=w.parseAttrList(f));for(var v in f)f.hasOwnProperty(v)&&(this[v]=f[v])}var D=w.prototype;return D.decimalInteger=function(v){var o=parseInt(this[v],10);return o>Number.MAX_SAFE_INTEGER?1/0:o},D.hexadecimalInteger=function(v){if(this[v]){var o=(this[v]||"0x").slice(2);o=(o.length&1?"0":"")+o;for(var c=new Uint8Array(o.length/2),_=0;_<o.length/2;_++)c[_]=parseInt(o.slice(_*2,_*2+2),16);return c}else return null},D.hexadecimalIntegerAsNumber=function(v){var o=parseInt(this[v],16);return o>Number.MAX_SAFE_INTEGER?1/0:o},D.decimalFloatingPoint=function(v){return parseFloat(this[v])},D.enumeratedString=function(v){return this[v]},D.decimalResolution=function(v){var o=ke.exec(this[v]);if(o!==null)return{width:parseInt(o[1],10),height:parseInt(o[2],10)}},w.parseAttrList=function(v){var o,c={};for(ce.lastIndex=0;(o=ce.exec(v))!==null;){var _=o[2],R='"';_.indexOf(R)===0&&_.lastIndexOf(R)===_.length-1&&(_=_.slice(1,-1)),c[o[1]]=_}return c},w}(),Ce=le,Ie={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function je(w,D){var f=Ie[D];return!!f&&f[w.slice(0,4)]===!0}function Ke(w,D){return MediaSource.isTypeSupported((D||"video")+'/mp4;codecs="'+w+'"')}var Tn=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,Qn=/#EXT-X-MEDIA:(.*)/g,En=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),qn=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,Vn=/\.(mp4|m4s|m4v|m4a)$/i,Wn=function(){function w(){}return w.findGroup=function(f,v){for(var o=0;o<f.length;o++){var c=f[o];if(c.id===v)return c}},w.convertAVC1ToAVCOTI=function(f){var v=f.split("."),o;return v.length>2?(o=v.shift()+".",o+=parseInt(v.shift()).toString(16),o+=("000"+parseInt(v.shift()).toString(16)).substr(-4)):o=f,o},w.resolve=function(f,v){return r.buildAbsoluteURL(v,f,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(f,v){var o=[];Tn.lastIndex=0;function c(x,B){["video","audio"].forEach(function(O){var ee=x.filter(function(Qe){return je(Qe,O)});if(ee.length){var ye=ee.filter(function(Qe){return Qe.lastIndexOf("avc1",0)===0||Qe.lastIndexOf("mp4a",0)===0});B[O+"Codec"]=ye.length>0?ye[0]:ee[0],x=x.filter(function(Qe){return ee.indexOf(Qe)===-1})}}),B.unknownCodecs=x}for(var _;(_=Tn.exec(f))!=null;){var R={},C=R.attrs=new Ce(_[1]);R.url=w.resolve(_[2],v);var F=C.decimalResolution("RESOLUTION");F&&(R.width=F.width,R.height=F.height),R.bitrate=C.decimalInteger("AVERAGE-BANDWIDTH")||C.decimalInteger("BANDWIDTH"),R.name=C.NAME,c([].concat((C.CODECS||"").split(/[ ,]+/)),R),R.videoCodec&&R.videoCodec.indexOf("avc1")!==-1&&(R.videoCodec=w.convertAVC1ToAVCOTI(R.videoCodec)),o.push(R)}return o},w.parseMasterPlaylistMedia=function(f,v,o,c){c===void 0&&(c=[]);var _,R=[],C=0;for(Qn.lastIndex=0;(_=Qn.exec(f))!==null;){var F=new Ce(_[1]);if(F.TYPE===o){var x={id:C++,groupId:F["GROUP-ID"],name:F.NAME||F.LANGUAGE,type:o,default:F.DEFAULT==="YES",autoselect:F.AUTOSELECT==="YES",forced:F.FORCED==="YES",lang:F.LANGUAGE};if(F.URI&&(x.url=w.resolve(F.URI,v)),c.length){var B=w.findGroup(c,x.groupId);x.audioCodec=B?B.codec:c[0].codec}R.push(x)}}return R},w.parseLevelPlaylist=function(f,v,o,c,_){var R=0,C=0,F=new me(v),x=0,B=null,O=new X,ee,ye,Qe,fn=null;for(En.lastIndex=0;(ee=En.exec(f))!==null;){var fa=ee[1];if(fa){O.duration=parseFloat(fa);var Xn=(" "+ee[2]).slice(1);O.title=Xn||null,O.tagList.push(Xn?["INF",fa,Xn]:["INF",fa])}else if(ee[3]){if(Object(i.isFiniteNumber)(O.duration)){var ca=R++;O.type=c,O.start=C,Qe&&(O.levelkey=Qe),O.sn=ca,O.level=o,O.cc=x,O.urlId=_,O.baseurl=v,O.relurl=(" "+ee[3]).slice(1),He(O,B),F.fragments.push(O),B=O,C+=O.duration,O=new X}}else if(ee[4]){var Ra=(" "+ee[4]).slice(1);B?O.setByteRange(Ra,B):O.setByteRange(Ra)}else if(ee[5])O.rawProgramDateTime=(" "+ee[5]).slice(1),O.tagList.push(["PROGRAM-DATE-TIME",O.rawProgramDateTime]),fn===null&&(fn=F.fragments.length);else{if(ee=ee[0].match(qn),!ee){s.logger.warn("No matches on slow regex match for level playlist!");continue}for(ye=1;ye<ee.length&&typeof ee[ye]=="undefined";ye++);var ka=(" "+ee[ye+1]).slice(1),Cu=(" "+ee[ye+2]).slice(1);switch(ee[ye]){case"#":O.tagList.push(Cu?[ka,Cu]:[ka]);break;case"PLAYLIST-TYPE":F.type=ka.toUpperCase();break;case"MEDIA-SEQUENCE":R=F.startSN=parseInt(ka);break;case"TARGETDURATION":F.targetduration=parseFloat(ka);break;case"VERSION":F.version=parseInt(ka);break;case"EXTM3U":break;case"ENDLIST":F.live=!1;break;case"DIS":x++,O.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":x=parseInt(ka);break;case"KEY":{var ko=ka,ki=new Ce(ko),vt=ki.enumeratedString("METHOD"),ht=ki.URI,ja=ki.hexadecimalInteger("IV");vt&&(Qe=new $(v,ht),ht&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(vt)>=0&&(Qe.method=vt,Qe.key=null,Qe.iv=ja));break}case"START":{var To=new Ce(ka),Z_=To.decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(Z_)&&(F.startTimeOffset=Z_);break}case"MAP":{var e0=new Ce(ka);O.relurl=e0.URI,e0.BYTERANGE&&O.setByteRange(e0.BYTERANGE),O.baseurl=v,O.level=o,O.type=c,O.sn="initSegment",F.initSegment=O,O=new X,O.rawProgramDateTime=F.initSegment.rawProgramDateTime;break}default:s.logger.warn("line parsed but not handled: "+ee);break}}}return O=B,O&&!O.relurl&&(F.fragments.pop(),C-=O.duration),F.totalduration=C,F.averagetargetduration=C/F.fragments.length,F.endSN=R-1,F.startCC=F.fragments[0]?F.fragments[0].cc:0,F.endCC=x,!F.initSegment&&F.fragments.length&&F.fragments.every(function(II){return Vn.test(II.relurl)})&&(s.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),O=new X,O.relurl=F.fragments[0].relurl,O.baseurl=v,O.level=o,O.type=c,O.sn="initSegment",F.initSegment=O,F.needSidxRanges=!0),fn&&pt(F.fragments,fn),F},w}();function pt(w,D){for(var f=w[D],v=D-1;v>=0;v--){var o=w[v];o.programDateTime=f.programDateTime-o.duration*1e3,f=o}}function He(w,D){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):D&&D.programDateTime&&(w.programDateTime=D.endProgramDateTime),Object(i.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}function ia(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Ia=window,Sn=Ia.performance,gn=function(w){ia(D,w);function D(v){var o;return o=w.call(this,v,l.default.MANIFEST_LOADING,l.default.LEVEL_LOADING,l.default.AUDIO_TRACK_LOADING,l.default.SUBTITLE_TRACK_LOADING)||this,o.loaders={},o}D.canHaveQualityLevels=function(o){return o!==E.AUDIO_TRACK&&o!==E.SUBTITLE_TRACK},D.mapContextToLevelType=function(o){var c=o.type;switch(c){case E.AUDIO_TRACK:return b.AUDIO;case E.SUBTITLE_TRACK:return b.SUBTITLE;default:return b.MAIN}},D.getResponseUrl=function(o,c){var _=o.url;return(_===void 0||_.indexOf("data:")===0)&&(_=c.url),_};var f=D.prototype;return f.createInternalLoader=function(o){var c=this.hls.config,_=c.pLoader,R=c.loader,C=_||R,F=new C(c);return o.loader=F,this.loaders[o.type]=F,F},f.getInternalLoader=function(o){return this.loaders[o.type]},f.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},f.destroyInternalLoaders=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy(),this.resetInternalLoader(o)}},f.destroy=function(){this.destroyInternalLoaders(),w.prototype.destroy.call(this)},f.onManifestLoading=function(o){this.load({url:o.url,type:E.MANIFEST,level:0,id:null,responseType:"text"})},f.onLevelLoading=function(o){this.load({url:o.url,type:E.LEVEL,level:o.level,id:o.id,responseType:"text"})},f.onAudioTrackLoading=function(o){this.load({url:o.url,type:E.AUDIO_TRACK,level:null,id:o.id,responseType:"text"})},f.onSubtitleTrackLoading=function(o){this.load({url:o.url,type:E.SUBTITLE_TRACK,level:null,id:o.id,responseType:"text"})},f.load=function(o){var c=this.hls.config;s.logger.debug("Loading playlist of type "+o.type+", level: "+o.level+", id: "+o.id);var _=this.getInternalLoader(o);if(_){var R=_.context;if(R&&R.url===o.url)return s.logger.trace("playlist request ongoing"),!1;s.logger.warn("aborting previous loader for type: "+o.type),_.abort()}var C,F,x,B;switch(o.type){case E.MANIFEST:C=c.manifestLoadingMaxRetry,F=c.manifestLoadingTimeOut,x=c.manifestLoadingRetryDelay,B=c.manifestLoadingMaxRetryTimeout;break;case E.LEVEL:C=0,B=0,x=0,F=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,F=c.levelLoadingTimeOut,x=c.levelLoadingRetryDelay,B=c.levelLoadingMaxRetryTimeout;break}_=this.createInternalLoader(o);var O={timeout:F,maxRetry:C,retryDelay:x,maxRetryDelay:B},ee={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return s.logger.debug("Calling internal loader delegate for URL: "+o.url),_.load(o,O,ee),!0},f.loadsuccess=function(o,c,_,R){if(R===void 0&&(R=null),_.isSidxRequest){this._handleSidxRequest(o,_),this._handlePlaylistLoaded(o,c,_,R);return}if(this.resetInternalLoader(_.type),typeof o.data!="string")throw new Error('expected responseType of "text" for PlaylistLoader');var C=o.data;if(c.tload=Sn.now(),C.indexOf("#EXTM3U")!==0){this._handleManifestParsingError(o,_,"no EXTM3U delimiter",R);return}C.indexOf("#EXTINF:")>0||C.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(o,c,_,R):this._handleMasterPlaylist(o,c,_,R)},f.loaderror=function(o,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!1,o)},f.loadtimeout=function(o,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!0)},f._handleMasterPlaylist=function(o,c,_,R){var C=this.hls,F=o.data,x=D.getResponseUrl(o,_),B=Wn.parseMasterPlaylist(F,x);if(!B.length){this._handleManifestParsingError(o,_,"no level found in manifest",R);return}var O=B.map(function(fn){return{id:fn.attrs.AUDIO,codec:fn.audioCodec}}),ee=Wn.parseMasterPlaylistMedia(F,x,"AUDIO",O),ye=Wn.parseMasterPlaylistMedia(F,x,"SUBTITLES");if(ee.length){var Qe=!1;ee.forEach(function(fn){fn.url||(Qe=!0)}),Qe===!1&&B[0].audioCodec&&!B[0].attrs.AUDIO&&(s.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),ee.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}C.trigger(l.default.MANIFEST_LOADED,{levels:B,audioTracks:ee,subtitles:ye,url:x,stats:c,networkDetails:R})},f._handleTrackOrLevelPlaylist=function(o,c,_,R){var C=this.hls,F=_.id,x=_.level,B=_.type,O=D.getResponseUrl(o,_),ee=Object(i.isFiniteNumber)(F)?F:0,ye=Object(i.isFiniteNumber)(x)?x:ee,Qe=D.mapContextToLevelType(_),fn=Wn.parseLevelPlaylist(o.data,O,ye,Qe,ee);if(fn.tload=c.tload,B===E.MANIFEST){var fa={url:O,details:fn};C.trigger(l.default.MANIFEST_LOADED,{levels:[fa],audioTracks:[],url:O,stats:c,networkDetails:R})}if(c.tparsed=Sn.now(),fn.needSidxRanges){var Xn=fn.initSegment.url;this.load({url:Xn,isSidxRequest:!0,type:B,level:x,levelDetails:fn,id:F,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"});return}_.levelDetails=fn,this._handlePlaylistLoaded(o,c,_,R)},f._handleSidxRequest=function(o,c){if(typeof o.data=="string")throw new Error("sidx request must be made with responseType of array buffer");var _=T.default.parseSegmentIndex(new Uint8Array(o.data));if(!!_){var R=_.references,C=c.levelDetails;R.forEach(function(F,x){var B=F.info;if(!!C){var O=C.fragments[x];O.byteRange.length===0&&O.setByteRange(String(1+B.end-B.start)+"@"+String(B.start))}}),C&&C.initSegment.setByteRange(String(_.moovEndOffset)+"@0")}},f._handleManifestParsingError=function(o,c,_,R){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:o.url,reason:_,networkDetails:R})},f._handleNetworkError=function(o,c,_,R){_===void 0&&(_=!1),R===void 0&&(R=null),s.logger.info("A network error occured while loading a "+o.type+"-type playlist");var C,F,x=this.getInternalLoader(o);switch(o.type){case E.MANIFEST:C=_?u.ErrorDetails.MANIFEST_LOAD_TIMEOUT:u.ErrorDetails.MANIFEST_LOAD_ERROR,F=!0;break;case E.LEVEL:C=_?u.ErrorDetails.LEVEL_LOAD_TIMEOUT:u.ErrorDetails.LEVEL_LOAD_ERROR,F=!1;break;case E.AUDIO_TRACK:C=_?u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,F=!1;break;default:F=!1}x&&(x.abort(),this.resetInternalLoader(o.type));var B={type:u.ErrorTypes.NETWORK_ERROR,details:C,fatal:F,url:o.url,loader:x,context:o,networkDetails:c};R&&(B.response=R),this.hls.trigger(l.default.ERROR,B)},f._handlePlaylistLoaded=function(o,c,_,R){var C=_.type,F=_.level,x=_.id,B=_.levelDetails;if(!B||!B.targetduration){this._handleManifestParsingError(o,_,"invalid target duration",R);return}var O=D.canHaveQualityLevels(_.type);if(O)this.hls.trigger(l.default.LEVEL_LOADED,{details:B,level:F||0,id:x||0,stats:c,networkDetails:R});else switch(C){case E.AUDIO_TRACK:this.hls.trigger(l.default.AUDIO_TRACK_LOADED,{details:B,id:x,stats:c,networkDetails:R});break;case E.SUBTITLE_TRACK:this.hls.trigger(l.default.SUBTITLE_TRACK_LOADED,{details:B,id:x,stats:c,networkDetails:R});break}},D}(y),Ve=gn;function na(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var va=function(w){na(D,w);function D(v){var o;return o=w.call(this,v,l.default.FRAG_LOADING)||this,o.loaders={},o}var f=D.prototype;return f.destroy=function(){var o=this.loaders;for(var c in o){var _=o[c];_&&_.destroy()}this.loaders={},w.prototype.destroy.call(this)},f.onFragLoading=function(o){var c=o.frag,_=c.type,R=this.loaders,C=this.hls.config,F=C.fLoader,x=C.loader;c.loaded=0;var B=R[_];B&&(s.logger.warn("abort previous fragment loader for type: "+_),B.abort()),B=R[_]=c.loader=C.fLoader?new F(C):new x(C);var O,ee,ye;O={url:c.url,frag:c,responseType:"arraybuffer",progressData:!1};var Qe=c.byteRangeStartOffset,fn=c.byteRangeEndOffset;Object(i.isFiniteNumber)(Qe)&&Object(i.isFiniteNumber)(fn)&&(O.rangeStart=Qe,O.rangeEnd=fn),ee={timeout:C.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:C.fragLoadingMaxRetryTimeout},ye={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},B.load(O,ee,ye)},f.loadsuccess=function(o,c,_,R){R===void 0&&(R=null);var C=o.data,F=_.frag;F.loader=void 0,this.loaders[F.type]=void 0,this.hls.trigger(l.default.FRAG_LOADED,{payload:C,frag:F,stats:c,networkDetails:R})},f.loaderror=function(o,c,_){_===void 0&&(_=null);var R=c.frag,C=R.loader;C&&C.abort(),this.loaders[R.type]=void 0,this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c.frag,response:o,networkDetails:_})},f.loadtimeout=function(o,c,_){_===void 0&&(_=null);var R=c.frag,C=R.loader;C&&C.abort(),this.loaders[R.type]=void 0,this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c.frag,networkDetails:_})},f.loadprogress=function(o,c,_,R){R===void 0&&(R=null);var C=c.frag;C.loaded=o.loaded,this.hls.trigger(l.default.FRAG_LOAD_PROGRESS,{frag:C,stats:o,networkDetails:R})},D}(y),Ma=va;function dt(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var vn=function(w){dt(D,w);function D(v){var o;return o=w.call(this,v,l.default.KEY_LOADING)||this,o.loaders={},o.decryptkey=null,o.decrypturl=null,o}var f=D.prototype;return f.destroy=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy()}this.loaders={},w.prototype.destroy.call(this)},f.onKeyLoading=function(o){var c=o.frag,_=c.type,R=this.loaders[_];if(!c.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var C=c.decryptdata.uri;if(C!==this.decrypturl||this.decryptkey===null){var F=this.hls.config;if(R&&(s.logger.warn("abort previous key loader for type:"+_),R.abort()),!C){s.logger.warn("key uri is falsy");return}c.loader=this.loaders[_]=new F.loader(F),this.decrypturl=C,this.decryptkey=null;var x={url:C,frag:c,responseType:"arraybuffer"},B={timeout:F.fragLoadingTimeOut,maxRetry:0,retryDelay:F.fragLoadingRetryDelay,maxRetryDelay:F.fragLoadingMaxRetryTimeout},O={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};c.loader.load(x,B,O)}else this.decryptkey&&(c.decryptdata.key=this.decryptkey,this.hls.trigger(l.default.KEY_LOADED,{frag:c}))},f.loadsuccess=function(o,c,_){var R=_.frag;if(!R.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=R.decryptdata.key=new Uint8Array(o.data),R.loader=void 0,delete this.loaders[R.type],this.hls.trigger(l.default.KEY_LOADED,{frag:R})},f.loaderror=function(o,c){var _=c.frag,R=_.loader;R&&R.abort(),delete this.loaders[_.type],this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:_,response:o})},f.loadtimeout=function(o,c){var _=c.frag,R=_.loader;R&&R.abort(),delete this.loaders[_.type],this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:_})},D}(y),la=vn;function Et(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Da={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},ot=function(w){Et(D,w);function D(v){var o;return o=w.call(this,v,l.default.BUFFER_APPENDED,l.default.FRAG_BUFFERED,l.default.FRAG_LOADED)||this,o.bufferPadding=.2,o.fragments=Object.create(null),o.timeRanges=Object.create(null),o.config=v.config,o}var f=D.prototype;return f.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,y.prototype.destroy.call(this),w.prototype.destroy.call(this)},f.getBufferedFrag=function(o,c){var _=this.fragments,R=Object.keys(_).filter(function(F){var x=_[F];if(x.body.type!==c||!x.buffered)return!1;var B=x.body;return B.startPTS<=o&&o<=B.endPTS});if(R.length===0)return null;var C=R.pop();return _[C].body},f.detectEvictedFragments=function(o,c){var _=this,R,C;Object.keys(this.fragments).forEach(function(F){var x=_.fragments[F];if(x.buffered===!0){var B=x.range[o];if(B){R=B.time;for(var O=0;O<R.length;O++)if(C=R[O],_.isTimeBuffered(C.startPTS,C.endPTS,c)===!1){_.removeFragment(x.body);break}}}})},f.detectPartialFragments=function(o){var c=this,_=this.getFragmentKey(o),R=this.fragments[_];R&&(R.buffered=!0,Object.keys(this.timeRanges).forEach(function(C){if(o.hasElementaryStream(C)){var F=c.timeRanges[C];R.range[C]=c.getBufferedTimes(o.startPTS,o.endPTS,F)}}))},f.getBufferedTimes=function(o,c,_){for(var R=[],C,F,x=!1,B=0;B<_.length;B++)if(C=_.start(B)-this.bufferPadding,F=_.end(B)+this.bufferPadding,o>=C&&c<=F){R.push({startPTS:Math.max(o,_.start(B)),endPTS:Math.min(c,_.end(B))});break}else if(o<F&&c>C)R.push({startPTS:Math.max(o,_.start(B)),endPTS:Math.min(c,_.end(B))}),x=!0;else if(c<=C)break;return{time:R,partial:x}},f.getFragmentKey=function(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn},f.getPartialFragment=function(o){var c=this,_,R,C,F=null,x=0;return Object.keys(this.fragments).forEach(function(B){var O=c.fragments[B];c.isPartial(O)&&(R=O.body.startPTS-c.bufferPadding,C=O.body.endPTS+c.bufferPadding,o>=R&&o<=C&&(_=Math.min(o-R,C-o),x<=_&&(F=O.body,x=_)))}),F},f.getState=function(o){var c=this.getFragmentKey(o),_=this.fragments[c],R=Da.NOT_LOADED;return _!==void 0&&(_.buffered?this.isPartial(_)===!0?R=Da.PARTIAL:R=Da.OK:R=Da.APPENDING),R},f.isPartial=function(o){return o.buffered===!0&&(o.range.video!==void 0&&o.range.video.partial===!0||o.range.audio!==void 0&&o.range.audio.partial===!0)},f.isTimeBuffered=function(o,c,_){for(var R,C,F=0;F<_.length;F++){if(R=_.start(F)-this.bufferPadding,C=_.end(F)+this.bufferPadding,o>=R&&c<=C)return!0;if(c<=R)return!1}return!1},f.onFragLoaded=function(o){var c=o.frag;!Object(i.isFiniteNumber)(c.sn)||c.bitrateTest||(this.fragments[this.getFragmentKey(c)]={body:c,range:Object.create(null),buffered:!1})},f.onBufferAppended=function(o){var c=this;this.timeRanges=o.timeRanges,Object.keys(this.timeRanges).forEach(function(_){var R=c.timeRanges[_];c.detectEvictedFragments(_,R)})},f.onFragBuffered=function(o){this.detectPartialFragments(o.frag)},f.hasFragment=function(o){var c=this.getFragmentKey(o);return this.fragments[c]!==void 0},f.removeFragment=function(o){var c=this.getFragmentKey(o);delete this.fragments[c]},f.removeAllFragments=function(){this.fragments=Object.create(null)},D}(y),q={search:function(D,f){for(var v=0,o=D.length-1,c=null,_=null;v<=o;){c=(v+o)/2|0,_=D[c];var R=f(_);if(R>0)v=c+1;else if(R<0)o=c-1;else return _}return null}},K=q,j=function(){function w(){}return w.isBuffered=function(f,v){try{if(f){for(var o=f.buffered,c=0;c<o.length;c++)if(v>=o.start(c)&&v<=o.end(c))return!0}}catch{}return!1},w.bufferInfo=function(f,v,o){try{if(f){var c=f.buffered,_=[],R;for(R=0;R<c.length;R++)_.push({start:c.start(R),end:c.end(R)});return this.bufferedInfo(_,v,o)}}catch{}return{len:0,start:v,end:v,nextStart:void 0}},w.bufferedInfo=function(f,v,o){f.sort(function(fn,fa){var Xn=fn.start-fa.start;return Xn||fa.end-fn.end});var c=[];if(o)for(var _=0;_<f.length;_++){var R=c.length;if(R){var C=c[R-1].end;f[_].start-C<o?f[_].end>C&&(c[R-1].end=f[_].end):c.push(f[_])}else c.push(f[_])}else c=f;for(var F=0,x,B=v,O=v,ee=0;ee<c.length;ee++){var ye=c[ee].start,Qe=c[ee].end;if(v+o>=ye&&v<Qe)B=ye,O=Qe,F=O-v;else if(v+o<ye){x=ye;break}}return{len:F,start:B,end:O,nextStart:x}},w}(),I=a("./node_modules/eventemitter3/index.js"),P=a("./node_modules/webworkify-webpack/index.js"),N=a("./src/demux/demuxer-inline.js");function J(){return window.MediaSource||window.WebKitMediaSource}var V=a("./src/utils/get-self-scope.js");function se(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var ie=function(w){se(D,w);function D(){return w.apply(this,arguments)||this}var f=D.prototype;return f.trigger=function(o){for(var c=arguments.length,_=new Array(c>1?c-1:0),R=1;R<c;R++)_[R-1]=arguments[R];this.emit.apply(this,[o,o].concat(_))},D}(I.EventEmitter),De=Object(V.getSelfScope)(),Se=J()||{isTypeSupported:function(){return!1}},Me=function(){function w(f,v){var o=this;this.hls=f,this.id=v;var c=this.observer=new ie,_=f.config,R=function(O,ee){ee=ee||{},ee.frag=o.frag,ee.id=o.id,f.trigger(O,ee)};c.on(l.default.FRAG_DECRYPTED,R),c.on(l.default.FRAG_PARSING_INIT_SEGMENT,R),c.on(l.default.FRAG_PARSING_DATA,R),c.on(l.default.FRAG_PARSED,R),c.on(l.default.ERROR,R),c.on(l.default.FRAG_PARSING_METADATA,R),c.on(l.default.FRAG_PARSING_USERDATA,R),c.on(l.default.INIT_PTS_FOUND,R);var C={mp4:Se.isTypeSupported("video/mp4"),mpeg:Se.isTypeSupported("audio/mpeg"),mp3:Se.isTypeSupported('audio/mp4; codecs="mp3"')},F=navigator.vendor;if(_.enableWorker&&typeof Worker!="undefined"){s.logger.log("demuxing in webworker");var x;try{x=this.w=P("./src/demux/demuxer-worker.js"),this.onwmsg=this.onWorkerMessage.bind(this),x.addEventListener("message",this.onwmsg),x.onerror=function(B){f.trigger(l.default.ERROR,{type:u.ErrorTypes.OTHER_ERROR,details:u.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:B.message+" ("+B.filename+":"+B.lineno+")"}})},x.postMessage({cmd:"init",typeSupported:C,vendor:F,id:v,config:JSON.stringify(_)})}catch(B){s.logger.warn("Error in worker:",B),s.logger.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),x&&De.URL.revokeObjectURL(x.objectURL),this.demuxer=new N.default(c,C,_,F),this.w=void 0}}else this.demuxer=new N.default(c,C,_,F)}var D=w.prototype;return D.destroy=function(){var v=this.w;if(v)v.removeEventListener("message",this.onwmsg),v.terminate(),this.w=null;else{var o=this.demuxer;o&&(o.destroy(),this.demuxer=null)}var c=this.observer;c&&(c.removeAllListeners(),this.observer=null)},D.push=function(v,o,c,_,R,C,F,x){var B=this.w,O=Object(i.isFiniteNumber)(R.startPTS)?R.startPTS:R.start,ee=R.decryptdata,ye=this.frag,Qe=!(ye&&R.cc===ye.cc),fn=!(ye&&R.level===ye.level),fa=ye&&R.sn===ye.sn+1,Xn=!fn&&fa;if(Qe&&s.logger.log(this.id+":discontinuity detected"),fn&&s.logger.log(this.id+":switch detected"),this.frag=R,B)B.postMessage({cmd:"demux",data:v,decryptdata:ee,initSegment:o,audioCodec:c,videoCodec:_,timeOffset:O,discontinuity:Qe,trackSwitch:fn,contiguous:Xn,duration:C,accurateTimeOffset:F,defaultInitPTS:x},v instanceof ArrayBuffer?[v]:[]);else{var ca=this.demuxer;ca&&ca.push(v,ee,o,c,_,O,Qe,fn,Xn,C,F,x)}},D.onWorkerMessage=function(v){var o=v.data,c=this.hls;switch(o.event){case"init":De.URL.revokeObjectURL(this.w.objectURL);break;case l.default.FRAG_PARSING_DATA:o.data.data1=new Uint8Array(o.data1),o.data2&&(o.data.data2=new Uint8Array(o.data2));default:o.data=o.data||{},o.data.frag=this.frag,o.data.id=this.id,c.trigger(o.event,o.data);break}},w}(),Le=Me;function sn(w,D,f){switch(D){case"audio":w.audioGroupIds||(w.audioGroupIds=[]),w.audioGroupIds.push(f);break;case"text":w.textGroupIds||(w.textGroupIds=[]),w.textGroupIds.push(f);break}}function mn(w,D,f){var v=w[D],o=w[f],c=o.startPTS;Object(i.isFiniteNumber)(c)?f>D?(v.duration=c-v.start,v.duration<0&&s.logger.warn("negative duration computed for frag "+v.sn+",level "+v.level+", there should be some duration drift between playlist and fragment!")):(o.duration=v.start-c,o.duration<0&&s.logger.warn("negative duration computed for frag "+o.sn+",level "+o.level+", there should be some duration drift between playlist and fragment!")):f>D?o.start=v.start+v.duration:o.start=Math.max(v.start-o.duration,0)}function Ue(w,D,f,v,o,c){var _=f;if(Object(i.isFiniteNumber)(D.startPTS)){var R=Math.abs(D.startPTS-f);Object(i.isFiniteNumber)(D.deltaPTS)?D.deltaPTS=Math.max(R,D.deltaPTS):D.deltaPTS=R,_=Math.max(f,D.startPTS),f=Math.min(f,D.startPTS),v=Math.max(v,D.endPTS),o=Math.min(o,D.startDTS),c=Math.max(c,D.endDTS)}var C=f-D.start;D.start=D.startPTS=f,D.maxStartPTS=_,D.endPTS=v,D.startDTS=o,D.endDTS=c,D.duration=v-f;var F=D.sn;if(!w||F<w.startSN||F>w.endSN)return 0;var x,B,O;for(x=F-w.startSN,B=w.fragments,B[x]=D,O=x;O>0;O--)mn(B,O,O-1);for(O=x;O<B.length-1;O++)mn(B,O,O+1);return w.PTSKnown=!0,C}function bn(w,D){D.initSegment&&w.initSegment&&(D.initSegment=w.initSegment);var f=0,v;if(pa(w,D,function(_,R){f=_.cc-R.cc,Object(i.isFiniteNumber)(_.startPTS)&&(R.start=R.startPTS=_.startPTS,R.endPTS=_.endPTS,R.duration=_.duration,R.backtracked=_.backtracked,R.dropped=_.dropped,v=R),D.PTSKnown=!0}),!!D.PTSKnown){if(f){s.logger.log("discontinuity sliding from playlist, take drift into account");for(var o=D.fragments,c=0;c<o.length;c++)o[c].cc+=f}v?Ue(D,v,v.startPTS,v.endPTS,v.startDTS,v.endDTS):at(w,D),D.PTSKnown=w.PTSKnown}}function zn(w,D,f){f===void 0&&(f=0);var v=-1;pa(w,D,function(_,R,C){R.start=_.start,v=C});var o=D.fragments;if(v<0){o.forEach(function(_){_.start+=f});return}for(var c=v+1;c<o.length;c++)o[c].start=o[c-1].start+o[c-1].duration}function pa(w,D,f){if(!(!w||!D))for(var v=Math.max(w.startSN,D.startSN)-D.startSN,o=Math.min(w.endSN,D.endSN)-D.startSN,c=D.startSN-w.startSN,_=v;_<=o;_++){var R=w.fragments[c+_],C=D.fragments[_];if(!R||!C)break;f(R,C,_)}}function at(w,D){var f=D.startSN-w.startSN,v=w.fragments,o=D.fragments;if(!(f<0||f>v.length))for(var c=0;c<o.length;c++)o[c].start+=v[f].start}function Pt(w,D,f){var v=1e3*(D.averagetargetduration?D.averagetargetduration:D.targetduration),o=v/2;return w&&D.endSN===w.endSN&&(v=o),f&&(v=Math.max(o,v-(window.performance.now()-f))),Math.round(v)}var ba={toString:function(D){for(var f="",v=D.length,o=0;o<v;o++)f+="["+D.start(o).toFixed(3)+","+D.end(o).toFixed(3)+"]";return f}},mt=ba;function Na(w,D){for(var f=null,v=0;v<w.length;v+=1){var o=w[v];if(o&&o.cc===D){f=o;break}}return f}function Ot(w,D){return K.search(w,function(f){return f.cc<D?1:f.cc>D?-1:0})}function $a(w,D,f){var v=!1;return D&&D.details&&f&&(f.endCC>f.startCC||w&&w.cc<f.startCC)&&(v=!0),v}function It(w,D){var f=w.fragments,v=D.fragments;if(!v.length||!f.length){s.logger.log("No fragments to align");return}var o=Na(f,v[0].cc);if(!o||o&&!o.startPTS){s.logger.log("No frag in previous level to align on");return}return o}function sr(w,D){D.fragments.forEach(function(f){if(f){var v=f.start+w;f.start=f.startPTS=v,f.endPTS=v+f.duration}}),D.PTSKnown=!0}function Sr(w,D,f){so(w,f,D),!f.PTSKnown&&D&&hr(f,D.details)}function so(w,D,f){if($a(w,f,D)){var v=It(f.details,D);v&&(s.logger.log("Adjusting PTS using last level due to CC increase within current level"),sr(v.start,D))}}function hr(w,D){if(D&&D.fragments.length){if(!w.hasProgramDateTime||!D.hasProgramDateTime)return;var f=D.fragments[0].programDateTime,v=w.fragments[0].programDateTime,o=(v-f)/1e3+D.fragments[0].start;Object(i.isFiniteNumber)(o)&&(s.logger.log("adjusting PTS using programDateTime delta, sliding:"+o.toFixed(3)),sr(o,w))}}function Oo(w,D,f){if(D===null||!Array.isArray(w)||!w.length||!Object(i.isFiniteNumber)(D))return null;var v=w[0].programDateTime;if(D<(v||0))return null;var o=w[w.length-1].endProgramDateTime;if(D>=(o||0))return null;f=f||0;for(var c=0;c<w.length;++c){var _=w[c];if(Hr(D,f,_))return _}return null}function Cr(w,D,f,v){f===void 0&&(f=0),v===void 0&&(v=0);var o=w?D[w.sn-D[0].sn+1]:null;return o&&!rr(f,v,o)?o:K.search(D,rr.bind(null,f,v))}function rr(w,D,f){w===void 0&&(w=0),D===void 0&&(D=0);var v=Math.min(D,f.duration+(f.deltaPTS?f.deltaPTS:0));return f.start+f.duration-v<=w?1:f.start-v>w&&f.start?-1:0}function Hr(w,D,f){var v=Math.min(D,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,o=f.endProgramDateTime||0;return o-v>w}var tu=250,ru=2,Eo=.1,qr=.05,Tu=function(){function w(f,v,o,c){this.config=f,this.media=v,this.fragmentTracker=o,this.hls=c,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var D=w.prototype;return D.poll=function(v){var o=this.config,c=this.media,_=this.stalled,R=c.currentTime,C=c.seeking,F=this.seeking&&!C,x=!this.seeking&&C;if(this.seeking=C,R!==v){if(this.moved=!0,_!==null){if(this.stallReported){var B=self.performance.now()-_;s.logger.warn("playback not stuck anymore @"+R+", after "+Math.round(B)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((x||F)&&(this.stalled=null),!(c.paused||c.ended||c.playbackRate===0||!c.buffered.length)){var O=j.bufferInfo(c,R,0),ee=O.len>0,ye=O.nextStart||0;if(!(!ee&&!ye)){if(C){var Qe=O.len>ru,fn=!ye||ye-R>ru;if(Qe||fn)return;this.moved=!1}if(!this.moved&&this.stalled){var fa=Math.max(ye,O.start||0)-R;if(fa>0&&fa<=ru){this._trySkipBufferHole(null);return}}var Xn=self.performance.now();if(_===null){this.stalled=Xn;return}var ca=Xn-_;!C&&ca>=tu&&this._reportStall(O.len);var Ra=j.bufferInfo(c,R,o.maxBufferHole);this._tryFixBufferStall(Ra,ca)}}},D._tryFixBufferStall=function(v,o){var c=this.config,_=this.fragmentTracker,R=this.media,C=R.currentTime,F=_.getPartialFragment(C);if(F){var x=this._trySkipBufferHole(F);if(x)return}v.len>c.maxBufferHole&&o>c.highBufferWatchdogPeriod*1e3&&(s.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},D._reportStall=function(v){var o=this.hls,c=this.media,_=this.stallReported;_||(this.stallReported=!0,s.logger.warn("Playback stalling at @"+c.currentTime+" due to low buffer"),o.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:v}))},D._trySkipBufferHole=function(v){for(var o=this.config,c=this.hls,_=this.media,R=_.currentTime,C=0,F=0;F<_.buffered.length;F++){var x=_.buffered.start(F);if(R+o.maxBufferHole>=C&&R<x){var B=Math.max(x+qr,_.currentTime+Eo);return s.logger.warn("skipping hole, adjusting currentTime from "+R+" to "+B),this.moved=!0,this.stalled=null,_.currentTime=B,v&&c.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+R+" to "+B,frag:v}),B}C=_.buffered.end(F)}return 0},D._tryNudgeBuffer=function(){var v=this.config,o=this.hls,c=this.media,_=c.currentTime,R=(this.nudgeRetry||0)+1;if(this.nudgeRetry=R,R<v.nudgeMaxRetry){var C=_+R*v.nudgeOffset;s.logger.warn("Nudging 'currentTime' from "+_+" to "+C),c.currentTime=C,o.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else s.logger.error("Playhead still not moving while enough data buffered @"+_+" after "+v.nudgeMaxRetry+" nudges"),o.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},w}();function oi(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function xi(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Kl=function(w){xi(D,w);function D(v){for(var o,c=arguments.length,_=new Array(c>1?c-1:0),R=1;R<c;R++)_[R-1]=arguments[R];return o=w.call.apply(w,[this,v].concat(_))||this,o._boundTick=void 0,o._tickTimer=null,o._tickInterval=null,o._tickCallCount=0,o._boundTick=o.tick.bind(oi(o)),o}var f=D.prototype;return f.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},f.hasInterval=function(){return!!this._tickInterval},f.hasNextTick=function(){return!!this._tickTimer},f.setInterval=function(o){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,o),!0)},f.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},f.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},f.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},f.doTick=function(){},D}(y);function Wc(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var fe={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},gl=function(w){Wc(D,w);function D(){return w.apply(this,arguments)||this}var f=D.prototype;return f.doTick=function(){},f.startLoad=function(){},f.stopLoad=function(){var o=this.fragCurrent;o&&(o.loader&&o.loader.abort(),this.fragmentTracker.removeFragment(o)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=fe.STOPPED},f._streamEnded=function(o,c){var _=this.fragCurrent,R=this.fragmentTracker;if(!c.live&&_&&!_.backtracked&&_.sn===c.endSN&&!o.nextStart){var C=R.getState(_);return C===Da.PARTIAL||C===Da.OK}return!1},f.onMediaSeeking=function(){var o=this.config,c=this.media,_=this.mediaBuffer,R=this.state,C=c?c.currentTime:null,F=j.bufferInfo(_||c,C,this.config.maxBufferHole);if(Object(i.isFiniteNumber)(C)&&s.logger.log("media seeking to "+C.toFixed(3)),R===fe.FRAG_LOADING){var x=this.fragCurrent;if(F.len===0&&x){var B=o.maxFragLookUpTolerance,O=x.start-B,ee=x.start+x.duration+B;C<O||C>ee?(x.loader&&(s.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),x.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=fe.IDLE):s.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else R===fe.ENDED&&(F.len===0&&(this.fragPrevious=null,this.fragCurrent=null),this.state=fe.IDLE);c&&(this.lastCurrentTime=C),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=C),this.tick()},f.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},f.onHandlerDestroying=function(){this.stopLoad(),w.prototype.onHandlerDestroying.call(this)},f.onHandlerDestroyed=function(){this.state=fe.STOPPED,this.fragmentTracker=null},f.computeLivePosition=function(o,c){var _=this.config.liveSyncDuration!==void 0?this.config.liveSyncDuration:this.config.liveSyncDurationCount*c.targetduration;return o+Math.max(0,c.totalduration-_)},D}(Kl);function Rl(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function Jc(w,D,f){return D&&Rl(w.prototype,D),f&&Rl(w,f),w}function yl(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Ni=100,_d=function(w){yl(D,w);function D(v,o){var c;return c=w.call(this,v,l.default.MEDIA_ATTACHED,l.default.MEDIA_DETACHING,l.default.MANIFEST_LOADING,l.default.MANIFEST_PARSED,l.default.LEVEL_LOADED,l.default.KEY_LOADED,l.default.FRAG_LOADED,l.default.FRAG_LOAD_EMERGENCY_ABORTED,l.default.FRAG_PARSING_INIT_SEGMENT,l.default.FRAG_PARSING_DATA,l.default.FRAG_PARSED,l.default.ERROR,l.default.AUDIO_TRACK_SWITCHING,l.default.AUDIO_TRACK_SWITCHED,l.default.BUFFER_CREATED,l.default.BUFFER_APPENDED,l.default.BUFFER_FLUSHED)||this,c.fragmentTracker=o,c.config=v.config,c.audioCodecSwap=!1,c._state=fe.STOPPED,c.stallReported=!1,c.gapController=null,c.altAudio=!1,c}var f=D.prototype;return f.startLoad=function(o){if(this.levels){var c=this.lastCurrentTime,_=this.hls;if(this.stopLoad(),this.setInterval(Ni),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var R=_.startLevel;R===-1&&(R=0,this.bitrateTest=!0),this.level=_.nextLoadLevel=R,this.loadedmetadata=!1}c>0&&o===-1&&(s.logger.log("override startPosition with lastCurrentTime @"+c.toFixed(3)),o=c),this.state=fe.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()}else this.forceStartLoad=!0,this.state=fe.STOPPED},f.stopLoad=function(){this.forceStartLoad=!1,w.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case fe.BUFFER_FLUSHING:this.fragLoadError=0;break;case fe.IDLE:this._doTickIdle();break;case fe.WAITING_LEVEL:var o=this.levels[this.level];o&&o.details&&(this.state=fe.IDLE);break;case fe.FRAG_LOADING_WAITING_RETRY:var c=window.performance.now(),_=this.retryDate;(!_||c>=_||this.media&&this.media.seeking)&&(s.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=fe.IDLE);break;case fe.ERROR:case fe.STOPPED:case fe.FRAG_LOADING:case fe.PARSING:case fe.PARSED:case fe.ENDED:break;default:break}this._checkBuffer(),this._checkFragmentChanged()},f._doTickIdle=function(){var o=this.hls,c=o.config,_=this.media;if(!(this.levelLastLoaded===void 0||!_&&(this.startFragRequested||!c.startFragPrefetch))){var R;this.loadedmetadata?R=_.currentTime:R=this.nextLoadPosition;var C=o.nextLoadLevel,F=this.levels[C];if(!!F){var x=F.bitrate,B;x?B=Math.max(8*c.maxBufferSize/x,c.maxBufferLength):B=c.maxBufferLength,B=Math.min(B,c.maxMaxBufferLength);var O=j.bufferInfo(this.mediaBuffer?this.mediaBuffer:_,R,c.maxBufferHole),ee=O.len;if(!(ee>=B)){s.logger.trace("buffer length of "+ee.toFixed(3)+" is below max of "+B.toFixed(3)+". checking for more payload ..."),this.level=o.nextLoadLevel=C;var ye=F.details;if(!ye||ye.live&&this.levelLastLoaded!==C){this.state=fe.WAITING_LEVEL;return}if(this._streamEnded(O,ye)){var Qe={};this.altAudio&&(Qe.type="video"),this.hls.trigger(l.default.BUFFER_EOS,Qe),this.state=fe.ENDED;return}this._fetchPayloadOrEos(R,O,ye)}}}},f._fetchPayloadOrEos=function(o,c,_){var R=this.fragPrevious,C=this.level,F=_.fragments,x=F.length;if(x!==0){var B=F[0].start,O=F[x-1].start+F[x-1].duration,ee=c.end,ye;if(_.initSegment&&!_.initSegment.data)ye=_.initSegment;else if(_.live){var Qe=this.config.initialLiveManifestSize;if(x<Qe){s.logger.warn("Can not start playback of a level, reason: not enough fragments "+x+" < "+Qe);return}if(ye=this._ensureFragmentAtLivePoint(_,ee,B,O,R,F,x),ye===null)return}else ee<B&&(ye=F[0]);ye||(ye=this._findFragment(B,R,x,F,ee,O,_)),ye&&(ye.encrypted?(s.logger.log("Loading key for "+ye.sn+" of ["+_.startSN+" ,"+_.endSN+"],level "+C),this._loadKey(ye)):(s.logger.log("Loading "+ye.sn+" of ["+_.startSN+" ,"+_.endSN+"],level "+C+", currentTime:"+o.toFixed(3)+",bufferEnd:"+ee.toFixed(3)),this._loadFragment(ye)))}},f._ensureFragmentAtLivePoint=function(o,c,_,R,C,F,x){var B=this.hls.config,O=this.media,ee,ye=B.liveMaxLatencyDuration!==void 0?B.liveMaxLatencyDuration:B.liveMaxLatencyDurationCount*o.targetduration;if(c<Math.max(_-B.maxFragLookUpTolerance,R-ye)){var Qe=this.liveSyncPosition=this.computeLivePosition(_,o);c=Qe,O&&!O.paused&&O.readyState&&O.duration>Qe&&Qe>O.currentTime&&(s.logger.log("buffer end: "+c.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+Qe.toFixed(3)),O.currentTime=Qe),this.nextLoadPosition=Qe}if(o.PTSKnown&&c>R&&O&&O.readyState)return null;if(this.startFragRequested&&!o.PTSKnown){if(C)if(o.hasProgramDateTime)s.logger.log("live playlist, switching playlist, load frag with same PDT: "+C.programDateTime),ee=Oo(F,C.endProgramDateTime,B.maxFragLookUpTolerance);else{var fn=C.sn+1;if(fn>=o.startSN&&fn<=o.endSN){var fa=F[fn-o.startSN];C.cc===fa.cc&&(ee=fa,s.logger.log("live playlist, switching playlist, load frag with next SN: "+ee.sn))}ee||(ee=K.search(F,function(Xn){return C.cc-Xn.cc}),ee&&s.logger.log("live playlist, switching playlist, load frag with same CC: "+ee.sn))}ee||(ee=F[Math.min(x-1,Math.round(x/2))],s.logger.log("live playlist, switching playlist, unknown, load middle frag : "+ee.sn))}return ee},f._findFragment=function(o,c,_,R,C,F,x){var B=this.hls.config,O;if(C<F){var ee=C>F-B.maxFragLookUpTolerance?0:B.maxFragLookUpTolerance;O=Cr(c,R,C,ee)}else O=R[_-1];if(O){var ye=O.sn-x.startSN,Qe=c&&O.level===c.level,fn=R[ye-1],fa=R[ye+1];if(c&&O.sn===c.sn)if(Qe&&!O.backtracked)if(O.sn<x.endSN){var Xn=c.deltaPTS;Xn&&Xn>B.maxBufferHole&&c.dropped&&ye?(O=fn,s.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(O=fa,s.logger.log("Re-loading fragment with SN: "+O.sn))}else O=null;else O.backtracked&&(fa&&fa.backtracked?(s.logger.warn("Already backtracked from fragment "+fa.sn+", will not backtrack to fragment "+O.sn+". Loading fragment "+fa.sn),O=fa):(s.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),O.dropped=0,fn?(O=fn,O.backtracked=!0):ye&&(O=null)))}return O},f._loadKey=function(o){this.state=fe.KEY_LOADING,this.hls.trigger(l.default.KEY_LOADING,{frag:o})},f._loadFragment=function(o){var c=this.fragmentTracker.getState(o);this.fragCurrent=o,o.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(o.sn)&&!o.bitrateTest&&(this.nextLoadPosition=o.start+o.duration),o.backtracked||c===Da.NOT_LOADED||c===Da.PARTIAL?(o.autoLevel=this.hls.autoLevelEnabled,o.bitrateTest=this.bitrateTest,this.hls.trigger(l.default.FRAG_LOADING,{frag:o}),this.demuxer||(this.demuxer=new Le(this.hls,"main")),this.state=fe.FRAG_LOADING):c===Da.APPENDING&&this._reduceMaxBufferLength(o.duration)&&this.fragmentTracker.removeFragment(o)},f.getBufferedFrag=function(o){return this.fragmentTracker.getBufferedFrag(o,b.MAIN)},f.followingBufferedFrag=function(o){return o?this.getBufferedFrag(o.endPTS+.5):null},f._checkFragmentChanged=function(){var o,c,_=this.media;if(_&&_.readyState&&_.seeking===!1&&(c=_.currentTime,c>this.lastCurrentTime&&(this.lastCurrentTime=c),j.isBuffered(_,c)?o=this.getBufferedFrag(c):j.isBuffered(_,c+.1)&&(o=this.getBufferedFrag(c+.1)),o)){var R=o;if(R!==this.fragPlaying){this.hls.trigger(l.default.FRAG_CHANGED,{frag:R});var C=R.level;(!this.fragPlaying||this.fragPlaying.level!==C)&&this.hls.trigger(l.default.LEVEL_SWITCHED,{level:C}),this.fragPlaying=R}}},f.immediateLevelSwitch=function(){if(s.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var o=this.media,c;o?(c=o.paused,o.pause()):c=!0,this.previouslyPaused=c}var _=this.fragCurrent;_&&_.loader&&_.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},f.immediateLevelSwitchEnd=function(){var o=this.media;o&&o.buffered.length&&(this.immediateSwitch=!1,j.isBuffered(o,o.currentTime)&&(o.currentTime-=1e-4),this.previouslyPaused||o.play())},f.nextLevelSwitch=function(){var o=this.media;if(o&&o.readyState){var c,_,R;if(_=this.getBufferedFrag(o.currentTime),_&&_.startPTS>1&&this.flushMainBuffer(0,_.startPTS-1),o.paused)c=0;else{var C=this.hls.nextLoadLevel,F=this.levels[C],x=this.fragLastKbps;x&&this.fragCurrent?c=this.fragCurrent.duration*F.bitrate/(1e3*x)+1:c=0}if(R=this.getBufferedFrag(o.currentTime+c),R&&(R=this.followingBufferedFrag(R),R)){var B=this.fragCurrent;B&&B.loader&&B.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(R.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(o,c){this.state=fe.BUFFER_FLUSHING;var _={startOffset:o,endOffset:c};this.altAudio&&(_.type="video"),this.hls.trigger(l.default.BUFFER_FLUSHING,_)},f.onMediaAttached=function(o){var c=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),c.addEventListener("seeking",this.onvseeking),c.addEventListener("seeked",this.onvseeked),c.addEventListener("ended",this.onvended);var _=this.config;this.levels&&_.autoStartLoad&&this.hls.startLoad(_.startPosition),this.gapController=new Tu(_,c,this.fragmentTracker,this.hls)},f.onMediaDetaching=function(){var o=this.media;o&&o.ended&&(s.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var c=this.levels;c&&c.forEach(function(_){_.details&&_.details.fragments.forEach(function(R){R.backtracked=void 0})}),o&&(o.removeEventListener("seeking",this.onvseeking),o.removeEventListener("seeked",this.onvseeked),o.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},f.onMediaSeeked=function(){var o=this.media,c=o?o.currentTime:void 0;Object(i.isFiniteNumber)(c)&&s.logger.log("media seeked to "+c.toFixed(3)),this.tick()},f.onManifestLoading=function(){s.logger.log("trigger BUFFER_RESET"),this.hls.trigger(l.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},f.onManifestParsed=function(o){var c=!1,_=!1,R;o.levels.forEach(function(F){R=F.audioCodec,R&&(R.indexOf("mp4a.40.2")!==-1&&(c=!0),R.indexOf("mp4a.40.5")!==-1&&(_=!0))}),this.audioCodecSwitch=c&&_,this.audioCodecSwitch&&s.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=o.altAudio,this.levels=o.levels,this.startFragRequested=!1;var C=this.config;(C.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(C.startPosition)},f.onLevelLoaded=function(o){var c=o.details,_=o.level,R=this.levels[this.levelLastLoaded],C=this.levels[_],F=c.totalduration,x=0;if(s.logger.log("level "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+F),c.live){var B=C.details;B&&c.fragments.length>0?(bn(B,c),x=c.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(x,B),c.PTSKnown&&Object(i.isFiniteNumber)(x)?s.logger.log("live playlist sliding:"+x.toFixed(3)):(s.logger.log("live playlist - outdated PTS, unknown sliding"),Sr(this.fragPrevious,R,c))):(s.logger.log("live playlist - first load, unknown sliding"),c.PTSKnown=!1,Sr(this.fragPrevious,R,c))}else c.PTSKnown=!1;if(C.details=c,this.levelLastLoaded=_,this.hls.trigger(l.default.LEVEL_UPDATED,{details:c,level:_}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var O=c.startTimeOffset;Object(i.isFiniteNumber)(O)?(O<0&&(s.logger.log("negative start time offset "+O+", count from end of last fragment"),O=x+F+O),s.logger.log("start time offset found in playlist, adjust startPosition to "+O),this.startPosition=O):c.live?(this.startPosition=this.computeLivePosition(x,c),s.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===fe.WAITING_LEVEL&&(this.state=fe.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===fe.KEY_LOADING&&(this.state=fe.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=this.hls,R=this.levels,C=this.media,F=o.frag;if(this.state===fe.FRAG_LOADING&&c&&F.type==="main"&&F.level===c.level&&F.sn===c.sn){var x=o.stats,B=R[c.level],O=B.details;if(this.bitrateTest=!1,this.stats=x,s.logger.log("Loaded "+c.sn+" of ["+O.startSN+" ,"+O.endSN+"],level "+c.level),F.bitrateTest&&_.nextLoadLevel)this.state=fe.IDLE,this.startFragRequested=!1,x.tparsed=x.tbuffered=window.performance.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:x,frag:c,id:"main"}),this.tick();else if(F.sn==="initSegment")this.state=fe.IDLE,x.tparsed=x.tbuffered=window.performance.now(),O.initSegment.data=o.payload,_.trigger(l.default.FRAG_BUFFERED,{stats:x,frag:c,id:"main"}),this.tick();else{s.logger.log("Parsing "+c.sn+" of ["+O.startSN+" ,"+O.endSN+"],level "+c.level+", cc "+c.cc),this.state=fe.PARSING,this.pendingBuffering=!0,this.appended=!1,F.bitrateTest&&(F.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:F}));var ee=!(C&&C.seeking)&&(O.PTSKnown||!O.live),ye=O.initSegment?O.initSegment.data:[],Qe=this._getAudioCodec(B),fn=this.demuxer=this.demuxer||new Le(this.hls,"main");fn.push(o.payload,ye,Qe,B.videoCodec,c,O.totalduration,ee)}}this.fragLoadError=0},f.onFragParsingInitSegment=function(o){var c=this.fragCurrent,_=o.frag;if(c&&o.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===fe.PARSING){var R=o.tracks,C,F;if(R.audio&&this.altAudio&&delete R.audio,F=R.audio,F){var x=this.levels[this.level].audioCodec,B=navigator.userAgent.toLowerCase();x&&this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),x.indexOf("mp4a.40.5")!==-1?x="mp4a.40.2":x="mp4a.40.5"),this.audioCodecSwitch&&F.metadata.channelCount!==1&&B.indexOf("firefox")===-1&&(x="mp4a.40.5"),B.indexOf("android")!==-1&&F.container!=="audio/mpeg"&&(x="mp4a.40.2",s.logger.log("Android: force audio codec to "+x)),F.levelCodec=x,F.id=o.id}F=R.video,F&&(F.levelCodec=this.levels[this.level].videoCodec,F.id=o.id),this.hls.trigger(l.default.BUFFER_CODECS,R);for(C in R){F=R[C],s.logger.log("main track:"+C+",container:"+F.container+",codecs[level/parsed]=["+F.levelCodec+"/"+F.codec+"]");var O=F.initSegment;O&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,{type:C,data:O,parent:"main",content:"initSegment"}))}this.tick()}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,R=o.frag;if(_&&o.id==="main"&&R.sn===_.sn&&R.level===_.level&&!(o.type==="audio"&&this.altAudio)&&this.state===fe.PARSING){var C=this.levels[this.level],F=_;if(Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),o.hasAudio===!0&&F.addElementaryStream(ue.AUDIO),o.hasVideo===!0&&F.addElementaryStream(ue.VIDEO),s.logger.log("Parsed "+o.type+",PTS:["+o.startPTS.toFixed(3)+","+o.endPTS.toFixed(3)+"],DTS:["+o.startDTS.toFixed(3)+"/"+o.endDTS.toFixed(3)+"],nb:"+o.nb+",dropped:"+(o.dropped||0)),o.type==="video")if(F.dropped=o.dropped,F.dropped)if(F.backtracked)s.logger.warn("Already backtracked on this fragment, appending with the gap",F.sn);else{var x=C.details;if(x&&F.sn===x.startSN)s.logger.warn("missing video frame(s) on first frag, appending with gap",F.sn);else{s.logger.warn("missing video frame(s), backtracking fragment",F.sn),this.fragmentTracker.removeFragment(F),F.backtracked=!0,this.nextLoadPosition=o.startPTS,this.state=fe.IDLE,this.fragPrevious=F,this.tick();return}}else F.backtracked=!1;var B=Ue(C.details,F,o.startPTS,o.endPTS,o.startDTS,o.endDTS),O=this.hls;O.trigger(l.default.LEVEL_PTS_UPDATED,{details:C.details,level:this.level,drift:B,type:o.type,start:o.startPTS,end:o.endPTS}),[o.data1,o.data2].forEach(function(ee){ee&&ee.length&&c.state===fe.PARSING&&(c.appended=!0,c.pendingBuffering=!0,O.trigger(l.default.BUFFER_APPENDING,{type:o.type,data:ee,parent:"main",content:"data"}))}),this.tick()}},f.onFragParsed=function(o){var c=this.fragCurrent,_=o.frag;c&&o.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===fe.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=fe.PARSED,this._checkAppendedParsed())},f.onAudioTrackSwitching=function(o){var c=!!o.url,_=o.id;if(!c){if(this.mediaBuffer!==this.media){s.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var R=this.fragCurrent;R.loader&&(s.logger.log("switching to main audio track, cancel main fragment load"),R.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=fe.IDLE}var C=this.hls;C.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),C.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:_}),this.altAudio=!1}},f.onAudioTrackSwitched=function(o){var c=o.id,_=!!this.hls.audioTracks[c].url;if(_){var R=this.videoBuffer;R&&this.mediaBuffer!==R&&(s.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=R)}this.altAudio=_,this.tick()},f.onBufferCreated=function(o){var c=o.tracks,_,R,C=!1;for(var F in c){var x=c[F];x.id==="main"?(R=F,_=x,F==="video"&&(this.videoBuffer=c[F].buffer)):C=!0}C&&_?(s.logger.log("alternate track found, use "+R+".buffered to schedule main fragment loading"),this.mediaBuffer=_.buffer):this.mediaBuffer=this.media},f.onBufferAppended=function(o){if(o.parent==="main"){var c=this.state;(c===fe.PARSING||c===fe.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===fe.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent;if(o){var c=this.mediaBuffer?this.mediaBuffer:this.media;s.logger.log("main buffered : "+mt.toString(c.buffered)),this.fragPrevious=o;var _=this.stats;_.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*_.total/(_.tbuffered-_.tfirst)),this.hls.trigger(l.default.FRAG_BUFFERED,{stats:_,frag:o,id:"main"}),this.state=fe.IDLE}this.tick()}},f.onError=function(o){var c=o.frag||this.fragCurrent;if(!(c&&c.type!=="main")){var _=!!this.media&&j.isBuffered(this.media,this.media.currentTime)&&j.isBuffered(this.media,this.media.currentTime+.5);switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:if(!o.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var R=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);s.logger.warn("mediaController: frag loading failed, retry in "+R+" ms"),this.retryDate=window.performance.now()+R,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=fe.FRAG_LOADING_WAITING_RETRY}else s.logger.error("mediaController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=fe.ERROR;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==fe.ERROR&&(o.fatal?(this.state=fe.ERROR,s.logger.warn("streamController: "+o.details+",switch to "+this.state+" state ...")):!o.levelRetry&&this.state===fe.WAITING_LEVEL&&(this.state=fe.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:o.parent==="main"&&(this.state===fe.PARSING||this.state===fe.PARSED)&&(_?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=fe.IDLE):(s.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)));break;default:break}}},f._reduceMaxBufferLength=function(o){var c=this.config;return c.maxMaxBufferLength>=o?(c.maxMaxBufferLength/=2,s.logger.warn("main:reduce max buffer length to "+c.maxMaxBufferLength+"s"),!0):!1},f._checkBuffer=function(){var o=this.media;if(!(!o||o.readyState===0)){var c=this.mediaBuffer?this.mediaBuffer:o,_=c.buffered;!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,_)}},f.onFragLoadEmergencyAborted=function(){this.state=fe.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},f.onBufferFlushed=function(){var o=this.mediaBuffer?this.mediaBuffer:this.media;o&&this.fragmentTracker.detectEvictedFragments(ue.VIDEO,o.buffered),this.state=fe.IDLE,this.fragPrevious=null},f.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},f._seekToStartPos=function(){var o=this.media,c=o.currentTime,_=o.seeking?c:this.startPosition;c!==_&&_>=0&&(s.logger.log("target start position not buffered, seek to buffered.start(0) "+_+" from current time "+c+" "),o.currentTime=_)},f._getAudioCodec=function(o){var c=this.config.defaultAudioCodec||o.audioCodec;return this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5")),c},Jc(D,[{key:"state",set:function(o){if(this.state!==o){var c=this.state;this._state=o,s.logger.log("main stream-controller: "+c+"->"+o),this.hls.trigger(l.default.STREAM_STATE_TRANSITION,{previousState:c,nextState:o})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var o=this.media;if(o){var c=this.getBufferedFrag(o.currentTime);if(c)return c.level}return-1}},{key:"nextBufferedFrag",get:function(){var o=this.media;return o?this.followingBufferedFrag(this.getBufferedFrag(o.currentTime)):null}},{key:"nextLevel",get:function(){var o=this.nextBufferedFrag;return o?o.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(o){this._liveSyncPosition=o}}]),D}(gl),uf=_d;function J_(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function $_(w,D,f){return D&&J_(w.prototype,D),f&&J_(w,f),w}function ji(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var ou=window,$c=ou.performance,z_,pd=function(w){ji(D,w);function D(v){var o;return o=w.call(this,v,l.default.MANIFEST_LOADED,l.default.LEVEL_LOADED,l.default.AUDIO_TRACK_SWITCHED,l.default.FRAG_LOADED,l.default.ERROR)||this,o.canload=!1,o.currentLevelIndex=null,o.manualLevelIndex=-1,o.timer=null,z_=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),o}var f=D.prototype;return f.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},f.clearTimer=function(){this.timer!==null&&(clearTimeout(this.timer),this.timer=null)},f.startLoad=function(){var o=this._levels;this.canload=!0,this.levelRetryCount=0,o&&o.forEach(function(c){c.loadError=0;var _=c.details;_&&_.live&&(c.details=void 0)}),this.timer!==null&&this.loadLevel()},f.stopLoad=function(){this.canload=!1},f.onManifestLoaded=function(o){var c=[],_=[],R,C={},F=null,x=!1,B=!1;if(o.levels.forEach(function(ee){var ye=ee.attrs;ee.loadError=0,ee.fragmentError=!1,x=x||!!ee.videoCodec,B=B||!!ee.audioCodec,z_&&ee.audioCodec&&ee.audioCodec.indexOf("mp4a.40.34")!==-1&&(ee.audioCodec=void 0),F=C[ee.bitrate],F?F.url.push(ee.url):(ee.url=[ee.url],ee.urlId=0,C[ee.bitrate]=ee,c.push(ee)),ye&&(ye.AUDIO&&(B=!0,sn(F||ee,"audio",ye.AUDIO)),ye.SUBTITLES&&sn(F||ee,"text",ye.SUBTITLES))}),x&&B&&(c=c.filter(function(ee){var ye=ee.videoCodec;return!!ye})),c=c.filter(function(ee){var ye=ee.audioCodec,Qe=ee.videoCodec;return(!ye||Ke(ye,"audio"))&&(!Qe||Ke(Qe,"video"))}),o.audioTracks&&(_=o.audioTracks.filter(function(ee){return!ee.audioCodec||Ke(ee.audioCodec,"audio")}),_.forEach(function(ee,ye){ee.id=ye})),c.length>0){R=c[0].bitrate,c.sort(function(ee,ye){return ee.bitrate-ye.bitrate}),this._levels=c;for(var O=0;O<c.length;O++)if(c[O].bitrate===R){this._firstLevel=O,s.logger.log("manifest loaded,"+c.length+" level(s) found, first bitrate:"+R);break}this.hls.trigger(l.default.MANIFEST_PARSED,{levels:c,audioTracks:_,firstLevel:this._firstLevel,stats:o.stats,audio:B,video:x,altAudio:_.some(function(ee){return!!ee.url})})}else this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},f.setLevelInternal=function(o){var c=this._levels,_=this.hls;if(o>=0&&o<c.length){if(this.clearTimer(),this.currentLevelIndex!==o){s.logger.log("switching to level "+o),this.currentLevelIndex=o;var R=c[o];R.level=o,_.trigger(l.default.LEVEL_SWITCHING,R)}var C=c[o],F=C.details;if(!F||F.live){var x=C.urlId;_.trigger(l.default.LEVEL_LOADING,{url:C.url[x],level:o,id:x})}}else _.trigger(l.default.ERROR,{type:u.ErrorTypes.OTHER_ERROR,details:u.ErrorDetails.LEVEL_SWITCH_ERROR,level:o,fatal:!1,reason:"invalid level idx"})},f.onError=function(o){if(o.fatal){o.type===u.ErrorTypes.NETWORK_ERROR&&this.clearTimer();return}var c=!1,_=!1,R;switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:R=o.frag.level,_=!0;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:R=o.context.level,c=!0;break;case u.ErrorDetails.REMUX_ALLOC_ERROR:R=o.level,c=!0;break}R!==void 0&&this.recoverLevel(o,R,c,_)},f.recoverLevel=function(o,c,_,R){var C=this,F=this.hls.config,x=o.details,B=this._levels[c],O,ee,ye;if(B.loadError++,B.fragmentError=R,_)if(this.levelRetryCount+1<=F.levelLoadingMaxRetry)ee=Math.min(Math.pow(2,this.levelRetryCount)*F.levelLoadingRetryDelay,F.levelLoadingMaxRetryTimeout),this.timer=setTimeout(function(){return C.loadLevel()},ee),o.levelRetry=!0,this.levelRetryCount++,s.logger.warn("level controller, "+x+", retry in "+ee+" ms, current retry count is "+this.levelRetryCount);else{s.logger.error("level controller, cannot recover from "+x+" error"),this.currentLevelIndex=null,this.clearTimer(),o.fatal=!0;return}(_||R)&&(O=B.url.length,O>1&&B.loadError<O?(B.urlId=(B.urlId+1)%O,B.details=void 0,s.logger.warn("level controller, "+x+" for level "+c+": switching to redundant URL-id "+B.urlId)):this.manualLevelIndex===-1?(ye=c===0?this._levels.length-1:c-1,s.logger.warn("level controller, "+x+": switch to "+ye),this.hls.nextAutoLevel=this.currentLevelIndex=ye):R&&(s.logger.warn("level controller, "+x+": reload a fragment"),this.currentLevelIndex=null))},f.onFragLoaded=function(o){var c=o.frag;if(c!==void 0&&c.type==="main"){var _=this._levels[c.level];_!==void 0&&(_.fragmentError=!1,_.loadError=0,this.levelRetryCount=0)}},f.onLevelLoaded=function(o){var c=this,_=o.level,R=o.details;if(_===this.currentLevelIndex){var C=this._levels[_];if(C.fragmentError||(C.loadError=0,this.levelRetryCount=0),R.live){var F=Pt(C.details,R,o.stats.trequest);s.logger.log("live playlist, reload in "+Math.round(F)+" ms"),this.timer=setTimeout(function(){return c.loadLevel()},F)}else this.clearTimer()}},f.onAudioTrackSwitched=function(o){var c=this.hls.audioTracks[o.id].groupId,_=this.hls.levels[this.currentLevelIndex];if(!!_&&_.audioGroupIds){for(var R=-1,C=0;C<_.audioGroupIds.length;C++)if(_.audioGroupIds[C]===c){R=C;break}R!==_.urlId&&(_.urlId=R,this.startLoad())}},f.loadLevel=function(){if(s.logger.debug("call to loadLevel"),this.currentLevelIndex!==null&&this.canload){var o=this._levels[this.currentLevelIndex];if(typeof o=="object"&&o.url.length>0){var c=this.currentLevelIndex,_=o.urlId,R=o.url[_];s.logger.log("Attempt loading level index "+c+" with URL-id "+_),this.hls.trigger(l.default.LEVEL_LOADING,{url:R,level:c,id:_})}}},$_(D,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(o){var c=this._levels;c&&(o=Math.min(o,c.length-1),(this.currentLevelIndex!==o||!c[o].details)&&this.setLevelInternal(o))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(o){this.manualLevelIndex=o,this._startLevel===void 0&&(this._startLevel=o),o!==-1&&(this.level=o)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(o){this._firstLevel=o}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var o=this.hls.config.startLevel;return o!==void 0?o:this._firstLevel}else return this._startLevel},set:function(o){this._startLevel=o}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(o){this.level=o,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=o)}}]),D}(y),V_=a("./src/demux/id3.js");function $D(w,D){var f;try{f=new Event("addtrack")}catch{f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=w,D.dispatchEvent(f)}function $s(w){if(w&&w.cues)for(;w.cues.length>0;)w.removeCue(w.cues[0])}function IE(w,D){if(D<w[0].endTime)return w[0];if(D>w[w.length-1].endTime)return w[w.length-1];for(var f=0,v=w.length-1;f<=v;){var o=Math.floor((v+f)/2);if(D<w[o].endTime)v=o-1;else if(D>w[o].endTime)f=o+1;else return w[o]}return w[f].endTime-D<D-w[v].endTime?w[f]:w[v]}function TE(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var zD=function(w){TE(D,w);function D(v){var o;return o=w.call(this,v,l.default.MEDIA_ATTACHED,l.default.MEDIA_DETACHING,l.default.FRAG_PARSING_METADATA,l.default.LIVE_BACK_BUFFER_REACHED)||this,o.id3Track=void 0,o.media=void 0,o}var f=D.prototype;return f.destroy=function(){y.prototype.destroy.call(this)},f.onMediaAttached=function(o){this.media=o.media,!this.media},f.onMediaDetaching=function(){$s(this.id3Track),this.id3Track=void 0,this.media=void 0},f.getID3Track=function(o){for(var c=0;c<o.length;c++){var _=o[c];if(_.kind==="metadata"&&_.label==="id3")return $D(_,this.media),_}return this.media.addTextTrack("metadata","id3")},f.onFragParsingMetadata=function(o){var c=o.frag,_=o.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var R=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,C=0;C<_.length;C++){var F=V_.default.getID3Frames(_[C].data);if(F){var x=_[C].pts,B=C<_.length-1?_[C+1].pts:c.endPTS;x===B?B+=1e-4:x>B&&(s.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),B=x+.25);for(var O=0;O<F.length;O++){var ee=F[O];if(!V_.default.isTimeStampFrame(ee)){var ye=new R(x,B,"");ye.value=ee,this.id3Track.addCue(ye)}}}}},f.onLiveBackBufferReached=function(o){var c=o.bufferEnd,_=this.id3Track;if(!(!_||!_.cues||!_.cues.length)){var R=IE(_.cues,c);if(!!R)for(;_.cues[0]!==R;)_.removeCue(_.cues[0])}},D}(y),SE=zD;function CE(){var w=J();if(!w)return!1;var D=self.SourceBuffer||self.WebKitSourceBuffer,f=w&&typeof w.isTypeSupported=="function"&&w.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),v=!D||D.prototype&&typeof D.prototype.appendBuffer=="function"&&typeof D.prototype.remove=="function";return!!f&&!!v}var dd=function(){function w(f){this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.alpha_=f?Math.exp(Math.log(.5)/f):0,this.estimate_=0,this.totalWeight_=0}var D=w.prototype;return D.sample=function(v,o){var c=Math.pow(this.alpha_,v);this.estimate_=o*(1-c)+c*this.estimate_,this.totalWeight_+=v},D.getTotalWeight=function(){return this.totalWeight_},D.getEstimate=function(){if(this.alpha_){var v=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/v}else return this.estimate_},w}(),VD=dd,FE=function(){function w(f,v,o,c){this.hls=void 0,this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.hls=f,this.defaultEstimate_=c,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new VD(v),this.fast_=new VD(o)}var D=w.prototype;return D.sample=function(v,o){v=Math.max(v,this.minDelayMs_);var c=8*o,_=v/1e3,R=c/_;this.fast_.sample(_,R),this.slow_.sample(_,R)},D.canEstimate=function(){var v=this.fast_;return v&&v.getTotalWeight()>=this.minWeight_},D.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},D.destroy=function(){},w}(),GE=FE;function QD(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function ME(w,D,f){return D&&QD(w.prototype,D),f&&QD(w,f),w}function KD(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function md(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var AE=window,LE=AE.performance,PE=function(w){md(D,w);function D(v){var o;return o=w.call(this,v,l.default.FRAG_LOADING,l.default.FRAG_LOADED,l.default.FRAG_BUFFERED,l.default.ERROR)||this,o.lastLoadedFragLevel=0,o._nextAutoLevel=-1,o.hls=v,o.timer=null,o._bwEstimator=null,o.onCheck=o._abandonRulesCheck.bind(KD(o)),o}var f=D.prototype;return f.destroy=function(){this.clearTimer(),y.prototype.destroy.call(this)},f.onFragLoading=function(o){var c=o.frag;if(c.type==="main"&&(this.timer||(this.fragCurrent=c,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var _=this.hls,R=_.config,C=c.level,F=_.levels[C].details.live,x,B;F?(x=R.abrEwmaFastLive,B=R.abrEwmaSlowLive):(x=R.abrEwmaFastVoD,B=R.abrEwmaSlowVoD),this._bwEstimator=new GE(_,B,x,R.abrEwmaDefaultEstimate)}},f._abandonRulesCheck=function(){var o=this.hls,c=o.media,_=this.fragCurrent;if(!!_){var R=_.loader,C=o.minAutoLevel;if(!R||R.stats&&R.stats.aborted){s.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}var F=R.stats;if(c&&F&&(!c.paused&&c.playbackRate!==0||!c.readyState)&&_.autoLevel&&_.level){var x=LE.now()-F.trequest,B=Math.abs(c.playbackRate);if(x>500*_.duration/B){var O=o.levels,ee=Math.max(1,F.bw?F.bw/8:F.loaded*1e3/x),ye=O[_.level],Qe=ye.realBitrate?Math.max(ye.realBitrate,ye.bitrate):ye.bitrate,fn=F.total?F.total:Math.max(F.loaded,Math.round(_.duration*Qe/8)),fa=c.currentTime,Xn=(fn-F.loaded)/ee,ca=(j.bufferInfo(c,fa,o.config.maxBufferHole).end-fa)/B;if(ca<2*_.duration/B&&Xn>ca){var Ra,ka;for(ka=_.level-1;ka>C;ka--){var Cu=O[ka].realBitrate?Math.max(O[ka].realBitrate,O[ka].bitrate):O[ka].bitrate,ko=_.duration*Cu/(8*.8*ee);if(ko<ca)break}Ra<Xn&&(s.logger.warn("loading too slow, abort fragment loading and switch to level "+ka+":fragLoadedDelay["+ka+"]<fragLoadedDelay["+(_.level-1)+"];bufferStarvationDelay:"+Ra.toFixed(1)+"<"+Xn.toFixed(1)+":"+ca.toFixed(1)),o.nextLoadLevel=ka,this._bwEstimator.sample(x,F.loaded),R.abort(),this.clearTimer(),o.trigger(l.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:_,stats:F}))}}}}},f.onFragLoaded=function(o){var c=o.frag;if(c.type==="main"&&Object(i.isFiniteNumber)(c.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=c.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var _=this.hls.levels[c.level],R=(_.loaded?_.loaded.bytes:0)+o.stats.loaded,C=(_.loaded?_.loaded.duration:0)+o.frag.duration;_.loaded={bytes:R,duration:C},_.realBitrate=Math.round(8*R/C)}if(o.frag.bitrateTest){var F=o.stats;F.tparsed=F.tbuffered=F.tload,this.onFragBuffered(o)}}},f.onFragBuffered=function(o){var c=o.stats,_=o.frag;if(c.aborted!==!0&&_.type==="main"&&Object(i.isFiniteNumber)(_.sn)&&(!_.bitrateTest||c.tload===c.tbuffered)){var R=c.tparsed-c.trequest;s.logger.log("latency/loading/parsing/append/kbps:"+Math.round(c.tfirst-c.trequest)+"/"+Math.round(c.tload-c.tfirst)+"/"+Math.round(c.tparsed-c.tload)+"/"+Math.round(c.tbuffered-c.tparsed)+"/"+Math.round(8*c.loaded/(c.tbuffered-c.trequest))),this._bwEstimator.sample(R,c.loaded),c.bwEstimate=this._bwEstimator.getEstimate(),_.bitrateTest?this.bitrateTestDelay=R/1e3:this.bitrateTestDelay=0}},f.onError=function(o){switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},f.clearTimer=function(){clearInterval(this.timer),this.timer=null},f._findBestLevel=function(o,c,_,R,C,F,x,B,O){for(var ee=C;ee>=R;ee--){var ye=O[ee];if(!!ye){var Qe=ye.details,fn=Qe?Qe.totalduration/Qe.fragments.length:c,fa=Qe?Qe.live:!1,Xn=void 0;ee<=o?Xn=x*_:Xn=B*_;var ca=O[ee].realBitrate?Math.max(O[ee].realBitrate,O[ee].bitrate):O[ee].bitrate,Ra=ca*fn/Xn;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+ee+"/"+Math.round(Xn)+"/"+ca+"/"+fn+"/"+F+"/"+Ra),Xn>ca&&(!Ra||fa&&!this.bitrateTestDelay||Ra<F))return ee}}return-1},ME(D,[{key:"nextAutoLevel",get:function(){var o=this._nextAutoLevel,c=this._bwEstimator;if(o!==-1&&(!c||!c.canEstimate()))return o;var _=this._nextABRAutoLevel;return o!==-1&&(_=Math.min(o,_)),_},set:function(o){this._nextAutoLevel=o}},{key:"_nextABRAutoLevel",get:function(){var o=this.hls,c=o.maxAutoLevel,_=o.levels,R=o.config,C=o.minAutoLevel,F=o.media,x=this.lastLoadedFragLevel,B=this.fragCurrent?this.fragCurrent.duration:0,O=F?F.currentTime:0,ee=F&&F.playbackRate!==0?Math.abs(F.playbackRate):1,ye=this._bwEstimator?this._bwEstimator.getEstimate():R.abrEwmaDefaultEstimate,Qe=(j.bufferInfo(F,O,R.maxBufferHole).end-O)/ee,fn=this._findBestLevel(x,B,ye,C,c,Qe,R.abrBandWidthFactor,R.abrBandWidthUpFactor,_);if(fn>=0)return fn;s.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var fa=B?Math.min(B,R.maxStarvationDelay):R.maxStarvationDelay,Xn=R.abrBandWidthFactor,ca=R.abrBandWidthUpFactor;if(Qe===0){var Ra=this.bitrateTestDelay;if(Ra){var ka=B?Math.min(B,R.maxLoadingDelay):R.maxLoadingDelay;fa=ka-Ra,s.logger.trace("bitrate test took "+Math.round(1e3*Ra)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*fa)+" ms"),Xn=ca=1}}return fn=this._findBestLevel(x,B,ye,C,c,Qe+fa,Xn,ca,_),Math.max(fn,0)}}]),D}(y),xE=PE;function NE(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var YD=J(),jE=function(w){NE(D,w);function D(v){var o;return o=w.call(this,v,l.default.MEDIA_ATTACHING,l.default.MEDIA_DETACHING,l.default.MANIFEST_PARSED,l.default.BUFFER_RESET,l.default.BUFFER_APPENDING,l.default.BUFFER_CODECS,l.default.BUFFER_EOS,l.default.BUFFER_FLUSHING,l.default.LEVEL_PTS_UPDATED,l.default.LEVEL_UPDATED)||this,o._msDuration=null,o._levelDuration=null,o._levelTargetDuration=10,o._live=null,o._objectUrl=null,o._needsFlush=!1,o._needsEos=!1,o.config=void 0,o.audioTimestampOffset=void 0,o.bufferCodecEventsExpected=0,o._bufferCodecEventsTotal=0,o.media=null,o.mediaSource=null,o.segments=[],o.parent=void 0,o.appending=!1,o.appended=0,o.appendError=0,o.flushBufferCounter=0,o.tracks={},o.pendingTracks={},o.sourceBuffer={},o.flushRange=[],o._onMediaSourceOpen=function(){s.logger.log("media source opened"),o.hls.trigger(l.default.MEDIA_ATTACHED,{media:o.media});var c=o.mediaSource;c&&c.removeEventListener("sourceopen",o._onMediaSourceOpen),o.checkPendingTracks()},o._onMediaSourceClose=function(){s.logger.log("media source closed")},o._onMediaSourceEnded=function(){s.logger.log("media source ended")},o._onSBUpdateEnd=function(){if(o.audioTimestampOffset&&o.sourceBuffer.audio){var c=o.sourceBuffer.audio;s.logger.warn("change mpeg audio timestamp offset from "+c.timestampOffset+" to "+o.audioTimestampOffset),c.timestampOffset=o.audioTimestampOffset,delete o.audioTimestampOffset}o._needsFlush&&o.doFlush(),o._needsEos&&o.checkEos(),o.appending=!1;var _=o.parent,R=o.segments.reduce(function(O,ee){return ee.parent===_?O+1:O},0),C={},F=o.sourceBuffer;for(var x in F){var B=F[x];if(!B)throw Error("handling source buffer update end error: source buffer for "+x+" uninitilized and unable to update buffered TimeRanges.");C[x]=B.buffered}o.hls.trigger(l.default.BUFFER_APPENDED,{parent:_,pending:R,timeRanges:C}),o._needsFlush||o.doAppending(),o.updateMediaElementDuration(),R===0&&o.flushLiveBackBuffer()},o._onSBUpdateError=function(c){s.logger.error("sourceBuffer error:",c),o.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},o.config=v.config,o}var f=D.prototype;return f.destroy=function(){y.prototype.destroy.call(this)},f.onLevelPtsUpdated=function(o){var c=o.type,_=this.tracks.audio;if(c==="audio"&&_&&_.container==="audio/mpeg"){var R=this.sourceBuffer.audio;if(!R)throw Error("Level PTS Updated and source buffer for audio uninitalized");var C=Math.abs(R.timestampOffset-o.start);if(C>.1){var F=R.updating;try{R.abort()}catch(x){s.logger.warn("can not abort audio buffer: "+x)}F?this.audioTimestampOffset=o.start:(s.logger.warn("change mpeg audio timestamp offset from "+R.timestampOffset+" to "+o.start),R.timestampOffset=o.start)}}},f.onManifestParsed=function(o){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=o.altAudio?2:1,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(o){var c=this.media=o.media;if(c&&YD){var _=this.mediaSource=new YD;_.addEventListener("sourceopen",this._onMediaSourceOpen),_.addEventListener("sourceended",this._onMediaSourceEnded),_.addEventListener("sourceclose",this._onMediaSourceClose),c.src=window.URL.createObjectURL(_),this._objectUrl=c.src}},f.onMediaDetaching=function(){s.logger.log("media source detaching");var o=this.mediaSource;if(o){if(o.readyState==="open")try{o.endOfStream()}catch(c){s.logger.warn("onMediaDetaching:"+c.message+" while calling endOfStream")}o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):s.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(l.default.MEDIA_DETACHED)},f.checkPendingTracks=function(){var o=this.bufferCodecEventsExpected,c=this.pendingTracks,_=Object.keys(c).length;(_&&!o||_===2)&&(this.createSourceBuffers(c),this.pendingTracks={},this.doAppending())},f.onBufferReset=function(){var o=this.sourceBuffer;for(var c in o){var _=o[c];try{_&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(_),_.removeEventListener("updateend",this._onSBUpdateEnd),_.removeEventListener("error",this._onSBUpdateError))}catch{}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},f.onBufferCodecs=function(o){var c=this;Object.keys(this.sourceBuffer).length||(Object.keys(o).forEach(function(_){c.pendingTracks[_]=o[_]}),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())},f.createSourceBuffers=function(o){var c=this.sourceBuffer,_=this.mediaSource;if(!_)throw Error("createSourceBuffers called when mediaSource was null");for(var R in o)if(!c[R]){var C=o[R];if(!C)throw Error("source buffer exists for track "+R+", however track does not");var F=C.levelCodec||C.codec,x=C.container+";codecs="+F;s.logger.log("creating sourceBuffer("+x+")");try{var B=c[R]=_.addSourceBuffer(x);B.addEventListener("updateend",this._onSBUpdateEnd),B.addEventListener("error",this._onSBUpdateError),this.tracks[R]={buffer:B,codec:F,id:C.id,container:C.container,levelCodec:C.levelCodec}}catch(O){s.logger.error("error while trying to add sourceBuffer:"+O.message),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:O,mimeType:x})}}this.hls.trigger(l.default.BUFFER_CREATED,{tracks:this.tracks})},f.onBufferAppending=function(o){this._needsFlush||(this.segments?this.segments.push(o):this.segments=[o],this.doAppending())},f.onBufferEos=function(o){for(var c in this.sourceBuffer)if(!o.type||o.type===c){var _=this.sourceBuffer[c];_&&!_.ended&&(_.ended=!0,s.logger.log(c+" sourceBuffer now EOS"))}this.checkEos()},f.checkEos=function(){var o=this.sourceBuffer,c=this.mediaSource;if(!c||c.readyState!=="open"){this._needsEos=!1;return}for(var _ in o){var R=o[_];if(!!R){if(!R.ended)return;if(R.updating){this._needsEos=!0;return}}}s.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{c.endOfStream()}catch{s.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1},f.onBufferFlushing=function(o){o.type?this.flushRange.push({start:o.startOffset,end:o.endOffset,type:o.type}):(this.flushRange.push({start:o.startOffset,end:o.endOffset,type:"video"}),this.flushRange.push({start:o.startOffset,end:o.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},f.flushLiveBackBuffer=function(){if(!!this._live){var o=this.config.liveBackBufferLength;if(!(!isFinite(o)||o<0)){if(!this.media){s.logger.error("flushLiveBackBuffer called without attaching media");return}for(var c=this.media.currentTime,_=this.sourceBuffer,R=Object.keys(_),C=c-Math.max(o,this._levelTargetDuration),F=R.length-1;F>=0;F--){var x=R[F],B=_[x];if(B){var O=B.buffered;O.length>0&&C>O.start(0)&&this.removeBufferRange(x,B,0,C)&&this.hls.trigger(l.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:C})}}}}},f.onLevelUpdated=function(o){var c=o.details;c.fragments.length>0&&(this._levelDuration=c.totalduration+c.fragments[0].start,this._levelTargetDuration=c.averagetargetduration||c.targetduration||10,this._live=c.live,this.updateMediaElementDuration())},f.updateMediaElementDuration=function(){var o=this.config,c;if(!(this._levelDuration===null||!this.media||!this.mediaSource||!this.sourceBuffer||this.media.readyState===0||this.mediaSource.readyState!=="open")){for(var _ in this.sourceBuffer){var R=this.sourceBuffer[_];if(R&&R.updating===!0)return}c=this.media.duration,this._msDuration===null&&(this._msDuration=this.mediaSource.duration),this._live===!0&&o.liveDurationInfinity===!0?(s.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>c||!Object(i.isFiniteNumber)(c))&&(s.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},f.doFlush=function(){for(;this.flushRange.length;){var o=this.flushRange[0];if(this.flushBuffer(o.start,o.end,o.type))this.flushRange.shift(),this.flushBufferCounter=0;else{this._needsFlush=!0;return}}if(this.flushRange.length===0){this._needsFlush=!1;var c=0,_=this.sourceBuffer;try{for(var R in _){var C=_[R];C&&(c+=C.buffered.length)}}catch{s.logger.error("error while accessing sourceBuffer.buffered")}this.appended=c,this.hls.trigger(l.default.BUFFER_FLUSHED)}},f.doAppending=function(){var o=this.config,c=this.hls,_=this.segments,R=this.sourceBuffer;if(!!Object.keys(R).length){if(!this.media||this.media.error){this.segments=[],s.logger.error("trying to append although a media error occured, flush segment and abort");return}if(!this.appending){var C=_.shift();if(!!C)try{var F=R[C.type];if(!F){this._onSBUpdateEnd();return}if(F.updating){_.unshift(C);return}F.ended=!1,this.parent=C.parent,F.appendBuffer(C.data),this.appendError=0,this.appended++,this.appending=!0}catch(B){s.logger.error("error while trying to append buffer:"+B.message),_.unshift(C);var x={type:u.ErrorTypes.MEDIA_ERROR,parent:C.parent,details:"",fatal:!1};B.code===22?(this.segments=[],x.details=u.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,x.details=u.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>o.appendErrorMaxRetry&&(s.logger.log("fail "+o.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],x.fatal=!0)),c.trigger(l.default.ERROR,x)}}}},f.flushBuffer=function(o,c,_){var R=this.sourceBuffer;if(!Object.keys(R).length)return!0;var C="null";if(this.media&&(C=this.media.currentTime.toFixed(3)),s.logger.log("flushBuffer,pos/start/end: "+C+"/"+o+"/"+c),this.flushBufferCounter>=this.appended)return s.logger.warn("abort flushing too many retries"),!0;var F=R[_];if(F){if(F.ended=!1,F.updating)return s.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(_,F,o,c))return this.flushBufferCounter++,!1}return s.logger.log("buffer flushed"),!0},f.removeBufferRange=function(o,c,_,R){try{for(var C=0;C<c.buffered.length;C++){var F=c.buffered.start(C),x=c.buffered.end(C),B=Math.max(F,_),O=Math.min(x,R);if(Math.min(O,x)-B>.5){var ee="null";return this.media&&(ee=this.media.currentTime.toString()),s.logger.log("sb remove "+o+" ["+B+","+O+"], of ["+F+","+x+"], pos:"+ee),c.remove(B,O),!0}}}catch(ye){s.logger.warn("removeBufferRange failed",ye)}return!1},D}(y),UE=jE;function XD(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function OE(w,D,f){return D&&XD(w.prototype,D),f&&XD(w,f),w}function Ui(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var kE=function(w){Ui(D,w);function D(v){var o;return o=w.call(this,v,l.default.FPS_DROP_LEVEL_CAPPING,l.default.MEDIA_ATTACHING,l.default.MANIFEST_PARSED,l.default.BUFFER_CODECS,l.default.MEDIA_DETACHING)||this,o.autoLevelCapping=Number.POSITIVE_INFINITY,o.firstLevel=null,o.levels=[],o.media=null,o.restrictedLevels=[],o.timer=null,o}var f=D.prototype;return f.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this.stopCapping())},f.onFpsDropLevelCapping=function(o){D.isLevelAllowed(o.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(o.droppedLevel)},f.onMediaAttaching=function(o){this.media=o.media instanceof window.HTMLVideoElement?o.media:null},f.onManifestParsed=function(o){var c=this.hls;this.restrictedLevels=[],this.levels=o.levels,this.firstLevel=o.firstLevel,c.config.capLevelToPlayerSize&&o.video&&this.startCapping()},f.onBufferCodecs=function(o){var c=this.hls;c.config.capLevelToPlayerSize&&o.video&&this.startCapping()},f.onLevelsUpdated=function(o){this.levels=o.levels},f.onMediaDetaching=function(){this.stopCapping()},f.detectPlayerSize=function(){if(this.media){var o=this.levels?this.levels.length:0;if(o){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(o-1),c.autoLevelCapping>this.autoLevelCapping&&c.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},f.getMaxLevel=function(o){var c=this;if(!this.levels)return-1;var _=this.levels.filter(function(R,C){return D.isLevelAllowed(C,c.restrictedLevels)&&C<=o});return D.getMaxLevelByMediaSize(_,this.mediaWidth,this.mediaHeight)},f.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},f.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},D.isLevelAllowed=function(o,c){return c===void 0&&(c=[]),c.indexOf(o)===-1},D.getMaxLevelByMediaSize=function(o,c,_){if(!o||o&&!o.length)return-1;for(var R=function(O,ee){return ee?O.width!==ee.width||O.height!==ee.height:!0},C=o.length-1,F=0;F<o.length;F+=1){var x=o[F];if((x.width>=c||x.height>=_)&&R(x,o[F+1])){C=F;break}}return C},OE(D,[{key:"mediaWidth",get:function(){var o,c=this.media;return c&&(o=c.width||c.clientWidth||c.offsetWidth,o*=D.contentScaleFactor),o}},{key:"mediaHeight",get:function(){var o,c=this.media;return c&&(o=c.height||c.clientHeight||c.offsetHeight,o*=D.contentScaleFactor),o}}],[{key:"contentScaleFactor",get:function(){var o=1;try{o=window.devicePixelRatio}catch{}return o}}]),D}(y),ZD=kE;function BE(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var zc=window,HE=zc.performance,hd=function(w){BE(D,w);function D(v){return w.call(this,v,l.default.MEDIA_ATTACHING)||this}var f=D.prototype;return f.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},f.onMediaAttaching=function(o){var c=this.hls.config;if(c.capLevelOnFPSDrop){var _=this.video=o.media instanceof window.HTMLVideoElement?o.media:null;typeof _.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},f.checkFPS=function(o,c,_){var R=HE.now();if(c){if(this.lastTime){var C=R-this.lastTime,F=_-this.lastDroppedFrames,x=c-this.lastDecodedFrames,B=1e3*F/C,O=this.hls;if(O.trigger(l.default.FPS_DROP,{currentDropped:F,currentDecoded:x,totalDroppedFrames:_}),B>0&&F>O.config.fpsDroppedMonitoringThreshold*x){var ee=O.currentLevel;s.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+ee),ee>0&&(O.autoLevelCapping===-1||O.autoLevelCapping>=ee)&&(ee=ee-1,O.trigger(l.default.FPS_DROP_LEVEL_CAPPING,{level:ee,droppedLevel:O.currentLevel}),O.autoLevelCapping=ee,O.streamController.nextLevelSwitch())}}this.lastTime=R,this.lastDroppedFrames=_,this.lastDecodedFrames=c}},f.checkFPSInterval=function(){var o=this.video;if(o)if(this.isVideoPlaybackQualityAvailable){var c=o.getVideoPlaybackQuality();this.checkFPS(o,c.totalVideoFrames,c.droppedVideoFrames)}else this.checkFPS(o,o.webkitDecodedFrameCount,o.webkitDroppedFrameCount)},D}(y),qE=hd,eg=window,Dd=eg.performance,WE=eg.XMLHttpRequest,JE=function(){function w(f){f&&f.xhrSetup&&(this.xhrSetup=f.xhrSetup)}var D=w.prototype;return D.destroy=function(){this.abort(),this.loader=null},D.abort=function(){var v=this.loader;v&&v.readyState!==4&&(this.stats.aborted=!0,v.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},D.load=function(v,o,c){this.context=v,this.config=o,this.callbacks=c,this.stats={trequest:Dd.now(),retry:0},this.retryDelay=o.retryDelay,this.loadInternal()},D.loadInternal=function(){var v,o=this.context;v=this.loader=new WE;var c=this.stats;c.tfirst=0,c.loaded=0;var _=this.xhrSetup;try{if(_)try{_(v,o.url)}catch{v.open("GET",o.url,!0),_(v,o.url)}v.readyState||v.open("GET",o.url,!0)}catch(R){this.callbacks.onError({code:v.status,text:R.message},o,v);return}o.rangeEnd&&v.setRequestHeader("Range","bytes="+o.rangeStart+"-"+(o.rangeEnd-1)),v.onreadystatechange=this.readystatechange.bind(this),v.onprogress=this.loadprogress.bind(this),v.responseType=o.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),v.send()},D.readystatechange=function(v){var o=v.currentTarget,c=o.readyState,_=this.stats,R=this.context,C=this.config;if(!_.aborted&&c>=2)if(window.clearTimeout(this.requestTimeout),_.tfirst===0&&(_.tfirst=Math.max(Dd.now(),_.trequest)),c===4){var F=o.status;if(F>=200&&F<300){_.tload=Math.max(_.tfirst,Dd.now());var x,B;R.responseType==="arraybuffer"?(x=o.response,B=x.byteLength):(x=o.responseText,B=x.length),_.loaded=_.total=B;var O={url:o.responseURL,data:x};this.callbacks.onSuccess(O,_,R,o)}else _.retry>=C.maxRetry||F>=400&&F<499?(s.logger.error(F+" while loading "+R.url),this.callbacks.onError({code:F,text:o.statusText},R,o)):(s.logger.warn(F+" while loading "+R.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,C.maxRetryDelay),_.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),C.timeout)},D.loadtimeout=function(){s.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},D.loadprogress=function(v){var o=v.currentTarget,c=this.stats;c.loaded=v.loaded,v.lengthComputable&&(c.total=v.total);var _=this.callbacks.onProgress;_&&_(c,this.context,null,o)},w}(),gd=JE;function ng(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function $E(w,D,f){return D&&ng(w.prototype,D),f&&ng(w,f),w}function ag(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var zE=function(w){ag(D,w);function D(v){var o;return o=w.call(this,v,l.default.MANIFEST_LOADING,l.default.MANIFEST_PARSED,l.default.AUDIO_TRACK_LOADED,l.default.AUDIO_TRACK_SWITCHED,l.default.LEVEL_LOADED,l.default.ERROR)||this,o._trackId=-1,o._selectDefaultTrack=!0,o.tracks=[],o.trackIdBlacklist=Object.create(null),o.audioGroupId=null,o}var f=D.prototype;return f.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},f.onManifestParsed=function(o){var c=this.tracks=o.audioTracks||[];this.hls.trigger(l.default.AUDIO_TRACKS_UPDATED,{audioTracks:c}),this._selectAudioGroup(this.hls.nextLoadLevel)},f.onAudioTrackLoaded=function(o){if(o.id>=this.tracks.length){s.logger.warn("Invalid audio track id:",o.id);return}if(s.logger.log("audioTrack "+o.id+" loaded"),this.tracks[o.id].details=o.details,o.details.live&&!this.hasInterval()){var c=o.details.targetduration*1e3;this.setInterval(c)}!o.details.live&&this.hasInterval()&&this.clearInterval()},f.onAudioTrackSwitched=function(o){var c=this.tracks[o.id].groupId;c&&this.audioGroupId!==c&&(this.audioGroupId=c)},f.onLevelLoaded=function(o){this._selectAudioGroup(o.level)},f.onError=function(o){o.type===u.ErrorTypes.NETWORK_ERROR&&(o.fatal&&this.clearInterval(),o.details===u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(s.logger.warn("Network failure on audio-track id:",o.context.id),this._handleLoadError()))},f._setAudioTrack=function(o){if(this._trackId===o&&this.tracks[this._trackId].details){s.logger.debug("Same id as current audio-track passed, and track details available -> no-op");return}if(o<0||o>=this.tracks.length){s.logger.warn("Invalid id passed to audio-track controller");return}var c=this.tracks[o];s.logger.log("Now switching to audio-track index "+o),this.clearInterval(),this._trackId=o;var _=c.url,R=c.type,C=c.id;this.hls.trigger(l.default.AUDIO_TRACK_SWITCHING,{id:C,type:R,url:_}),this._loadTrackDetailsIfNeeded(c)},f.doTick=function(){this._updateTrack(this._trackId)},f._selectAudioGroup=function(o){var c=this.hls.levels[o];if(!(!c||!c.audioGroupIds)){var _=c.audioGroupIds[c.urlId];this.audioGroupId!==_&&(this.audioGroupId=_,this._selectInitialAudioTrack())}},f._selectInitialAudioTrack=function(){var o=this,c=this.tracks;if(!!c.length){var _=this.tracks[this._trackId],R=null;if(_&&(R=_.name),this._selectDefaultTrack){var C=c.filter(function(B){return B.default});C.length?c=C:s.logger.warn("No default audio tracks defined")}var F=!1,x=function(){c.forEach(function(O){F||(!o.audioGroupId||O.groupId===o.audioGroupId)&&(!R||R===O.name)&&(o._setAudioTrack(O.id),F=!0)})};x(),F||(R=null,x()),F||(s.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},f._needsTrackLoading=function(o){var c=o.details,_=o.url;return!c||c.live?!!_:!1},f._loadTrackDetailsIfNeeded=function(o){if(this._needsTrackLoading(o)){var c=o.url,_=o.id;s.logger.log("loading audio-track playlist for id: "+_),this.hls.trigger(l.default.AUDIO_TRACK_LOADING,{url:c,id:_})}},f._updateTrack=function(o){if(!(o<0||o>=this.tracks.length)){this.clearInterval(),this._trackId=o,s.logger.log("trying to update audio-track "+o);var c=this.tracks[o];this._loadTrackDetailsIfNeeded(c)}},f._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var o=this._trackId,c=this.tracks[o],_=c.name,R=c.language,C=c.groupId;s.logger.warn("Loading failed on audio track id: "+o+", group-id: "+C+', name/language: "'+_+'" / "'+R+'"');for(var F=o,x=0;x<this.tracks.length;x++)if(!this.trackIdBlacklist[x]){var B=this.tracks[x];if(B.name===_){F=x;break}}if(F===o){s.logger.warn('No fallback audio-track found for name/language: "'+_+'" / "'+R+'"');return}s.logger.log("Attempting audio-track fallback id:",F,"group-id:",this.tracks[F].groupId),this._setAudioTrack(F)},$E(D,[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this._trackId},set:function(o){this._setAudioTrack(o),this._selectDefaultTrack=!1}}]),D}(Kl),Q_=zE;function tg(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function lf(w,D,f){return D&&tg(w.prototype,D),f&&tg(w,f),w}function VE(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var QE=window,bl=QE.performance,rg=100,KE=function(w){VE(D,w);function D(v,o){var c;return c=w.call(this,v,l.default.MEDIA_ATTACHED,l.default.MEDIA_DETACHING,l.default.AUDIO_TRACKS_UPDATED,l.default.AUDIO_TRACK_SWITCHING,l.default.AUDIO_TRACK_LOADED,l.default.KEY_LOADED,l.default.FRAG_LOADED,l.default.FRAG_PARSING_INIT_SEGMENT,l.default.FRAG_PARSING_DATA,l.default.FRAG_PARSED,l.default.ERROR,l.default.BUFFER_RESET,l.default.BUFFER_CREATED,l.default.BUFFER_APPENDED,l.default.BUFFER_FLUSHED,l.default.INIT_PTS_FOUND)||this,c.fragmentTracker=o,c.config=v.config,c.audioCodecSwap=!1,c._state=fe.STOPPED,c.initPTS=[],c.waitingFragment=null,c.videoTrackCC=null,c}var f=D.prototype;return f.onInitPtsFound=function(o){var c=o.id,_=o.frag.cc,R=o.initPTS;c==="main"&&(this.initPTS[_]=R,this.videoTrackCC=_,s.logger.log("InitPTS for cc: "+_+" found from video track: "+R),this.state===fe.WAITING_INIT_PTS&&this.tick())},f.startLoad=function(o){if(this.tracks){var c=this.lastCurrentTime;this.stopLoad(),this.setInterval(rg),this.fragLoadError=0,c>0&&o===-1?(s.logger.log("audio:override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=fe.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:o,this.state=fe.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=o,this.state=fe.STOPPED},f.doTick=function(){var o,c,_,R=this.hls,C=R.config;switch(this.state){case fe.ERROR:case fe.PAUSED:case fe.BUFFER_FLUSHING:break;case fe.STARTING:this.state=fe.WAITING_TRACK,this.loadedmetadata=!1;break;case fe.IDLE:var F=this.tracks;if(!F||!this.media&&(this.startFragRequested||!C.startFragPrefetch))break;if(this.loadedmetadata)o=this.media.currentTime;else if(o=this.nextLoadPosition,o===void 0)break;var x=this.mediaBuffer?this.mediaBuffer:this.media,B=this.videoBuffer?this.videoBuffer:this.media,O=j.bufferInfo(x,o,C.maxBufferHole),ee=j.bufferInfo(B,o,C.maxBufferHole),ye=O.len,Qe=O.end,fn=this.fragPrevious,fa=Math.min(C.maxBufferLength,C.maxMaxBufferLength),Xn=Math.max(fa,ee.len),ca=this.audioSwitch,Ra=this.trackId;if((ye<Xn||ca)&&Ra<F.length){if(_=F[Ra].details,typeof _=="undefined"){this.state=fe.WAITING_TRACK;break}if(!ca&&this._streamEnded(O,_)){this.hls.trigger(l.default.BUFFER_EOS,{type:"audio"}),this.state=fe.ENDED;return}var ka=_.fragments,Cu=ka.length,ko=ka[0].start,ki=ka[Cu-1].start+ka[Cu-1].duration,vt;if(ca){if(_.live&&!_.PTSKnown)s.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),Qe=0;else if(Qe=o,_.PTSKnown&&o<ko)if(O.end>ko||O.nextStart)s.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=ko+.05;else return}if(_.initSegment&&!_.initSegment.data)vt=_.initSegment;else if(Qe<=ko){if(vt=ka[0],this.videoTrackCC!==null&&vt.cc!==this.videoTrackCC&&(vt=Ot(ka,this.videoTrackCC)),_.live&&vt.loadIdx&&vt.loadIdx===this.fragLoadIdx){var ht=O.nextStart?O.nextStart:ko;s.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(ht+.05)),this.media.currentTime=ht+.05;return}}else{var ja,To=C.maxFragLookUpTolerance,Z_=fn?ka[fn.sn-ka[0].sn+1]:void 0,e0=function(Sd){var WL=Math.min(To,Sd.duration);return Sd.start+Sd.duration-WL<=Qe?1:Sd.start-WL>Qe&&Sd.start?-1:0};Qe<ki?(Qe>ki-To&&(To=0),Z_&&!e0(Z_)?ja=Z_:ja=K.search(ka,e0)):ja=ka[Cu-1],ja&&(vt=ja,ko=ja.start,fn&&vt.level===fn.level&&vt.sn===fn.sn&&(vt.sn<_.endSN?(vt=ka[vt.sn+1-_.startSN],s.logger.log("SN just loaded, load next one: "+vt.sn)):vt=null))}vt&&(vt.encrypted?(s.logger.log("Loading key for "+vt.sn+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra),this.state=fe.KEY_LOADING,R.trigger(l.default.KEY_LOADING,{frag:vt})):(s.logger.log("Loading "+vt.sn+", cc: "+vt.cc+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra+", currentTime:"+o+",bufferEnd:"+Qe.toFixed(3)),this.fragCurrent=vt,(ca||this.fragmentTracker.getState(vt)===Da.NOT_LOADED)&&(vt.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(vt.sn)&&(this.nextLoadPosition=vt.start+vt.duration),R.trigger(l.default.FRAG_LOADING,{frag:vt}),this.state=fe.FRAG_LOADING)))}break;case fe.WAITING_TRACK:c=this.tracks[this.trackId],c&&c.details&&(this.state=fe.IDLE);break;case fe.FRAG_LOADING_WAITING_RETRY:var II=bl.now(),BL=this.retryDate;x=this.media;var JY=x&&x.seeking;(!BL||II>=BL||JY)&&(s.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=fe.IDLE);break;case fe.WAITING_INIT_PTS:var TI=this.videoTrackCC;if(this.initPTS[TI]===void 0)break;var HL=this.waitingFragment;if(HL){var qL=HL.frag.cc;TI!==qL?(c=this.tracks[this.trackId],c.details&&c.details.live&&(s.logger.warn("Waiting fragment CC ("+qL+") does not match video track CC ("+TI+")"),this.waitingFragment=null,this.state=fe.IDLE)):(this.state=fe.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=fe.IDLE;break;case fe.STOPPED:case fe.FRAG_LOADING:case fe.PARSING:case fe.PARSED:case fe.ENDED:break;default:break}},f.onMediaAttached=function(o){var c=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),c.addEventListener("seeking",this.onvseeking),c.addEventListener("ended",this.onvended);var _=this.config;this.tracks&&_.autoStartLoad&&this.startLoad(_.startPosition)},f.onMediaDetaching=function(){var o=this.media;o&&o.ended&&(s.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),o&&(o.removeEventListener("seeking",this.onvseeking),o.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},f.onAudioTracksUpdated=function(o){s.logger.log("audio tracks updated"),this.tracks=o.audioTracks},f.onAudioTrackSwitching=function(o){var c=!!o.url;this.trackId=o.id,this.fragCurrent=null,this.state=fe.PAUSED,this.waitingFragment=null,c?this.setInterval(rg):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),c&&(this.audioSwitch=!0,this.state=fe.IDLE),this.tick()},f.onAudioTrackLoaded=function(o){var c=o.details,_=o.id,R=this.tracks[_],C=c.totalduration,F=0;if(s.logger.log("track "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+C),c.live){var x=R.details;x&&c.fragments.length>0?(bn(x,c),F=c.fragments[0].start,c.PTSKnown?s.logger.log("live audio playlist sliding:"+F.toFixed(3)):s.logger.log("live audio playlist - outdated PTS, unknown sliding")):(c.PTSKnown=!1,s.logger.log("live audio playlist - first load, unknown sliding"))}else c.PTSKnown=!1;if(R.details=c,!this.startFragRequested){if(this.startPosition===-1){var B=c.startTimeOffset;Object(i.isFiniteNumber)(B)?(s.logger.log("start time offset found in playlist, adjust startPosition to "+B),this.startPosition=B):c.live?(this.startPosition=this.computeLivePosition(F,c),s.logger.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===fe.WAITING_TRACK&&(this.state=fe.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===fe.KEY_LOADING&&(this.state=fe.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag;if(this.state===fe.FRAG_LOADING&&c&&_.type==="audio"&&_.level===c.level&&_.sn===c.sn){var R=this.tracks[this.trackId],C=R.details,F=C.totalduration,x=c.level,B=c.sn,O=c.cc,ee=this.config.defaultAudioCodec||R.audioCodec||"mp4a.40.2",ye=this.stats=o.stats;if(B==="initSegment")this.state=fe.IDLE,ye.tparsed=ye.tbuffered=bl.now(),C.initSegment.data=o.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:ye,frag:c,id:"audio"}),this.tick();else{this.state=fe.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new Le(this.hls,"audio"));var Qe=this.initPTS[O],fn=C.initSegment?C.initSegment.data:[];if(C.initSegment||Qe!==void 0){this.pendingBuffering=!0,s.logger.log("Demuxing "+B+" of ["+C.startSN+" ,"+C.endSN+"],track "+x);var fa=!1;this.demuxer.push(o.payload,fn,ee,null,c,F,fa,Qe)}else s.logger.log("unknown video PTS for continuity counter "+O+", waiting for video PTS before demuxing audio frag "+B+" of ["+C.startSN+" ,"+C.endSN+"],track "+x),this.waitingFragment=o,this.state=fe.WAITING_INIT_PTS}}this.fragLoadError=0},f.onFragParsingInitSegment=function(o){var c=this.fragCurrent,_=o.frag;if(c&&o.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===fe.PARSING){var R=o.tracks,C;if(R.video&&delete R.video,C=R.audio,C){C.levelCodec=C.codec,C.id=o.id,this.hls.trigger(l.default.BUFFER_CODECS,R),s.logger.log("audio track:audio,container:"+C.container+",codecs[level/parsed]=["+C.levelCodec+"/"+C.codec+"]");var F=C.initSegment;if(F){var x={type:"audio",data:F,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[x]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,x))}this.tick()}}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,R=o.frag;if(_&&o.id==="audio"&&o.type==="audio"&&R.sn===_.sn&&R.level===_.level&&this.state===fe.PARSING){var C=this.trackId,F=this.tracks[C],x=this.hls;Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),_.addElementaryStream(ue.AUDIO),s.logger.log("parsed "+o.type+",PTS:["+o.startPTS.toFixed(3)+","+o.endPTS.toFixed(3)+"],DTS:["+o.startDTS.toFixed(3)+"/"+o.endDTS.toFixed(3)+"],nb:"+o.nb),Ue(F.details,_,o.startPTS,o.endPTS);var B=this.audioSwitch,O=this.media,ee=!1;if(B)if(O&&O.readyState){var ye=O.currentTime;s.logger.log("switching audio track : currentTime:"+ye),ye>=o.startPTS&&(s.logger.log("switching audio track : flushing all audio"),this.state=fe.BUFFER_FLUSHING,x.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),ee=!0,this.audioSwitch=!1,x.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C}))}else this.audioSwitch=!1,x.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C});var Qe=this.pendingData;if(!Qe){s.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),x.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});return}this.audioSwitch||([o.data1,o.data2].forEach(function(fn){fn&&fn.length&&Qe.push({type:o.type,data:fn,parent:"audio",content:"data"})}),!ee&&Qe.length&&(Qe.forEach(function(fn){c.state===fe.PARSING&&(c.pendingBuffering=!0,c.hls.trigger(l.default.BUFFER_APPENDING,fn))}),this.pendingData=[],this.appended=!0)),this.tick()}},f.onFragParsed=function(o){var c=this.fragCurrent,_=o.frag;c&&o.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===fe.PARSING&&(this.stats.tparsed=bl.now(),this.state=fe.PARSED,this._checkAppendedParsed())},f.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},f.onBufferCreated=function(o){var c=o.tracks.audio;c&&(this.mediaBuffer=c.buffer,this.loadedmetadata=!0),o.tracks.video&&(this.videoBuffer=o.tracks.video.buffer)},f.onBufferAppended=function(o){if(o.parent==="audio"){var c=this.state;(c===fe.PARSING||c===fe.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===fe.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent,c=this.stats,_=this.hls;if(o){this.fragPrevious=o,c.tbuffered=bl.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:c,frag:o,id:"audio"});var R=this.mediaBuffer?this.mediaBuffer:this.media;R&&s.logger.log("audio buffered : "+mt.toString(R.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,_.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=fe.IDLE}this.tick()}},f.onError=function(o){var c=o.frag;if(!(c&&c.type!=="audio"))switch(o.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:var _=o.frag;if(_&&_.type!=="audio")break;if(!o.fatal){var R=this.fragLoadError;R?R++:R=1;var C=this.config;if(R<=C.fragLoadingMaxRetry){this.fragLoadError=R;var F=Math.min(Math.pow(2,R-1)*C.fragLoadingRetryDelay,C.fragLoadingMaxRetryTimeout);s.logger.warn("AudioStreamController: frag loading failed, retry in "+F+" ms"),this.retryDate=bl.now()+F,this.state=fe.FRAG_LOADING_WAITING_RETRY}else s.logger.error("AudioStreamController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=fe.ERROR}break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==fe.ERROR&&(this.state=o.fatal?fe.ERROR:fe.IDLE,s.logger.warn("AudioStreamController: "+o.details+" while loading frag, now switching to "+this.state+" state ..."));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="audio"&&(this.state===fe.PARSING||this.state===fe.PARSED)){var x=this.mediaBuffer,B=this.media.currentTime,O=x&&j.isBuffered(x,B)&&j.isBuffered(x,B+.5);if(O){var ee=this.config;ee.maxMaxBufferLength>=ee.maxBufferLength&&(ee.maxMaxBufferLength/=2,s.logger.warn("AudioStreamController: reduce max buffer length to "+ee.maxMaxBufferLength+"s")),this.state=fe.IDLE}else s.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=fe.BUFFER_FLUSHING,this.hls.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}break;default:break}},f.onBufferFlushed=function(){var o=this,c=this.pendingData;c&&c.length?(s.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),c.forEach(function(_){o.hls.trigger(l.default.BUFFER_APPENDING,_)}),this.appended=!0,this.pendingData=[],this.state=fe.PARSED):(this.state=fe.IDLE,this.fragPrevious=null,this.tick())},lf(D,[{key:"state",set:function(o){if(this.state!==o){var c=this.state;this._state=o,s.logger.log("audio stream:"+c+"->"+o)}},get:function(){return this._state}}]),D}(gl),YE=KE,og=function(){if(typeof window!="undefined"&&window.VTTCue)return window.VTTCue;var w="auto",D={"":!0,lr:!0,rl:!0},f={start:!0,middle:!0,end:!0,left:!0,right:!0};function v(R){if(typeof R!="string")return!1;var C=D[R.toLowerCase()];return C?R.toLowerCase():!1}function o(R){if(typeof R!="string")return!1;var C=f[R.toLowerCase()];return C?R.toLowerCase():!1}function c(R){for(var C=1;C<arguments.length;C++){var F=arguments[C];for(var x in F)R[x]=F[x]}return R}function _(R,C,F){var x=this,B={};B.enumerable=!0,x.hasBeenReset=!1;var O="",ee=!1,ye=R,Qe=C,fn=F,fa=null,Xn="",ca=!0,Ra="auto",ka="start",Cu=50,ko="middle",ki=50,vt="middle";Object.defineProperty(x,"id",c({},B,{get:function(){return O},set:function(ja){O=""+ja}})),Object.defineProperty(x,"pauseOnExit",c({},B,{get:function(){return ee},set:function(ja){ee=!!ja}})),Object.defineProperty(x,"startTime",c({},B,{get:function(){return ye},set:function(ja){if(typeof ja!="number")throw new TypeError("Start time must be set to a number.");ye=ja,this.hasBeenReset=!0}})),Object.defineProperty(x,"endTime",c({},B,{get:function(){return Qe},set:function(ja){if(typeof ja!="number")throw new TypeError("End time must be set to a number.");Qe=ja,this.hasBeenReset=!0}})),Object.defineProperty(x,"text",c({},B,{get:function(){return fn},set:function(ja){fn=""+ja,this.hasBeenReset=!0}})),Object.defineProperty(x,"region",c({},B,{get:function(){return fa},set:function(ja){fa=ja,this.hasBeenReset=!0}})),Object.defineProperty(x,"vertical",c({},B,{get:function(){return Xn},set:function(ja){var To=v(ja);if(To===!1)throw new SyntaxError("An invalid or illegal string was specified.");Xn=To,this.hasBeenReset=!0}})),Object.defineProperty(x,"snapToLines",c({},B,{get:function(){return ca},set:function(ja){ca=!!ja,this.hasBeenReset=!0}})),Object.defineProperty(x,"line",c({},B,{get:function(){return Ra},set:function(ja){if(typeof ja!="number"&&ja!==w)throw new SyntaxError("An invalid number or illegal string was specified.");Ra=ja,this.hasBeenReset=!0}})),Object.defineProperty(x,"lineAlign",c({},B,{get:function(){return ka},set:function(ja){var To=o(ja);if(!To)throw new SyntaxError("An invalid or illegal string was specified.");ka=To,this.hasBeenReset=!0}})),Object.defineProperty(x,"position",c({},B,{get:function(){return Cu},set:function(ja){if(ja<0||ja>100)throw new Error("Position must be between 0 and 100.");Cu=ja,this.hasBeenReset=!0}})),Object.defineProperty(x,"positionAlign",c({},B,{get:function(){return ko},set:function(ja){var To=o(ja);if(!To)throw new SyntaxError("An invalid or illegal string was specified.");ko=To,this.hasBeenReset=!0}})),Object.defineProperty(x,"size",c({},B,{get:function(){return ki},set:function(ja){if(ja<0||ja>100)throw new Error("Size must be between 0 and 100.");ki=ja,this.hasBeenReset=!0}})),Object.defineProperty(x,"align",c({},B,{get:function(){return vt},set:function(ja){var To=o(ja);if(!To)throw new SyntaxError("An invalid or illegal string was specified.");vt=To,this.hasBeenReset=!0}})),x.displayState=void 0}return _.prototype.getCueAsHTML=function(){var R=window.WebVTT;return R.convertCueToDOMTree(window,this.text)},_}(),XE=function(){return{decode:function(f){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))}}};function ug(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new XE,this.regionList=[]}function ZE(w){function D(v,o,c,_){return(v|0)*3600+(o|0)*60+(c|0)+(_|0)/1e3}var f=w.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return f?f[3]?D(f[1],f[2],f[3].replace(":",""),f[4]):f[1]>59?D(f[1],f[2],0,f[4]):D(0,f[1],f[2],f[4]):null}function ig(){this.values=Object.create(null)}ig.prototype={set:function(D,f){!this.get(D)&&f!==""&&(this.values[D]=f)},get:function(D,f,v){return v?this.has(D)?this.values[D]:f[v]:this.has(D)?this.values[D]:f},has:function(D){return D in this.values},alt:function(D,f,v){for(var o=0;o<v.length;++o)if(f===v[o]){this.set(D,f);break}},integer:function(D,f){/^-?\d+$/.test(f)&&this.set(D,parseInt(f,10))},percent:function(D,f){var v;return(v=f.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(f=parseFloat(f),f>=0&&f<=100)?(this.set(D,f),!0):!1}};function lg(w,D,f,v){var o=v?w.split(v):[w];for(var c in o)if(typeof o[c]=="string"){var _=o[c].split(f);if(_.length===2){var R=_[0],C=_[1];D(R,C)}}}var cf=new og(0,0,0),Oi=cf.align==="middle"?"middle":"center";function eI(w,D,f){var v=w;function o(){var R=ZE(w);if(R===null)throw new Error("Malformed timestamp: "+v);return w=w.replace(/^[^\sa-zA-Z-]+/,""),R}function c(R,C){var F=new ig;lg(R,function(O,ee){switch(O){case"region":for(var ye=f.length-1;ye>=0;ye--)if(f[ye].id===ee){F.set(O,f[ye].region);break}break;case"vertical":F.alt(O,ee,["rl","lr"]);break;case"line":var Qe=ee.split(","),fn=Qe[0];F.integer(O,fn),F.percent(O,fn)&&F.set("snapToLines",!1),F.alt(O,fn,["auto"]),Qe.length===2&&F.alt("lineAlign",Qe[1],["start",Oi,"end"]);break;case"position":Qe=ee.split(","),F.percent(O,Qe[0]),Qe.length===2&&F.alt("positionAlign",Qe[1],["start",Oi,"end","line-left","line-right","auto"]);break;case"size":F.percent(O,ee);break;case"align":F.alt(O,ee,["start",Oi,"end","left","right"]);break}},/:/,/\s/),C.region=F.get("region",null),C.vertical=F.get("vertical","");var x=F.get("line","auto");x==="auto"&&cf.line===-1&&(x=-1),C.line=x,C.lineAlign=F.get("lineAlign","start"),C.snapToLines=F.get("snapToLines",!0),C.size=F.get("size",100),C.align=F.get("align",Oi);var B=F.get("position","auto");B==="auto"&&cf.position===50&&(B=C.align==="start"||C.align==="left"?0:C.align==="end"||C.align==="right"?100:50),C.position=B}function _(){w=w.replace(/^\s+/,"")}if(_(),D.startTime=o(),_(),w.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+v);w=w.substr(3),_(),D.endTime=o(),_(),c(w,D)}function cg(w){return w.replace(/<br(?: \/)?>/gi,` `)}ug.prototype={parse:function(D){var f=this;D&&(f.buffer+=f.decoder.decode(D,{stream:!0}));function v(){var F=f.buffer,x=0;for(F=cg(F);x<F.length&&F[x]!=="\r"&&F[x]!==` `;)++x;var B=F.substr(0,x);return F[x]==="\r"&&++x,F[x]===` `&&++x,f.buffer=F.substr(x),B}function o(F){lg(F,function(x,B){switch(x){case"Region":break}},/:/)}try{var c;if(f.state==="INITIAL"){if(!/\r\n|\n/.test(f.buffer))return this;c=v();var _=c.match(/^()?WEBVTT([ \t].*)?$/);if(!_||!_[0])throw new Error("Malformed WebVTT signature.");f.state="HEADER"}for(var R=!1;f.buffer;){if(!/\r\n|\n/.test(f.buffer))return this;switch(R?R=!1:c=v(),f.state){case"HEADER":/:/.test(c)?o(c):c||(f.state="ID");continue;case"NOTE":c||(f.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(c)){f.state="NOTE";break}if(!c)continue;if(f.cue=new og(0,0,""),f.state="CUE",c.indexOf("-->")===-1){f.cue.id=c;continue}case"CUE":try{eI(c,f.cue,f.regionList)}catch{f.cue=null,f.state="BADCUE";continue}f.state="CUETEXT";continue;case"CUETEXT":var C=c.indexOf("-->")!==-1;if(!c||C&&(R=!0)){f.oncue&&f.oncue(f.cue),f.cue=null,f.state="ID";continue}f.cue.text&&(f.cue.text+=` `),f.cue.text+=c;continue;case"BADCUE":c||(f.state="ID");continue}}}catch{f.state==="CUETEXT"&&f.cue&&f.oncue&&f.oncue(f.cue),f.cue=null,f.state=f.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var D=this;try{if(D.buffer+=D.decoder.decode(),(D.cue||D.state==="HEADER")&&(D.buffer+=` `,D.parse()),D.state==="INITIAL")throw new Error("Malformed WebVTT signature.")}catch(f){throw f}return D.onflush&&D.onflush(),this}};var nI=ug;function aI(w,D,f,v){for(var o,c,_,R,C,F=window.VTTCue||TextTrackCue,x=0;x<v.rows.length;x++)if(o=v.rows[x],_=!0,R=0,C="",!o.isEmpty()){for(var B=0;B<o.chars.length;B++)o.chars[B].uchar.match(/\s/)&&_?R++:(C+=o.chars[B].uchar,_=!1);o.cueStartTime=D,D===f&&(f+=1e-4),c=new F(D,f,cg(C.trim())),R>=16?R--:R++,navigator.userAgent.match(/Firefox\//)?c.line=x+1:c.line=x>7?x-2:x+1,c.align="left",c.position=Math.max(0,Math.min(100,100*(R/32))),w.addCue(c)}}var Rd={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},sg=function(D){var f=D;return Rd.hasOwnProperty(D)&&(f=Rd[D]),String.fromCharCode(f)},Su=15,wl=100,tI={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},rI={17:2,18:4,21:6,22:8,23:10,19:13,20:15},oI={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},uI={25:2,26:4,29:6,30:8,31:10,27:13,28:15},iI=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],vg;(function(w){w[w.ERROR=0]="ERROR",w[w.TEXT=1]="TEXT",w[w.WARNING=2]="WARNING",w[w.INFO=2]="INFO",w[w.DEBUG=3]="DEBUG",w[w.DATA=3]="DATA"})(vg||(vg={}));var za={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(D){this.time=D},log:function(D,f){var v=this.verboseFilter[D];this.verboseLevel>=v}},Vc=function(D){for(var f=[],v=0;v<D.length;v++)f.push(D[v].toString(16));return f},yd=function(){function w(f,v,o,c,_){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=f||"white",this.underline=v||!1,this.italics=o||!1,this.background=c||"black",this.flash=_||!1}var D=w.prototype;return D.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},D.setStyles=function(v){for(var o=["foreground","underline","italics","background","flash"],c=0;c<o.length;c++){var _=o[c];v.hasOwnProperty(_)&&(this[_]=v[_])}},D.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},D.equals=function(v){return this.foreground===v.foreground&&this.underline===v.underline&&this.italics===v.italics&&this.background===v.background&&this.flash===v.flash},D.copy=function(v){this.foreground=v.foreground,this.underline=v.underline,this.italics=v.italics,this.background=v.background,this.flash=v.flash},D.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},w}(),lI=function(){function w(f,v,o,c,_,R){this.uchar=void 0,this.penState=void 0,this.uchar=f||" ",this.penState=new yd(v,o,c,_,R)}var D=w.prototype;return D.reset=function(){this.uchar=" ",this.penState.reset()},D.setChar=function(v,o){this.uchar=v,this.penState.copy(o)},D.setPenState=function(v){this.penState.copy(v)},D.equals=function(v){return this.uchar===v.uchar&&this.penState.equals(v.penState)},D.copy=function(v){this.uchar=v.uchar,this.penState.copy(v.penState)},D.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},w}(),cI=function(){function w(){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.chars=[];for(var f=0;f<wl;f++)this.chars.push(new lI);this.pos=0,this.currPenState=new yd}var D=w.prototype;return D.equals=function(v){for(var o=!0,c=0;c<wl;c++)if(!this.chars[c].equals(v.chars[c])){o=!1;break}return o},D.copy=function(v){for(var o=0;o<wl;o++)this.chars[o].copy(v.chars[o])},D.isEmpty=function(){for(var v=!0,o=0;o<wl;o++)if(!this.chars[o].isEmpty()){v=!1;break}return v},D.setCursor=function(v){this.pos!==v&&(this.pos=v),this.pos<0?(za.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>wl&&(za.log("ERROR","Too large cursor position "+this.pos),this.pos=wl)},D.moveCursor=function(v){var o=this.pos+v;if(v>1)for(var c=this.pos+1;c<o+1;c++)this.chars[c].setPenState(this.currPenState);this.setCursor(o)},D.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},D.insertChar=function(v){v>=144&&this.backSpace();var o=sg(v);if(this.pos>=wl){za.log("ERROR","Cannot insert "+v.toString(16)+" ("+o+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(o,this.currPenState),this.moveCursor(1)},D.clearFromPos=function(v){var o;for(o=v;o<wl;o++)this.chars[o].reset()},D.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},D.clearToEndOfRow=function(){this.clearFromPos(this.pos)},D.getTextString=function(){for(var v=[],o=!0,c=0;c<wl;c++){var _=this.chars[c].uchar;_!==" "&&(o=!1),v.push(_)}return o?"":v.join("")},D.setPenStyles=function(v){this.currPenState.setStyles(v);var o=this.chars[this.pos];o.setPenState(this.currPenState)},w}(),Va=function(){function w(){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.rows=[];for(var f=0;f<Su;f++)this.rows.push(new cI);this.currRow=Su-1,this.nrRollUpRows=null,this.reset()}var D=w.prototype;return D.reset=function(){for(var v=0;v<Su;v++)this.rows[v].clear();this.currRow=Su-1},D.equals=function(v){for(var o=!0,c=0;c<Su;c++)if(!this.rows[c].equals(v.rows[c])){o=!1;break}return o},D.copy=function(v){for(var o=0;o<Su;o++)this.rows[o].copy(v.rows[o])},D.isEmpty=function(){for(var v=!0,o=0;o<Su;o++)if(!this.rows[o].isEmpty()){v=!1;break}return v},D.backSpace=function(){var v=this.rows[this.currRow];v.backSpace()},D.clearToEndOfRow=function(){var v=this.rows[this.currRow];v.clearToEndOfRow()},D.insertChar=function(v){var o=this.rows[this.currRow];o.insertChar(v)},D.setPen=function(v){var o=this.rows[this.currRow];o.setPenStyles(v)},D.moveCursor=function(v){var o=this.rows[this.currRow];o.moveCursor(v)},D.setCursor=function(v){za.log("INFO","setCursor: "+v);var o=this.rows[this.currRow];o.setCursor(v)},D.setPAC=function(v){za.log("INFO","pacData = "+JSON.stringify(v));var o=v.row-1;if(this.nrRollUpRows&&o<this.nrRollUpRows-1&&(o=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==o){for(var c=0;c<Su;c++)this.rows[c].clear();var _=this.currRow+1-this.nrRollUpRows,R=this.lastOutputScreen;if(R){var C=R.rows[_].cueStartTime;if(C&&za.time&&C<za.time)for(var F=0;F<this.nrRollUpRows;F++)this.rows[o-this.nrRollUpRows+F+1].copy(R.rows[_+F])}}this.currRow=o;var x=this.rows[this.currRow];if(v.indent!==null){var B=v.indent,O=Math.max(B-1,0);x.setCursor(v.indent),v.color=x.chars[O].penState.foreground}var ee={foreground:v.color,underline:v.underline,italics:v.italics,background:"black",flash:!1};this.setPen(ee)},D.setBkgData=function(v){za.log("INFO","bkgData = "+JSON.stringify(v)),this.backSpace(),this.setPen(v),this.insertChar(32)},D.setRollUpRows=function(v){this.nrRollUpRows=v},D.rollUp=function(){if(this.nrRollUpRows===null){za.log("DEBUG","roll_up but nrRollUpRows not set yet");return}za.log("TEXT",this.getDisplayText());var v=this.currRow+1-this.nrRollUpRows,o=this.rows.splice(v,1)[0];o.clear(),this.rows.splice(this.currRow,0,o),za.log("INFO","Rolling up")},D.getDisplayText=function(v){v=v||!1;for(var o=[],c="",_=-1,R=0;R<Su;R++){var C=this.rows[R].getTextString();C&&(_=R+1,v?o.push("Row "+_+": '"+C+"'"):o.push(C.trim()))}return o.length>0&&(v?c="["+o.join(" | ")+"]":c=o.join(` `)),c},D.getTextAndFormat=function(){return this.rows},w}(),K_=function(){function w(f,v){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.lastCueEndTime=void 0,this.chNr=f,this.outputFilter=v,this.mode=null,this.verbose=0,this.displayedMemory=new Va,this.nonDisplayedMemory=new Va,this.lastOutputScreen=new Va,this.currRollUpRow=this.displayedMemory.rows[Su-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var D=w.prototype;return D.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[Su-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},D.getHandler=function(){return this.outputFilter},D.setHandler=function(v){this.outputFilter=v},D.setPAC=function(v){this.writeScreen.setPAC(v)},D.setBkgData=function(v){this.writeScreen.setBkgData(v)},D.setMode=function(v){v!==this.mode&&(this.mode=v,za.log("INFO","MODE="+v),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=v)},D.insertChars=function(v){for(var o=0;o<v.length;o++)this.writeScreen.insertChar(v[o]);var c=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";za.log("INFO",c+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(za.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},D.ccRCL=function(){za.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},D.ccBS=function(){za.log("INFO","BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},D.ccAOF=function(){},D.ccAON=function(){},D.ccDER=function(){za.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},D.ccRU=function(v){za.log("INFO","RU("+v+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(v)},D.ccFON=function(){za.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},D.ccRDC=function(){za.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},D.ccTR=function(){za.log("INFO","TR"),this.setMode("MODE_TEXT")},D.ccRTD=function(){za.log("INFO","RTD"),this.setMode("MODE_TEXT")},D.ccEDM=function(){za.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},D.ccCR=function(){za.log("INFO","CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},D.ccENM=function(){za.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},D.ccEOC=function(){if(za.log("INFO","EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var v=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=v,this.writeScreen=this.nonDisplayedMemory,za.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},D.ccTO=function(v){za.log("INFO","TO("+v+") - Tab Offset"),this.writeScreen.moveCursor(v)},D.ccMIDROW=function(v){var o={flash:!1};if(o.underline=v%2==1,o.italics=v>=46,o.italics)o.foreground="white";else{var c=Math.floor(v/2)-16,_=["white","green","blue","cyan","red","yellow","magenta"];o.foreground=_[c]}za.log("INFO","MIDROW: "+JSON.stringify(o)),this.writeScreen.setPen(o)},D.outputDataUpdate=function(v){v===void 0&&(v=!1);var o=za.time;o!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=o:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,o,this.lastOutputScreen),v&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:o),this.lastOutputScreen.copy(this.displayedMemory))},D.cueSplitAtTime=function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))},w}(),Y_=function(){function w(f,v,o){this.field=void 0,this.outputs=void 0,this.channels=void 0,this.currChNr=void 0,this.lastCmdA=void 0,this.lastCmdB=void 0,this.lastTime=void 0,this.dataCounters=void 0,this.field=f||1,this.outputs=[v,o],this.channels=[new K_(1,v),new K_(2,o)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}var D=w.prototype;return D.getHandler=function(v){return this.channels[v].getHandler()},D.setHandler=function(v,o){this.channels[v].setHandler(o)},D.addData=function(v,o){var c,_,R,C=!1;this.lastTime=v,za.setTime(v);for(var F=0;F<o.length;F+=2){if(_=o[F]&127,R=o[F+1]&127,_===0&&R===0){this.dataCounters.padding+=2;continue}else za.log("DATA","["+Vc([o[F],o[F+1]])+"] -> ("+Vc([_,R])+")");if(c=this.parseCmd(_,R),c||(c=this.parseMidrow(_,R)),c||(c=this.parsePAC(_,R)),c||(c=this.parseBackgroundAttributes(_,R)),!c&&(C=this.parseChars(_,R),C))if(this.currChNr&&this.currChNr>=0){var x=this.channels[this.currChNr-1];x.insertChars(C)}else za.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:C?this.dataCounters.char+=2:(this.dataCounters.other+=2,za.log("WARNING","Couldn't parse cleaned data "+Vc([_,R])+" orig: "+Vc([o[F],o[F+1]])))}},D.parseCmd=function(v,o){var c=null,_=(v===20||v===28)&&o>=32&&o<=47,R=(v===23||v===31)&&o>=33&&o<=35;if(!(_||R))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,za.log("DEBUG","Repeated command ("+Vc([v,o])+") is dropped"),!0;v===20||v===23?c=1:c=2;var C=this.channels[c-1];return v===20||v===28?o===32?C.ccRCL():o===33?C.ccBS():o===34?C.ccAOF():o===35?C.ccAON():o===36?C.ccDER():o===37?C.ccRU(2):o===38?C.ccRU(3):o===39?C.ccRU(4):o===40?C.ccFON():o===41?C.ccRDC():o===42?C.ccTR():o===43?C.ccRTD():o===44?C.ccEDM():o===45?C.ccCR():o===46?C.ccENM():o===47&&C.ccEOC():C.ccTO(o-32),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},D.parseMidrow=function(v,o){var c=null;if((v===17||v===25)&&o>=32&&o<=47){if(v===17?c=1:c=2,c!==this.currChNr)return za.log("ERROR","Mismatch channel in midrow parsing"),!1;var _=this.channels[c-1];return _.ccMIDROW(o),za.log("DEBUG","MIDROW ("+Vc([v,o])+")"),!0}return!1},D.parsePAC=function(v,o){var c=null,_=null,R=(v>=17&&v<=23||v>=25&&v<=31)&&o>=64&&o<=127,C=(v===16||v===24)&&o>=64&&o<=95;if(!(R||C))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;c=v<=23?1:2,o>=64&&o<=95?_=c===1?tI[v]:oI[v]:_=c===1?rI[v]:uI[v];var F=this.interpretPAC(_,o),x=this.channels[c-1];return x.setPAC(F),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},D.interpretPAC=function(v,o){var c=o,_={color:null,italics:!1,indent:null,underline:!1,row:v};return o>95?c=o-96:c=o-64,_.underline=(c&1)==1,c<=13?_.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:c<=15?(_.italics=!0,_.color="white"):_.indent=Math.floor((c-16)/2)*4,_},D.parseChars=function(v,o){var c=null,_=null,R=null;if(v>=25?(c=2,R=v-8):(c=1,R=v),R>=17&&R<=19){var C=o;R===17?C=o+80:R===18?C=o+112:C=o+144,za.log("INFO","Special char '"+sg(C)+"' in channel "+c),_=[C]}else v>=32&&v<=127&&(_=o===0?[v]:[v,o]);if(_){var F=Vc(_);za.log("DEBUG","Char codes = "+F.join(",")),this.lastCmdA=null,this.lastCmdB=null}return _},D.parseBackgroundAttributes=function(v,o){var c,_,R,C,F=(v===16||v===24)&&o>=32&&o<=47,x=(v===23||v===31)&&o>=45&&o<=47;return F||x?(c={},v===16||v===24?(_=Math.floor((o-32)/2),c.background=iI[_],o%2==1&&(c.background=c.background+"_semi")):o===45?c.background="transparent":(c.foreground="black",o===47&&(c.underline=!0)),R=v<24?1:2,C=this.channels[R-1],C.setBkgData(c),this.lastCmdA=null,this.lastCmdB=null,!0):!1},D.reset=function(){for(var v=0;v<this.channels.length;v++)this.channels[v]&&this.channels[v].reset();this.lastCmdA=null,this.lastCmdB=null},D.cueSplitAtTime=function(v){for(var o=0;o<this.channels.length;o++)this.channels[o]&&this.channels[o].cueSplitAtTime(v)},w}(),sI=Y_,fg=function(){function w(f,v){this.timelineController=void 0,this.trackName=void 0,this.startTime=void 0,this.endTime=void 0,this.screen=void 0,this.timelineController=f,this.trackName=v,this.startTime=null,this.endTime=null,this.screen=null}var D=w.prototype;return D.dispatchCue=function(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen),this.startTime=null)},D.newCue=function(v,o,c){(this.startTime===null||this.startTime>v)&&(this.startTime=v),this.endTime=o,this.screen=c,this.timelineController.createCaptionsTrack(this.trackName)},w}(),bd=function(D,f,v){return D.substr(v||0,f.length)===f},vI=function(D){var f=parseInt(D.substr(-3)),v=parseInt(D.substr(-6,2)),o=parseInt(D.substr(-9,2)),c=D.length>9?parseInt(D.substr(0,D.indexOf(":"))):0;if(!Object(i.isFiniteNumber)(f)||!Object(i.isFiniteNumber)(v)||!Object(i.isFiniteNumber)(o)||!Object(i.isFiniteNumber)(c))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+D);return f+=1e3*v,f+=60*1e3*o,f+=60*60*1e3*c,f},X_=function(D){for(var f=5381,v=D.length;v;)f=f*33^D.charCodeAt(--v);return(f>>>0).toString()},fI=function(D,f,v){var o=D[f],c=D[o.prevCC];if(!c||!c.new&&o.new){D.ccOffset=D.presentationOffset=o.start,o.new=!1;return}for(;c&&c.new;)D.ccOffset+=o.start-c.start,o.new=!1,o=c,c=D[o.prevCC];D.presentationOffset=v},_I={parse:function(D,f,v,o,c,_){var R=/\r\n|\n\r|\n|\r/g,C=Object(V_.utf8ArrayToStr)(new Uint8Array(D)).trim().replace(R,` `).split(` `),F="00:00.000",x=0,B=0,O=0,ee=[],ye,Qe=!0,fn=!1,fa=new nI;fa.oncue=function(Xn){var ca=v[o],Ra=v.ccOffset;ca&&ca.new&&(B!==void 0?Ra=v.ccOffset=ca.start:fI(v,o,O)),O&&(Ra=O-v.presentationOffset),fn&&(Xn.startTime+=Ra-B,Xn.endTime+=Ra-B),Xn.id=X_(Xn.startTime.toString())+X_(Xn.endTime.toString())+X_(Xn.text),Xn.text=decodeURIComponent(encodeURIComponent(Xn.text)),Xn.endTime>0&&ee.push(Xn)},fa.onparsingerror=function(Xn){ye=Xn},fa.onflush=function(){if(ye&&_){_(ye);return}c(ee)},C.forEach(function(Xn){if(Qe)if(bd(Xn,"X-TIMESTAMP-MAP=")){Qe=!1,fn=!0,Xn.substr(16).split(",").forEach(function(ca){bd(ca,"LOCAL:")?F=ca.substr(6):bd(ca,"MPEGTS:")&&(x=parseInt(ca.substr(7)))});try{f+(v[o].start*9e4||0)<0&&(f+=8589934592),x-=f,B=vI(F)/1e3,O=x/9e4}catch(ca){fn=!1,ye=ca}return}else Xn===""&&(Qe=!1);fa.parse(Xn+` `)}),fa.flush()}},pI=_I;function _g(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function dI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var mI=function(w){dI(D,w);function D(v){var o;if(o=w.call(this,v,l.default.MEDIA_ATTACHING,l.default.MEDIA_DETACHING,l.default.FRAG_PARSING_USERDATA,l.default.FRAG_DECRYPTED,l.default.MANIFEST_LOADING,l.default.MANIFEST_LOADED,l.default.FRAG_LOADED,l.default.INIT_PTS_FOUND)||this,o.media=null,o.config=void 0,o.enabled=!0,o.Cues=void 0,o.textTracks=[],o.tracks=[],o.initPTS=[],o.unparsedVttFrags=[],o.cueRanges=[],o.captionsTracks={},o.captionsProperties=void 0,o.cea608Parser=void 0,o.lastSn=-1,o.prevCC=-1,o.vttCCs=null,o.hls=v,o.config=v.config,o.Cues=v.config.cueHandler,o.captionsProperties={textTrack1:{label:o.config.captionsTextTrack1Label,languageCode:o.config.captionsTextTrack1LanguageCode},textTrack2:{label:o.config.captionsTextTrack2Label,languageCode:o.config.captionsTextTrack2LanguageCode}},o.config.enableCEA708Captions){var c=new fg(_g(o),"textTrack1"),_=new fg(_g(o),"textTrack2");o.cea608Parser=new sI(0,c,_)}return o}var f=D.prototype;return f.addCues=function(o,c,_,R){for(var C=this.cueRanges,F=!1,x=C.length;x--;){var B=C[x],O=hI(B[0],B[1],c,_);if(O>=0&&(B[0]=Math.min(B[0],c),B[1]=Math.max(B[1],_),F=!0,O/(_-c)>.5))return}F||C.push([c,_]),this.Cues.newCue(this.captionsTracks[o],c,_,R)},f.onInitPtsFound=function(o){var c=this,_=o.frag,R=o.id,C=o.initPTS,F=this.unparsedVttFrags;R==="main"&&(this.initPTS[_.cc]=C),F.length&&(this.unparsedVttFrags=[],F.forEach(function(x){c.onFragLoaded(x)}))},f.getExistingTrack=function(o){var c=this.media;if(c)for(var _=0;_<c.textTracks.length;_++){var R=c.textTracks[_];if(R[o])return R}return null},f.createCaptionsTrack=function(o){var c=this.captionsProperties,_=this.captionsTracks,R=this.media,C=c[o],F=C.label,x=C.languageCode;if(!_[o]){var B=this.getExistingTrack(o);if(B)_[o]=B,$s(_[o]),$D(_[o],R);else{var O=this.createTextTrack("captions",F,x);O&&(O[o]=!0,_[o]=O)}}},f.createTextTrack=function(o,c,_){var R=this.media;if(!!R)return R.addTextTrack(o,c,_)},f.destroy=function(){w.prototype.destroy.call(this)},f.onMediaAttaching=function(o){this.media=o.media,this._cleanTracks()},f.onMediaDetaching=function(){var o=this.captionsTracks;Object.keys(o).forEach(function(c){$s(o[c]),delete o[c]})},f.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks()},f._cleanTracks=function(){var o=this.media;if(!!o){var c=o.textTracks;if(c)for(var _=0;_<c.length;_++)$s(c[_])}},f.onManifestLoaded=function(o){var c=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.cueRanges=[],this.config.enableWebVTT){this.tracks=o.subtitles||[];var _=this.media?this.media.textTracks:[];this.tracks.forEach(function(R,C){var F;if(C<_.length){for(var x=null,B=0;B<_.length;B++)if(pg(_[B],R)){x=_[B];break}x&&(F=x)}F||(F=c.createTextTrack("subtitles",R.name,R.lang)),R.default?F.mode=c.hls.subtitleDisplay?"showing":"hidden":F.mode="disabled",c.textTracks.push(F)})}},f.onFragLoaded=function(o){var c=o.frag,_=o.payload,R=this.cea608Parser,C=this.initPTS,F=this.lastSn,x=this.unparsedVttFrags;if(c.type==="main"){var B=c.sn;c.sn!==F+1&&R&&R.reset(),this.lastSn=B}else if(c.type==="subtitle")if(_.byteLength){if(!Object(i.isFiniteNumber)(C[c.cc])){x.push(o),C.length&&this.hls.trigger(l.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c});return}var O=c.decryptdata;(O==null||O.key==null||O.method!=="AES-128")&&this._parseVTTs(c,_)}else this.hls.trigger(l.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c})},f._parseVTTs=function(o,c){var _=this.hls,R=this.prevCC,C=this.textTracks,F=this.vttCCs;F[o.cc]||(F[o.cc]={start:o.start,prevCC:R,new:!0},this.prevCC=o.cc),pI.parse(c,this.initPTS[o.cc],F,o.cc,function(x){var B=C[o.level];if(B.mode==="disabled"){_.trigger(l.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:o});return}x.forEach(function(O){if(!B.cues.getCueById(O.id))try{if(B.addCue(O),!B.cues.getCueById(O.id))throw new Error("addCue is failed for: "+O)}catch(ye){s.logger.debug("Failed occurred on adding cues: "+ye);var ee=new window.TextTrackCue(O.startTime,O.endTime,O.text);ee.id=O.id,B.addCue(ee)}}),_.trigger(l.default.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:o})},function(x){s.logger.log("Failed to parse VTT cue: "+x),_.trigger(l.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:o})})},f.onFragDecrypted=function(o){var c=o.frag,_=o.payload;if(c.type==="subtitle"){if(!Object(i.isFiniteNumber)(this.initPTS[c.cc])){this.unparsedVttFrags.push(o);return}this._parseVTTs(c,_)}},f.onFragParsingUserdata=function(o){if(!(!this.enabled||!this.cea608Parser))for(var c=0;c<o.samples.length;c++){var _=o.samples[c].bytes;if(_){var R=this.extractCea608Data(_);this.cea608Parser.addData(o.samples[c].pts,R)}}},f.extractCea608Data=function(o){for(var c=o[0]&31,_=2,R,C,F,x,B,O=[],ee=0;ee<c;ee++)R=o[_++],C=127&o[_++],F=127&o[_++],x=(4&R)!=0,B=3&R,!(C===0&&F===0)&&x&&B===0&&(O.push(C),O.push(F));return O},D}(y);function pg(w,D){return w&&w.label===D.name&&!(w.textTrack1||w.textTrack2)}function hI(w,D,f,v){return Math.min(D,v)-Math.max(w,f)}var DI=mI;function wd(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function Ed(w,D,f){return D&&wd(w.prototype,D),f&&wd(w,f),w}function gI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var m=function(w){gI(D,w);function D(v){var o;return o=w.call(this,v,l.default.MEDIA_ATTACHED,l.default.MEDIA_DETACHING,l.default.MANIFEST_LOADED,l.default.SUBTITLE_TRACK_LOADED)||this,o.tracks=[],o.trackId=-1,o.media=null,o.stopped=!0,o.subtitleDisplay=!0,o.queuedDefaultTrack=null,o}var f=D.prototype;return f.destroy=function(){y.prototype.destroy.call(this)},f.onMediaAttached=function(o){var c=this;this.media=o.media,!!this.media&&(Object(i.isFiniteNumber)(this.queuedDefaultTrack)&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=null),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval(function(){c.trackChangeListener()},500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},f.onMediaDetaching=function(){if(!!this.media){this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),Object(i.isFiniteNumber)(this.subtitleTrack)&&(this.queuedDefaultTrack=this.subtitleTrack);var o=d(this.media.textTracks);o.forEach(function(c){$s(c)}),this.subtitleTrack=-1,this.media=null}},f.onManifestLoaded=function(o){var c=this,_=o.subtitles||[];this.tracks=_,this.hls.trigger(l.default.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:_}),_.forEach(function(R){R.default&&(c.media?c.subtitleTrack=R.id:c.queuedDefaultTrack=R.id)})},f.onSubtitleTrackLoaded=function(o){var c=this,_=o.id,R=o.details,C=this.trackId,F=this.tracks,x=F[C];if(_>=F.length||_!==C||!x||this.stopped){this._clearReloadTimer();return}if(s.logger.log("subtitle track "+_+" loaded"),R.live){var B=Pt(x.details,R,o.stats.trequest);s.logger.log("Reloading live subtitle playlist in "+B+"ms"),this.timer=setTimeout(function(){c._loadCurrentTrack()},B)}else this._clearReloadTimer()},f.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},f.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},f._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},f._loadCurrentTrack=function(){var o=this.trackId,c=this.tracks,_=this.hls,R=c[o];o<0||!R||R.details&&!R.details.live||(s.logger.log("Loading subtitle track "+o),_.trigger(l.default.SUBTITLE_TRACK_LOADING,{url:R.url,id:o}))},f._toggleTrackModes=function(o){var c=this.media,_=this.subtitleDisplay,R=this.trackId;if(!!c){var C=d(c.textTracks);if(o===-1)[].slice.call(C).forEach(function(B){B.mode="disabled"});else{var F=C[R];F&&(F.mode="disabled")}var x=C[o];x&&(x.mode=_?"showing":"hidden")}},f._setSubtitleTrackInternal=function(o){var c=this.hls,_=this.tracks;!Object(i.isFiniteNumber)(o)||o<-1||o>=_.length||(this.trackId=o,s.logger.log("Switching to subtitle track "+o),c.trigger(l.default.SUBTITLE_TRACK_SWITCH,{id:o}),this._loadCurrentTrack())},f._onTextTracksChanged=function(){if(!!this.media){for(var o=-1,c=d(this.media.textTracks),_=0;_<c.length;_++)if(c[_].mode==="hidden")o=_;else if(c[_].mode==="showing"){o=_;break}this.subtitleTrack=o}},Ed(D,[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(o){this.trackId!==o&&(this._toggleTrackModes(o),this._setSubtitleTrackInternal(o))}}]),D}(y);function d(w){for(var D=[],f=0;f<w.length;f++){var v=w[f];v.kind==="subtitles"&&v.label&&D.push(w[f])}return D}var g=m,G=a("./src/crypt/decrypter.js");function A(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function Q(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Te=window,_n=Te.performance,ma=500,yt=function(w){Q(D,w);function D(v,o){var c;return c=w.call(this,v,l.default.MEDIA_ATTACHED,l.default.MEDIA_DETACHING,l.default.ERROR,l.default.KEY_LOADED,l.default.FRAG_LOADED,l.default.SUBTITLE_TRACKS_UPDATED,l.default.SUBTITLE_TRACK_SWITCH,l.default.SUBTITLE_TRACK_LOADED,l.default.SUBTITLE_FRAG_PROCESSED,l.default.LEVEL_UPDATED)||this,c.fragmentTracker=o,c.config=v.config,c.state=fe.STOPPED,c.tracks=[],c.tracksBuffered=[],c.currentTrackId=-1,c.decrypter=new G.default(v,v.config),c.lastAVStart=0,c._onMediaSeeking=c.onMediaSeeking.bind(A(c)),c}var f=D.prototype;return f.onSubtitleFragProcessed=function(o){var c=o.frag,_=o.success;if(this.fragPrevious=c,this.state=fe.IDLE,!!_){var R=this.tracksBuffered[this.currentTrackId];if(!!R){for(var C,F=c.start,x=0;x<R.length;x++)if(F>=R[x].start&&F<=R[x].end){C=R[x];break}var B=c.start+c.duration;C?C.end=B:(C={start:F,end:B},R.push(C))}}},f.onMediaAttached=function(o){var c=o.media;this.media=c,c.addEventListener("seeking",this._onMediaSeeking),this.state=fe.IDLE},f.onMediaDetaching=function(){var o=this;!this.media||(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach(function(c){o.tracksBuffered[c.id]=[]}),this.media=null,this.state=fe.STOPPED)},f.onError=function(o){var c=o.frag;!c||c.type!=="subtitle"||(this.state=fe.IDLE)},f.onSubtitleTracksUpdated=function(o){var c=this;s.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=o.subtitleTracks,this.tracks.forEach(function(_){c.tracksBuffered[_.id]=[]})},f.onSubtitleTrackSwitch=function(o){if(this.currentTrackId=o.id,!this.tracks||!this.tracks.length||this.currentTrackId===-1){this.clearInterval();return}var c=this.tracks[this.currentTrackId];c&&c.details&&this.setInterval(ma)},f.onSubtitleTrackLoaded=function(o){var c=o.id,_=o.details,R=this.currentTrackId,C=this.tracks,F=C[R];c>=C.length||c!==R||!F||(_.live&&zn(F.details,_,this.lastAVStart),F.details=_,this.setInterval(ma))},f.onKeyLoaded=function(){this.state===fe.KEY_LOADING&&(this.state=fe.IDLE)},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag.decryptdata,R=o.frag,C=this.hls;if(this.state===fe.FRAG_LOADING&&c&&o.frag.type==="subtitle"&&c.sn===o.frag.sn&&o.payload.byteLength>0&&_&&_.key&&_.method==="AES-128"){var F=_n.now();this.decrypter.decrypt(o.payload,_.key.buffer,_.iv.buffer,function(x){var B=_n.now();C.trigger(l.default.FRAG_DECRYPTED,{frag:R,payload:x,stats:{tstart:F,tdecrypt:B}})})}},f.onLevelUpdated=function(o){var c=o.details,_=c.fragments;this.lastAVStart=_.length?_[0].start:0},f.doTick=function(){if(!this.media){this.state=fe.IDLE;return}switch(this.state){case fe.IDLE:{var o=this.config,c=this.currentTrackId,_=this.fragmentTracker,R=this.media,C=this.tracks;if(!C||!C[c]||!C[c].details)break;var F=o.maxBufferHole,x=o.maxFragLookUpTolerance,B=Math.min(o.maxBufferLength,o.maxMaxBufferLength),O=j.bufferedInfo(this._getBuffered(),R.currentTime,F),ee=O.end,ye=O.len,Qe=C[c].details,fn=Qe.fragments,fa=fn.length,Xn=fn[fa-1].start+fn[fa-1].duration;if(ye>B)return;var ca,Ra=this.fragPrevious;ee<Xn?(Ra&&Qe.hasProgramDateTime&&(ca=Oo(fn,Ra.endProgramDateTime,x)),ca||(ca=Cr(Ra,fn,ee,x))):ca=fn[fa-1],ca&&ca.encrypted?(s.logger.log("Loading key for "+ca.sn),this.state=fe.KEY_LOADING,this.hls.trigger(l.default.KEY_LOADING,{frag:ca})):ca&&_.getState(ca)===Da.NOT_LOADED&&(this.fragCurrent=ca,this.state=fe.FRAG_LOADING,this.hls.trigger(l.default.FRAG_LOADING,{frag:ca}))}}},f.stopLoad=function(){this.lastAVStart=0,w.prototype.stopLoad.call(this)},f._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},f.onMediaSeeking=function(){this.fragPrevious=null},D}(gl),Zt;(function(w){w.WIDEVINE="com.widevine.alpha",w.PLAYREADY="com.microsoft.playready"})(Zt||(Zt={}));var Io=function(){return typeof window!="undefined"&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null}();function ui(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function RI(w,D,f){return D&&ui(w.prototype,D),f&&ui(w,f),w}function dg(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var mg=3,hg=function(D,f){var v={videoCapabilities:[]};return f.forEach(function(o){v.videoCapabilities.push({contentType:'video/mp4; codecs="'+o+'"'})}),[v]},yI=function(D,f,v){switch(D){case Zt.WIDEVINE:return hg(f,v);default:throw new Error("Unknown key-system: "+D)}},Dg=function(w){dg(D,w);function D(v){var o;return o=w.call(this,v,l.default.MEDIA_ATTACHED,l.default.MEDIA_DETACHED,l.default.MANIFEST_PARSED)||this,o._widevineLicenseUrl=void 0,o._licenseXhrSetup=void 0,o._emeEnabled=void 0,o._requestMediaKeySystemAccess=void 0,o._config=void 0,o._mediaKeysList=[],o._media=null,o._hasSetMediaKeys=!1,o._requestLicenseFailureCount=0,o._onMediaEncrypted=function(c){s.logger.log('Media is encrypted using "'+c.initDataType+'" init data type'),o._attemptSetMediaKeys(),o._generateRequestWithPreferredKeySession(c.initDataType,c.initData)},o._config=v.config,o._widevineLicenseUrl=o._config.widevineLicenseUrl,o._licenseXhrSetup=o._config.licenseXhrSetup,o._emeEnabled=o._config.emeEnabled,o._requestMediaKeySystemAccess=o._config.requestMediaKeySystemAccessFunc,o}var f=D.prototype;return f.getLicenseServerUrl=function(o){switch(o){case Zt.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+o+'"')},f._attemptKeySystemAccess=function(o,c,_){var R=this,C=yI(o,c,_);s.logger.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(o,C).then(function(F){R._onMediaKeySystemAccessObtained(o,F)}).catch(function(F){s.logger.error('Failed to obtain key-system "'+o+'" access:',F)})},f._onMediaKeySystemAccessObtained=function(o,c){var _=this;s.logger.log('Access for key-system "'+o+'" obtained');var R={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:c,mediaKeySystemDomain:o};this._mediaKeysList.push(R),c.createMediaKeys().then(function(C){R.mediaKeys=C,s.logger.log('Media-keys created for key-system "'+o+'"'),_._onMediaKeysCreated()}).catch(function(C){s.logger.error("Failed to create media-keys:",C)})},f._onMediaKeysCreated=function(){var o=this;this._mediaKeysList.forEach(function(c){c.mediaKeysSession||(c.mediaKeysSession=c.mediaKeys.createSession(),o._onNewMediaKeySession(c.mediaKeysSession))})},f._onNewMediaKeySession=function(o){var c=this;s.logger.log("New key-system session "+o.sessionId),o.addEventListener("message",function(_){c._onKeySessionMessage(o,_.message)},!1)},f._onKeySessionMessage=function(o,c){s.logger.log("Got EME message event, creating license request"),this._requestLicense(c,function(_){s.logger.log("Received license data (length: "+(_&&_.byteLength)+"), updating key-session"),o.update(_)})},f._attemptSetMediaKeys=function(){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var o=this._mediaKeysList[0];if(!o||!o.mediaKeys){s.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}s.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(o.mediaKeys),this._hasSetMediaKeys=!0}},f._generateRequestWithPreferredKeySession=function(o,c){var _=this,R=this._mediaKeysList[0];if(!R){s.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(R.mediaKeysSessionInitialized){s.logger.warn("Key-Session already initialized but requested again");return}var C=R.mediaKeysSession;if(!C){s.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!c){s.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}s.logger.log('Generating key-session request for "'+o+'" init data type'),R.mediaKeysSessionInitialized=!0,C.generateRequest(o,c).then(function(){s.logger.debug("Key-session generation succeeded")}).catch(function(F){s.logger.error("Error generating key-session request:",F),_.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},f._createLicenseXhr=function(o,c,_){var R=new XMLHttpRequest,C=this._licenseXhrSetup;try{if(C)try{C(R,o)}catch{R.open("POST",o,!0),C(R,o)}R.readyState||R.open("POST",o,!0)}catch(F){throw new Error("issue setting up KeySystem license XHR "+F)}return R.responseType="arraybuffer",R.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,R,o,c,_),R},f._onLicenseRequestReadyStageChange=function(o,c,_,R){switch(o.readyState){case 4:if(o.status===200)this._requestLicenseFailureCount=0,s.logger.log("License request succeeded"),o.responseType!=="arraybuffer"&&s.logger.warn("xhr response type was not set to the expected arraybuffer for license request"),R(o.response);else{if(s.logger.error("License Request XHR failed ("+c+"). Status: "+o.status+" ("+o.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>mg){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var C=mg-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(_,R)}break}},f._generateLicenseRequestChallenge=function(o,c){switch(o.mediaKeySystemDomain){case Zt.WIDEVINE:return c}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},f._requestLicense=function(o,c){s.logger.log("Requesting content license for key-system");var _=this._mediaKeysList[0];if(!_){s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var R=this.getLicenseServerUrl(_.mediaKeySystemDomain),C=this._createLicenseXhr(R,o,c);s.logger.log("Sending license request to URL: "+R);var F=this._generateLicenseRequestChallenge(_,o);C.send(F)}catch(x){s.logger.error("Failure requesting DRM license: "+x),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},f.onMediaAttached=function(o){if(!!this._emeEnabled){var c=o.media;this._media=c,c.addEventListener("encrypted",this._onMediaEncrypted)}},f.onMediaDetached=function(){this._media&&(this._media.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null)},f.onManifestParsed=function(o){if(!!this._emeEnabled){var c=o.levels.map(function(R){return R.audioCodec}),_=o.levels.map(function(R){return R.videoCodec});this._attemptKeySystemAccess(Zt.WIDEVINE,c,_)}},RI(D,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),D}(y),bI=Dg;function wI(w){for(var D=1;D<arguments.length;D++){var f=arguments[D]!=null?arguments[D]:{},v=Object.keys(f);typeof Object.getOwnPropertySymbols=="function"&&(v=v.concat(Object.getOwnPropertySymbols(f).filter(function(o){return Object.getOwnPropertyDescriptor(f,o).enumerable}))),v.forEach(function(o){gg(w,o,f[o])})}return w}function gg(w,D,f){return D in w?Object.defineProperty(w,D,{value:f,enumerable:!0,configurable:!0,writable:!0}):w[D]=f,w}var Rg=wI({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:60*1e3*1e3,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,liveBackBufferLength:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:gd,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:xE,bufferController:UE,capLevelController:ZD,fpsController:qE,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,requestMediaKeySystemAccessFunc:Io},yg(),{subtitleStreamController:yt,subtitleTrackController:g,timelineController:DI,audioStreamController:YE,audioTrackController:Q_,emeController:bI});function yg(){return{cueHandler:t,enableCEA708Captions:!0,enableWebVTT:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es"}}a.d(n,"default",function(){return Eg});function Id(w){for(var D=1;D<arguments.length;D++){var f=arguments[D]!=null?arguments[D]:{},v=Object.keys(f);typeof Object.getOwnPropertySymbols=="function"&&(v=v.concat(Object.getOwnPropertySymbols(f).filter(function(o){return Object.getOwnPropertyDescriptor(f,o).enumerable}))),v.forEach(function(o){Td(w,o,f[o])})}return w}function Td(w,D,f){return D in w?Object.defineProperty(w,D,{value:f,enumerable:!0,configurable:!0,writable:!0}):w[D]=f,w}function Fr(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function bg(w,D){for(var f=0;f<D.length;f++){var v=D[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}function wg(w,D,f){return D&&bg(w.prototype,D),f&&bg(w,f),w}function EI(w,D){w.prototype=Object.create(D.prototype),w.prototype.constructor=w,w.__proto__=D}var Eg=function(w){EI(D,w),D.isSupported=function(){return CE()},wg(D,null,[{key:"version",get:function(){return"0.13.2"}},{key:"Events",get:function(){return l.default}},{key:"ErrorTypes",get:function(){return u.ErrorTypes}},{key:"ErrorDetails",get:function(){return u.ErrorDetails}},{key:"DefaultConfig",get:function(){return D.defaultConfig?D.defaultConfig:Rg},set:function(o){D.defaultConfig=o}}]);function D(v){var o;v===void 0&&(v={}),o=w.call(this)||this,o.config=void 0,o._autoLevelCapping=void 0,o.abrController=void 0,o.capLevelController=void 0,o.levelController=void 0,o.streamController=void 0,o.networkControllers=void 0,o.audioTrackController=void 0,o.subtitleTrackController=void 0,o.emeController=void 0,o.coreComponents=void 0,o.media=null,o.url=null;var c=D.DefaultConfig;if((v.liveSyncDurationCount||v.liveMaxLatencyDurationCount)&&(v.liveSyncDuration||v.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");o.config=Id({},c,v);var _=Fr(o),R=_.config;if(R.liveMaxLatencyDurationCount!==void 0&&R.liveMaxLatencyDurationCount<=R.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(R.liveMaxLatencyDuration!==void 0&&(R.liveSyncDuration===void 0||R.liveMaxLatencyDuration<=R.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(s.enableLogs)(R.debug),o._autoLevelCapping=-1;var C=o.abrController=new R.abrController(Fr(o)),F=new R.bufferController(Fr(o)),x=o.capLevelController=new R.capLevelController(Fr(o)),B=new R.fpsController(Fr(o)),O=new Ve(Fr(o)),ee=new Ma(Fr(o)),ye=new la(Fr(o)),Qe=new SE(Fr(o)),fn=o.levelController=new pd(Fr(o)),fa=new ot(Fr(o)),Xn=o.streamController=new uf(Fr(o),fa),ca=[fn,Xn],Ra=R.audioStreamController;Ra&&ca.push(new Ra(Fr(o),fa)),o.networkControllers=ca;var ka=[O,ee,ye,C,F,x,B,Qe,fa];if(Ra=R.audioTrackController,Ra){var Cu=new Ra(Fr(o));o.audioTrackController=Cu,ka.push(Cu)}if(Ra=R.subtitleTrackController,Ra){var ko=new Ra(Fr(o));o.subtitleTrackController=ko,ca.push(ko)}if(Ra=R.emeController,Ra){var ki=new Ra(Fr(o));o.emeController=ki,ka.push(ki)}return Ra=R.subtitleStreamController,Ra&&ca.push(new Ra(Fr(o),fa)),Ra=R.timelineController,Ra&&ka.push(new Ra(Fr(o))),o.coreComponents=ka,o}var f=D.prototype;return f.destroy=function(){s.logger.log("destroy"),this.trigger(l.default.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach(function(o){o.destroy()}),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1},f.attachMedia=function(o){s.logger.log("attachMedia"),this.media=o,this.trigger(l.default.MEDIA_ATTACHING,{media:o})},f.detachMedia=function(){s.logger.log("detachMedia"),this.trigger(l.default.MEDIA_DETACHING),this.media=null},f.loadSource=function(o){o=r.buildAbsoluteURL(window.location.href,o,{alwaysNormalize:!0}),s.logger.log("loadSource:"+o),this.url=o,this.trigger(l.default.MANIFEST_LOADING,{url:o})},f.startLoad=function(o){o===void 0&&(o=-1),s.logger.log("startLoad("+o+")"),this.networkControllers.forEach(function(c){c.startLoad(o)})},f.stopLoad=function(){s.logger.log("stopLoad"),this.networkControllers.forEach(function(o){o.stopLoad()})},f.swapAudioCodec=function(){s.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},f.recoverMediaError=function(){s.logger.log("recoverMediaError");var o=this.media;this.detachMedia(),o&&this.attachMedia(o)},wg(D,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(o){s.logger.log("set currentLevel:"+o),this.loadLevel=o,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(o){s.logger.log("set nextLevel:"+o),this.levelController.manualLevel=o,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(o){s.logger.log("set loadLevel:"+o),this.levelController.manualLevel=o}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(o){this.levelController.nextLoadLevel=o}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(o){s.logger.log("set firstLevel:"+o),this.levelController.firstLevel=o}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(o){s.logger.log("set startLevel:"+o),o!==-1&&(o=Math.max(o,this.minAutoLevel)),this.levelController.startLevel=o}},{key:"capLevelToPlayerSize",set:function(o){var c=!!o;c!==this.config.capLevelToPlayerSize&&(c?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=c)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(o){s.logger.log("set autoLevelCapping:"+o),this._autoLevelCapping=o}},{key:"bandwidthEstimate",get:function(){var o=this.abrController._bwEstimator;return o?o.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var o=this.levels,c=this.config.minAutoBitrate,_=o?o.length:0,R=0;R<_;R++){var C=o[R].realBitrate?Math.max(o[R].realBitrate,o[R].bitrate):o[R].bitrate;if(C>c)return R}return 0}},{key:"maxAutoLevel",get:function(){var o=this.levels,c=this.autoLevelCapping,_;return c===-1&&o&&o.length?_=o.length-1:_=c,_}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(o){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,o)}},{key:"audioTracks",get:function(){var o=this.audioTrackController;return o?o.audioTracks:[]}},{key:"audioTrack",get:function(){var o=this.audioTrackController;return o?o.audioTrack:-1},set:function(o){var c=this.audioTrackController;c&&(c.audioTrack=o)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var o=this.subtitleTrackController;return o?o.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var o=this.subtitleTrackController;return o?o.subtitleTrack:-1},set:function(o){var c=this.subtitleTrackController;c&&(c.subtitleTrack=o)}},{key:"subtitleDisplay",get:function(){var o=this.subtitleTrackController;return o?o.subtitleDisplay:!1},set:function(o){var c=this.subtitleTrackController;c&&(c.subtitleDisplay=o)}}]),D}(ie);Eg.defaultConfig=void 0},"./src/polyfills/number-isFinite.js":function(e,n,a){"use strict";a.r(n),a.d(n,"isFiniteNumber",function(){return t});var t=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)}},"./src/utils/get-self-scope.js":function(e,n,a){"use strict";a.r(n),a.d(n,"getSelfScope",function(){return t});function t(){return typeof window=="undefined"?self:window}},"./src/utils/logger.js":function(e,n,a){"use strict";a.r(n),a.d(n,"enableLogs",function(){return y}),a.d(n,"logger",function(){return E});var t=a("./src/utils/get-self-scope.js");function r(){}var u={trace:r,debug:r,log:r,warn:r,info:r,error:r},i=u;function l(b,T){return T="["+b+"] > "+T,T}var s=Object(t.getSelfScope)();function h(b){var T=s.console[b];return T?function(){for(var L=arguments.length,U=new Array(L),$=0;$<L;$++)U[$]=arguments[$];U[0]&&(U[0]=l(b,U[0])),T.apply(s.console,U)}:r}function p(b){for(var T=arguments.length,L=new Array(T>1?T-1:0),U=1;U<T;U++)L[U-1]=arguments[U];L.forEach(function($){i[$]=b[$]?b[$].bind(b):h($)})}var y=function(T){if(s.console&&T===!0||typeof T=="object"){p(T,"debug","log","info","warn","error");try{i.log()}catch{i=u}}else i=u},E=i}}).default})});var P1=Ae(ID=>{"use strict";Object.defineProperty(ID,"__esModule",{value:!0});ID.Direction=void 0;var hCe;(function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"})(hCe=ID.Direction||(ID.Direction={}))});var jA=Ae(Ga=>{"use strict";var TD=Ga&&Ga.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;t<r;t++)(u||!(t in n))&&(u||(u=Array.prototype.slice.call(n,0,t)),u[t]=n[t]);return e.concat(u||Array.prototype.slice.call(n))};Object.defineProperty(Ga,"__esModule",{value:!0});Ga.useThumbOverlap=Ga.assertUnreachable=Ga.voidFn=Ga.getTrackBackground=Ga.replaceAt=Ga.schd=Ga.translate=Ga.getClosestThumbIndex=Ga.translateThumbs=Ga.getPaddingAndBorder=Ga.getMargin=Ga.checkInitialOverlap=Ga.checkValuesAgainstBoundaries=Ga.checkBoundaries=Ga.isVertical=Ga.relativeValue=Ga.normalizeValue=Ga.isStepDivisible=Ga.isTouchEvent=Ga.getStepDecimals=void 0;var NA=(Wa(),NR),N_=P1(),DCe=function(e){var n=e.toString().split(".")[1];return n?n.length:0};Ga.getStepDecimals=DCe;function gCe(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}Ga.isTouchEvent=gCe;function RCe(e,n,a){var t=(n-e)/a,r=8,u=Number(t.toFixed(r));return parseInt(u.toString(),10)===u}Ga.isStepDivisible=RCe;function yCe(e,n,a,t,r,u,i){var l=1e11;if(e=Math.round(e*l)/l,!u){var s=i[n-1],h=i[n+1];if(s&&s>e)return s;if(h&&h<e)return h}if(e>t)return t;if(e<a)return a;var p=Math.floor(e*l-a*l)%Math.floor(r*l),y=Math.floor(e*l-Math.abs(p)),E=p===0?e:y/l,b=Math.abs(p/l)<r/2?E:E+r,T=(0,Ga.getStepDecimals)(r);return parseFloat(b.toFixed(T))}Ga.normalizeValue=yCe;function bCe(e,n,a){return(e-n)/(a-n)}Ga.relativeValue=bCe;function DV(e){return e===N_.Direction.Up||e===N_.Direction.Down}Ga.isVertical=DV;function wCe(e,n,a){if(n>=a)throw new RangeError("min (".concat(n,") is equal/bigger than max (").concat(a,")"));if(e<n)throw new RangeError("value (".concat(e,") is smaller than min (").concat(n,")"));if(e>a)throw new RangeError("value (".concat(e,") is bigger than max (").concat(a,")"))}Ga.checkBoundaries=wCe;function ECe(e,n,a){return e<n?n:e>a?a:e}Ga.checkValuesAgainstBoundaries=ECe;function ICe(e){if(!(e.length<2)&&!e.slice(1).every(function(n,a){return e[a]<=n}))throw new RangeError("values={[".concat(e,"]} needs to be sorted when allowOverlap={false}"))}Ga.checkInitialOverlap=ICe;function TCe(e){var n=window.getComputedStyle(e);return{top:parseInt(n["margin-top"],10),bottom:parseInt(n["margin-bottom"],10),left:parseInt(n["margin-left"],10),right:parseInt(n["margin-right"],10)}}Ga.getMargin=TCe;function SCe(e){var n=window.getComputedStyle(e);return{top:parseInt(n["padding-top"],10)+parseInt(n["border-top-width"],10),bottom:parseInt(n["padding-bottom"],10)+parseInt(n["border-bottom-width"],10),left:parseInt(n["padding-left"],10)+parseInt(n["border-left-width"],10),right:parseInt(n["padding-right"],10)+parseInt(n["border-right-width"],10)}}Ga.getPaddingAndBorder=SCe;function CCe(e,n,a){var t=a?-1:1;e.forEach(function(r,u){return gV(r,t*n[u].x,n[u].y)})}Ga.translateThumbs=CCe;function FCe(e,n,a,t){for(var r=0,u=yV(e[0],n,a,t),i=1;i<e.length;i++){var l=yV(e[i],n,a,t);l<u&&(u=l,r=i)}return r}Ga.getClosestThumbIndex=FCe;function gV(e,n,a){e.style.transform="translate(".concat(n,"px, ").concat(a,"px)")}Ga.translate=gV;var GCe=function(e){var n=[],a=null,t=function(){for(var r=[],u=0;u<arguments.length;u++)r[u]=arguments[u];n=r,!a&&(a=requestAnimationFrame(function(){a=null,e.apply(void 0,n)}))};return t};Ga.schd=GCe;function MCe(e,n,a){var t=e.slice(0);return t[n]=a,t}Ga.replaceAt=MCe;function ACe(e){var n=e.values,a=e.colors,t=e.min,r=e.max,u=e.direction,i=u===void 0?N_.Direction.Right:u,l=e.rtl,s=l===void 0?!1:l;s&&i===N_.Direction.Right?i=N_.Direction.Left:s&&N_.Direction.Left&&(i=N_.Direction.Right);var h=n.slice(0).sort(function(y,E){return y-E}).map(function(y){return(y-t)/(r-t)*100}),p=h.reduce(function(y,E,b){return"".concat(y,", ").concat(a[b]," ").concat(E,"%, ").concat(a[b+1]," ").concat(E,"%")},"");return"linear-gradient(".concat(i,", ").concat(a[0]," 0%").concat(p,", ").concat(a[a.length-1]," 100%)")}Ga.getTrackBackground=ACe;function LCe(){}Ga.voidFn=LCe;function PCe(e){throw new Error("Didn't expect to get here")}Ga.assertUnreachable=PCe;var RV=function(e,n,a,t,r){r===void 0&&(r=function(i){return i});var u=Math.ceil(TD([e],Array.from(e.children),!0).reduce(function(i,l){var s=Math.ceil(l.getBoundingClientRect().width);if(l.innerText&&l.innerText.includes(a)&&l.childElementCount===0){var h=l.cloneNode(!0);h.innerHTML=r(n.toFixed(t)),h.style.visibility="hidden",document.body.appendChild(h),s=Math.ceil(h.getBoundingClientRect().width),document.body.removeChild(h)}return s>i?s:i},e.getBoundingClientRect().width));return u},xCe=function(e,n,a,t,r,u,i){i===void 0&&(i=function(h){return h});var l=[],s=function(h){var p=RV(a[h],t[h],r,u,i),y=n[h].x;n.forEach(function(E,b){var T=E.x,L=RV(a[b],t[b],r,u,i);h!==b&&(y>=T&&y<=T+L||y+p>=T&&y+p<=T+L)&&(l.includes(b)||(l.push(h),l.push(b),l=TD(TD([],l,!0),[h,b],!1),s(b)))})};return s(e),Array.from(new Set(l.sort()))},NCe=function(e,n,a,t,r,u){t===void 0&&(t=.1),r===void 0&&(r=" - "),u===void 0&&(u=function(b){return b});var i=(0,Ga.getStepDecimals)(t),l=(0,NA.useState)({}),s=l[0],h=l[1],p=(0,NA.useState)(u(n[a].toFixed(i))),y=p[0],E=p[1];return(0,NA.useEffect)(function(){if(e){var b=e.getThumbs();if(b.length<1)return;var T={},L=e.getOffsets(),U=xCe(a,L,b,n,r,i,u),$=u(n[a].toFixed(i));if(U.length){var z=U.reduce(function(ae,me,ke,ce){return ae.length?TD(TD([],ae,!0),[L[ce[ke]].x],!1):[L[ce[ke]].x]},[]);if(Math.min.apply(Math,z)===L[a].x){var Z=[];U.forEach(function(ae){Z.push(n[ae].toFixed(i))}),$=Array.from(new Set(Z.sort(function(ae,me){return parseFloat(ae)-parseFloat(me)}))).map(u).join(r);var ue=Math.min.apply(Math,z),X=Math.max.apply(Math,z),Y=b[U[z.indexOf(X)]].getBoundingClientRect().width;T.left="".concat(Math.abs(ue-(X+Y))/2,"px"),T.transform="translate(-50%, 0)"}else T.visibility="hidden"}E($),h(T)}},[e,n]),[y,s]};Ga.useThumbOverlap=NCe;function yV(e,n,a,t){var r=e.getBoundingClientRect(),u=r.left,i=r.top,l=r.width,s=r.height;return DV(t)?Math.abs(a-(i+s/2)):Math.abs(n-(u+l/2))}});var wV=Ae(Mi=>{"use strict";var jCe=Mi&&Mi.__extends||function(){var e=function(n,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(t[u]=r[u])},e(n,a)};return function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(n,a);function t(){this.constructor=n}n.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)}}(),UCe=Mi&&Mi.__createBinding||(Object.create?function(e,n,a,t){t===void 0&&(t=a);var r=Object.getOwnPropertyDescriptor(n,a);(!r||("get"in r?!n.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return n[a]}}),Object.defineProperty(e,t,r)}:function(e,n,a,t){t===void 0&&(t=a),e[t]=n[a]}),OCe=Mi&&Mi.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),kCe=Mi&&Mi.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var a in e)a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)&&UCe(n,e,a);return OCe(n,e),n},bV=Mi&&Mi.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;t<r;t++)(u||!(t in n))&&(u||(u=Array.prototype.slice.call(n,0,t)),u[t]=n[t]);return e.concat(u||Array.prototype.slice.call(n))};Object.defineProperty(Mi,"__esModule",{value:!0});var x1=kCe((Wa(),NR)),Rt=jA(),io=P1(),BCe=["ArrowRight","ArrowUp","k","PageUp"],HCe=["ArrowLeft","ArrowDown","j","PageDown"],qCe=function(e){jCe(n,e);function n(a){var t=e.call(this,a)||this;if(t.trackRef=x1.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(r,u){return u}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var r=t.props,u=r.direction,i=r.values,l=r.min,s=r.max,h=t.trackRef.current,p=h.getBoundingClientRect(),y=(0,Rt.getPaddingAndBorder)(h);return t.getThumbs().map(function(E,b){var T={x:0,y:0},L=E.getBoundingClientRect(),U=(0,Rt.getMargin)(E);switch(u){case io.Direction.Right:return T.x=(U.left+y.left)*-1,T.y=((L.height-p.height)/2+y.top)*-1,T.x+=p.width*(0,Rt.relativeValue)(i[b],l,s)-L.width/2,T;case io.Direction.Left:return T.x=(U.right+y.right)*-1,T.y=((L.height-p.height)/2+y.top)*-1,T.x+=p.width-p.width*(0,Rt.relativeValue)(i[b],l,s)-L.width/2,T;case io.Direction.Up:return T.x=((L.width-p.width)/2+U.left+y.left)*-1,T.y=-y.left,T.y+=p.height-p.height*(0,Rt.relativeValue)(i[b],l,s)-L.height/2,T;case io.Direction.Down:return T.x=((L.width-p.width)/2+U.left+y.left)*-1,T.y=-y.left,T.y+=p.height*(0,Rt.relativeValue)(i[b],l,s)-L.height/2,T;default:return(0,Rt.assertUnreachable)(u)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(r){return r.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(r){return t.getThumbs().findIndex(function(u){return u===r.target||u.contains(r.target)})},t.addTouchEvents=function(r){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(r){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(r){var u;if(r.button===0)if(r.persist(),r.preventDefault(),t.addMouseEvents(r.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(l){var s;return(s=l.current)===null||s===void 0?void 0:s.contains(r.target)}))return;t.setState({draggedTrackPos:[r.clientX,r.clientY]},function(){return t.onMove(r.clientX,r.clientY)})}else{var i=(0,Rt.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),r.clientX,r.clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(r.clientX,r.clientY)})}},t.onResize=function(){(0,Rt.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(r){var u;if(r.persist(),t.addTouchEvents(r.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(l){var s;return(s=l.current)===null||s===void 0?void 0:s.contains(r.target)}))return;t.setState({draggedTrackPos:[r.touches[0].clientX,r.touches[0].clientY]},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}else{var i=(0,Rt.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),r.touches[0].clientX,r.touches[0].clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(r.touches[0].clientX,r.touches[0].clientY)})}},t.onMouseOrTouchStart=function(r){if(!t.props.disabled){var u=(0,Rt.isTouchEvent)(r);if(!(!u&&r.button!==0)){var i=t.getTargetIndex(r);i!==-1&&(u?t.addTouchEvents(r):t.addMouseEvents(r),t.setState({draggedThumbIndex:i,thumbZIndexes:t.state.thumbZIndexes.map(function(l,s){return s===i?Math.max.apply(Math,t.state.thumbZIndexes):l<=t.state.thumbZIndexes[i]?l:l-1})}))}}},t.onMouseMove=function(r){r.preventDefault(),t.onMove(r.clientX,r.clientY)},t.onTouchMove=function(r){r.preventDefault(),t.onMove(r.touches[0].clientX,r.touches[0].clientY)},t.onKeyDown=function(r){var u=t.props,i=u.values,l=u.onChange,s=u.step,h=u.rtl,p=u.direction,y=t.state.isChanged,E=t.getTargetIndex(r.nativeEvent),b=h||p===io.Direction.Left||p===io.Direction.Down?-1:1;E!==-1&&(BCe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,Rt.replaceAt)(i,E,t.normalizeValue(i[E]+b*(r.key==="PageUp"?s*10:s),E)))):HCe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,Rt.replaceAt)(i,E,t.normalizeValue(i[E]-b*(r.key==="PageDown"?s*10:s),E)))):r.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){y&&t.fireOnFinalChange()}):y&&t.fireOnFinalChange())},t.onKeyUp=function(r){var u=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){u&&t.fireOnFinalChange()})},t.onMove=function(r,u){var i=t.state,l=i.draggedThumbIndex,s=i.draggedTrackPos,h=t.props,p=h.direction,y=h.min,E=h.max,b=h.onChange,T=h.values,L=h.step,U=h.rtl;if(l===-1&&s[0]===-1&&s[1]===-1)return null;var $=t.trackRef.current;if(!$)return null;var z=$.getBoundingClientRect(),Z=(0,Rt.isVertical)(p)?z.height:z.width;if(s[0]!==-1&&s[1]!==-1){var ue=r-s[0],X=u-s[1],Y=0;switch(p){case io.Direction.Right:case io.Direction.Left:Y=ue/Z*(E-y);break;case io.Direction.Down:case io.Direction.Up:Y=X/Z*(E-y);break;default:(0,Rt.assertUnreachable)(p)}if(U&&(Y*=-1),Math.abs(Y)>=L/2){for(var ae=0;ae<t.thumbRefs.length;ae++){if(T[ae]===E&&Math.sign(Y)===1||T[ae]===y&&Math.sign(Y)===-1)return;var me=T[ae]+Y;me>E?Y=E-T[ae]:me<y&&(Y=y-T[ae])}for(var ke=T.slice(0),ae=0;ae<t.thumbRefs.length;ae++)ke=(0,Rt.replaceAt)(ke,ae,t.normalizeValue(T[ae]+Y,ae));t.setState({draggedTrackPos:[r,u]}),b(ke)}}else{var ce=0;switch(p){case io.Direction.Right:ce=(r-z.left)/Z*(E-y)+y;break;case io.Direction.Left:ce=(Z-(r-z.left))/Z*(E-y)+y;break;case io.Direction.Down:ce=(u-z.top)/Z*(E-y)+y;break;case io.Direction.Up:ce=(Z-(u-z.top))/Z*(E-y)+y;break;default:(0,Rt.assertUnreachable)(p)}U&&(ce=E+y-ce),Math.abs(T[l]-ce)>=L/2&&b((0,Rt.replaceAt)(T,l,t.normalizeValue(ce,l)))}},t.normalizeValue=function(r,u){var i=t.props,l=i.min,s=i.max,h=i.step,p=i.allowOverlap,y=i.values;return(0,Rt.normalizeValue)(r,u,l,s,h,p,y)},t.onEnd=function(r){if(r.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var r=t.props,u=r.onFinalChange,i=r.values;u&&u(i)},t.updateMarkRefs=function(r){if(!r.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(r.max-r.min)/t.props.step,t.markRefs=[];for(var u=0;u<t.numOfMarks+1;u++)t.markRefs[u]=x1.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var r=window.getComputedStyle(t.trackRef.current),u=parseInt(r.width,10),i=parseInt(r.height,10),l=parseInt(r.paddingLeft,10),s=parseInt(r.paddingTop,10),h=[],p=0;p<t.numOfMarks+1;p++){var y=9999,E=9999;if(t.markRefs[p].current){var b=t.markRefs[p].current.getBoundingClientRect();y=b.height,E=b.width}t.props.direction===io.Direction.Left||t.props.direction===io.Direction.Right?h.push([Math.round(u/t.numOfMarks*p+l-E/2),-Math.round((y-i)/2)]):h.push([Math.round(i/t.numOfMarks*p+s-y/2),-Math.round((E-u)/2)])}t.setState({markOffsets:h})}},a.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,Rt.schd)(t.onMouseMove),t.schdOnTouchMove=(0,Rt.schd)(t.onTouchMove),t.schdOnEnd=(0,Rt.schd)(t.onEnd),t.thumbRefs=a.values.map(function(){return x1.createRef()}),t.updateMarkRefs(a),t}return n.prototype.componentDidMount=function(){var a=this,t=this.props,r=t.values,u=t.min,i=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",a.onResize)},unobserve:function(){return window.removeEventListener("resize",a.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,Rt.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(l){return(0,Rt.checkBoundaries)(l,a.props.min,a.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,Rt.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),r.forEach(function(l){(0,Rt.isStepDivisible)(u,l,i)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},n.prototype.componentDidUpdate=function(a,t){var r=this.props,u=r.max,i=r.min,l=r.step,s=r.values,h=r.rtl;(a.max!==u||a.min!==i||a.step!==l)&&this.updateMarkRefs(this.props),(0,Rt.translateThumbs)(this.getThumbs(),this.getOffsets(),h),(a.max!==u||a.min!==i||a.step!==l||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),s.forEach(function(p){(0,Rt.isStepDivisible)(i,p,l)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},n.prototype.componentWillUnmount=function(){var a={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,a),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},n.prototype.render=function(){var a=this,t=this.props,r=t.renderTrack,u=t.renderThumb,i=t.renderMark,l=i===void 0?function(){return null}:i,s=t.values,h=t.min,p=t.max,y=t.allowOverlap,E=t.disabled,b=this.state,T=b.draggedThumbIndex,L=b.thumbZIndexes,U=b.markOffsets;return r({props:{style:{transform:"scale(1)",cursor:T>-1?"grabbing":this.props.draggableTrack?(0,Rt.isVertical)(this.props.direction)?"ns-resize":"ew-resize":s.length===1&&!E?"pointer":"inherit"},onMouseDown:E?Rt.voidFn:this.onMouseDownTrack,onTouchStart:E?Rt.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:E,children:bV(bV([],U.map(function($,z,Z){return l({props:{style:a.props.direction===io.Direction.Left||a.props.direction===io.Direction.Right?{position:"absolute",left:"".concat($[0],"px"),marginTop:"".concat($[1],"px")}:{position:"absolute",top:"".concat($[0],"px"),marginLeft:"".concat($[1],"px")},key:"mark".concat(z),ref:a.markRefs[z]},index:z})}),!0),s.map(function($,z){var Z=a.state.draggedThumbIndex===z;return u({index:z,value:$,isDragged:Z,props:{style:{position:"absolute",zIndex:L[z],cursor:E?"inherit":Z?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:z,tabIndex:E?void 0:0,"aria-valuemax":y?p:s[z+1]||p,"aria-valuemin":y?h:s[z-1]||h,"aria-valuenow":$,draggable:!1,ref:a.thumbRefs[z],role:"slider",onKeyDown:E?Rt.voidFn:a.onKeyDown,onKeyUp:E?Rt.voidFn:a.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:io.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(x1.Component);Mi.default=qCe});var EV=Ae(au=>{"use strict";var WCe=au&&au.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(au,"__esModule",{value:!0});au.checkValuesAgainstBoundaries=au.relativeValue=au.useThumbOverlap=au.Direction=au.getTrackBackground=au.Range=void 0;var JCe=WCe(wV());au.Range=JCe.default;var N1=jA();Object.defineProperty(au,"getTrackBackground",{enumerable:!0,get:function(){return N1.getTrackBackground}});Object.defineProperty(au,"useThumbOverlap",{enumerable:!0,get:function(){return N1.useThumbOverlap}});Object.defineProperty(au,"relativeValue",{enumerable:!0,get:function(){return N1.relativeValue}});Object.defineProperty(au,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return N1.checkValuesAgainstBoundaries}});var $Ce=P1();Object.defineProperty(au,"Direction",{enumerable:!0,get:function(){return $Ce.Direction}})});var ILe={};$L(ILe,{boot:()=>ELe});var zL=function(e){return function(n){for(var a=e.length,t=n.length,r=new Array(a*t),u=0,i=0;i<a;i++)for(var l=e[i],s=0;s<t;s++)r[u++]=l(n[s]);return r}};var Cd={compose:function(e){return function(n){return function(a){return e(n(a))}}}},Fd=function(e){return e.compose};var pn=function(e){return e.identity},dn={identity:function(e){return e},Semigroupoid0:function(){return Cd}};var $e=!0;var n0=function(e){return function(n){return function(a){return function(t){return e(n(a))(n(t))}}}},Ka=function(e){return function(n){return function(a){return e(a)(n)}}},hn=function(e){return function(n){return e}};var VL=function(e){return function(n){for(var a=n.length,t=new Array(a),r=0;r<a;r++)t[r]=e(n[r]);return t}};var ge=void 0;var Qa=function(){function e(){}return e.value=new e,e}();var k=function(e){return e.map},pe=function(e){var n=k(e);return function(a){return function(t){return n(t)(a)}}},Tt=function(e){return k(e)(hn(ge))},ii=function(e){var n=k(e);return function(a){return function(t){return n(hn(t))(a)}}},Tg=function(e){var n=k(e);return function(a){return n(hn(a))}};var Gu={map:Fd(Cd)},an={map:VL};var ZY=pn(dn);var Sg={apply:zL,Functor0:function(){return an}},Yn=function(e){return e.apply},a0=function(e){var n=Yn(e),a=k(e.Functor0());return function(t){return function(r){return n(a(hn)(t))(r)}}},vo=function(e){var n=Yn(e),a=k(e.Functor0());return function(t){return function(r){return n(a(hn(ZY))(t))(r)}}},Qr=function(e){var n=Yn(e),a=k(e.Functor0());return function(t){return function(r){return function(u){return n(a(t)(r))(u)}}}};var W=function(e){return e.pure},zs=function(e){var n=W(e);return function(a){return function(t){if(!a)return t;if(a)return n(ge);throw new Error("Failed pattern match at Control.Applicative (line 68, column 1 - line 68, column 65): "+[a.constructor.name,t.constructor.name])}}},or=function(e){var n=W(e);return function(a){return function(t){if(a)return t;if(!a)return n(ge);throw new Error("Failed pattern match at Control.Applicative (line 63, column 1 - line 63, column 63): "+[a.constructor.name,t.constructor.name])}}},Gd=function(e){var n=Yn(e.Apply0()),a=W(e);return function(t){return function(r){return n(a(t))(r)}}};var KL=typeof Array.prototype.flatMap=="function"?function(e){return function(n){return e.flatMap(n)}}:function(e){return function(n){for(var a=[],t=e.length,r=0;r<t;r++)for(var u=n(e[r]),i=u.length,l=0;l<i;l++)a.push(u[l]);return a}};var nX=pn(dn),rn=function(e){return e.discard};var t0={bind:KL,Apply0:function(){return Sg}},ne=function(e){return e.bind},qa=function(e){return Ka(ne(e))},sf=function(e){var n=qa(e);return function(a){return function(t){return function(r){return n(a)(t(r))}}}};var Xe={discard:function(e){return ne(e)}},SI=function(e){var n=ne(e);return function(a){return function(t){return function(r){return n(a)(function(u){return u?t:r})}}}},El=function(e){var n=ne(e);return function(a){return n(a)(nX)}};var aX=function(e,n){if(e<1)return[];var a=new Array(e);return a.fill(n)},tX=function(e,n){for(var a=[],t=0,r=0;r<e;r++)a[t++]=n;return a},rX=typeof Array.prototype.fill=="function"?aX:tX,YL=function(){function e(r,u){this.head=r,this.tail=u}var n={};function a(r){return function(u){return new e(r,u)}}function t(r){for(var u=[],i=0,l=r;l!==n;)u[i++]=l.head,l=l.tail;return u}return function(r,u){return t(r(a)(n)(u))}}(),fo=function(e){return e.length},XL=function(e,n,a){return a.length===0?e({}):n(a[0])(a.slice(1))},ZL=function(e,n,a,t){return t<0||t>=a.length?n:e(a[t])};var e2=function(e,n,a,t){for(var r=0,u=t.length;r<u;r++)if(a(t[r]))return e(r);return n};var n2=function(e,n,a,t){if(a<0||a>=t.length)return n;var r=t.slice();return r.splice(a,1),e(r)};var Md=function(e){return e.slice().reverse()};var a2=function(e,n){return n.filter(e)};var t2=function(){function e(n,a,t,r,u,i){var l,s,h,p,y,E,b;for(l=u+(i-u>>1),l-u>1&&e(n,a,r,t,u,l),i-l>1&&e(n,a,r,t,l,i),s=u,h=l,p=u;s<l&&h<i;)y=r[s],E=r[h],b=a(n(y)(E)),b>0?(t[p++]=E,++h):(t[p++]=y,++s);for(;s<l;)t[p++]=r[s++];for(;h<i;)t[p++]=r[h++]}return function(n,a,t){var r;return t.length<2?t:(r=t.slice(0),e(n,a,r,t.slice(0),0,t.length),r)}}();var r2=function(e,n,a){for(var t=n.length<a.length?n.length:a.length,r=new Array(t),u=0;u<t;u++)r[u]=e(n[u])(a[u]);return r};var o2=function(e,n){for(var a=n.length,t=0;t<a;t++)if(!e(n[t]))return!1;return!0},u2=function(e,n){return e[n]};var i2=function(e){return function(n){return e+n}},l2=function(e){return function(n){return e.length===0?n:n.length===0?e:e.concat(n)}};var kt=function(e){return e.reflectSymbol};var r0=function(e){var n=function(a){var t;function r(u){a=u}for(;;)t=r(a);return t};return n(e)};var Mu=function(e){return function(n){return n[e]}};var CI=function(e){return function(n){var a={};for(var t in n)t!==e&&{}.hasOwnProperty.call(n,t)&&(a[t]=n[t]);return a}};var Cg={append:function(e){return function(n){return ge}}},ff={append:i2};var St={append:l2};var un=function(e){return e.append},Vs=function(e){var n=un(e);return{append:function(a){return function(t){return function(r){return n(a(r))(t(r))}}}}};var da=function(e){return e.alt};var Qs=function(e){return e.defer};var c2=function(e){var n=ne(e.Bind1()),a=or(e.Applicative0());return function(t){return function(r){return n(t)(function(u){return a(u)(r)})}}},Gg=function(e){var n=ne(e.Bind1()),a=zs(e.Applicative0());return function(t){return function(r){return n(t)(function(u){return a(u)(r)})}}};var Bi=function(e){var n=ne(e.Bind1()),a=W(e.Applicative0());return function(t){return function(r){return n(t)(function(u){return n(r)(function(i){return a(u(i))})})}}};var s2=2147483647,v2=-2147483648,f2=String.fromCharCode(65535),_2=String.fromCharCode(0),oX=Number.POSITIVE_INFINITY,uX=Number.NEGATIVE_INFINITY;var Mg=function(e){return function(n){return function(a){return function(t){return function(r){return t<r?e:t===r?n:a}}}}};var p2=Mg,d2=Mg,m2=Mg,h2=Mg;var Ad=function(e){return function(n){return e===n}},D2=Ad,g2=Ad,R2=Ad,y2=Ad,b2=Ad;var Bt={eq:b2},Qc={eqRecord:function(e){return function(n){return function(a){return!0}}}},w2=function(e){return e.eqRecord},Kc=function(){return function(e){return{eq:w2(e)(Qa.value)}}};var Ld={eq:R2},ut={eq:g2},Pd={eq:y2},Yc={eq:D2};var Ee=function(e){return e.eq},iX=Ee(Yc);var Yl=function(e){var n=w2(e);return function(){return function(a){var t=kt(a);return function(r){var u=Ee(r);return{eqRecord:function(i){return function(l){return function(s){var h=n(Qa.value)(l)(s),p=t(Qa.value),y=Mu(p);return u(y(l))(y(s))&&h}}}}}}}},Bo=function(e){var n=Ee(e);return function(a){return function(t){return iX(n(a)(t))(!1)}}};var Re=function(){function e(){}return e.value=new e,e}(),he=function(){function e(){}return e.value=new e,e}(),qe=function(){function e(){}return e.value=new e,e}();var Ag={append:function(e){return function(n){if(e instanceof Re)return Re.value;if(e instanceof he)return he.value;if(e instanceof qe)return n;throw new Error("Failed pattern match at Data.Ordering (line 21, column 1 - line 24, column 18): "+[e.constructor.name,n.constructor.name])}}},E2=function(e){if(e instanceof he)return Re.value;if(e instanceof qe)return qe.value;if(e instanceof Re)return he.value;throw new Error("Failed pattern match at Data.Ordering (line 33, column 1 - line 33, column 31): "+[e.constructor.name])},_f={eq:function(e){return function(n){return e instanceof Re&&n instanceof Re||e instanceof he&&n instanceof he||e instanceof qe&&n instanceof qe}}};var I2=function(e){return function(n){return e-n|0}};var T2=function(e){return function(n){return e+n|0}},S2=function(e){return function(n){return e*n|0}};var Hi=function(e){return e.zero};var Xc={add:T2,zero:0,mul:S2,one:1};var Lg=function(e){return e.sub};var Zl={sub:I2,Semiring0:function(){return Xc}};var Pg=function(e){var n=Lg(e),a=Hi(e.Semiring0());return function(t){return n(a)(t)}};var et=function(){return{compare:m2(Re.value)(qe.value)(he.value),Eq0:function(){return Bt}}}();var Zc=function(){return{compare:d2(Re.value)(qe.value)(he.value),Eq0:function(){return Ld}}}(),ra=function(){return{compare:p2(Re.value)(qe.value)(he.value),Eq0:function(){return ut}}}(),xg=function(){return{compare:h2(Re.value)(qe.value)(he.value),Eq0:function(){return Pd}}}();var Ze=function(e){return e.compare};var Il=function(e){var n=Ze(e);return function(a){return function(t){return function(r){return n(a(t))(a(r))}}}},xd=function(e){var n=Ze(e);return function(a){return function(t){var r=n(a)(t);return r instanceof he}}},ec=function(e){var n=Ze(e);return function(a){return function(t){var r=n(a)(t);return!(r instanceof Re)}}},Ys=function(e){var n=Ze(e);return function(a){return function(t){var r=n(a)(t);return r instanceof Re}}};var Nd=function(e){var n=Ze(e);return function(a){return function(t){var r=n(a)(t);return!(r instanceof he)}}},es=function(e){var n=Ze(e);return function(a){return function(t){var r=n(a)(t);if(r instanceof Re)return t;if(r instanceof qe||r instanceof he)return a;throw new Error("Failed pattern match at Data.Ord (line 181, column 3 - line 184, column 12): "+[r.constructor.name])}}};var GI=function(e){var n=ec(e);return function(a){var t=Hi(a.Semiring0()),r=Pg(a);return function(u){var i=n(u)(t);return i?u:r(u)}}};var Vt=function(e){return e.top};var jd={top:s2,bottom:v2,Ord0:function(){return ra}},Xs={top:f2,bottom:_2,Ord0:function(){return xg}};var rt=function(e){return e.bottom};var L2=function(e){return e.toString()},P2=function(e){var n=e.toString();return isNaN(n+".0")?n:n+".0"},x2=function(e){var n=e.charCodeAt(0);if(n<32||n===127){switch(e){case"\x07":return"'\\a'";case"\b":return"'\\b'";case"\f":return"'\\f'";case` `:return"'\\n'";case"\r":return"'\\r'";case" ":return"'\\t'";case"\v":return"'\\v'"}return"'\\"+n.toString(10)+"'"}return e==="'"||e==="\\"?"'\\"+e+"'":"'"+e+"'"},N2=function(e){var n=e.length;return'"'+e.replace(/[\0-\x1F\x7F"\\]/g,function(a,t){switch(a){case'"':case"\\":return"\\"+a;case"\x07":return"\\a";case"\b":return"\\b";case"\f":return"\\f";case` `:return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\v":return"\\v"}var r=t+1,u=r<n&&e[r]>="0"&&e[r]<="9"?"\\&":"";return"\\"+a.charCodeAt(0).toString(10)+u})+'"'};var Ht={show:N2};var j2=function(e){return e.showRecordFields},pf=function(){return function(){return function(e){var n=j2(e);return{show:function(a){return"{"+(n(Qa.value)(a)+"}")}}}}};var df={show:P2},on={show:L2},Ud={show:x2},u0={show:function(e){if(e)return"true";if(!e)return"false";throw new Error("Failed pattern match at Data.Show (line 29, column 1 - line 31, column 23): "+[e.constructor.name])}},re=function(e){return e.show};var mf=function(e){var n=kt(e);return function(a){var t=j2(a);return function(r){var u=re(r);return{showRecordFields:function(i){return function(l){var s=t(Qa.value)(l),h=n(Qa.value),p=Mu(h)(l);return" "+(h+(": "+(u(p)+(","+s))))}}}}}},hf=function(e){var n=kt(e);return function(a){var t=re(a);return{showRecordFields:function(r){return function(u){var i=n(Qa.value),l=Mu(i)(u);return" "+(i+(": "+(t(l)+" ")))}}}}};var be=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ve=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Be=function(){function e(){}return e.value=new e,e}(),Od=function(e){return e};var i0=function(e){return e.to};var l0=function(e){return e.from};var vX=pn(dn),M=function(){function e(){}return e.value=new e,e}(),S=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var U2=function(e){var n=un(e);return{append:function(a){return function(t){if(a instanceof M)return t;if(t instanceof M)return a;if(a instanceof S&&t instanceof S)return new S(n(a.value0)(t.value0));throw new Error("Failed pattern match at Data.Maybe (line 182, column 1 - line 185, column 43): "+[a.constructor.name,t.constructor.name])}}}};var In=function(e){return function(n){return function(a){if(a instanceof M)return e;if(a instanceof S)return n(a.value0);throw new Error("Failed pattern match at Data.Maybe (line 237, column 1 - line 237, column 51): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},Ct=In(!0)(hn(!1)),xt=In(!1)(hn(!0));var oe={map:function(e){return function(n){return n instanceof S?new S(e(n.value0)):M.value}}},fX=k(oe);var ze=function(e){return In(e)(vX)},Ft=function(){return function(e){if(e instanceof S)return e.value0;throw new Error("Failed pattern match at Data.Maybe (line 288, column 1 - line 288, column 46): "+[e.constructor.name])}};var Qt=function(e){var n=Ee(e);return{eq:function(a){return function(t){return a instanceof M&&t instanceof M?!0:a instanceof S&&t instanceof S?n(a.value0)(t.value0):!1}}}},uu=function(e){var n=Ze(e),a=Qt(e.Eq0());return{compare:function(t){return function(r){if(t instanceof M&&r instanceof M)return qe.value;if(t instanceof M)return Re.value;if(r instanceof M)return he.value;if(t instanceof S&&r instanceof S)return n(t.value0)(r.value0);throw new Error("Failed pattern match at Data.Maybe (line 0, column 0 - line 0, column 0): "+[t.constructor.name,r.constructor.name])}},Eq0:function(){return a}}};var fr={apply:function(e){return function(n){if(e instanceof S)return fX(e.value0)(n);if(e instanceof M)return M.value;throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 69, column 30): "+[e.constructor.name,n.constructor.name])}},Functor0:function(){return oe}};var tn={bind:function(e){return function(n){if(e instanceof S)return n(e.value0);if(e instanceof M)return M.value;throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): "+[e.constructor.name,n.constructor.name])}},Apply0:function(){return fr}};var _a=function(){return{pure:S.create,Apply0:function(){return fr}}}();var Kr={alt:function(e){return function(n){return e instanceof M?n:e}},Functor0:function(){return oe}},_X=function(){return{empty:M.value,Alt0:function(){return Kr}}}(),Yr={Applicative0:function(){return _a},Plus1:function(){return _X}};var xe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Oe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var s0=function(e){return In(new xe(e))(Oe.create)};var Dr={map:function(e){return function(n){if(n instanceof xe)return new xe(n.value0);if(n instanceof Oe)return new Oe(e(n.value0));throw new Error("Failed pattern match at Data.Either (line 0, column 0 - line 0, column 0): "+[n.constructor.name])}}},pX=k(Dr);var qt=function(e){return function(n){return function(a){if(a instanceof xe)return e(a.value0);if(a instanceof Oe)return n(a.value0);throw new Error("Failed pattern match at Data.Either (line 208, column 1 - line 208, column 64): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},kd=function(){return qt(hn(M.value))(S.create)}();var Bd={apply:function(e){return function(n){if(e instanceof xe)return new xe(e.value0);if(e instanceof Oe)return pX(e.value0)(n);throw new Error("Failed pattern match at Data.Either (line 70, column 1 - line 72, column 30): "+[e.constructor.name,n.constructor.name])}},Functor0:function(){return Dr}};var Au={bind:qt(function(e){return function(n){return new xe(e)}})(function(e){return function(n){return n(e)}}),Apply0:function(){return Bd}};var Zs=function(){return{pure:Oe.create,Apply0:function(){return Bd}}}(),Ng={Applicative0:function(){return Zs},Bind1:function(){return Au}};var ci=function(e){return e};var ns={map:function(e){return function(n){return e(n)}}};var O2={apply:function(e){return function(n){return e(n)}},Functor0:function(){return ns}},dX={bind:function(e){return function(n){return n(e)}},Apply0:function(){return O2}},k2={pure:ci,Apply0:function(){return O2}},vr={Applicative0:function(){return k2},Bind1:function(){return dX}};var B2=function(e){return Math.min(Math.abs(e),2147483647)},H2=function(e){return function(n){return n===0?0:n>0?Math.floor(e/n):-Math.floor(e/-n)}},q2=function(e){return function(n){if(n===0)return 0;var a=Math.abs(n);return(e%a+a)%a}};var MI={Ring0:function(){return Zl}};var So=function(e){return e.mod};var ur={degree:B2,div:H2,mod:q2,CommutativeRing0:function(){return MI}},_o=function(e){return e.div};var bt={mempty:"",Semigroup0:function(){return ff}};var nt=function(e){return e.mempty};var J2=function(e){return function(){return e}},$2=function(e){return function(n){return function(){return n(e())()}}};var AI=function(e){return function(n){return function(){for(var a=0,t=e.length;a<t;a++)n(e[a])()}}};var z2=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},nc={Applicative0:function(){return ft},Bind1:function(){return er}},er={bind:$2,Apply0:function(){return LI(0)}},ft={pure:J2,Apply0:function(){return LI(0)}},V2=z2("functorEffect","Effect",function(){return{map:Gd(ft)}}),LI=z2("applyEffect","Effect",function(){return{apply:Bi(nc),Functor0:function(){return V2(0)}}}),Hn=V2(20),Q2=LI(23),mX=Qr(Q2),PI=function(e){return{append:mX(un(e))}};var K2=function(e){return function(){return{value:e}}};var ac=function(e){return function(){return e.value}};var as=function(e){return function(n){return function(){n.value=e}}};var ts=K2;var Kt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Wt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Co=function(e){return e.tailRecM};var Y2=function(e){var n=function(a){var t=!1,r;function u(i){if(i instanceof Kt){a=e(i.value0);return}if(i instanceof Wt)return t=!0,i.value0;throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 103, column 3 - line 103, column 25): "+[i.constructor.name])}for(;!t;)r=u(a);return r};return function(a){return n(e(a))}};var Hd={tailRecM:function(e){var n=function(t){return t},a=Y2(function(t){return n(e(t))});return function(t){return ci(a(t))}},Monad0:function(){return vr}};var X2={tailRecM:function(e){return function(n){var a=function(t){if(t instanceof xe)return new Wt(new xe(t.value0));if(t instanceof Oe&&t.value0 instanceof Kt)return new Kt(e(t.value0.value0));if(t instanceof Oe&&t.value0 instanceof Wt)return new Wt(new Oe(t.value0.value0));throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 145, column 7 - line 145, column 33): "+[t.constructor.name])};return Y2(a)(e(n))}},Monad0:function(){return Ng}};var Z2={bimap:function(e){return function(n){return function(a){if(a instanceof Kt)return new Kt(e(a.value0));if(a instanceof Wt)return new Wt(n(a.value0));throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 33, column 1 - line 35, column 34): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}}};var e3=function(e){return function(n){return function(){return e(n())}}},n3=function(e){return function(){return e}},a3=function(e){return function(n){return function(){return n(e())()}}};function NI(e){return function(n){return function(a){return function(){for(var t=e;t<n;t++)a(t)()}}}}var qd=function(e){return function(n){return function(){for(var a=0,t=e.length;a<t;a++)n(e[a])()}}};var gX=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}};var Df={map:e3};var jg={Applicative0:function(){return Ug},Bind1:function(){return Wd}},Wd={bind:a3,Apply0:function(){return u3(0)}},Ug={pure:n3,Apply0:function(){return u3(0)}},u3=gX("applyST","Control.Monad.ST.Internal",function(){return{apply:Bi(jg),Functor0:function(){return Df}}});function jI(){return[]}function i3(e){return e}var l3=i3,c3=i3;function RX(e){return e.slice()}var s3=RX;var yX=function(){function e(n,a,t,r,u,i){var l,s,h,p,y,E,b;for(l=u+(i-u>>1),l-u>1&&e(n,a,r,t,u,l),i-l>1&&e(n,a,r,t,l,i),s=u,h=l,p=u;s<l&&h<i;)y=r[s],E=r[h],b=a(n(y)(E)),b>0?(t[p++]=E,++h):(t[p++]=y,++s);for(;s<l;)t[p++]=r[s++];for(;h<i;)t[p++]=r[h++]}return function(n,a,t){return t.length<2||e(n,a,t,t.slice(0),0,t.length),t}}();var v3=function(e,n){return n.push(e)};var Jd=function(n){return function(a){return function(){return n(a)}}},UI=function(n){return function(a){return function(t){return function(){return n(a,t)}}}};var EX=ne(Wd);var OI=Jd(c3),v0=Jd(l3);var IX=Jd(s3),f3=function(e){return function(n){return function(){var t=IX(n)();return e(t)(),v0(t)()}}};var _3=function(e){return EX(e)(v0)()};var ev=UI(v3);var p3=function(e){return function(n){return e&&n}},d3=function(e){return function(n){return e||n}},m3=function(e){return!e};var f0=function(e){return e.tt};var Gr=function(e){return e.not};var kI=function(e){return e.implies};var _0=function(e){return e.ff};var rs=function(e){return e.disj},it={ff:!1,tt:!0,implies:function(e){return function(n){return rs(it)(Gr(it)(e))(n)}},conj:p3,disj:d3,not:m3};var tc=function(e){return e.conj},Ho=function(e){var n=_0(e),a=f0(e),t=kI(e),r=tc(e),u=rs(e),i=Gr(e);return{ff:function(l){return n},tt:function(l){return a},implies:function(l){return function(s){return function(h){return t(l(h))(s(h))}}},conj:function(l){return function(s){return function(h){return r(l(h))(s(h))}}},disj:function(l){return function(s){return function(h){return u(l(h))(s(h))}}},not:function(l){return function(s){return i(l(s))}}}};var h3=function(e){return function(n){return function(a){for(var t=n,r=a.length,u=r-1;u>=0;u--)t=e(a[u])(t);return t}}},D3=function(e){return function(n){return function(a){for(var t=n,r=a.length,u=0;u<r;u++)t=e(t)(a[u]);return t}}};var iu=function(e){return e.empty};var Dn=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var Mr=function(e){return e.value1};var Fo=function(e){return e.value0};var d0=function(e){return function(n){return function(a){return e(new Dn(n,a))}}};var CX=pn(dn),lt=function(e){return e.bimap},_r=function(e){var n=lt(e);return function(a){return n(a)(CX)}};var Lu={bimap:function(e){return function(n){return function(a){if(a instanceof xe)return new xe(e(a.value0));if(a instanceof Oe)return new Oe(n(a.value0));throw new Error("Failed pattern match at Data.Bifunctor (line 32, column 1 - line 34, column 36): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}}};var $d=function(e){return e};var PX=function(e){var n=tc(e);return{append:function(a){return function(t){return n(a)(t)}}}};var BI=function(e){var n=PX(e);return{mempty:f0(e),Semigroup0:function(){return n}}};var zd=function(e){return e};var xX=function(e){var n=rs(e);return{append:function(a){return function(t){return n(a)(t)}}}};var HI=function(e){var n=xX(e);return{mempty:_0(e),Semigroup0:function(){return n}}};var Je=function(e){return e};var lu=function(){return Je};var kg=lu(),Rf=function(){return kg};var Aa=function(){return kg};var qI=function(){return function(){return function(e){return kg}}};var h0=function(){return function(){return function(){return function(){return function(e){return kg}}}}};var JI=pn(dn);var y3=h0()()()(),nr=function(e){return e.foldr};var nv=function(e){var n=vo(e.Apply0()),a=W(e);return function(t){var r=nr(t);return function(u){return r(function(i){return n(u(i))})(a(ge))}}},qo=function(e){var n=nv(e);return function(a){return Ka(n(a))}},$I=function(e){var n=nv(e);return function(a){return n(a)(JI)}},Gt=function(e){return e.foldl};var cu=function(e){var n=Gt(e);return function(a){var t=un(a.Semigroup0()),r=nt(a);return function(u){return function(i){var l=function(s){return function(h){return s.init?{init:!1,acc:h}:{init:!1,acc:t(s.acc)(t(u)(h))}}};return n(l)({init:!0,acc:r})(i).acc}}}};var Pu={foldr:function(e){return function(n){return function(a){if(a instanceof M)return n;if(a instanceof S)return e(a.value0)(n);throw new Error("Failed pattern match at Data.Foldable (line 138, column 1 - line 144, column 27): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},foldl:function(e){return function(n){return function(a){if(a instanceof M)return n;if(a instanceof S)return e(n)(a.value0);throw new Error("Failed pattern match at Data.Foldable (line 138, column 1 - line 144, column 27): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},foldMap:function(e){var n=nt(e);return function(a){return function(t){if(t instanceof M)return n;if(t instanceof S)return a(t.value0);throw new Error("Failed pattern match at Data.Foldable (line 138, column 1 - line 144, column 27): "+[a.constructor.name,t.constructor.name])}}}};var b3=function(e){var n=nr(e);return function(a){var t=un(a.Semigroup0()),r=nt(a);return function(u){return n(function(i){return function(l){return t(u(i))(l)}})(r)}}},We={foldr:h3,foldl:D3,foldMap:function(e){return b3(We)(e)}};var Ar=function(e){return e.foldMap};var gr=function(e){var n=Ar(e);return function(a){return n(a)(JI)}};var av=function(e){var n=Gt(e);return function(a){var t=function(r){return function(u){return r instanceof M&&a(u)?new S(u):r}};return n(t)(M.value)}},xu=function(e){var n=Ar(e);return function(a){return y3(zd)(n(HI(a)))}},su=function(e){var n=xu(e)(it);return function(a){var t=Ee(a);return function(r){return n(t(r))}}},rc=function(e){var n=su(e);return function(a){var t=n(a);return function(r){var u=t(r);return function(i){return!u(i)}}}};var D0=function(e){var n=Ar(e);return function(a){return y3($d)(n(BI(a)))}},zI=function(e){var n=D0(e);return function(a){return n(a)(JI)}};var Bg=function(e){return function(n,a,t,r,u){return e(n)(a)(t)(r)(u)}};var qi=function(e){return function(n){return function(a){return e(n,a)}}},tv=function(e){return function(n){return function(a){return function(t){return e(n,a,t)}}}},yf=function(e){return function(n){return function(a){return function(t){return function(r){return e(n,a,t,r)}}}}};var w3=function(e){return function(n){for(var a=n.length,t=Array(a),r=0;r<a;r++)t[r]=e(r)(n[r]);return t}};var oc=function(e){return e.mapWithIndex};var rv={mapWithIndex:w3,Functor0:function(){return an}};var E3=function(){function e(r){return[r]}function n(r){return function(u){return[r,u]}}function a(r){return function(u){return function(i){return[r,u,i]}}}function t(r){return function(u){return r.concat(u)}}return function(r){return function(u){return function(i){return function(l){return function(s){function h(p,y){switch(y-p){case 0:return i([]);case 1:return u(e)(l(s[p]));case 2:return r(u(n)(l(s[p])))(l(s[p+1]));case 3:return r(r(u(a)(l(s[p])))(l(s[p+1])))(l(s[p+2]));default:var E=p+Math.floor((y-p)/4)*2;return r(u(t)(h(p,E)))(h(E,y))}}return h(0,s.length)}}}}}}();var DZ=pn(dn),Go=function(e){return e.traverse};var Kd={traverse:function(e){var n=W(e),a=k(e.Apply0().Functor0());return function(t){return function(r){if(r instanceof M)return n(M.value);if(r instanceof S)return a(S.create)(t(r.value0));throw new Error("Failed pattern match at Data.Traversable (line 115, column 1 - line 119, column 33): "+[t.constructor.name,r.constructor.name])}}},sequence:function(e){var n=W(e),a=k(e.Apply0().Functor0());return function(t){if(t instanceof M)return n(M.value);if(t instanceof S)return a(S.create)(t.value0);throw new Error("Failed pattern match at Data.Traversable (line 115, column 1 - line 119, column 33): "+[t.constructor.name])}},Functor0:function(){return oe},Foldable1:function(){return Pu}};var gZ=function(e){var n=Go(e);return function(a){return n(a)(DZ)}},si={traverse:function(e){var n=e.Apply0();return E3(Yn(n))(k(n.Functor0()))(W(e))},sequence:function(e){return gZ(si)(e)},Functor0:function(){return an},Foldable1:function(){return We}};var g0=function(e){return function(n){var a=Go(n)(e);return function(t){return function(r){return a(r)(t)}}}};var G3=function(e){return function(n){return function(a){return function(t){return function(r){return function(u){for(var i=[],l=u;;){var s=r(l);if(e(s))return i;var h=n(s);i.push(a(h)),l=t(h)}}}}}}};var M3=function(e){return function(n){return function(a){return function(t){return function(r){return function(u){for(var i=[],l=u;;){var s=r(l);i.push(a(s));var h=t(s);if(e(h))return i;l=n(h)}}}}}}};var EZ=Ft(),wf=function(e){return e.unfoldr1};var Hg={unfoldr1:M3(Ct)(EZ)(Fo)(Mr)};var SZ=Ft(),uc=function(e){return e.unfoldr};var Wo={unfoldr:G3(Ct)(SZ)(Fo)(Mr),Unfoldable10:function(){return Hg}};var L3=Tt(Df);var FZ=k(an),GZ=k(Df),P3=Ft(),MZ=or(Ug),AZ=Bo(_f);var LZ=gr(We),PZ=un(St);var XI=tv(r2);var ZI=function(){return qi(u2)},xZ=ZI(),Yd=function(){return tv(XL)(hn(M.value))(function(e){return function(n){return new S({head:e,tail:n})}})}();var Ef=function(e){return tv(t2)(e)(function(n){if(n instanceof he)return 1;if(n instanceof qe)return 0;if(n instanceof Re)return-1|0;throw new Error("Failed pattern match at Data.Array (line 897, column 38 - line 900, column 11): "+[n.constructor.name])})},Jo=function(e){var n=Il(e);return function(a){return Ef(n(a))}},NZ=Jo(ra);var R0=function(e){return function(n){return f3(ev(n))(e)()}};var qg=function(e){return[e]};var vi=function(e){return fo(e)===0};var eT=oc(rv),nT=function(e){return function(n){var a=fo(n);if(a<2)return n;if($e)return _3(function(){var t=function(r){return xZ(n)(r)};return function(){var u=jI();return ev(t(0))(u)(),NI(1)(a)(function(i){return function(){return ev(e)(u)(),L3(ev(t(i))(u))()}})(),u}}());throw new Error("Failed pattern match at Data.Array (line 623, column 21 - line 633, column 17): "+[a.constructor.name])}};var If=function(){return yf(ZL)(S.create)(M.value)}(),Xd=function(e){return If(e)(fo(e)-1|0)};var y0=function(e){return If(e)(0)},x3=function(e){return function(n){var a=Ef(function(r){return function(u){return e(Mr(r))(Mr(u))}})(eT(Dn.create)(n)),t=y0(a);if(t instanceof M)return[];if(t instanceof S)return FZ(Mr)(NZ(Fo)(function(){var u=OI(qg(t.value0))();return qd(a)(function(i){return function(){var s=GZ(function(){var h=function(p){return P3(Xd(p))};return function(p){return Mr(h(p))}}())(v0(u))();return MZ(AZ(e(s)(i.value1))(qe.value))(L3(ev(i)(u)))()}})(),v0(u)()}()));throw new Error("Failed pattern match at Data.Array (line 1115, column 17 - line 1123, column 28): "+[t.constructor.name])}},Wg=function(e){return x3(Ze(e))};var Jg=function(e){return qi(YL)(nr(e))};var N3=function(e){return LZ(e)};var j3=function(){return yf(e2)(S.create)(M.value)}();var $o=qi(a2);var U3=function(){return yf(n2)(S.create)(M.value)}(),O3=function(e){return function(n){return function(a){return a.length===0?[]:In(a)(function(t){return P3(U3(t)(a))})(j3(e(n))(a))}}},Tf=function(e){return O3(Ee(e))};var zo=function(e){return function(n){return PZ([e])(n)}},b0=function(e){var n=Yn(e.Applicative0().Apply0()),a=k(e.Plus1().Alt0().Functor0());return function(t){var r=Qs(t);return function(u){return n(a(zo)(u))(r(function(i){return aT(e)(t)(u)}))}}},aT=function(e){var n=da(e.Plus1().Alt0()),a=W(e.Applicative0());return function(t){return function(r){return n(b0(e)(t)(r))(a([]))}}},k3=Ka(ne(t0)),Xr=function(e){return k3(function(){var n=In([])(qg);return function(a){return n(e(a))}}())};var vu=Xr(pn(dn));var tT=qi(o2);var Nu=null;function B3(e,n,a){return e==null?n:a(e)}function fu(e){return e}var Ta=In(Nu)(fu),_e=function(e){return B3(e,M.value,S.create)};function H3(e){return typeof e=="string"}function rT(e){return typeof e=="number"}function q3(e){return typeof e=="boolean"}function W3(e){return e instanceof Object}function J3(e){return e instanceof Function}function Zd(e){return e===null?"<null>":e===void 0?"<undefined>":e instanceof Date?e.toString():typeof Blob!="undefined"&&e instanceof Blob?"file["+e.name+"]":JSON.stringify(e)}var jZ=nr(We),$3=oc(rv),UZ=Gt(We);var em=function(e){return e.foldrWithIndex};var nm=function(e){return e.foldlWithIndex};var OZ=function(e){var n=em(e);return function(a){var t=un(a.Semigroup0()),r=nt(a);return function(u){return n(function(i){return function(l){return function(s){return t(u(i)(l))(s)}}})(r)}}},am={foldrWithIndex:function(e){return function(n){var a=jZ(function(r){return function(u){return e(r.value0)(r.value1)(u)}})(n),t=$3(Dn.create);return function(r){return a(t(r))}}},foldlWithIndex:function(e){return function(n){var a=UZ(function(r){return function(u){return e(u.value0)(r)(u.value1)}})(n),t=$3(Dn.create);return function(r){return a(t(r))}}},foldMapWithIndex:function(e){return OZ(am)(e)},Foldable0:function(){return We}};var z3=function(e){var n=nm(e);return function(a){var t=function(r){return function(u){return function(i){return u instanceof M?a(r)(i):u}}};return n(t)(M.value)}};var V3=function(e){return function(n){return function(a){return(a|0)===a?e(a):n}}},Mt=function(e){return e},Q3=function(e){return function(n){return function(a){var t;a<11?t="[0-"+(a-1).toString()+"]":a===11?t="[0-9a]":t="[0-9a-"+String.fromCharCode(86+a)+"]";var r=new RegExp("^[\\+\\-]?"+t+"+$","i");return function(u){if(r.test(u)){var i=parseInt(u,a);return(i|0)===i?e(i):n}else return n}}}};var $g=isFinite;var zg=Math.abs;var w0=Math.floor,oT=Math.log;var Vg=function(e){return function(n){return Math.pow(e,n)}};var Sf=Math.round;var K3=2.302585092994046;var Y3=Vt(jd),X3=rt(jd);var JZ=function(){return Q3(S.create)(M.value)}(),ic=JZ(10),Cf=function(){return V3(S.create)(M.value)}(),Z3=function(e){if(!$g(e))return 0;if(e>=Mt(Y3))return Y3;if(e<=Mt(X3))return X3;if($e)return ze(0)(Cf(e));throw new Error("Failed pattern match at Data.Int (line 72, column 1 - line 72, column 29): "+[e.constructor.name])},Qg=function(e){return Z3(Sf(e))};var po=function(e){return Z3(w0(e))};function Kg(e){return Object.prototype.toString.call(e).slice(8,-1)}function tm(e){return e===null}function Ff(e){return e===void 0}var Yg=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function eP(e){return e.stack||e.toString()}function _u(e){return new Error(e)}function E0(e){return e.message}function Xg(e){return function(){throw e}}var aP=function(e){return Xg(_u(e))};var tP={show:eP};var Lr=function(e){return e.throwError};var Nt=function(e){return e.catchError};var Gf=function(e){var n=Nt(e),a=e.MonadThrow0().Monad0(),t=k(a.Bind1().Apply0().Functor0()),r=W(a.Applicative0());return function(u){return n(t(Oe.create)(u))(function(i){return r(xe.create(i))})}};var Rr={liftEffect:pn(dn),Monad0:function(){return nc}},Rn=function(e){return e.liftEffect};var $Z=k(Dr);var iT=function(e){return e};var nR=function(e){return e};var aR=function(e){return function(n){return e(n)}},tR=function(e){var n=k(e);return{map:function(a){return aR(n($Z(a)))}}};var oP=function(e){return{Applicative0:function(){return os(e)},Bind1:function(){return Af(e)}}},Af=function(e){var n=ne(e.Bind1()),a=W(e.Applicative0());return{bind:function(t){return function(r){return n(t)(qt(function(u){return a(xe.create(u))})(function(u){var i=r(u);return i}))}},Apply0:function(){return lT(e)}}},lT=function(e){var n=tR(e.Bind1().Apply0().Functor0());return{apply:Bi(oP(e)),Functor0:function(){return n}}},os=function(e){return{pure:function(){var n=W(e.Applicative0());return function(a){return iT(n(Oe.create(a)))}}(),Apply0:function(){return lT(e)}}};var uP=function(e){var n=oP(e);return{throwError:function(){var a=W(e.Applicative0());return function(t){return iT(a(xe.create(t)))}}(),Monad0:function(){return n}}};var rR=function(e){var n=un(e);return function(a){var t=a.Bind1(),r=ne(t),u=W(a.Applicative0()),i=tR(t.Apply0().Functor0());return{alt:function(l){return function(s){return r(l)(function(h){if(h instanceof Oe)return u(new Oe(h.value0));if(h instanceof xe)return r(s)(function(p){if(p instanceof Oe)return u(new Oe(p.value0));if(p instanceof xe)return u(new xe(n(h.value0)(p.value0)));throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 87, column 9 - line 89, column 49): "+[p.constructor.name])});throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 83, column 5 - line 89, column 49): "+[h.constructor.name])})}},Functor0:function(){return i}}}};var ju=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var iR=function(e){var n=iu(e);return function(a){return new ju(a,n)}};var cT=function(e){var n=k(e);return{map:function(a){return function(t){return new ju(a(t.value0),n(a)(t.value1))}}}};var sT=function(e){var n=Ar(e),a=Gt(e),t=nr(e);return{foldMap:function(r){var u=un(r.Semigroup0()),i=n(r);return function(l){return function(s){return u(l(s.value0))(i(l)(s.value1))}}},foldl:function(r){return function(u){return function(i){return a(r)(r(u)(i.value0))(i.value1)}}},foldr:function(r){return function(u){return function(i){return r(i.value0)(t(r)(u)(i.value1))}}}}};var Yt=function(){function e(){}return e.value=new e,e}(),tt=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),lR=function(e){return e},nee=function(e){return new tt(e.value0,e.value1)};var aee=function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,h){if(h instanceof tt&&h.value1 instanceof tt&&h.value1.value1 instanceof tt){r=new tt(h,s),t=h.value1.value1.value1;return}var p=function(E){return E instanceof tt&&E.value1 instanceof tt&&E.value1.value1 instanceof Yt?new tt(e(E.value0),new tt(e(E.value1.value0),Yt.value)):E instanceof tt&&E.value1 instanceof Yt?new tt(e(E.value0),Yt.value):Yt.value},y=function(E){return function(b){var T=E,L=!1,U;function $(z,Z){if(z instanceof tt&&z.value0 instanceof tt&&z.value0.value1 instanceof tt&&z.value0.value1.value1 instanceof tt){T=z.value1,b=new tt(e(z.value0.value0),new tt(e(z.value0.value1.value0),new tt(e(z.value0.value1.value1.value0),Z)));return}return L=!0,Z}for(;!L;)U=$(T,b);return U}};return u=!0,y(s)(p(h))}for(;!u;)i=l(r,t);return i}};return n(Yt.value)},sP={map:aee};var vT=cT(sP),Mo={foldr:function(e){return function(n){var a=function(){var r=function(u){return function(i){var l=u,s=!1,h;function p(y,E){if(E instanceof Yt)return s=!0,y;if(E instanceof tt){l=new tt(E.value0,y),i=E.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 107, column 7 - line 107, column 23): "+[y.constructor.name,E.constructor.name])}for(;!s;)h=p(l,i);return h}};return r(Yt.value)}(),t=Gt(Mo)(Ka(e))(n);return function(r){return t(a(r))}}},foldl:function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,h){if(h instanceof Yt)return u=!0,s;if(h instanceof tt){r=e(s)(h.value0),t=h.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 111, column 12 - line 113, column 30): "+[h.constructor.name])}for(;!u;)i=l(r,t);return i}};return n},foldMap:function(e){var n=un(e.Semigroup0()),a=nt(e);return function(t){return Gt(Mo)(function(r){var u=n(r);return function(i){return u(t(i))}})(a)}}};var tee=nr(Mo);var cR=sT(Mo);var fT={append:function(e){return function(n){return tee(tt.create)(n)(e)}}},vP=un(fT);var sR={append:function(e){return function(n){return new ju(e.value0,vP(e.value1)(nee(n)))}}};var ree={alt:vP,Functor0:function(){return sP}},fP=function(){return{empty:Yt.value,Alt0:function(){return ree}}}();var fee=lt(Z2);var mP=function(e){return new tt(e,Yt.value)};var _T=function(){var e=function(n){return function(a){var t=n,r=!1,u;function i(l,s){if(s instanceof Yt)return r=!0,l;if(s instanceof tt){t=new tt(s.value0,l),a=s.value1;return}throw new Error("Failed pattern match at Data.List (line 368, column 3 - line 368, column 19): "+[l.constructor.name,s.constructor.name])}for(;!r;)u=i(t,a);return u}};return e(Yt.value)}();var pT=function(e){var n=ne(e.Monad0().Bind1()),a=Co(e);return function(t){var r=t.Plus1().Alt0(),u=da(r),i=k(r.Functor0()),l=W(t.Applicative0());return function(s){var h=function(p){return n(u(i(Kt.create)(s))(l(new Wt(ge))))(function(y){return l(fee(function(E){return new tt(E,p)})(function(E){return _T(p)})(y))})};return a(h)(Yt.value)}}};var Vo=function(e){return nr(e)(tt.create)(Yt.value)};var hP=function(e){return e()};var DP=function(e){throw new Error(e)};var gP=function(){return DP};var _ee=gP(),pee=hP,lc=function(e){return pee(function(){return _ee(e)})};var fR=function(){var e=iR(fP);return function(n){return lR(e(n))}}();var yP=function(e){return e.value0};var S0=function(e){return e.join("")},om=function(e){return e.split("")},Uu=function(e){return e},bP=function(e){return function(n){return function(a){return function(t){return a>=0&&a<t.length?e(t.charAt(a)):n}}}};var Tl=function(e){return e.length};var wP=function(e){return function(n){return function(a){return function(t){var r=t.indexOf(a);return r===-1?n:e(r)}}}};var C0=function(e){return function(n){return n.substr(0,e)}},cc=function(e){return function(n){return n.substring(e)}};var um=function(e){return function(n){return{before:n.substring(0,e),after:n.substring(e)}}};var us=function(e){return function(n){if(e>=0&&e<n.length)return n.charAt(e);throw new Error("Data.String.Unsafe.charAt: Invalid index.")}};var fi=function(e){return function(n){var a=um(Tl(e))(n),t=a.before===e;return t?new S(a.after):M.value}};var _R=function(){return wP(S.create)(M.value)}();var is=function(e){var n=_R(e);return function(a){return xt(n(a))}},im=function(){return bP(S.create)(M.value)}();var Ree=re(Ht),yee=re(on);var lm=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dT=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),IP=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),TP=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),Pr=Je,F0=Je;var cm=function(e){if(e instanceof lm)return e.value0;if(e instanceof IP)return"Error at array index "+(yee(e.value0)+(": "+cm(e.value1)));if(e instanceof TP)return"Error at property "+(Ree(e.value0)+(": "+cm(e.value1)));if(e instanceof dT)return"Type mismatch: expected "+(e.value0+(", found "+e.value1));throw new Error("Failed pattern match at Foreign (line 78, column 1 - line 78, column 45): "+[e.constructor.name])};var G0=function(e){var n=Lr(uP(e));return function(a){return n(fR(a))}};var ls=function(e){var n=W(os(e)),a=G0(e);return function(t){return function(r){if(Kg(r)===t)return n(F0(r));if($e)return a(new dT(t,Kg(r)));throw new Error("Failed pattern match at Foreign (line 123, column 1 - line 123, column 104): "+[t.constructor.name,r.constructor.name])}}};var sm=function(e){return ls(e)("String")};function SP(e){return function(){var n={};for(var a in e)hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}}var Lf={};function vm(e){return e()}function CP(e){return function(n){return function(a){return function(t){var r=a;function u(l){return function(s){return n(s)(l)(t[l])}}for(var i in t)hasOwnProperty.call(t,i)&&(r=e(r)(u(i)));return r}}}}function FP(e,n,a,t){return a in t?n(t[a]):e}function mT(e){return function(n){var a=[];for(var t in n)hasOwnProperty.call(n,t)&&a.push(e(t)(n[t]));return a}}var GP=Object.keys||mT(function(e){return function(){return e}});var pR=function(){return{}};function M0(e){return function(n){return function(a){return function(){return a[e]=n,a}}}}var Tee=qa(Wd);var See=Tt(Df);var Cee=SP,dR=function(e){return function(n){return vm(Tee(M0(e)(n))(pR))}};var xP=function(e){return function(n){return vm(function(){var t=Cee(n)();return e(t)(),t})}};var sc=function(){return yf(FP)(M.value)(S.create)}();var A0=function(e){return function(n){return xP(M0(e)(n))}};var Ou=function(){return Je};var lv=function(e){var n=Jg(e);return function(a){return vm(function(){var r=pR();return qd(n(a))(function(u){return See(M0(u.value0)(u.value1)(r))})(),r})}};var Fee=function(e){var n=ne(e.Bind1()),a=W(e.Applicative0());return function(t){return function(r){return CP(n)(t)(a(r))}}},Gee=Fee(jg),cs=function(e){return xP(function(n){return Gee(function(a){return function(t){return function(r){return M0(t)(r)(a)}}})(n)(e)})};var NP=Ho(it),Mee=Gr(NP),Aee=z3(am),Lee=re(on),Pee=N3(bt),Wi=function(){function e(){}return e.value=new e,e}(),Sl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ln={validateJsRecord:function(e){return Wi.value}},xf={validateForeignType:function(e){return Wi.value}};var fm=function(e){return function(n){return function(a){var t=n(a);return t?Wi.value:new Sl({path:"",got:a,expected:e})}}};var Sa={validateForeignType:fm("Boolean")(q3)},jP={validateForeignType:fm("Function")(J3)};var cn={validateForeignType:fm("Int")(tc(NP)(rT)(function(e){return xt(Cf(F0(e)))}))};var L0={validateForeignType:fm("Number")(rT)};var de={validateForeignType:fm("String")(H3)},UP=function(e){return e.validateJsRecord},La=function(){return function(e){var n=UP(e);return{validateForeignType:function(a){if(W3(a))return n(a);if($e)return new Sl({path:"",expected:"Object",got:a});throw new Error("Failed pattern match at Elmish.Foreign (line 209, column 1 - line 212, column 69): "+[a.constructor.name])}}}},_m=function(e){return e.validateForeignType},Pa=function(e){var n=_m(e);return{validateForeignType:function(a){if(Mee(Yg)(a))return new Sl({path:"",expected:"Array",got:a});if($e){var t=function(u){return function(i){var l=n(i);if(l instanceof Wi)return M.value;if(l instanceof Sl)return new S({idx:u,invalid:l.value0});throw new Error("Failed pattern match at Elmish.Foreign (line 186, column 29 - line 188, column 51): "+[l.constructor.name])}},r=Aee(t)(F0(a));if(r instanceof M)return Wi.value;if(r instanceof S)return new Sl({expected:r.value0.invalid.expected,got:r.value0.invalid.got,path:"["+(Lee(r.value0.idx)+("]"+r.value0.invalid.path))});throw new Error("Failed pattern match at Elmish.Foreign (line 182, column 21 - line 184, column 101): "+[r.constructor.name])}throw new Error("Failed pattern match at Elmish.Foreign (line 179, column 6 - line 188, column 51): "+[a.constructor.name])}}},Ya=function(e){var n=_m(e);return{validateForeignType:function(a){if(tm(a)||Ff(a))return Wi.value;if($e){var t=n(a);if(t instanceof Wi)return Wi.value;if(t instanceof Sl)return new Sl({path:t.value0.path,got:t.value0.got,expected:function(){var r=t.value0.path==="";return r?"Nullable "+t.value0.expected:t.value0.expected}()});throw new Error("Failed pattern match at Elmish.Foreign (line 196, column 11 - line 198, column 123): "+[t.constructor.name])}throw new Error("Failed pattern match at Elmish.Foreign (line 192, column 1 - line 198, column 123): "+[a.constructor.name])}}};var H=function(e){var n=kt(e);return function(a){var t=_m(a);return function(r){var u=UP(r);return{validateJsRecord:function(i){var l=n(Qa.value),s=Mu(l)(F0(i)),h=t(s);if(h instanceof Sl)return new Sl({expected:h.value0.expected,got:h.value0.got,path:"."+(l+h.value0.path)});if(h instanceof Wi)return u(i);throw new Error("Failed pattern match at Elmish.Foreign (line 235, column 9 - line 237, column 43): "+[h.constructor.name])}}}}},Nf=function(e){var n=_m(e);return function(a){var t=n(a);if(t instanceof Wi)return new Oe(F0(a));if(t instanceof Sl)return new xe(Pee([t.value0.path,function(){var r=t.value0.path==="";return r?"Expected ":": expected "}(),t.value0.expected," but got: ",Zd(t.value0.got)]));throw new Error("Failed pattern match at Elmish.Foreign (line 255, column 18 - line 263, column 6): "+[t.constructor.name])}},wt=function(e){var n=Nf(e);return function(a){return kd(n(a))}};var hT=function(e,n,a,t,r,u,i){var l=new Date(Date.UTC(e,n,a,t,r,u,i));return e>=0&&e<100&&l.setUTCFullYear(e),l.getTime()};function OP(e,n){var a=hT(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond),t=hT(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return a-t}function kP(e){return function(n){return function(a){return function(t){var r=hT(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond),u=new Date(r+a);return isNaN(u.getTime())?n:e({year:u.getUTCFullYear(),month:u.getUTCMonth()+1,day:u.getUTCDate(),hour:u.getUTCHours(),minute:u.getUTCMinutes(),second:u.getUTCSeconds(),millisecond:u.getUTCMilliseconds()})}}}}var BP=function(e,n,a){var t=new Date(Date.UTC(e,n,a));return e>=0&&e<100&&t.setUTCFullYear(e),t};function HP(e,n,a,t){var r=BP(n,a-1,t);return e(r.getUTCFullYear())(r.getUTCMonth()+1)(r.getUTCDate())}function qP(e,n,a){return BP(e,n-1,a).getUTCDay()}function cv(e){return e.charCodeAt(0)}function WP(e){return String.fromCharCode(e)}var xr=function(e){var n=W(e.Applicative0()),a=iu(e.Plus1());return function(t){if(t)return n(ge);if(!t)return a;throw new Error("Failed pattern match at Control.Alternative (line 48, column 1 - line 48, column 54): "+[t.constructor.name])}};var JP=rt(Xs),$P=Vt(Xs);var oa=function(e){return e.toEnum};var Jn=function(e){return e.fromEnum},DT=function(e){var n=oa(e),a=Jn(e),t=rt(e.Bounded0());return function(r){return function(u){return function(i){var l=n(i);if(l instanceof S)return l.value0;if(l instanceof M){var s=i<a(t);return s?r:u}throw new Error("Failed pattern match at Data.Enum (line 158, column 33 - line 160, column 62): "+[l.constructor.name])}}}};var jf=function(e){return function(n){return function(a){return e(n(a)+1|0)}}},Uf=function(e){return function(n){return function(a){return e(n(a)-1|0)}}};var gT=function(e){return e>=cv(JP)&&e<=cv($P)?new S(WP(e)):M.value},xee={succ:jf(gT)(cv),pred:Uf(gT)(cv),Ord0:function(){return xg}};var Of=function(){return{cardinality:cv($P)-cv(JP)|0,toEnum:gT,fromEnum:cv,Bounded0:function(){return Xs},Enum1:function(){return xee}}}();var mR=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},zP=re(on);var _i=function(){function e(){}return e.value=new e,e}(),Ji=function(){function e(){}return e.value=new e,e}(),$i=function(){function e(){}return e.value=new e,e}(),zi=function(){function e(){}return e.value=new e,e}(),Vi=function(){function e(){}return e.value=new e,e}(),Qi=function(){function e(){}return e.value=new e,e}(),Cl=function(){function e(){}return e.value=new e,e}(),pu=function(){function e(){}return e.value=new e,e}(),ku=function(){function e(){}return e.value=new e,e}(),du=function(){function e(){}return e.value=new e,e}(),Bu=function(){function e(){}return e.value=new e,e}(),Hu=function(){function e(){}return e.value=new e,e}(),mu=function(){function e(){}return e.value=new e,e}(),hu=function(){function e(){}return e.value=new e,e}(),qu=function(){function e(){}return e.value=new e,e}(),Wu=function(){function e(){}return e.value=new e,e}(),Ju=function(){function e(){}return e.value=new e,e}(),$u=function(){function e(){}return e.value=new e,e}(),pi=function(){function e(){}return e.value=new e,e}();var VP={show:function(e){return"(Year "+(zP(e)+")")}},QP={show:function(e){if(e instanceof _i)return"Monday";if(e instanceof Ji)return"Tuesday";if(e instanceof $i)return"Wednesday";if(e instanceof zi)return"Thursday";if(e instanceof Vi)return"Friday";if(e instanceof Qi)return"Saturday";if(e instanceof Cl)return"Sunday";throw new Error("Failed pattern match at Data.Date.Component (line 184, column 1 - line 191, column 25): "+[e.constructor.name])}},hR={show:function(e){if(e instanceof pu)return"January";if(e instanceof ku)return"February";if(e instanceof du)return"March";if(e instanceof Bu)return"April";if(e instanceof Hu)return"May";if(e instanceof mu)return"June";if(e instanceof hu)return"July";if(e instanceof qu)return"August";if(e instanceof Wu)return"September";if(e instanceof Ju)return"October";if(e instanceof $u)return"November";if(e instanceof pi)return"December";throw new Error("Failed pattern match at Data.Date.Component (line 101, column 1 - line 113, column 29): "+[e.constructor.name])}},KP={show:function(e){return"(Day "+(zP(e)+")")}},DR=ra,gR=ra,YP=ut,Nee={eq:function(e){return function(n){return e instanceof _i&&n instanceof _i||e instanceof Ji&&n instanceof Ji||e instanceof $i&&n instanceof $i||e instanceof zi&&n instanceof zi||e instanceof Vi&&n instanceof Vi||e instanceof Qi&&n instanceof Qi||e instanceof Cl&&n instanceof Cl}}},XP={compare:function(e){return function(n){if(e instanceof _i&&n instanceof _i)return qe.value;if(e instanceof _i)return Re.value;if(n instanceof _i)return he.value;if(e instanceof Ji&&n instanceof Ji)return qe.value;if(e instanceof Ji)return Re.value;if(n instanceof Ji)return he.value;if(e instanceof $i&&n instanceof $i)return qe.value;if(e instanceof $i)return Re.value;if(n instanceof $i)return he.value;if(e instanceof zi&&n instanceof zi)return qe.value;if(e instanceof zi)return Re.value;if(n instanceof zi)return he.value;if(e instanceof Vi&&n instanceof Vi)return qe.value;if(e instanceof Vi)return Re.value;if(n instanceof Vi)return he.value;if(e instanceof Qi&&n instanceof Qi)return qe.value;if(e instanceof Qi)return Re.value;if(n instanceof Qi)return he.value;if(e instanceof Cl&&n instanceof Cl)return qe.value;throw new Error("Failed pattern match at Data.Date.Component (line 0, column 0 - line 0, column 0): "+[e.constructor.name,n.constructor.name])}},Eq0:function(){return Nee}},RT={eq:function(e){return function(n){return e instanceof pu&&n instanceof pu||e instanceof ku&&n instanceof ku||e instanceof du&&n instanceof du||e instanceof Bu&&n instanceof Bu||e instanceof Hu&&n instanceof Hu||e instanceof mu&&n instanceof mu||e instanceof hu&&n instanceof hu||e instanceof qu&&n instanceof qu||e instanceof Wu&&n instanceof Wu||e instanceof Ju&&n instanceof Ju||e instanceof $u&&n instanceof $u||e instanceof pi&&n instanceof pi}}},P0={compare:function(e){return function(n){if(e instanceof pu&&n instanceof pu)return qe.value;if(e instanceof pu)return Re.value;if(n instanceof pu)return he.value;if(e instanceof ku&&n instanceof ku)return qe.value;if(e instanceof ku)return Re.value;if(n instanceof ku)return he.value;if(e instanceof du&&n instanceof du)return qe.value;if(e instanceof du)return Re.value;if(n instanceof du)return he.value;if(e instanceof Bu&&n instanceof Bu)return qe.value;if(e instanceof Bu)return Re.value;if(n instanceof Bu)return he.value;if(e instanceof Hu&&n instanceof Hu)return qe.value;if(e instanceof Hu)return Re.value;if(n instanceof Hu)return he.value;if(e instanceof mu&&n instanceof mu)return qe.value;if(e instanceof mu)return Re.value;if(n instanceof mu)return he.value;if(e instanceof hu&&n instanceof hu)return qe.value;if(e instanceof hu)return Re.value;if(n instanceof hu)return he.value;if(e instanceof qu&&n instanceof qu)return qe.value;if(e instanceof qu)return Re.value;if(n instanceof qu)return he.value;if(e instanceof Wu&&n instanceof Wu)return qe.value;if(e instanceof Wu)return Re.value;if(n instanceof Wu)return he.value;if(e instanceof Ju&&n instanceof Ju)return qe.value;if(e instanceof Ju)return Re.value;if(n instanceof Ju)return he.value;if(e instanceof $u&&n instanceof $u)return qe.value;if(e instanceof $u)return Re.value;if(n instanceof $u)return he.value;if(e instanceof pi&&n instanceof pi)return qe.value;throw new Error("Failed pattern match at Data.Date.Component (line 0, column 0 - line 0, column 0): "+[e.constructor.name,n.constructor.name])}},Eq0:function(){return RT}},ZP=ut,RR=function(){return{bottom:-271820|0,top:275759,Ord0:function(){return DR}}}(),jee=function(){return{bottom:_i.value,top:Cl.value,Ord0:function(){return XP}}}(),yR=function(){return{bottom:pu.value,top:pi.value,Ord0:function(){return P0}}}(),Nr={cardinality:547580,toEnum:function(e){if(e>=(-271820|0)&&e<=275759)return new S(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Date.Component (line 35, column 1 - line 40, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return RR},Enum1:function(){return Uee(0)}},Uee=mR("enumYear","Data.Date.Component",function(){return{succ:function(){var e=oa(Nr),n=Jn(Nr);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(Nr),n=Jn(Nr);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return DR}}});var sv={cardinality:7,toEnum:function(e){return e===1?new S(_i.value):e===2?new S(Ji.value):e===3?new S($i.value):e===4?new S(zi.value):e===5?new S(Vi.value):e===6?new S(Qi.value):e===7?new S(Cl.value):M.value},fromEnum:function(e){if(e instanceof _i)return 1;if(e instanceof Ji)return 2;if(e instanceof $i)return 3;if(e instanceof zi)return 4;if(e instanceof Vi)return 5;if(e instanceof Qi)return 6;if(e instanceof Cl)return 7;throw new Error("Failed pattern match at Data.Date.Component (line 175, column 14 - line 182, column 16): "+[e.constructor.name])},Bounded0:function(){return jee},Enum1:function(){return Oee(0)}},Oee=mR("enumWeekday","Data.Date.Component",function(){return{succ:function(){var e=oa(sv),n=Jn(sv);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(sv),n=Jn(sv);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return XP}}});var ir={cardinality:12,toEnum:function(e){return e===1?new S(pu.value):e===2?new S(ku.value):e===3?new S(du.value):e===4?new S(Bu.value):e===5?new S(Hu.value):e===6?new S(mu.value):e===7?new S(hu.value):e===8?new S(qu.value):e===9?new S(Wu.value):e===10?new S(Ju.value):e===11?new S($u.value):e===12?new S(pi.value):M.value},fromEnum:function(e){if(e instanceof pu)return 1;if(e instanceof ku)return 2;if(e instanceof du)return 3;if(e instanceof Bu)return 4;if(e instanceof Hu)return 5;if(e instanceof mu)return 6;if(e instanceof hu)return 7;if(e instanceof qu)return 8;if(e instanceof Wu)return 9;if(e instanceof Ju)return 10;if(e instanceof $u)return 11;if(e instanceof pi)return 12;throw new Error("Failed pattern match at Data.Date.Component (line 87, column 14 - line 99, column 19): "+[e.constructor.name])},Bounded0:function(){return yR},Enum1:function(){return kee(0)}},kee=mR("enumMonth","Data.Date.Component",function(){return{succ:function(){var e=oa(ir),n=Jn(ir);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(ir),n=Jn(ir);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return P0}}});var pm={bottom:1,top:31,Ord0:function(){return gR}},Du={cardinality:31,toEnum:function(e){if(e>=1&&e<=31)return new S(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Date.Component (line 133, column 1 - line 138, column 23): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return pm},Enum1:function(){return Bee(0)}},Bee=mR("enumDay","Data.Date.Component",function(){return{succ:function(){var e=oa(Du),n=Jn(Du);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(Du),n=Jn(Du);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return gR}}});var x0=qI()();var ex=pn(dn),yT=function(e){return e},Hee=function(e){return e},dm=function(e){return e};var qee=function(e){return e},N0=function(e){return e.toDuration};var nx={append:function(e){return function(n){return e+n}}};var bR={append:function(e){return function(n){return e+n}}};var ax=Zc;var tx=Zc;var wR=function(e){return e.fromDuration};var ss={fromDuration:x0(yT)(function(e){return e*1e3}),toDuration:x0(dm)(function(e){return e/1e3})},vv={fromDuration:x0(Hee)(function(e){return e*6e4}),toDuration:x0(dm)(function(e){return e/6e4})},j0={fromDuration:ex,toDuration:ex};var bT={fromDuration:x0(qee)(function(e){return e*864e5}),toDuration:x0(dm)(function(e){return e/864e5})};var ux=Jn(ir),wT=Ft(),ix=oa(sv),Jee=re(VP),$ee=re(hR),zee=re(KP);var Vee=Ee(YP),Qee=Ee(RT),Kee=Ee(ZP),Yee=Ze(DR),Xee=Ze(P0),Zee=Ze(gR);var ene=oa(ir);var ER=function(){function e(n,a,t){this.value0=n,this.value1=a,this.value2=t}return e.create=function(n){return function(a){return function(t){return new e(n,a,t)}}},e}(),zu=function(e){return e.value0},mm=function(e){var n=qP(e.value0,ux(e.value1),e.value2),a=n===0;return wT(ix(a?7:n))},lx={show:function(e){return"(Date "+(Jee(e.value0)+(" "+($ee(e.value1)+(" "+(zee(e.value2)+")")))))}},Vu=function(e){return e.value1};var IR={eq:function(e){return function(n){return Vee(e.value0)(n.value0)&&Qee(e.value1)(n.value1)&&Kee(e.value2)(n.value2)}}},nne=Ee(IR),ET={compare:function(e){return function(n){var a=Yee(e.value0)(n.value0);if(a instanceof Re)return Re.value;if(a instanceof he)return he.value;var t=Xee(e.value1)(n.value1);return t instanceof Re?Re.value:t instanceof he?he.value:Zee(e.value2)(n.value2)}},Eq0:function(){return IR}};var vc=function(e){return e.value2},fv=function(e){return function(n){return function(a){var t=function(r){return function(u){return function(i){return new ER(r,wT(ene(u)),i)}}};return HP(t,e,ux(n),a)}}},TR=function(e){return function(n){return function(a){var t=new ER(e,n,a),r=nne(fv(e)(n)(a))(t);return r?new S(t):M.value}}},IT=function(){return{bottom:new ER(rt(RR),rt(yR),rt(pm)),top:new ER(Vt(RR),Vt(yR),Vt(pm)),Ord0:function(){return ET}}}();var SR=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},CR=re(on);var cx={show:function(e){return"(Second "+(CR(e)+")")}},sx={show:function(e){return"(Minute "+(CR(e)+")")}},vx={show:function(e){return"(Millisecond "+(CR(e)+")")}},fx={show:function(e){return"(Hour "+(CR(e)+")")}},FR=ra,GR=ra,MR=ra,AR=ra,_x=ut,px=ut,dx=ut,mx=ut,hm={bottom:0,top:59,Ord0:function(){return FR}},Dm={bottom:0,top:59,Ord0:function(){return GR}},gm={bottom:0,top:999,Ord0:function(){return MR}},Rm={bottom:0,top:23,Ord0:function(){return AR}},di={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new S(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Time.Component (line 90, column 1 - line 95, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return hm},Enum1:function(){return ane(0)}},ane=SR("enumSecond","Data.Time.Component",function(){return{succ:function(){var e=oa(di),n=Jn(di);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(di),n=Jn(di);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return FR}}});var mi={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new S(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Time.Component (line 61, column 1 - line 66, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Dm},Enum1:function(){return tne(0)}},tne=SR("enumMinute","Data.Time.Component",function(){return{succ:function(){var e=oa(mi),n=Jn(mi);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(mi),n=Jn(mi);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return GR}}});var gu={cardinality:1e3,toEnum:function(e){if(e>=0&&e<=999)return new S(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Time.Component (line 120, column 1 - line 125, column 31): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return gm},Enum1:function(){return rne(0)}},rne=SR("enumMillisecond","Data.Time.Component",function(){return{succ:function(){var e=oa(gu),n=Jn(gu);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(gu),n=Jn(gu);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return MR}}});var hi={cardinality:24,toEnum:function(e){if(e>=0&&e<=23)return new S(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Time.Component (line 32, column 1 - line 37, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Rm},Enum1:function(){return one(0)}},one=SR("enumHour","Data.Time.Component",function(){return{succ:function(){var e=oa(hi),n=Jn(hi);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(hi),n=Jn(hi);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return AR}}});var lne=re(fx),cne=re(sx),sne=re(cx),vne=re(vx);var fne=Ee(mx),_ne=Ee(px),pne=Ee(_x),dne=Ee(dx),mne=Ze(AR),hne=Ze(GR),Dne=Ze(FR),gne=Ze(MR);var fc=function(){function e(n,a,t,r){this.value0=n,this.value1=a,this.value2=t,this.value3=r}return e.create=function(n){return function(a){return function(t){return function(r){return new e(n,a,t,r)}}}},e}(),hx={show:function(e){return"(Time "+(lne(e.value0)+(" "+(cne(e.value1)+(" "+(sne(e.value2)+(" "+(vne(e.value3)+")")))))))}};var vs=function(e){return e.value2},fs=function(e){return e.value1},Ki=function(e){return e.value3};var _c=function(e){return e.value0};var TT={eq:function(e){return function(n){return fne(e.value0)(n.value0)&&_ne(e.value1)(n.value1)&&pne(e.value2)(n.value2)&&dne(e.value3)(n.value3)}}},ST={compare:function(e){return function(n){var a=mne(e.value0)(n.value0);if(a instanceof Re)return Re.value;if(a instanceof he)return he.value;var t=hne(e.value1)(n.value1);if(t instanceof Re)return Re.value;if(t instanceof he)return he.value;var r=Dne(e.value2)(n.value2);return r instanceof Re?Re.value:r instanceof he?he.value:gne(e.value3)(n.value3)}},Eq0:function(){return TT}};var ym=function(){return{bottom:new fc(rt(Rm),rt(Dm),rt(hm),rt(gm)),top:new fc(Vt(Rm),Vt(Dm),Vt(hm),Vt(gm)),Ord0:function(){return ST}}}();var Rne=Jn(Nr),yne=Jn(ir),bne=Jn(Du),wne=Jn(hi),Ene=Jn(mi),Ine=Jn(di),Tne=Jn(gu),Sne=re(lx),Cne=re(hx),Fne=Ee(IR),Gne=Ee(TT),Mne=Ze(ET),Ane=Ze(ST),Lne=ne(tn),U0=Yn(fr),CT=k(oe),Pne=El(tn),xne=oa(Nr),Nne=oa(ir),jne=oa(Du),Une=oa(hi),One=oa(mi),kne=oa(di),Bne=oa(gu),pc=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),FT=function(e){return{year:Rne(zu(e.value0)),month:yne(Vu(e.value0)),day:bne(vc(e.value0)),hour:wne(_c(e.value1)),minute:Ene(fs(e.value1)),second:Ine(vs(e.value1)),millisecond:Tne(Ki(e.value1))}},GT=function(e){return e.value1},Dx={show:function(e){return"(DateTime "+(Sne(e.value0)+(" "+(Cne(e.value1)+")")))}};var Hne={eq:function(e){return function(n){return Fne(e.value0)(n.value0)&&Gne(e.value1)(n.value1)}}},Qu={compare:function(e){return function(n){var a=Mne(e.value0)(n.value0);return a instanceof Re?Re.value:a instanceof he?he.value:Ane(e.value1)(n.value1)}},Eq0:function(){return Hne}},Ku=function(e){var n=N0(e);return function(a){return function(t){return n(OP(FT(a),FT(t)))}}},kf=function(e){return e.value0},O0=function(){return{bottom:new pc(rt(IT),rt(ym)),top:new pc(Vt(IT),Vt(ym)),Ord0:function(){return Qu}}}(),dc=function(e){var n=wR(e);return function(a){return function(t){return Lne(kP(S.create)(M.value)(n(a))(FT(t)))(function(r){return U0(CT(pc.create)(Pne(U0(U0(CT(TR)(xne(r.year)))(Nne(r.month)))(jne(r.day)))))(U0(U0(U0(CT(fc.create)(Une(r.hour)))(One(r.minute)))(kne(r.second)))(Bne(r.millisecond)))})}}};var Qo=function(){var e={},n="Pure",a="Throw",t="Catch",r="Sync",u="Async",i="Bind",l="Bracket",s="Fork",h="Sequential",p="Map",y="Apply",E="Alt",b="Cons",T="Resume",L="Release",U="Finalizer",$="Finalized",z="Forked",Z="Fiber",ue="Thunk";function X(He,ia,Ia,Sn){this.tag=He,this._1=ia,this._2=Ia,this._3=Sn}function Y(He){var ia=function(Ia,Sn,gn){return new X(He,Ia,Sn,gn)};return ia.tag=He,ia}function ae(He){return new X(n,void 0)}function me(He){try{He()}catch(ia){setTimeout(function(){throw ia},0)}}function ke(He,ia,Ia){try{return ia(Ia())}catch(Sn){return He(Sn)}}function ce(He,ia,Ia){try{return ia(Ia)()}catch(Sn){return Ia(He(Sn))(),ae}}var le=function(){var He=1024,ia=0,Ia=0,Sn=new Array(He),gn=!1;function Ve(){var na;for(gn=!0;ia!==0;)ia--,na=Sn[Ia],Sn[Ia]=void 0,Ia=(Ia+1)%He,na();gn=!1}return{isDraining:function(){return gn},enqueue:function(na){var va,Ma;ia===He&&(Ma=gn,Ve(),gn=Ma),Sn[(Ia+ia)%He]=na,ia++,gn||Ve()}}}();function Ce(He){var ia={},Ia=0,Sn=0;return{register:function(gn){var Ve=Ia++;gn.onComplete({rethrow:!0,handler:function(na){return function(){Sn--,delete ia[Ve]}}})(),ia[Ve]=gn,Sn++},isEmpty:function(){return Sn===0},killAll:function(gn,Ve){return function(){if(Sn===0)return Ve();var na=0,va={};function Ma(vn){va[vn]=ia[vn].kill(gn,function(la){return function(){delete va[vn],na--,He.isLeft(la)&&He.fromLeft(la)&&setTimeout(function(){throw He.fromLeft(la)},0),na===0&&Ve()}})()}for(var dt in ia)ia.hasOwnProperty(dt)&&(na++,Ma(dt));return ia={},Ia=0,Sn=0,function(vn){return new X(r,function(){for(var la in va)va.hasOwnProperty(la)&&va[la]()})}}}}}var Ie=0,je=1,Ke=2,Tn=3,Qn=4,En=5,qn=6;function Vn(He,ia,Ia){var Sn=0,gn=Ie,Ve=Ia,na=null,va=null,Ma=null,dt=null,vn=null,la=0,Et=0,Da=null,ot=!0;function q(P){for(var N,J,V;;)switch(N=null,J=null,V=null,gn){case Ke:gn=je;try{Ve=Ma(Ve),dt===null?Ma=null:(Ma=dt._1,dt=dt._2)}catch(ie){gn=En,na=He.left(ie),Ve=null}break;case Tn:He.isLeft(Ve)?(gn=En,na=Ve,Ve=null):Ma===null?gn=En:(gn=Ke,Ve=He.fromRight(Ve));break;case je:switch(Ve.tag){case i:Ma&&(dt=new X(b,Ma,dt)),Ma=Ve._2,gn=je,Ve=Ve._1;break;case n:Ma===null?(gn=En,Ve=He.right(Ve._1)):(gn=Ke,Ve=Ve._1);break;case r:gn=Tn,Ve=ke(He.left,He.right,Ve._1);break;case u:gn=Qn,Ve=ce(He.left,Ve._1,function(ie){return function(){Sn===P&&(Sn++,le.enqueue(function(){Sn===P+1&&(gn=Tn,Ve=ie,q(Sn))}))}});return;case a:gn=En,na=He.left(Ve._1),Ve=null;break;case t:Ma===null?vn=new X(b,Ve,vn,va):vn=new X(b,Ve,new X(b,new X(T,Ma,dt),vn,va),va),Ma=null,dt=null,gn=je,Ve=Ve._1;break;case l:la++,Ma===null?vn=new X(b,Ve,vn,va):vn=new X(b,Ve,new X(b,new X(T,Ma,dt),vn,va),va),Ma=null,dt=null,gn=je,Ve=Ve._1;break;case s:gn=Tn,N=Vn(He,ia,Ve._2),ia&&ia.register(N),Ve._1&&N.run(),Ve=He.right(N);break;case h:gn=je,Ve=pt(He,ia,Ve._1);break}break;case En:if(Ma=null,dt=null,vn===null)gn=qn,Ve=va||na||Ve;else switch(N=vn._3,V=vn._1,vn=vn._2,V.tag){case t:va&&va!==N&&la===0?gn=En:na&&(gn=je,Ve=V._2(He.fromLeft(na)),na=null);break;case T:va&&va!==N&&la===0||na?gn=En:(Ma=V._1,dt=V._2,gn=Ke,Ve=He.fromRight(Ve));break;case l:la--,na===null&&(J=He.fromRight(Ve),vn=new X(b,new X(L,V._2,J),vn,N),(va===N||la>0)&&(gn=je,Ve=V._3(J)));break;case L:vn=new X(b,new X($,Ve,na),vn,va),gn=je,va&&va!==N&&la===0?Ve=V._1.killed(He.fromLeft(va))(V._2):na?Ve=V._1.failed(He.fromLeft(na))(V._2):Ve=V._1.completed(He.fromRight(Ve))(V._2),na=null,la++;break;case U:la++,vn=new X(b,new X($,Ve,na),vn,va),gn=je,Ve=V._1;break;case $:la--,gn=En,Ve=V._1,na=V._2;break}break;case qn:for(var se in Da)Da.hasOwnProperty(se)&&(ot=ot&&Da[se].rethrow,me(Da[se].handler(Ve)));Da=null,va&&na?setTimeout(function(){throw He.fromLeft(na)},0):He.isLeft(Ve)&&ot&&setTimeout(function(){if(ot)throw He.fromLeft(Ve)},0);return;case Ie:gn=je;break;case Qn:return}}function K(P){return function(){if(gn===qn)return ot=ot&&P.rethrow,P.handler(Ve)(),function(){};var N=Et++;return Da=Da||{},Da[N]=P,function(){Da!==null&&delete Da[N]}}}function j(P,N){return function(){if(gn===qn)return N(He.right(void 0))(),function(){};var J=K({rethrow:!1,handler:function(){return N(He.right(void 0))}})();switch(gn){case Ie:va=He.left(P),gn=qn,Ve=va,q(Sn);break;case Qn:va===null&&(va=He.left(P)),la===0&&(gn===Qn&&(vn=new X(b,new X(U,Ve(P)),vn,va)),gn=En,Ve=null,na=null,q(++Sn));break;default:va===null&&(va=He.left(P)),la===0&&(gn=En,Ve=null,na=null)}return J}}function I(P){return function(){var N=K({rethrow:!1,handler:P})();return gn===Ie&&q(Sn),N}}return{kill:j,join:I,onComplete:K,isSuspended:function(){return gn===Ie},run:function(){gn===Ie&&(le.isDraining()?q(Sn):le.enqueue(function(){q(Sn)}))}}}function Wn(He,ia,Ia,Sn){var gn=0,Ve={},na=0,va={},Ma=new Error("[ParAff] Early exit"),dt=null,vn=e;function la(K,j,I){var P=j,N=null,J=null,V=0,se={},ie,De;e:for(;;)switch(ie=null,P.tag){case z:if(P._3===e&&(ie=Ve[P._1],se[V++]=ie.kill(K,function(Se){return function(){V--,V===0&&I(Se)()}})),N===null)break e;P=N._2,J===null?N=null:(N=J._1,J=J._2);break;case p:P=P._2;break;case y:case E:N&&(J=new X(b,N,J)),N=P,P=P._1;break}if(V===0)I(He.right(void 0))();else for(De=0,ie=V;De<ie;De++)se[De]=se[De]();return se}function Et(K,j,I){var P,N,J,V,se,ie;He.isLeft(K)?(P=K,N=null):(N=K,P=null);e:for(;;){if(J=null,V=null,se=null,ie=null,dt!==null)return;if(j===null){Sn(P||N)();return}if(j._3!==e)return;switch(j.tag){case p:P===null?(j._3=He.right(j._1(He.fromRight(N))),N=j._3):j._3=P;break;case y:if(J=j._1._3,V=j._2._3,P){if(j._3=P,se=!0,ie=na++,va[ie]=la(Ma,P===J?j._2:j._1,function(){return function(){delete va[ie],se?se=!1:I===null?Et(P,null,null):Et(P,I._1,I._2)}}),se){se=!1;return}}else{if(J===e||V===e)return;N=He.right(He.fromRight(J)(He.fromRight(V))),j._3=N}break;case E:if(J=j._1._3,V=j._2._3,J===e&&He.isLeft(V)||V===e&&He.isLeft(J))return;if(J!==e&&He.isLeft(J)&&V!==e&&He.isLeft(V))P=N===J?V:J,N=null,j._3=P;else if(j._3=N,se=!0,ie=na++,va[ie]=la(Ma,N===J?j._2:j._1,function(){return function(){delete va[ie],se?se=!1:I===null?Et(N,null,null):Et(N,I._1,I._2)}}),se){se=!1;return}break}I===null?j=null:(j=I._1,I=I._2)}}function Da(K){return function(j){return function(){delete Ve[K._1],K._3=j,Et(j,K._2._1,K._2._2)}}}function ot(){var K=je,j=Ia,I=null,P=null,N,J;e:for(;;)switch(N=null,J=null,K){case je:switch(j.tag){case p:I&&(P=new X(b,I,P)),I=new X(p,j._1,e,e),j=j._2;break;case y:I&&(P=new X(b,I,P)),I=new X(y,e,j._2,e),j=j._1;break;case E:I&&(P=new X(b,I,P)),I=new X(E,e,j._2,e),j=j._1;break;default:J=gn++,K=En,N=j,j=new X(z,J,new X(b,I,P),e),N=Vn(He,ia,N),N.onComplete({rethrow:!1,handler:Da(j)})(),Ve[J]=N,ia&&ia.register(N)}break;case En:if(I===null)break e;I._1===e?(I._1=j,K=je,j=I._2,I._2=e):(I._2=j,j=I,P===null?I=null:(I=P._1,P=P._2))}for(vn=j,J=0;J<gn;J++)Ve[J].run()}function q(K,j){dt=He.left(K);var I;for(var P in va)if(va.hasOwnProperty(P)){I=va[P];for(P in I)I.hasOwnProperty(P)&&I[P]()}va=null;var N=la(K,vn,j);return function(J){return new X(u,function(V){return function(){for(var se in N)N.hasOwnProperty(se)&&N[se]();return ae}})}}return ot(),function(K){return new X(u,function(j){return function(){return q(K,j)}})}}function pt(He,ia,Ia){return new X(u,function(Sn){return function(){return Wn(He,ia,Ia,Sn)}})}return X.EMPTY=e,X.Pure=Y(n),X.Throw=Y(a),X.Catch=Y(t),X.Sync=Y(r),X.Async=Y(u),X.Bind=Y(i),X.Bracket=Y(l),X.Fork=Y(s),X.Seq=Y(h),X.ParMap=Y(p),X.ParApply=Y(y),X.ParAlt=Y(E),X.Fiber=Vn,X.Supervisor=Ce,X.Scheduler=le,X.nonCanceler=ae,X}(),gx=Qo.Pure,Rx=Qo.Throw;function yx(e){return function(n){return Qo.Catch(e,n)}}function bx(e){return function(n){return n.tag===Qo.Pure.tag?Qo.Pure(e(n._1)):Qo.Bind(n,function(a){return Qo.Pure(e(a))})}}function wx(e){return function(n){return Qo.Bind(e,n)}}var Ex=Qo.Sync;function Ix(e){return function(n){return Qo.ParMap(e,n)}}function Tx(e){return function(n){return Qo.ParApply(e,n)}}var _v=Qo.Async;function Sx(e,n){return function(){return Qo.Fiber(e,null,n)}}var Cx=function(){function e(a,t){return a===0&&typeof setImmediate!="undefined"?setImmediate(t):setTimeout(t,a)}function n(a,t){return a===0&&typeof clearImmediate!="undefined"?clearImmediate(t):clearTimeout(t)}return function(a,t){return Qo.Async(function(r){return function(){var u=e(t,r(a()));return function(){return Qo.Sync(function(){return a(n(t,u))})}}})}}(),Fx=Qo.Seq;var Yi={proof:function(e){return e},Coercible0:function(){}};var Wne=pn(dn);var bm={dimap:function(e){return function(n){return function(a){return function(t){return n(a(e(t)))}}}}},LR=function(e){return e.dimap},wm=function(e){var n=LR(e);return function(a){return n(a)(Wne)}};var PR=function(e){return e.sequential},k0=function(e){return e.parallel};var zne=pn(dn),Vne=function(e){var n=PR(e),a=k0(e);return function(t){var r=nv(t);return function(u){var i=r(u);return function(l){var s=i(function(h){return a(l(h))});return function(h){return n(s(h))}}}}};var Mx=function(e){var n=Vne(e);return function(a){var t=n(a);return function(r){return t(r)(zne)}}};var _s=function(e){return e()};var Qne=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}};var Kne=Tt(Hn);var Yne={map:Ix},Ca={map:bx};var Xne=function(){var e=function(t){if(t instanceof Oe)return t.value0;if(t instanceof xe)return lc("unsafeFromRight: Left");throw new Error("Failed pattern match at Effect.Aff (line 412, column 21 - line 414, column 54): "+[t.constructor.name])},n=function(t){if(t instanceof xe)return t.value0;if(t instanceof Oe)return lc("unsafeFromLeft: Right");throw new Error("Failed pattern match at Effect.Aff (line 407, column 20 - line 409, column 55): "+[t.constructor.name])},a=function(t){if(t instanceof xe)return!0;if(t instanceof Oe)return!1;throw new Error("Failed pattern match at Effect.Aff (line 402, column 12 - line 404, column 21): "+[t.constructor.name])};return{isLeft:a,fromLeft:n,fromRight:e,left:xe.create,right:Oe.create}}(),Zne=function(e){return Sx(Xne,e)},eae=function(e){return function(){var a=Zne(e)();return a.run(),a}},B0=function(e){return Kne(eae(e))};var Xt=function(e){return Cx(Oe.create,e)};var Lx={apply:Tx,Functor0:function(){return Yne}};var H0={Applicative0:function(){return Kn},Bind1:function(){return ua}},ua={bind:wx,Apply0:function(){return MT(0)}},Kn={pure:gx,Apply0:function(){return MT(0)}},MT=Qne("applyAff","Effect.Aff",function(){return{apply:Bi(H0),Functor0:function(){return Ca}}}),Em=MT(73),Px=W(Kn);var xx={parallel:Je,sequential:Fx,Apply0:function(){return Em},Apply1:function(){return Lx}},nae=k0(xx),aae={pure:function(e){return nae(Px(e))},Apply0:function(){return Lx}};var tae=Mx(xx)(aae)(We);var rae={append:function(e){return function(n){return function(a){return tae([e(a),n(a)])}}}};var Ne={liftEffect:Ex,Monad0:function(){return H0}};var q0={throwError:Rx,Monad0:function(){return H0}},jr={catchError:yx,MonadThrow0:function(){return q0}};var AT=hn(Px(ge)),Nx={mempty:AT,Semigroup0:function(){return rae}};Wa();var jx=function(){let e={};return function(n,a){let t=e[n]||(e[n]=kx(n));return a(t)}}();function Ux(e){return e(kx())}var Ox=Ua.createElement,Fm=e=>()=>e.props.def;function kx(e){class n extends Ua.Component{constructor(t){super(t);t.init&&t.init(this)()}render(){return this.props.render(this)()}componentDidMount(){this.props.componentDidMount(this)()}componentWillUnmount(){this.props.componentWillUnmount(this)()}}return n.displayName=e?"Elmish_"+e:"ElmishRoot",n}var jR=typeof module=="undefined"?void 0:module.require,wXe=function(){try{return jR===void 0?void 0:jR("util")}catch{return}}();var EXe=function(){var e;if(typeof performance!="undefined")e=performance;else if(jR)try{e=jR("perf_hooks").performance}catch{}return function(){return(e||Date).now()}}();var Bx=(e,n)=>n[e],Hx=(e,n,a)=>a[e]=n;var qf=function(n){return function(a){return n(a)()}};var W0=function(n){return function(a){return function(){return n(a)}}},pv=function(n){return function(a){return function(t){return function(){return n(a,t)}}}},Wf=function(n){return function(a){return function(t){return function(r){return function(){return n(a,t,r)}}}}};var Iae=pe(Hn),Gm=function(){function e(){}return e.value=new e,e}(),Jx=function(){return function(e){var n=kt(e);return function(a){return Wf(Hx)(n(Qa.value))}}},NT=function(e){var n=wt(e);return function(a){var t=kt(a);return function(r){return function(u){return Iae(function(){return Bx(t(Qa.value),u)})(n)}}}};Wa();var gi=window.ReactDOM,{createPortal:$x,findDOMNode:eZe,flushSync:nZe}=window.ReactDOM;var rS=Fu(jN());function UN(e){return e.state&&e.state.s}function ON(e,n,a){return e.setState({s:n},a)}function kN(e,n){return e.state={s:n}}var BN=gi.render,HN=gi.hydrate,oS=rS.default&&rS.default.renderToString||(e=>""),ate=gi.unmountComponentAtNode,qN=Ua.Fragment;function WN(e,n,a){return Ua.createElement.apply(null,[e,tte(e,n)].concat(a))}function tte(e,n){if(typeof e!="string"||n._data==null)return n;var a={_data:void 0};for(var t in n._data){var r=n._data[t];a["data-"+t]=r}return Object.assign({},n,a)}function JN(e){return n=>e===n}var uS=function(e){return function(n){return function(a){var t=_e(a);if(e instanceof M&&t instanceof M)return ge;if(e instanceof S&&t instanceof M)return ge;if(e instanceof S&&t instanceof S){if(JN(e.value0)(t.value0))return ge;if($e)return n(new S(t.value0))()}return n(t)()}}};var te={asReactChildren:function(e){return[e]}},Ye={asReactChildren:function(e){return[e]}},we={asReactChildren:pn(dn)};var en=Je,iS=Wf(ON),$N=pv(BN),zN=pv(HN),VN=W0(UN),aa=!1;var QN=pv(kN),jm=function(e){return e.asReactChildren},hs=function(){return function(e){var n=jm(e);return function(a){return function(t){return function(r){return WN(a,t,n(r))}}}}},KN=hs()(we),hv=function(){return function(e){return function(n){return KN(e)(n)([])}}},Fe=KN(qN)({});var lS=k(Hn),rte=W(ft),YN=function(e){return{initialize:function(n){return QN(n)(e.initialState)},getState:function(n){return function(){var t=lS(_e)(VN(n))();return ze(e.initialState)(t)}},setState:iS}},XN=function(){var e=function(n){return function(a){return{initialize:function(t){return as(new S(a.initialState))(n)},getState:function(t){return lS(ze(a.initialState))(ac(n))},setState:function(t){return function(r){return function(u){return function(){return as(new S(r))(n)(),iS(t)(r)(rte(ge))(),u()}}}}}}};return lS(e)(ts(M.value))}();var ZN=pe(an),ej=un(St);var ote=W(ft),nj=Jx(),aj={reflectSymbol:function(){return"__unmounted"}},ute=nj(aj),tj={reflectSymbol:function(){return"__subscriptions"}},ite=nj(tj),$R=pe(Hn),lte=NT(Sa)(aj),rj=k(Hn),cte=NT(Pa(jP))(tj),ste=rn(Xe),vte=qa(er),fte=$I(ft)(We),_te=ste(ua),oj=Rn(Rr),pte=Gg(nc),dte=un(Vs(PI(Cg))),uj=function(e){return e},Vf=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),mte={map:function(e){return function(n){return new Vf(e(n.value0),n.value1)}}},br=function(e){return{bimap:function(n){return function(a){return function(t){return new Vf(a(t.value0),ZN(t.value1)(function(r){return function(u){return r({dispatch:function(i){return u.dispatch(n(i))},onStop:u.onStop})}}))}}}}},ij={apply:function(e){return function(n){return new Vf(e.value0(n.value0),ej(e.value1)(n.value1))}},Functor0:function(){return mte}},$n={bind:function(e){return function(n){var a=n(e.value0);return new Vf(a.value0,ej(e.value1)(a.value1))}},Apply0:function(){return ij}},yn={pure:function(e){return new Vf(e,[])},Apply0:function(){return ij}};var hte=function(e){var n=ne(e);return function(a){var t=Rn(a);return function(r){return function(u){return new Vf(r,ZN(u)(function(i){return function(l){return n(i)(function(s){return t(l.dispatch(s))})}}))}}}};var Um=function(e){return new Vf(ge,[e])},Xa=function(e){return Um(hn(e))},V0=function(e){var n=ne(e.Monad0().Bind1()),a=Rn(e);return function(t){return Um(function(r){return n(t)(function(u){return a(In(ote(ge))(r.dispatch)(u))})})}},Fa=function(e){var n=hte(e.Monad0().Bind1())(e);return function(a){return n(ge)([a])}},lj=function(e){return function(n){var a=ute(Gm.value),t=ite(Gm.value),r=function(b){return function(T){return function(L){return function(){var $=$R(Fm(b))(function(z){return z.init})();return n({initialState:$.value0}).setState(b)(T)(L)()}}}},u=function(){var b=rj(ze(!1)),T=lte(Gm.value);return function(L){return b(T(L))}}(),i=function(){var b=rj(ze([])),T=cte(Gm.value);return function(L){return b(T(L))}}(),l=function(b){return function(){return vte(fte)(i(b))(),t([])(b)()}},s=function(b){return function(){var L=$R(Fm(b))(function(U){return U.init})();return n({initialState:L.value0}).getState(b)()}},h=function(b){return function(T){return function(){var U=i(b)();return t(zo(B0(T))(U))(b)()}}},p=function(b){return function(T){var L=function(U){return B0(_te(Xt(0))(function(){return U({dispatch:function(){var $=y(T);return function(z){return oj($(z))}}(),onStop:h(T)})}))};return AI(b)(L)}},y=function(b){return function(T){return pte(u(b))(function(){var U=s(b)(),$=$R(Fm(b))(function(Z){return Z.update})(),z=$(U)(T);return r(b)(z.value0)(p(z.value1)(b))()})}},E=function(b){return function(){var L=s(b)(),U=$R(Fm(b))(function($){return $.view})();return U(L)(y(b))}};return function(b){return Ox(e,{def:b,init:n({initialState:b.init.value0}).initialize,render:E,componentDidMount:p(b.init.value1),componentWillUnmount:dte(a(!0))(l)})}}},cj=function(e){return function(){var a=oj(XN)();return Ux(function(t){return lj(t)(a)(e)})}},Dv=function(e){return function(n){return jx(e,function(a){var t=lj(a)(YN);return function(r){return t(n(r))}})}};var sj=W(ft),vj=lu(),zR=function(e){return{handleMaybe:function(n){return function(a){return qf(function(){var t=In(sj(ge))(n);return function(r){return t(vj(a(r)))}}())}}}},gv=function(e){return{handleMaybe:function(n){return function(a){return function(t){return In(sj(ge))(n)(vj(a))()}}}}},Yu={handle:function(e){return function(n){return function(a){return e(n(a))()}}}},VR={handleEffect:function(e){return qf(e)}},yu={handleEffect:function(e){return qf(hn(e))}},ha={handle:function(e){return function(n){return function(a){return e(n)()}}}},Zi=function(e){return e.handleMaybe},Wr=function(e){return e.handleEffect},Zn=function(e){return e.handle};function QR(e,n){var a={};for(var t in n)({}).hasOwnProperty.call(n,t)&&(a[t]=n[t]);for(var r in e)({}).hasOwnProperty.call(e,r)&&(a[r]=e[r]);return a}var Ml=function(){return function(){return function(e){return function(n){return QR(e,n)}}}};var KR=function(e){var n=kt(e);return function(){return function(){return function(a){return function(t){return CI(n(a))(t)}}}}};var cS=hv(),sS=hs(),fj=Ml()();var Q0=Je,_j=function(e){return function(n){return cS(Q0(e))(n)}},vS=function(e){var n=sS(e);return function(a){return function(t){return n(Q0(a))(t)}}},Ri=function(e){var n=sS(e);return function(a){return function(t){return function(r){return n(Q0(a))(fj(r)({className:t}))}}}},Om=function(e){return function(n){return function(a){return cS(Q0(e))(fj(a)({className:n}))}}},pj=function(e){return function(n){return cS(Q0(e))({className:n})}},Ur=function(e){return function(n){var a=sS(n);return function(t){return function(r){return a(Q0(e))({className:t})(r)}}}};var st=Je;var K0=function(e){var n=Ri(e);return function(){return function(){return n("video")}}},YR=function(e){return Ur("video")(e)};var XR=function(e){return Ur("ul")(e)};var Ds=function(e){return Ur("tr")(e)};var Rv=function(e){return Ur("thead")(e)};var yv=function(e){return Ur("th")(e)};var Y0=function(){return function(){return Om("textarea")}};var ZR=function(e){var n=Ri(e);return function(){return function(){return n("td")}}},Al=function(e){return Ur("td")(e)};var bv=function(e){return Ur("tbody")(e)};var wv=function(e){return Ur("table")(e)};var mo=function(e){return Ur("strong")(e)},X0=function(e){var n=Ri(e);return function(){return function(){return n("span")}}},Ba=function(e){return Ur("span")(e)},ey=function(){return function(){return Om("source")}};var ny=function(e){var n=Ri(e);return function(){return function(){return n("select")}}};var Z0=function(e){var n=Ri(e);return function(){return function(){return n("p")}}},Jt=function(e){return Ur("p")(e)};var ay=function(e){var n=Ri(e);return function(){return function(){return n("option")}}};var ty=function(e){return Ur("li")(e)};var Ev=function(e){return Ur("label")(e)};var Jr=function(){return function(){return Om("input")}};var el=function(){return function(){return Om("img")}};var Za=function(e){return Ur("i")(e)};var Ll=pj("hr");var ep=function(e){return Ur("h6")(e)};var nl=function(e){return Ur("h4")(e)},ry=function(e){var n=Ri(e);return function(){return function(){return n("h3")}}},$r=function(e){return Ur("h3")(e)},hc=function(e){var n=Ri(e);return function(){return function(){return n("h2")}}},$t=function(e){return Ur("h2")(e)};var Iv=function(e){return Ur("h1")(e)},Tv=function(e){var n=Ri(e);return function(){return function(){return n("form")}}};var zt=function(e){var n=Ri(e);return function(){return function(){return n("div")}}},Ge=function(e){return Ur("div")(e)};var Ko=function(e){var n=Ri(e);return function(){return function(){return n("button")}}};var Sv=function(e){var n=Ri(e);return function(){return function(){return n("a")}}};var dj=wm(bm);var Dte=W(ft);var fS={map:function(e){return function(n){return dj(dj(e))(n)}}},mj=pe(fS),hj=function(e){var n=ne(e.Monad0().Bind1()),a=Rn(e);return function(t){return Um(function(r){return n(t(r.dispatch))(function(u){return a(r.onStop(u))})})}},Xu=function(e){var n=hj(e);return function(a){return function(t){return n(mj(t)(a))}}};var Dj=function(e){return function(n){return e(In(Dte(ge))(n))}},oy=function(e){var n=hj(e);return function(a){return function(t){return n(Dj(mj(t)(a)))}}};var Gn=function(){return{"genericTop'":Be.value}}();var _S=function(e){return e["genericTop'"]},Mn=function(e){return{"genericTop'":_S(e)}};var An=function(){return{"genericBottom'":Be.value}}();var km=function(e){return e["genericBottom'"]},Ln=function(e){return{"genericBottom'":km(e)}};var Pn=function(e){return{"genericBottom'":new be(km(e))}},gj=function(e){var n=i0(e);return function(a){return n(km(a))}};var Cv=k(oe),uy=Aa();var pS=function(e){return e["genericToEnum'"]};var iy=function(e){return e["genericSucc'"]},dS=function(e){var n=i0(e),a=l0(e);return function(t){var r=Cv(n),u=iy(t);return function(i){return r(u(a(i)))}}},mS=function(e){return e["genericPred'"]};var hS=function(e){return e["genericFromEnum'"]};var xn=function(e){var n=mS(e),a=iy(e);return function(t){var r=_S(t);return function(u){var i=mS(u),l=iy(u);return function(s){var h=km(s);return{"genericPred'":function(p){if(p instanceof be)return Cv(be.create)(n(p.value0));if(p instanceof ve){var y=i(p.value0);if(y instanceof M)return new S(new be(r));if(y instanceof S)return new S(new ve(y.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 30, column 14 - line 32, column 31): "+[y.constructor.name])}throw new Error("Failed pattern match at Data.Enum.Generic (line 28, column 18 - line 32, column 31): "+[p.constructor.name])},"genericSucc'":function(p){if(p instanceof be){var y=a(p.value0);if(y instanceof M)return new S(new ve(h));if(y instanceof S)return new S(new be(y.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 34, column 14 - line 36, column 31): "+[y.constructor.name])}if(p instanceof ve)return Cv(ve.create)(l(p.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 33, column 18 - line 37, column 36): "+[p.constructor.name])}}}}}};var Nn={"genericPred'":function(e){return M.value},"genericSucc'":function(e){return M.value}},jn=function(e){var n=mS(e),a=iy(e);return{"genericPred'":function(t){return Cv(Od)(n(t))},"genericSucc'":function(t){return Cv(Od)(a(t))}}};var DS=function(e){return e["genericCardinality'"]};var Un=function(e){var n=DS(e),a=pS(e),t=hS(e);return function(r){var u=pS(r),i=hS(r);return{"genericCardinality'":uy(n)+uy(DS(r))|0,"genericToEnum'":function(l){var s=function(h){if(l>=0&&l<h)return Cv(be.create)(a(l));if($e)return Cv(ve.create)(u(l-h|0));throw new Error("Failed pattern match at Data.Enum.Generic (line 83, column 5 - line 83, column 43): "+[h.constructor.name])};return s(n)},"genericFromEnum'":function(l){if(l instanceof be)return t(l.value0);if(l instanceof ve)return i(l.value0)+uy(n)|0;throw new Error("Failed pattern match at Data.Enum.Generic (line 87, column 22 - line 89, column 80): "+[l.constructor.name])}}}};var On={"genericCardinality'":1,"genericToEnum'":function(e){var n=e===0;return n?new S(Be.value):M.value},"genericFromEnum'":function(e){return 0}},kn=function(e){var n=pS(e),a=hS(e);return{"genericCardinality'":uy(DS(e)),"genericToEnum'":function(t){return Cv(Od)(n(t))},"genericFromEnum'":function(t){return a(t)}}};function dr(e){return e}function ly(e){return JSON.stringify(e)}var yj=dr(Lf);var yte=function(){function e(i){this.fn=i}var n={},a=function(i,l){this.head=i,this.tail=l};function t(i){return new a(i,n)}function r(i){return function(l){return new a(i,l)}}function u(i){for(var l=[],s=i;s!==n;)l.push(s.head),s=s.tail;return l}return function(i,l,s){var h=function(y,E){return i(l(r)(s(y)))(E)},p=function(y,E,b){if(E===0)return y;var T=b[E-1];return new e(function(){var L=p(h(T,y),E-1,b);return L})};return function(y){for(var E=l(t)(s(y[y.length-1])),b=p(E,y.length-1,y);b instanceof e;)b=b.fn();return l(u)(b)}}}();var gS=Hg;var np=function(e){return e};var al=function(){function e(){}return e.value=new e,e}(),xo=function(){function e(n,a,t,r,u,i){this.value0=n,this.value1=a,this.value2=t,this.value3=r,this.value4=u,this.value5=i}return e.create=function(n){return function(a){return function(t){return function(r){return function(u){return function(i){return new e(n,a,t,r,u,i)}}}}}},e}();var tl=function(e,n,a,t){if(a instanceof al){if(t instanceof al)return new xo(1,1,e,n,a,t);if(t instanceof xo)return new xo(1+t.value0|0,1+t.value1|0,e,n,a,t);throw new Error("Failed pattern match at Data.Map.Internal (line 702, column 5 - line 706, column 39): "+[t.constructor.name])}if(a instanceof xo){if(t instanceof al)return new xo(1+a.value0|0,1+a.value1|0,e,n,a,t);if(t instanceof xo)return new xo(1+function(){var r=a.value0>t.value0;return r?a.value0:t.value0}()|0,(1+a.value1|0)+t.value1|0,e,n,a,t);throw new Error("Failed pattern match at Data.Map.Internal (line 708, column 5 - line 712, column 68): "+[t.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 700, column 32 - line 712, column 68): "+[a.constructor.name])};var bS=function(e){return function(n){return new xo(1,1,e,n,al.value,al.value)}},Ej=function(){var e=function(t){if(t instanceof al)return 0;if(t instanceof xo)return t.value0;throw new Error("Failed pattern match at Data.Map.Internal (line 757, column 12 - line 759, column 26): "+[t.constructor.name])},n=function(t,r,u,i,l,s,h){return s instanceof xo&&s.value0>e(h)?tl(s.value2,s.value3,tl(t,r,u,s.value4),tl(i,l,s.value5,h)):tl(i,l,tl(t,r,u,s),h)},a=function(t,r,u,i,l,s,h){return s instanceof xo&&e(l)<=s.value0?tl(s.value2,s.value3,tl(u,i,l,s.value4),tl(t,r,s.value5,h)):tl(u,i,l,tl(t,r,s,h))};return function(t,r,u,i){if(u instanceof al)return i instanceof al?bS(t)(r):i instanceof xo&&i.value0>1?n(t,r,u,i.value2,i.value3,i.value4,i.value5):tl(t,r,u,i);if(u instanceof xo){if(i instanceof xo){if(i.value0>(u.value0+1|0))return n(t,r,u,i.value2,i.value3,i.value4,i.value5);if(u.value0>(i.value0+1|0))return a(t,r,u.value2,u.value3,u.value4,u.value5,i)}return i instanceof al&&u.value0>1?a(t,r,u.value2,u.value3,u.value4,u.value5,i):tl(t,r,u,i)}throw new Error("Failed pattern match at Data.Map.Internal (line 717, column 40 - line 738, column 34): "+[u.constructor.name])}}();var gs=function(e){var n=Ze(e);return function(a){var t=function(r){var u=!1,i;function l(s){if(s instanceof al)return u=!0,M.value;if(s instanceof xo){var h=n(a)(s.value2);if(h instanceof Re){r=s.value4;return}if(h instanceof he){r=s.value5;return}if(h instanceof qe)return u=!0,new S(s.value3);throw new Error("Failed pattern match at Data.Map.Internal (line 283, column 7 - line 286, column 22): "+[h.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 280, column 8 - line 286, column 22): "+[s.constructor.name])}for(;!u;)i=l(r);return i};return t}};var Ij=function(e){var n=Ze(e);return function(a){return function(t){var r=function(u){if(u instanceof al)return bS(a)(t);if(u instanceof xo){var i=n(a)(u.value2);if(i instanceof Re)return Ej(u.value2,u.value3,r(u.value4),u.value5);if(i instanceof he)return Ej(u.value2,u.value3,u.value4,r(u.value5));if(i instanceof qe)return new xo(u.value0,u.value1,a,t,u.value4,u.value5);throw new Error("Failed pattern match at Data.Map.Internal (line 471, column 7 - line 474, column 35): "+[i.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 468, column 8 - line 474, column 35): "+[u.constructor.name])};return r}}};var Rs=function(){return al.value}(),rl=function(e){var n=Ij(e);return function(a){return Gt(a)(function(t){return function(r){return n(r.value0)(r.value1)(t)}})(Rs)}};var Lte=typeof Array.from=="function",Cj=typeof Symbol!="undefined"&&Symbol!=null&&typeof Symbol.iterator!="undefined"&&typeof String.prototype[Symbol.iterator]=="function",Pte=typeof String.prototype.fromCodePoint=="function",xte=typeof String.prototype.codePointAt=="function",Fj=function(e){return xte?function(n){return n.codePointAt(0)}:e},Gj=function(e){return function(n){return function(a){return function(t){return function(r){return function(u){var i=u.length;if(r<0||r>=i)return a;if(Cj)for(var l=u[Symbol.iterator](),s=r;;--s){var h=l.next();if(h.done)return a;if(s===0)return n(t(h.value))}return e(r)(u)}}}}}};var Mj=function(e){return Pte?String.fromCodePoint:e},Aj=function(e){return function(n){return Cj?function(a){for(var t="",r=a[Symbol.iterator](),u=0;u<n;++u){var i=r.next();if(i.done)return t;t+=i.value}return t}:e(n)}},Lj=function(e){return function(n){return Lte?function(a){return Array.from(a,n)}:e}};var Yo=function(e){return function(n){return n.split(e)}};var Fv=function(e){return e.toUpperCase()};var Or=function(e){return function(n){return n.join(e)}};var Pl=function(e){return e===""};var Ote=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},Bm=Jn(Of),Nj=k(oe),kte=uc(Wo),Bte=_o(ur),Hte=So(ur),qte=Ze(ra);var jj=function(e){return function(n){return(((e-55296|0)*1024|0)+(n-56320|0)|0)+65536|0}};var Uj=function(e){return 56320<=e&&e<=57343},Oj=function(e){return 55296<=e&&e<=56319},Qf=function(e){var n=Tl(e);if(n===0)return M.value;if(n===1)return new S({head:Bm(us(0)(e)),tail:""});var a=Bm(us(1)(e)),t=Bm(us(0)(e)),r=Oj(t)&&Uj(a);return r?new S({head:jj(t)(a),tail:cc(2)(e)}):new S({head:t,tail:cc(1)(e)})},Wte=function(e){return Nj(function(n){return new Dn(n.head,n.tail)})(Qf(e))},Jte=function(e){return kte(Wte)(e)},$te=function(e){var n=Bm(us(0)(e)),a=Oj(n)&&Tl(e)>1;if(a){var t=Bm(us(1)(e)),r=Uj(t);return r?jj(n)(t):n}return n},ES=Fj($te),Hm=Lj(Jte)(ES),Xo=function(e){return fo(Hm(e))};var kj=function(e){return function(n){return Nj(function(a){return Xo(C0(a)(n))})(_R(e)(n))}},IS=function(){var e=DT(Of)(rt(Xs))(Vt(Xs));return function(n){return Uu(e(n))}}(),zte=function(e){if(e<=65535)return IS(e);var n=Bte(e-65536|0)(1024)+55296|0,a=Hte(e-65536|0)(1024)+56320|0;return IS(n)+IS(a)};var TS=Mj(zte),Bj=function(e){return function(n){if(e<1)return"";var a=Qf(n);return a instanceof S?TS(a.value0.head)+Bj(e-1|0)(a.value0.tail):n}},ol=Aj(Bj);var vy={eq:function(e){return function(n){return e===n}}},fy={compare:function(e){return function(n){return qte(e)(n)}},Eq0:function(){return vy}},ap=function(e){return function(n){return cc(Tl(ol(e)(n)))(n)}};var Vte=function(e){return function(n){var a=e,t=!1,r;function u(i,l){var s=Qf(l);if(s instanceof S){var h=i===0;if(h)return t=!0,new S(s.value0.head);a=i-1|0,n=s.value0.tail;return}return t=!0,M.value}for(;!t;)r=u(a,n);return r}},SS=function(e){return function(n){return e<0?M.value:e===0&&n===""?M.value:e===0?new S(ES(n)):Gj(Vte)(S.create)(M.value)(ES)(e)(n)}},Qte={bottom:0,top:1114111,Ord0:function(){return fy}},Dc=function(){return{cardinality:1114111+1|0,fromEnum:function(e){return e},toEnum:function(e){if(e>=0&&e<=1114111)return new S(e);if($e)return M.value;throw new Error("Failed pattern match at Data.String.CodePoints (line 63, column 1 - line 68, column 26): "+[e.constructor.name])},Bounded0:function(){return Qte},Enum1:function(){return Kte(0)}}}(),Kte=Ote("enumCodePoint","Data.String.CodePoints",function(){return{succ:jf(oa(Dc))(Jn(Dc)),pred:Uf(oa(Dc))(Jn(Dc)),Ord0:function(){return fy}}});var lre=Aa();var Vj={show:lre};var Qj=de;var cre=lv(We),sre=pe(an),vre=wf(gS),Cn=function(e){return function(n){var a=cre(sre(n)(function(t){return new Dn(e(t),t)}));return function(t){return sc(t)(a)}}},fre=function(e){var n=dS(e),a=gj(e);return function(t){var r=n(t);return function(u){return function(i){return vre(function(l){return new Dn(l,r(l))})(a(i))}}}},Bn=function(e){var n=fre(e);return function(a){var t=n(a);return function(r){var u=t(r);return function(i){return np(u(i))}}}};var _re={info:"info",warning:"warn",error:"error"},xl=e=>n=>a=>t=>{let r=_re[e];if(typeof console!="undefined"&&console[r]&&console[r](n,a),typeof window!="undefined"){let u=new Error(n);typeof window.Sentry!="undefined"&&window.Sentry.captureException(u,{extra:a})}return t()},Kj=(e,n)=>(n.__sentryFingerprint=e,n);var Yj=function(e){return qi(Kj)(e)};var gc="error";var py={parseOrPanic:function(e){return function(n){var a=e.parse(n);if(a instanceof Oe)return a.value0;if(a instanceof xe)return xl(gc)("Failed to parse "+e.diagnosticName)({error:a.value0,value:n})(function(t){return e.default});throw new Error("Failed pattern match at Utils.Parse (line 49, column 5 - line 57, column 24): "+[a.constructor.name])}}},ta=function(e){return e.parseOrPanic},pre=ta(py),Ha=function(e){var n=ta(e);return function(a){var t=k(a);return function(r){return n({parse:function(u){return t(S.create)(r.parse(u))},default:M.value,diagnosticName:r.diagnosticName})}}},dre=Ha(py)(Dr),Kf=function(e){var n=Nf(e);return function(a){return dre({parse:n,diagnosticName:a})}},nn={parseOrPanic:function(e){return pre({default:e.default,diagnosticName:e.diagnosticName,parse:function(){var n=In(new xe(""))(Oe.create);return function(a){return n(e.parse(a))}}()})}};var Xj=jn(Nn),Zj=Ln(An),e4=kn(On),ys=function(){function e(){}return e.value=new e,e}(),bs=function(){function e(){}return e.value=new e,e}(),mre={to:function(e){if(e instanceof be)return ys.value;if(e instanceof ve)return bs.value;throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])},from:function(e){if(e instanceof ys)return new be(Be.value);if(e instanceof bs)return new ve(Be.value);throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 16, column 1 - line 16, column 32): "+[e.constructor.name])}};var hre=function(e){if(e instanceof ys)return"school";if(e instanceof bs)return"vine";throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 28, column 1 - line 28, column 29): "+[e.constructor.name])},dy=function(){return ta(nn)({parse:Cn(hre)(Bn(mre)(xn(Xj)(Mn(Gn))(Xj)(Zj))(Un(e4)(e4))(Pn(Zj))),default:ys.value,diagnosticName:"Sem.Connections.Types.Actor"})}();var n4=jn(Nn),a4=xn(n4)(Mn(Gn)),t4=Ln(An),r4=Pn(t4),o4=kn(On),u4=Un(o4),Dre=da(Kr),Nl=function(){function e(){}return e.value=new e,e}(),Gv=function(){function e(){}return e.value=new e,e}(),ws=function(){function e(){}return e.value=new e,e}(),gre={to:function(e){if(e instanceof be)return Nl.value;if(e instanceof ve&&e.value0 instanceof be)return Gv.value;if(e instanceof ve&&e.value0 instanceof ve)return ws.value;throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])},from:function(e){if(e instanceof Nl)return new be(Be.value);if(e instanceof Gv)return new ve(new be(Be.value));if(e instanceof ws)return new ve(new ve(Be.value));throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])}};var Rre=function(e){if(e instanceof Nl)return"pending";if(e instanceof Gv)return"connected";if(e instanceof ws)return"ignored";throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 34, column 1 - line 34, column 30): "+[e.constructor.name])},FS=function(){var e=Cn(Rre)(Bn(gre)(a4(a4(n4)(t4))(r4))(u4(u4(o4)))(r4)),n=function(a){return a==="cold"?new S(ws.value):M.value};return ta(nn)({parse:function(a){return Dre(e(a))(n(a))},default:Nl.value,diagnosticName:"Sem.Connections.Types.Status"})}();var yre=cu(We)(bt),i4=re(on),bre=gr(We)(bt),wre=Ba(te);var l4=function(e){return{initiator:dy(e.initiator),status:FS(e.status),introMessage:ze("")(_e(e.introMessage))}},c4=25,GS=function(e){return Xo(e)>=c4},s4=function(e){var n=Xo(e),a=n>0,t=yre(" ")([function(){return a?i4(n)+" characters":""}(),bre(["(",i4(c4),function(){return a?"":" character"}()," minimum)"])]),r=function(){var u=GS(e);return u?"text-success":""}();return wre(r)(t)};var my=function(){function e(){}return e.value=new e,e}(),v4=function(){function e(){}return e.value=new e,e}();var f4=function(){var e=ta(nn)({parse:function(n){return n instanceof S&&n.value0==="paid"?new S(v4.value):n instanceof S&&n.value0==="free"?new S(my.value):n instanceof S&&n.value0==="churned"?new S(my.value):n instanceof M?new S(my.value):M.value},default:my.value,diagnosticName:"Sem.Types.PartnerStatus"});return function(n){return e(_e(n))}}();var _4=function(e){return{allowedToContact:e.allowedToContact,id:e.id,name:e.name,imageUrl:_e(e.imageUrl),partnerStatus:f4(e.partnerStatus)}};var Ere=ne(tn),MS=La(),qm=Ya(de),p4=H({reflectSymbol:function(){return"id"}}),Ire=rn(Xe)(tn),Tre=xr(Yr),Sre=k(oe);var Cre=function(){function e(){}return e.value=new e,e}(),Fre=function(){function e(){}return e.value=new e,e}(),Gre=function(){function e(){}return e.value=new e,e}(),AS=function(){function e(){}return e.value=new e,e}(),Mre=function(){function e(){}return e.value=new e,e}(),hy=function(){function e(){}return e.value=new e,e}(),Wm=function(){function e(){}return e.value=new e,e}(),LS=function(){function e(){}return e.value=new e,e}(),PS=function(){function e(){}return e.value=new e,e}();var d4={show:Aa()};var Are=de,Lre=Kf(MS(H({reflectSymbol:function(){return"avatarUrl"}})(qm)(H({reflectSymbol:function(){return"bio"}})(qm)(H({reflectSymbol:function(){return"connection"}})(Ya(MS(H({reflectSymbol:function(){return"initiator"}})(de)(H({reflectSymbol:function(){return"introMessage"}})(qm)(H({reflectSymbol:function(){return"status"}})(de)(ln))))))(H({reflectSymbol:function(){return"firstName"}})(de)(p4(Are)(H({reflectSymbol:function(){return"lastName"}})(de)(H({reflectSymbol:function(){return"school"}})(MS(H({reflectSymbol:function(){return"allowedToContact"}})(Sa)(p4(Qj)(H({reflectSymbol:function(){return"imageUrl"}})(qm)(H({reflectSymbol:function(){return"name"}})(de)(H({reflectSymbol:function(){return"partnerStatus"}})(qm)(ln)))))))(H({reflectSymbol:function(){return"title"}})(de)(H({reflectSymbol:function(){return"type"}})(de)(H({reflectSymbol:function(){return"unreadMessageCountFromSemUser"}})(cn)(ln))))))))))));var m4=function(e){if(e instanceof Cre)return"sheet-view";if(e instanceof Fre)return"school-details";if(e instanceof Gre)return"network-gallery";if(e instanceof AS)return"livestream-details";if(e instanceof Mre)return"card-view";throw new Error("Failed pattern match at Sem.Types.User (line 100, column 25 - line 105, column 26): "+[e.constructor.name])},h4=function(e){return Ere(Lre("SemUser")(e))(function(n){return Ire(Tre(n.type==="Sem::User"))(function(){return new S({school:_4(n.school),firstName:n.firstName,lastName:n.lastName,avatarUrl:_e(n.avatarUrl),title:n.title,bio:_e(n.bio),connection:Sre(l4)(_e(n.connection)),unreadMessageCountFromSemUser:n.unreadMessageCountFromSemUser,id:n.id})})})};var Es=function(e){var n=null;return function(){return e===void 0||(n=e(),e=void 0),n}},Is=function(e){return e()};var T4=function(){function e(){}return e.value=new e,e}(),S4=function(){function e(){}return e.value=new e,e}(),C4=function(){function e(){}return e.value=new e,e}();var Qre=function(e){if(e instanceof T4)return"disabled";if(e instanceof S4)return"free-consultation";if(e instanceof C4)return"more-information";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types.InquiryMode (line 27, column 13 - line 30, column 40): "+[e.constructor.name])};var Kre=function(){return[T4.value,S4.value,C4.value]}(),F4=Ha(nn)(oe)({parse:Cn(Qre)(Kre),diagnosticName:"InquiryMode"});var Yre=function(e,n,a,t,r,u,i){var l=new Date(Date.UTC(e,n,a,t,r,u,i));return e>=0&&e<100&&l.setUTCFullYear(e),l};function G4(e,n,a,t,r,u,i){return Yre(e,n-1,a,t,r,u,i).getTime()}function M4(e){return function(n){var a=new Date(n);return e(a.getUTCFullYear())(a.getUTCMonth()+1)(a.getUTCDate())(a.getUTCHours())(a.getUTCMinutes())(a.getUTCSeconds())(a.getUTCMilliseconds())}}var Xre=Ft(),Zre=oa(ir);var eoe=Jn(ir);var A4=function(e){return e},Ry=function(){var e=function(n){return function(a){return function(t){return function(r){return function(u){return function(i){return function(l){return new pc(fv(n)(Xre(Zre(a)))(t),new fc(r,u,i,l))}}}}}}};return M4(e)}();var L4=function(e){return G4(zu(e.value0),eoe(Vu(e.value0)),vc(e.value0),_c(e.value1),fs(e.value1),vs(e.value1),Ki(e.value1))};var P4=function(e){var n=un(e.Semigroup0()),a=function(t){return function(r){return function(u){var i=t,l=r,s=!1,h;function p(y,E,b){if(b<1)return s=!0,y;i=n(y)(E),l=E,u=b-1|0}for(;!s;)h=p(i,l,u);return h}}};return a(nt(e))};var noe=Aa();var Yf=function(){function e(n,a,t){this.value0=n,this.value1=a,this.value2=t}return e.create=function(n){return function(a){return function(t){return new e(n,a,t)}}},e}(),$m=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var x4=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),N4=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OS=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var tp={defer:function(e){var n=Es(e);return function(a,t,r,u,i){var l=Is(n);return l(a,t,r,u,i)}}};var Rc={map:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return n(a,t,r,u,function(s,h){return t(function(p){return i(s,e(h))})})})}}}};var yc={apply:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(a,t,r,u,function(s,h){return t(function(p){return n(s,t,r,u,function(y,E){return t(function(b){return i(y,h(E))})})})})})}}},Functor0:function(){return Rc}};var bc={bind:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(a,t,r,u,function(s,h){return t(function(p){var y=n(h);return y(s,t,r,u,i)})})})}}},Apply0:function(){return yc}},aoe=qa(bc);var ul={pure:function(e){return function(n,a,t,r,u){return u(n,e)}},Apply0:function(){return yc}};var toe={Applicative0:function(){return ul},Bind1:function(){return bc}};var j4={throwError:function(e){return function(n,a,t,r,u){return r(n,e)}},Monad0:function(){return toe}},roe=Lr(j4);var Xf={alt:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(new Yf(a.value0,a.value1,!1),t,r,function(s,h){return t(function(p){return s.value2?u(s,h):n(a,t,r,u,i)})},i)})}}},Functor0:function(){return Rc}},ooe=function(e){return function(n,a,t,r,u){var i=e(n);return u(i.value1,i.value0)}};var uoe=function(e){var n=e.Monad0(),a=k(n.Bind1().Apply0().Functor0()),t=W(n.Applicative0()),r=Co(e);return function(u){return function(i){var l=function(s){var h=!1,p;function y(E){var b=E(ge);if(b instanceof x4){s=b.value0;return}if(b instanceof N4)return h=!0,a(Kt.create)(b.value0);if(b instanceof OS)return h=!0,t(new Wt(new Dn(b.value1,b.value0)));throw new Error("Failed pattern match at Parsing (line 152, column 13 - line 158, column 32): "+[b.constructor.name])}for(;!h;)p=y(s);return p};return r(l)(function(s){return i(u,x4.create,N4.create,function(h,p){return new OS(h,new xe(p))},function(h,p){return new OS(h,new Oe(p))})})}}};var U4=ooe(function(e){return new Dn(e.value1,e)}),kS=function(e){return e.value1},BS=function(e){return e.value0};var ioe={index:0,line:1,column:1},O4=function(e){var n=k(e.Monad0().Bind1().Apply0().Functor0()),a=uoe(e);return function(t){return function(r){var u=new Yf(t,ioe,!1);return n(Fo)(a(u)(r))}}},loe=O4(Hd),k4=function(e){var n=loe(e);return function(a){return noe(n(a))}};var coe=function(e){return function(n){return roe(new $m(e,n))}},rp=function(e){return aoe(coe(e))(U4)};var B4={empty:rp("No alternative"),Alt0:function(){return Xf}},Zf={Applicative0:function(){return ul},Plus1:function(){return B4}};var Doe=da(Xf);var goe=W(ul);var Roe=k(Rc);var wc=function(e){return function(n,a,t,r,u){return e(n,a,t,function(i,l){return r(new Yf(i.value0,i.value1,n.value2),l)},u)}};var yy=function(e){return function(n){return Doe(n)(goe(e))}},e_=function(e){return yy(M.value)(Roe(S.create)(e))};var $4=Jn(Dc),boe=So(ur);var woe=re(Ht);var z4=function(e){return function(n){return function(a){var t=$4(n);if(t===10)return{index:e.index+1|0,line:e.line+1|0,column:1};if(t===13){var r=SS(0)(a);return r instanceof S&&$4(r.value0)===10?{index:e.index+1|0,line:e.line,column:e.column}:{index:e.index+1|0,line:e.line+1|0,column:1}}return t===9?{index:e.index+1|0,line:e.line,column:(e.column+8|0)-boe(e.column-1|0)(8)|0}:{index:e.index+1|0,line:e.line,column:e.column+1|0}}}},Eoe=function(e){return function(n){return function(a){var t=e,r=n,u=!1,i;function l(s,h,p){var y=Qf(h);if(y instanceof M)return u=!0,s;if(y instanceof S){var E=function(){if(Pl(y.value0.tail))return z4(s)(y.value0.head)(p);if($e)return z4(s)(y.value0.head)(y.value0.tail);throw new Error("Failed pattern match at Parsing.String (line 165, column 7 - line 167, column 52): "+[])}();t=E,r=y.value0.tail,a=p;return}throw new Error("Failed pattern match at Parsing.String (line 161, column 36 - line 168, column 38): "+[y.constructor.name])}for(;!u;)i=l(t,r,a);return i}}};var WS=Bg(function(e){return function(n){return function(a){return function(t){return function(r){var u=Pl(e.value0);return u?r(new Yf(e.value0,e.value1,!0),ge):t(e,new $m("Expected EOF",e.value1))}}}}}),V4=function(e){return Bg(function(n){return function(a){return function(t){return function(r){return function(u){var i=e(n.value0);if(i instanceof xe)return r(n,new $m(i.value0,n.value1));if(i instanceof Oe)return u(new Yf(i.value0.remainder,Eoe(n.value1)(i.value0.consumed)(i.value0.remainder),!Pl(i.value0.consumed)),i.value0.value);throw new Error("Failed pattern match at Parsing.String (line 286, column 7 - line 290, column 121): "+[i.constructor.name])}}}}})};var Ec=function(e){return V4(function(n){var a=fi(e)(n);return a instanceof S?new Oe({value:e,consumed:e,remainder:a.value0}):new xe("Expected "+woe(e))})};var Q4=re(on),Toe=_r(Lu),Soe=a0(yc);var Coe=function(e){return"(line "+(Q4(e.line)+(", col "+(Q4(e.column)+")")))},Foe=function(e){return BS(e)+(" "+Coe(kS(e)))},JS=function(e){return function(n){return Toe(Foe)(k4(n)(Soe(e)(WS)))}};var wy=oa(Of);var No=re(on);var Hoe=Ar(Mo),qoe=Hoe(bt);var Woe=GI(ra)(Zl);var $S=Jn(Nr),Joe=re(hR),$oe=Jn(ir),e8=Jn(Du),zoe=Aa(),Voe=Jn(sv),n8=re(QP),zS=Jn(hi),Qoe=So(ur),a8=Jn(mi),t8=Jn(di),VS=Jn(gu),r8=_o(ur);var op=function(){function e(){}return e.value=new e,e}(),o8=function(){function e(){}return e.value=new e,e}(),Koe=function(){function e(){}return e.value=new e,e}(),jl=function(){function e(){}return e.value=new e,e}(),QS=function(){function e(){}return e.value=new e,e}(),u8=function(){function e(){}return e.value=new e,e}(),i8=function(){function e(){}return e.value=new e,e}(),Ul=function(){function e(){}return e.value=new e,e}(),Yoe=function(){function e(){}return e.value=new e,e}(),Xoe=function(){function e(){}return e.value=new e,e}(),Ol=function(){function e(){}return e.value=new e,e}(),Zoe=function(){function e(){}return e.value=new e,e}(),KS=function(){function e(){}return e.value=new e,e}(),kl=function(){function e(){}return e.value=new e,e}(),Bl=function(){function e(){}return e.value=new e,e}(),eue=function(){function e(){}return e.value=new e,e}(),yi=function(){function e(){}return e.value=new e,e}(),nue=function(){function e(){}return e.value=new e,e}(),YS=function(){function e(){}return e.value=new e,e}(),aue=function(){function e(){}return e.value=new e,e}(),tue=function(){function e(){}return e.value=new e,e}(),rue=function(){function e(){}return e.value=new e,e}(),gt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var oue=function(e){if(e instanceof pu)return"Jan";if(e instanceof ku)return"Feb";if(e instanceof du)return"Mar";if(e instanceof Bu)return"Apr";if(e instanceof Hu)return"May";if(e instanceof mu)return"Jun";if(e instanceof hu)return"Jul";if(e instanceof qu)return"Aug";if(e instanceof Wu)return"Sep";if(e instanceof Ju)return"Oct";if(e instanceof $u)return"Nov";if(e instanceof pi)return"Dec";throw new Error("Failed pattern match at Data.Formatter.DateTime (line 489, column 19 - line 501, column 22): "+[e.constructor.name])};var Av=function(e){if(e<0)return"-"+Av(-e|0);if(e<10)return"0"+No(e);if($e)return No(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 194, column 1 - line 194, column 32): "+[e.constructor.name])},l8=function(e){if(e<0)return"-"+l8(-e|0);if(e<10)return"000"+No(e);if(e<100)return"00"+No(e);if(e<1e3)return"0"+No(e);if($e)return No(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 207, column 1 - line 207, column 35): "+[e.constructor.name])},c8=function(e){if(e<0)return"-"+c8(-e|0);if(e<10)return"00"+No(e);if(e<100)return"0"+No(e);if($e)return No(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 200, column 1 - line 200, column 32): "+[e.constructor.name])};var uue=function(e){var n=No(Woe(e)),a=Xo(n);return a===1?"0"+n:a===2?n:ap(a-2|0)(n)};var iue=function(e){var n=e===0;return n?12:e},lue=function(e){return function(n){if(n instanceof op)return l8($S(zu(e.value0)));if(n instanceof o8)return uue($S(zu(e.value0)));if(n instanceof Koe)return No($S(zu(e.value0)));if(n instanceof jl)return Joe(Vu(e.value0));if(n instanceof QS)return oue(Vu(e.value0));if(n instanceof u8)return Av($oe(Vu(e.value0)));if(n instanceof i8)return Av(e8(vc(e.value0)));if(n instanceof Ul)return No(e8(vc(e.value0)));if(n instanceof Yoe)return No(po(function(t){return t/1e3}(zoe(A4(L4(e))))));if(n instanceof Xoe)return No(Voe(mm(e.value0)));if(n instanceof Ol)return n8(mm(e.value0));if(n instanceof Zoe)return ol(3)(n8(mm(e.value0)));if(n instanceof KS)return Av(zS(_c(e.value1)));if(n instanceof kl)return Av(iue(Qoe(zS(_c(e.value1)))(12)));if(n instanceof Bl){var a=zS(_c(e.value1))>=12;return a?"PM":"AM"}if(n instanceof eue)return No(a8(fs(e.value1)));if(n instanceof yi)return Av(a8(fs(e.value1)));if(n instanceof nue)return No(t8(vs(e.value1)));if(n instanceof YS)return Av(t8(vs(e.value1)));if(n instanceof aue)return c8(VS(Ki(e.value1)));if(n instanceof tue)return No(function(t){return r8(t)(100)}(VS(Ki(e.value1))));if(n instanceof rue)return Av(function(t){return r8(t)(10)}(VS(Ki(e.value1))));if(n instanceof gt)return n.value0;throw new Error("Failed pattern match at Data.Formatter.DateTime (line 169, column 38 - line 192, column 21): "+[n.constructor.name])}},jo=function(e){return function(n){return qoe(lue(n))(e)}};function Ey(e){return Math.round(e).toString()}var up=ne(bc);var cue=W(ul),sue=b0(Zf)(tp);var vue=aT(Zf)(tp),Iy=P4(bt),fue=g0(ul)(Kd),_ue=k(oe);var s8=es(ra),pue=_o(ur),due=re(on),mue=pe(Dr),hue=re(df),Due=pn(dn);var gue=up(e_(wc(Ec("+"))))(function(e){return up(sue(Ec("0")))(function(n){return up(e_(wc(Ec(",0"))))(function(a){return up(e_(wc(Ec("."))))(function(t){return up(fue(t)(function(r){return wc(vue(Ec("0")))}))(function(r){return up(e_(wc(Ec("a"))))(function(u){return cue({sign:xt(e),before:fo(n),comma:xt(a),after:ze(0)(_ue(fo)(r)),abbreviations:xt(u)})})})})})})}),Rue=JS(gue);var v8=function(e){return function(n){var a=zg(n),t=function(){if(a>0)return s8(po(oT(a)/K3))(0);if($e)return 0;throw new Error("Failed pattern match at Data.Formatter.Number (line 100, column 5 - line 102, column 22): "+[])}();if(e.abbreviations){var r=pue(t)(3),u=function(){var $=r<1;return $?n:n/Vg(1e3)(Mt(r))}(),i=function(){if(r===0)return"";if(r===1)return"K";if(r===2)return"M";if(r===3)return"G";if(r===4)return"T";if(r===5)return"P";if(r===6)return"E";if(r===7)return"Z";if(r===8)return"Y";if($e)return"10e+"+due(r*3|0);throw new Error("Failed pattern match at Data.Formatter.Number (line 107, column 7 - line 117, column 53): "+[])}();return v8({comma:e.comma,before:e.before,after:e.after,sign:e.sign,abbreviations:!1})(u)+i}var l=(e.before-t|0)-1|0,s=Vg(10)(Mt(s8(0)(e.after))),h=Sf(a*s)/s,p=w0(h),y=h-p,E=Sf(y*s),b=function(){var $=Ey(E),z=Xo($),Z=Iy("0")(e.after-z|0);return Z+$}(),T=function(){var $=e.after<1;return $?"":"."+(function(){var z=E===0;return z?Iy("0")(e.after):""}()+function(){var z=E>0;return z?b:""}())}(),L=function($){return function(z){return function(Z){var ue=$,X=z,Y=!1,ae;function me(ke,ce,le){var Ce=Yd(le);if(Ce instanceof M)return Y=!0,S0(ke);if(Ce instanceof S&&ce<3){ue=zo(Ce.value0.head)(ke),X=ce+1|0,Z=Ce.value0.tail;return}ue=zo(",")(ke),X=0,Z=le}for(;!Y;)ae=me(ue,X,Z);return ae}}},U=function(){return e.comma?L([])(0)(Md(om(Iy("0")(l)+Ey(p)))):Iy("0")(l)+Ey(p)}();return function(){var $=n<0;if($)return"-";var z=n>0&&e.sign;return z?"+":""}()+(U+T)}},yue=function(e){return function(n){return mue(Rue(e))(Ka(v8)(n))}},ip=function(e){return function(n){return qt(hn(hue(n)))(Due)(yue(e)(n))}};var wue=Je;var f8=function(e){return Ff(e)};var il=function(e){var n=f8(e);return n?M.value:new S(wue(e))};var Ja=function(e){return function(n){var a=f8(e);return a?n:e}};var Zr=function(){return Je};var zm=re(on),Eue=Jn(Nr),Iue=Jn(ir),Tue=Zr(),Sue=lu(),Cue=Ku(vv),XS=_o(ur),Fue=Vo(We);var Gue=function(e){return function(n){if(n.minutes<=0)return e.justNow;if(n.minutes<=1)return"a minute"+e.suffix;if(n.minutes<=45)return zm(n.minutes)+(" minutes"+e.suffix);if(n.hours<=1)return"an hour"+e.suffix;if(n.hours<24)return zm(n.hours)+(" hours"+e.suffix);if(n.days<=1)return"a day"+e.suffix;if(n.days<30)return zm(n.days)+(" days"+e.suffix);if(n.months<=1)return"a month"+e.suffix;if(n.months<12)return zm(n.months)+(" months"+e.suffix);if(n.years<=1)return"a year"+e.suffix;if($e)return zm(n.years)+(" years"+e.suffix);throw new Error("Failed pattern match at Utils.Format (line 150, column 1 - line 150, column 81): "+[e.constructor.name,n.constructor.name])}},Ty=function(e){return Gue({suffix:" "+e,justNow:"just now"})},_8=function(){return function(e){var n=function(h){return(Eue(zu(kf(h)))*12|0)+Iue(Vu(kf(h)))|0},a=Tue(e),t=Ja(a.format)(Ty("ago")),r=Qg(Sue(Cue(a.to)(a.from))),u=XS(r+30|0)(60),i=XS(u+12|0)(24),l=n(a.to)-n(a.from)|0,s=XS(l+6|0)(12);return t({minutes:r,hours:u,days:i,months:l,years:s})}};var Mue=function(e){return function(n){return function(a){var t=e===1;return t?n:a}}};var ZS=ip("0,0");var p8=function(e){return ZS(Mt(e))},ll=function(e){return function(n){return function(a){return p8(e)+(" "+Mue(e)(n)(a))}}};var d8=function(){return jo(Fue([Ol.value,new gt(", "),jl.value,new gt(" "),Ul.value,new gt(" at "),kl.value,new gt(":"),yi.value,new gt(" "),Bl.value]))}();var eC=()=>document.visibilityState=="visible",m8=(e,n)=>document.elementFromPoint(e,n);var h8=function(e){var n=vS(e);return function(){return function(){return n("button")}}},D8=function(){return function(){return _j("br")}};var g8=function(e){var n=vS(e);return function(){return function(){return n("a")}}};function R8(e){return function(n){return function(){return n.getElementById(e)}}}var Aue=k(Hn),Sy=function(e){var n=Aue(_e),a=R8(e);return function(t){return n(a(t))}};var Cy=function(e){return function(n){return function(){return n[e]}}},Lue=Cy("children"),Pue=Cy("firstElementChild"),xue=Cy("lastElementChild"),Nue=Cy("childElementCount");var Zo=function(){return window};function y8(e,n,a,t){if(typeof window!="undefined"){var r=window[a];if(r!=null&&t instanceof r)return n(t)}for(var u=t;u!=null;){var i=Object.getPrototypeOf(u),l=i.constructor.name;if(l===a)return n(t);if(l==="Object")return e;u=i}return e}var Fn=function(e){return function(n){return y8(M.value,S.create,e,n)}};var b8=Je;var Fy=Je;var w8=Je;function E8(e,n,a){var t=Object.prototype.toString.call(a);return t.indexOf("[object HTML")===0&&t.indexOf("Element]")===t.length-8?n(a):e}var nC=Je;var I8=function(e){return E8(M.value,S.create,e)};function aC(e){return function(){return e.seeking}}function Vm(e){return function(){return e.currentTime}}function tC(e){return function(){return e.volume}}function rC(e){return function(n){return function(){n.volume=e}}}function oC(e){return function(){return e.muted}}function n_(e){return function(n){return function(){n.muted=e}}}var T8=Fn("HTMLMediaElement");var S8=Fn("HTMLMediaElement");function uC(e){return function(){return e.hash}}function iC(e){return function(n){return function(){n.hash=e}}}function lC(e){return function(){return e.platform}}function Lv(e){return function(){return e.document}}function cC(e){return function(){return e.navigator}}function Qm(e){return function(){return e.location}}var C8=Je;var Que=k(an);var Kue=D8()(),Yue=g0(ft)(Kd),F8=ne(er),G8=pe(Hn),Xue=ne(tn);var M8=en("\xA0");var ga=Ka(In(aa));var Zue=function(e){return function(n){if(e)return aa;if($e)return n(ge);throw new Error("Failed pattern match at Utils.HTML (line 111, column 1 - line 111, column 65): "+[e.constructor.name,n.constructor.name])}},A8=function(e){return function(n){return Zue(e)(hn(n))}};var L8=function(e){return function(n){if(e)return n(ge);if($e)return aa;throw new Error("Failed pattern match at Utils.HTML (line 98, column 1 - line 98, column 61): "+[e.constructor.name,n.constructor.name])}},ya=function(e){return function(n){return L8(e)(hn(n))}};var Km=function(e){return Fe(nT(Kue({}))(Que(en)(Yo(` `)(e))))},Gy=function(e){return Yue(S8(e.target))(Vm)};var P8=function(e){return function(){return m8(e.x,e.y)}},x8=function(e){return F8(G8(F8(Zo)(Lv))(Fy))(Sy(e))},My=function(e){return G8(x8(e))(function(n){return Xue(n)(I8)})};var Ym=cn;var N8=({just:e,nothing:n})=>a=>{try{let t=new Date(a);return isNaN(t.getTime())?n:e(t)}catch{return n}},sC=e=>({year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),j8=()=>new Date,U8=(()=>{let e=new Date;return typeof window!="undefined"?()=>e:()=>{let n=new Date;return n-e>1e3&&(e=n),e}})();var a_=(()=>{let e=new Date().toString(),n=(e.match(/\(([\w\s]+)\)$/)||[])[1];return n?/\s/.test(n)?(n.match(/\b(\w)/g)||[]).join(""):n:(n=(e.match(/(\w{3,4})\s\d{4}$/)||[])[1],n||(n=(e.match(/(UTC[\+\-]\d+)/)||[])[1],n)||(n=(e.match(/(GMT[\+\-]\d+)/)||[])[1],n)?n:"")})();function vC(){return Date.now()}var tie=k(Hn);var Zu=tie(Ry)(vC);var O8={liftAff:pn(dn),MonadEffect0:function(){return Ne}};var d9n=function(){function e(){this.head=null,this.last=null,this.size=0}function n(p,y){this.queue=p,this.value=y,this.next=null,this.prev=null}function a(p){this.draining=!1,this.error=null,this.value=p,this.takes=new e,this.reads=new e,this.puts=new e}var t={};function r(p){try{p()}catch(y){setTimeout(function(){throw y},0)}}function u(p,y){var E=new n(p,y);switch(p.size){case 0:p.head=E;break;case 1:E.prev=p.head,p.head.next=E,p.last=E;break;default:E.prev=p.last,p.last.next=E,p.last=E}return p.size++,E}function i(p){var y;switch(p.size){case 0:return null;case 1:y=p.head,p.head=null;break;case 2:y=p.last,p.head.next=null,p.last=null;break;default:y=p.last,p.last=y.prev,p.last.next=null}return y.prev=null,y.queue=null,p.size--,y.value}function l(p){var y;switch(p.size){case 0:return null;case 1:y=p.head,p.head=null;break;case 2:y=p.head,p.last.prev=null,p.head=p.last,p.last=null;break;default:y=p.head,p.head=y.next,p.head.prev=null}return y.next=null,y.queue=null,p.size--,y.value}function s(p){if(p.queue!==null){if(p.queue.last===p){i(p.queue);return}if(p.queue.head===p){l(p.queue);return}p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),p.queue.size--,p.queue=null,p.value=null,p.next=null,p.prev=null}}function h(p,y){if(!y.draining){var E=y.puts,b=y.takes,T=y.reads,L,U,$,z,Z;for(y.draining=!0;;){if(L=null,U=null,$=null,z=y.value,Z=T.size,y.error!==null){for(z=p.left(y.error);L=l(E);)r(L.cb(z));for(;U=l(T);)r(U(z));for(;$=l(b);)r($(z));break}if(z===t&&(L=l(E))&&(y.value=z=L.value),z!==t){for($=l(b);Z--&&(U=l(T));)r(U(p.right(z)));$!==null&&(y.value=t,r($(p.right(z))))}if(L!==null&&r(L.cb(p.right(void 0))),y.value===t&&E.size===0||y.value!==t&&b.size===0)break}y.draining=!1}}return a.EMPTY=t,a.putLast=u,a.takeLast=i,a.takeHead=l,a.deleteCell=s,a.drainVar=h,a}();var fie=ne(er);var B8=W(ft),Pv=ne(tn),_ie=oa(Nr),pie=oa(ir),die=oa(Du),mie=oa(hi),hie=oa(mi),Die=oa(di),gie=oa(gu),Rie=W(_a),H8=qa(er),yie=pe(oe);var bie=function(){return _s(ts(M.value))}();var q8=function(e){return Pv(_ie(e.year))(function(n){return Pv(pie(e.month+1|0))(function(a){return Pv(die(e.day))(function(t){return Pv(mie(e.hour))(function(r){return Pv(hie(e.minute))(function(u){return Pv(Die(e.second))(function(i){return Pv(gie(e.millisecond))(function(l){return Rie(new pc(fv(n)(a)(t),new fc(r,u,i,l)))})})})})})})})},W8=function(e){var n=aP("Failed to obtain current time. This should never happen.");return In(n)(B8)(q8(sC(e)))},t_=H8(W8)(j8),_C=function(e){return _s(fie(ac(bie))(In(H8(W8)(U8))(B8)))},ei=function(e){return Pv(yie(N8({just:S.create,nothing:M.value})(e))(sC))(q8)};var pC=W(_a),wie=k(oe),J8=ne(tn);var $8=jn(Nn),z8=xn($8)(Mn(Gn)),V8=Ln(An),Q8=Pn(V8),K8=kn(On),Y8=Un(K8);var dC=function(){function e(){}return e.value=new e,e}(),mC=function(){function e(){}return e.value=new e,e}(),hC=function(){function e(){}return e.value=new e,e}();var Eie={to:function(e){if(e instanceof be)return dC.value;if(e instanceof ve&&e.value0 instanceof be)return mC.value;if(e instanceof ve&&e.value0 instanceof ve)return hC.value;throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])},from:function(e){if(e instanceof dC)return new be(Be.value);if(e instanceof mC)return new ve(new be(Be.value));if(e instanceof hC)return new ve(new ve(Be.value));throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 174, column 1 - line 174, column 41): "+[e.constructor.name])}};var Iie=function(e){if(e instanceof dC)return"stuffed";if(e instanceof mC)return"satisfied";if(e instanceof hC)return"hungry";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 233, column 27 - line 236, column 35): "+[e.constructor.name])};var Tie=Ha(nn)(oe)({parse:Cn(Iie)(Bn(Eie)(z8(z8($8)(V8))(Q8))(Y8(Y8(K8)))(Q8)),diagnosticName:"ClientAppetite"}),X8=function(e){return J8(In(pC(M.value))(function(){var n=wie(pC);return function(a){return n(Tie(a))}}())(_e(e.clientAppetite)))(function(n){return J8(F4(e.inquiryMode))(function(a){return pC({packages:e.packages,pricePerHourCents:e.pricePerHourCents,singleSessionDurationMinutes:e.singleSessionDurationMinutes,singleSessionRefundPeriodLengthDays:e.singleSessionRefundPeriodLengthDays,themes:e.themes,freeConsultationDurationMinutes:_e(e.freeConsultationDurationMinutes),canSubmitConsultInquiry:_e(e.canSubmitConsultInquiry),clientAppetite:n,inquiryMode:a})})})};var Z8=ne(tn),cp=La(),DC=Ya(de),e7=H({reflectSymbol:function(){return"description"}})(de),Ly=H({reflectSymbol:function(){return"id"}})(cn),gC=H({reflectSymbol:function(){return"name"}})(de),n7=cp(Ly(gC(H({reflectSymbol:function(){return"slug"}})(de)(ln)))),a7=Pa(n7),Sie=Kf(cp(H({reflectSymbol:function(){return"advisingConfig"}})(Ya(cp(H({reflectSymbol:function(){return"canSubmitConsultInquiry"}})(Ya(Sa))(H({reflectSymbol:function(){return"clientAppetite"}})(DC)(H({reflectSymbol:function(){return"freeConsultationDurationMinutes"}})(Ya(cn))(H({reflectSymbol:function(){return"inquiryMode"}})(de)(H({reflectSymbol:function(){return"packages"}})(Pa(cp(H({reflectSymbol:function(){return"activeForSale"}})(Sa)(e7(Ly(gC(H({reflectSymbol:function(){return"numMinutes"}})(cn)(H({reflectSymbol:function(){return"packageCategories"}})(a7)(H({reflectSymbol:function(){return"refundPeriodLengthDays"}})(cn)(H({reflectSymbol:function(){return"totalPriceCents"}})(Ym)(ln)))))))))))(H({reflectSymbol:function(){return"pricePerHourCents"}})(Ym)(H({reflectSymbol:function(){return"singleSessionDurationMinutes"}})(cn)(H({reflectSymbol:function(){return"singleSessionRefundPeriodLengthDays"}})(cn)(H({reflectSymbol:function(){return"themes"}})(Pa(cp(H({reflectSymbol:function(){return"active"}})(Sa)(H({reflectSymbol:function(){return"category"}})(n7)(e7(H({reflectSymbol:function(){return"durationMinutes"}})(cn)(Ly(H({reflectSymbol:function(){return"priceCents"}})(Ym)(H({reflectSymbol:function(){return"title"}})(de)(ln))))))))))(ln))))))))))))(H({reflectSymbol:function(){return"entity"}})(cp(H({reflectSymbol:function(){return"bio"}})(de)(Ly(H({reflectSymbol:function(){return"imageUrl"}})(DC)(gC(H({reflectSymbol:function(){return"organizationId"}})(cn)(H({reflectSymbol:function(){return"organizationName"}})(de)(H({reflectSymbol:function(){return"shortEducation"}})(DC)(H({reflectSymbol:function(){return"tags"}})(a7)(ln))))))))))(ln)))),RC=W(_a),yC=k(oe),Xm=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Zm=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Cie=function(e){return Z8(Sie("ServiceProviderPresenter")(e))(function(n){return Z8(In(RC(M.value))(function(){var a=yC(RC);return function(t){return a(X8(t))}}())(_e(n.advisingConfig)))(function(a){return RC({entity:n.entity,advisingConfig:a})})})},t7=Ha(nn)(oe)({parse:function(e){return e.type==="Sem::User"?yC(Xm.create)(h4(e.presenter)):e.type==="ServiceProviders::Individual"?yC(Zm.create)(Cie(e.presenter)):M.value},diagnosticName:"Livestream Guest Presenter"});var r7=jn(Nn),o7=xn(r7)(Mn(Gn)),u7=Ln(An),i7=Pn(u7),l7=kn(On),c7=Un(l7),Ts=function(){function e(){}return e.value=new e,e}(),Ic=function(){function e(){}return e.value=new e,e}(),Ss=function(){function e(){}return e.value=new e,e}(),Fie={to:function(e){if(e instanceof be)return Ts.value;if(e instanceof ve&&e.value0 instanceof be)return Ic.value;if(e instanceof ve&&e.value0 instanceof ve)return Ss.value;throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])},from:function(e){if(e instanceof Ts)return new be(Be.value);if(e instanceof Ic)return new ve(new be(Be.value));if(e instanceof Ss)return new ve(new ve(Be.value));throw new Error("Failed pattern match at Livestream.Types.Poll (line 36, column 1 - line 36, column 37): "+[e.constructor.name])}},s7={eq:function(e){return function(n){return e instanceof Ts&&n instanceof Ts||e instanceof Ic&&n instanceof Ic||e instanceof Ss&&n instanceof Ss}}},Py=function(e){if(e instanceof Ts)return"ready";if(e instanceof Ic)return"live";if(e instanceof Ss)return"closed";throw new Error("Failed pattern match at Livestream.Types.Poll (line 59, column 23 - line 62, column 21): "+[e.constructor.name])};var eh=function(){return ta(nn)({parse:Cn(Py)(Bn(Fie)(o7(o7(r7)(u7))(i7))(c7(c7(l7)))(i7)),default:Ts.value,diagnosticName:"livestream poll status"})}(),bC=function(e){return{id:e.id,question:e.question,multiSelect:e.multiSelect,options:e.options,autoDisplayMinutesFromStart:_e(e.autoDisplayMinutesFromStart)}};var v7=function(e){return{fullName:e.fullName,firstName:e.firstName,totalStreams:e.totalStreams,undergrad:{college:_e(e.undergrad.college),major:_e(e.undergrad.major),year:_e(e.undergrad.year)},gradCollege:_e(e.gradCollege),workExperience:_e(e.workExperience),admissionsStory:_e(e.admissionsStory),pictureUrl:_e(e.pictureUrl),allStreamsUrl:_e(e.allStreamsUrl)}};var Gie=Ze(ra),Mie=Ou(),f7=pe(oe),_7=jn(Nn),p7=xn(_7)(Mn(Gn)),d7=Ln(An),m7=Pn(d7),h7=kn(On),D7=Un(h7),g7=ta(nn),R7=Rf(),y7=qa(tn),Aie=pe(an),Lie=k(oe),Pie=ne(tn),bu=function(){function e(){}return e.value=new e,e}(),zr=function(){function e(){}return e.value=new e,e}(),wr=function(){function e(){}return e.value=new e,e}();var Hl=on,xie=re(Hl);var Nie={to:function(e){if(e instanceof be)return bu.value;if(e instanceof ve&&e.value0 instanceof be)return zr.value;if(e instanceof ve&&e.value0 instanceof ve)return wr.value;throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof bu)return new be(Be.value);if(e instanceof zr)return new ve(new be(Be.value));if(e instanceof wr)return new ve(new ve(Be.value));throw new Error("Failed pattern match at Livestream.Types.Conference (line 167, column 1 - line 167, column 39): "+[e.constructor.name])}},xv={eq:function(e){return function(n){return e instanceof bu&&n instanceof bu||e instanceof zr&&n instanceof zr||e instanceof wr&&n instanceof wr}}},nh={eq:function(e){return function(n){return e===n}}},b7={compare:function(e){return function(n){return Gie(e)(n)}},Eq0:function(){return nh}};var Nv=function(e){return Mie({livestream_conference_id:xie(e.id),livestream_conference_presenter_name:ze("")(f7(e.presenter)(function(n){return n.fullName})),livestream_conference_uid:e.uid,livestream_conference_title:e.title,livestream_conference_partner_type:ze("")(e.partnerType)})},w7=function(){var e=function(n){if(n instanceof bu)return"waiting_room";if(n instanceof zr)return"on_air";if(n instanceof wr)return"complete";throw new Error("Failed pattern match at Livestream.Types.Conference (line 180, column 17 - line 183, column 35): "+[n.constructor.name])};return Cn(e)(Bn(Nie)(p7(p7(_7)(d7))(m7))(D7(D7(h7)))(m7))}(),E7=function(){return g7({parse:w7,default:bu.value,diagnosticName:"livestream status"})}(),jie=g7({parse:ei,default:rt(O0),diagnosticName:"livestream scheduled start time"}),ah=function(e){return{uid:e.uid,title:e.title,description:e.description,url:e.url,imageUrl:e.imageUrl,duration:e.duration,tailTime:e.tailTime,stats:e.stats,isPrivate:e.isPrivate,legacyRecording:e.legacyRecording,collegeFair:e.collegeFair,id:e.id,school:f7(_e(e.school))(function(n){return{cityState:n.cityState,name:n.name,id:R7(n.id),slug:R7(n.slug)}}),scheduledStartTime:jie(e.scheduledStartTime),onAirTime:y7(ei)(_e(e.onAirTime)),streamStatus:E7(e.streamStatus),watchUrl:_e(e.watchUrl),streamingStartTime:y7(ei)(_e(e.streamingStartTime)),polls:Aie(e.polls)(function(n){return{poll:bC(n.poll),status:eh(n.status)}}),presenter:Lie(v7)(_e(e.presenter)),partnerType:_e(e.partnerType),guestPresenter:Pie(_e(e.guestPresenter))(t7),zoomJoinUrl:_e(e.zoomJoinUrl),zoomStartUrl:_e(e.zoomStartUrl)}};var I7=jn(Nn),T7=Ln(An),S7=kn(On),bi=function(){function e(){}return e.value=new e,e}(),sp=function(){function e(){}return e.value=new e,e}(),Uie={to:function(e){if(e instanceof be)return bi.value;if(e instanceof ve)return sp.value;throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof bi)return new be(Be.value);if(e instanceof sp)return new ve(Be.value);throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])}},xy={eq:function(e){return function(n){return e instanceof bi&&n instanceof bi||e instanceof sp&&n instanceof sp}}};var th=function(e){if(e instanceof sp)return"anonymous-all-schools";if(e instanceof bi)return"all-schools";throw new Error("Failed pattern match at Profile.PublishScope (line 30, column 13 - line 32, column 30): "+[e.constructor.name])},Ny=function(){return ta(nn)({parse:Cn(th)(Bn(Uie)(xn(I7)(Mn(Gn))(I7)(T7))(Un(S7)(S7))(Pn(T7))),diagnosticName:"Profile.PublishScope",default:sp.value})}();var cl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),sl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var wC=function(e){return{id:e.id,title:e.title,requireAnonymousUserFirstName:e.requireAnonymousUserFirstName,requireAnonymousUserLastName:e.requireAnonymousUserLastName,requireAnonymousUserEmail:e.requireAnonymousUserEmail,requireReferredUserFirstName:e.requireReferredUserFirstName,requireReferredUserLastName:e.requireReferredUserLastName,description:_e(e.description)}},r_=function(e){return{author:e.author,text:e.text,isFromHQ:e.isFromHQ,isPublic:e.isPublic,id:e.id,time:ei(e.time)}},C7=function(e){return{autoRequestFromLivestreams:e.autoRequestFromLivestreams,fullName:_e(e.fullName),publishScope:Ny(e.publishScope)}},EC=function(e){return{id:e.id,title:e.title,url:e.url,buttonText:e.buttonText,autoDisplayMinutesFromStart:_e(e.autoDisplayMinutesFromStart)}},wi="overlay-visibility-test";var F7=jn(Nn),jy=xn(F7)(Mn(Gn)),G7=Ln(An),Uy=Pn(G7),M7=kn(On),Oy=Un(M7),Cs=function(){function e(){}return e.value=new e,e}(),jv=function(){function e(){}return e.value=new e,e}(),o_=function(){function e(){}return e.value=new e,e}(),Uv=function(){function e(){}return e.value=new e,e}(),Ov=function(){function e(){}return e.value=new e,e}(),Oie={to:function(e){if(e instanceof be)return Cs.value;if(e instanceof ve&&e.value0 instanceof be)return jv.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof be)return o_.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof ve&&e.value0.value0.value0 instanceof be)return Uv.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof ve&&e.value0.value0.value0 instanceof ve)return Ov.value;throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof Cs)return new be(Be.value);if(e instanceof jv)return new ve(new be(Be.value));if(e instanceof o_)return new ve(new ve(new be(Be.value)));if(e instanceof Uv)return new ve(new ve(new ve(new be(Be.value))));if(e instanceof Ov)return new ve(new ve(new ve(new ve(Be.value))));throw new Error("Failed pattern match at Livestream.Types.Reaction (line 18, column 1 - line 18, column 39): "+[e.constructor.name])}},A7=function(e){if(e instanceof Cs)return"love-this";if(e instanceof jv)return"helpful";if(e instanceof o_)return"not-helpful";if(e instanceof Uv)return"writing-down";if(e instanceof Ov)return"funny";throw new Error("Failed pattern match at Livestream.Types.Reaction (line 49, column 17 - line 54, column 19): "+[e.constructor.name])},L7=function(e){return{authorTag:e.authorTag,kind:A7(e.kind)}},kie=function(){return ta(nn)({parse:Cn(A7)(Bn(Oie)(jy(jy(jy(jy(F7)(G7))(Uy))(Uy))(Uy))(Oy(Oy(Oy(Oy(M7)))))(Uy)),default:Cs.value,diagnosticName:"Livestream Reaction Kind"})}(),P7=function(e){return{authorTag:e.authorTag,kind:kie(e.kind)}};var x7=typeof CV!="undefined"&&CV.pathInfo||typeof global!="undefined"&&global.CV&&global.CV.pathInfo||(e=>null);function N7(e,n){let a=typeof CV!="undefined"&&CV.apiEndpoint||typeof global!="undefined"&&global.CV&&global.CV.apiEndpoint;return a||console.error("Missing `CV.apiEndpoint` function"),a&&a(e,n)}function j7(e,n,a,t,r){return function(u,i){var l=e.newXHR(),s=e.fixupUrl(r.url,l);if(l.open(r.method||"GET",s,!0,r.username,r.password),r.headers)try{for(var h=0,p;(p=r.headers[h])!=null;h++)l.setRequestHeader(p.field,p.value)}catch(E){u(E)}var y=function(E){return function(){u(new Error(E))}};return l.onerror=y(a),l.ontimeout=y(n),l.onload=function(){i({status:l.status,statusText:l.statusText,headers:l.getAllResponseHeaders().split(`\r `).filter(function(E){return E.length>0}).map(function(E){var b=E.indexOf(":");return t(E.substring(0,b))(E.substring(b+2))}),body:l.response})},l.responseType=r.responseType,l.withCredentials=r.withCredentials,l.timeout=r.timeout,l.send(r.content),function(E,b,T){try{l.abort()}catch(L){return b(L)}return T()}}}var ky="application/json",U7="application/x-www-form-urlencoded";var O7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),k7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),B7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),H7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),q7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),IC=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),By=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),W7=function(e){return e instanceof IC?new S(U7):e instanceof By?new S(ky):M.value};var J7=function(){return By.create}();var $7=Aa();var Hy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vp=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),z7=function(e){if(e instanceof Hy||e instanceof qy)return $7(e.value0);if(e instanceof vp)return e.value1;throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): "+[e.constructor.name])};var TC=function(e){if(e instanceof Hy)return"Accept";if(e instanceof qy)return"Content-Type";if(e instanceof vp)return e.value0;throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): "+[e.constructor.name])};var V7=pn(dn),SC=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),CC=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),FC=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Wy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Jy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$y=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Q7=function(e){if(e instanceof SC)return"arraybuffer";if(e instanceof CC)return"blob";if(e instanceof FC)return"document";if(e instanceof Wy||e instanceof Jy)return"text";if(e instanceof $y)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 44, column 3 - line 50, column 19): "+[e.constructor.name])},K7=function(e){return e instanceof Wy?new S(ky):M.value},Y7=function(){return new Jy(V7)}();var X7=function(){return new $y(V7)}();var Z7=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}();var Hie=Aa();var rh=function(e){return Hie(nR(e))};function eU(e,n,a){try{return n(JSON.parse(a))}catch(t){return e(t.message)}}var zy=function(e){return eU(xe.create,Oe.create,e)};function nU(e){return e.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})}function aU(e,n,a){try{return n(nU(encodeURIComponent(a)))}catch(t){return e(t)}}function tU(e,n,a){try{return n(nU(encodeURIComponent(a)).replace(/%20/g,"+"))}catch(t){return e(t)}}var Vy=function(){return tv(aU)(hn(M.value))(S.create)}();var Qy=function(){return tv(tU)(hn(M.value))(S.create)}();var qie=Yn(fr),rU=k(oe),Wie=Go(si)(_a);var Jie=function(e){return e};var oU=function(){var e=function(t){if(t.value1 instanceof M)return Qy(t.value0);if(t.value1 instanceof S)return qie(rU(function(r){return function(u){return r+("="+u)}})(Qy(t.value0)))(Qy(t.value1.value0));throw new Error("Failed pattern match at Data.FormURLEncoded (line 37, column 16 - line 39, column 114): "+[t.constructor.name])},n=rU(Or("&")),a=Wie(e);return function(t){return n(a(Jie(t)))}}();var GC=function(){function e(){}return e.value=new e,e}(),u_=function(){function e(){}return e.value=new e,e}(),MC=function(){function e(){}return e.value=new e,e}(),i_=function(){function e(){}return e.value=new e,e}(),Ky=function(){function e(){}return e.value=new e,e}(),oh=function(){function e(){}return e.value=new e,e}(),AC=function(){function e(){}return e.value=new e,e}(),LC=function(){function e(){}return e.value=new e,e}(),PC=function(){function e(){}return e.value=new e,e}(),xC=function(){function e(){}return e.value=new e,e}(),NC=function(){function e(){}return e.value=new e,e}(),jC=function(){function e(){}return e.value=new e,e}(),UC=function(){function e(){}return e.value=new e,e}(),OC=function(){function e(){}return e.value=new e,e}(),kC=function(){function e(){}return e.value=new e,e}(),Yy=function(){function e(){}return e.value=new e,e}();var $ie=function(e){return e},zie={show:function(e){if(e instanceof GC)return"OPTIONS";if(e instanceof u_)return"GET";if(e instanceof MC)return"HEAD";if(e instanceof i_)return"POST";if(e instanceof Ky)return"PUT";if(e instanceof oh)return"DELETE";if(e instanceof AC)return"TRACE";if(e instanceof LC)return"CONNECT";if(e instanceof PC)return"PROPFIND";if(e instanceof xC)return"PROPPATCH";if(e instanceof NC)return"MKCOL";if(e instanceof jC)return"COPY";if(e instanceof UC)return"MOVE";if(e instanceof OC)return"LOCK";if(e instanceof kC)return"UNLOCK";if(e instanceof Yy)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 43, column 1 - line 59, column 23): "+[e.constructor.name])}};var uU=qt(re(zie))($ie);var iU={eq:function(e){return function(n){return e instanceof GC&&n instanceof GC||e instanceof u_&&n instanceof u_||e instanceof MC&&n instanceof MC||e instanceof i_&&n instanceof i_||e instanceof Ky&&n instanceof Ky||e instanceof oh&&n instanceof oh||e instanceof AC&&n instanceof AC||e instanceof LC&&n instanceof LC||e instanceof PC&&n instanceof PC||e instanceof xC&&n instanceof xC||e instanceof NC&&n instanceof NC||e instanceof jC&&n instanceof jC||e instanceof UC&&n instanceof UC||e instanceof OC&&n instanceof OC||e instanceof kC&&n instanceof kC||e instanceof Yy&&n instanceof Yy}}};var lU=function(e){return _v(function(n){return function(){var t=e(function(r){return n(xe.create(r))()},function(r){return n(Oe.create(r))()});return function(r){return _v(function(u){return function(){return t(r,function(l){return u(xe.create(l))()},function(l){return u(Oe.create(l))()}),AT}})}}})};var BC=W(os(vr)),Vie=G0(vr),l_=ls(vr),cU=da(rR(sR)(vr)),Qie=sf(Af(vr)),Xy=k(oe),Kie=xu(We)(it),Yie=Ee(Bt),Xie=qa(tn),Zie=k(an),ele=pe(Ca),nle=Gf(jr),ale=W(Kn);var Zy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),eb=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),nb=function(){function e(){}return e.value=new e,e}(),ab=function(){function e(){}return e.value=new e,e}(),tb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),sU=function(e){return function(n){var a=function(p){return p===""?BC(yj):qt(function(y){return Vie(lm.create(y))})(BC)(zy(p))},t=function(){if(n.responseFormat instanceof SC)return l_("ArrayBuffer");if(n.responseFormat instanceof CC)return l_("Blob");if(n.responseFormat instanceof FC)return function(p){return cU(l_("Document")(p))(cU(l_("XMLDocument")(p))(l_("HTMLDocument")(p)))};if(n.responseFormat instanceof Wy)return Qie(function(p){return n.responseFormat.value0(a(p))})(l_("String"));if(n.responseFormat instanceof Jy)return l_("String");if(n.responseFormat instanceof $y)return hn(n.responseFormat.value0(BC(ge)));throw new Error("Failed pattern match at Affjax (line 274, column 18 - line 283, column 57): "+[n.responseFormat.constructor.name])}(),r=function(p){if(p instanceof O7)return new Oe(p.value0(Pr));if(p instanceof k7)return new Oe(Pr(p.value0));if(p instanceof B7)return new Oe(Pr(p.value0));if(p instanceof H7)return new Oe(Pr(p.value0));if(p instanceof q7)return new Oe(Pr(p.value0));if(p instanceof IC)return s0("Body contains values that cannot be encoded as application/x-www-form-urlencoded")(Xy(Pr)(oU(p.value0)));if(p instanceof By)return new Oe(Pr(ly(p.value0)));throw new Error("Failed pattern match at Affjax (line 235, column 20 - line 250, column 69): "+[p.constructor.name])},u=function(p){return function(y){return p instanceof S&&!Kie(n0(Yie)(TC)(p.value0))(y)?R0(y)(p.value0):y}},i=function(p){return u(Xy(qy.create)(Xie(W7)(p)))(u(Xy(Hy.create)(K7(n.responseFormat)))(n.headers))},l=function(p){return{method:uU(n.method),url:n.url,headers:Zie(function(y){return{field:TC(y),value:z7(y)}})(i(n.content)),content:p,responseType:Q7(n.responseFormat),username:Ta(n.username),password:Ta(n.password),withCredentials:n.withCredentials,timeout:ze(0)(Xy(function(y){return y})(n.timeout))}},s=function(p){return ele(nle(lU(j7(e,"AffjaxTimeoutErrorMessageIdent","AffjaxRequestFailedMessageIdent",Z7.create,l(p)))))(function(y){if(y instanceof Oe){var E=rh(t(y.value0.body));if(E instanceof xe)return new xe(new eb(yP(E.value0),y.value0));if(E instanceof Oe)return new Oe({headers:y.value0.headers,status:y.value0.status,statusText:y.value0.statusText,body:E.value0});throw new Error("Failed pattern match at Affjax (line 209, column 9 - line 211, column 52): "+[E.constructor.name])}if(y instanceof xe)return new xe(function(){var b=E0(y.value0),T=b==="AffjaxTimeoutErrorMessageIdent";if(T)return nb.value;var L=b==="AffjaxRequestFailedMessageIdent";return L?ab.value:new tb(y.value0)}());throw new Error("Failed pattern match at Affjax (line 207, column 144 - line 219, column 28): "+[y.constructor.name])})};if(n.content instanceof M)return s(Ta(M.value));if(n.content instanceof S){var h=r(n.content.value0);if(h instanceof Oe)return s(Ta(new S(h.value0)));if(h instanceof xe)return ale(new xe(new Zy(h.value0)));throw new Error("Failed pattern match at Affjax (line 199, column 7 - line 203, column 48): "+[h.constructor.name])}throw new Error("Failed pattern match at Affjax (line 195, column 3 - line 203, column 48): "+[n.content.constructor.name])}};var fp=function(){return{method:new xe(u_.value),url:"/",headers:[],content:M.value,username:M.value,password:M.value,withCredentials:!1,responseFormat:X7,timeout:M.value}}();var vU={eq:function(e){return function(n){return e===n}}};var HC={newXHR:function(){return new XMLHttpRequest},fixupUrl:function(e){return e||"/"}};var fU=sU(HC);function _U(e){return Buffer.from(e).toString("base64")}function pU(e,n,a){let t;try{t=n(btoa(a))}catch(r){t=e(r)}return t}var qC=typeof btoa=="function";function dU(e){let n=32768,a=[];for(let t=0;t<e.length;t+=n)a.push(String.fromCharCode.apply(null,e.subarray(t,t+n)));return a.join("")}var mU=qt(function(e){return lc("This should never happen! If you see this message, please file a bug report in the `purescript-b64` issue tracker.")})(pn(dn)),hU=function(e){return dU(e)};function DU(e){return new TextEncoder().encode(e)}var rle=function(e){return DU(e)},gU=rle;var ole=function(e){return _U(e)},ule=function(e){return pU(xe.create,Oe.create,e)},c_=function(e){return qC?mU(ule(hU(gU(e)))):ole(e)};var ile=qa(Au),uh=W(Kn),RU=Lr(q0),yU=pe(oe),bU=Aa(),wU=re(on),lle=re(Ht),cle=pn(dn),EU=_r(Lu),sle=pe(Dr),_p=W(_a),IU=ne(ua),vle=Ee(iU),fle=ne(Au),_le=rc(We)(vU),ple=El(ua),dle=Rn(Ne);var mle=function(e){return e},Tc={numParameters:0};var rb=function(e){var n=x7(e);return _e(n)},WC=function(e){var n=Nf(e);return function(a){return function(t){return function(r){var u=function(l){return s0("failed to parse")(r(l))},i=ile(u)(n(t));if(i instanceof Oe)return uh(i.value0);if(i instanceof xe)return RU(_u("Reading "+(a+(": "+(i.value0+(" -- "+Zd(t)))))));throw new Error("Failed pattern match at Utils.API (line 243, column 32 - line 245, column 96): "+[i.constructor.name])}}}},pp=function(e){var n=WC(e);return function(a){return function(t){return n(a)(t)(S.create)}}},Sc=function(e){var n=function(r){return Or(" ")([In("")(function(u){return"HTTP "+u})(yU(yU(r.status)(bU))(wU)),r.path,In("")(function(u){return"reason="+lle(u)})(r.reason)])},a=function(r){if(r.sentryFingerprint instanceof M)return cle;if(r.sentryFingerprint instanceof S)return Yj(r.sentryFingerprint.value0);throw new Error("Failed pattern match at Utils.API (line 266, column 58 - line 268, column 53): "+[r.sentryFingerprint.constructor.name])},t=function(r){return a(r)(_u(n(r)))};return qt(function(r){return RU(t(r))})(e)},TU=function(e){return e.numParameters},Cc=function(e){return{numParameters:1+TU(e)|0}},hle=function(e){return J7(e)},tr=Sc(hn(uh(ge)));var SU=function(e){return function(n){return function(a){var t=function(u){if(u.body==="")return new Oe(Pr({}));if($e)return EU(function(i){return{path:e.path,reason:new S(i),status:M.value,retriable:!1,sentryFingerprint:M.value}})(sle(zy(u.body))(Pr));throw new Error("Failed pattern match at Utils.API (line 190, column 5 - line 190, column 63): "+[u.constructor.name])},r=function(u){return mle(function(i){if(i instanceof Zy)return{path:e.path,reason:new S(i.value0),status:M.value,retriable:!1,sentryFingerprint:_p("ps-apierror-request-content-error-"+c_(e.path))};if(i instanceof eb)return{path:e.path,reason:new S(cm(i.value0)),status:new S(i.value1.status),retriable:!1,sentryFingerprint:_p("ps-apierror-response-body-error-"+c_(e.path))};if(i instanceof nb)return{path:e.path,reason:new S("Request timeout"),status:M.value,retriable:!0,sentryFingerprint:_p("ps-apierror-timeout-error-"+c_(e.path))};if(i instanceof ab)return{path:e.path,reason:new S("Connection fail"),status:M.value,retriable:!0,sentryFingerprint:_p("ps-apierror-request-failed-error-"+c_(e.path))};if(i instanceof tb)return{path:e.path,reason:new S(E0(i.value0)),status:M.value,retriable:!1,sentryFingerprint:_p("ps-apierror-xhr-other-error-"+c_(e.path))};throw new Error("Failed pattern match at Utils.API (line 198, column 33 - line 233, column 10): "+[i.constructor.name])}(u))};return IU(fU({username:fp.username,password:fp.password,withCredentials:fp.withCredentials,timeout:fp.timeout,method:new xe(n),url:e.path,content:a,responseFormat:Y7,headers:function(){var u=vle(n)(u_.value);return u?[new vp("Accept","application/json")]:[new vp("X-CSRF-Token",e.token),new vp("Accept","application/json")]}()}))(function(u){return uh(fle(EU(r)(u))(function(i){var l=_le(i.status)([200,201,204]);return l?new xe({path:e.path,reason:new S(i.body),status:new S(i.status),retriable:!1,sentryFingerprint:_p("ps-apierror-status-code-"+(wU(bU(i.status))+("-"+c_(e.path))))}):t(i)}))})}}},Dle=function(e){return function(n){return function(a){var t=_e(e);if(t instanceof M)return uh(new xe({path:"",reason:new S("Missing client-side endpoint"),status:M.value,retriable:!1,sentryFingerprint:M.value}));if(t instanceof S)return IU(SU(t.value0)(n)(a))(function(r){return r instanceof xe&&r.value0.retriable?SU(t.value0)(n)(a):uh(r)});throw new Error("Failed pattern match at Utils.API (line 83, column 44 - line 92, column 22): "+[t.constructor.name])}}},CU=function(e){var n=TU(e);return function(a){return function(t){return function(r){return N7({delegateAff:function(u){return ple(dle(u))},numParameters:n,name:t,continuation:function(u){return r(Dle(u)(a))}})}}}};var ql=function(e){var n=CU(e);return function(a){return function(t){return n(i_.value)(a)(function(r){return t(function(u){return r(S.create(hle(u)))})})}}};Wa();var GU=Fu(FU()),Fc=typeof CV!="undefined"&&CV.pusherConfig||typeof global!="undefined"&&global.CV&&global.CV.pusherConfig,{acquireConnection:gle,releaseConnection:Rle}=(()=>{let e=null,n=0,a=()=>{if(!Fc||!Fc.key)return Fc||console.error("Pusher config is missing in global context"),new yle;let t={auth:{headers:{"X-CSRF-Token":Fc.authToken}},authEndpoint:Fc.authPath,cluster:Fc.cluster};return Fc.dev&&Object.assign(t,{wsHost:Fc.dev.wsHost,wsPort:Fc.dev.wsPort,enabledTransports:["ws"],forceTLS:!1,disableStats:!0}),new GU.default(Fc.key,t)};return{acquireConnection:()=>(e||(e=a(),n=0),n++,e),releaseConnection:()=>{--n<=0&&(e.disconnect(),e=null)}}})(),MU=e=>{let n=gle().subscribe(e.channel);return n.bind(e.event,e.handler),()=>{n.unbind(e.event,e.handler),Rle()}};function yle(){typeof document!="undefined"&&(document.mockPusher=this),this.localObject={},this.channels=[],this.disconnect=function(){document.mockPusher=null},this.subscribe=function(e){let n=this.channels.find(t=>t.name===e);if(n)return n;let a=new ble(e);return this.channels.push(a),a},this.channelNames=function(){return this.channels.map(e=>e.name)}}function ble(e){this.name=e,this.handlers={},this.triggered=[],this.disconnect=()=>{},this.bind=function(n,a){this.handlers[n]=a},this.unbind=function(n,a){this.handlers[n]===a&&(this.handlers[n]=null)},this.trigger=function(n,a){this.triggered.push({eventName:n,eventData:a})}}var wle=gr(We)(bt),Ele=qo(ft)(Pu),Ile=pe(fS);var Tle={show:function(e){return e}},Sle=re(Tle),ub=de,Cle=function(e){var n=Kf(e);return function(a){return function(t){return function(r){var u=wle(["Pusher event ",t," over channel ",Sle(a)]),i=function(l){return Ele(n(u)(l))(r)()};return function(){return MU({channel:a,event:t,handler:i})}}}}},Ei=function(e){var n=Cle(e);return function(a){var t=a.Monad0(),r=ne(t.Bind1()),u=Rn(a),i=W(t.Applicative0());return function(l){return function(s){return function(h){return r(u(n(l)(s)(h)))(function(p){return i(u(p))})}}}}},Fle=Ei(xf),ib=function(e){var n=Fle(e);return function(a){return function(t){return Ile(n(a)(t))(hn(ge))}}};var AU=Cc(Tc),wu=ql(AU),Er=ne(ua),ih=ql(Cc(AU)),LU=W(Kn),Gle=pe(oe),lh=La(),PU=H({reflectSymbol:function(){return"pollId"}})(cn),Mle=H({reflectSymbol:function(){return"status"}})(de)(ln),Ale=wt(Pa(lh(PU(Mle)))),xU=k(an),NU=k(Ca),Lle=H({reflectSymbol:function(){return"id"}}),Ple=Lle(cn),jU=lh(H({reflectSymbol:function(){return"author"}})(lh(H({reflectSymbol:function(){return"cvid"}})(de)(H({reflectSymbol:function(){return"username"}})(de)(ln))))(Ple(H({reflectSymbol:function(){return"isFromHQ"}})(Sa)(H({reflectSymbol:function(){return"isPublic"}})(Sa)(H({reflectSymbol:function(){return"text"}})(de)(H({reflectSymbol:function(){return"time"}})(de)(ln))))))),xle=pp(jU);var Nle=Ya(de);var jle=pp(Pa(lh(PU(H({reflectSymbol:function(){return"responses"}})(lh(H({reflectSymbol:function(){return"answered"}})(cn)(H({reflectSymbol:function(){return"optionCounts"}})(Pa(cn))(H({reflectSymbol:function(){return"seen"}})(cn)(H({reflectSymbol:function(){return"skipped"}})(cn)(ln))))))(ln))))),Ule=pp(Nle),Ole=pp(Pa(jU));var $C=ih("livestreams_polls_status_path")(function(e){return function(n){return function(a){return Er(e({id:n.id,status:Py(a)}))(Sc(function(t){return LU(ze([])(Gle(Ale(t))(xU(function(r){return{pollId:r.pollId,status:eh(r.status)}}))))}))}}});var zC=ih("livestreams_polls_answer_path")(function(e){return function(n){return function(a){return Er(e({id:n.id,options:a}))(tr)}}}),UU=wu("livestreams_conferences_status_on_air_path")(function(e){return function(n){return Er(e({conference_id:n}))(tr)}}),OU=wu("livestreams_conferences_status_complete_path")(function(e){return function(n){return Er(e({conference_id:n}))(tr)}}),kU=wu("livestreams_cta_save_referral_path")(function(e){return function(n){return Er(e(n))(tr)}}),BU=wu("livestreams_polls_report_shown_path")(function(e){return function(n){return Er(e({id:n.id}))(tr)}}),HU=ih("livestreams_client_window_visibility_path")(function(e){return function(n){return function(a){return Er(e({stream_id:n,visible:a.visible}))(tr)}}}),qU=ih("livestreams_recording_watch_event_path")(function(e){return function(n){return function(a){return Er(e({conference_id:n,current_time_minutes:a}))(tr)}}}),WU=wu("livestreams_questions_visibility_path")(function(e){return function(n){return Er(e({question_id:n.questionId,is_public:n.isPublic}))(tr)}}),JU=wu("livestreams_questions_post_path")(function(e){return function(n){return Er(e({conference_id:n.conferenceId,question_text:n.text,hq_broadcast:n.hqBroadcast}))(Sc(function(a){return NU(r_)(xle("Livestream question")(a))}))}}),$U=wu("livestreams_cta_open_path")(function(e){return function(n){return Er(e({is_referral:!0,from_conference_id:n.fromConference,id:n.ctaId}))(tr)}}),zU=wu("livestreams_cta_open_path")(function(e){return function(n){return Er(e({is_general:!0,from_conference_id:n.fromConference,id:n.ctaId}))(tr)}}),VU=wu("livestreams_cta_open_path")(function(e){return function(n){return Er(e({is_featured_service_providers:!0,from_conference_id:n.fromConference,id:n.ctaId}))(tr)}}),QU=wu("livestreams_cta_open_path")(function(e){return function(n){return Er(e({is_event:!0,from_conference_id:n.fromConference,cta_conference_id:n.cta}))(tr)}}),lb=wu("livestreams_register_path")(function(e){return function(n){return Er(e({from_conference_id:Ta(n.fromConference),register_for_conference_id:n.registerForConference,utm_cv_source:n.utmSource}))(tr)}});var KU=ih("livestreams_reactions_launch_path")(function(e){return function(n){return function(a){return Er(e({conference_id:n,reaction:L7(a)}))(tr)}}}),YU=wu("livestreams_polls_responses_path")(function(e){return function(n){return Er(e({conference_id:n}))(Sc(jle("livestream poll responses")))}}),XU=wu("livestreams_conferences_download_url_path")(function(e){return function(n){return Er(e({conference_id:n}))(Sc(function(a){return NU(_e)(Ule("Livestream download URL")(a))}))}}),cb=ql(Tc)("livestreams_dismiss_network_settings_modal_path")(function(e){return Er(e({}))(tr)});var ZU=wu("livestreams_conferences_ban_user_path")(function(e){return function(n){return Er(e({conference_id:n.conferenceId,user_cvid:n.userCvid}))(tr)}}),sb=wu("livestreams_questions_all_path")(function(e){return function(n){return Er(e({conference_id:n}))(Sc(function(a){return Er(Ole("Livestream questions")(a))(function(t){return LU(xU(r_)(t))})}))}});var QC=function(){function e(){}return e.value=new e,e}(),KC=function(){function e(){}return e.value=new e,e}(),YC=function(){function e(){}return e.value=new e,e}(),XC=function(){function e(){}return e.value=new e,e}(),ZC=function(){function e(){}return e.value=new e,e}(),eF=function(){function e(){}return e.value=new e,e}(),nF=function(){function e(){}return e.value=new e,e}(),aF=function(){function e(){}return e.value=new e,e}(),tF=function(){function e(){}return e.value=new e,e}(),rF=function(){function e(){}return e.value=new e,e}(),oF=function(){function e(){}return e.value=new e,e}(),uF=function(){function e(){}return e.value=new e,e}(),iF=function(){function e(){}return e.value=new e,e}(),lF=function(){function e(){}return e.value=new e,e}(),jt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cF=function(){function e(){}return e.value=new e,e}();var fb=function(e){if(e instanceof jt&&e.value0 instanceof QC)return"architecture";if(e instanceof jt&&e.value0 instanceof YC)return"chemistry";if(e instanceof jt&&e.value0 instanceof KC)return"business";if(e instanceof jt&&e.value0 instanceof XC)return"computer-science";if(e instanceof jt&&e.value0 instanceof ZC)return"criminal-justice-and-corrections";if(e instanceof jt&&e.value0 instanceof eF)return"economics";if(e instanceof jt&&e.value0 instanceof nF)return"engineering";if(e instanceof jt&&e.value0 instanceof aF)return"english";if(e instanceof jt&&e.value0 instanceof tF)return"film";if(e instanceof jt&&e.value0 instanceof rF)return"finance";if(e instanceof jt&&e.value0 instanceof oF)return"history";if(e instanceof jt&&e.value0 instanceof uF)return"political-science";if(e instanceof jt&&e.value0 instanceof iF)return"pre-med";if(e instanceof jt&&e.value0 instanceof lF)return"psychology";if(e instanceof cF)return"overall";throw new Error("Failed pattern match at Hub.Ranking (line 92, column 8 - line 107, column 23): "+[e.constructor.name])};var _b=function(){function e(){}return e.value=new e,e}(),Wle=function(){function e(){}return e.value=new e,e}(),Jle=function(){function e(){}return e.value=new e,e}();var eO=function(e){if(e instanceof _b)return M.value;if(e instanceof Jle)return new S("open");if(e instanceof Wle)return new S("on");throw new Error("Failed pattern match at Hub.Types.WhatificatorPhase (line 21, column 13 - line 24, column 22): "+[e.constructor.name])};var rO=Ft();var db=function(e){return function(n){var a=function(){var u=is("?")(n);return u?"&":"?"}(),t=rO(Vy(e.value)),r=rO(Vy(e.key));return n+(a+(r+("="+t)))}};var hce=function(){function e(){}return e.value=new e,e}(),Dce=function(){function e(){}return e.value=new e,e}(),gce=function(){function e(){}return e.value=new e,e}(),Rce=function(){function e(){}return e.value=new e,e}(),yce=function(){function e(){}return e.value=new e,e}(),bce=function(){function e(){}return e.value=new e,e}(),wce=function(){function e(){}return e.value=new e,e}(),Ece=function(){function e(){}return e.value=new e,e}(),Ice=function(){function e(){}return e.value=new e,e}(),Tce=function(){function e(){}return e.value=new e,e}(),Sce=function(){function e(){}return e.value=new e,e}(),Cce=function(){function e(){}return e.value=new e,e}(),Fce=function(){function e(){}return e.value=new e,e}(),Gce=function(){function e(){}return e.value=new e,e}(),Mce=function(){function e(){}return e.value=new e,e}(),Ace=function(){function e(){}return e.value=new e,e}(),Lce=function(){function e(){}return e.value=new e,e}(),Pce=function(){function e(){}return e.value=new e,e}(),xce=function(){function e(){}return e.value=new e,e}(),Nce=function(){function e(){}return e.value=new e,e}(),jce=function(){function e(){}return e.value=new e,e}(),Uce=function(){function e(){}return e.value=new e,e}(),Oce=function(){function e(){}return e.value=new e,e}(),kce=function(){function e(){}return e.value=new e,e}(),Bce=function(){function e(){}return e.value=new e,e}(),Hce=function(){function e(){}return e.value=new e,e}(),qce=function(){function e(){}return e.value=new e,e}(),Wce=function(){function e(){}return e.value=new e,e}(),Jce=function(){function e(){}return e.value=new e,e}(),$ce=function(){function e(){}return e.value=new e,e}(),zce=function(){function e(){}return e.value=new e,e}(),Vce=function(){function e(){}return e.value=new e,e}(),Qce=function(){function e(){}return e.value=new e,e}(),Kce=function(){function e(){}return e.value=new e,e}(),Yce=function(){function e(){}return e.value=new e,e}(),Xce=function(){function e(){}return e.value=new e,e}(),Zce=function(){function e(){}return e.value=new e,e}(),ese=function(){function e(){}return e.value=new e,e}(),nse=function(){function e(){}return e.value=new e,e}(),ase=function(){function e(){}return e.value=new e,e}(),tse=function(){function e(){}return e.value=new e,e}(),rse=function(){function e(){}return e.value=new e,e}(),ose=function(){function e(){}return e.value=new e,e}(),use=function(){function e(){}return e.value=new e,e}(),ise=function(){function e(){}return e.value=new e,e}(),lse=function(){function e(){}return e.value=new e,e}(),cse=function(){function e(){}return e.value=new e,e}(),sse=function(){function e(){}return e.value=new e,e}(),vse=function(){function e(){}return e.value=new e,e}(),fse=function(){function e(){}return e.value=new e,e}(),_se=function(){function e(){}return e.value=new e,e}(),pse=function(){function e(){}return e.value=new e,e}(),dse=function(){function e(){}return e.value=new e,e}(),mse=function(){function e(){}return e.value=new e,e}(),hse=function(){function e(){}return e.value=new e,e}(),Dse=function(){function e(){}return e.value=new e,e}();var sa=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Eu=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var oO=function(e){if(e instanceof sa&&e.value0 instanceof hce)return"AcceptanceRate";if(e instanceof sa&&e.value0 instanceof Dce)return"AcceptanceRateMen";if(e instanceof sa&&e.value0 instanceof gce)return"AcceptanceRateWomen";if(e instanceof sa&&e.value0 instanceof Rce)return"Address";if(e instanceof sa&&e.value0 instanceof yce)return"AdmissionChances";if(e instanceof sa&&e.value0 instanceof bce)return"AdmissionDifficulty";if(e instanceof sa&&e.value0 instanceof wce)return"AdmissionsNotificationDate";if(e instanceof sa&&e.value0 instanceof Ece)return"AdmissionsWebsite";if(e instanceof sa&&e.value0 instanceof Ice)return"AppDeadlineIsRolling";if(e instanceof sa&&e.value0 instanceof Tce)return"ApplicationEffort";if(e instanceof sa&&e.value0 instanceof Sce)return"ApplicationRound";if(e instanceof sa&&e.value0 instanceof Cce)return"BasketballConference";if(e instanceof sa&&e.value0 instanceof Fce)return"CampusSetting";if(e instanceof sa&&e.value0 instanceof Gce)return"City";if(e instanceof sa&&e.value0 instanceof Mce)return"ClassRank";if(e instanceof sa&&e.value0 instanceof Ace)return"CoEdSingleSex";if(e instanceof sa&&e.value0 instanceof Lce)return"CollegeType";if(e instanceof sa&&e.value0 instanceof Pce)return"CommuterCollege";if(e instanceof sa&&e.value0 instanceof xce)return"Diversity";if(e instanceof sa&&e.value0 instanceof Nce)return"DropoutRate";if(e instanceof sa&&e.value0 instanceof Uce)return"FinancialAidWebsite";if(e instanceof sa&&e.value0 instanceof Oce)return"FirstYearEnrollment";if(e instanceof sa&&e.value0 instanceof kce)return"FootballConference";if(e instanceof sa&&e.value0 instanceof Bce)return"FourYearGraduationRate";if(e instanceof sa&&e.value0 instanceof Hce)return"HasDivisionOneBasketball";if(e instanceof sa&&e.value0 instanceof qce)return"HasDivisionOneFootball";if(e instanceof sa&&e.value0 instanceof Wce)return"HasMedicalSchool";if(e instanceof sa&&e.value0 instanceof Jce)return"HasStudyAbroad";if(e instanceof sa&&e.value0 instanceof $ce)return"HBCU";if(e instanceof sa&&e.value0 instanceof zce)return"InListStatus";if(e instanceof sa&&e.value0 instanceof Vce)return"MainWebsite";if(e instanceof sa&&e.value0 instanceof jce)return"Majors";if(e instanceof sa&&e.value0 instanceof Qce)return"Name";if(e instanceof sa&&e.value0 instanceof Kce)return"NetCostEstimate";if(e instanceof sa&&e.value0 instanceof Yce)return"Notes";if(e instanceof sa&&e.value0 instanceof Xce)return"PercentInternationalStudents";if(e instanceof sa&&e.value0 instanceof Zce)return"Phone";if(e instanceof sa&&e.value0 instanceof ese)return"Photo";if(e instanceof sa&&e.value0 instanceof nse)return"Prestige";if(e instanceof sa&&e.value0 instanceof ase)return"ProgramLength";if(e instanceof sa&&e.value0 instanceof tse)return"PublicPrivate";if(e instanceof sa&&e.value0 instanceof rse)return"RecommendationLetters";if(e instanceof sa&&e.value0 instanceof ose)return"Region";if(e instanceof sa&&e.value0 instanceof use)return"ReligiousAffiliation";if(e instanceof sa&&e.value0 instanceof ise)return"SatActDeadline";if(e instanceof sa&&e.value0 instanceof lse)return"SatActTestPolicy";if(e instanceof sa&&e.value0 instanceof cse)return"SatSubjectTestDeadline";if(e instanceof sa&&e.value0 instanceof sse)return"SixYearGraduationRate";if(e instanceof sa&&e.value0 instanceof vse)return"State";if(e instanceof sa&&e.value0 instanceof fse)return"StudentFacultyRatio";if(e instanceof sa&&e.value0 instanceof _se)return"SubmissionDeadline";if(e instanceof sa&&e.value0 instanceof pse)return"TOEFLPolicy";if(e instanceof sa&&e.value0 instanceof dse)return"TotalUndergrads";if(e instanceof sa&&e.value0 instanceof mse)return"TuitionInState";if(e instanceof sa&&e.value0 instanceof hse)return"TuitionOutOfState";if(e instanceof sa&&e.value0 instanceof Dse)return"YieldRate";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof QC)return"RankingArchitecture";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof KC)return"RankingBusiness";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof YC)return"RankingChemistry";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof XC)return"RankingComputerScience";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof ZC)return"RankingCriminalJusticeAndCorrections";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof eF)return"RankingEconomics";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof nF)return"RankingEngineering";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof aF)return"RankingEnglish";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof tF)return"RankingFilm";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof rF)return"RankingFinance";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof oF)return"RankingHistory";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof uF)return"RankingPoliticalScience";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof iF)return"RankingPreMed";if(e instanceof Eu&&e.value0 instanceof jt&&e.value0.value0 instanceof lF)return"RankingPsychology";if(e instanceof Eu&&e.value0 instanceof cF)return"OverallRanking";throw new Error("Failed pattern match at Hub.Facet (line 305, column 6 - line 376, column 43): "+[e.constructor.name])};var gse=function(){function e(){}return e.value=new e,e}(),Rse=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yse=function(){function e(){}return e.value=new e,e}();var uO=function(e){if(e instanceof gse)return"filters";if(e instanceof Rse)return"filter:"+oO(e.value0);if(e instanceof yse)return"rankings";throw new Error("Failed pattern match at Hub.Visuals.MobileOverlay (line 34, column 26 - line 37, column 39): "+[e.constructor.name])};function iO(e,n){typeof CV!="undefined"&&CV.tracking&&CV.tracking.event(e,n)}var bse=Ou();var Fs=function(e){var n=Rn(e);return function(a){return function(t){return n(function(){return iO(a,t)})}}},Gs=function(e){var n=Fs(e);return function(){return function(a){return function(t){return n(a)(bse(t))}}}};var ch=function(){function e(){}return e.value=new e,e}(),kv=function(){function e(){}return e.value=new e,e}(),sh=function(){function e(){}return e.value=new e,e}(),Yse=function(){function e(){}return e.value=new e,e}(),sO=function(e){if(e instanceof ch)return"modal-sm";if(e instanceof kv)return"";if(e instanceof sh)return"modal-lg";if(e instanceof Yse)return"modal-xl";throw new Error("Failed pattern match at Bootstrap.Modal.Size (line 14, column 13 - line 18, column 27): "+[e.constructor.name])};var xO=Fu(PO()),NO=xO.default;var Ave=hs(),jO=function(e){var n=Ave(e);return function(){return function(){return n(NO)}}};var ph="<unknown>";function UO(e){var n=e.split(` `);return n.reduce(function(a,t){var r=xve(t)||jve(t)||kve(t)||Wve(t)||Hve(t);return r&&a.push(r),a},[])}var Lve=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Pve=/\((\S*)(?::(\d+))(?::(\d+))\)/;function xve(e){var n=Lve.exec(e);if(!n)return null;var a=n[2]&&n[2].indexOf("native")===0,t=n[2]&&n[2].indexOf("eval")===0,r=Pve.exec(n[2]);return t&&r!=null&&(n[2]=r[1],n[3]=r[2],n[4]=r[3]),{file:a?null:n[2],methodName:n[1]||ph,arguments:a?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var Nve=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function jve(e){var n=Nve.exec(e);return n?{file:n[2],methodName:n[1]||ph,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}var Uve=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Ove=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function kve(e){var n=Uve.exec(e);if(!n)return null;var a=n[3]&&n[3].indexOf(" > eval")>-1,t=Ove.exec(n[3]);return a&&t!=null&&(n[3]=t[1],n[4]=t[2],n[5]=null),{file:n[3],methodName:n[1]||ph,arguments:n[2]?n[2].split(","):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var Bve=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Hve(e){var n=Bve.exec(e);return n?{file:n[3],methodName:n[1]||ph,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}:null}var qve=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Wve(e){var n=qve.exec(e);return n?{file:n[2],methodName:n[1]||ph,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}function OO({skipFrames:e,prefix:n}){let a=new Error().stack,r=UO(a)[e],u=kO(r.file.replace(/^(http(s?):\/\/)?[^\/]+/,"")),i=kO(r.methodName);return`${n}_${u}_${i}_${r.lineNumber}_${r.column}`}var kO=e=>e.replace(/[^\d\w]+/g,"_").replace(/(^_|_$)/g,"");var Jve=W(yn),$ve=pn(dn),yb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zve={map:function(e){return function(n){return new yb(function(a){return n.value0(function(t){return a(e(t))})})}}},Vve=k(zve);var BO=function(e){return uj(OO(e))},Bv=function(e){return new yb(function(n){return n(e)})},hp=function(e){return function(n){return new yb(function(a){return Dv(e)(n)(a)})}},HO=function(e){return function(n){return Dv(e)(function(a){return{init:Jve(ge),update:hn(r0),view:hn(hn(n.value0($ve)))}})(ge)}},qO=function(e){var n=BO({skipFrames:3,prefix:"WithHook"});return function(a){return HO(n)(Vve(a)(e))}};var dh=function(e){var n=BO({skipFrames:3,prefix:"HooksComponent"});return HO(n)(e)},As=function(){return function(e){return function(n){return new yb(function(a){return e.value0(function(t){var r=n(t);return r.value0(a)})})}}},Qve=As(),Dp=function(e){return function(){return Qve}};var WO=rn(Xe)($n),Kve=Xu(Ne),Yve=pn(dn),JO=W(yn),bb=function(e){return function(n){return hp("UseSubscription")(function(a){return{init:WO(Kve(Yve)(e))(function(){return JO(ge)}),update:function(t){return function(r){return WO(Xa(n(r)))(function(){return JO(ge)})}},view:function(t){return function(r){return a(ge)}}}})}};function DF(e){return function(){return function(n){return e(n)()}}}function gF(e){return function(n){return function(a){return function(t){return function(){return t.addEventListener(e,n,a)}}}}}function RF(e){return function(n){return function(a){return function(t){return function(){return t.removeEventListener(e,n,a)}}}}}var $O="message";var zO="hashchange";var VO="popstate";var QO="keyup",KO="keydown";var YO="mouseup";var XO="mousemove";var ZO=Rn(Ne),e6=k(Hn),Xve=qa(er),mh=function(){var e=function(t){return function(r){return function(u){return ZO(function(){var l=r(),s=DF(function(h){return u(h)})();return gF(t)(s)(!1)(l)(),ZO(RF(t)(s)(!1)(l))})}}},n=function(t){return e(t)(e6(C8)(Zo))},a=function(t){return e(t)(e6(w8)(Xve(Lv)(Zo)))};return{hashchange:n(zO),mousemove:n(XO),mouseup:n(YO),popstate:n(VO),resize:n("resize"),message:n($O),keydown:a(KO),keyup:a(QO),selectionchange:a("selectionchange"),visibilitychange:a("visibilitychange")}}();var n6=Ml()(),xpe=function(e){return e},ea=Pr(Nu),wa=function(e){var n=h8(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(n6(r)({className:a,"aria-label":t}))(u)}}}}}}},a6=function(e){var n=wa(e)()();return function(a){return function(t){return function(r){return n(a)(t)({})(r)}}}},lr=function(e){return xpe(Pr(e))},oo=function(e){var n=g8(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(n6(r)({className:a,"aria-label":t}))(u)}}}}}}};var wb=function(){return Je};var gp=Ge(Ye),yF=Zr(),Npe=jO(Ye)()(),jpe=zt(Ye)()(),Upe=zt(we)()(),Ope=Ge(we),kpe=wa(te)()(),Bpe=Wr(yu),Hpe=or(Kn),qpe=Rn(Ne),t6=wb(),Wl=function(){return function(e){var n=gp("modal-backdrop fade show")(aa),a=yF(e),t=il(a.footer),r=il(a.header),u=Ja(a.size)(kv.value),i=Or(" ")([function(){var s=Ja(a.scrollable)(!0);return s?"modal-dialog-scrollable":""}(),function(){var s=Ja(a.centered)(!0);return s?"modal-dialog-centered":""}(),sO(u),Ja(a.dialogClass)("")]),l=Npe({focusTrapOptions:{escapeDeactivates:!1,fallbackFocus:".modal-content",allowOutsideClick:!0}})(gp("modal fade show d-block")(jpe("modal-dialog "+i)({style:Ja(a.dialogStyle)(st({}))})(Upe("modal-content "+Ja(a.contentClass)(""))({style:Ja(a.contentStyle)(st({}))})([ga(r)(gp("modal-header "+Ja(a.headerClass)(""))),gp("modal-body "+Ja(a.bodyClass)(""))(a.body),ga(t)(gp("modal-footer "+Ja(a.footerClass)("")))]))));return Fe([l,n])}},bF=Wl(),Jl=function(){return function(e){var n=yF(e),a=Ope("d-flex w-100 justify-content-between align-items-center")([gp("mr-4")(Ja(n.title)(aa)),kpe("btn btn-link large mr-n3 py-0 fe fe-x t--close "+Ja(n.dismissButtonClass)("text-body"))(lr("Close"))({type:"button",onClick:Bpe(n.onDismiss)})("")]),t=function(r){return Hpe(r.key==="Escape")(qpe(n.onDismiss))};return qO(bb(mh.keyup)(t))(function(r){var u=Ja(n.bodyScrollable)(!1);return bF(u?function(){var i=yF(t6(n));return{body:i.body,bodyClass:i.bodyClass,centered:i.centered,contentClass:i.contentClass,contentStyle:i.contentStyle,dialogClass:i.dialogClass,dialogStyle:i.dialogStyle,footer:i.footer,footerClass:i.footerClass,headerClass:i.headerClass,scrollable:i.scrollable,size:i.size,header:a}}():t6({bodyClass:n.bodyClass,bodyScrollable:n.bodyScrollable,centered:n.centered,contentClass:n.contentClass,contentStyle:n.contentStyle,dialogClass:n.dialogClass,dialogStyle:n.dialogStyle,dismissButtonClass:n.dismissButtonClass,footer:n.footer,footerClass:n.footerClass,headerClass:n.headerClass,onDismiss:n.onDismiss,scrollable:n.scrollable,size:n.size,title:n.title,body:Fe([a,n.body])}))})}},Rp=function(e){var n=jm(e);return function(a){return function(t){return bF({bodyClass:a,body:Fe(n(t))})}}};var r6=W(yn),Jpe=pn(dn);var $pe=function(e){return function(n){return function(a){return hp(e)(function(t){return n({init:r6(a),update:function(r){return function(u){return r6(u)}},view:d0(t)})})}}},Gc=function(e){return $pe("UseState")(Jpe)(e)};var zpe=Zr(),Vpe=pn(dn),Qpe=Tv(we)()(),Kpe=Ko(Ye)()(),Ype=Jr()();var Eb="login",wF=function(){return function(e){var n=zpe(e),a=function(){var u=Ja(n.auth0ActiveTab)(Eb);return u}(),t=ze({path:"",token:""})(rb("login_path")),r=function(u){return function(i){return In(Vpe)(function(l){return db(function(s){return{key:u,value:s}}(l))})(il(i))}};return Qpe("d-inline")({method:"post",action:r("origin")(n.origin)(r("login_hint")(n.auth0LoginHint)(db({key:"screen_hint",value:a})(t.path))),target:function(){var u=Ja(n.openInNewTab)(!1);return u?"_blank":""}()})([Kpe(Ja(n.className)("btn btn-primary px-4"))({type:"submit",disabled:Ja(n.disabled)(!1)})(Ja(n.content)(en(Ja(n.text)("Log in")))),Ype("")({type:"hidden",name:"authenticity_token",value:t.token})])}};var EF=typeof CV!="undefined"&&CV.assetsRoot||typeof global!="undefined"&&global.CV&&global.CV.assetsRoot||"/";var IF=rs(Ho(it)),Xpe=pn(dn),Zpe=el()(),Ib=function(e){var n=fi(e);return function(a){return xt(n(a))}},ede=function(e){if(IF(Ib("http://"))(IF(Ib("https://"))(IF(Ib("//"))(Ib("blob:"))))(e))return e;if($e)return EF+ze(e)(fi("/")(e));throw new Error("Failed pattern match at Utils.AppAssets (line 47, column 1 - line 47, column 30): "+[e.constructor.name])},Ii=function(){return function(){return function(e){return function(n){var a=function(r){return Xpe},t=a(n)(A0("src")(ede(n.src))(n));return Zpe(e)(t)}}}};var v_=function(e){return function(n){return function(){return n[e]}}},nde=v_("URL"),ade=v_("documentURI"),tde=v_("origin"),rde=v_("compatMode"),ode=v_("characterSet"),ude=v_("contentType");var ide=v_("documentElement");var Tb=function(e){return function(n){return n[e]}},cde=Tb("namespaceURI"),sde=Tb("prefix"),vde=Tb("localName"),fde=Tb("tagName");function TF(e){return function(){return e.id}}function SF(e){return function(){return e.classList}}function CF(e){return function(){var n=e.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height,x:n.x,y:n.y}}}var FF=Je;var u6=Fn("Element");var $l=function(e){return function(n){return function(){return n[e]}}};var pde=$l("baseURI"),dde=$l("ownerDocument"),i6=$l("parentNode"),mde=$l("parentElement");var hde=$l("childNodes"),Dde=$l("firstChild"),gde=$l("lastChild"),Rde=$l("previousSibling"),yde=$l("nextSibling"),bde=$l("nodeValue");var wde=$l("textContent");function GF(e){return function(n){return function(){return e.isEqualNode(n)}}}var Tde=k(Hn);var l6=function(){var e=Tde(_e);return function(n){return e(i6(n))}}();var Sde=JSON.stringify;var __=function(){function e(){}return e.value=new e,e}(),c6=function(){function e(){}return e.value=new e,e}(),s6=function(){function e(){}return e.value=new e,e}(),hh=function(){function e(){}return e.value=new e,e}(),v6=function(){function e(){}return e.value=new e,e}(),f6=function(){function e(){}return e.value=new e,e}(),_6=function(){function e(){}return e.value=new e,e}();var Sb=function(e){if(e instanceof __)return M.value;if(e instanceof c6)return new S("for-you");if(e instanceof s6)return new S("chancing");if(e instanceof hh)return new S("finances");if(e instanceof v6)return new S("majors");if(e instanceof f6)return new S("admission-requirements");if(e instanceof _6)return new S("essay-prompts");throw new Error("Failed pattern match at SchoolDetails.Types (line 84, column 14 - line 91, column 39): "+[e.constructor.name])};var MF=pe(oe);var AF=cu(We)(bt),Mde=Aa(),Ade=ii(oe),LF=function(e){return"/schools/"+e.slug},PF="/schools/hub";var p6=function(e){return function(n){var a=MF(eO(n.whatificator))(function(l){return"simulator="+l}),t=MF(n.mobileOverlay)(function(l){return"overlay="+uO(l)}),r=Or("&")(vu([t,a])),u=MF(n.focusedSchool)(function(l){return AF("/")(vu([new S(Mde(l.slug)),Sb(l.tab)]))}),i=function(){return e.knownSeoState instanceof S&&n.seoView?AF("/")(vu([new S(LF({slug:e.knownSeoState.value0.slug})),u])):AF("/")(vu([new S(PF),new S(In(e.basePath)(fb)(n.ranking)),Ade(u)("d"),u]))}();return i+(function(){var l=r==="";return l?"":"?"}()+r)}};var d6="/profile";var Pde=Aa();var xF=function(e){return function(n){return Or("/")(vu([new S("/schools"),new S(Pde(n)),Sb(e)]))}},m6=d6,h6="/livestreams/upcoming";var xde=function(e){return p6({basePath:"all",knownSeoState:M.value})({ranking:M.value,focusedSchool:e,mobileOverlay:M.value,seoView:!1,whatificator:_b.value})};var Cb=function(e){return function(n){return xde(new S({tab:e,slug:n}))}};var D6=function(){function e(){}return e.value=new e,e}(),g6=function(){function e(){}return e.value=new e,e}(),Fb=function(){function e(){}return e.value=new e,e}(),Gb=function(){function e(){}return e.value=new e,e}(),R6=function(){function e(){}return e.value=new e,e}(),y6=function(){function e(){}return e.value=new e,e}(),b6=function(){function e(){}return e.value=new e,e}(),w6=function(e){if(e instanceof D6)return"avatar-xxs";if(e instanceof g6)return"avatar-xs";if(e instanceof Fb)return"avatar-sm";if(e instanceof Gb)return"";if(e instanceof R6)return"avatar-lg";if(e instanceof y6)return"avatar-xl";if(e instanceof b6)return"avatar-xxl";throw new Error("Failed pattern match at Dashkit.Avatar.Size (line 16, column 13 - line 23, column 34): "+[e.constructor.name])};var E6={show:Aa()};var Nde=Number.MAX_SAFE_INTEGER;var jF=function(e){if(e.first==="")return e.last;if(e.last==="")return e.first;if($e)return e.first+(" "+e.last);throw new Error("Failed pattern match at Profile.Types.Name (line 11, column 1 - line 11, column 27): "+[e.constructor.name])};var Xde=Ee(xy);var T6={show:function(e){return e}};var S6=function(e){return Xde(e.publishScope)(bi.value)};var yp=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),UF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var WF=re(E6);var Zde=re(d4),C6=re(Vj),eme=re(T6);var nme="/messages";var ame=function(e){return function(n){return e+("/"+function(){if(n instanceof yp)return"admission-officer/"+Zde(n.value0);if(n instanceof UF)return"school/"+C6(n.value0);if(n instanceof OF)return"student/"+eme(n.value0);if(n instanceof kF)return"high-school/"+WF(n.value0);if(n instanceof BF)return"service-provider/"+WF(n.value0);if(n instanceof HF)return"parent/"+WF(n.value0);if(n instanceof qF)return"recruiter/"+C6(n.value0);throw new Error("Failed pattern match at DirectMessages.Urls (line 30, column 59 - line 37, column 63): "+[n.constructor.name])}())}},JF=ame(nme);var tme=ql(Cc(Tc)),rme=ne(ua),F6=pe(oe),G6=Aa(),ome=Tt(Ca);var M6=tme("network_connections_invite_school_path")(function(e){return function(n){return rme(e({school_id:n.schoolId,message:Ta(n.introMessage),sem_user_id:Ta(F6(n.semUserId)(G6)),livestream_id:Ta(F6(n.livestreamId)(G6))}))(tr)}}),A6=function(e){return function(n){return ome(M6({schoolId:e,introMessage:M.value,semUserId:M.value,livestreamId:new S(n)}))}};var L6=function(e){return function(n){return function(a){return M6({schoolId:e,introMessage:new S(a.introMessage),semUserId:new S(n),livestreamId:M.value})}}};Wa();function Ro(){return Ro=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t])}return e},Ro.apply(this,arguments)}function uo(e){return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uo(e)}function eu(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function P6(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,t)}return a}function Ea(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?P6(Object(a),!0).forEach(function(t){eu(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):P6(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function $F(e,n){if(e==null)return{};var a={},t=Object.keys(e),r,u;for(u=0;u<t.length;u++)r=t[u],!(n.indexOf(r)>=0)&&(a[r]=e[r]);return a}function Hv(e,n){if(e==null)return{};var a=$F(e,n),t,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)t=u[r],!(n.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(a[t]=e[t]))}return a}Wa();Wa();function p_(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function x6(e,n){for(var a=0;a<n.length;a++){var t=n[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function d_(e,n,a){return n&&x6(e.prototype,n),a&&x6(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gh(e,n){return gh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},gh(e,n)}function m_(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&gh(e,n)}function bp(e){return bp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},bp(e)}function zF(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function VF(e,n){if(n&&(uo(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Dh(e)}function h_(e){var n=zF();return function(){var t=bp(e),r;if(n){var u=bp(this).constructor;r=Reflect.construct(t,arguments,u)}else r=t.apply(this,arguments);return VF(this,r)}}Wa();var N6=function(n){return+setTimeout(n,16)},j6=function(n){return clearTimeout(n)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(N6=function(n){return window.requestAnimationFrame(n)},j6=function(n){return window.cancelAnimationFrame(n)});var U6=0,QF=new Map;function O6(e){QF.delete(e)}function Ti(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;U6+=1;var a=U6;function t(r){if(r===0)O6(a),e();else{var u=N6(function(){t(r-1)});QF.set(a,u)}}return t(n),a}Ti.cancel=function(e){var n=QF.get(e);return O6(n),j6(n)};function D_(e,n){return e?e.contains(n):!1}function Rh(e){return e instanceof HTMLElement?e:gi.findDOMNode(e)}var W6=Fu(q6());Wa();function ZF(e,n){typeof e=="function"?e(n):uo(e)==="object"&&e&&"current"in e&&(e.current=n)}function Bb(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];var t=n.filter(function(r){return r});return t.length<=1?t[0]:function(r){n.forEach(function(u){ZF(u,r)})}}function Hb(e){var n,a,t=(0,W6.isMemo)(e)?e.type.type:e.type;return!(typeof t=="function"&&!((n=t.prototype)===null||n===void 0?void 0:n.render)||typeof e=="function"&&!((a=e.prototype)===null||a===void 0?void 0:a.render))}function qv(e,n,a,t){var r=gi.unstable_batchedUpdates?function(i){gi.unstable_batchedUpdates(a,i)}:a;return e.addEventListener&&e.addEventListener(n,r,t),{remove:function(){e.removeEventListener&&e.removeEventListener(n,r,t)}}}Wa();function Mc(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var vme=Di(function(e,n){var a=e.didUpdate,t=e.getContainer,r=e.children,u=ct(),i=ct();ps(n,function(){return{}});var l=ct(!1);return!l.current&&Mc()&&(i.current=t(),u.current=i.current.parentNode,l.current=!0),At(function(){a==null||a(e)}),At(function(){return i.current.parentNode===null&&u.current!==null&&u.current.appendChild(i.current),function(){var s,h;(s=i.current)===null||s===void 0||(h=s.parentNode)===null||h===void 0||h.removeChild(i.current)}},[]),i.current?gi.createPortal(r,i.current):null}),J6=vme;var xH=Fu(g_());function fme(e,n,a){return a?e[0]===n[0]:e[0]===n[0]&&e[1]===n[1]}function $6(e,n,a){var t=e[n]||{};return Ea(Ea({},t),a)}function z6(e,n,a,t){for(var r=a.points,u=Object.keys(e),i=0;i<u.length;i+=1){var l=u[i];if(fme(e[l].points,r,t))return"".concat(n,"-placement-").concat(l)}return""}function eG(e){if(Array.isArray(e))return e}function nG(e,n){var a=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var t=[],r=!0,u=!1,i,l;try{for(a=a.call(e);!(r=(i=a.next()).done)&&(t.push(i.value),!(n&&t.length===n));r=!0);}catch(s){u=!0,l=s}finally{try{!r&&a.return!=null&&a.return()}finally{if(u)throw l}}return t}}function Wb(e,n){(n==null||n>e.length)&&(n=e.length);for(var a=0,t=new Array(n);a<n;a++)t[a]=e[a];return t}function aG(e,n){if(!!e){if(typeof e=="string")return Wb(e,n);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Wb(e,n)}}function tG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lt(e,n){return eG(e)||nG(e,n)||aG(e,n)||tG()}Wa();Wa();var V6=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4)))};Wa();var c5=Fu(g_());Wa();Wa();var i5=Fu(g_());function Q6(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit".concat(e)]="webkit".concat(n),a["Moz".concat(e)]="moz".concat(n),a["ms".concat(e)]="MS".concat(n),a["O".concat(e)]="o".concat(n.toLowerCase()),a}function _me(e,n){var a={animationend:Q6("Animation","AnimationEnd"),transitionend:Q6("Transition","TransitionEnd")};return e&&("AnimationEvent"in n||delete a.animationend.animation,"TransitionEvent"in n||delete a.transitionend.transition),a}var pme=_me(Mc(),typeof window!="undefined"?window:{}),K6={};Mc()&&(Y6=document.createElement("div"),K6=Y6.style);var Y6,Jb={};function X6(e){if(Jb[e])return Jb[e];var n=pme[e];if(n)for(var a=Object.keys(n),t=a.length,r=0;r<t;r+=1){var u=a[r];if(Object.prototype.hasOwnProperty.call(n,u)&&u in K6)return Jb[e]=n[u],Jb[e]}return""}var Z6=X6("animationend"),e5=X6("transitionend"),$b=!!(Z6&&e5),rG=Z6||"animationend",oG=e5||"transitionend";function uG(e,n){if(!e)return null;if(uo(e)==="object"){var a=n.replace(/-\w/g,function(t){return t[1].toUpperCase()});return e[a]}return"".concat(e,"-").concat(n)}var Wv="none",yh="appear",bh="enter",wh="leave",iG="none",_l="prepare",Ls="start",Jv="active",zb="end";Wa();Wa();Wa();function Ps(e){var n=ct(!1),a=Fl(e),t=Lt(a,2),r=t[0],u=t[1];At(function(){return n.current=!1,function(){n.current=!0}},[]);function i(l,s){s&&n.current||u(l)}return[r,i]}Wa();Wa();var n5=function(){var e=ct(null);function n(){Ti.cancel(e.current)}function a(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;n();var u=Ti(function(){r<=1?t({isCanceled:function(){return u!==e.current}}):a(t,r-1)});e.current=u}return At(function(){return function(){n()}},[]),[a,n]};Wa();var dme=Mc()?Sm:At,Vb=dme;var a5=[_l,Ls,Jv,zb],lG=!1,t5=!0;function Qb(e){return e===Jv||e===zb}var r5=function(e,n){var a=Ps(iG),t=Lt(a,2),r=t[0],u=t[1],i=n5(),l=Lt(i,2),s=l[0],h=l[1];function p(){u(_l,!0)}return Vb(function(){if(r!==iG&&r!==zb){var y=a5.indexOf(r),E=a5[y+1],b=n(r);b===lG?u(E,!0):s(function(T){function L(){T.isCanceled()||u(E,!0)}b===!0?L():Promise.resolve(b).then(L)})}},[e,r]),At(function(){return function(){h()}},[]),[p,r]};Wa();Wa();var o5=function(e){var n=ct(),a=ct(e);a.current=e;var t=Tm(function(i){a.current(i)},[]);function r(i){i&&(i.removeEventListener(oG,t),i.removeEventListener(rG,t))}function u(i){n.current&&n.current!==i&&r(n.current),i&&i!==n.current&&(i.addEventListener(oG,t),i.addEventListener(rG,t),n.current=i)}return At(function(){return function(){r(n.current)}},[]),[u,r]};function cG(e,n,a,t){var r=t.motionEnter,u=r===void 0?!0:r,i=t.motionAppear,l=i===void 0?!0:i,s=t.motionLeave,h=s===void 0?!0:s,p=t.motionDeadline,y=t.motionLeaveImmediately,E=t.onAppearPrepare,b=t.onEnterPrepare,T=t.onLeavePrepare,L=t.onAppearStart,U=t.onEnterStart,$=t.onLeaveStart,z=t.onAppearActive,Z=t.onEnterActive,ue=t.onLeaveActive,X=t.onAppearEnd,Y=t.onEnterEnd,ae=t.onLeaveEnd,me=t.onVisibleChanged,ke=Ps(),ce=Lt(ke,2),le=ce[0],Ce=ce[1],Ie=Ps(Wv),je=Lt(Ie,2),Ke=je[0],Tn=je[1],Qn=Ps(null),En=Lt(Qn,2),qn=En[0],Vn=En[1],Wn=ct(!1),pt=ct(null);function He(){return a()}var ia=ct(!1);function Ia(ot){var q=He();if(!(ot&&!ot.deadline&&ot.target!==q)){var K=ia.current,j;Ke===yh&&K?j=X==null?void 0:X(q,ot):Ke===bh&&K?j=Y==null?void 0:Y(q,ot):Ke===wh&&K&&(j=ae==null?void 0:ae(q,ot)),Ke!==Wv&&K&&j!==!1&&(Tn(Wv,!0),Vn(null,!0))}}var Sn=o5(Ia),gn=Lt(Sn,1),Ve=gn[0],na=Cm(function(){var ot,q,K;switch(Ke){case yh:return ot={},eu(ot,_l,E),eu(ot,Ls,L),eu(ot,Jv,z),ot;case bh:return q={},eu(q,_l,b),eu(q,Ls,U),eu(q,Jv,Z),q;case wh:return K={},eu(K,_l,T),eu(K,Ls,$),eu(K,Jv,ue),K;default:return{}}},[Ke]),va=r5(Ke,function(ot){if(ot===_l){var q=na[_l];return q?q(He()):lG}if(vn in na){var K;Vn(((K=na[vn])===null||K===void 0?void 0:K.call(na,He(),null))||null)}return vn===Jv&&(Ve(He()),p>0&&(clearTimeout(pt.current),pt.current=setTimeout(function(){Ia({deadline:!0})},p))),t5}),Ma=Lt(va,2),dt=Ma[0],vn=Ma[1],la=Qb(vn);ia.current=la,Vb(function(){Ce(n);var ot=Wn.current;if(Wn.current=!0,!!e){var q;!ot&&n&&l&&(q=yh),ot&&n&&u&&(q=bh),(ot&&!n&&h||!ot&&y&&!n&&h)&&(q=wh),q&&(Tn(q),dt())}},[n]),At(function(){(Ke===yh&&!l||Ke===bh&&!u||Ke===wh&&!h)&&Tn(Wv)},[l,u,h]),At(function(){return function(){Wn.current=!1,clearTimeout(pt.current)}},[]);var Et=ct(!1);At(function(){le&&(Et.current=!0),le!==void 0&&Ke===Wv&&((Et.current||le)&&(me==null||me(le)),Et.current=!0)},[le,Ke]);var Da=qn;return na[_l]&&vn===Ls&&(Da=Ea({transition:"none"},Da)),[Ke,vn,Da,le!=null?le:n]}Wa();var mme=function(e){m_(a,e);var n=h_(a);function a(){return p_(this,a),n.apply(this,arguments)}return d_(a,[{key:"render",value:function(){return this.props.children}}]),a}(Hf),u5=mme;function hme(e){var n=e;uo(e)==="object"&&(n=e.transitionSupport);function a(r){return!!(r.motionName&&n)}var t=Di(function(r,u){var i=r.visible,l=i===void 0?!0:i,s=r.removeOnLeave,h=s===void 0?!0:s,p=r.forceRender,y=r.children,E=r.motionName,b=r.leavedClassName,T=r.eventProps,L=a(r),U=ct(),$=ct();function z(){try{return U.current instanceof HTMLElement?U.current:Rh($.current)}catch{return null}}var Z=cG(L,l,z,r),ue=Lt(Z,4),X=ue[0],Y=ue[1],ae=ue[2],me=ue[3],ke=ct(me);me&&(ke.current=!0);var ce=Tm(function(Qn){U.current=Qn,ZF(u,Qn)},[u]),le,Ce=Ea(Ea({},T),{},{visible:l});if(!y)le=null;else if(X===Wv||!a(r))me?le=y(Ea({},Ce),ce):!h&&ke.current?le=y(Ea(Ea({},Ce),{},{className:b}),ce):p?le=y(Ea(Ea({},Ce),{},{style:{display:"none"}}),ce):le=null;else{var Ie,je;Y===_l?je="prepare":Qb(Y)?je="active":Y===Ls&&(je="start"),le=y(Ea(Ea({},Ce),{},{className:(0,i5.default)(uG(E,X),(Ie={},eu(Ie,uG(E,"".concat(X,"-").concat(je)),je),eu(Ie,E,typeof E=="string"),Ie)),style:ae}),ce)}if(xT(le)&&Hb(le)){var Ke=le,Tn=Ke.ref;Tn||(le=Im(le,{ref:ce}))}return _t(u5,{ref:$},le)});return t.displayName="CSSMotion",t}var Kb=hme($b);Wa();var Yb="add",Xb="keep",Zb="remove",ew="removed";function Dme(e){var n;return e&&uo(e)==="object"&&"key"in e?n=e:n={key:e},Ea(Ea({},n),{},{key:String(n.key)})}function nw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Dme)}function l5(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=[],t=0,r=n.length,u=nw(e),i=nw(n);u.forEach(function(h){for(var p=!1,y=t;y<r;y+=1){var E=i[y];if(E.key===h.key){t<y&&(a=a.concat(i.slice(t,y).map(function(b){return Ea(Ea({},b),{},{status:Yb})})),t=y),a.push(Ea(Ea({},E),{},{status:Xb})),t+=1,p=!0;break}}p||a.push(Ea(Ea({},h),{},{status:Zb}))}),t<r&&(a=a.concat(i.slice(t).map(function(h){return Ea(Ea({},h),{},{status:Yb})})));var l={};a.forEach(function(h){var p=h.key;l[p]=(l[p]||0)+1});var s=Object.keys(l).filter(function(h){return l[h]>1});return s.forEach(function(h){a=a.filter(function(p){var y=p.key,E=p.status;return y!==h||E!==Zb}),a.forEach(function(p){p.key===h&&(p.status=Xb)})}),a}var gme=["component","children","onVisibleChanged","onAllRemoved"],Rme=["status"],yme=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function bme(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kb,a=function(t){m_(u,t);var r=h_(u);function u(){var i;p_(this,u);for(var l=arguments.length,s=new Array(l),h=0;h<l;h++)s[h]=arguments[h];return i=r.call.apply(r,[this].concat(s)),i.state={keyEntities:[]},i.removeKey=function(p){var y=i.state.keyEntities,E=y.map(function(b){return b.key!==p?b:Ea(Ea({},b),{},{status:ew})});return i.setState({keyEntities:E}),E.filter(function(b){var T=b.status;return T!==ew}).length},i}return d_(u,[{key:"render",value:function(){var l=this,s=this.state.keyEntities,h=this.props,p=h.component,y=h.children,E=h.onVisibleChanged,b=h.onAllRemoved,T=Hv(h,gme),L=p||PT,U={};return yme.forEach(function($){U[$]=T[$],delete T[$]}),delete T.keys,_t(L,T,s.map(function($){var z=$.status,Z=Hv($,Rme),ue=z===Yb||z===Xb;return _t(n,Ro({},U,{key:Z.key,visible:ue,eventProps:Z,onVisibleChanged:function(Y){if(E==null||E(Y,{key:Z.key}),!Y){var ae=l.removeKey(Z.key);ae===0&&b&&b()}}}),y)}))}}],[{key:"getDerivedStateFromProps",value:function(l,s){var h=l.keys,p=s.keyEntities,y=nw(h),E=l5(p,y);return{keyEntities:E.filter(function(b){var T=p.find(function(L){var U=L.key;return b.key===U});return!(T&&T.status===ew&&b.status===Zb)})}}}]),u}(Hf);return a.defaultProps={component:"div"},a}var wme=bme($b);var wp=Kb;function aw(e){var n=e.prefixCls,a=e.motion,t=e.animation,r=e.transitionName;return a||(t?{motionName:"".concat(n,"-").concat(t)}:r?{motionName:r}:null)}function sG(e){var n=e.prefixCls,a=e.visible,t=e.zIndex,r=e.mask,u=e.maskMotion,i=e.maskAnimation,l=e.maskTransitionName;if(!r)return null;var s={};return(u||l||i)&&(s=Ea({motionAppear:!0},aw({motion:u,prefixCls:n,transitionName:l,animation:i}))),_t(wp,Ro({},s,{visible:a,removeOnLeave:!0}),function(h){var p=h.className;return _t("div",{style:{zIndex:t},className:(0,c5.default)("".concat(n,"-mask"),p)})})}Wa();Wa();Wa();var s5=function(e){if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){var n=e.getBBox();if(n.width||n.height)return!0}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();if(a.width||a.height)return!0}return!1};function v5(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,t)}return a}function f5(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?v5(Object(a),!0).forEach(function(t){Eme(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):v5(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function tw(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tw=function(n){return typeof n}:tw=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tw(e)}function Eme(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}var Eh,Ime={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function rw(){if(Eh!==void 0)return Eh;Eh="";var e=document.createElement("p").style,n="Transform";for(var a in Ime)a+n in e&&(Eh=a);return Eh}function _5(){return rw()?"".concat(rw(),"TransitionProperty"):"transitionProperty"}function ow(){return rw()?"".concat(rw(),"Transform"):"transform"}function p5(e,n){var a=_5();a&&(e.style[a]=n,a!=="transitionProperty"&&(e.style.transitionProperty=n))}function vG(e,n){var a=ow();a&&(e.style[a]=n,a!=="transform"&&(e.style.transform=n))}function Tme(e){return e.style.transitionProperty||e.style[_5()]}function Sme(e){var n=window.getComputedStyle(e,null),a=n.getPropertyValue("transform")||n.getPropertyValue(ow());if(a&&a!=="none"){var t=a.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(t[12]||t[4],0),y:parseFloat(t[13]||t[5],0)}}return{x:0,y:0}}var Cme=/matrix\((.*)\)/,Fme=/matrix3d\((.*)\)/;function Gme(e,n){var a=window.getComputedStyle(e,null),t=a.getPropertyValue("transform")||a.getPropertyValue(ow());if(t&&t!=="none"){var r,u=t.match(Cme);if(u)u=u[1],r=u.split(",").map(function(l){return parseFloat(l,10)}),r[4]=n.x,r[5]=n.y,vG(e,"matrix(".concat(r.join(","),")"));else{var i=t.match(Fme)[1];r=i.split(",").map(function(l){return parseFloat(l,10)}),r[12]=n.x,r[13]=n.y,vG(e,"matrix3d(".concat(r.join(","),")"))}}else vG(e,"translateX(".concat(n.x,"px) translateY(").concat(n.y,"px) translateZ(0)"))}var Mme=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,Ih;function d5(e){var n=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=n}function Ep(e,n,a){var t=a;if(tw(n)==="object"){for(var r in n)n.hasOwnProperty(r)&&Ep(e,r,n[r]);return}if(typeof t!="undefined"){typeof t=="number"&&(t="".concat(t,"px")),e.style[n]=t;return}return Ih(e,n)}function Ame(e){var n,a,t,r=e.ownerDocument,u=r.body,i=r&&r.documentElement;return n=e.getBoundingClientRect(),a=Math.floor(n.left),t=Math.floor(n.top),a-=i.clientLeft||u.clientLeft||0,t-=i.clientTop||u.clientTop||0,{left:a,top:t}}function m5(e,n){var a=e["page".concat(n?"Y":"X","Offset")],t="scroll".concat(n?"Top":"Left");if(typeof a!="number"){var r=e.document;a=r.documentElement[t],typeof a!="number"&&(a=r.body[t])}return a}function h5(e){return m5(e)}function D5(e){return m5(e,!0)}function Th(e){var n=Ame(e),a=e.ownerDocument,t=a.defaultView||a.parentWindow;return n.left+=h5(t),n.top+=D5(t),n}function fG(e){return e!=null&&e==e.window}function g5(e){return fG(e)?e.document:e.nodeType===9?e:e.ownerDocument}function Lme(e,n,a){var t=a,r="",u=g5(e);return t=t||u.defaultView.getComputedStyle(e,null),t&&(r=t.getPropertyValue(n)||t[n]),r}var Pme=new RegExp("^(".concat(Mme,")(?!px)[a-z%]+$"),"i"),xme=/^(top|right|bottom|left)$/,_G="currentStyle",pG="runtimeStyle",R_="left",Nme="px";function jme(e,n){var a=e[_G]&&e[_G][n];if(Pme.test(a)&&!xme.test(n)){var t=e.style,r=t[R_],u=e[pG][R_];e[pG][R_]=e[_G][R_],t[R_]=n==="fontSize"?"1em":a||0,a=t.pixelLeft+Nme,t[R_]=r,e[pG][R_]=u}return a===""?"auto":a}typeof window!="undefined"&&(Ih=window.getComputedStyle?Lme:jme);function uw(e,n){return e==="left"?n.useCssRight?"right":e:n.useCssBottom?"bottom":e}function R5(e){if(e==="left")return"right";if(e==="right")return"left";if(e==="top")return"bottom";if(e==="bottom")return"top"}function y5(e,n,a){Ep(e,"position")==="static"&&(e.style.position="relative");var t=-999,r=-999,u=uw("left",a),i=uw("top",a),l=R5(u),s=R5(i);u!=="left"&&(t=999),i!=="top"&&(r=999);var h="",p=Th(e);("left"in n||"top"in n)&&(h=Tme(e)||"",p5(e,"none")),"left"in n&&(e.style[l]="",e.style[u]="".concat(t,"px")),"top"in n&&(e.style[s]="",e.style[i]="".concat(r,"px")),d5(e);var y=Th(e),E={};for(var b in n)if(n.hasOwnProperty(b)){var T=uw(b,a),L=b==="left"?t:r,U=p[b]-y[b];T===b?E[T]=L+U:E[T]=L-U}Ep(e,E),d5(e),("left"in n||"top"in n)&&p5(e,h);var $={};for(var z in n)if(n.hasOwnProperty(z)){var Z=uw(z,a),ue=n[z]-p[z];z===Z?$[Z]=E[Z]+ue:$[Z]=E[Z]-ue}Ep(e,$)}function Ume(e,n){var a=Th(e),t=Sme(e),r={x:t.x,y:t.y};"left"in n&&(r.x=t.x+n.left-a.left),"top"in n&&(r.y=t.y+n.top-a.top),Gme(e,r)}function Ome(e,n,a){if(a.ignoreShake){var t=Th(e),r=t.left.toFixed(0),u=t.top.toFixed(0),i=n.left.toFixed(0),l=n.top.toFixed(0);if(r===i&&u===l)return}a.useCssRight||a.useCssBottom?y5(e,n,a):a.useCssTransform&&ow()in document.body.style?Ume(e,n):y5(e,n,a)}function dG(e,n){for(var a=0;a<e.length;a++)n(e[a])}function b5(e){return Ih(e,"boxSizing")==="border-box"}var kme=["margin","border","padding"],mG=-1,Bme=2,hG=1,Hme=0;function qme(e,n,a){var t={},r=e.style,u;for(u in n)n.hasOwnProperty(u)&&(t[u]=r[u],r[u]=n[u]);a.call(e);for(u in n)n.hasOwnProperty(u)&&(r[u]=t[u])}function Sh(e,n,a){var t=0,r,u,i;for(u=0;u<n.length;u++)if(r=n[u],r)for(i=0;i<a.length;i++){var l=void 0;r==="border"?l="".concat(r).concat(a[i],"Width"):l=r+a[i],t+=parseFloat(Ih(e,l))||0}return t}var Ac={getParent:function(n){var a=n;do a.nodeType===11&&a.host?a=a.host:a=a.parentNode;while(a&&a.nodeType!==1&&a.nodeType!==9);return a}};dG(["Width","Height"],function(e){Ac["doc".concat(e)]=function(n){var a=n.document;return Math.max(a.documentElement["scroll".concat(e)],a.body["scroll".concat(e)],Ac["viewport".concat(e)](a))},Ac["viewport".concat(e)]=function(n){var a="client".concat(e),t=n.document,r=t.body,u=t.documentElement,i=u[a];return t.compatMode==="CSS1Compat"&&i||r&&r[a]||i}});function w5(e,n,a){var t=a;if(fG(e))return n==="width"?Ac.viewportWidth(e):Ac.viewportHeight(e);if(e.nodeType===9)return n==="width"?Ac.docWidth(e):Ac.docHeight(e);var r=n==="width"?["Left","Right"]:["Top","Bottom"],u=Math.floor(n==="width"?e.getBoundingClientRect().width:e.getBoundingClientRect().height),i=b5(e),l=0;(u==null||u<=0)&&(u=void 0,l=Ih(e,n),(l==null||Number(l)<0)&&(l=e.style[n]||0),l=parseFloat(l)||0),t===void 0&&(t=i?hG:mG);var s=u!==void 0||i,h=u||l;return t===mG?s?h-Sh(e,["border","padding"],r):l:s?t===hG?h:h+(t===Bme?-Sh(e,["border"],r):Sh(e,["margin"],r)):l+Sh(e,kme.slice(t),r)}var Wme={position:"absolute",visibility:"hidden",display:"block"};function E5(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];var t,r=n[0];return r.offsetWidth!==0?t=w5.apply(void 0,n):qme(r,Wme,function(){t=w5.apply(void 0,n)}),t}dG(["width","height"],function(e){var n=e.charAt(0).toUpperCase()+e.slice(1);Ac["outer".concat(n)]=function(t,r){return t&&E5(t,e,r?Hme:hG)};var a=e==="width"?["Left","Right"]:["Top","Bottom"];Ac[e]=function(t,r){var u=r;if(u!==void 0){if(t){var i=b5(t);return i&&(u+=Sh(t,["padding","border"],a)),Ep(t,e,u)}return}return t&&E5(t,e,mG)}});function I5(e,n){for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a]);return e}var Oa={getWindow:function(n){if(n&&n.document&&n.setTimeout)return n;var a=n.ownerDocument||n;return a.defaultView||a.parentWindow},getDocument:g5,offset:function(n,a,t){if(typeof a!="undefined")Ome(n,a,t||{});else return Th(n)},isWindow:fG,each:dG,css:Ep,clone:function(n){var a,t={};for(a in n)n.hasOwnProperty(a)&&(t[a]=n[a]);var r=n.overflow;if(r)for(a in n)n.hasOwnProperty(a)&&(t.overflow[a]=n.overflow[a]);return t},mix:I5,getWindowScrollLeft:function(n){return h5(n)},getWindowScrollTop:function(n){return D5(n)},merge:function(){for(var n={},a=0;a<arguments.length;a++)Oa.mix(n,a<0||arguments.length<=a?void 0:arguments[a]);return n},viewportWidth:0,viewportHeight:0};I5(Oa,Ac);var DG=Oa.getParent;function gG(e){if(Oa.isWindow(e)||e.nodeType===9)return null;var n=Oa.getDocument(e),a=n.body,t,r=Oa.css(e,"position"),u=r==="fixed"||r==="absolute";if(!u)return e.nodeName.toLowerCase()==="html"?null:DG(e);for(t=DG(e);t&&t!==a&&t.nodeType!==9;t=DG(t))if(r=Oa.css(t,"position"),r!=="static")return t;return null}var T5=Oa.getParent;function Jme(e){if(Oa.isWindow(e)||e.nodeType===9)return!1;var n=Oa.getDocument(e),a=n.body,t=null;for(t=T5(e);t&&t!==a&&t!==n;t=T5(t)){var r=Oa.css(t,"position");if(r==="fixed")return!0}return!1}function RG(e,n){for(var a={left:0,right:1/0,top:0,bottom:1/0},t=gG(e),r=Oa.getDocument(e),u=r.defaultView||r.parentWindow,i=r.body,l=r.documentElement;t;){if((navigator.userAgent.indexOf("MSIE")===-1||t.clientWidth!==0)&&t!==i&&t!==l&&Oa.css(t,"overflow")!=="visible"){var s=Oa.offset(t);s.left+=t.clientLeft,s.top+=t.clientTop,a.top=Math.max(a.top,s.top),a.right=Math.min(a.right,s.left+t.clientWidth),a.bottom=Math.min(a.bottom,s.top+t.clientHeight),a.left=Math.max(a.left,s.left)}else if(t===i||t===l)break;t=gG(t)}var h=null;if(!Oa.isWindow(e)&&e.nodeType!==9){h=e.style.position;var p=Oa.css(e,"position");p==="absolute"&&(e.style.position="fixed")}var y=Oa.getWindowScrollLeft(u),E=Oa.getWindowScrollTop(u),b=Oa.viewportWidth(u),T=Oa.viewportHeight(u),L=l.scrollWidth,U=l.scrollHeight,$=window.getComputedStyle(i);if($.overflowX==="hidden"&&(L=u.innerWidth),$.overflowY==="hidden"&&(U=u.innerHeight),e.style&&(e.style.position=h),n||Jme(e))a.left=Math.max(a.left,y),a.top=Math.max(a.top,E),a.right=Math.min(a.right,y+b),a.bottom=Math.min(a.bottom,E+T);else{var z=Math.max(L,y+b);a.right=Math.min(a.right,z);var Z=Math.max(U,E+T);a.bottom=Math.min(a.bottom,Z)}return a.top>=0&&a.left>=0&&a.bottom>a.top&&a.right>a.left?a:null}function $me(e,n,a,t){var r=Oa.clone(e),u={width:n.width,height:n.height};return t.adjustX&&r.left<a.left&&(r.left=a.left),t.resizeWidth&&r.left>=a.left&&r.left+u.width>a.right&&(u.width-=r.left+u.width-a.right),t.adjustX&&r.left+u.width>a.right&&(r.left=Math.max(a.right-u.width,a.left)),t.adjustY&&r.top<a.top&&(r.top=a.top),t.resizeHeight&&r.top>=a.top&&r.top+u.height>a.bottom&&(u.height-=r.top+u.height-a.bottom),t.adjustY&&r.top+u.height>a.bottom&&(r.top=Math.max(a.bottom-u.height,a.top)),Oa.mix(r,u)}function yG(e){var n,a,t;if(!Oa.isWindow(e)&&e.nodeType!==9)n=Oa.offset(e),a=Oa.outerWidth(e),t=Oa.outerHeight(e);else{var r=Oa.getWindow(e);n={left:Oa.getWindowScrollLeft(r),top:Oa.getWindowScrollTop(r)},a=Oa.viewportWidth(r),t=Oa.viewportHeight(r)}return n.width=a,n.height=t,n}function S5(e,n){var a=n.charAt(0),t=n.charAt(1),r=e.width,u=e.height,i=e.left,l=e.top;return a==="c"?l+=u/2:a==="b"&&(l+=u),t==="c"?i+=r/2:t==="r"&&(i+=r),{left:i,top:l}}function iw(e,n,a,t,r){var u=S5(n,a[1]),i=S5(e,a[0]),l=[i.left-u.left,i.top-u.top];return{left:Math.round(e.left-l[0]+t[0]-r[0]),top:Math.round(e.top-l[1]+t[1]-r[1])}}function C5(e,n,a){return e.left<a.left||e.left+n.width>a.right}function F5(e,n,a){return e.top<a.top||e.top+n.height>a.bottom}function zme(e,n,a){return e.left>a.right||e.left+n.width<a.left}function Vme(e,n,a){return e.top>a.bottom||e.top+n.height<a.top}function lw(e,n,a){var t=[];return Oa.each(e,function(r){t.push(r.replace(n,function(u){return a[u]}))}),t}function cw(e,n){return e[n]=-e[n],e}function G5(e,n){var a;return/%$/.test(e)?a=parseInt(e.substring(0,e.length-1),10)/100*n:a=parseInt(e,10),a||0}function M5(e,n){e[0]=G5(e[0],n.width),e[1]=G5(e[1],n.height)}function A5(e,n,a,t){var r=a.points,u=a.offset||[0,0],i=a.targetOffset||[0,0],l=a.overflow,s=a.source||e;u=[].concat(u),i=[].concat(i),l=l||{};var h={},p=0,y=!!(l&&l.alwaysByViewport),E=RG(s,y),b=yG(s);M5(u,b),M5(i,n);var T=iw(b,n,r,u,i),L=Oa.merge(b,T);if(E&&(l.adjustX||l.adjustY)&&t){if(l.adjustX&&C5(T,b,E)){var U=lw(r,/[lr]/gi,{l:"r",r:"l"}),$=cw(u,0),z=cw(i,0),Z=iw(b,n,U,$,z);zme(Z,b,E)||(p=1,r=U,u=$,i=z)}if(l.adjustY&&F5(T,b,E)){var ue=lw(r,/[tb]/gi,{t:"b",b:"t"}),X=cw(u,1),Y=cw(i,1),ae=iw(b,n,ue,X,Y);Vme(ae,b,E)||(p=1,r=ue,u=X,i=Y)}p&&(T=iw(b,n,r,u,i),Oa.mix(L,T));var me=C5(T,b,E),ke=F5(T,b,E);if(me||ke){var ce=r;me&&(ce=lw(r,/[lr]/gi,{l:"r",r:"l"})),ke&&(ce=lw(r,/[tb]/gi,{t:"b",b:"t"})),r=ce,u=a.offset||[0,0],i=a.targetOffset||[0,0]}h.adjustX=l.adjustX&&me,h.adjustY=l.adjustY&&ke,(h.adjustX||h.adjustY)&&(L=$me(T,b,E,h))}return L.width!==b.width&&Oa.css(s,"width",Oa.width(s)+L.width-b.width),L.height!==b.height&&Oa.css(s,"height",Oa.height(s)+L.height-b.height),Oa.offset(s,{left:L.left,top:L.top},{useCssRight:a.useCssRight,useCssBottom:a.useCssBottom,useCssTransform:a.useCssTransform,ignoreShake:a.ignoreShake}),{points:r,offset:u,targetOffset:i,overflow:h}}function Qme(e,n){var a=RG(e,n),t=yG(e);return!a||t.left+t.width<=a.left||t.top+t.height<=a.top||t.left>=a.right||t.top>=a.bottom}function sw(e,n,a){var t=a.target||n,r=yG(t),u=!Qme(t,a.overflow&&a.overflow.alwaysByViewport);return A5(e,r,a,u)}sw.__getOffsetParent=gG;sw.__getVisibleRectForElement=RG;function L5(e,n,a){var t,r,u=Oa.getDocument(e),i=u.defaultView||u.parentWindow,l=Oa.getWindowScrollLeft(i),s=Oa.getWindowScrollTop(i),h=Oa.viewportWidth(i),p=Oa.viewportHeight(i);"pageX"in n?t=n.pageX:t=l+n.clientX,"pageY"in n?r=n.pageY:r=s+n.clientY;var y={left:t,top:r,width:0,height:0},E=t>=0&&t<=l+h&&r>=0&&r<=s+p,b=[a.points[0],"cc"];return A5(e,y,f5(f5({},a),{},{points:b}),E)}var hH=Fu(uH());var iH=function(){if(typeof Map!="undefined")return Map;function e(n,a){var t=-1;return n.some(function(r,u){return r[0]===a?(t=u,!0):!1}),t}return function(){function n(){this.__entries__=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),n.prototype.get=function(a){var t=e(this.__entries__,a),r=this.__entries__[t];return r&&r[1]},n.prototype.set=function(a,t){var r=e(this.__entries__,a);~r?this.__entries__[r][1]=t:this.__entries__.push([a,t])},n.prototype.delete=function(a){var t=this.__entries__,r=e(t,a);~r&&t.splice(r,1)},n.prototype.has=function(a){return!!~e(this.__entries__,a)},n.prototype.clear=function(){this.__entries__.splice(0)},n.prototype.forEach=function(a,t){t===void 0&&(t=null);for(var r=0,u=this.__entries__;r<u.length;r++){var i=u[r];a.call(t,i[1],i[0])}},n}()}(),BG=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,mw=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),hbe=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(mw):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),Dbe=2;function gbe(e,n){var a=!1,t=!1,r=0;function u(){a&&(a=!1,e()),t&&l()}function i(){hbe(u)}function l(){var s=Date.now();if(a){if(s-r<Dbe)return;t=!0}else a=!0,t=!1,setTimeout(i,n);r=s}return l}var Rbe=20,ybe=["top","right","bottom","left","width","height","size","weight"],bbe=typeof MutationObserver!="undefined",wbe=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=gbe(this.refresh.bind(this),Rbe)}return e.prototype.addObserver=function(n){~this.observers_.indexOf(n)||this.observers_.push(n),this.connected_||this.connect_()},e.prototype.removeObserver=function(n){var a=this.observers_,t=a.indexOf(n);~t&&a.splice(t,1),!a.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var n=this.updateObservers_();n&&this.refresh()},e.prototype.updateObservers_=function(){var n=this.observers_.filter(function(a){return a.gatherActive(),a.hasActive()});return n.forEach(function(a){return a.broadcastActive()}),n.length>0},e.prototype.connect_=function(){!BG||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),bbe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!BG||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(n){var a=n.propertyName,t=a===void 0?"":a,r=ybe.some(function(u){return!!~t.indexOf(u)});r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),lH=function(e,n){for(var a=0,t=Object.keys(n);a<t.length;a++){var r=t[a];Object.defineProperty(e,r,{value:n[r],enumerable:!1,writable:!1,configurable:!0})}return e},Ap=function(e){var n=e&&e.ownerDocument&&e.ownerDocument.defaultView;return n||mw},cH=Dw(0,0,0,0);function hw(e){return parseFloat(e)||0}function sH(e){for(var n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];return n.reduce(function(t,r){var u=e["border-"+r+"-width"];return t+hw(u)},0)}function Ebe(e){for(var n=["top","right","bottom","left"],a={},t=0,r=n;t<r.length;t++){var u=r[t],i=e["padding-"+u];a[u]=hw(i)}return a}function Ibe(e){var n=e.getBBox();return Dw(0,0,n.width,n.height)}function Tbe(e){var n=e.clientWidth,a=e.clientHeight;if(!n&&!a)return cH;var t=Ap(e).getComputedStyle(e),r=Ebe(t),u=r.left+r.right,i=r.top+r.bottom,l=hw(t.width),s=hw(t.height);if(t.boxSizing==="border-box"&&(Math.round(l+u)!==n&&(l-=sH(t,"left","right")+u),Math.round(s+i)!==a&&(s-=sH(t,"top","bottom")+i)),!Cbe(e)){var h=Math.round(l+u)-n,p=Math.round(s+i)-a;Math.abs(h)!==1&&(l-=h),Math.abs(p)!==1&&(s-=p)}return Dw(r.left,r.top,l,s)}var Sbe=function(){return typeof SVGGraphicsElement!="undefined"?function(e){return e instanceof Ap(e).SVGGraphicsElement}:function(e){return e instanceof Ap(e).SVGElement&&typeof e.getBBox=="function"}}();function Cbe(e){return e===Ap(e).document.documentElement}function Fbe(e){return BG?Sbe(e)?Ibe(e):Tbe(e):cH}function Gbe(e){var n=e.x,a=e.y,t=e.width,r=e.height,u=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,i=Object.create(u.prototype);return lH(i,{x:n,y:a,width:t,height:r,top:a,right:n+t,bottom:r+a,left:n}),i}function Dw(e,n,a,t){return{x:e,y:n,width:a,height:t}}var Mbe=function(){function e(n){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Dw(0,0,0,0),this.target=n}return e.prototype.isActive=function(){var n=Fbe(this.target);return this.contentRect_=n,n.width!==this.broadcastWidth||n.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var n=this.contentRect_;return this.broadcastWidth=n.width,this.broadcastHeight=n.height,n},e}(),Abe=function(){function e(n,a){var t=Gbe(a);lH(this,{target:n,contentRect:t})}return e}(),Lbe=function(){function e(n,a,t){if(this.activeObservations_=[],this.observations_=new iH,typeof n!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=n,this.controller_=a,this.callbackCtx_=t}return e.prototype.observe=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(n instanceof Ap(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)||(a.set(n,new Mbe(n)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(n instanceof Ap(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;!a.has(n)||(a.delete(n),a.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var n=this;this.clearActive(),this.observations_.forEach(function(a){a.isActive()&&n.activeObservations_.push(a)})},e.prototype.broadcastActive=function(){if(!!this.hasActive()){var n=this.callbackCtx_,a=this.activeObservations_.map(function(t){return new Abe(t.target,t.broadcastRect())});this.callback_.call(n,a,n),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),vH=typeof WeakMap!="undefined"?new WeakMap:new iH,fH=function(){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var a=wbe.getInstance(),t=new Lbe(n,a,this);vH.set(this,t)}return e}();["observe","unobserve","disconnect"].forEach(function(e){fH.prototype[e]=function(){var n;return(n=vH.get(this))[e].apply(n,arguments)}});var Pbe=function(){return typeof mw.ResizeObserver!="undefined"?mw.ResizeObserver:fH}(),_H=Pbe;function pH(e,n){return e===n?!0:!e||!n?!1:"pageX"in n&&"pageY"in n?e.pageX===n.pageX&&e.pageY===n.pageY:"clientX"in n&&"clientY"in n?e.clientX===n.clientX&&e.clientY===n.clientY:!1}function dH(e,n){e!==document.activeElement&&D_(n,e)&&typeof e.focus=="function"&&e.focus()}function HG(e,n){var a=null,t=null;function r(i){var l=Lt(i,1),s=l[0].target;if(!!document.documentElement.contains(s)){var h=s.getBoundingClientRect(),p=h.width,y=h.height,E=Math.floor(p),b=Math.floor(y);(a!==E||t!==b)&&Promise.resolve().then(function(){n({width:E,height:b})}),a=E,t=b}}var u=new _H(r);return e&&u.observe(e),function(){u.disconnect()}}Wa();var mH=function(e,n){var a=Ua.useRef(!1),t=Ua.useRef(null);function r(){window.clearTimeout(t.current)}function u(i){if(r(),!a.current||i===!0){if(e()===!1)return;a.current=!0,t.current=window.setTimeout(function(){a.current=!1},n)}else t.current=window.setTimeout(function(){a.current=!1,u()},n)}return[u,function(){a.current=!1,r()}]};function DH(e){return typeof e!="function"?null:e()}function gH(e){return uo(e)!=="object"||!e?null:e}var xbe=function(n,a){var t=n.children,r=n.disabled,u=n.target,i=n.align,l=n.onAlign,s=n.monitorWindowResize,h=n.monitorBufferTime,p=h===void 0?0:h,y=Ua.useRef({}),E=Ua.useRef(),b=Ua.Children.only(t),T=Ua.useRef({});T.current.disabled=r,T.current.target=u,T.current.align=i,T.current.onAlign=l;var L=mH(function(){var Y=T.current,ae=Y.disabled,me=Y.target,ke=Y.align,ce=Y.onAlign;if(!ae&&me){var le=E.current,Ce,Ie=DH(me),je=gH(me);y.current.element=Ie,y.current.point=je,y.current.align=ke;var Ke=document,Tn=Ke.activeElement;return Ie&&s5(Ie)?Ce=sw(le,Ie,ke):je&&(Ce=L5(le,je,ke)),dH(Tn,le),ce&&Ce&&ce(le,Ce),!0}return!1},p),U=Lt(L,2),$=U[0],z=U[1],Z=Ua.useRef({cancel:function(){}}),ue=Ua.useRef({cancel:function(){}});Ua.useEffect(function(){var Y=DH(u),ae=gH(u);E.current!==ue.current.element&&(ue.current.cancel(),ue.current.element=E.current,ue.current.cancel=HG(E.current,$)),(y.current.element!==Y||!pH(y.current.point,ae)||!(0,hH.default)(y.current.align,i))&&($(),Z.current.element!==Y&&(Z.current.cancel(),Z.current.element=Y,Z.current.cancel=HG(Y,$)))}),Ua.useEffect(function(){r?z():$()},[r]);var X=Ua.useRef(null);return Ua.useEffect(function(){s?X.current||(X.current=qv(window,"resize",$)):X.current&&(X.current.remove(),X.current=null)},[s]),Ua.useEffect(function(){return function(){Z.current.cancel(),ue.current.cancel(),X.current&&X.current.remove(),z()}},[]),Ua.useImperativeHandle(a,function(){return{forceAlign:function(){return $(!0)}}}),Ua.isValidElement(b)&&(b=Ua.cloneElement(b,{ref:Bb(b.ref,E)})),b},RH=Ua.forwardRef(xbe);RH.displayName="Align";var yH=RH;var bH=yH;Wa();var Nbe=Mc()?Sm:At,qG=Nbe;var SH=Fu(g_());function Uh(){"use strict";Uh=function(){return e};var e={},n=Object.prototype,a=n.hasOwnProperty,t=typeof Symbol=="function"?Symbol:{},r=t.iterator||"@@iterator",u=t.asyncIterator||"@@asyncIterator",i=t.toStringTag||"@@toStringTag";function l(ce,le,Ce){return Object.defineProperty(ce,le,{value:Ce,enumerable:!0,configurable:!0,writable:!0}),ce[le]}try{l({},"")}catch{l=function(Ce,Ie,je){return Ce[Ie]=je}}function s(ce,le,Ce,Ie){var je=le&&le.prototype instanceof y?le:y,Ke=Object.create(je.prototype),Tn=new ae(Ie||[]);return Ke._invoke=function(Qn,En,qn){var Vn="suspendedStart";return function(Wn,pt){if(Vn==="executing")throw new Error("Generator is already running");if(Vn==="completed"){if(Wn==="throw")throw pt;return ke()}for(qn.method=Wn,qn.arg=pt;;){var He=qn.delegate;if(He){var ia=ue(He,qn);if(ia){if(ia===p)continue;return ia}}if(qn.method==="next")qn.sent=qn._sent=qn.arg;else if(qn.method==="throw"){if(Vn==="suspendedStart")throw Vn="completed",qn.arg;qn.dispatchException(qn.arg)}else qn.method==="return"&&qn.abrupt("return",qn.arg);Vn="executing";var Ia=h(Qn,En,qn);if(Ia.type==="normal"){if(Vn=qn.done?"completed":"suspendedYield",Ia.arg===p)continue;return{value:Ia.arg,done:qn.done}}Ia.type==="throw"&&(Vn="completed",qn.method="throw",qn.arg=Ia.arg)}}}(ce,Ce,Tn),Ke}function h(ce,le,Ce){try{return{type:"normal",arg:ce.call(le,Ce)}}catch(Ie){return{type:"throw",arg:Ie}}}e.wrap=s;var p={};function y(){}function E(){}function b(){}var T={};l(T,r,function(){return this});var L=Object.getPrototypeOf,U=L&&L(L(me([])));U&&U!==n&&a.call(U,r)&&(T=U);var $=b.prototype=y.prototype=Object.create(T);function z(ce){["next","throw","return"].forEach(function(le){l(ce,le,function(Ce){return this._invoke(le,Ce)})})}function Z(ce,le){function Ce(je,Ke,Tn,Qn){var En=h(ce[je],ce,Ke);if(En.type!=="throw"){var qn=En.arg,Vn=qn.value;return Vn&&uo(Vn)=="object"&&a.call(Vn,"__await")?le.resolve(Vn.__await).then(function(Wn){Ce("next",Wn,Tn,Qn)},function(Wn){Ce("throw",Wn,Tn,Qn)}):le.resolve(Vn).then(function(Wn){qn.value=Wn,Tn(qn)},function(Wn){return Ce("throw",Wn,Tn,Qn)})}Qn(En.arg)}var Ie;this._invoke=function(je,Ke){function Tn(){return new le(function(Qn,En){Ce(je,Ke,Qn,En)})}return Ie=Ie?Ie.then(Tn,Tn):Tn()}}function ue(ce,le){var Ce=ce.iterator[le.method];if(Ce===void 0){if(le.delegate=null,le.method==="throw"){if(ce.iterator.return&&(le.method="return",le.arg=void 0,ue(ce,le),le.method==="throw"))return p;le.method="throw",le.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var Ie=h(Ce,ce.iterator,le.arg);if(Ie.type==="throw")return le.method="throw",le.arg=Ie.arg,le.delegate=null,p;var je=Ie.arg;return je?je.done?(le[ce.resultName]=je.value,le.next=ce.nextLoc,le.method!=="return"&&(le.method="next",le.arg=void 0),le.delegate=null,p):je:(le.method="throw",le.arg=new TypeError("iterator result is not an object"),le.delegate=null,p)}function X(ce){var le={tryLoc:ce[0]};1 in ce&&(le.catchLoc=ce[1]),2 in ce&&(le.finallyLoc=ce[2],le.afterLoc=ce[3]),this.tryEntries.push(le)}function Y(ce){var le=ce.completion||{};le.type="normal",delete le.arg,ce.completion=le}function ae(ce){this.tryEntries=[{tryLoc:"root"}],ce.forEach(X,this),this.reset(!0)}function me(ce){if(ce){var le=ce[r];if(le)return le.call(ce);if(typeof ce.next=="function")return ce;if(!isNaN(ce.length)){var Ce=-1,Ie=function je(){for(;++Ce<ce.length;)if(a.call(ce,Ce))return je.value=ce[Ce],je.done=!1,je;return je.value=void 0,je.done=!0,je};return Ie.next=Ie}}return{next:ke}}function ke(){return{value:void 0,done:!0}}return E.prototype=b,l($,"constructor",b),l(b,"constructor",E),E.displayName=l(b,i,"GeneratorFunction"),e.isGeneratorFunction=function(ce){var le=typeof ce=="function"&&ce.constructor;return!!le&&(le===E||(le.displayName||le.name)==="GeneratorFunction")},e.mark=function(ce){return Object.setPrototypeOf?Object.setPrototypeOf(ce,b):(ce.__proto__=b,l(ce,i,"GeneratorFunction")),ce.prototype=Object.create($),ce},e.awrap=function(ce){return{__await:ce}},z(Z.prototype),l(Z.prototype,u,function(){return this}),e.AsyncIterator=Z,e.async=function(ce,le,Ce,Ie,je){je===void 0&&(je=Promise);var Ke=new Z(s(ce,le,Ce,Ie),je);return e.isGeneratorFunction(le)?Ke:Ke.next().then(function(Tn){return Tn.done?Tn.value:Ke.next()})},z($),l($,i,"Generator"),l($,r,function(){return this}),l($,"toString",function(){return"[object Generator]"}),e.keys=function(ce){var le=[];for(var Ce in ce)le.push(Ce);return le.reverse(),function Ie(){for(;le.length;){var je=le.pop();if(je in ce)return Ie.value=je,Ie.done=!1,Ie}return Ie.done=!0,Ie}},e.values=me,ae.prototype={constructor:ae,reset:function(le){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Y),!le)for(var Ce in this)Ce.charAt(0)==="t"&&a.call(this,Ce)&&!isNaN(+Ce.slice(1))&&(this[Ce]=void 0)},stop:function(){this.done=!0;var le=this.tryEntries[0].completion;if(le.type==="throw")throw le.arg;return this.rval},dispatchException:function(le){if(this.done)throw le;var Ce=this;function Ie(qn,Vn){return Tn.type="throw",Tn.arg=le,Ce.next=qn,Vn&&(Ce.method="next",Ce.arg=void 0),!!Vn}for(var je=this.tryEntries.length-1;je>=0;--je){var Ke=this.tryEntries[je],Tn=Ke.completion;if(Ke.tryLoc==="root")return Ie("end");if(Ke.tryLoc<=this.prev){var Qn=a.call(Ke,"catchLoc"),En=a.call(Ke,"finallyLoc");if(Qn&&En){if(this.prev<Ke.catchLoc)return Ie(Ke.catchLoc,!0);if(this.prev<Ke.finallyLoc)return Ie(Ke.finallyLoc)}else if(Qn){if(this.prev<Ke.catchLoc)return Ie(Ke.catchLoc,!0)}else{if(!En)throw new Error("try statement without catch or finally");if(this.prev<Ke.finallyLoc)return Ie(Ke.finallyLoc)}}}},abrupt:function(le,Ce){for(var Ie=this.tryEntries.length-1;Ie>=0;--Ie){var je=this.tryEntries[Ie];if(je.tryLoc<=this.prev&&a.call(je,"finallyLoc")&&this.prev<je.finallyLoc){var Ke=je;break}}Ke&&(le==="break"||le==="continue")&&Ke.tryLoc<=Ce&&Ce<=Ke.finallyLoc&&(Ke=null);var Tn=Ke?Ke.completion:{};return Tn.type=le,Tn.arg=Ce,Ke?(this.method="next",this.next=Ke.finallyLoc,p):this.complete(Tn)},complete:function(le,Ce){if(le.type==="throw")throw le.arg;return le.type==="break"||le.type==="continue"?this.next=le.arg:le.type==="return"?(this.rval=this.arg=le.arg,this.method="return",this.next="end"):le.type==="normal"&&Ce&&(this.next=Ce),p},finish:function(le){for(var Ce=this.tryEntries.length-1;Ce>=0;--Ce){var Ie=this.tryEntries[Ce];if(Ie.finallyLoc===le)return this.complete(Ie.completion,Ie.afterLoc),Y(Ie),p}},catch:function(le){for(var Ce=this.tryEntries.length-1;Ce>=0;--Ce){var Ie=this.tryEntries[Ce];if(Ie.tryLoc===le){var je=Ie.completion;if(je.type==="throw"){var Ke=je.arg;Y(Ie)}return Ke}}throw new Error("illegal catch attempt")},delegateYield:function(le,Ce,Ie){return this.delegate={iterator:me(le),resultName:Ce,nextLoc:Ie},this.method==="next"&&(this.arg=void 0),p}},e}function wH(e,n,a,t,r,u,i){try{var l=e[u](i),s=l.value}catch(h){a(h);return}l.done?n(s):Promise.resolve(s).then(t,r)}function WG(e){return function(){var n=this,a=arguments;return new Promise(function(t,r){var u=e.apply(n,a);function i(s){wH(u,t,r,i,l,"next",s)}function l(s){wH(u,t,r,i,l,"throw",s)}i(void 0)})}}Wa();var EH=["measure","alignPre","align",null,"motion"],IH=function(e,n){var a=Ps(null),t=Lt(a,2),r=t[0],u=t[1],i=ct();function l(p){u(p,!0)}function s(){Ti.cancel(i.current)}function h(p){s(),i.current=Ti(function(){l(function(y){switch(r){case"align":return"motion";case"motion":return"stable";default:}return y}),p==null||p()})}return At(function(){l("measure")},[e]),At(function(){switch(r){case"measure":n();break;default:}r&&(i.current=Ti(WG(Uh().mark(function p(){var y,E;return Uh().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:y=EH.indexOf(r),E=EH[y+1],E&&y!==-1&&l(E);case 3:case"end":return T.stop()}},p)}))))},[r]),At(function(){return function(){s()}},[]),[r,h]};Wa();var TH=function(e){var n=Fl({width:0,height:0}),a=Lt(n,2),t=a[0],r=a[1];function u(l){r({width:l.offsetWidth,height:l.offsetHeight})}var i=Cm(function(){var l={};if(e){var s=t.width,h=t.height;e.indexOf("height")!==-1&&h?l.height=h:e.indexOf("minHeight")!==-1&&h&&(l.minHeight=h),e.indexOf("width")!==-1&&s?l.width=s:e.indexOf("minWidth")!==-1&&s&&(l.minWidth=s)}return l},[e,t]);return[i,u]};var CH=Di(function(e,n){var a=e.visible,t=e.prefixCls,r=e.className,u=e.style,i=e.children,l=e.zIndex,s=e.stretch,h=e.destroyPopupOnHide,p=e.forceRender,y=e.align,E=e.point,b=e.getRootDomNode,T=e.getClassNameFromAlign,L=e.onAlign,U=e.onMouseEnter,$=e.onMouseLeave,z=e.onMouseDown,Z=e.onTouchStart,ue=e.onClick,X=ct(),Y=ct(),ae=Fl(),me=Lt(ae,2),ke=me[0],ce=me[1],le=TH(s),Ce=Lt(le,2),Ie=Ce[0],je=Ce[1];function Ke(){s&&je(b())}var Tn=IH(a,Ke),Qn=Lt(Tn,2),En=Qn[0],qn=Qn[1],Vn=Fl(0),Wn=Lt(Vn,2),pt=Wn[0],He=Wn[1],ia=ct();qG(function(){En==="alignPre"&&He(0)},[En]);function Ia(){return E||b}function Sn(){var vn;(vn=X.current)===null||vn===void 0||vn.forceAlign()}function gn(vn,la){var Et=T(la);ke!==Et&&ce(Et),He(function(Da){return Da+1}),En==="align"&&(L==null||L(vn,la))}qG(function(){En==="align"&&(pt<2?Sn():qn(function(){var vn;(vn=ia.current)===null||vn===void 0||vn.call(ia)}))},[pt]);var Ve=Ea({},aw(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(vn){var la=Ve[vn];Ve[vn]=function(Et,Da){return qn(),la==null?void 0:la(Et,Da)}});function na(){return new Promise(function(vn){ia.current=vn})}At(function(){!Ve.motionName&&En==="motion"&&qn()},[Ve.motionName,En]),ps(n,function(){return{forceAlign:Sn,getElement:function(){return Y.current}}});var va=Ea(Ea({},Ie),{},{zIndex:l,opacity:En==="motion"||En==="stable"||!a?void 0:0,pointerEvents:!a&&En!=="stable"?"none":void 0},u),Ma=!0;(y==null?void 0:y.points)&&(En==="align"||En==="stable")&&(Ma=!1);var dt=i;return Bf.count(i)>1&&(dt=_t("div",{className:"".concat(t,"-content")},i)),_t(wp,Ro({visible:a,ref:Y,leavedClassName:"".concat(t,"-hidden")},Ve,{onAppearPrepare:na,onEnterPrepare:na,removeOnLeave:h,forceRender:p}),function(vn,la){var Et=vn.className,Da=vn.style,ot=(0,SH.default)(t,r,ke,Et);return _t(bH,{target:Ia(),key:"popup",ref:X,monitorWindowResize:!0,disabled:Ma,align:y,onAlign:gn},_t("div",{ref:la,className:ot,onMouseEnter:U,onMouseLeave:$,onMouseDownCapture:z,onTouchStartCapture:Z,onClick:ue,style:Ea(Ea({},Da),va)},dt))})});CH.displayName="PopupInner";var FH=CH;Wa();var GH=Fu(g_()),MH=Di(function(e,n){var a=e.prefixCls,t=e.visible,r=e.zIndex,u=e.children,i=e.mobile;i=i===void 0?{}:i;var l=i.popupClassName,s=i.popupStyle,h=i.popupMotion,p=h===void 0?{}:h,y=i.popupRender,E=e.onClick,b=ct();ps(n,function(){return{forceAlign:function(){},getElement:function(){return b.current}}});var T=Ea({zIndex:r},s),L=u;return Bf.count(u)>1&&(L=_t("div",{className:"".concat(a,"-content")},u)),y&&(L=y(L)),_t(wp,Ro({visible:t,ref:b,removeOnLeave:!0},p),function(U,$){var z=U.className,Z=U.style,ue=(0,GH.default)(a,l,z);return _t("div",{ref:$,className:ue,onClick:E,style:Ea(Ea({},Z),T)},L)})});MH.displayName="MobilePopupInner";var AH=MH;var jbe=["visible","mobile"],LH=Di(function(e,n){var a=e.visible,t=e.mobile,r=Hv(e,jbe),u=Fl(a),i=Lt(u,2),l=i[0],s=i[1],h=Fl(!1),p=Lt(h,2),y=p[0],E=p[1],b=Ea(Ea({},r),{},{visible:l});At(function(){s(a),a&&t&&E(V6())},[a,t]);var T=y?_t(AH,Ro({},b,{mobile:t,ref:n})):_t(FH,Ro({},b,{ref:n}));return _t("div",null,_t(sG,b),T)});LH.displayName="Popup";var PH=LH;Wa();var Ube=LT(null),JG=Ube;function $G(){}function Obe(){return""}function kbe(e){return e?e.ownerDocument:window.document}var Bbe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Hbe(e){var n=function(a){m_(r,a);var t=h_(r);function r(u){var i;p_(this,r),i=t.call(this,u),i.popupRef=xR(),i.triggerRef=xR(),i.portalContainer=void 0,i.attachId=void 0,i.clickOutsideHandler=void 0,i.touchOutsideHandler=void 0,i.contextMenuOutsideHandler1=void 0,i.contextMenuOutsideHandler2=void 0,i.mouseDownTimeout=void 0,i.focusTime=void 0,i.preClickTime=void 0,i.preTouchTime=void 0,i.delayTimer=void 0,i.hasPopupMouseDown=void 0,i.onMouseEnter=function(s){var h=i.props.mouseEnterDelay;i.fireEvents("onMouseEnter",s),i.delaySetPopupVisible(!0,h,h?null:s)},i.onMouseMove=function(s){i.fireEvents("onMouseMove",s),i.setPoint(s)},i.onMouseLeave=function(s){i.fireEvents("onMouseLeave",s),i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onPopupMouseEnter=function(){i.clearDelayTimer()},i.onPopupMouseLeave=function(s){var h;s.relatedTarget&&!s.relatedTarget.setTimeout&&D_((h=i.popupRef.current)===null||h===void 0?void 0:h.getElement(),s.relatedTarget)||i.delaySetPopupVisible(!1,i.props.mouseLeaveDelay)},i.onFocus=function(s){i.fireEvents("onFocus",s),i.clearDelayTimer(),i.isFocusToShow()&&(i.focusTime=Date.now(),i.delaySetPopupVisible(!0,i.props.focusDelay))},i.onMouseDown=function(s){i.fireEvents("onMouseDown",s),i.preClickTime=Date.now()},i.onTouchStart=function(s){i.fireEvents("onTouchStart",s),i.preTouchTime=Date.now()},i.onBlur=function(s){i.fireEvents("onBlur",s),i.clearDelayTimer(),i.isBlurToHide()&&i.delaySetPopupVisible(!1,i.props.blurDelay)},i.onContextMenu=function(s){s.preventDefault(),i.fireEvents("onContextMenu",s),i.setPopupVisible(!0,s)},i.onContextMenuClose=function(){i.isContextMenuToShow()&&i.close()},i.onClick=function(s){if(i.fireEvents("onClick",s),i.focusTime){var h;if(i.preClickTime&&i.preTouchTime?h=Math.min(i.preClickTime,i.preTouchTime):i.preClickTime?h=i.preClickTime:i.preTouchTime&&(h=i.preTouchTime),Math.abs(h-i.focusTime)<20)return;i.focusTime=0}i.preClickTime=0,i.preTouchTime=0,i.isClickToShow()&&(i.isClickToHide()||i.isBlurToHide())&&s&&s.preventDefault&&s.preventDefault();var p=!i.state.popupVisible;(i.isClickToHide()&&!p||p&&i.isClickToShow())&&i.setPopupVisible(!i.state.popupVisible,s)},i.onPopupMouseDown=function(){if(i.hasPopupMouseDown=!0,clearTimeout(i.mouseDownTimeout),i.mouseDownTimeout=window.setTimeout(function(){i.hasPopupMouseDown=!1},0),i.context){var s;(s=i.context).onPopupMouseDown.apply(s,arguments)}},i.onDocumentClick=function(s){if(!(i.props.mask&&!i.props.maskClosable)){var h=s.target,p=i.getRootDomNode(),y=i.getPopupDomNode();(!D_(p,h)||i.isContextMenuOnly())&&!D_(y,h)&&!i.hasPopupMouseDown&&i.close()}},i.getRootDomNode=function(){var s=i.props.getTriggerDOMNode;if(s)return s(i.triggerRef.current);try{var h=Rh(i.triggerRef.current);if(h)return h}catch{}return gi.findDOMNode(Dh(i))},i.getPopupClassNameFromAlign=function(s){var h=[],p=i.props,y=p.popupPlacement,E=p.builtinPlacements,b=p.prefixCls,T=p.alignPoint,L=p.getPopupClassNameFromAlign;return y&&E&&h.push(z6(E,b,s,T)),L&&h.push(L(s)),h.join(" ")},i.getComponent=function(){var s=i.props,h=s.prefixCls,p=s.destroyPopupOnHide,y=s.popupClassName,E=s.onPopupAlign,b=s.popupMotion,T=s.popupAnimation,L=s.popupTransitionName,U=s.popupStyle,$=s.mask,z=s.maskAnimation,Z=s.maskTransitionName,ue=s.maskMotion,X=s.zIndex,Y=s.popup,ae=s.stretch,me=s.alignPoint,ke=s.mobile,ce=s.forceRender,le=s.onPopupClick,Ce=i.state,Ie=Ce.popupVisible,je=Ce.point,Ke=i.getPopupAlign(),Tn={};return i.isMouseEnterToShow()&&(Tn.onMouseEnter=i.onPopupMouseEnter),i.isMouseLeaveToHide()&&(Tn.onMouseLeave=i.onPopupMouseLeave),Tn.onMouseDown=i.onPopupMouseDown,Tn.onTouchStart=i.onPopupMouseDown,_t(PH,Ro({prefixCls:h,destroyPopupOnHide:p,visible:Ie,point:me&&je,className:y,align:Ke,onAlign:E,animation:T,getClassNameFromAlign:i.getPopupClassNameFromAlign},Tn,{stretch:ae,getRootDomNode:i.getRootDomNode,style:U,mask:$,zIndex:X,transitionName:L,maskAnimation:z,maskTransitionName:Z,maskMotion:ue,ref:i.popupRef,motion:b,mobile:ke,forceRender:ce,onClick:le}),typeof Y=="function"?Y():Y)},i.attachParent=function(s){Ti.cancel(i.attachId);var h=i.props,p=h.getPopupContainer,y=h.getDocument,E=i.getRootDomNode(),b;p?(E||p.length===0)&&(b=p(E)):b=y(i.getRootDomNode()).body,b?b.appendChild(s):i.attachId=Ti(function(){i.attachParent(s)})},i.getContainer=function(){if(!i.portalContainer){var s=i.props.getDocument,h=s(i.getRootDomNode()).createElement("div");h.style.position="absolute",h.style.top="0",h.style.left="0",h.style.width="100%",i.portalContainer=h}return i.attachParent(i.portalContainer),i.portalContainer},i.setPoint=function(s){var h=i.props.alignPoint;!h||!s||i.setState({point:{pageX:s.pageX,pageY:s.pageY}})},i.handlePortalUpdate=function(){i.state.prevPopupVisible!==i.state.popupVisible&&i.props.afterPopupVisibleChange(i.state.popupVisible)},i.triggerContextValue={onPopupMouseDown:i.onPopupMouseDown};var l;return"popupVisible"in u?l=!!u.popupVisible:l=!!u.defaultPopupVisible,i.state={prevPopupVisible:l,popupVisible:l},Bbe.forEach(function(s){i["fire".concat(s)]=function(h){i.fireEvents(s,h)}}),i}return d_(r,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var i=this.props,l=this.state;if(l.popupVisible){var s;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(s=i.getDocument(this.getRootDomNode()),this.clickOutsideHandler=qv(s,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(s=s||i.getDocument(this.getRootDomNode()),this.touchOutsideHandler=qv(s,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(s=s||i.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=qv(s,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=qv(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Ti.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var i;return((i=this.popupRef.current)===null||i===void 0?void 0:i.getElement())||null}},{key:"getPopupAlign",value:function(){var i=this.props,l=i.popupPlacement,s=i.popupAlign,h=i.builtinPlacements;return l&&h?$6(h,l,s):s}},{key:"setPopupVisible",value:function(i,l){var s=this.props.alignPoint,h=this.state.popupVisible;this.clearDelayTimer(),h!==i&&("popupVisible"in this.props||this.setState({popupVisible:i,prevPopupVisible:h}),this.props.onPopupVisibleChange(i)),s&&l&&i&&this.setPoint(l)}},{key:"delaySetPopupVisible",value:function(i,l,s){var h=this,p=l*1e3;if(this.clearDelayTimer(),p){var y=s?{pageX:s.pageX,pageY:s.pageY}:null;this.delayTimer=window.setTimeout(function(){h.setPopupVisible(i,y),h.clearDelayTimer()},p)}else this.setPopupVisible(i,s)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(i){var l=this.props.children.props,s=this.props;return l[i]&&s[i]?this["fire".concat(i)]:l[i]||s[i]}},{key:"isClickToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("click")!==-1||s.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var i=this.props.action;return i==="contextMenu"||i.length===1&&i[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("contextMenu")!==-1||s.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("click")!==-1||s.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("hover")!==-1||s.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("hover")!==-1||s.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var i=this.props,l=i.action,s=i.showAction;return l.indexOf("focus")!==-1||s.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var i=this.props,l=i.action,s=i.hideAction;return l.indexOf("focus")!==-1||s.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var i;(i=this.popupRef.current)===null||i===void 0||i.forceAlign()}}},{key:"fireEvents",value:function(i,l){var s=this.props.children.props[i];s&&s(l);var h=this.props[i];h&&h(l)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var i=this.state.popupVisible,l=this.props,s=l.children,h=l.forceRender,p=l.alignPoint,y=l.className,E=l.autoDestroy,b=Bf.only(s),T={key:"trigger"};this.isContextMenuToShow()?T.onContextMenu=this.onContextMenu:T.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(T.onClick=this.onClick,T.onMouseDown=this.onMouseDown,T.onTouchStart=this.onTouchStart):(T.onClick=this.createTwoChains("onClick"),T.onMouseDown=this.createTwoChains("onMouseDown"),T.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(T.onMouseEnter=this.onMouseEnter,p&&(T.onMouseMove=this.onMouseMove)):T.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?T.onMouseLeave=this.onMouseLeave:T.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(T.onFocus=this.onFocus,T.onBlur=this.onBlur):(T.onFocus=this.createTwoChains("onFocus"),T.onBlur=this.createTwoChains("onBlur"));var L=(0,xH.default)(b&&b.props&&b.props.className,y);L&&(T.className=L);var U=Ea({},T);Hb(b)&&(U.ref=Bb(this.triggerRef,b.ref));var $=Im(b,U),z;return(i||this.popupRef.current||h)&&(z=_t(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!i&&E&&(z=null),_t(JG.Provider,{value:this.triggerContextValue},$,z)}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.popupVisible,h={};return s!==void 0&&l.popupVisible!==s&&(h.popupVisible=s,h.prevPopupVisible=l.popupVisible),h}}]),r}(Hf);return n.contextType=JG,n.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Obe,getDocument:kbe,onPopupVisibleChange:$G,afterPopupVisibleChange:$G,onPopupAlign:$G,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},n}var NH=Hbe(J6);var pl={adjustX:1,adjustY:1},dl=[0,0],jH={left:{points:["cr","cl"],overflow:pl,offset:[-4,0],targetOffset:dl},right:{points:["cl","cr"],overflow:pl,offset:[4,0],targetOffset:dl},top:{points:["bc","tc"],overflow:pl,offset:[0,-4],targetOffset:dl},bottom:{points:["tc","bc"],overflow:pl,offset:[0,4],targetOffset:dl},topLeft:{points:["bl","tl"],overflow:pl,offset:[0,-4],targetOffset:dl},leftTop:{points:["tr","tl"],overflow:pl,offset:[-4,0],targetOffset:dl},topRight:{points:["br","tr"],overflow:pl,offset:[0,-4],targetOffset:dl},rightTop:{points:["tl","tr"],overflow:pl,offset:[4,0],targetOffset:dl},bottomRight:{points:["tr","br"],overflow:pl,offset:[0,4],targetOffset:dl},rightBottom:{points:["bl","br"],overflow:pl,offset:[4,0],targetOffset:dl},bottomLeft:{points:["tl","bl"],overflow:pl,offset:[0,4],targetOffset:dl},leftBottom:{points:["br","bl"],overflow:pl,offset:[-4,0],targetOffset:dl}};Wa();var UH=Fu(g_());function gw(e){var n=e.showArrow,a=e.arrowContent,t=e.children,r=e.prefixCls,u=e.id,i=e.overlayInnerStyle,l=e.className,s=e.style;return _t("div",{className:(0,UH.default)("".concat(r,"-content"),l),style:s},n!==!1&&_t("div",{className:"".concat(r,"-arrow"),key:"arrow"},a),_t("div",{className:"".concat(r,"-inner"),id:u,role:"tooltip",style:i},typeof t=="function"?t():t))}var qbe=function(n,a){var t=n.overlayClassName,r=n.trigger,u=r===void 0?["hover"]:r,i=n.mouseEnterDelay,l=i===void 0?0:i,s=n.mouseLeaveDelay,h=s===void 0?.1:s,p=n.overlayStyle,y=n.prefixCls,E=y===void 0?"rc-tooltip":y,b=n.children,T=n.onVisibleChange,L=n.afterVisibleChange,U=n.transitionName,$=n.animation,z=n.motion,Z=n.placement,ue=Z===void 0?"right":Z,X=n.align,Y=X===void 0?{}:X,ae=n.destroyTooltipOnHide,me=ae===void 0?!1:ae,ke=n.defaultVisible,ce=n.getTooltipContainer,le=n.overlayInnerStyle,Ce=n.arrowContent,Ie=n.overlay,je=n.id,Ke=n.showArrow,Tn=Hv(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),Qn=ct(null);ps(a,function(){return Qn.current});var En=Ea({},Tn);"visible"in n&&(En.popupVisible=n.visible);var qn=function(){return _t(gw,{showArrow:Ke,arrowContent:Ce,key:"content",prefixCls:E,id:je,overlayInnerStyle:le},Ie)},Vn=!1,Wn=!1;if(typeof me=="boolean")Vn=me;else if(me&&uo(me)==="object"){var pt=me.keepParent;Vn=pt===!0,Wn=pt===!1}return _t(NH,Ro({popupClassName:t,prefixCls:E,popup:qn,action:u,builtinPlacements:jH,popupPlacement:ue,ref:Qn,popupAlign:Y,getPopupContainer:ce,onPopupVisibleChange:T,afterPopupVisibleChange:L,popupTransitionName:U,popupAnimation:$,popupMotion:z,defaultPopupVisible:ke,destroyPopupOnHide:Vn,autoDestroy:Wn,mouseLeaveDelay:h,popupStyle:p,mouseEnterDelay:l},En),b)},OH=Di(qbe);var kH=OH;var HH=e=>Ua.createElement(kH,Object.assign({},e,{overlayClassName:`cv-tooltip ${e.overlayClassName}`,getTooltipContainer:e.tooltipContainerSelector?()=>document.querySelector(e.tooltipContainerSelector)||document.body:void 0}));if(typeof window!="undefined"&&typeof global=="undefined")try{Promise.resolve().then(()=>Fu(BH())).then(e=>{let n=e.default,a=document.createElement("style");a.type="text/css",a.appendChild(document.createTextNode(n)),document.head.appendChild(a)})}catch(e){window.Sentry&&window.Sentry.captureException(e)}Wa();var qH=class extends Ua.Component{componentDidUpdate(n){this.props.componentDidUpdate(n.deps)}render(){return this.props.children}},WH=qH;var Jbe=Ft();var JH=function(e){return"ref:"+kt(e)(Qa.value)},$H=function(e){var n=JH(e);return function(a){return Jbe(sc(n)(a))}},zH=function(e){var n=JH(e);return function(a){return dR(n)(a)}};var $be=hs(),VH=rn(Xe)($n),QH=W(yn),zbe=Zi(zR(Yi)),KH={reflectSymbol:function(){return"deps"}},Vbe=$H(KH),Qbe=zH(KH),Kbe=pn(dn);var Ybe=function(e){var n=$be(e);return function(){return function(){return n(WH)}}},Xbe=Ybe(Ye)()(),Zbe=function(e){var n=Bo(e);return function(a){return function(t){return function(r){return function(u){return hp(a)(function(i){return t({init:VH(Xa(u(r)))(function(){return QH(r)}),update:function(l){return function(s){return VH(Xa(u(s)))(function(){return QH(s)})}},view:function(l){return function(s){return Xbe({componentDidUpdate:zbe(s)(function(h){var p=n(Vbe(h))(r);return p?new S(r):M.value}),deps:Qbe(r)})(i(ge))}}})})}}}}};var zG=function(e){var n=Zbe(e);return function(a){return function(t){return n("UseEffectPrime")(Kbe)(a)(t)}}};var nwe=hs();var YH="click";var Rw="top",Lp=function(e){var n=nwe(e);return function(){return function(){return n(HH)}}};var XH="right";var ZH=e=>()=>e.preventDefault&&e.preventDefault();var VG=function(){return ZH};var awe=La();var QG=ne(tn),KG=wt(awe(H({reflectSymbol:function(){return"value"}})(de)(ln))),YG=W(_a);var yw=function(e){return ze("")(QG(KG(Pr(e.target)))(function(n){return YG(n.value)}))},XG=function(e){return ze("")(QG(KG(Pr(e.target)))(function(n){return YG(n.value)}))},xs=function(e){return ze("")(QG(KG(Pr(e.target)))(function(n){return YG(n.value)}))};var eq="/network/connections";var nq=15;var twe=Lp(Ye)()(),rwe=Ba(we),owe=function(){return"You\u2019ve hit the "+(re(on)(nq)+`-connection limit, designed to encourage you to focus on building meaningful connections that lead to impactful opportunities. Remove an existing connection to make space for a new one that aligns with your goals. `)}(),uwe=mo(Ye)("text-decoration-underline")(Sv(te)()()("text-dark")({href:eq})("Manage my connections")),aq=function(e){return function(n){return twe({placement:e,trigger:YH,overlay:rwe("")([en(owe),uwe]),overlayStyle:st({width:"15rem"}),overlayClassName:"t--connection-limit-tooltip"})(n)}};var tq=ne(tn),Pp=function(e){var n=tq(e.guestPresenter)(function(a){if(a instanceof Xm)return new S(a.value0);if(a instanceof Zm)return M.value;throw new Error("Failed pattern match at Livestream.Utils (line 20, column 31 - line 22, column 40): "+[a.constructor.name])});return tq(n)(function(a){return new S({name:a.school.name,id:a.school.id})})};var iwe=function(){function e(){}return e.value=new e,e}(),lwe=function(){function e(){}return e.value=new e,e}(),ZG=function(){function e(){}return e.value=new e,e}(),cwe=function(){function e(){}return e.value=new e,e}(),swe=function(){function e(){}return e.value=new e,e}(),vwe=function(){function e(){}return e.value=new e,e}(),rq=function(e){if(e instanceof iwe)return"account_settings_page";if(e instanceof lwe)return"preference_survey";if(e instanceof ZG)return"livestream_registration";if(e instanceof cwe)return"chancing_wizard_network_step";if(e instanceof swe)return"main_profile_page";if(e instanceof vwe)return"autopilot_acceptance_page";throw new Error("Failed pattern match at Profile.PublishContext (line 15, column 13 - line 21, column 57): "+[e.constructor.name])};var dwe=Cc(Tc),eM=ql(dwe),nM=ne(ua);var mwe=Zr(),oq=pe(oe);var uq=eM("profile_visibility_path")(function(e){return function(n){return nM(e({visibility:{publish_scope:th(n)}}))(tr)}}),iq=function(){return eM("profile_network_settings_path")(function(e){return function(n){return function(a){return nM(e({network_settings:{publish_scope:th(a.publishScope),publish_context:rq(a.publishContext),automatic_accept_requests_for_school_list:a.autoAcceptForSchoolList,automatic_connection_requests_from_livestreams:a.autoRequestFromLivestreams,livestream:Ta(oq(il(a.livestreamConference))(function(t){return{school_name:Ta(oq(Pp(t))(function(r){return r.name})),title:t.title,id:t.id}}))}}))(tr)}(mwe(n))}})},lq=eM("profile_name_path")(function(e){return function(n){return nM(e({name:n}))(tr)}});var Pe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wn=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var hwe=Jl(),Dwe=$r(te),gwe=$t(te),aM=Jt(te),tM=nl(te),$v=Ge(we),xp=Ko(te)()(),rM=Wr(yu),Rwe=rn(Xe),oM=Zn(ha),w_=Ge(Ye),cq=Ii()(),ywe=Iv(te),bwe=gr(We)(bt),sq=Jr()(),uM=Zn(Yu),wwe=Y0()(),vq=Ge(te),Ewe=XR(we),iM=ty(te),Iwe=Ba(te),Twe=Lp(Ye)()(),Swe=Jt(we),Cwe=Sv(te)()(),Fwe=Za(te),E_=W(yn),fq=Rwe($n),Gwe=wb(),Oh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_q=function(){function e(){}return e.value=new e,e}(),pq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kh=function(){function e(){}return e.value=new e,e}(),lM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Dq=function(e){return function(n){var a=function(h){return hwe({body:h,title:Dwe("my-0")(function(){return e.stage instanceof hy?"Join the CollegeVine network":"Connect with "+e.schoolName}()),headerClass:"pb-0",onDismiss:n(new wn(kh.value)),size:sh.value})},t=m4(e.context),r=Fe([gwe("mt-3")("Review your message before you send it"),aM("mt-2")(` Because this is your first message to the counselor, we want to make sure you\u2019re ready to send. `),tM("mt-4")("Your message"),Km(e.message),$v("d-flex mt-4 justify-content-start")([xp("btn btn-primary btn-lg t--sem-user-connection-modal-confirm-message-"+t)({onClick:rM(function(){return n(new wn(new lM({introMessage:e.message})))(),n(new Pe(new Oh(PS.value)))()})})("Send"),xp("btn btn-lg btn-outline-primary ml-3 text-nowrap")({onClick:oM(n)(new Pe(new Oh(Wm.value)))})("No, I need to edit something")])]),u=Fe([$v("text-center")([w_("")(cq("mt-4")({src:"/img/checkmate-icon.png",height:"80",width:"80"})),ywe("mt-4")("Connection request sent!"),aM("mx-md-4")(bwe(["You\u2019ve successfully demonstrated your interest to ",e.schoolName,". ","This counselor isn\u2019t part of the platform yet but we\u2019ve forwarded your message to them. ","You\u2019ll get an email notification when they respond."])),xp("btn btn-lg btn-outline-secondary mt-4")({onClick:oM(n)(new wn(kh.value))})("Close")])]),i=xp("btn btn-outline-secondary ml-3 t--sem-user-connection-modal-close-"+t)({onClick:oM(n)(new wn(kh.value))})("Cancel"),l=function(){var h=GS(e.message)&&function(){if(e.profile.fullName instanceof S)return!0;if(e.profile.fullName instanceof M)return!Pl(e.firstName)&&!Pl(e.lastName);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 238, column 15 - line 242, column 88): "+[e.profile.fullName.constructor.name])}(),p=function(){if(e.vineBelowConnectionLimit instanceof S&&e.vineBelowConnectionLimit.value0)return!1;if(e.vineBelowConnectionLimit instanceof S&&!e.vineBelowConnectionLimit.value0)return!0;if(e.vineBelowConnectionLimit instanceof M)return!1;throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 231, column 13 - line 234, column 31): "+[e.vineBelowConnectionLimit.constructor.name])}();return Fe([ya(Ct(e.profile.fullName))(Fe([tM("mt-md-4")("Your preferred name"),$v("form-row mx-1")([sq("col form-control mr-2 t--sem-user-connection-modal-first-name-"+t)({type:"text",value:e.firstName,onChange:uM(n)(function(y){return Pe.create(mq.create(xs(y)))}),placeholder:"First name"}),sq("col form-control ml-2 t--sem-user-connection-modal-last-name-"+t)({type:"text",value:e.lastName,onChange:uM(n)(function(y){return Pe.create(hq.create(xs(y)))}),placeholder:"Last name"})])])),tM("mt-md-4")("Your message"),wwe("form-control t--sem-user-connection-modal-text-area-"+t)({rows:7,value:e.message,onChange:uM(n)(function(y){return Pe.create(dq.create(yw(y)))}),placeholder:`Sample introductory message: Hi Jane, My name is Sam and I\u2019m a senior at Oak Ridge High School in Oak Ridge, MD. I\u2019m really excited to apply for CV University this fall, and I\u2019m hoping to study history there. Are there any upcoming virtual events I can register for? I\u2019m excited to stay in touch and learn more about your school. Thanks! `}),w_("mt-2")(s4(e.message)),vq("mt-3 mt-md-4 small")("The ideal connection message should include:"),Ewe("small")([iM("")("Your name, where you\u2019re from, and a bit about who you are"),iM("")("What you\u2019re interested in studying along with one or two insightful questions"),iM("")("That you\u2019re eager to connect with an admissions counselor and would love to stay in touch")]),$v("d-flex mt-4 justify-content-start")([aq(Rw)(w_("")(xp("btn btn-primary btn-lg t--sem-user-connection-modal-connect-"+t)({onClick:rM(function(){return function(){if(e.profile.fullName instanceof S)return ge;if(e.profile.fullName instanceof M)return n(new Pe(new pq({first:e.firstName,last:e.lastName})))();throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 214, column 23 - line 218, column 113): "+[e.profile.fullName.constructor.name])}(),n(new Pe(new Oh(LS.value)))()}),disabled:!h||p,style:st({pointerEvents:function(){return p?"none":"auto"}()})})("Connect"))),i])])}(),s=$v("mx-md-7")([w_("border border-success rounded p-4 my-4")($v("row align-items-center")([w_("col-12 col-md-auto text-center text-md-left")(cq("img-fluid")({src:"/img/network/publish-profile-icon.png",height:"67",width:"143"})),w_("col text-center text-md-left")(Iwe("fw-bold font-weight-bold text-gray-800")("Network with verified admissions counselors on CollegeVine"))])),$v("d-flex flex-nowrap align-items-center")([vq("mr-4")("Publish your profile to join the CollegeVine Network"),Twe({placement:XH,overlay:Swe("")([en(` Your profile includes academics, extracurriculars, major interest, demographics and financial aid intent. By agreeing to publish, you will also be adding select preferences survey answers to `),Cwe("")({href:m6})("your profile"),en(".")]),overlayStyle:st({width:"15rem"})})(Fwe("cursor-default text-secondary fe fe-info large")(""))]),aM("text-secondary small d-none d-md-block mt-4")("Joining the CollegeVine Network won\u2019t result in spam from colleges you don\u2019t want to hear from."),$v("d-flex mt-4 justify-content-start justify-content-md-center")([xp("btn btn-primary t--sem-user-connection-modal-publish-profile-"+t)({onClick:rM(function(){return n(new Pe(_q.value))(),n(new Pe(new Oh(Wm.value)))()})})("Publish profile"),i])]);return w_("t--network-sem-user-modal")(function(){if(e.stage instanceof hy)return a(s);if(e.stage instanceof Wm)return a(l);if(e.stage instanceof LS)return a(r);if(e.stage instanceof PS)return a(u);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 96, column 5 - line 100, column 38): "+[e.stage.constructor.name])}())}},gq=function(e){return function(n){if(n instanceof Pe){if(n.value0 instanceof Oh)return E_({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,profile:e.profile,schoolName:e.schoolName,vineBelowConnectionLimit:e.vineBelowConnectionLimit,stage:n.value0.value0});if(n.value0 instanceof _q)return fq(Xa(uq(bi.value)))(function(){return E_({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,profile:{fullName:e.profile.fullName,publishScope:bi.value}})});if(n.value0 instanceof pq)return fq(Xa(lq(n.value0.value0)))(function(){return E_({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,profile:{publishScope:e.profile.publishScope,fullName:new S(jF(n.value0.value0))}})});if(n.value0 instanceof dq)return E_({context:e.context,firstName:e.firstName,lastName:e.lastName,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,message:n.value0.value0});if(n.value0 instanceof mq)return E_({context:e.context,lastName:e.lastName,message:e.message,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,firstName:n.value0.value0});if(n.value0 instanceof hq)return E_({context:e.context,firstName:e.firstName,message:e.message,profile:e.profile,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,lastName:n.value0.value0});throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 75, column 31 - line 89, column 39): "+[n.value0.constructor.name])}if(n instanceof wn)return E_(e);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 74, column 1 - line 74, column 55): "+[e.constructor.name,n.constructor.name])}},Mwe=function(e){var n=S6(e);return n?Wm.value:hy.value},Rq=function(e){return{firstName:"",lastName:"",message:"",profile:Gwe(e.profile),stage:Mwe(e.profile),schoolName:e.schoolName,context:e.context,vineBelowConnectionLimit:e.vineBelowConnectionLimit}};var bw=Ee(Qt(Bt)),Awe=Zr(),Lwe=Ge(Ye),Pwe=Ii()(),cM=Ba(te),sM=zt(Ye)()(),xwe=Za(te),Nwe=As(),jwe=Dp(Xe)(),Uwe=Rn(Ne),Owe=wa(we)()(),kwe=Wr(VR),Bwe=VG(),Hwe=qa(er),Np=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Bh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yq=function(){function e(){}return e.value=new e,e}(),qwe=function(){function e(){}return e.value=new e,e}(),Wwe={eq:function(e){return function(n){return e instanceof Np&&n instanceof Np?e.value0.url===n.value0.url:e instanceof Bh&&n instanceof Bh?bw(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.initials===n.value0.initials&&bw(e.value0.textColorClass)(n.value0.textColorClass):e instanceof vM&&n instanceof vM?bw(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.iconClass===n.value0.iconClass:e instanceof fM&&n instanceof fM?bw(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.name===n.value0.name:!1}}},Jwe=zG(Wwe),bq=function(){return function(e){var n=Awe(e),a=function(){var r=Ja(n.shape)(yq.value);if(r instanceof yq)return"rounded-circle";if(r instanceof qwe)return"rounded";throw new Error("Failed pattern match at Dashkit.Avatar (line 119, column 9 - line 121, column 37): "+[r.constructor.name])}(),t=function(r){return Lwe("avatar "+(w6(Ja(n.size)(Gb.value))+(" "+Ja(n.className)(""))))(function(){if(r instanceof Np)return Pwe("avatar-img img-fluid "+(a+(" "+Ja(n.borderClassName)(""))))({src:r.value0.url,alt:Ja(n.ariaLabel)("Avatar image")});if(r instanceof Bh)return cM("avatar-title font-weight-bold fw-bold "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+(ze("")(r.value0.textColorClass)+(" "+Ja(n.borderClassName)(""))))))))(r.value0.initials);if(r instanceof vM)return sM("avatar-title "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+Ja(n.borderClassName)(""))))))({"aria-label":Ja(n.ariaLabel)("Avatar icon")})(xwe(r.value0.iconClass)(""));if(r instanceof fM)return sM("avatar-title "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+Ja(n.borderClassName)(""))))))({"aria-label":Ja(n.ariaLabel)("Avatar icon")})(cM("material-symbol")(r.value0.name));throw new Error("Failed pattern match at Dashkit.Avatar (line 78, column 11 - line 116, column 46): "+[r.constructor.name])}())};return dh(Nwe(Gc(n.source))(function(r){return jwe(Jwe(n.source)(function(u){return Uwe(r.value1(u))}))(function(){return Bv(Fe([t(r.value0),function(){return r.value0 instanceof Np?ga(il(n.hideAvatar))(function(u){return sM("hq-only-menu-item")({style:st({marginTop:"-50px",marginLeft:"200px"})})(Owe("btn btn-sm btn-warning mb-4 t--hide-avatar")(ea)({onClick:kwe(function(i){return function(){return Bwe(i)(),Hwe(r.value1)(u)()}})})([cM("badge badge-info bg-info text-dark mr-2")("HQ"),en("Hide")]))}):aa}()]))})}))}};var $we=bq();var wq=function(e){return function(n){return $we({source:function(){if(e.avatarUrl instanceof S)return new Np({url:e.avatarUrl.value0});if(e.avatarUrl instanceof M)return new Bh({initials:e.initials,backgroundColorClass:M.value,textColorClass:M.value});throw new Error("Failed pattern match at Sem.Utils (line 16, column 15 - line 24, column 14): "+[e.avatarUrl.constructor.name])}(),size:n})}};var _M=k(oe),zwe=un(U2(ff));var Eq=function(e){var n=function(a){return ze("")(_M(Uu)(im(0)(a)))};return Fv(function(){var a=Yo(" ")(e);return a.length===2?n(a[0])+n(a[1]):a.length===1?n(a[0]):a.length===0?"":ze("?")(zwe(_M(n)(y0(a)))(_M(n)(Xd(a))))}())},Iq=function(e){return e.firstName+(" "+e.lastName)};var pM=$r(te),Vwe=Sv(te)()(),Qwe=Sv(we)()(),Tq=Za(te),Kwe=Ko(we)()(),Ywe=Zi(gv(Yi)),Xwe=pe(oe),Zwe=ne(tn),dM=Ge(te),ww=Ge(we),Sq=Ge(Ye),e1e=ep(te),Cq=Ml()(),n1e=nl(te),a1e=Jt(te),jp=W(yn),Fq=rn(Xe),t1e=Fq($n),r1e=Fa(Ne),o1e=Fq(ua),u1e=W(Kn),i1e=lt(br(Ca)),Gq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Hh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Mq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Aq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Lq=function(){var e=function(a){return function(t){return function(r){var u=pM("text-primary")(t.semUser.firstName+(" from "+(t.semUser.school.name+" sent you a connection request!"))),i=pM("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question or introduce yourself!")),l=[u,Vwe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-view-pending-invitation-from-sem-user")({href:JF(new yp(t.semUser.id))})("View Message")],s=Iq(t.semUser),h=Eq(s),p=pM("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question!")),y=[p,Qwe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-messages-link")({href:JF(new yp(t.semUser.id))})([Tq("fe fe-message-square mr-2 large")(""),en("Send a message to "+t.semUser.firstName)])],E=function(L){return Kwe("btn btn-primary d-flex align-items-center justify-content-center t--livestream-details-connect-with-sem-user")({onClick:Ywe(r)(Xwe(Zwe(a.currentUser)(function(U){return U.profile}))(Mq.create)),disabled:L.isDisabled})([Tq("fe fe-message-square mr-2 large")(""),en("Connect with "+t.semUser.firstName)])},b=[i,E({isDisabled:!1})],T=[i,E({isDisabled:!0}),dM("mt-4 text-secondary small")("Invitation pending")];return ww("t--livestream-details-guest-presenter-sem-user mb-4")([ga(a.currentUser)(function(L){return ya(L.hasAccessToNetwork&&t.semUser.school.allowedToContact)(Sq("card")(ww("card-body")(function(){if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof Gv)return y;if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof Nl&&t.semUser.connection.value0.initiator instanceof bs||t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof ws&&t.semUser.connection.value0.initiator instanceof bs)return T;if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof Nl&&t.semUser.connection.value0.initiator instanceof ys)return l;if(t.semUser.connection instanceof S&&t.semUser.connection.value0.status instanceof ws&&t.semUser.connection.value0.initiator instanceof ys||t.semUser.connection instanceof M)return b;throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 93, column 17 - line 99, column 53): "+[t.semUser.connection.constructor.name])}())))}),e1e("text-uppercase text-secondary")("Your guest presenter"),ww("row align-items-center mt-4")([Sq("col-auto")(wq(Cq(t.semUser)({initials:h}))(Fb.value)),ww("col")([n1e("mb-1")(s),dM("text-secondary small")(t.semUser.school.name),dM("text-secondary small")(t.semUser.title)]),ga(t.semUser.bio)(function(L){return a1e("mt-4 mb-2 ml-2")(L)})]),ga(t.modal)(function(L){return Dq(L.value0)(function(U){return r(Hh.create(U))})})])}}},n=function(a){return function(t){return function(r){if(r instanceof Hh&&r.value0 instanceof wn){if(r.value0.value0 instanceof kh)return jp({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:M.value});if(r.value0.value0 instanceof lM)return t1e(r1e(o1e(L6(t.semUser.school.id)(t.semUser.id)({introMessage:r.value0.value0.value0.introMessage}))(function(){return u1e(new Aq({introMessage:r.value0.value0.value0.introMessage}))})))(function(){return jp(t)});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 48, column 55 - line 55, column 19): "+[r.value0.value0.constructor.name])}if(t.modal instanceof S&&r instanceof Hh&&r.value0 instanceof Pe)return i1e(Hh.create)(function(u){return{currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new S(new Gq(u))}})(gq(t.modal.value0.value0)(new Pe(r.value0.value0)));if(r instanceof Hh&&r.value0 instanceof Pe)return jp(t);if(r instanceof Mq)return jp({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new S(new Gq(Rq({schoolName:a.semUser.school.name,context:AS.value,profile:r.value0,vineBelowConnectionLimit:a.vineBelowConnectionLimit})))});if(r instanceof Aq)return jp({currentUser:t.currentUser,modal:t.modal,vineBelowConnectionLimit:t.vineBelowConnectionLimit,semUser:{avatarUrl:t.semUser.avatarUrl,bio:t.semUser.bio,firstName:t.semUser.firstName,id:t.semUser.id,lastName:t.semUser.lastName,school:t.semUser.school,title:t.semUser.title,unreadMessageCountFromSemUser:t.semUser.unreadMessageCountFromSemUser,connection:new S({initiator:bs.value,introMessage:r.value0.introMessage,status:Nl.value})}});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 47, column 5 - line 47, column 67): "+[a.constructor.name,t.constructor.name,r.constructor.name])}}};return Dv("Livestream Guest Presenter SEM user")(function(a){return{init:jp(Cq(a)({modal:M.value})),view:e(a),update:n(a)}})}();var l1e=Ba(we),c1e=Za(te),qh=Ge(we),Pq=ep(te),s1e=k(an),mM=Ge(Ye),v1e=el()(),f1e=$r(te),xq=function(e){return function(n){var a=function(i){return l1e("badge badge-light bg-light text-dark mr-3")([c1e("fe fe-tag mr-2")(""),en(i.name)])},t=function(i){return function(l){return qh("mb-3")([Pq("text-secondary text-uppercase mb-2")(i),l])}},r=qh("mt-4")([ga(_e(n.entity.shortEducation))(function(i){return t("Education")(en(i))}),t("Bio")(Km(n.entity.bio)),A8(vi(n.entity.tags))(t("Specialties")(Fe(s1e(a)(n.entity.tags))))]),u=qh("row")([ga(_e(n.entity.imageUrl))(function(i){return mM("p-0 m-0")(mM("col-auto my-auto")(mM("avatar avatar-md")(v1e("avatar-img rounded-circle")({src:i}))))}),qh("col-auto my-auto")([Pq("text-uppercase text-secondary mb-2")("Advisor"),f1e("m-0")(n.entity.name)])]);return qh("mt-4 mt-md-0 t--service-provider-guest-presenter")([u,r])}};var Wh=function(e){return function(n){return function(a){return function(t){if(n instanceof Xm)return Lq({semUser:n.value0,currentUser:a,vineBelowConnectionLimit:t.vineBelowConnectionLimit});if(n instanceof Zm)return xq(e)(n.value0);throw new Error("Failed pattern match at Livestream.GuestPresenter.GuestPresenter (line 16, column 1 - line 16, column 78): "+[e.constructor.name,n.constructor.name,a.constructor.name,t.constructor.name])}}}};var _1e=oo(we)()(),p1e=Za(te),Up=Ge(te),Ci=Ge(Ye),Fi=Ge(we),Nq=$r(te),jq=el()(),Uq=pe(an),d1e=Ba(te),Oq=pe(oe),m1e=Jt(we),kq=mo(te),Bq=oo(te)()(),h1e=re(on),Jh=k(oe),D1e=Z0(we)()(),g1e=re(Hl),$h=function(e){var n=function(a){return function(t){return _1e("mr-3")(ea)({href:t,target:"_blank"})([en(a),p1e("fe fe-external-link ml-1")("")])}};return Fe([Up("text-uppercase text-muted small mb-2")("School information"),Ci("card shadow-none")(Fi("card-body")([Nq("mb-1")(e.name),Up("text-uppercase small text-secondary")(e.cityState),Fi("mt-3 d-none d-md-block")([n("Stats")(Cb(__.value)(e.slug)),n("Cost")(Cb(hh.value)(e.slug)),n("Map")(Cb(__.value)(e.slug))]),Fi("mt-3 d-md-none")([n("Stats")(xF(__.value)(e.slug)),n("Cost")(xF(hh.value)(e.slug))])]))])},R1e=function(e){var n=function(i){return jq("avatar-img rounded-circle")({src:i})},a=Or(" ")(Uq(Yo(" ")(e.fullName))(ol(1))),t=d1e("avatar-title rounded-circle text-uppercase")(a),r=function(i){return ze("")(Oq(i)(function(l){return" '"+l}))},u=function(i){return function(l){return m1e("")([kq("")(i+": "),en(l)])}};return Fe([Up("text-uppercase text-muted small mb-2")("Your host"),Fi("row align-items-center mb-4 pr-4")([Ci("col-auto")(Ci("avatar")(In(t)(n)(e.pictureUrl))),Ci("col")(Fi("row align-items-center justify-content-between")([Up("col-12 col-md-auto x-large")(e.fullName),Ci("col-12 col-md-auto")(ga(e.allStreamsUrl)(function(i){return Bq("t--host-streams")(ea)({href:i})("See all "+(h1e(e.totalStreams)+(" streams by "+e.firstName)))}))]))]),Fe(vu([Jh(u("Undergrad College"))(Oq(e.undergrad.college)(function(i){return i+r(e.undergrad.year)})),Jh(u("Major"))(e.undergrad.major),Jh(u("Graduate College"))(e.gradCollege),Jh(u("Work Experience"))(e.workExperience),Jh(u("My Admissions Story"))(e.admissionsStory)]))])},y1e=function(e){return Fe([Up("text-uppercase text-muted small mb-2")("Description"),Fi("")([Ci("col-6 col-md-4 float-right")(jq("img-fluid rounded")({src:e.imageUrl})),Fi("")(Uq(Yo(` `)(e.description))(function(n){return D1e("")({dangerouslySetInnerHTML:{__html:n}})([])}))])])},b1e=function(e){var n=e.paths.collegeFair+("?utm_cv_source=banner-livestream-watch-"+g1e(e.conference.id));return Ci("card mt-3")(Ci("card-body py-3")(Fi("row align-items-center")([Ci("col-12 col-md-auto mb-3 mb-md-0")(Up("bg-warning rounded px-3 py-1 small mt-2 mt-md-0")("SPECIAL EVENT")),Fi("col-12 col-md mb-3 mb-md-0")([en("This livestream was part of the "),kq("")("\u{1F3AA} Student panel college fair"),en(". Recordings for all 100+ Q&A panels are available.")]),Ci("col-12 col-md-auto")(Bq("btn btn-sm btn-outline-primary px-3")(ea)({href:n})("See all recordings"))])))},Ew=function(e){var n=function(){if(e.conference.presenter instanceof S&&e.conference.guestPresenter instanceof S||e.conference.presenter instanceof S&&e.conference.guestPresenter instanceof M||e.conference.presenter instanceof M&&e.conference.guestPresenter instanceof S)return"col-12 col-md-6";if(e.conference.presenter instanceof M&&e.conference.guestPresenter instanceof M)return"col-12";throw new Error("Failed pattern match at Livestream.AboutLivestream (line 52, column 16 - line 56, column 35): "+[e.conference.presenter.constructor.name,e.conference.guestPresenter.constructor.name])}();return Fe([ya(e.conference.collegeFair)(b1e(e)),Ci("card")(Fi("card-body")([Nq("text-center mb-4")("About this livestream"),Fi("row")([Fi(n)([ga(e.conference.school)(function(a){return Ci("d-md-none")($h(a))}),y1e(e.conference)]),Fi(n)([ga(e.conference.guestPresenter)(function(a){return Wh(e.conference.id)(a)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit})}),ga(e.conference.school)(function(a){return Ci("d-none d-md-block")($h(a))}),ga(e.conference.presenter)(R1e)])])]))])};var Hq=rn(Xe),w1e=Hq($n),E1e=Fa(Ne),I1e=Nt(jr),qq=W(Kn),Iw=W(yn),T1e=Hq(ua),Tw=W(_a),Wq=Ge(te),Sw=nl(te),Cw=wv(we),Fw=Rv(we),zv=Ds(we),ml=yv(te),Gw=bv(we),Mw=pe(an),Vv=Al(te),Aw=Al(Ye),Lw=wa(te)()(),Pw=Zn(ha),S1e=Il(et),C1e=k(an),F1e=un(Vs(Vs(Ag))),G1e=Il(Qu),M1e=Il(b7),A1e=re(Hl),L1e=$t(te),P1e=Ge(we),xw=function(){function e(){}return e.value=new e,e}(),Jq=function(){function e(){}return e.value=new e,e}(),zh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$q=function(){function e(){}return e.value=new e,e}(),zq=function(){function e(){}return e.value=new e,e}(),Vq=function(e){return function(n){return function(a){var t=function(u){return w1e(E1e(I1e(u)(function(i){return qq(zq.value)})))(function(){return Iw({ctas:n.ctas,stage:Jq.value,error:M.value})})},r=function(u){if(u instanceof cl)return QU({fromConference:e.conference.id,cta:u.value0.conferenceId});if(u instanceof sl)return zU({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof vl)return VU({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof fl)return $U({fromConference:e.conference.id,ctaId:u.value0.id});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 224, column 15 - line 232, column 83): "+[u.constructor.name])};if(a instanceof zh)return t(T1e(r(a.value0))(function(){return qq($q.value)}));if(a instanceof $q)return Iw({ctas:n.ctas,error:n.error,stage:xw.value});if(a instanceof zq)return Iw({ctas:n.ctas,stage:xw.value,error:new S("That didn't work for some reason, try again")});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 207, column 24 - line 217, column 92): "+[a.constructor.name])}}},Qq=function(e){return Iw({stage:xw.value,error:M.value,ctas:e})},x1e=function(){return jo(Vo(We)([jl.value,new gt(" "),Ul.value,new gt(", "),kl.value,new gt(":"),yi.value,new gt(" "),Bl.value]))}(),Kq=function(e){return function(n){if(e.ctas.length===0)return aa;var a=function(L){return L instanceof fl?Tw(L.value0):M.value},t=function(L){return L instanceof sl?Tw(L.value0):M.value},r=function(L){return L instanceof vl?Tw(L.value0):M.value},u=function(L){return L instanceof cl?Tw(L.value0):M.value},i=function(){if(e.stage instanceof xw)return aa;if(e.stage instanceof Jq)return Wq("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Opening...");throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 186, column 24 - line 191, column 23): "+[e.stage.constructor.name])}(),l=function(L){return L.length===0?aa:Fe([Sw("")("Referrals"),Cw("table table-sm mb-0")([Fw("")([zv("")([ml("")("Title"),ml("")("Actions")])]),Gw("")(Mw(L)(function(U){return zv("t--cta t--cta-referral")([Vv("pt-3")(U.title),Aw("text-nowrap")(Lw("btn btn-white btn-sm px-4 t--open")(ea)({onClick:Pw(n)(new zh(new fl(U)))})("Launch CTA"))])}))])])},s=function(L){return L.length===0?aa:Fe([Sw("")("General"),Cw("table table-sm mb-0")([Fw("")([zv("")([ml("")("Title"),ml("")("URL"),ml("")("Link Text"),ml("")("Actions")])]),Gw("")(Mw(Ef(S1e(function(U){return U.title}))(L))(function(U){return zv("t--cta t--cta-general")([Vv("pt-3")(function(){var $=xt(U.autoDisplayMinutesFromStart);return $?"\u23F0 ":""}()+U.title),Vv("pt-3")(U.url),Vv("pt-3")(U.buttonText),Aw("text-nowrap")(Lw("btn btn-white btn-sm px-4 t--open")(ea)({onClick:Pw(n)(new zh(new sl(U)))})("Launch CTA"))])}))])])},h=function(L){return L.length===0?aa:Fe([Sw("")("Featured Service Providers"),Cw("table table-sm mb-0")([Fw("")([zv("")([ml("")("Advisors"),ml("")("Link Text"),ml("")("Actions")])]),Gw("")(Mw(L)(function(U){return zv("t--cta t--cta-featured-sp")([Vv("pt-3")(Or(", ")(C1e(function($){return $.name})(U.providers))),Vv("pt-3")(U.linkText),Aw("text-nowrap")(Lw("btn btn-white btn-sm px-4 t--open")(ea)({onClick:Pw(n)(new zh(new vl(U)))})("Launch CTA"))])}))])])},p=function(L){return L.length===0?aa:Fe([Sw("")("Upcoming events"),Cw("table table-sm mb-0")([Fw("")([zv("")([ml("")("Livestream"),ml("")("Date & Time"),ml("")("Actions")])]),Gw("")(Mw(Ef(F1e(G1e(function(U){return U.startTime}))(M1e(function(U){return U.conferenceId})))(L))(function(U){return zv("t--cta t--cta-stream-"+A1e(U.conferenceId))([Vv("pt-3")(U.title),Vv("pt-3")(x1e(U.startTime)+(" "+a_)),Aw("text-nowrap")(Lw("btn btn-white btn-sm px-4 t--open")(ea)({onClick:Pw(n)(new zh(new cl(U)))})("Launch CTA"))])}))])])},y=Xr(a)(e.ctas),E=Xr(t)(e.ctas),b=Xr(r)(e.ctas),T=Xr(u)(e.ctas);return Fe([L1e("")("Calls to action"),P1e("t--ctas position-relative")([ga(e.error)(function(L){return Wq("alert alert-danger")(L)}),p(T),s(E),h(b),l(y),i])])}};var Yq=ql(Cc(Tc)),Xq=ne(ua),N1e=WC(de),Op=function(){function e(){}return e.value=new e,e}(),Vh=function(){function e(){}return e.value=new e,e}(),Qh=function(){function e(){}return e.value=new e,e}(),Zq={eq:function(e){return function(n){return e instanceof Op&&n instanceof Op||e instanceof Vh&&n instanceof Vh||e instanceof Qh&&n instanceof Qh}}},eW=Yq("profile_validate_username_path")(function(e){return function(n){return Xq(e({username:n}))(Sc(function(a){return N1e("username validation result")(a)(function(t){return t==="available"?new S(Op.value):t==="taken"?new S(Vh.value):t==="invalid"?new S(Qh.value):M.value})}))}}),nW=Yq("profile_set_username_path")(function(e){return function(n){return Xq(e({username:n}))(tr)}});var j1e=Ee(Qt(Kc()(Yl(Yl(Qc)()({reflectSymbol:function(){return"username"}})(Bt))()({reflectSymbol:function(){return"result"}})(Zq)))),hM=Ge(we),aW=Ge(Ye),U1e=Jt(te),O1e=Ii()(),Kh=Ge(te),k1e=Jr()(),B1e=Zn(Yu),tW=wa(te)()(),H1e=Zn(ha),q1e=Zi(gv(Yi)),DM=rn(Xe)($n),W1e=or(yn),gM=Fa(Ne),J1e=ii(Ca),I_=W(yn),$1e=k(Ca),z1e=ne(ua),V1e=Gf(jr),rW=W(Kn),oW=function(){function e(){}return e.value=new e,e}(),uW=function(){function e(){}return e.value=new e,e}(),iW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cW=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),sW=function(){function e(){}return e.value=new e,e}(),vW=function(){function e(){}return e.value=new e,e}(),RM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yM=function(){function e(){}return e.value=new e,e}(),fW=function(e){return function(n){var a=e.username!==""&&Ct(e.updating)&&j1e(e.validated)(new S({username:e.username,result:Op.value}));return Fe([hM("row")([aW("col col-md-6")(U1e("")("This username will keep your identity private in CollegeVine communities, livestreams, and on peer essay review leaderboards.")),aW("col-6 d-none d-md-block")(O1e("img-fluid")({src:"/img/illustrations/clipboards.svg"}))]),Kh("")("Your username:"),hM("input-group")([k1e("form-control")({autoFocus:!0,type:"text",value:e.username,onChange:B1e(n)(function(t){return Pe.create(iW.create(xs(t)))})})]),hM("d-flex mt-3")([tW("btn btn-light mr-3")(ea)({onClick:H1e(n)(new wn(yM.value))})("Cancel"),tW("btn btn-primary t--submit-username")(ea)({type:"button",disabled:!a,onClick:q1e(n)(function(){return a?new S(new Pe(sW.value)):M.value}())})("Save")]),ga(e.validated)(function(t){if(t.result instanceof Op)return aa;if(t.result instanceof Vh)return Kh("small text-danger")("Sorry, this username is already taken");if(t.result instanceof Qh)return Kh("small text-danger")("Usernames can only contain letters, numbers, or these symbols: _ - . with no spaces");throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 73, column 37 - line 79, column 121): "+[t.result.constructor.name])}),ga(e.updating)(function(t){if(t instanceof oW)return Kh("text-success")("Updating your username...");if(t instanceof uW)return Kh("small text-danger")("There was an error saving your username. Please try again.");throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 80, column 30 - line 84, column 95): "+[t.constructor.name])})])}},_W=function(e){return function(n){if(n instanceof Pe){if(n.value0 instanceof iW)return DM(W1e(n.value0.value0!=="")(gM(J1e(Xt(100))(new Pe(new lW(n.value0.value0))))))(function(){return I_({updating:e.updating,validated:e.validated,username:n.value0.value0})});if(n.value0 instanceof lW){if(n.value0.value0===e.username)return DM(gM($1e(function(){var a=cW.create(n.value0.value0);return function(t){return Pe.create(a(t))}}())(eW(n.value0.value0))))(function(){return I_({username:e.username,validated:M.value,updating:M.value})});if($e)return I_(e)}if(n.value0 instanceof cW)return I_({updating:e.updating,username:e.username,validated:new S({username:n.value0.value0,result:n.value0.value1})});if(n.value0 instanceof sW)return DM(gM(z1e(V1e(nW(e.username)))(function(a){if(a instanceof Oe)return rW(new wn(new RM(e.username)));if(a instanceof xe)return rW(new Pe(vW.value));throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 112, column 7 - line 116, column 48): "+[a.constructor.name])})))(function(){return I_({username:e.username,validated:M.value,updating:new S(oW.value)})});if(n.value0 instanceof vW)return I_({username:e.username,validated:e.validated,updating:new S(uW.value)});throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 93, column 31 - line 120, column 48): "+[n.value0.constructor.name])}if(n instanceof wn)return I_(e);throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 92, column 1 - line 92, column 55): "+[e.constructor.name,n.constructor.name])}},pW=function(e){return{username:e,validated:M.value,updating:M.value}};var Q1e=Zr(),K1e=Lp(Ye)()(),Y1e=Ba(we),X1e=Za(te),Z1e=function(e){var n=jm(e);return function(){return function(a){return function(t){var r=Q1e(a);return K1e({placement:Rw,overlay:Fe(n(t)),overlayStyle:Ja(r.overlayStyle)(st({width:"15rem"}))})(Y1e("d-inline-flex align-items-center text-secondary "+r.className)([X1e("d-inline-block fe fe-help-circle "+function(){var u=r.anchorText==="";return u?"":"mr-2"}())(""),en(r.anchorText)]))}}}},Nw=function(e){var n=Z1e(e)();return function(a){return n({className:a,anchorText:""})}};var bM=function(e){return e};var eEe=function(e){return e},dW=function(e){var n=Ze(e),a=eEe(e.Eq0());return{compare:function(t){return function(r){return E2(n(t)(r))}},Eq0:function(){return a}}};var mW=jn(Nn),Yh=xn(mW)(Mn(Gn)),hW=Ln(An),Xh=Pn(hW),DW=kn(On),Zh=Un(DW),nEe=k(oe),kp=function(){function e(){}return e.value=new e,e}(),Bp=function(){function e(){}return e.value=new e,e}(),Hp=function(){function e(){}return e.value=new e,e}(),qp=function(){function e(){}return e.value=new e,e}(),Wp=function(){function e(){}return e.value=new e,e}(),T_=function(){function e(){}return e.value=new e,e}(),aEe={to:function(e){if(e instanceof be)return kp.value;if(e instanceof ve&&e.value0 instanceof be)return Bp.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof be)return Hp.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof ve&&e.value0.value0.value0 instanceof be)return qp.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof ve&&e.value0.value0.value0 instanceof ve&&e.value0.value0.value0.value0 instanceof be)return Wp.value;if(e instanceof ve&&e.value0 instanceof ve&&e.value0.value0 instanceof ve&&e.value0.value0.value0 instanceof ve&&e.value0.value0.value0.value0 instanceof ve)return T_.value;throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])},from:function(e){if(e instanceof kp)return new be(Be.value);if(e instanceof Bp)return new ve(new be(Be.value));if(e instanceof Hp)return new ve(new ve(new be(Be.value)));if(e instanceof qp)return new ve(new ve(new ve(new be(Be.value))));if(e instanceof Wp)return new ve(new ve(new ve(new ve(new be(Be.value)))));if(e instanceof T_)return new ve(new ve(new ve(new ve(new ve(Be.value)))));throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])}},gW=Bn(aEe)(Yh(Yh(Yh(Yh(Yh(mW)(hW))(Xh))(Xh))(Xh))(Xh))(Zh(Zh(Zh(Zh(Zh(DW))))))(Xh);var tEe={eq:function(e){return function(n){return e instanceof kp&&n instanceof kp||e instanceof Bp&&n instanceof Bp||e instanceof Hp&&n instanceof Hp||e instanceof qp&&n instanceof qp||e instanceof Wp&&n instanceof Wp||e instanceof T_&&n instanceof T_}}},jw=function(e){if(e instanceof kp)return"student";if(e instanceof Bp)return"transfer_student";if(e instanceof Hp)return"counselor";if(e instanceof qp)return"iec";if(e instanceof Wp)return"parent";if(e instanceof T_)return"sem_user";throw new Error("Failed pattern match at Common.Persona (line 39, column 13 - line 45, column 24): "+[e.constructor.name])},RW=function(){var e=Cn(jw)(gW);return ta(nn)({parse:function(n){return n==="unknown"?new S(M.value):nEe(S.create)(e(n))},default:M.value,diagnosticName:"User Persona"})}(),yW=function(e){if(e instanceof kp)return"Student";if(e instanceof Bp)return"Transfer Student";if(e instanceof Hp)return"High School Counselor";if(e instanceof qp)return"Independent Educational Counselor (IEC)";if(e instanceof Wp)return"Parent";if(e instanceof T_)return"SEM User";throw new Error("Failed pattern match at Common.Persona (line 29, column 11 - line 35, column 24): "+[e.constructor.name])},bW=function(){return Tf(tEe)(T_.value)(gW)}();function wW(){typeof fbq!="undefined"&&fbq("trackCustom","LivestreamRegistrationComplete")}var rEe=W(ft),oEe=_s(ts(!1));var Uw=function(e){if(_s(ac(oEe)))return rEe(ge);if($e)return wW;throw new Error("Failed pattern match at Livestream.Upcoming.Register.Tracking (line 16, column 1 - line 16, column 53): "+[e.constructor.name])};var wM=k(Dr);var EM=ne(Au),uEe=W(Zs),iEe=Co(X2);var EW=function(e){return e},IW=function(e){return function(n){return wM(function(a){return a.result})(e({substring:n,position:0}))}};var Pc={map:function(e){return function(n){var a=wM(function(t){return{result:e(t.result),suffix:t.suffix}});return function(t){return a(n(t))}}}},S_=function(e){return function(n){return new xe({pos:n.position,error:e})}},C_={apply:function(e){return function(n){return function(a){return EM(e(a))(function(t){return EM(n(t.suffix))(function(r){return uEe({result:t.result(r.result),suffix:r.suffix})})})}}},Functor0:function(){return Pc}};var Ns={bind:function(e){return function(n){return function(a){return EM(e(a))(function(t){return EW(n(t.result))(t.suffix)})}}},Apply0:function(){return C_}};var js={pure:function(e){return function(n){return new Oe({result:e,suffix:n})}},Apply0:function(){return C_}};var lEe={Applicative0:function(){return js},Bind1:function(){return Ns}},TW={tailRecM:function(e){return function(n){var a=function(t){if(t.result instanceof Kt)return new Kt({state:t.result.value0,str:t.suffix});if(t.result instanceof Wt)return new Wt({result:t.result.value0,suffix:t.suffix});throw new Error("Failed pattern match at StringParser.Parser (line 87, column 5 - line 87, column 68): "+[t.constructor.name])};return function(t){return iEe(function(r){return wM(a)(EW(e(r.state))(r.str))})({state:n,str:t})}}},Monad0:function(){return lEe}};var F_={alt:function(e){return function(n){return function(a){var t=e(a);if(t instanceof xe){if(a.position===t.value0.pos)return n(a);if($e)return new xe({error:t.value0.error,pos:t.value0.pos})}return t}}},Functor0:function(){return Pc}},cEe={empty:S_("No alternative"),Alt0:function(){return F_}},SW={Applicative0:function(){return js},Plus1:function(){return cEe}};var CW=da(F_),IM=ne(Ns),TM=W(js),sEe=k(Pc);var vEe=vo(C_),fEe=Yn(C_);var SM=function(e){return function(n){return CW(e)(S_(n))}},CM=function(e){return function(n){var a=e(n);return a instanceof xe?new xe({pos:n.position,error:a.value0.error}):a}},xc=function(e){return CW(IM(e)(function(n){return TM(ge)}))(TM(ge))};var FW=function(e){return function(n){return new ju(e,n)}};var _Ee=function(e){return function(n){var a=e(n);if(a instanceof Oe){var t=n.position<a.value0.suffix.position;return t?new Oe(a.value0):new xe({pos:n.position,error:"Consumed no input."})}return a}},G_=function(){var e=pT(TW)(SW);return function(n){return e(_Ee(n))}}(),GW=function(e){return fEe(sEe(FW)(e))(G_(e))};var MW=function(e){return function(n){return IM(e)(function(a){return IM(G_(vEe(n)(e)))(function(t){return TM(FW(a)(t))})})}};var AW=ne(Ns);var LW=W(js),PW=re(Ud);var dEe=re(on);var xW=function(e){return 0<Xo(e.substring)?new xe({pos:e.position,error:"Expected EOF"}):new Oe({result:ge,suffix:e})};var mEe=function(e){var n=Qf(e.substring);if(n instanceof M)return new xe({pos:e.position,error:"Unexpected EOF"});if(n instanceof S)return new Oe({result:n.value0.head,suffix:{substring:n.value0.tail,position:e.position+1|0}});throw new Error("Failed pattern match at StringParser.CodePoints (line 72, column 3 - line 74, column 103): "+[n.constructor.name])};var hEe=function(){var e=function(n){return S_("Code point "+(dEe(n)+" is not a character"))};return AW(pe(Pc)(mEe)(Jn(Dc)))(function(n){var a=wy(n);if(a instanceof S){var t=n>65535;return t?e(n):LW(a.value0)}if(a instanceof M)return e(n);throw new Error("Failed pattern match at StringParser.CodePoints (line 57, column 3 - line 65, column 27): "+[a.constructor.name])})}(),Qv=function(e){return CM(AW(hEe)(function(n){var a=e(n);return a?LW(n):S_("Character "+(PW(n)+" did not satisfy predicate"))}))},Gi=function(e){return SM(Qv(function(n){return n===e}))("Could not match character "+PW(e))};var DEe=function(e,n,a){var t=0,r;return function(u){if(t===2)return r;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,r=a(),t=2,r}},gEe=Ft(),FM=k(Pc),REe=gr(cR)(bt),yEe=k(vT),bo=rn(Xe)(Ns),nu=Tt(Pc),Us=W(js),ni=da(F_);var Jp=vo(C_),Kv=ne(Ns),NW=gr(Mo)(bt);var Ir=function(e){return gEe(wy(e))},GM=function(e){return FM(function(){var n=yEe(Uu);return function(a){return REe(n(a))}}())(GW(Qv(e)))},jW=function(e){return bo(nu(e))(function(){return bo(nu(Ow(e)))(function(){return Us(ge)})})},Ow=function(e){return ni(jW(e))(Us(ge))},UW=function(e){return bo(nu(Qv(e)))(function(){return bo(nu(Ow(Qv(e))))(function(){return Us(ge)})})},bEe=Gi(Ir(0));var OW=Gi(` `),kW=function(e){return e===" "||e===" "},wEe=Qv(kW),MM=UW(kW),EEe=function(e){var n=e>="0"&&e<="9",a=e>="a"&&e<="z"||e>="A"&&e<="Z";return n||a},Nc=function(e){return function(n){return function(a){return a>=e&&a<=n}}},IEe=Nc(Ir(33))(Ir(126)),TEe=Qv(IEe),AM=function(e){return function(n){return is(Uu(n))(e)}},kw=function(e){return Nc(Ir(1))(Ir(8))(e)||Nc(Ir(14))(Ir(31))(e)||AM("\v\f\x7F")(e)},SEe=function(e){return Nc(Ir(33))(Ir(39))(e)||Nc(Ir(42))(Ir(91))(e)||Nc(Ir(93))(Ir(126))(e)||kw(e)},CEe=function(e){return Nc(Ir(33))(Ir(90))(e)||Nc(Ir(94))(Ir(126))(e)||kw(e)},FEe=Qv(kw),GEe=function(e){return AM(Uu(Ir(33)))(e)||Nc(Ir(35))(Ir(91))(e)||Nc(Ir(93))(Ir(126))(e)||kw(e)};var BW=Gi("\r"),HW=nu(Jp(BW)(OW)),$p=function(){var e=jW(Jp(HW)(MM)),n=Jp(MM)(xc(Jp(HW)(MM)));return ni(n)(e)}(),qW=function(){var e=bo(nu(Gi("\\")))(function(){return ni(TEe)(ni(wEe)(ni(OW)(ni(BW)(ni(FEe)(bEe)))))});return Kv(e)(function(n){return Us("\\"+Uu(n))})}(),MEe=ni(GM(GEe))(qW),AEe=function(){var e=bo(nu(Gi('"')))(function(){return Kv(G_(Jp(xc($p))(MEe)))(function(n){return bo(nu(xc($p)))(function(){return bo(nu(Gi('"')))(function(){return Us(n)})})})});return FM(function(n){return'"'+(NW(n)+'"')})(e)}(),WW=DEe("comment","Text.Email.Parser",function(){return bo(nu(Gi("(")))(function(){return bo(Ow(ni(UW(SEe))(ni(nu(qW))(ni(WW(155))($p)))))(function(){return bo(nu(Gi(")")))(function(){return Us(ge)})})})}),LEe=WW(152),Bw=Ow(ni(LEe)($p)),PEe=bo(xc(Bw))(function(){return bo(nu(Gi("[")))(function(){return Kv(G_(Jp(xc($p))(GM(CEe))))(function(e){return bo(xc($p))(function(){return bo(nu(Gi("]")))(function(){return bo(xc(Bw))(function(){return Us("["+(NW(e)+"]"))})})})})})}),xEe=function(){var e=function(n){return EEe(n)||AM("!#$%&'*+/=?^_`{|}~-")(n)};return GM(e)}(),JW=function(){var e=bo(nu(xc(Bw)))(function(){return Kv(ni(xEe)(AEe))(function(a){return bo(nu(xc(Bw)))(function(){return Us(a)})})}),n=MW(e)(Gi("."));return FM(cu(cR)(bt)("."))(n)}(),NEe=ni(JW)(PEe),jEe=JW,LM=Kv(jEe)(function(e){return Kv(Gi("@"))(function(){return Kv(NEe)(function(n){return Kv(xW)(function(){return Us({localPart:e,domainPart:n})})})})});var OEe=function(e){return IW(LM)(e)},kEe=function(){var e=_r(Lu)(re(pf()()(mf({reflectSymbol:function(){return"error"}})(hf({reflectSymbol:function(){return"pos"}})(on))(Ht))));return function(n){return e(OEe(n))}}(),eD=function(e){var n=kEe(e);if(n instanceof xe)return!1;if(n instanceof Oe)return!0;throw new Error("Failed pattern match at Text.Email.Validate (line 35, column 5 - line 37, column 25): "+[n.constructor.name])};var PM=mo(te),Hw=Jr()(),BEe=Zn(Yu),$W=ny(we)()(),zW=pe(oe),VW=Zi(zR(Yi)),QW=k(oe),qw=ay(te)()(),KW=pe(an),nD=Ge(we),HEe=wF(),xM=re(on),qEe=zI(We)(it),WEe=Tv(we)()(),M_=Ge(Ye),YW=wa(te)()(),JEe=Zn(ha),$Ee=Wr(yu),zEe=re(Hl),aD=W(yn),XW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ZW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),eJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),aJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zp=function(e){return function(n){return function(a){return function(t){var r=function(p){return function(y){return function(E){return function(b){return function(T){return function(L){return Fe([PM("")(y),Hw("form-control")({type:"text",name:"livestream_public_registration_form["+(p+"]"),value:b,placeholder:E,autoFocus:L.autoFocus,onChange:BEe(t)(function(U){return T(xs(U))})})])}}}}}},u=[PM("")("I'm a..."),$W("form-control")({name:"livestream_public_registration_form[i_am_a]",value:ze("")(zW(a.persona)(jw)),onChange:VW(t)(function(p){return QW(aJ.create)(RW(XG(p)))})})([ya(Ct(a.persona))(qw("")({value:""})("Select one...")),Fe(KW(bW)(function(p){return qw("")({value:jw(p)})(yW(p))}))])],i=nD("d-flex align-items-center")([en("Already have an account? "),HEe({text:"Log in",className:"btn btn-link px-2",auth0ActiveTab:Eb,openInNewTab:!1})]),l=[PM("")("Graduation year"),$W("form-control")({name:"livestream_public_registration_form[high_school_graduation_year]",value:ze("")(zW(a.gradYear)(xM)),onChange:VW(t)(function(p){return QW(nJ.create)(ic(XG(p)))})})([ya(Ct(a.gradYear))(qw("")({value:""})("Select one...")),Fe(KW(n.allowedGradYears)(function(p){return qw("")({value:xM(p)})(xM(p))}))])],s=ze({path:"",token:""})(rb("livestreams_register_path")),h=qEe([eD(a.email),a.firstName!=="",a.lastName!=="",xt(a.gradYear),xt(a.persona)]);return Fe([i,WEe("")({action:s.path,method:"POST"})([M_("row")(M_("col")(r("email")("Email")("Your email")(a.email)(XW.create)({autoFocus:e.autoFocus}))),M_("row mt-3")(M_("col")(r("first_name")("First name")("Your first name")(a.firstName)(ZW.create)({autoFocus:!1}))),M_("row mt-3")(M_("col")(r("last_name")("Last name")("Your last name")(a.lastName)(eJ.create)({autoFocus:!1}))),nD("row mt-3")([nD("col-6")(l),nD("col-6")(u)]),M_("row mt-3")(nD("col-12")([YW("btn btn-primary w-100 mt-3 t--register")(ea)({type:"submit",disabled:!h,onClick:JEe(Uw)(ge)})("Register"),ga(e.cancelButton)(function(p){return YW("btn btn-outline-primary w-100 mt-3 t--cancel-registration")(ea)({type:"button",onClick:$Ee(p.click)})(p.text)})])),Hw("")({type:"hidden",name:"authenticity_token",value:s.token}),Hw("")({type:"hidden",name:"register_for_conference_id",value:zEe(n.conference.id)}),Hw("")({type:"hidden",name:"utm_cv_source",value:n.paths.utmSource})])])}}}},Vp=function(e){return function(n){if(n instanceof XW)return aD({firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,email:n.value0});if(n instanceof ZW)return aD({email:e.email,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,firstName:n.value0});if(n instanceof eJ)return aD({email:e.email,firstName:e.firstName,gradYear:e.gradYear,persona:e.persona,lastName:n.value0});if(n instanceof nJ)return aD({email:e.email,firstName:e.firstName,lastName:e.lastName,persona:e.persona,gradYear:new S(n.value0)});if(n instanceof aJ)return aD({email:e.email,firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:new S(n.value0)});throw new Error("Failed pattern match at Livestream.Register.Anonymous (line 172, column 16 - line 182, column 36): "+[n.constructor.name])}},Qp=function(){return{email:"",firstName:"",lastName:"",gradYear:M.value,persona:M.value}}();var tJ=Ge(we),VEe=Nw(te),QEe=oo(te)()(),Kp=function(e){return Fe([tJ("")([en(` For college information sessions, we may tell the college that you attended. You can opt out anytime in your profile. `),VEe("")(` The only information we may share with colleges when you attend their events includes your name, email, graduation year, and whether you\u2019re a student, parent, or school counselor. `)]),tJ("")([en(` By completing this registration form you agree to CollegeVine\u2019s Website Terms and Conditions, which can be found `),QEe("")(lr("Open terms and conditions"))({href:e.paths.termsAndConditions})("here"),en(".")])])};var NM={eq:function(e){return function(n){return e===n}}};var Os=rn(Xe)($n),KEe=Xu(Ne),rJ=La(),YEe=Ei(rJ(H({reflectSymbol:function(){return"author"}})(rJ(H({reflectSymbol:function(){return"cvid"}})(de)(H({reflectSymbol:function(){return"username"}})(de)(ln))))(H({reflectSymbol:function(){return"id"}})(cn)(H({reflectSymbol:function(){return"isFromHQ"}})(Sa)(H({reflectSymbol:function(){return"isPublic"}})(Sa)(H({reflectSymbol:function(){return"text"}})(de)(H({reflectSymbol:function(){return"time"}})(de)(ln))))))))(Ne),Yp=Fa(Ne),Ww=W(Kn),Tr=W(yn),jM=Jl(),XEe=Jt(we),UM=Ba(te),OM=mo(te),ZEe=Za(te),A_=Ge(we),Xp=Ge(Ye),Jw=Ko(te)()(),Zp=Zn(ha),tD=Ge(te),oJ=$t(te),uJ=pe(an),eIe=zt(we)()(),nIe=Ba(we),iJ=ne(tn),aIe=Y0()(),tIe=Zn(Yu),rIe=Zi(gv(Yi)),oIe=Ev(we),uIe=Jr()(),iIe=Nw(te),lIe=Ee(Qt(Bt)),cIe=pe(oe),lJ=Jo(dW(uu(Qu))),sIe=Bo(NM),cJ=k(Ca),vIe=un(St),fIe=rc(We)(NM),sJ=lt(br(Ca)),vJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fJ=function(){function e(){}return e.value=new e,e}(),_J=function(){function e(){}return e.value=new e,e}(),L_=function(){function e(){}return e.value=new e,e}(),$w=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zw=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Vw=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dJ=function(){function e(){}return e.value=new e,e}(),kM=function(){function e(){}return e.value=new e,e}(),BM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mJ=function(){function e(){}return e.value=new e,e}(),hJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HM=function(){function e(){}return e.value=new e,e}(),Qw=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Kw=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DJ=function(){function e(){}return e.value=new e,e}(),ed=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rD=function(){function e(){}return e.value=new e,e}();var gJ=function(e){return Os(KEe(function(n){return Pe.create(BM.create(r_(n)))})(YEe(e.pusher.dataChannel)("question")))(function(){return Os(Yp(Ww(new Pe(mJ.value))))(function(){return Tr({newQuestionText:"",newQuestionBroadcast:!1,questions:[],modal:L_.value})})})},RJ=function(e){if(e.user instanceof M)return new S(new Pe(HM.value));if(e.user instanceof S&&e.user.value0.username instanceof M)return new S(new Pe(DJ.value));if(e.user instanceof S&&e.user.value0.username instanceof S)return M.value;throw new Error("Failed pattern match at Livestream.Live.Questions (line 356, column 3 - line 362, column 14): "+[e.user.constructor.name])},_Ie=function(){return jo(Vo(We)([kl.value,new gt(":"),yi.value,new gt(" "),Bl.value]))}(),yJ=function(e){return function(n){return function(a){var t=function(s){return a(Pe.create(s))},r=function(s){return jM({onDismiss:t(rD.value),body:Fe([XEe("")([UM("")("By: "),OM("")("@"+s.author.username)]),ZEe("")(s.text),Ll(""),A_("row align-items-center mb-3")([Xp("col-4")(Jw("btn w-100 btn-"+function(){return s.isPublic?"secondary":"success"}())({onClick:Zp(t)(new Kw(fJ.value))})(function(){return s.isPublic?"Hide from audience":"Show to audience"}())),tD("col")(function(){return s.isPublic?"This question will no longer be visible to the public, but HQ people will still see it.":"This question will become visible to the audience, even anonymous users."}())]),A_("row align-items-center")([Xp("col-4")(Jw("btn w-100 btn-danger")({onClick:Zp(t)(new Kw(_J.value))})("Ban this user")),A_("col")([en("This user will not be able to ask any more questions "),OM("")("in this livestream. "),UM("text-danger")("There is no way to un-ban a user!")])])]),bodyClass:"t--question-modal",footer:Fe([Jw("btn btn-outline-primary px-4")({onClick:Zp(t)(rD.value)})("Never mind, close this dialog")])})},u=function(s){return jM({onDismiss:t(rD.value),title:oJ("")("Please introduce yourself to participate:"),bodyClass:"t--questions-registration-form",body:Fe([zp({cancelButton:M.value,autoFocus:!0})(e)(s)(function(h){return t(Qw.create(h))}),Xp("small mt-3")(Kp(e))])})},i=function(s){return jM({onDismiss:t(rD.value),title:oJ("")("Please select a user name"),body:fW(s)(function(h){return t(ed.create(h))}),bodyClass:"t--username-modal"})},l=function(s){var h=function(y){return function(E){return function(b){return Fe([tD("ml-2 badge badge-"+E)(y),ga(b)(function(T){return tD("ml-2 text-secondary")(_Ie(T))})])}}},p=s.isFromHQ&&s.isPublic;return p?h("CollegeVine")("success")(s.time):s.isPublic?h("Question")("warning")(M.value):aa};return Fe([Xp("position-relative h-100")(Xp("d-flex flex-column position-absolute-fullsize")(A_("d-flex flex-column flex-grow-1 min-height-0")([A_("flex-grow-1 min-height-0 overflow-y-auto bg-white border rounded mb-2 p-2 t--questions-list")(uJ(n.questions)(function(s){return eIe("p-1 t--question"+function(){return e.isPrivilegedUser?" cursor-pointer":""}())({onClick:Zp(t)(new Kw(new vJ(s)))})([nIe("small d-inline-flex align-items-center")([OM("")("@"+s.author.username),l(s),en(":")]),UM("ml-1")(s.text)])})),A_("")([ga(iJ(e.user)(function(s){return s.username}))(function(s){return tD("small text-secondary mt-2")("@"+s)}),aIe("form-control t--question-text")({onChange:tIe(t)(function(s){return pJ.create(yw(s))}),onClick:rIe(a)(RJ(e)),placeholder:"Ask a question...",rows:1,value:n.newQuestionText}),ya(e.isPrivilegedUser)(Xp("form-check my-2")(oIe("form-check-label d-flex align-items-center t--broadcast-checkbox")([uIe("form-check-input mr-2 mt-0")({type:"checkbox",checked:n.newQuestionBroadcast,onChange:Zp(t)(dJ.value)}),tD("badge badge-info bg-info text-dark mr-2")("HQ"),en("Send to all viewers")]))),A_("d-flex justify-content-end align-items-center")([iIe("large mr-2")(` Questions you ask will only be visible to you and the host unless they select it to read to the audience, at which point it will appear with a yellow \u201CQuestion\u201D tag for all viewers to see. `),Jw("mt-2 px-5 btn-sm btn btn-primary t--submit-question")({onClick:Zp(t)(kM.value),disabled:n.newQuestionText===""})(function(){return n.newQuestionBroadcast?"Send to all":"Send to host"}())])])]))),function(){if(n.modal instanceof L_)return aa;if(n.modal instanceof zw)return u(n.modal.value0);if(n.modal instanceof $w)return r(n.modal.value0);if(n.modal instanceof Vw)return i(n.modal.value0);throw new Error("Failed pattern match at Livestream.Live.Questions (line 139, column 5 - line 143, column 41): "+[n.modal.constructor.name])}()])}}},pIe=function(e){return function(n){return lIe(cIe(e.user)(function(a){return a.cvid}))(new S(n.author.cvid))||n.isPublic||e.isPrivilegedUser}},bJ=function(e){return function(n){return function(a){if(a instanceof wn)return Tr(n);if(a instanceof Pe){if(a.value0 instanceof pJ){var t=RJ(e);if(t instanceof S)return Os(Yp(Ww(t.value0)))(function(){return Tr(n)});if(t instanceof M)return Tr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,questions:n.questions,newQuestionText:a.value0.value0});throw new Error("Failed pattern match at Livestream.Live.Questions (line 243, column 5 - line 248, column 46): "+[t.constructor.name])}if(a.value0 instanceof dJ)return Tr({modal:n.modal,newQuestionText:n.newQuestionText,questions:n.questions,newQuestionBroadcast:!n.newQuestionBroadcast});var t=function(r){if(a.value0 instanceof kM)return Os(Yp(Ww(new Pe(HM.value))))(function(){return Tr(n)});if(a.value0 instanceof BM)return Tr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:lJ(function(l){return bM(function(s){return s.time}(l))})($o(pIe(e))(zo(a.value0.value0)($o(function(){var l=sIe(a.value0.value0.id);return function(s){return l(function(h){return h.id}(s))}}())(n.questions))))});if(a.value0 instanceof mJ)return Os(Yp(cJ(function(l){return Pe.create(hJ.create(l))})(sb(e.conference.id))))(function(){return Tr(n)});if(a.value0 instanceof hJ){var u=uJ(a.value0.value0)(function(l){return l.id});return Tr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:lJ(function(l){return bM(function(s){return s.time}(l))})(vIe(a.value0.value0)($o(function(l){return fIe(l.id)(u)})(n.questions)))})}if(a.value0 instanceof HM)return Tr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new zw(Qp)});var i=function(l){if(a.value0 instanceof Qw)return Tr(n);if(a.value0 instanceof DJ)return Tr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new Vw(pW(ze("")(iJ(e.user)(function(h){return h.username}))))});if(a.value0 instanceof ed&&a.value0.value0 instanceof wn&&a.value0.value0.value0 instanceof RM)return Os(Yp(Ww(new wn(a.value0.value0.value0.value0))))(function(){return Tr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:L_.value})});if(a.value0 instanceof ed&&a.value0.value0 instanceof wn&&a.value0.value0.value0 instanceof yM)return Tr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:L_.value});var s=function(h){if(a.value0 instanceof ed&&$e)return Tr(n);if(a.value0 instanceof rD)return Tr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:L_.value});if(a.value0 instanceof Kw){if(e.isPrivilegedUser){if(a.value0.value0 instanceof vJ)return Tr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new $w(a.value0.value0.value0)});var p=function(y){var E=function(b){return Tr(n)};return a.value0.value0 instanceof _J&&n.modal instanceof $w?Os(Xa(ZU({conferenceId:e.conference.id,userCvid:n.modal.value0.author.cvid})))(function(){return Tr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:L_.value})}):E(!0)};return a.value0.value0 instanceof fJ&&n.modal instanceof $w?Os(Xa(WU({questionId:n.modal.value0.id,isPublic:!n.modal.value0.isPublic})))(function(){return Tr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:L_.value})}):p(!0)}if($e)return Tr(n)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 239, column 1 - line 239, column 76): "+[a.value0.constructor.name])};return a.value0 instanceof ed&&n.modal instanceof Vw?sJ(function(h){return Pe.create(ed.create(h))})(function(h){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new Vw(h)}})(_W(n.modal.value0)(a.value0.value0)):s(!0)};return a.value0 instanceof Qw&&n.modal instanceof zw?sJ(function(l){return Pe.create(Qw.create(l))})(function(l){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new zw(l)}})(Vp(n.modal.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof kM&&e.user instanceof S?Os(Yp(cJ(function(r){return Pe.create(BM.create(r))})(JU({conferenceId:e.conference.id,text:n.newQuestionText,hqBroadcast:n.newQuestionBroadcast}))))(function(){return Tr({modal:n.modal,questions:n.questions,newQuestionText:"",newQuestionBroadcast:!1})}):t(!0)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 239, column 1 - line 239, column 76): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}};var Yw,dIe=new Uint8Array(16);function qM(){if(!Yw&&(Yw=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Yw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yw(dIe)}var wJ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function mIe(e){return typeof e=="string"&&wJ.test(e)}var WM=mIe;var Uo=[];for(Xw=0;Xw<256;++Xw)Uo.push((Xw+256).toString(16).substr(1));var Xw;function hIe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(Uo[e[n+0]]+Uo[e[n+1]]+Uo[e[n+2]]+Uo[e[n+3]]+"-"+Uo[e[n+4]]+Uo[e[n+5]]+"-"+Uo[e[n+6]]+Uo[e[n+7]]+"-"+Uo[e[n+8]]+Uo[e[n+9]]+"-"+Uo[e[n+10]]+Uo[e[n+11]]+Uo[e[n+12]]+Uo[e[n+13]]+Uo[e[n+14]]+Uo[e[n+15]]).toLowerCase();if(!WM(a))throw TypeError("Stringified UUID is invalid");return a}var EJ=hIe;function DIe(e,n,a){e=e||{};var t=e.random||(e.rng||qM)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){a=a||0;for(var r=0;r<16;++r)n[a+r]=t[r];return n}return EJ(t)}var JM=DIe;var IJ=JM;var gIe=function(e){return e},$M=function(e){return e};var zM=ne(er)(IJ)(function(){var e=W(ft);return function(n){return e(gIe(n))}}());var nd=Fa(Ne),TJ=rn(Xe),RIe=TJ(ua),yIe=un(bR),bIe=k(Ca),oD=Rn(Ne),wIe=Za(te),EIe=Ii()(),SJ=zt(Ye)()(),CJ=Nd(Qu),IIe=So(ur),TIe=Jn(gu),SIe=re(Dx),FJ=re(df),CIe=k(an),jc=TJ($n),FIe=Xu(Ne),GIe=Ei(La()(H({reflectSymbol:function(){return"authorTag"}})(de)(H({reflectSymbol:function(){return"kind"}})(de)(ln))))(Ne),Zw=k(Hn),Yv=W(yn),GJ=rt(O0),MJ=xd(Qu),MIe=W(Kn),VM=dc(j0),AIe=Ge(we),LIe=pe(an),PIe=wa(we)()(),xIe=Zn(ha),NIe=Ba(te),e1=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),uD=function(){function e(n,a){this.value0=n,this.value1=a}return e.create=function(n){return function(a){return new e(n,a)}},e}(),AJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),QM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),KM=function(e){return nd(RIe(Xt(yIe(e)(10)))(function(){return bIe(QM.create)(oD(Zu))}))},LJ=50,PJ=function(e){var n=function(r){return wIe("text-white fe fe-"+r)("")},a=function(){if(e instanceof Cs)return n("heart");if(e instanceof jv)return n("thumbs-up");if(e instanceof o_)return n("thumbs-down");if(e instanceof Uv)return n("file-text");if(e instanceof Ov)return EIe("")({src:"/img/icons/smile-white.svg",style:st({width:"1em"})});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 152, column 12 - line 157, column 108): "+[e.constructor.name])}(),t=function(){if(e instanceof Cs)return"#F0747B";if(e instanceof jv)return"#008CFD";if(e instanceof o_)return"#6E84A3";if(e instanceof Uv)return"#18A668";if(e instanceof Ov)return"#F6C343";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 159, column 23 - line 164, column 34): "+[e.constructor.name])}();return SJ("d-flex justify-content-center align-items-center rounded-circle")({style:st({backgroundColor:t,height:"1.5rem",width:"1.5rem"})})(a)},xJ=6,NJ=function(){return xJ*1e3}(),jJ=function(e){return function(n){var a=function(t){if(CJ(t.removeAt)(e.currentTime))return aa;var r=Mt(IIe(TIe(Ki(GT(t.startDecayAt))))(10)),u=function(){var p=r<=3;if(p)return"linear";var y=r<=7;return y?"ease-in":"ease"}(),i=t.reaction.authorTag===e.authorTag,l=1+(r-5)/4,s=CJ(t.startDecayAt)(e.currentTime),h=xJ+(r-5)/10;return SJ("position-absolute mb-4 mt-2")({key:SIe(t.startDecayAt),style:st({right:FJ(l)+"rem",top:function(){return s?"0":"90%"}(),opacity:function(){return s?0:i?1:.6}(),transitionProperty:"top opacity",transitionDuration:FJ(h)+"s",transitionTimingFunction:u})})(PJ(t.reaction.kind))};return Fe(CIe(a)(e.reactions))}},UJ=function(e){return jc(FIe(function(n){return new uD(P7(n),M.value)})(GIe(e.pusher.dataChannel)("reaction")))(function(){return jc(nd(oD(Zw(function(n){return AJ.create($M(n))})(zM))))(function(){return jc(nd(oD(Zw(QM.create)(Zu))))(function(){return Yv({authorTag:"",currentTime:GJ,coolDownUntil:GJ,reactions:[]})})})})},OJ=800,kJ=function(e){return function(n){return function(a){if(a instanceof e1&&a.value1 instanceof M)return jc(nd(oD(Zw(function(){var t=e1.create(a.value0);return function(r){return t(S.create(r))}}())(Zu))))(function(){return Yv(n)});if(a instanceof e1&&a.value1 instanceof S){if(MJ(n.coolDownUntil)(a.value1.value0))return jc(nd(MIe(new uD({kind:a.value0,authorTag:n.authorTag},new S(a.value1.value0)))))(function(){return Yv(n)});if($e)return jc(Xa(KU(e.conference.id)({authorTag:n.authorTag,kind:a.value0})))(function(){return jc(KM(OJ))(function(){return Yv({authorTag:n.authorTag,currentTime:n.currentTime,reactions:n.reactions,coolDownUntil:ze(a.value1.value0)(VM(OJ)(a.value1.value0))})})})}if(a instanceof uD&&a.value1 instanceof M)return jc(nd(oD(Zw(function(){var t=uD.create(a.value0);return function(r){return t(S.create(r))}}())(Zu))))(function(){return Yv(n)});if(a instanceof uD&&a.value1 instanceof S)return jc(KM(LJ))(function(){return jc(KM(NJ))(function(){var t={reaction:a.value0,startDecayAt:ze(a.value1.value0)(VM(LJ)(a.value1.value0)),removeAt:ze(a.value1.value0)(VM(NJ)(a.value1.value0))};return Yv({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:R0(n.reactions)(t),currentTime:a.value1.value0})})});if(a instanceof AJ)return Yv({coolDownUntil:n.coolDownUntil,currentTime:n.currentTime,reactions:n.reactions,authorTag:a.value0});if(a instanceof QM)return Yv({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:$o(function(t){return MJ(t.removeAt)(a.value0)})(n.reactions),currentTime:a.value0});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 170, column 22 - line 213, column 8): "+[a.constructor.name])}}},BJ=function(e){return function(n){var a=function(t){if(t instanceof Cs)return"love this";if(t instanceof jv)return"helpful";if(t instanceof o_)return"not helpful";if(t instanceof Uv)return"taking notes";if(t instanceof Ov)return"LOL";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 138, column 13 - line 143, column 30): "+[t.constructor.name])};return AIe("d-flex justify-content-end my-2")(LIe([Cs.value,Ov.value,jv.value,Uv.value])(function(t){return PIe("btn bg-light d-flex align-items-center p-0 ml-3")(lr(a(t)))({onClick:xIe(n)(new e1(t,M.value)),style:st({borderRadius:"1em"})})([PJ(t),NIe("d-none d-md-inline text-secondary small ml-2 mr-3")(a(t))])}))}};var HJ=rn(Xe),jIe=ne(ua),YM=Rn(Ne),n1=W(Kn),a1=Jt(te),t1=re(on),iD=HJ($n),lD=Fa(Ne),hl=W(yn),qJ=Nt(jr),WJ=vo(Em),JJ=k(Ca),UIe=qo(yn)(Pu),OIe=Ku(ss),$J=Ge(te),kIe=Wl(),BIe=$t(te),zJ=wa(te)()(),XM=Zn(ha),VJ=Ge(Ye),HIe=wa(we)()(),qIe=Za(te),WIe=Ge(we),QJ=function(){function e(){}return e.value=new e,e}(),KJ=function(){function e(){}return e.value=new e,e}(),YJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),XJ=function(){function e(){}return e.value=new e,e}(),ZJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),e$=function(){function e(){}return e.value=new e,e}(),n$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ZM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),a$=function(){function e(){}return e.value=new e,e}(),t$=function(){function e(){}return e.value=new e,e}(),eA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),r1=function(){function e(){}return e.value=new e,e}(),r$=HJ(ua)(Xt(1e3))(function(){return jIe(YM(Zu))(function(e){return n1(new eA(e))})}),JIe=function(e){return{header:"Go on-air?",body:Fe([a1("")("Are you sure you want to go on-air?"),a1("mb-0 font-weight-bold fw-bold")(` Watchers will start seeing your stream in `+(t1(e.videoLagSeconds)+` seconds if you confirm. If you're presenting with Zoom, make sure you've gone "live" on Zoom as well. `))]),confirmText:"Confirm, go on-air!",cancelText:"Cancel",confirmMsg:XJ.value}},o$=function(e){return function(n){return function(a){return function(t){return iD(lD(r$))(function(){return hl({confirmation:n.confirmation,network:QJ.value,streamStatus:t,transition:new S({since:a,secondsLeft:e.videoLagSeconds})})})}}}},u$=function(e){return function(n){return function(a){if(a instanceof XJ)return iD(lD(qJ(WJ(UU(e.conference.id))(JJ(ZJ.create)(YM(Zu))))(function(l){return n1(new nA("Error opening the stream. Please try again."))})))(function(){return hl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:KJ.value})});if(a instanceof ZJ)return o$(e)(n)(a.value0)(zr.value);if(a instanceof e$)return iD(lD(qJ(WJ(OU(e.conference.id))(JJ(n$.create)(YM(Zu))))(function(l){return n1(new nA("Error closing the stream. Please try again."))})))(function(){return hl(n)});if(a instanceof n$)return o$(e)(n)(a.value0)(wr.value);if(a instanceof ZM)return hl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:new S(a.value0)});if(a instanceof a$)return iD(UIe(n.confirmation)(function(l){return lD(n1(l.confirmMsg))}))(function(){return hl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:M.value})});if(a instanceof t$)return hl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:M.value});if(a instanceof nA)return hl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:new YJ(a.value0)});var t=function(l){if(a instanceof eA||a instanceof r1)return hl(n);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 180, column 1 - line 180, column 76): "+[a.constructor.name])};if(a instanceof eA){if(n.transition instanceof S){var r=OIe(a.value0)(n.transition.value0.since),u=e.videoLagSeconds-po(r)|0,i=u>0;return i?iD(lD(r$))(function(){return hl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:new S({since:n.transition.value0.since,secondsLeft:u})})}):hl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:M.value})}return t(!0)}return t(!0)}}},i$=function(e){return hl({streamStatus:e.streamStatus,transition:M.value,network:QJ.value,confirmation:M.value})},$Ie=function(){return{header:"End the stream?",body:Fe([a1("")("Are you sure you want to end the stream?"),a1("mb-0 font-weight-bold fw-bold")("You won't be able to restart it again!")]),confirmText:"Yes, end it",cancelText:"No, keep streaming",confirmMsg:e$.value}}(),l$=function(e){return function(n){return function(a){var t=function(){return n.network instanceof KJ?$J("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching..."):aa}(),r=function(h){return kIe({header:BIe("my-0")(h.header),bodyClass:"p-5",body:h.body,footerClass:"p-4",footer:Fe([zJ("btn btn-primary px-4")(ea)({onClick:XM(a)(a$.value)})(h.confirmText),zJ("btn btn-outline-primary px-4")(ea)({onClick:XM(a)(t$.value)})(h.cancelText)])})},u=function(h){return function(p){return function(y){return function(E){return function(b){return VJ("col-auto pr-0")(HIe("btn btn-"+(h+(" px-5 d-flex align-items-center font-size-lg btn-"+E)))(ea)({onClick:XM(a)(b)})([qIe("fe mr-2 fe-"+p)(""),en(y)]))}}}}},i=function(){if(n.streamStatus instanceof bu)return u("lg")("power")("GO ON-AIR")("outline-secondary")(new ZM(JIe(e)));var h=function(p){if(n.streamStatus instanceof zr)return Fe([u("lg")("radio")("ON AIR")("success")(r1.value),u("sm")("x-circle")("End stream")("outline-danger")(new ZM($Ie))]);if(n.streamStatus instanceof wr)return u("lg")("slash")("STREAM IS OVER")("outline-secondary")(r1.value);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 70, column 1 - line 70, column 71): "+[n.streamStatus.constructor.name])};return n.streamStatus instanceof zr&&n.transition instanceof S?u("lg")("radio")("ON AIR")("success")(r1.value):h(!0)}(),l=function(h){return $J("alert small m-0 flex-grow-1 alert-"+h)},s=function(){if(n.network instanceof YJ)return l("danger")(n.network.value0);if(n.streamStatus instanceof bu)return l("warning")("The stream has not been started yet. To start, click the big 'GO ON-AIR' button on the left.");var h=function(p){if(n.streamStatus instanceof zr)return l("light")(` We're live. The audience should see your video with a `+(t1(e.videoLagSeconds)+`-second delay. If you don't see your face above (give it a few seconds), it means you're not streaming. `));var y=function(E){if(n.streamStatus instanceof wr)return l("light")("The stream has ended. The audience does not see any video right now.");throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 70, column 1 - line 70, column 71): "+[n.streamStatus.constructor.name,n.network.constructor.name])};return n.streamStatus instanceof wr&&n.transition instanceof S?l("info")("You may stop presenting now. The audience will keep seeing the tail of the stream for another "+(t1(n.transition.value0.secondsLeft)+" seconds.")):y(!0)};return n.streamStatus instanceof zr&&n.transition instanceof S?l("info")("Start presenting now. The audience will see the stream in "+(t1(n.transition.value0.secondsLeft)+" seconds...")):h(!0)}();return WIe("position-relative row align-items-center t--stream-controls")([i,VJ("col")(s),t,ga(n.confirmation)(r)])}}};var zIe=dc(vv),c$=Ku(vv),s$=_8(),VIe=Jl(),QIe=$t(te),KIe=Ge(te),v$=Jt(te),YIe=Ko(te)()(),XIe=Zn(ha),f$=Fa(Ne),_$=rn(Xe),p$=k(Ca),d$=Rn(Ne),m$=_$($n),ZIe=su(We)(ut),aA=W(yn),tA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rA=function(){function e(){}return e.value=new e,e}(),eTe=[30,15,5,0],h$=function(e){return ze(e.conference.scheduledStartTime)(zIe(Mt(e.conference.duration))(e.conference.scheduledStartTime))},D$=function(e){return function(n){return function(a){if(!n.modal)return aa;if(n.now instanceof M)return aa;if(n.now instanceof S){var t=h$(e),r=c$(t)(n.now.value0),u=function(){if(r<1)return" ended "+s$({from:t,to:n.now.value0,format:Ty("ago")});if($e)return" ends "+s$({from:n.now.value0,to:t,format:Ty("from now")});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 68, column 7 - line 70, column 105): "+[])}();return VIe({onDismiss:a(rA.value),body:Fe([QIe("mb-0")("Host-only warning"),KIe("text-secondary mb-4")("You see this because you're the host. The audience doesn't see this."),v$("font-weight-bold fw-bold")("\u23F0 Scheduled stream time "+u),v$("")(` You have `+(ll(e.conference.tailTime)("extra minute")("extra minutes")+` after scheduled stream end, in case you absolutely cannot wrap up before then. After that the video streaming will be terminated. `)),YIe("btn btn-primary px-4")({onClick:XIe(a)(rA.value)})("Got it")])})}throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 44, column 1 - line 44, column 71): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},nTe=f$(_$(ua)(Xt(60100))(function(){return p$(tA.create)(d$(t_))})),g$=function(e){return function(n){return function(a){if(a instanceof tA)return m$(nTe)(function(){var t=c$(h$(e))(a.value0),r=ZIe(po(t))(eTe);return aA({now:new S(a.value0),modal:n.modal||r})});if(a instanceof rA)return aA({now:n.now,modal:!1});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 73, column 22 - line 84, column 33): "+[a.constructor.name])}}},R$=function(){return m$(f$(p$(tA.create)(d$(t_))))(function(){return aA({modal:!1,now:M.value})})}();var y$=rn(Xe),aTe=y$(ua),b$=W(Kn),tTe=y$($n),rTe=Fa(Ne),oTe=Nt(jr),o1=W(yn),uTe=Ee(nh),w$=Vo(We),oA=Ge(we),u1=Za(te),iTe=wa(te)()(),E$=Zn(ha),lTe=oo(te)()(),cTe=wa(Ye)()(),sTe=Wl(),I$=Ge(Ye),vTe=mo(te),fTe=hc(te)()(),_Te=Ba(te),T$=function(){function e(){}return e.value=new e,e}(),S$=function(){function e(){}return e.value=new e,e}(),uA=function(){function e(){}return e.value=new e,e}(),C$=function(){function e(){}return e.value=new e,e}(),F$=function(){function e(){}return e.value=new e,e}(),G$=function(){function e(){}return e.value=new e,e}(),M$=function(){function e(){}return e.value=new e,e}(),pTe=function(){function e(){}return e.value=new e,e}(),A$=function(e){return function(n){return function(a){var t=aTe(lb({fromConference:new S(e.conference.id),registerForConference:n.cta.conferenceId,utmSource:e.paths.utmSource}))(function(){return b$(new Pe(G$.value))});if(a instanceof F$)return tTe(rTe(oTe(t)(function(r){return b$(new Pe(M$.value))})))(function(){return o1({cta:n.cta,stage:S$.value})});if(a instanceof G$)return o1({cta:n.cta,stage:C$.value});if(a instanceof M$)return o1({cta:n.cta,stage:uA.value});throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 135, column 24 - line 145, column 44): "+[a.constructor.name])}}},L$=function(e){return function(n){return uTe(e.cta.conferenceId)(n.conferenceId)}},P$=function(e){return o1({cta:e,stage:T$.value})},dTe=function(){return jo(w$([Ol.value,new gt(", "),jl.value,new gt(" "),Ul.value,new gt(" at "),kl.value,new gt(":"),yi.value,new gt(" "),Bl.value]))}(),mTe=function(){return jo(w$([Ol.value]))}(),x$=function(e){return function(n){return function(a){var t=function(){return n.stage instanceof uA?oA("text-danger small mt-2")([u1("fe fe-x-circle mr-2")(""),en("Something went wrong. Please try again.")]):aa}(),r=function(h){return a(Pe.create(h))},u=function(){if(e.user instanceof S)return iTe("btn btn-primary px-4 t--register-one-click")(lr("Register for this livestream"))({onClick:E$(r)(F$.value)})("Register (one-click)");if(e.user instanceof M)return lTe("btn btn-primary px-4 t--register-new-tab")(lr("Register for this livestream"))({href:n.cta.registrationPath,target:"_blank",rel:"noopener"})("Register now");throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 86, column 22 - line 96, column 25): "+[e.user.constructor.name])}(),i=function(){if(n.stage instanceof T$||n.stage instanceof uA)return u;if(n.stage instanceof S$)return oA("text-secondary")([u1("fe fe-refresh-cw mr-2")(""),en("Hold on tight...")]);if(n.stage instanceof C$)return oA("text-success")([u1("fe fe-check-circle mr-2")(""),en("You\u2019ve registered \u2013\xA0see you "+(mTe(n.cta.startTime)+"!"))]);throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 70, column 36 - line 84, column 10): "+[n.stage.constructor.name])}(),l=function(h){return a(wn.create(h))},s=cTe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(lr("Close"))({onClick:E$(l)(pTe.value)})(u1("fe fe-x")(""));return sTe({body:Fe([I$("row justify-content-end mt-n3")(s),vTe("")("Join us for our upcoming livestream:"),fTe("mt-3")({id:wi})(n.cta.title),_Te("small")(dTe(n.cta.startTime)+(" "+a_)),I$("row mt-6 ml-0")(i),t]),bodyClass:"t--cta-active",size:ch.value})}}};var hTe=Wl(),i1=Ge(we),DTe=ry(te)()(),l1=Ge(Ye),gTe=wa(Ye)()(),N$=Zn(ha),RTe=Za(te),yTe=pe(an),bTe=el()(),wTe=$r(te),ETe=Jt(te),ITe=oo(te)()(),TTe=rn(Xe),STe=TTe($n),CTe=Fa(Ne),FTe=Rn(Ne),GTe=Gs(Rr)(),MTe=re(on),j$=W(yn),ATe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),U$=function(){function e(){}return e.value=new e,e}(),O$=function(e){return function(n){var a=function(){var i=fo(e.cta.providers);return i===1?kv.value:i===2?kv.value:sh.value}(),t=function(i){return n(Pe.create(i))},r=function(i){return n(wn.create(i))},u=function(){var i=fo(e.cta.providers);return i===1?"col-12":i===2?"col-12 col-md-6 mb-3 mb-md-0":"col-12 col-md-4 mb-3 mb-md-0"}();return hTe({bodyClass:"bg-gray-900 text-white t--cta-active",body:Fe([i1("row no-gutters g-0 mb-4")([i1("col text-center")([DTe("mb-2")({id:wi})("The admissions process is hard - advisors are here to help!"),en("Schedule a free consultation to get your questions answered")]),l1("col-auto text-right")(gTe("btn btn-link p-0 m-0 text-white")(lr("Close"))({onClick:N$(r)(U$.value)})(RTe("fe fe-x")("")))]),i1("row text-center")(yTe(e.cta.providers)(function(i){return i1(u)([l1("row mb-3")(l1("col-auto mx-auto")(l1("avatar avatar-xl")(bTe("avatar-img rounded-circle img-fluid")({src:i.avatarUrl})))),wTe("mb-2")(i.name),ETe("mb-3")(i.location),ITe("btn btn-primary btn-sm px-3 py-1")(ea)({target:"_blank",href:i.linkUrl,onClick:N$(t)(new ATe(i.avatarUrl))})(e.cta.linkText)])}))]),size:a})}},k$=function(e){return function(n){return STe(CTe(FTe(function(){return GTe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:MTe(e.cta.id),livestream_cta_url:n.value0})(),new wn(U$.value)})))(function(){return j$(e)})}},B$=function(e){return function(n){return e.cta.id===n.id}},H$=function(e){return j$({cta:e})};var LTe=oo(te)()(),q$=Zn(ha),PTe=wa(Ye)()(),xTe=Za(te),NTe=Wl(),W$=Ge(Ye),jTe=hc(te)()(),UTe=rn(Xe),OTe=UTe($n),kTe=Fa(Ne),BTe=Rn(Ne),HTe=Gs(Rr)(),qTe=re(on),J$=W(yn),WTe=function(){function e(){}return e.value=new e,e}(),$$=function(){function e(){}return e.value=new e,e}(),z$=function(e){return function(n){var a=function(i){return n(Pe.create(i))},t=LTe("btn btn-primary px-4 t--register-new-tab")(ea)({href:e.cta.url,target:"_blank",rel:"noopener",onClick:q$(a)(WTe.value)})(e.cta.buttonText),r=function(i){return n(wn.create(i))},u=PTe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(lr("Close"))({onClick:q$(r)($$.value)})(xTe("fe fe-x")(""));return NTe({body:Fe([W$("row justify-content-end mt-n3")(u),jTe("mt-3")({id:wi})(e.cta.title),W$("row mt-6 ml-0")(t)]),bodyClass:"t--cta-active",size:ch.value})}},V$=function(e){return function(n){return OTe(kTe(BTe(function(){return HTe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:qTe(e.cta.id),livestream_cta_title:e.cta.title,livestream_cta_url:e.cta.url})(),new wn($$.value)})))(function(){return J$(e)})}},Q$=function(e){return function(n){return e.cta.id===n.id}},K$=function(e){return J$({cta:e})};var iA=rn(Xe),ai=iA(tn),ti=xr(Yr),ad=W(_a),Y$=Gr(Ho(it)),cD=da(Kr),ks=W(yn),JTe=iA($n),$Te=Fa(Ne),zTe=iA(ua),VTe=W(Kn),lA=Ge(we),QTe=Ev(te),KTe=Jr()(),YTe=Zn(Yu),XTe=wa(Ye)()(),X$=Zn(ha),ZTe=Za(te),eSe=Wl(),cA=Ge(Ye),nSe=hc(te)()(),aSe=Jt(te),tSe=wa(te)()(),Z$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ez=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),az=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),tz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oz=function(){function e(){}return e.value=new e,e}(),uz=function(){function e(){}return e.value=new e,e}(),iz=function(e){return function(n){return e.cta.id===n.id}},lz=function(e){return function(n){var a=ai(ti(n.cta.requireReferredUserLastName))(function(){return ai(ti(n.referredUserLastName===""))(function(){return ad("Please enter the other person\u2019s last name")})}),t=ai(ti(n.cta.requireReferredUserFirstName))(function(){return ai(ti(n.referredUserFirstName===""))(function(){return ad("Please enter the other person\u2019s first name")})}),r=ai(ti(Y$(eD)(n.referredUserEmail)))(function(){return ad("Please enter a valid email address")}),u=ai(ti(Ct(e.user)))(function(){return ai(ti(n.cta.requireAnonymousUserLastName))(function(){return ai(ti(n.anonymousUserLastName===""))(function(){return ad("Please enter your last name")})})}),i=ai(ti(Ct(e.user)))(function(){return ai(ti(n.cta.requireAnonymousUserFirstName))(function(){return ai(ti(n.anonymousUserFirstName===""))(function(){return ad("Please enter your first name")})})}),l=ai(ti(Ct(e.user)))(function(){return ai(ti(n.cta.requireAnonymousUserEmail))(function(){return ai(ti(Y$(eD)(n.anonymousUserEmail)))(function(){return ad("Please enter a valid email address")})})});return cD(i)(cD(u)(cD(l)(cD(t)(cD(a)(r)))))}},cz=function(e){return function(n){return function(a){if(a instanceof Z$)return ks({anonymousUserEmail:n.anonymousUserEmail,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserFirstName:a.value0});if(a instanceof ez)return ks({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserLastName:a.value0});if(a instanceof nz)return ks({anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,anonymousUserEmail:a.value0});if(a instanceof az)return ks({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,referredUserFirstName:a.value0});if(a instanceof tz)return ks({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,validationActive:n.validationActive,referredUserLastName:a.value0});if(a instanceof rz)return ks({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:n.validationActive,referredUserEmail:a.value0});if(a instanceof oz){var t=Ct(lz(e)(n));return t?JTe($Te(zTe(kU({ctaId:n.cta.id,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,anonymousUserEmail:n.anonymousUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,referredUserEmail:n.referredUserEmail}))(function(){return VTe(new wn(uz.value))})))(function(){return ks(n)}):ks({anonymousUserEmail:n.anonymousUserEmail,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,cta:n.cta,referredUserEmail:n.referredUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,validationActive:!0})}throw new Error("Failed pattern match at Livestream.Ctas.Display.Referral (line 141, column 24 - line 170, column 45): "+[a.constructor.name])}}},sz=function(e){return function(n){return function(a){var t=lz(e)(n),r=function(E){return function(b){return function(T){return function(L){return function(U){return lA(E)([QTe("mb-2")(T),KTe("form-control "+b)({type:"text",value:L,onChange:YTe(a)(function($){return Pe.create(U(xs($)))})})])}}}}},u=ya(Ct(e.user)&&n.cta.requireAnonymousUserEmail)(r("col-12 mb-3")("t--anon-email")("Your email")(n.anonymousUserEmail)(nz.create)),i=ya(Ct(e.user))(Fe([ya(n.cta.requireAnonymousUserFirstName)(r("col-12 col-md-6 mb-3")("t--anon-first-name")("Your first name")(n.anonymousUserFirstName)(Z$.create)),ya(n.cta.requireAnonymousUserLastName)(r("col-12 col-md-6 mb-3")("t--anon-last-name")("Your last name")(n.anonymousUserLastName)(ez.create))])),l=r("col-12 mb-3")("t--referred-email")("Other person\u2019s email")(n.referredUserEmail)(rz.create),s=Fe([ya(n.cta.requireReferredUserFirstName)(r("col-12 col-md-6 mb-3")("t--referred-first-name")("Other person\u2019s first name")(n.referredUserFirstName)(az.create)),ya(n.cta.requireReferredUserLastName)(r("col-12 col-md-6 mb-3")("t--referred-last-name")("Other person\u2019s last name")(n.referredUserLastName)(tz.create))]),h=function(E){return a(Pe.create(E))},p=function(E){return a(wn.create(E))},y=XTe("btn btn-sm btn-outline-primary d-flex py-1 px-2 t--close")(lr("Close"))({onClick:X$(p)(uz.value)})(ZTe("fe fe-x")(""));return eSe({body:Fe([cA("row justify-content-end mt-n3")(y),nSe("mt-3")({id:wi})(n.cta.title),ga(n.cta.description)(aSe("")),lA("row")([i,u,s,l]),lA("row")([cA("col-auto my-auto")(tSe("btn btn-primary t--save")(ea)({onClick:X$(h)(oz.value)})("Save")),cA("col my-auto text-danger")(ya(n.validationActive)(ga(t)(en)))])]),bodyClass:"t--cta-active",size:kv.value})}}},vz=function(e){return ks({cta:e,anonymousUserFirstName:"",anonymousUserLastName:"",anonymousUserEmail:"",referredUserFirstName:"",referredUserLastName:"",referredUserEmail:"",validationActive:!1})};var rSe=Fa(Ne),oSe=W(Kn),Xv=lt(br(Ca)),c1=rn(Xe)($n),sD=W(yn),vD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_D=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),s1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),v1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),f1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uSe=function(){function e(){}return e.value=new e,e}(),fz=function(e){return function(n){return function(a){var t=function(r){return a(Pe.create(r))};if(n instanceof vD)return x$(e)(n.value0)(function(r){return t(s1.create(r))});if(n instanceof fD)return O$(n.value0)(function(r){return t(v1.create(r))});if(n instanceof _D)return z$(n.value0)(function(r){return t(f1.create(r))});if(n instanceof pD)return sz(e)(n.value0)(function(r){return t(_1.create(r))});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 58, column 29 - line 66, column 61): "+[n.constructor.name])}}},_z=function(e){return function(n){return function(a){var t=rSe(oSe(new wn(uSe.value)));if(n instanceof vD&&a instanceof s1){if(a.value0 instanceof Pe)return Xv(function(r){return Pe.create(s1.create(r))})(vD.create)(A$(e)(n.value0)(a.value0.value0));if(a.value0 instanceof wn)return c1(t)(function(){return sD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 73, column 5 - line 78, column 19): "+[a.value0.constructor.name])}if(n instanceof fD&&a instanceof v1){if(a.value0 instanceof Pe)return Xv(function(r){return Pe.create(v1.create(r))})(fD.create)(k$(n.value0)(a.value0.value0));if(a.value0 instanceof wn)return c1(t)(function(){return sD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 81, column 5 - line 87, column 19): "+[a.value0.constructor.name])}if(n instanceof _D&&a instanceof f1){if(a.value0 instanceof Pe)return Xv(function(r){return Pe.create(f1.create(r))})(_D.create)(V$(n.value0)(a.value0.value0));if(a.value0 instanceof wn)return c1(t)(function(){return sD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 90, column 5 - line 95, column 19): "+[a.value0.constructor.name])}if(n instanceof pD&&a instanceof _1){if(a.value0 instanceof Pe)return Xv(function(r){return Pe.create(_1.create(r))})(pD.create)(cz(e)(n.value0)(a.value0.value0));if(a.value0 instanceof wn)return c1(t)(function(){return sD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 98, column 5 - line 104, column 19): "+[a.value0.constructor.name])}return sD(n)}}},pz=function(e){return function(n){return e instanceof vD&&n instanceof cl?L$(e.value0)(n.value0):e instanceof _D&&n instanceof sl?Q$(e.value0)(n.value0):e instanceof fD&&n instanceof vl?B$(e.value0)(n.value0):e instanceof pD&&n instanceof fl?iz(e.value0)(n.value0):!1}},dz=function(e){if(e instanceof cl)return Xv(function(n){return Pe.create(s1.create(n))})(vD.create)(P$(e.value0));if(e instanceof vl)return Xv(function(n){return Pe.create(v1.create(n))})(fD.create)(H$(e.value0));if(e instanceof sl)return Xv(function(n){return Pe.create(f1.create(n))})(_D.create)(K$(e.value0));if(e instanceof fl)return Xv(function(n){return Pe.create(_1.create(n))})(pD.create)(vz(e.value0));throw new Error("Failed pattern match at Livestream.Ctas.Display (line 46, column 8 - line 55, column 66): "+[e.constructor.name])};var mz=$t(te),p1=Ge(we),iSe=mo(te),lSe=hc(te)()(),hz=oc(rv),cSe=Ev(we),sSe=Jr()(),sA=su(We)(ut),vA=Zn(ha),Dz=wa(te)()(),vSe=Rp(Ye),fSe=Rn(Ne),_Se=Fs(Rr),pSe=Ou(),dSe=re(on),P_=W(yn),mSe=Tf(ut),x_=rn(Xe)($n),hSe=Nt(jr),fA=W(Kn),DSe=qo(Kn)(We),gSe=or(Kn),gz=Fa(Ne),RSe=lt(br(Ca)),td=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_A=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pA=function(){function e(){}return e.value=new e,e}(),Rz=function(){function e(){}return e.value=new e,e}(),dA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yz=function(e){return function(n){return function(a){var t=Fe([mz("text-center")("The host just asked a poll question!"),mz("text-center")("To participate in live polls, please introduce yourself:"),zp({cancelButton:new S({text:"Not now",click:a(new td({keepShowingPolls:!1}))}),autoFocus:!0})(e)(n.registration)(function(i){return a(dA.create(i))}),p1("small mt-3")([Kp(e),p1("mt-2")([en("After submitting, you\u2019ll be able to answer all "),iSe("")("future"),en(" poll questions in this stream!")])])]),r=Fe([lSe("font-weight-bold fw-bold")({id:wi})(n.poll.question),p1("d-flex flex-column ml-4")(hz(function(i){return function(l){return cSe("form-check-label mb-2")([sSe("form-check-input mt-2 t--option")({checked:sA(i)(n.selected),onChange:vA(a)(new _A(i)),type:function(){return n.poll.multiSelect?"checkbox":"radio"}()}),en(l)])}})(n.poll.options)),p1("d-flex justify-content-start mt-6")([Dz("btn btn-primary px-4 mr-3 t--submit")(ea)({onClick:vA(a)(pA.value),disabled:vi(n.selected)})("Submit answer"),Dz("btn btn-outline-primary px-4 d-flex align-items-center t--skip")(ea)({onClick:vA(a)(Rz.value)})("Do it later")])]),u=function(){if(e.user instanceof S)return"t--poll-active";if(e.user instanceof M)return"t--poll-registration-form";throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 55, column 18 - line 57, column 45): "+[e.user.constructor.name])}();return vSe(u)(function(){if(e.user instanceof S)return r;if(e.user instanceof M)return t;throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 51, column 5 - line 53, column 34): "+[e.user.constructor.name])}())}}},bz=function(e){return function(n){return function(a){var t=function(r){return fSe(_Se("Livestream: Poll Response")(cs(Nv(e.conference))(pSe({livestream_poll_id:dSe(n.poll.id),livestream_poll_question:n.poll.question,livestream_poll_skipped:function(){return r.skipped?"true":""}(),livestream_poll_multiselect:function(){return n.poll.multiSelect?"true":"false"}(),livestream_poll_response:r.option}))))};if(a instanceof td)return P_(n);if(a instanceof _A&&n.poll.multiSelect)return P_({poll:n.poll,registration:n.registration,selected:function(){var r=sA(a.value0)(n.selected);return r?mSe(a.value0)(n.selected):zo(a.value0)(n.selected)}()});if(a instanceof _A)return P_({poll:n.poll,registration:n.registration,selected:[a.value0]});if(a instanceof pA&&vi(n.selected))return P_(n);if(a instanceof pA)return x_(Xa(hSe(zC(n.poll)(n.selected))(function(r){return xl(gc)("Error answering a Livestream poll")({poll_id:n.poll.id})(function(u){return fA(ge)})})))(function(){return x_(Xa(DSe(hz(function(r){return function(u){return{idx:r,opt:u}}})(n.poll.options))(function(r){return gSe(sA(r.idx)(n.selected))(t({skipped:!1,option:r.opt}))})))(function(){return x_(gz(fA(new td({keepShowingPolls:!0}))))(function(){return P_(n)})})});if(a instanceof Rz)return x_(Xa(zC(n.poll)([])))(function(){return x_(Xa(t({skipped:!0,option:""})))(function(){return x_(gz(fA(new td({keepShowingPolls:!0}))))(function(){return P_(n)})})});if(a instanceof dA)return RSe(dA.create)(function(r){return{poll:n.poll,selected:n.selected,registration:r}})(Vp(n.registration)(a.value0));throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 109, column 24 - line 156, column 55): "+[a.constructor.name])}}},wz=function(e){return x_(Xa(BU(e)))(function(){return P_({poll:e,selected:[],registration:Qp})})};var Ez=rn(Xe),ySe=Ez(ua),bSe=ne(ua),Iz=Rn(Ne),wSe=qo(Kn)(Pu),ESe=Fs(Rr),Tz=Ou(),ISe=re(u0),TSe=re(Hl),d1=re(on),Dl=W(yn),Sz=br(Ca),Cz=lt(Sz),Fz=ne($n),Gz=_r(Sz),Zv=Ez($n),SSe=Ee(ut),ef=W(_a),dD=oy(Ne),mD=k(oe),CSe=k(Gu),hD=av(We),mA=La(),Mz=Ei(mA(H({reflectSymbol:function(){return"poll_id"}})(cn)(ln)))(Ne),FSe=Xu(Ne),GSe=Ee(Qt(nh)),MSe=Ei(mA(H({reflectSymbol:function(){return"conference_id"}})(cn)(ln)))(Ne),hA=Ee(Qt(ut)),DA=Ei(mA(H({reflectSymbol:function(){return"id"}})(cn)(ln)))(Ne),DD=function(){function e(){}return e.value=new e,e}(),rd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),od=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),m1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),h1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ud=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Az=function(e){return function(n){return function(a){if(n.stage instanceof DD)return aa;if(n.stage instanceof rd)return yz(e)(n.stage.value0)(function(t){return a(od.create(t))});if(n.stage instanceof gD)return fz(e)(n.stage.value0)(function(t){return a(m1.create(t))});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 90, column 3 - line 96, column 59): "+[n.stage.constructor.name])}}},ASe=function(e){return function(n){return e instanceof gD?pz(e.value0)(n):!1}},LSe=function(){return function(e){return function(n){return function(a){return ySe(Xt(100))(function(){return bSe(Iz(My(wi)))(function(t){return wSe(t)(function(r){return Iz(function(){var i=CF(nC(r))(),l=P8({x:i.left+1,y:i.top+1})(),s=TF(nC(l))();return ESe(n)(cs(Tz(a))(cs(Nv(e.conference))(Tz({livestream_popup_visible:ISe(s===wi)}))))()})})})})}}}},Lz=LSe(),PSe=function(e){var n=function(){return Lz(e)("Livestream: CTA Popup Shown")},a=n();return function(t){if(t instanceof cl)return a({livestream_cta_target_conference_id:TSe(t.value0.conferenceId)});if(t instanceof vl)return a({livestream_cta_id:d1(t.value0.id)});if(t instanceof sl)return a({livestream_cta_id:d1(t.value0.id),livestream_cta_title:t.value0.title,livestream_cta_url:t.value0.url});if(t instanceof fl)return a({livestream_cta_id:d1(t.value0.id),livestream_cta_title:t.value0.title});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 150, column 29 - line 167, column 8): "+[t.constructor.name])}},Pz=function(e){return function(n){return function(a){if(a instanceof od&&a.value0 instanceof td)return Dl({stage:DD.value,showPolls:a.value0.value0.keepShowingPolls});var t=function(r){if(a instanceof od)return Dl(n);if(a instanceof m1){if(a.value0 instanceof wn)return Dl({showPolls:n.showPolls,stage:DD.value});var u=function(s){return Dl(n)};return a.value0 instanceof Pe&&n.stage instanceof gD?Cz(m1.create)(function(s){return{showPolls:n.showPolls,stage:new gD(s)}})(_z(e)(n.stage.value0)(a.value0.value0)):u(!0)}var u=function(l){if(a instanceof h1&&n.showPolls)return Fz(Gz(od.create)(wz(a.value0)))(function(p){return Zv(Xa(Lz(e)("Livestream: Poll Popup Shown")({livestream_poll_id:d1(a.value0.id)})))(function(){return Dl({showPolls:n.showPolls,stage:new rd(p)})})});if(a instanceof h1)return Dl(n);var s=function(p){if(a instanceof gA||a instanceof ud&&ASe(n.stage)(a.value0))return Dl(n);if(a instanceof ud)return Zv(Xa(PSe(e)(a.value0)))(function(){return Fz(Gz(m1.create)(dz(a.value0)))(function(y){return Dl({showPolls:n.showPolls,stage:new gD(y)})})});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 98, column 1 - line 98, column 76): "+[a.constructor.name])};if(a instanceof gA){if(n.stage instanceof rd){var h=n.stage.value0.poll.id===a.value0.pollId;return h?Dl({showPolls:n.showPolls,stage:DD.value}):s(!0)}return s(!0)}return s(!0)};if(a instanceof h1){if(n.stage instanceof rd){var i=n.stage.value0.poll.id===a.value0.id;return i?Dl(n):u(!0)}return u(!0)}return u(!0)};return a instanceof od&&n.stage instanceof rd?Cz(od.create)(function(r){return{showPolls:n.showPolls,stage:new rd(r)}})(bz(e)(n.stage.value0)(a.value0)):t(!0)}}},xz=function(e){var n=function(u){return u instanceof fl?ef(u.value0.id):M.value},a=function(u){return u instanceof vl?ef(u.value0.id):M.value},t=function(u){return u instanceof sl?ef(u.value0.id):M.value},r=function(u){return u instanceof cl?ef(u.value0.conferenceId):M.value};return Zv(dD(function(u){return mD(CSe(h1.create)(function(i){return i.poll}))(hD(function(){var i=SSe(u.poll_id);return function(l){return i(function(s){return s.poll.id}(l))}}())(e.conference.polls))})(Mz(e.pusher.dataChannel)("show-poll")))(function(){return Zv(FSe(function(u){return new gA({pollId:u.poll_id})})(Mz(e.pusher.dataChannel)("hide-poll")))(function(){return Zv(dD(function(u){return mD(ud.create)(hD(function(){var i=GSe(ef(u.conference_id));return function(l){return i(r(l))}}())(e.ctas))})(MSe(e.pusher.dataChannel)("show-event-cta")))(function(){return Zv(dD(function(u){return mD(ud.create)(hD(function(){var i=hA(ef(u.id));return function(l){return i(t(l))}}())(e.ctas))})(DA(e.pusher.dataChannel)("show-general-cta")))(function(){return Zv(dD(function(u){return mD(ud.create)(hD(function(){var i=hA(ef(u.id));return function(l){return i(a(l))}}())(e.ctas))})(DA(e.pusher.dataChannel)("show-featured-sps-cta")))(function(){return Zv(dD(function(u){return mD(ud.create)(hD(function(){var i=hA(ef(u.id));return function(l){return i(n(l))}}())(e.ctas))})(DA(e.pusher.dataChannel)("show-referral-cta")))(function(){return Dl({stage:DD.value,showPolls:!0})})})})})})})};var xSe=Jl(),RA=Ge(we),NSe=$t(Ye),jSe=Ba(we),USe=Za(te),Nz=Ii()(),jz=$t(te),OSe=Jt(te),D1=Ko(te)()(),kSe=Wr(yu),BSe=rn(Xe),yA=Zn(ha),Uz=BSe($n),HSe=iq(),bA=W(yn),Oz=ne(tn),qSe=Ys(tx),WSe=Ku(bT),JSe=Ee(xy),$Se=Ee(Yc),zSe=Ml()(),kz=function(){function e(){}return e.value=new e,e}(),wA=function(){function e(){}return e.value=new e,e}(),Bz=function(){function e(){}return e.value=new e,e}(),EA=function(){function e(){}return e.value=new e,e}(),IA=function(){function e(){}return e.value=new e,e}(),g1=function(e){return function(n){return xSe({onDismiss:n(new wn(IA.value)),bodyClass:"t--livestreams-update-network-settings-modal",body:function(){if(e.modalView instanceof kz)return RA("text-center")([ya(e.confirmConferenceRegistration)(NSe("mb-4")(jSe("badge badge-soft-primary bg-primary-soft")([USe("fe fe-check mr-1")(""),en("You\u2019re registered!")]))),Nz("my-4")({src:"/img/network/counselor.svg",height:"76",width:"91"}),jz("")("Connect with colleges when you attend or register for their livestreams?"),OSe("text-secondary")("Connecting with colleges puts you on their radar and introduces you to admissions officers and current students"),RA("mx-md-6 mt-4")([D1("btn btn-primary w-100 t--livestream-opt-into-auto-connect")({onClick:kSe(function(){return n(new Pe(Bz.value))(),n(new Pe(EA.value))()})})("Yes, always connect"),D1("btn btn-outline-primary w-100 mt-3 t--livestream-connect-with-school")({onClick:yA(n)(new Pe(EA.value))})("Only connect with "+e.school.name),D1("btn btn-link mt-3")({onClick:yA(n)(new wn(IA.value))})("Close")])]);if(e.modalView instanceof wA)return RA("text-center")([Nz("mt-4")({src:"/img/livestreams/network-settings-modal/connection-sent.png",height:"42",width:"42"}),jz("")("Connection request sent!"),D1("mt-4 btn btn-primary t--livestream-network-settings-modal-close")({onClick:yA(n)(new wn(IA.value))})("Close")]);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 74, column 13 - line 105, column 12): "+[e.modalView.constructor.name])}()})}},R1=function(e){return function(n){if(n instanceof Pe){if(n.value0 instanceof Bz)return Uz(Xa(HSe({publishScope:bi.value,publishContext:ZG.value,autoRequestFromLivestreams:!0,livestreamConference:e.conference})))(function(){return bA({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:wA.value})});if(n.value0 instanceof EA)return Uz(Xa(A6(e.school.id)(e.conference.id)))(function(){return bA({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:wA.value})});throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 52, column 31 - line 64, column 44): "+[n.value0.constructor.name])}if(n instanceof wn)return bA(e);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 51, column 1 - line 51, column 55): "+[e.constructor.name,n.constructor.name])}},y1=function(e){return function(n){var a=ze(!1)(Oz(e.dismissedNetworkSettingsModalAt)(function(r){return new S(qSe(WSe(_C(ge))(r))(30))})),t=function(r){return[n.rcr834NetworkSettingsModal,JSe(r.publishScope)(bi.value),!r.autoRequestFromLivestreams,e.hasAccessToNetwork,!a]};return ze(!1)(Oz(e.profile)(function(r){return new S(tT($Se(!0))(t(r)))}))}},b1=function(e){return zSe(e)({modalView:kz.value})};var RD=function(){function e(){}return e.value=new e,e}(),id=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),w1=function(){function e(){}return e.value=new e,e}();var Hz=rn(Xe),qz=Hz($n),TA=Fa(Ne),VSe=Hz(ua),SA=W(Kn),E1=W(yn),Wz=function(e){return function(n){return function(a){return function(t){return a.throttleState instanceof RD&&t instanceof yD?qz(TA(VSe(Xt(a.delay))(function(){return SA(e(w1.value))})))(function(){return E1(n({delay:a.delay,throttleState:new id(t.value0)}))}):a.throttleState instanceof id&&t instanceof yD?E1(n({delay:a.delay,throttleState:new id(t.value0)})):a.throttleState instanceof id&&t instanceof w1?qz(TA(SA(a.throttleState.value0)))(function(){return E1(n({delay:a.delay,throttleState:RD.value}))}):E1(n(a))}}}},Jz=function(e){return function(n){return TA(SA(e(new yD(n))))}},$z=function(e){return{throttleState:RD.value,delay:e}};var I1=Ge(te),T1=Ge(we),QSe=$t(te),Bs=re(on),KSe=_o(ur),zz=Ge(Ye),YSe=zt(te)()(),XSe=mo(te),ZSe=Ba(te),eCe=Ds(Ye),nCe=ZR(we)()(),Vz=gs(ra),S1=wa(te)()(),CA=Zn(ha),Qz=su(We)(ut),Kz=Ds(we),C1=Al(te),aCe=Al(Ye),tCe=Al(we),rCe=wv(we),oCe=Rv(we),ld=yv(te),uCe=bv(we),F1=pe(an),iCe=Jo(ra),bD=rn(Xe)($n),FA=Fa(Ne),lCe=Nt(jr),Yz=W(Kn),nf=W(yn),GA=k(Ca),cCe=Ee(s7),Xz=rl(ra)(We),sCe=un(St),vCe=Wg(ra),fCe=Tf(ut),_Ce=Xu(Ne),pCe=ib(Ne),G1=function(){function e(){}return e.value=new e,e}(),Zz=function(){function e(){}return e.value=new e,e}(),eV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),MA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),aV=function(){function e(){}return e.value=new e,e}(),tV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rV=function(){function e(){}return e.value=new e,e}(),AA=function(){function e(){}return e.value=new e,e}(),oV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),LA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uV=function(e){return function(n){return function(a){if(e.conference.polls.length===0)return aa;var t=function(){if(n.stage instanceof G1)return aa;if(n.stage instanceof Zz)return I1("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching...");throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 179, column 24 - line 184, column 25): "+[n.stage.constructor.name])}(),r=T1("d-flex flex-nowrap align-items-baseline")([QSe("")("Polls"),I1("text-muted ml-3 small")("Polls will be shown to viewers "+(Bs(e.videoLagSeconds)+" seconds after you launch them, to account for the audio/video delay"))]),u=function(s){return function(h){return function(p){var y=function(E){return function(b){var T=function(){if(h===0)return"0%";if($e)return Bs(KSe(100*b|0)(h))+"%";throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 175, column 13 - line 177, column 69): "+[])}();return T1("row align-items-center bg-light-grey mb-1 py-2 t--poll-response-option")([I1("col-7 d-flex justify-content-end")(E),zz("col-4")(zz("progress")(YSe("progress-bar")({style:st({width:T})})(""))),T1("col-1")([XSe("")(Bs(b)),ZSe("text-secondary text-nowrap")(" ("+(T+")"))])])}};return eCe("t--poll-responses-"+Bs(s.id))(nCe("py-0")({colSpan:6})(XI(y)(s.options)(p.optionCounts)))}}},i=function(s){var h=ze(s.status)(Vz(s.poll.id)(n.statuses)),p=S1("btn btn-white btn-sm px-4 t--open")(ea)({onClick:CA(a)(new eV(s.poll))})("Launch poll");if(h instanceof Ts)return p;if(h instanceof Ic)return Fe([S1("btn btn-success btn-sm px-4 mr-3")(ea)({disabled:!0})("Poll LIVE"),S1("btn btn-danger btn-sm px-4 t--close")(ea)({onClick:CA(a)(new nV(s.poll))})("Close poll")]);if(h instanceof Ss)return p;throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 135, column 17 - line 148, column 21): "+[h.constructor.name])},l=function(s){var h=Qz(s.poll.id)(n.expandedResponses),p=Vz(s.poll.id)(n.responses),y=In(0)(function(T){return T.answered})(p),E=In(0)(function(T){return T.seen})(p),b=In(0)(function(T){return T.skipped})(p);return Fe([Kz("t--poll t--poll-"+Bs(s.poll.id))([C1("pt-3")(function(){var T=xt(s.poll.autoDisplayMinutesFromStart);return T?"\u23F0 ":""}()+s.poll.question),aCe("text-nowrap")(i(s)),C1("t--shown")(Bs(E)),tCe("t--answers")([en(Bs(y)),S1("btn btn-sm btn-white ml-2 py-0 px-1 "+("fe fe-chevron-"+function(){return h?"up":"down t--expand-responses"}()))(lr(function(){return h?"Collapse responses":"Expand responses"}()))({onClick:CA(a)(new tV(s.poll.id))})("")]),C1("t--skipped")(Bs(b)),C1("t--pending")(Bs((E-y|0)-b|0))]),ya(h)(ga(p)(u(s.poll)(y)))])};return Fe([r,T1("t--polls position-relative")([ga(n.error)(function(s){return I1("alert alert-danger")(s)}),rCe("table table-sm mb-0")([oCe("")([Kz("")([ld("")("Question"),ld("")("Actions"),ld("")("# saw poll"),ld("")("# answered"),ld("")("# skipped"),ld("")("# not responded")])]),uCe("")(F1(iCe(function(s){return-function(h){return h.poll.id}(s)|0})(e.conference.polls))(l))]),t])])}}},iV=function(e){return function(n){var a=function(t){return bD(FA(lCe(t)(function(r){return Yz(aV.value)})))(function(){return nf({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:Zz.value,error:M.value})})};return function(t){if(t instanceof eV)return a(GA(MA.create)($C(t.value0)(Ic.value)));if(t instanceof nV)return a(GA(MA.create)($C(t.value0)(Ss.value)));if(t instanceof MA){var r=F1($o(function(){var u=cCe(Ic.value);return function(i){return u(function(l){return l.status}(i))}}())(t.value0))(function(u){return u.pollId});return nf({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,statuses:Xz(F1(t.value0)(function(u){return new Dn(u.pollId,u.status)})),expandedResponses:sCe(n.expandedResponses)(vCe(r)),stage:G1.value})}if(t instanceof aV)return nf({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:G1.value,error:new S("That didn't work for some reason, try again")});if(t instanceof tV)return nf({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,stage:n.stage,statuses:n.statuses,expandedResponses:function(){var u=Qz(t.value0)(n.expandedResponses);return u?fCe(t.value0)(n.expandedResponses):zo(t.value0)(n.expandedResponses)}()});if(t instanceof rV)return bD(Jz(LA.create)(AA.value))(function(){return nf(n)});if(t instanceof AA)return bD(FA(GA(oV.create)(YU(e.conference.id))))(function(){return nf(n)});if(t instanceof oV)return nf({error:n.error,expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,stage:n.stage,statuses:n.statuses,responses:Xz(F1(t.value0)(function(u){return new Dn(u.pollId,u.responses)}))});if(t instanceof LA)return Wz(LA.create)(function(u){return{error:n.error,expandedResponses:n.expandedResponses,responses:n.responses,stage:n.stage,statuses:n.statuses,responseThrottle:u}})(n.responseThrottle)(t.value0);throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 196, column 22 - line 242, column 98): "+[t.constructor.name])}}},lV=function(e){return bD(_Ce(hn(rV.value))(pCe(e.pusher.dataChannel)("poll-responses-changed")))(function(){return bD(FA(Yz(AA.value)))(function(){return nf({statuses:Rs,responses:Rs,expandedResponses:[],responseThrottle:$z(500),stage:G1.value,error:M.value})})})};var cV=Ii()(),sV=Ge(we),vV=$t(te),fV=$r(te),_V=cV("img-fluid mb-6")({src:"/img/logo-white.svg",style:st({width:"5em"})}),M1=function(e){return sV(e+` t--splashscreen position-absolute-fullsize d-flex flex-column align-items-center justify-content-around bg-dark text-white `)},wD=function(e){return M1("")([vV("text-center")(e)])},PA=M1("t--splashscreen-intro")([Ge(Ye)("text-center mt-7")(fV("")("The recording will load in a moment.")),_V]),A1=M1("px-4 px-md-6 t--splashscreen-intro")([cV("img-fluid")({src:"/img/illustrations/livestreams/2022-02-intro.svg"})]),pV=M1("t--splashscreen-complete")([sV("text-center mt-7")([fV("")("The event is now over."),vV("")("Thank you for attending!"),nl(te)("")("A recording will be available to watch shortly.")]),_V]);var L1=e=>e.play();var af=Fu(dV());Wa();var mV=e=>{let[n,a]=Ua.useState(),[t,r]=Ua.useState(),u=Ua.useRef();return u.current=e,At(()=>{if(!t)return af.default.isSupported()?a(dCe(e.videoStreamUrl,e.videoElementId,u)):e.onNotSupported(),r(!0),()=>{n&&n.destroy()}}),null},dCe=(e,n,a)=>{let t=document.getElementById(n);return t?(hls=new af.default,a.current.onInstanceCreated&&a.current.onInstanceCreated(hls),hls.on(af.default.Events.ERROR,function(r,u){if(a.current.onError&&a.current.onError("HLS error: "+u.type,u),u.fatal)switch(u.type){case af.default.ErrorTypes.MEDIA_ERROR:hls.recoverMediaError();break;default:hls.destroy(),a.current.onCriticalFail&&a.current.onCriticalFail(u.type);break}}),hls.on(af.default.Events.MEDIA_ATTACHED,()=>hls.loadSource(e)),hls.on(af.default.Events.MANIFEST_PARSED,()=>a.current.onReady&&a.current.onReady()),hls.on(af.default.Events.INIT_PTS_FOUND,(r,u)=>a.current.onInitialPts&&a.current.onInitialPts({initPTS:u.initPTS})),hls.attachMedia(t),hls):(a.current.onCriticalFail&&a.current.onCriticalFail("Couldn't find element #"+n),null)};var mCe=hv();var hV=function(){return function(){return mCe(mV)}};Wa();var zl={PRIMARY:"#008CFD",SECONDARY:"#6E84A3",WHITE:"#FFF",GRAY_300:"#E3EBF6"};var SD=Fu(EV()),IV=4,zCe=({trackColor:e,background:n})=>({props:a,children:t})=>Ua.createElement("div",Object.assign({},a,{style:Object.assign({},a.style,{height:`${IV}px`,borderRadius:`${IV*2}px`,background:n||e})}),...t),VCe=({horizontal:e})=>({props:n,isDragged:a})=>Ua.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18"}),Ua.createElement("circle",{cx:"9",cy:"9",r:"8.5",fill:a?zl.SECONDARY:zl.WHITE,stroke:zl.SECONDARY}),Ua.createElement("path",{stroke:a?zl.WHITE:zl.SECONDARY,d:e?"M7.5 6L7.5 12":"M6 7.5L12 7.5"}),Ua.createElement("path",{stroke:a?zl.WHITE:zl.SECONDARY,d:e?"M10.5 6L10.5 12":"M6 10.5L12 10.5"})),TV=e=>Ua.createElement("div",{"aria-label":e.ariaLabel},Ua.createElement(SD.Range,{step:e.step,min:e.min,max:e.max,values:[e.value],onChange:([n])=>e.onChange(n),onFinalChange:([n])=>e.onFinalChange&&e.onFinalChange(n),renderTrack:zCe({trackColor:e.trackColor||zl.GRAY_300,background:e.fillBefore?(0,SD.getTrackBackground)({values:[e.value],colors:[zl.PRIMARY,zl.GRAY_300],min:e.min,max:e.max,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":e.value}):void 0}),renderThumb:VCe({horizontal:!0})}));var QCe=hv(),SV={CanPassToJavaScript0:function(){},CanReceiveFromJavaScript1:function(){return L0}};var FV=function(e){return function(){return function(){return QCe(TV)}}};var KCe=zt(Ye)()(),YCe=FV(SV)()(),XCe=Zn(Yu),ZCe=wa(Ye)()(),eFe=Zn(ha),GV=Ge(we),nFe=Ba(te),j1=Fa(Ne),UA=W(Kn),MV=rn(Xe),aFe=rt(O0),Uc=W(yn),tFe=V0(Ne),OA=Rn(Ne),rFe=k(oe),oFe=dc(j0),uFe=MV(ua),tf=MV($n),iFe=or(yn),lFe=ne(ua),cFe=ec(Qu),sFe=or(ft),kA=function(){function e(){}return e.value=new e,e}(),BA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),HA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),LV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),PV=function(){function e(){}return e.value=new e,e}(),vFe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xV=function(e){return function(n){if(e.videoState instanceof M)return aa;if(e.videoState instanceof S){var a=KCe("")({style:st({minWidth:"6rem",width:"6rem"})})(YCe({value:function(){return e.videoState.value0.muted?0:e.videoState.value0.volume}(),min:0,max:1,step:.05,onChange:XCe(n)(function(i){return Pe.create(BA.create(i))}),ariaLabel:"Volume slider"})),t=function(){if(e.videoState.value0.muted)return"fe-volume-x";if($e)return"fe-volume-2";throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 119, column 5 - line 121, column 34): "+[])}(),r=ZCe("btn large px-3 py-1 mr-3 text-white fe "+t)(lr("Mute the video"))({onClick:eFe(n)(new Pe(kA.value))})(aa),u=GV("d-flex align-items-center text-white px-3")([en("LIVE"),nFe("text-danger x-large ml-2 mt-n1")("\u25CF")]);return GV("mb-2 w-100 d-flex align-items-center bg-semi-transparent-black "+function(){return e.visible?"":"hidden"}())([ya(e.config.liveIndicator)(u),ya(e.config.mute)(r),ya(e.config.volume)(a)])}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 95, column 1 - line 95, column 50): "+[e.constructor.name,n.constructor.name])}},NV=function(e){return Pe.create(HA.create(e))},jV=function(e){return j1(UA(new wn(new vFe(function(n){return function(){return e(n)(),new Pe(new HA(n))}}))))},U1=function(){return new Pe(new qA(!0))}(),UV=function(e){return{config:e,videoState:M.value,visible:!1,visibilityExpiration:aFe}},OV=2e3,kV=function(e){return function(n){if(n instanceof wn)return Uc(e);if(n instanceof Pe){var a=tFe(OA(function(){var i=Zu();return rFe(function(l){return Pe.create(LV.create(l))})(oFe(OV)(i))})),t=uFe(Xt(OV))(function(){return UA(new Pe(PV.value))}),r=function(u){if(n.value0 instanceof kA)return Uc(e);var i=function(l){if(n.value0 instanceof BA)return Uc(e);if(n.value0 instanceof HA)return tf(j1(OA(function(){var h=oC(n.value0.value0)(),p=tC(n.value0.value0)();return new Pe(new AV({muted:h,volume:p}))})))(function(){return Uc(e)});if(n.value0 instanceof AV)return Uc({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new S(n.value0.value0)});if(n.value0 instanceof qA)return tf(iFe(n.value0.value0)(a))(function(){return tf(j1(t))(function(){return Uc({config:e.config,videoState:e.videoState,visibilityExpiration:e.visibilityExpiration,visible:n.value0.value0})})});if(n.value0 instanceof LV)return Uc({config:e.config,videoState:e.videoState,visible:e.visible,visibilityExpiration:n.value0.value0});if(n.value0 instanceof PV)return tf(j1(lFe(OA(Zu))(function(s){var h=cFe(s)(e.visibilityExpiration);return h?UA(new Pe(new qA(!1))):t})))(function(){return Uc(e)});throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 135, column 1 - line 135, column 55): "+[n.value0.constructor.name])};return n.value0 instanceof BA&&e.videoState instanceof S?tf(a)(function(){return tf(jV(function(l){return function(){return sFe(n.value0.value0>0)(n_(!1)(l))(),rC(n.value0.value0)(l)()}}))(function(){return Uc({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new S({muted:e.videoState.value0.muted,volume:n.value0.value0})})})}):i(!0)};return n.value0 instanceof kA&&e.videoState instanceof S?tf(a)(function(){return tf(jV(n_(!e.videoState.value0.muted)))(function(){return Uc({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new S({volume:e.videoState.value0.volume,muted:!e.videoState.value0.muted})})})}):r(!0)}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 135, column 1 - line 135, column 55): "+[e.constructor.name,n.constructor.name])}},BV=function(e){if(e instanceof S)return!1;if(e instanceof M)return!0;throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 204, column 1 - line 204, column 37): "+[e.constructor.name])};var HV=e=>n=>a=>()=>e.then(a,n),qV=e=>e instanceof Error,WV=e=>e===null?"null":typeof e=="undefined"?"undefined":e.toString();var fFe=W(os(vr)),_Fe=G0(vr),pFe=pn(dn),JV=da(rR(sR)(vr)),dFe=ls(vr),mFe=k(tR(ns)),hFe=sm(vr),DFe=Tg(Hn),gFe=nt(Nx);var RFe=function(e){var n=function(a){if(qV(a))return fFe(a);if($e)return _Fe(new lm(""));throw new Error("Failed pattern match at Utils.Promise (line 49, column 5 - line 51, column 43): "+[a.constructor.name])};return qt(function(a){return _u("Promise failed: "+WV(e))})(pFe)(rh(JV(n(e))(JV(dFe("Error")(e))(mFe(_u)(hFe(e))))))},O1=function(e){return _v(function(n){return DFe(gFe)(HV(e)(function(a){return n(xe.create(RFe(a)))()})(function(a){return n(Oe.create(a))()}))})};var yFe=ne(tn),bFe=Ge(Ye),WA=Wr(VR),CD=ne(er),JA=nv(ft)(Pu),j_=Zn(ha),$V=K0(te)()(),wFe=hV()(),EFe=W(ft),zV=Zn(Yu),VV=zt(Ye)()(),IFe=Ko(we)()(),TFe=Za(te),SFe=Ge(we),QV=rn(Xe),CFe=Gs(Ne)(),FFe=xu(We)(it),GFe=Ee(Qt(ut)),cd=QV(ua),MFe=zs(Kn),AFe=Lr(q0),lo=W(Kn),KV=Rn(Ne),YV=Nt(jr),XV=SI(ua),Vr=W(yn),co=QV($n),Iu=Fa(Ne),ZV=k(Ca),eQ=V0(Ne),nQ=k(Hn),LFe=lt(br(Ca)),PFe=k(oe),xFe=pe(oe),aQ=un(nx),tQ=function(){function e(){}return e.value=new e,e}(),rQ=function(){function e(){}return e.value=new e,e}(),FD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oQ=function(){function e(){}return e.value=new e,e}(),sd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uQ=function(){function e(){}return e.value=new e,e}(),iQ=function(){function e(){}return e.value=new e,e}(),lQ=function(){function e(){}return e.value=new e,e}(),$A=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zA=function(){function e(){}return e.value=new e,e}(),k1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),B1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),H1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cQ=function(){function e(){}return e.value=new e,e}(),VA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),QA=function(){function e(){}return e.value=new e,e}(),sQ=function(){function e(){}return e.value=new e,e}(),vQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),U_=function(){function e(){}return e.value=new e,e}(),Oc=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),q1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),KA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),GD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),YA=function(e){var n=e.Monad0(),a=ne(n.Bind1()),t=Rn(e),r=W(n.Applicative0());return function(u){return function(i){return function(l){return a(t(My(u.videoId)))(function(s){return In(r(i.whenNotFound))(l)(yFe(s)(T8))})}}}},fQ=YA(Rr),XA=YA(Ne),_Q=function(e){var n=YA(e);return function(a){return n(a)({whenNotFound:ge})}},NFe=_Q(Rr),jFe=_Q(Ne),W1=function(e){return function(n){return function(a){var t=function(){var T=bFe("position-absolute-fullsize py-6 d-flex align-items-center justify-content-around");if(n.stage instanceof oQ)return T(e.errorScreen("It appears that video playback is not supported in your browser."));if(n.stage instanceof uQ)return T(e.errorScreen("The video didn't load correctly, try refreshing the page."));if(n.stage instanceof FD)return T(e.introScreen);if(n.stage instanceof sd)return aa;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 242, column 20 - line 253, column 16): "+[n.stage.constructor.name])}(),r=function(){return n.stage instanceof FD?n.stage.value0.reset:!1}(),u=WA(function(T){return CD(Gy(T))(JA(function(L){return a(new Pe(new KA({time:L})))}))}),i=WA(function(T){return CD(Gy(T))(JA(function(L){return a(new Pe(new q1({playing:!0,time:L})))}))}),l=function(T){return a(wn.create(T))},s=WA(function(T){return CD(Gy(T))(JA(function(L){return l(new VA(L))}))}),h=j_(l)(cQ.value),p=Fe([$V("w-100 t--real-video")({id:n.videoId,controls:Ct(n.customControls),onVolumeChange:h,onTimeUpdate:u,onPlay:i,onPause:s})(""),ya(!r)(wFe({videoStreamUrl:e.watchUrl,videoElementId:n.videoId,onNotSupported:l(iQ.value),onError:function(T,L){return ge},onCriticalFail:zV(l)(function(T){var L=T==="networkError";return L?zA.value:new k1("HLS player crashed")}),onReady:l(new B1({autoPlay:e.autoPlay})),onInitialPts:zV(l)(function(T){return new vQ(T.initPTS)})}))]),y=function(){return n.stage instanceof sd&&n.stage.value0.unmuteOverlay?VV("position-absolute-fullsize d-flex align-items-center justify-content-center t--unmute-overlay")({style:st({pointerEvents:"none"})})(IFe("btn btn-sm btn-light border-dark px-4 d-flex align-items-center")({onClick:j_(l)(sQ.value),style:st({pointerEvents:"all"})})([en("click for sound"),TFe("fe fe-volume-2 ml-2")("")])):aa}(),E=function(T){return VV("position-absolute-fullsize d-flex align-items-end t--controls-overlay")({onMouseMove:j_(l)(new Oc(U1)),onMouseDown:j_(l)(new Oc(U1)),onTouchStart:j_(l)(new Oc(U1))})(xV(T)(function(L){return l(Oc.create(L))}))},b=$V("w-100 t--real-video")({id:n.videoId,controls:Ct(n.customControls),playsInline:!0,onVolumeChange:h,onTimeUpdate:u,onPlay:i,onPause:s,onLoadedMetadata:j_(l)(new B1({autoPlay:e.autoPlay})),onError:j_(l)(zA.value),src:function(){return r?"":e.watchUrl}()})("");return SFe("position-relative w-100")([function(){if(n.support instanceof tQ)return p;if(n.support instanceof rQ)return b;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 164, column 7 - line 166, column 40): "+[n.support.constructor.name])}(),ga(n.customControls)(E),ya(n.allowSound)(y),t])}}},UFe=function(e){var n=Rn(e.MonadEffect0());return function(a){return n(function(){return NFe(a)(n_(!1))(),QA.value})}},OFe=UFe(O8),ZA=function(e){return CFe("Livestream: Error")({livestream_error_message:e})},pQ=function(e){return fQ(e)({whenNotFound:!1})(aC)},kFe=function(e){return Rn(e)(function(){var a=CD(CD(Zo)(cC))(lC)();return FFe(function(t){return GFe(kj(t)(a))(new S(0))})(["iPad","iPod","iPhone"])})},dQ=kFe(Ne),BFe=function(e){var n=function(t){return cd(MFe(e.allowSound)(AFe(_u("Skipping attempt to play unmuted because sound was programmatically disallowed"))))(function(){return cd(O1(L1(t)))(function(){return lo(new H1({unmuteOverlay:!1}))})})},a=function(t){return cd(KV(n_(!0)(t)))(function(){return cd(O1(L1(t)))(function(){return lo(new H1({unmuteOverlay:!0}))})})};return XA(e)({whenNotFound:new k1("<video> element missing")})(function(t){return YV(n(t))(function(r){return YV(a(t))(function(u){return XV(dQ)(cd(ZA("Failed to autostart playback on iOS, resorting to manual start"))(function(){return lo(new H1({unmuteOverlay:!1}))}))(lo(new k1("Failed to autostart playback on non-iOS")))})})})},J1=function(e){return function(n){if(n instanceof Pe)return Vr(e);if(n instanceof wn&&n.value0 instanceof VA)return co(function(){var t=BV(e.customControls);return t?Iu(lo(new Pe(new q1({playing:!1,time:n.value0.value0})))):Xa(jFe(e)(function(r){return O1(L1(r))}))}())(function(){return Vr(e)});if(n instanceof wn){if(n.value0 instanceof iQ)return co(Iu(XV(dQ)(lo(new wn(new $A(rQ.value))))(lo(new wn(lQ.value)))))(function(){return Vr(e)});if(n.value0 instanceof lQ)return co(Iu(lo(new Pe(new GD({intermittent:!1})))))(function(){return Vr({allowSound:e.allowSound,customControls:e.customControls,initialPts:e.initialPts,support:e.support,videoId:e.videoId,stage:oQ.value})});if(n.value0 instanceof k1)return co(Iu(lo(new Pe(new GD({intermittent:!1})))))(function(){return co(Xa(ZA("Critical error: "+n.value0.value0)))(function(){return Vr({allowSound:e.allowSound,customControls:e.customControls,initialPts:e.initialPts,support:e.support,videoId:e.videoId,stage:uQ.value})})});if(n.value0 instanceof zA)return co(Iu(lo(new Pe(new GD({intermittent:!0})))))(function(){return co(Iu(cd(Xt(2e3))(function(){return lo(new wn(new $A(e.support)))})))(function(){return co(Xa(ZA("Intermittent error, retrying")))(function(){return Vr({allowSound:e.allowSound,customControls:e.customControls,initialPts:e.initialPts,support:e.support,videoId:e.videoId,stage:new FD({reset:!0})})})})});if(n.value0 instanceof $A)return Vr({allowSound:e.allowSound,customControls:e.customControls,initialPts:e.initialPts,videoId:e.videoId,stage:new FD({reset:!1}),support:n.value0.value0});if(n.value0 instanceof B1&&n.value0.value0.autoPlay)return co(Iu(ZV(wn.create)(BFe(e))))(function(){return Vr(e)});if(n.value0 instanceof B1&&!n.value0.value0.autoPlay)return Vr({allowSound:e.allowSound,customControls:e.customControls,initialPts:e.initialPts,support:e.support,videoId:e.videoId,stage:new sd({unmuteOverlay:!1})});if(n.value0 instanceof H1)return co(Iu(lo(new wn(U_.value))))(function(){return Vr({allowSound:e.allowSound,customControls:e.customControls,initialPts:e.initialPts,support:e.support,videoId:e.videoId,stage:new sd(n.value0.value0)})});if(n.value0 instanceof cQ)return co(Iu(lo(new wn(U_.value))))(function(){return co(Iu(lo(new wn(QA.value))))(function(){return Vr(e)})});if(n.value0 instanceof QA)return e.stage instanceof sd?co(Iu(lo(new wn(U_.value))))(function(){return Vr({allowSound:e.allowSound,customControls:e.customControls,initialPts:e.initialPts,support:e.support,videoId:e.videoId,stage:new sd({unmuteOverlay:!1})})}):Vr(e);if(n.value0 instanceof sQ)return co(Iu(lo(new wn(U_.value))))(function(){return co(Iu(ZV(wn.create)(OFe(e))))(function(){return Vr(e)})});if(n.value0 instanceof vQ)return co(Iu(lo(new wn(U_.value))))(function(){return Vr({allowSound:e.allowSound,customControls:e.customControls,stage:e.stage,support:e.support,videoId:e.videoId,initialPts:new S(n.value0.value0/9e4)})});if(n.value0 instanceof U_)return co(eQ(XA(e)({whenNotFound:M.value})(function(t){return lo(S.create(wn.create(Oc.create(NV(t)))))})))(function(){return Vr(e)});if(n.value0 instanceof Oc&&n.value0.value0 instanceof wn)return co(eQ(XA(e)({whenNotFound:M.value})(function(t){return KV(nQ(function(r){return S.create(wn.create(Oc.create(r)))})(n.value0.value0.value0.value0(t)))})))(function(){return Vr(e)});var a=function(t){if(n.value0 instanceof Oc||n.value0 instanceof VA)return Vr(e);throw new Error("Failed pattern match at Livestream.VideoPlayer (line 264, column 1 - line 264, column 55): "+[n.value0.constructor.name])};return n.value0 instanceof Oc&&e.customControls instanceof S?LFe(function(t){return wn.create(Oc.create(t))})(function(t){return{allowSound:e.allowSound,initialPts:e.initialPts,stage:e.stage,support:e.support,videoId:e.videoId,customControls:new S(t)}})(kV(e.customControls.value0)(n.value0.value0)):a(!0)}throw new Error("Failed pattern match at Livestream.VideoPlayer (line 264, column 1 - line 264, column 55): "+[e.constructor.name,n.constructor.name])}},$1=function(e){return co(Iu(lo(new wn(U_.value))))(function(){return Vr({videoId:e.videoId,support:tQ.value,initialPts:M.value,customControls:PFe(UV)(e.customControls),allowSound:e.allowSound,stage:new FD({reset:!1})})})},HFe=function(e){return fQ(e)({whenNotFound:M.value})(function(n){return nQ(function(a){return S.create(yT(a))})(Vm(n))})},mQ=function(e){if(e.initialPts instanceof M)return EFe(M.value);if(e.initialPts instanceof S)return function(){var a=HFe(e)();return xFe(a)(function(t){return aQ(e.initialPts.value0)(aQ(t)(-3.7))})};throw new Error("Failed pattern match at Livestream.VideoPlayer (line 121, column 1 - line 121, column 53): "+[e.constructor.name])};var qFe=Ge(we),WFe=YR(te),JFe=Ge(Ye),O_=function(e){return qFe("position-relative")([WFe("w-100 t--dummy-video")(""),JFe("position-absolute-fullsize")(e)])};Wa();var $Fe=["selectionchange","visibilitychange","keyup","keydown"],zFe=["resize","mouseup","mousemove","hashchange","popstate","message"],eL=class extends Ua.Component{constructor(){super();let n=a=>{let t={};return a.forEach(r=>{t[r]=u=>{let i=this.props[r];i&&i(u)}}),t};this.handleWindow=n(zFe),this.handleDocument=n($Fe)}componentDidMount(){let n=(a,t)=>Object.keys(t).forEach(r=>a.addEventListener(r,t[r]));n(window,this.handleWindow),n(document,this.handleDocument)}componentWillUnmount(){let n=(a,t)=>Object.keys(t).forEach(r=>a.removeEventListener(r,t[r]));n(window,this.handleWindow),n(document,this.handleDocument)}render(){return null}};var VFe=hv(),z1=function(){return function(){return VFe(eL)}};var nL=rn(Xe),aL=nL(ua),hQ=ne(ua),V1=Rn(Ne),Q1=W(Kn),QFe=El(tn),KFe=Yn(fr),YFe=k(oe),XFe=dc(ss),ZFe=c2(H0),eGe=k(Hn),nGe=Gr(it),aGe=or(Kn),tGe=Ee(xv),DQ=qo(Kn)(Pu),rGe=Gs(Rr)(),oGe=re(Hl),gQ=Ku(ss),Ai=W(yn),RQ=br(Ca),kc=lt(RQ),rf=nL($n),MD=Fa(Ne),K1=ne(tn),uGe=nL(tn),iGe=xr(Yr),lGe=pe(oe),Hs=ne($n),qs=_r(RQ),cGe=oy(Ne),sGe=ib(Ne),vGe=Xu(Ne),fGe=Ei(La()(H({reflectSymbol:function(){return"registration_count"}})(cn)(H({reflectSymbol:function(){return"user_count"}})(cn)(ln))))(Ne),_Ge=z1()(),pGe=Wr(yu),dGe=W(_a),of=Ge(we),Y1=Ge(te),mGe=Ba(te),AD=Ge(Ye),hGe=wa(te)()(),DGe=Zn(ha),gGe=nl(Ye),yQ=re(on),RGe=zt(Ye)()(),yGe=$t(te),bQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),X1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Z1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),eE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),tL=function(){function e(){}return e.value=new e,e}(),rL=function(){function e(){}return e.value=new e,e}(),aE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),tE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),LD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),PD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ND=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),EQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),IQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oL=function(){function e(){}return e.value=new e,e}(),bGe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wGe="video",TQ=function(e){return function(n){return aL(Xt(1e3))(function(){return hQ(V1(mQ(n)))(function(a){return hQ(V1(t_))(function(t){return Q1(new Pe(new IQ({streamTime:QFe(KFe(YFe(XFe)(a))(e)),localTime:t})))})})})}},SQ=function(e){return ZS(e)},EGe=function(e){return function(n){return aL(ZFe(V1(eGe(nGe)(pQ(n.video))))(aGe(tGe(e.conference.streamStatus)(zr.value))(DQ(n.streamTime)(function(a){return DQ(n.localTime)(function(t){return V1(rGe("Livestream: Video lag")({livestream_conference_id:oGe(e.conference.id),livestream_video_lag_seconds:SQ(gQ(t)(a))}))})}))))(function(){return aL(Xt(function(){var a=xt(n.streamTime);return a?12e4:1e3}()))(function(){return Q1(new Pe(oL.value))})})}},CQ=function(e){return function(n){return function(a){if(a instanceof wn)return Ai(n);if(a instanceof Pe){var t=function(u){return function(i){if(i instanceof X1)return kc(X1.create)(function(l){return{launchCtas:u.launchCtas,streamControls:u.streamControls,streamEndWarning:u.streamEndWarning,launchPolls:l}})(iV(e)(u.launchPolls)(i.value0));if(i instanceof Z1)return kc(Z1.create)(function(l){return{launchPolls:u.launchPolls,streamControls:u.streamControls,streamEndWarning:u.streamEndWarning,launchCtas:l}})(Vq(e)(u.launchCtas)(i.value0));if(i instanceof eE)return kc(eE.create)(function(l){return{launchCtas:u.launchCtas,launchPolls:u.launchPolls,streamEndWarning:u.streamEndWarning,streamControls:l}})(u$(e)(u.streamControls)(i.value0));if(i instanceof nE)return kc(nE.create)(function(l){return{launchCtas:u.launchCtas,launchPolls:u.launchPolls,streamControls:u.streamControls,streamEndWarning:l}})(g$(e)(u.streamEndWarning)(i.value0));throw new Error("Failed pattern match at Livestream.Live (line 366, column 30 - line 381, column 63): "+[i.constructor.name])}};if(a.value0 instanceof aE)return kc(function(u){return Pe.create(aE.create(u))})(function(u){return{audience:n.audience,forceVideo:n.forceVideo,livestreamHost:n.livestreamHost,localTime:n.localTime,modal:n.modal,questions:n.questions,reactions:n.reactions,streamTime:n.streamTime,videoOverlay:n.videoOverlay,video:u}})(J1(n.video)(a.value0.value0));if(a.value0 instanceof LD&&a.value0.value0 instanceof wn)return rf(MD(Q1(new wn(a.value0.value0.value0))))(function(){return Ai(n)});if(a.value0 instanceof LD)return kc(function(u){return Pe.create(LD.create(u))})(function(u){return{audience:n.audience,forceVideo:n.forceVideo,livestreamHost:n.livestreamHost,localTime:n.localTime,modal:n.modal,reactions:n.reactions,streamTime:n.streamTime,video:n.video,videoOverlay:n.videoOverlay,questions:u}})(bJ(e)(n.questions)(a.value0.value0));if(a.value0 instanceof PD)return kc(function(u){return Pe.create(PD.create(u))})(function(u){return{audience:n.audience,forceVideo:n.forceVideo,livestreamHost:n.livestreamHost,localTime:n.localTime,modal:n.modal,questions:n.questions,streamTime:n.streamTime,video:n.video,videoOverlay:n.videoOverlay,reactions:u}})(kJ(e)(n.reactions)(a.value0.value0));if(a.value0 instanceof xD&&a.value0.value0 instanceof wn)return rf(Xa(cb))(function(){return Ai({audience:n.audience,forceVideo:n.forceVideo,livestreamHost:n.livestreamHost,localTime:n.localTime,questions:n.questions,reactions:n.reactions,streamTime:n.streamTime,video:n.video,videoOverlay:n.videoOverlay,modal:M.value})});var r=function(u){if(a.value0 instanceof xD&&$e)return Ai(n);var i=function(l){if(a.value0 instanceof ND)return Ai(n);if(a.value0 instanceof tE)return kc(function(s){return Pe.create(tE.create(s))})(function(s){return{audience:n.audience,forceVideo:n.forceVideo,livestreamHost:n.livestreamHost,localTime:n.localTime,modal:n.modal,questions:n.questions,reactions:n.reactions,streamTime:n.streamTime,video:n.video,videoOverlay:s}})(Pz(e)(n.videoOverlay)(a.value0.value0));if(a.value0 instanceof EQ)return Ai({audience:n.audience,livestreamHost:n.livestreamHost,localTime:n.localTime,modal:n.modal,questions:n.questions,reactions:n.reactions,streamTime:n.streamTime,video:n.video,videoOverlay:n.videoOverlay,forceVideo:a.value0.value0});if(a.value0 instanceof wQ)return Ai({forceVideo:n.forceVideo,livestreamHost:n.livestreamHost,localTime:n.localTime,modal:n.modal,questions:n.questions,reactions:n.reactions,streamTime:n.streamTime,video:n.video,videoOverlay:n.videoOverlay,audience:new S(a.value0.value0)});if(a.value0 instanceof IQ)return rf(MD(TQ(e.conference.streamingStartTime)(n.video)))(function(){return Ai({audience:n.audience,forceVideo:n.forceVideo,livestreamHost:n.livestreamHost,modal:n.modal,questions:n.questions,reactions:n.reactions,video:n.video,videoOverlay:n.videoOverlay,streamTime:a.value0.value0.streamTime,localTime:new S(a.value0.value0.localTime)})});if(a.value0 instanceof oL)return rf(MD(EGe(e)(n)))(function(){return Ai(n)});if(a.value0 instanceof bGe)return Ai({audience:n.audience,forceVideo:n.forceVideo,livestreamHost:n.livestreamHost,localTime:n.localTime,questions:n.questions,reactions:n.reactions,streamTime:n.streamTime,video:n.video,videoOverlay:n.videoOverlay,modal:new S(a.value0.value0)});throw new Error("Failed pattern match at Livestream.Live (line 307, column 1 - line 307, column 76): "+[a.value0.constructor.name])};return a.value0 instanceof ND&&n.livestreamHost instanceof S?kc(function(l){return Pe.create(ND.create(l))})(function(l){return{audience:n.audience,forceVideo:n.forceVideo,localTime:n.localTime,modal:n.modal,questions:n.questions,reactions:n.reactions,streamTime:n.streamTime,video:n.video,videoOverlay:n.videoOverlay,livestreamHost:new S(l)}})(t(n.livestreamHost.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof xD&&n.modal instanceof S?kc(function(u){return Pe.create(xD.create(u))})(function(u){return{audience:n.audience,forceVideo:n.forceVideo,livestreamHost:n.livestreamHost,localTime:n.localTime,questions:n.questions,reactions:n.reactions,streamTime:n.streamTime,video:n.video,videoOverlay:n.videoOverlay,modal:new S(new bQ(u))}})(R1(n.modal.value0.value0)(a.value0.value0)):r(!0)}throw new Error("Failed pattern match at Livestream.Live (line 307, column 1 - line 307, column 76): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},FQ=function(e){var n=K1(Pp(e.conference))(function(t){return K1(e.user)(function(r){return uGe(iGe(y1(r)(e.featureFlags)))(function(){return new S(new bQ(b1({confirmConferenceRegistration:!1,school:t,conference:e.conference})))})})}),a=function(){var t=lGe(e.user)(function(r){return r.livestreamHost});return t instanceof S&&t.value0?Hs(qs(X1.create)(lV(e)))(function(r){return Hs(qs(Z1.create)(Qq(e.ctas)))(function(u){return Hs(qs(eE.create)(i$(e.conference)))(function(i){return Hs(qs(nE.create)(R$))(function(l){return Ai(new S({launchPolls:r,launchCtas:u,streamControls:i,streamEndWarning:l}))})})})}):Ai(M.value)}();return rf(cGe(hn(M.value))(sGe(e.pusher.presenceChannel)("dummy-event")))(function(){return rf(vGe(function(t){return new Pe(new wQ({watching:t.user_count,registered:t.registration_count}))})(fGe(e.pusher.dataChannel)("audience")))(function(){return Hs(qs(function(t){return Pe.create(aE.create(t))})($1({videoId:wGe,customControls:new S({mute:!0,volume:!0,liveIndicator:!0}),allowSound:!0})))(function(t){return Hs(qs(function(r){return Pe.create(ND.create(r))})(a))(function(r){return Hs(qs(function(u){return Pe.create(LD.create(u))})(gJ(e)))(function(u){return Hs(qs(function(i){return Pe.create(PD.create(i))})(UJ(e)))(function(i){return Hs(qs(function(l){return Pe.create(tE.create(l))})(xz(e)))(function(l){return rf(MD(TQ(e.conference.streamingStartTime)(t)))(function(){return rf(MD(Q1(new Pe(oL.value))))(function(){return Ai({video:t,videoOverlay:l,questions:u,reactions:i,livestreamHost:r,audience:M.value,streamTime:M.value,localTime:M.value,forceVideo:M.value,modal:n})})})})})})})})})})},IGe=function(){return jo(Vo(We)([KS.value,new gt(":"),yi.value,new gt(":"),YS.value]))}(),GQ=function(e){return function(n){return function(a){var t=_Ge({visibilitychange:pGe(function(){var T=eC();return B0(HU(e.conference.id)({visible:T}))()})}),r=ze(aa)(K1(n.streamTime)(function(b){return K1(n.localTime)(function(T){return dGe(of("col-auto")([Y1("badge badge-info bg-info text-dark mr-2")("HQ-only"),en("Stream time: "+(IGe(b)+(" ("+(SQ(gQ(T)(b))+"s lag)"))))]))})})),u=xt(n.livestreamHost),i=function(b){return ya(!u)(of(b)([mGe("badge badge-success bg-success mr-2")("Pro tip"),en("Having video trouble? Try refreshing the page!")]))},l=function(b){return a(Pe.create(b))},s=function(){var b=function(T){return function(L){return function(U){return AD("card bg-light-grey mt-3")(AD("card-body py-3")(of("row align-items-center")([Y1("col-auto large px-4")("Video check:"),AD("col-auto")(hGe("btn btn-sm btn-outline-primary px-4")(ea)({onClick:DGe(l)(new EQ(L))})(T)),Y1("col small")(U)])))}}};return e.conference.streamStatus instanceof zr&&n.forceVideo instanceof S&&n.forceVideo.value0 instanceof rL?b("Show the video")(M.value)("The video is hidden because you hid it. Click the button to show it again."):e.conference.streamStatus instanceof zr?b("Hide the video only for me")(new S(rL.value))("You can hide the video in your browser. The audience will still see it."):n.forceVideo instanceof S&&n.forceVideo.value0 instanceof tL?b("Hide the video")(M.value)("You should now see the video above. If you don't it means you're not streaming."):b("Show the video only to me")(new S(tL.value))("You can do this because you're HQ")}(),h=function(b){return l(ND.create(b))},p=function(){if(e.conference.watchUrl instanceof S)return W1({watchUrl:e.conference.watchUrl.value0,introScreen:A1,errorScreen:wD,autoPlay:!0})(n.video)(function(b){return l(aE.create(b))});if(e.conference.watchUrl instanceof M)return O_(A1);throw new Error("Failed pattern match at Livestream.Live (line 261, column 25 - line 272, column 45): "+[e.conference.watchUrl.constructor.name])}(),y=function(){if(n.forceVideo instanceof S&&n.forceVideo.value0 instanceof tL)return p;if(n.forceVideo instanceof S&&n.forceVideo.value0 instanceof rL)return O_(wD("You've hidden your video. You can do this because you're HQ"));if(e.conference.streamStatus instanceof zr&&n.forceVideo instanceof M)return p;if(e.conference.streamStatus instanceof bu&&n.forceVideo instanceof M)return O_(A1);if(e.conference.streamStatus instanceof wr&&n.forceVideo instanceof M)return O_(pV);throw new Error("Failed pattern match at Livestream.Live (line 249, column 15 - line 259, column 46): "+[e.conference.streamStatus.constructor.name,n.forceVideo.constructor.name])}(),E=AD("col")(gGe("d-flex align-items-center ")(function(){if(n.audience instanceof M)return M8;if(n.audience instanceof S)return Fe([en(yQ(n.audience.value0.registered)+" signed up"),ya(u)(Fe([en(", "),Y1("badge badge-info bg-info text-dark mx-2")("HQ"),en(yQ(n.audience.value0.watching)+" watching")]))]);throw new Error("Failed pattern match at Livestream.Live (line 219, column 13 - line 229, column 18): "+[n.audience.constructor.name])}()));return Fe([t,of("row")([E,ya(u)(r),i("d-none d-md-block")]),of("row mb-3")([of("col-12 col-lg-9")([of("position-relative")([y,Az(e)(n.videoOverlay)(function(b){return l(tE.create(b))}),jJ(n.reactions)(function(b){return l(PD.create(b))}),ga(n.livestreamHost)(function(b){return D$(e)(b.streamEndWarning)(function(T){return h(nE.create(T))})})]),BJ(e)(function(b){return l(PD.create(b))})]),i("col-12 d-md-none my-3"),RGe("col-12 "+function(){return u?"mt-3":"col-lg-3 pl-0"}())({style:st({minHeight:function(){return u?"40em":"15em"}()})})(yJ(e)(n.questions)(function(b){return l(LD.create(b))}))]),ga(n.livestreamHost)(function(b){return AD("card t--hq-controls")(of("card-body")([yGe("text-center")("HQ-only controls"),Ll(""),l$(e)(b.streamControls)(function(T){return h(eE.create(T))}),s,Ll("my-5 w-100"),uV(e)(b.launchPolls)(function(T){return h(X1.create(T))}),Ll("my-4 w-100"),Kq(b.launchCtas)(function(T){return h(Z1.create(T))})]))}),ga(n.modal)(function(b){return g1(b.value0)(function(T){return l(xD.create(T))})})])}}};var MQ=function(){return As()(Gc(M.value))(function(e){return Bv(new Dn(e.value0,uS(e.value0)(e.value1)))})}();var Bc=function(){function e(){}return e.value=new e,e}(),Hc=function(){function e(){}return e.value=new e,e}();var AQ={eq:function(e){return function(n){return e instanceof Bc&&n instanceof Bc||e instanceof Hc&&n instanceof Hc}}};var LQ=function(e){if(e instanceof Bc)return Hc.value;if(e instanceof Hc)return Bc.value;throw new Error("Failed pattern match at Utils.Expandable (line 30, column 10 - line 32, column 24): "+[e.constructor.name])};function PQ(e){return function(n){return function(){return e.item(n)}}}var TGe=k(Hn),xQ=function(e){var n=TGe(_e),a=PQ(e);return function(t){return n(a(t))}};var SGe=pe(Hn),CGe=un(St),uL=W(ft),FGe=pe(oe),GGe=gr(We)(bt),MGe=k(Hn),AGe=qa(er),LGe=Zr(),NQ=As(),PGe=Dp(Xe)(),xGe=W(Kn),NGe=Rn(Ne),jGe=Gg(nc),UGe=k(oe),OGe=zt(we)()(),rE=Ee(AQ),kGe=Zi(gv(Yi)),BGe=wa(Ye)()(),HGe=Zn(ha),jQ=re(u0),UQ=function(){function e(){}return e.value=new e,e}(),qGe=function(){function e(){}return e.value=new e,e}(),iL=function(){return function(e){return function(n){var a=function(i){var l=function(h){return function(p){return function(){var E=xQ(h)(p)();if(E instanceof S)return SGe(l(h)(p+1|0))(function(b){return CGe([E.value0])(b)})();if(E instanceof M)return[];throw new Error("Failed pattern match at Component.Dropdown (line 187, column 45 - line 189, column 31): "+[E.constructor.name])}}},s=FGe(u6(i))(function(h){return function(){var y=SF(h)(),E=l(y)(0)();return GGe(E)}});return MGe(is("-menu"))(ze(uL(""))(s))},t=function(i){return function(l){if(i instanceof M||l instanceof M)return uL(!1);if(i instanceof S&&l instanceof S)return function(){var h=GF(i.value0)(l.value0)(),p=a(l.value0)();return h||p?!0:AGe(t(new S(i.value0)))(l6(l.value0))()};throw new Error("Failed pattern match at Component.Dropdown (line 163, column 5 - line 163, column 42): "+[i.constructor.name,l.constructor.name])}},r=LGe(n),u=Ja(r.alignment)(UQ.value);return dh(NQ(Gc(Hc.value))(function(i){return NQ(MQ)(function(l){return PGe(bb(mh.mouseup)(function(s){if(i.value0 instanceof Hc)return xGe(ge);if(i.value0 instanceof Bc)return NGe(jGe(t(UGe(b8)(l.value0))(new S(FF(s.target))))(i.value1(Hc.value)));throw new Error("Failed pattern match at Component.Dropdown (line 123, column 5 - line 129, column 29): "+[i.value0.constructor.name])}))(function(){return Bv(OGe("dropdown "+(e+function(){var s=rE(i.value0)(Bc.value);return s?" show":""}()))({onClick:kGe(i.value1)(function(){var s=r.closeOnClick&&rE(i.value0)(Bc.value);return s?new S(Hc.value):M.value}()),ref:l.value1})([BGe(r.toggleClass)(r.ariaLabelInput)({onClick:HGe(i.value1)(LQ(i.value0)),"aria-expanded":jQ(rE(i.value0)(Bc.value)),role:"combobox","aria-haspopup":"listbox","aria-controls":r.contentId})(r.toggleContent),r.content({visible:rE(i.value0)(Bc.value),className:"dropdown-menu show"+function(){if(u instanceof UQ)return"";if(u instanceof qGe)return" dropdown-menu-right";throw new Error("Failed pattern match at Component.Dropdown (line 146, column 46 - line 148, column 51): "+[u.constructor.name])}(),closeDropdown:i.value1(Hc.value),contentId:r.contentId,role:"listbox",roleSelectOption:"option",ariaSelected:jQ})]))})})}))}}},WGe=iL(),OQ=function(e){return function(n){return WGe(e)({contentId:n.contentId,toggleClass:n.toggleClass+" dropdown-toggle",toggleContent:n.toggleContent,content:function(a){return ya(a.visible)(n.content({className:a.className,contentId:a.contentId,role:a.role,roleSelectOption:a.roleSelectOption,ariaSelected:a.ariaSelected}))},closeOnClick:!0,ariaLabelInput:n.ariaLabelInput})}};var JGe=Bo(xv),kQ=wa(we)()(),BQ=Zn(ha),HQ=Ba(te),lL=$t(te),$Ge=Rp(we),zGe=Ge(Ye),VGe=wa(te)()(),QGe=Jt(te),KGe=oo(te)()(),YGe=rn(Xe)($n),XGe=Fa(Ne),ZGe=Nt(jr),eMe=k(Ca),nMe=W(Kn),aMe=re(tP),vd=W(yn),cL=function(){function e(){}return e.value=new e,e}(),qQ=function(){function e(){}return e.value=new e,e}(),WQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JQ=function(){function e(){}return e.value=new e,e}(),$Q=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),zQ=function(){function e(){}return e.value=new e,e}(),sL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),VQ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),QQ=function(){function e(){}return e.value=new e,e}(),tMe=function(e){return function(n){return function(a){if(JGe(e.conference.streamStatus)(wr.value))return aa;var t=kQ("btn btn-sm btn-warning")(ea)({onClick:BQ(a)(zQ.value)})([HQ("badge badge-info bg-info text-dark mr-2")("HQ"),en("Download recording")]),r=lL("")("The recording is still being transcoded to MP4. Please check back later."),u=function(h){return $Ge("")([h,zGe("d-flex justify-content-end")(VGe("btn btn-primary px-4")(ea)({onClick:BQ(a)(QQ.value)})("Close"))])},i=kQ("btn btn-sm btn-warning")(ea)({disabled:!0})([HQ("badge badge-info bg-info text-dark mr-2")("HQ"),en("Loading...")]),l=function(h){return Fe([lL("")("Oops, something went wrong:"),QGe("text-danger")(h)])},s=function(h){return Fe([lL("")("The recording is ready"),KGe("mb-4")(ea)({href:h,download:e.conference.title+".mp4"})("Download")])};if(n instanceof cL)return t;if(n instanceof qQ)return i;if(n instanceof WQ)return Fe([t,u(s(n.value0.url))]);if(n instanceof JQ)return Fe([t,u(r)]);if(n instanceof $Q)return Fe([t,u(l(n.value0))]);throw new Error("Failed pattern match at Livestream.Livestream.DownloadButton (line 40, column 3 - line 45, column 69): "+[n.constructor.name])}}},rMe=function(e){return function(n){return function(a){if(a instanceof zQ)return YGe(XGe(ZGe(eMe(sL.create)(XU(e.conference.id)))(function(t){return nMe(new VQ(aMe(t)))})))(function(){return vd(qQ.value)});if(a instanceof sL&&a.value0 instanceof S)return vd(new WQ({url:a.value0.value0}));if(a instanceof sL&&a.value0 instanceof M)return vd(JQ.value);if(a instanceof VQ)return vd(new $Q(a.value0));if(a instanceof QQ)return vd(cL.value);throw new Error("Failed pattern match at Livestream.Livestream.DownloadButton (line 82, column 18 - line 100, column 15): "+[a.constructor.name])}}},KQ=Dv("DownloadButton")(function(e){return{init:vd(cL.value),view:tMe(e),update:rMe(e)}});var qc=function(){function e(){}return e.value=new e,e}(),Li=function(){function e(){}return e.value=new e,e}(),Vl=function(){function e(){}return e.value=new e,e}(),vL={eq:function(e){return function(n){return e instanceof qc&&n instanceof qc||e instanceof Li&&n instanceof Li||e instanceof Vl&&n instanceof Vl}}};var oMe=Tv(we)()(),YQ=Jr()(),XQ=function(e){return function(n){return oMe("d-inline")({method:"post",action:n.path})([YQ(e)({type:"submit",value:n.label}),YQ("")({type:"hidden",name:"authenticity_token",value:n.token})])}};var uMe=pe(Hn),oE=ne(er),iMe=Bo(xv),ZQ=oo(we)()(),uE=Ba(te),lMe=wa(te)()(),cMe=Wr(yu),sMe=zt(we)()(),vMe=iL(),fMe=zt(Ye)()(),eK=function(e){var n=Rn(e),a=W(e.Monad0().Applicative0());return function(t){return t.user instanceof S&&t.user.value0.livestreamHost?n(uMe(oE(oE(Zo)(Qm))(uC))(function(r){return r==="#upcoming"?new S(qc.value):r==="#live"?new S(Li.value):r==="#recorded"?new S(Vl.value):M.value})):a(M.value)}},nK=function(e){var n=function(){return iMe(e.conference.streamStatus)(wr.value)?aa:ZQ("btn btn-sm btn-warning d-inline-flex align-items-baseline mr-4")(ea)({href:e.paths.streamReport})([uE("badge badge-info bg-info text-dark mr-2")("HQ"),en("Stream report")])}(),a=function(i){return function(l){return lMe("dropdown-item")(ea)({onClick:cMe(oE(oE(Zo)(Qm))(iC(i)))})(l)}},t=OQ("d-inline-block mr-4")({toggleClass:"btn btn-sm btn-warning",toggleContent:Fe([uE("badge badge-info bg-info text-dark mr-2")("HQ"),en("Override view")]),contentId:"override-view-dropdown-options",content:function(i){return sMe(i.className)({id:i.contentId})([a("")("Reset to normal"),a("upcoming")("Upcoming"),a("live")("Live"),a("recorded")("Recorded")])},ariaLabelInput:lr("Override view options")}),r=vMe("d-inline-block mr-4")({toggleClass:"btn btn-sm btn-warning dropdown-toggle",toggleContent:Fe([uE("badge badge-info bg-info text-dark mr-2")("HQ"),en("Email guest presenter")]),contentId:"email-presenter-dropdown-options",content:function(i){return ya(i.visible)(fMe(i.className)({id:i.contentId})(XQ("dropdown-item")({label:"Email scheduled",path:e.paths.emailPresenter,token:e.authToken})))},closeOnClick:!1,ariaLabelInput:lr("Email presenter options")}),u=ZQ("btn btn-sm btn-warning d-inline-flex align-items-baseline ml-md-4 mr-4 my-3 my-md-0")(ea)({href:e.paths.editStream})([uE("badge badge-info bg-info text-dark mr-2")("HQ"),en("Edit this stream")]);return e.user instanceof S&&e.user.value0.livestreamHost?Fe([u,n,t,KQ(e),r]):aa};var aK="/questions";var _Me=Bo(xv),pMe=ne(tn),dMe=Yn(fr),mMe=k(oe),hMe=Ku(ss),DMe=rn(Xe)(tn),gMe=xr(Yr),RMe=gr(We)(bt),tK=re(on),yMe=_o(ur),rK=So(ur),bMe=W(_a),oK=X0(te)()(),wMe=Ge(Ye),fL=Ge(we),EMe=$r(te),uK=oo(te)()(),IMe=pe(an),iK=mo(te),TMe=Jo(uu(Qu)),lK=Ho(it),SMe=tc(lK),CMe=Gr(lK),FMe=function(e){return function(n){if(vi(n)||_Me(e.streamStatus)(wr.value))return aa;var a=function(r){return function(u){return pMe(dMe(mMe(hMe)(u))(r))(function(i){return DMe(gMe(i>0))(function(){var l=po(i),s=RMe([tK(yMe(l)(60)),":",function(){var h=rK(l)(60)<10;return h?"0":""}(),tK(rK(l)(60))]);return bMe(oK("small badge badge-light bg-light text-dark cursor-default mt-n1")({title:"This question was asked at "+(s+" after the livestream start")})(s))})})}},t=oK("small badge badge-light bg-light text-dark cursor-default mt-n1")({title:"This question was asked before the livestream started"})("0:00");return wMe("card")(fL("card-body")([EMe("mb-2")("Audience questions"),fL("small text-secondary mb-4")([en(` These are questions from the audience that we had time to answer during the live session. If you have any other questions, you can request an answer from `),en(In("")(function(r){return r.firstName+" and other "})(e.presenter)),en("CollegeVine experts in "),uK("")(ea)({href:h6})("an upcoming livestream"),en(" or on the "),uK("")(ea)({href:aK})("Q&A Forum"),en(" anytime.")]),Fe(IMe(n)(function(r){return fL("mt-2")([ze(t)(a(e.onAirTime)(r.time)),iK("ml-1")("@"+r.author.username),iK("mr-2")(":"),en(r.text)])}))]))}},cK=function(e){return FMe(e.conference)(TMe(function(n){return n.time})($o(SMe(CMe(function(n){return n.isFromHQ}))(function(n){return n.isPublic}))(e.pastQuestions)))};var GMe=ec(ax),MMe=Ku(ss),AMe=Aa(),k_=W(yn),sK=rn(Xe),iE=sK($n),vK=Rn(Ne),LMe=Fs(Rr),PMe=Ou(),xMe=re(on),NMe=V0(Ne),jMe=ne(ua),UMe=sK(ua),lE=W(Kn),fK=Fa(Ne),_L=function(){function e(){}return e.value=new e,e}(),_K=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pK=function(e){return function(n){var a=function(l){if(n.lastReported instanceof S)return GMe(MMe(l)(n.lastReported.value0))(30);if(n.lastReported instanceof M)return!0;throw new Error("Failed pattern match at Livestream.Recorded.WatchTimeTracker (line 97, column 7 - line 99, column 24): "+[n.lastReported.constructor.name])},t=AMe(n.currentTime)/60,r=function(){return n.dontReportAnyMore?k_(n):iE(Xa(vK(LMe("Livestream: Recording Watch Time")(cs(Nv(e.conference))(PMe({livestream_recording_watch_last_minute:xMe(po(t))}))))))(function(){return k_({currentTime:n.currentTime,lastReported:n.lastReported,videoPlaying:n.videoPlaying,dontReportAnyMore:!0})})}(),u=qU(e.conference.id)(t),i=iE(NMe(jMe(vK(Zu))(function(l){var s=a(l);return s?UMe(u)(function(){return lE(new S(new _K({when:l})))}):lE(M.value)})))(function(){return k_(n)});return function(l){if(l instanceof _L){if(e.user instanceof S)return i;if(e.user instanceof M)return r;throw new Error("Failed pattern match at Livestream.Recorded.WatchTimeTracker (line 63, column 5 - line 65, column 40): "+[e.user.constructor.name])}if(l instanceof _K)return k_({currentTime:n.currentTime,dontReportAnyMore:n.dontReportAnyMore,videoPlaying:n.videoPlaying,lastReported:new S(l.value0.when)});throw new Error("Failed pattern match at Livestream.Recorded.WatchTimeTracker (line 61, column 22 - line 68, column 44): "+[l.constructor.name])}}},dK=function(e){return function(n){if(n instanceof q1)return iE(fK(lE(_L.value)))(function(){return k_({dontReportAnyMore:e.dontReportAnyMore,videoPlaying:n.value0.playing,currentTime:n.value0.time,lastReported:M.value})});if(n instanceof KA)return iE(fK(lE(_L.value)))(function(){return k_({dontReportAnyMore:e.dontReportAnyMore,lastReported:e.lastReported,videoPlaying:e.videoPlaying,currentTime:n.value0.time})});if(n instanceof GD)return k_(e);throw new Error("Failed pattern match at Livestream.Recorded.WatchTimeTracker (line 108, column 30 - line 122, column 15): "+[n.constructor.name])}},mK=function(){return{videoPlaying:!1,currentTime:0,lastReported:M.value,dontReportAnyMore:!1}}();var hK=br(Ca),pL=lt(hK),OMe=W(yn),kMe=K0(Ye)()(),BMe=ey()(),HMe=pe(oe),qMe=Ge(te),DK=re(on),WMe=Ge(we),JMe=Ba(te),$Me=Ge(Ye),dL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gK="video-recording",RK=function(e){return function(n){return function(a){if(a instanceof jD&&a.value0 instanceof Pe)return pL(dL.create)(function(t){return{video:n.video,watchTimeTracker:t}})(dK(n.watchTimeTracker)(a.value0.value0));if(a instanceof jD)return pL(jD.create)(function(t){return{watchTimeTracker:n.watchTimeTracker,video:t}})(J1(n.video)(a.value0));if(a instanceof dL)return pL(dL.create)(function(t){return{video:n.video,watchTimeTracker:t}})(pK(e)(n.watchTimeTracker)(a.value0));throw new Error("Failed pattern match at Livestream.Recorded (line 91, column 22 - line 102, column 63): "+[a.constructor.name])}}},yK=function(){return ne($n)(_r(hK)(jD.create)($1({videoId:gK,customControls:M.value,allowSound:!0})))(function(e){return OMe({video:e,watchTimeTracker:mK})})}(),zMe=function(){return jo(Vo(We)([Ol.value,new gt(", "),jl.value,new gt(" "),Ul.value,new gt(", "),op.value,new gt(" at "),kl.value,new gt(":"),yi.value,new gt(" "),Bl.value]))}(),bK=function(e){return function(n){return function(a){var t=function(){if(e.conference.watchUrl instanceof S&&e.conference.legacyRecording)return kMe("w-100")({id:gK,controls:!0})(BMe("")({src:e.conference.watchUrl.value0,type:"video/mp4"}));if(e.conference.watchUrl instanceof S)return W1({watchUrl:e.conference.watchUrl.value0,introScreen:PA,errorScreen:wD,autoPlay:!1})(n.video)(function(u){return a(jD.create(u))});if(e.conference.watchUrl instanceof M)return O_(PA);throw new Error("Failed pattern match at Livestream.Recorded (line 70, column 7 - line 88, column 48): "+[e.conference.watchUrl.constructor.name])}(),r=ya(ze(!1)(HMe(e.user)(function(u){return u.livestreamHost})))(Fe([qMe("badge badge-info bg-info text-dark mx-2")("HQ"),en(DK(e.conference.stats.totalAttendances)+(" attended live ("+(ll(e.conference.stats.parentAttendances)("parent, ")("parents, ")+(ll(e.conference.stats.studentAttendances)("student)")("students)")+(" | "+(DK(e.conference.stats.totalRecordingWatchers)+(" watched recording ("+(ll(e.conference.stats.parentRecordingWatchers)("parent, ")("parents, ")+ll(e.conference.stats.studentRecordingWatchers)("student)")("students)")))))))))]));return Fe([WMe("mt-1")([JMe("text-secondary")("Recorded "+zMe(e.conference.scheduledStartTime)),r]),$Me("mx-5 my-4")(t)])}}};var cE=e=>()=>{try{navigator.clipboard.writeText(e)}catch(n){QMe(n),VMe(e)}},VMe=e=>{var n=document.createElement("textarea");document.body.appendChild(n),n.value=e,n.select(),document.execCommand("copy"),document.body.removeChild(n)},QMe=e=>{if(typeof window!="undefined"){let n=new Error("Unable to write text to clipboard using Clipboard API. Falling back to execCommand.");typeof window.Sentry!="undefined"&&window.Sentry.captureException(n,{extra:e})}};var mL=W(yn),wK=rn(Xe),EK=wK($n),KMe=Rn(Ne),YMe=Fa(Ne),XMe=wK(ua),ZMe=W(Kn),eAe=wa(we)()(),hL=Zn(ha),IK=Za(te),TK=wa(te)()(),nAe=a6(te),B_=Ge(Ye),aAe=Jr()(),tAe=Rp(we),UD=Ge(we),rAe=$r(te),oAe=Jt(te),uAe=un(St),DL=function(){function e(){}return e.value=new e,e}(),SK=function(){function e(){}return e.value=new e,e}(),CK=function(){function e(){}return e.value=new e,e}(),FK=function(){function e(){}return e.value=new e,e}(),gL=function(){function e(){}return e.value=new e,e}(),GK=function(){function e(){}return e.value=new e,e}(),MK=function(e){return e.conference.url+"?utm_cv_source=watch-share"},sE=function(e){return function(n){return function(a){if(a instanceof FK)return mL(SK.value);if(a instanceof GK)return EK(Xa(KMe(cE(MK(e)))))(function(){return EK(YMe(XMe(Xt(500))(function(){return ZMe(gL.value)})))(function(){return mL(CK.value)})});if(a instanceof gL)return mL(DL.value);throw new Error("Failed pattern match at Livestream.SharingButton (line 98, column 18 - line 111, column 19): "+[a.constructor.name])}}},vE=function(e){return function(n){return function(a){var t=eAe("btn btn-link d-inline-flex large align-baseline py-1 t--share-button")(ea)({onClick:hL(a)(FK.value)})([IK("fe fe-send mr-2")(""),en("Share")]),r=TK("btn btn-primary btn-sm px-4 t--copy-share-link")(ea)({onClick:hL(a)(GK.value)})("Copy"),u=nAe("btn btn-success btn-sm px-4")(ea)("\u2714 copied!"),i=TK("btn btn-link fe fe-x large p-0")(lr("Cancel"))({onClick:hL(a)(gL.value)})(""),l=function(s){var h=[B_("col-auto pr-0")(IK("fe fe-send text-primary large")("")),B_("col")(aAe("form-control py-0 height-auto")({defaultValue:MK(e)})),B_("col-auto")(s)],p=tAe("")([UD("row align-items-start mb-3 ")([UD("col")([rAe("")(e.conference.title),oAe("")("Copy this link to share")]),B_("col-auto mt-n2")(i)]),UD("row align-items-center")(h)]),y=B_("card ml-2 my-0 t--share-card")(B_("card-body py-1 pl-3 pr-4")(UD("row align-items-center")(uAe(h)([i]))));return Fe([UD("d-inline d-md-none")([t,p]),B_("d-none d-md-inline-block")(y)])};if(n instanceof DL)return t;if(n instanceof SK)return l(r);if(n instanceof CK)return l(u);throw new Error("Failed pattern match at Livestream.SharingButton (line 36, column 3 - line 39, column 44): "+[n.constructor.name])}}},fE=function(){return DL.value}();var AK=rn(Xe)($n),iAe=Fa(Ne),lAe=Nt(jr),cAe=vo(Em),LK=W(Kn),RL=W(yn),sAe=Rn(Ne),yL=Ge(te),vAe=wa(we)()(),PK=Zn(ha),fAe=Ba(te),_Ae=wa(te)()(),pAe=Ge(we),dAe=Za(te),xK=function(){function e(){}return e.value=new e,e}(),NK=function(){function e(){}return e.value=new e,e}(),jK=function(){function e(){}return e.value=new e,e}(),bL=function(){function e(){}return e.value=new e,e}(),wL=function(){function e(){}return e.value=new e,e}(),_E=function(){function e(){}return e.value=new e,e}(),UK=function(){function e(){}return e.value=new e,e}();var OK=function(e){return function(n){return function(a){if(a instanceof wL)return AK(iAe(lAe(cAe(lb({fromConference:M.value,registerForConference:e.conference.id,utmSource:e.paths.utmSource}))(LK(_E.value)))(function(t){return LK(UK.value)})))(function(){return RL(NK.value)});if(a instanceof _E)return AK(Xa(sAe(Uw(ge))))(function(){return RL(bL.value)});if(a instanceof UK)return RL(jK.value);throw new Error("Failed pattern match at Livestream.Register.Authenticated (line 71, column 18 - line 90, column 16): "+[a.constructor.name])}}},kK=function(e){return e.isRegistered?bL.value:xK.value},mAe=function(){return jo(mP(Ol.value))}(),BK=function(e){return function(n){return function(a){return Fe([yL("my-3")("You\u2019ll receive an email reminder before the event."),function(){if(n instanceof xK)return vAe("btn btn-primary w-100 mt-3 t--register")(ea)({onClick:PK(a)(wL.value)})([en("Register "),fAe("text-nowrap")("(one-click)")]);if(n instanceof NK)return yL("alert alert-info")("Registering...");if(n instanceof jK)return Fe([yL("alert alert-danger")("Something went wrong, your registration wasn't completed"),_Ae("btn btn-primary w-100")(ea)({onClick:PK(a)(wL.value)})("Try again")]);if(n instanceof bL)return pAe("bg-soft-success text-success rounded p-3 t--registration-confirmation")([dAe("fe fe-check-circle mr-2")(""),en("You\u2019ve registered \u2013\xA0see you "+(mAe(e.conference.scheduledStartTime)+"!"))]);throw new Error("Failed pattern match at Livestream.Register.Authenticated (line 45, column 5 - line 67, column 10): "+[n.constructor.name])}()])}}};var hAe=Ge(te),DAe=Ge(Ye),HK=lt(br(Ca)),EL=W(yn),pE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),IL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),TL=function(e){return function(n){return function(a){return Fe([hAe("font-weight-bold fw-bold large mb-2")(function(){return e.isRegistered?e.conference.title:"Reserve your spot"}()),function(){if(n instanceof pE)return zp({cancelButton:M.value,autoFocus:!1})(e)(n.value0)(function(t){return a(IL.create(t))});if(n instanceof dE)return BK(e)(n.value0)(function(t){return a(OD.create(t))});throw new Error("Failed pattern match at Livestream.Register (line 45, column 5 - line 47, column 63): "+[n.constructor.name])}(),ya(Ct(e.user))(DAe("text-center small text-muted mt-4")(Kp(e)))])}}},SL=function(e){return function(n){return function(a){return a instanceof IL&&n instanceof pE?HK(IL.create)(pE.create)(Vp(n.value0)(a.value0)):a instanceof OD&&n instanceof dE?HK(OD.create)(dE.create)(OK(e)(n.value0)(a.value0)):EL(n)}}},qK=function(e){if(e.user instanceof S)return EL(new dE(kK(e)));if(e.user instanceof M)return EL(new pE(Qp));throw new Error("Failed pattern match at Livestream.Register (line 36, column 3 - line 38, column 47): "+[e.user.constructor.name])};var fd=Ge(we),gAe=Iv(te),WK=Ba(te),JK=pe(an),RAe=Z0(we)()(),yAe=Jl(),bAe=$t(te),wAe=wv(we),EAe=Rv(Ye),$K=Ds(we),CL=yv(te),IAe=bv(we),FL=Al(te),zK=re(on),TAe=pe(oe),SAe=Ge(te),CAe=wa(te)()(),FAe=Zn(ha),Pi=Ge(Ye),VK=el()(),QK=ne(tn),KK=rn(Xe),GAe=KK(tn),MAe=xr(Yr),YK=br(Ca),mE=lt(YK),kD=W(yn),AAe=KK($n),LAe=ne($n),PAe=_r(YK),hE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),XK=function(){function e(){}return e.value=new e,e}(),H_=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),GL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ZK=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),eY=function(){function e(){}return e.value=new e,e}(),nY=function(e){return function(n){return function(a){var t=Fe([fd("mb-3")([gAe("d-inline")(e.conference.title),vE(e)(n.sharingButton)(function(i){return a(GL.create(i))})]),WK("text-secondary")(d8(e.conference.scheduledStartTime)+(" "+a_)),WK("badge badge-soft-success bg-success-soft ml-2")(ll(e.conference.duration)("min")("mins")),fd("mt-3")(JK(Yo(` `)(e.conference.description))(function(i){return RAe("")({dangerouslySetInnerHTML:{__html:i}})([])}))]),r=yAe({title:bAe("")("Registrations by UTM CV Source"),onDismiss:a(eY.value),body:wAe("table table-sm")([EAe("")($K("")([CL("")("UTM CV Source"),CL("")("Parents"),CL("")("Students")])),IAe("")(JK(e.conference.stats.registrationsBySource)(function(i){return $K("")([FL("")(i.source),FL("")(zK(i.parentCount)),FL("")(zK(i.studentCount))])}))])}),u=ya(ze(!1)(TAe(e.user)(function(i){return i.livestreamHost})))(Fe([SAe("badge badge-info bg-info text-dark mx-2")("HQ"),en(ll(e.conference.stats.totalRegistrations)("total registration: ")("total registrations: ")+(ll(e.conference.stats.parentRegistrations)("parent, ")("parents, ")+ll(e.conference.stats.studentRegistrations)("student")("students"))),CAe("btn btn-link")(ea)({onClick:FAe(a)(new ZK(XK.value))})("Registration by UTM CV Source")]));return Fe([u,Pi("d-none d-lg-block t--upcoming-livestream-registration-card")(fd("row my-4")([Pi("col-lg-4")(Pi("card")(fd("card-body px-0 pt-0")([Pi("row")(Pi("col text-center")(VK("img-fluid rounded-top")({src:e.conference.imageUrl}))),Pi("row mt-4 mx-2")(Pi("col")(TL(e)(n.register)(function(i){return a(H_.create(i))})))]))),fd("col-lg-8")([t,ga(e.conference.guestPresenter)(function(i){return Wh(e.conference.id)(i)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit})}),ga(e.conference.school)(function(i){return Pi("")($h(i))})])])),Pi("d-block d-lg-none")(Pi("row my-4")(fd("col")([VK("img-fluid rounded")({src:e.conference.imageUrl}),Pi("mt-4")(t),Pi("my-4")(TL(e)(n.register)(function(i){return a(H_.create(i))})),Ll(""),ga(e.conference.guestPresenter)(function(i){return Fe([Wh(e.conference.id)(i)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit}),Ll("")])}),ga(e.conference.school)(function(i){return Pi("")($h(i))})]))),ga(n.modal)(function(i){if(i instanceof XK)return r;if(i instanceof hE)return g1(i.value0)(function(l){return a(BD.create(l))});throw new Error("Failed pattern match at Livestream.Upcoming (line 104, column 27 - line 110, column 49): "+[i.constructor.name])})])}}},aY=function(e){return function(n){var a=QK(Pp(e.conference))(function(t){return QK(e.user)(function(r){return GAe(MAe(y1(r)(e.featureFlags)))(function(){return new S(new hE(b1({confirmConferenceRegistration:!0,school:t,conference:e.conference})))})})});return function(t){if(t instanceof H_&&t.value0 instanceof OD&&t.value0.value0 instanceof _E)return mE(H_.create)(function(u){return{sharingButton:n.sharingButton,register:u,modal:a}})(SL(e)(n.register)(t.value0));if(t instanceof H_)return mE(H_.create)(function(u){return{modal:n.modal,sharingButton:n.sharingButton,register:u}})(SL(e)(n.register)(t.value0));if(t instanceof GL)return mE(GL.create)(function(u){return{modal:n.modal,register:n.register,sharingButton:u}})(sE(e)(n.sharingButton)(t.value0));if(t instanceof ZK)return kD({register:n.register,sharingButton:n.sharingButton,modal:new S(t.value0)});if(t instanceof eY)return kD({register:n.register,sharingButton:n.sharingButton,modal:M.value});if(t instanceof BD&&t.value0 instanceof wn)return AAe(Xa(cb))(function(){return kD({register:n.register,sharingButton:n.sharingButton,modal:M.value})});var r=function(u){if(t instanceof BD&&t.value0 instanceof Pe&&$e)return kD(n);throw new Error("Failed pattern match at Livestream.Upcoming (line 166, column 1 - line 166, column 76): "+[t.constructor.name])};return t instanceof BD&&t.value0 instanceof Pe&&n.modal instanceof S&&n.modal.value0 instanceof hE?mE(BD.create)(function(u){return{register:n.register,sharingButton:n.sharingButton,modal:new S(new hE(u))}})(R1(n.modal.value0.value0)(new Pe(t.value0.value0))):r(!0)}}},tY=function(e){return LAe(PAe(H_.create)(qK(e)))(function(n){return kD({register:n,sharingButton:fE,modal:M.value})})};var ML=Ge(we),xAe=Iv(we),NAe=Ge(te),jAe=oo(we)()(),rY=Za(te),oY=Ge(Ye),UAe=z1()(),OAe=Zn(ha),kAe=Fs(Rr),BAe=Ou(),HAe=Xu(Ne),Ws=La(),uY=H({reflectSymbol:function(){return"presenter"}}),iY=H({reflectSymbol:function(){return"id"}}),lY=iY(cn),ri=Ya(de),qAe=Ei(Ws(H({reflectSymbol:function(){return"collegeFair"}})(Sa)(H({reflectSymbol:function(){return"description"}})(de)(H({reflectSymbol:function(){return"duration"}})(cn)(H({reflectSymbol:function(){return"guestPresenter"}})(Ya(Ws(uY(xf)(H({reflectSymbol:function(){return"type"}})(de)(ln)))))(lY(H({reflectSymbol:function(){return"imageUrl"}})(de)(H({reflectSymbol:function(){return"isPrivate"}})(Sa)(H({reflectSymbol:function(){return"legacyRecording"}})(Sa)(H({reflectSymbol:function(){return"onAirTime"}})(ri)(H({reflectSymbol:function(){return"partnerType"}})(ri)(H({reflectSymbol:function(){return"polls"}})(Pa(Ws(H({reflectSymbol:function(){return"poll"}})(Ws(H({reflectSymbol:function(){return"autoDisplayMinutesFromStart"}})(Ya(cn))(lY(H({reflectSymbol:function(){return"multiSelect"}})(Sa)(H({reflectSymbol:function(){return"options"}})(Pa(de))(H({reflectSymbol:function(){return"question"}})(de)(ln)))))))(H({reflectSymbol:function(){return"status"}})(de)(ln)))))(uY(Ya(Ws(H({reflectSymbol:function(){return"admissionsStory"}})(ri)(H({reflectSymbol:function(){return"allStreamsUrl"}})(ri)(H({reflectSymbol:function(){return"firstName"}})(de)(H({reflectSymbol:function(){return"fullName"}})(de)(H({reflectSymbol:function(){return"gradCollege"}})(ri)(H({reflectSymbol:function(){return"pictureUrl"}})(ri)(H({reflectSymbol:function(){return"totalStreams"}})(cn)(H({reflectSymbol:function(){return"undergrad"}})(Ws(H({reflectSymbol:function(){return"college"}})(ri)(H({reflectSymbol:function(){return"major"}})(ri)(H({reflectSymbol:function(){return"year"}})(ri)(ln)))))(H({reflectSymbol:function(){return"workExperience"}})(ri)(ln))))))))))))(H({reflectSymbol:function(){return"scheduledStartTime"}})(de)(H({reflectSymbol:function(){return"school"}})(Ya(Ws(H({reflectSymbol:function(){return"cityState"}})(de)(iY(de)(H({reflectSymbol:function(){return"name"}})(de)(H({reflectSymbol:function(){return"slug"}})(de)(ln)))))))(H({reflectSymbol:function(){return"stats"}})(Ws(H({reflectSymbol:function(){return"parentAttendances"}})(cn)(H({reflectSymbol:function(){return"parentRecordingWatchers"}})(cn)(H({reflectSymbol:function(){return"parentRegistrations"}})(cn)(H({reflectSymbol:function(){return"registrationsBySource"}})(Pa(Ws(H({reflectSymbol:function(){return"parentCount"}})(cn)(H({reflectSymbol:function(){return"source"}})(de)(H({reflectSymbol:function(){return"studentCount"}})(cn)(ln))))))(H({reflectSymbol:function(){return"studentAttendances"}})(cn)(H({reflectSymbol:function(){return"studentRecordingWatchers"}})(cn)(H({reflectSymbol:function(){return"studentRegistrations"}})(cn)(H({reflectSymbol:function(){return"totalAttendances"}})(cn)(H({reflectSymbol:function(){return"totalRecordingWatchers"}})(cn)(H({reflectSymbol:function(){return"totalRegistrations"}})(cn)(ln))))))))))))(H({reflectSymbol:function(){return"streamStatus"}})(de)(H({reflectSymbol:function(){return"streamingStartTime"}})(ri)(H({reflectSymbol:function(){return"tailTime"}})(cn)(H({reflectSymbol:function(){return"title"}})(de)(H({reflectSymbol:function(){return"uid"}})(de)(H({reflectSymbol:function(){return"url"}})(de)(H({reflectSymbol:function(){return"watchUrl"}})(ri)(H({reflectSymbol:function(){return"zoomJoinUrl"}})(ri)(H({reflectSymbol:function(){return"zoomStartUrl"}})(ri)(ln))))))))))))))))))))))))))(Ne),WAe=dc(vv),Js=W(Kn),cY=ne(ua),JAe=Rn(Ne),$Ae=ec(Qu),zAe=qa(ua),VAe=eK(Ne),QAe=Ee(Qt(vL)),sY=rn(Xe),AL=sY(ua),KAe=or(Kn),LL=ne($n),vY=br(Ca),PL=_r(vY),Ql=W(yn),xL=un(St),DE=k(an),YAe=Ml()(),XAe=Ee(Qt(Yc)),ZAe=k(oe),eLe=W(_a),nLe=KR({reflectSymbol:function(){return"ctas"}})()(),aLe=KR({reflectSymbol:function(){return"pusher"}})()(),q_=sY($n),gE=Fa(Ne),NL=or(yn),jL=Ee(vL),tLe=k(Ca),RE=lt(vY),rLe=pe(oe),UL=function(){function e(){}return e.value=new e,e}(),HD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),qD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fY=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_Y=function(){function e(){}return e.value=new e,e}(),bE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wE=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OL=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pY=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dY=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oLe=function(e){if(e instanceof qc)return"Upcoming";if(e instanceof Li)return"Live";if(e instanceof Vl)return"Recorded";throw new Error("Failed pattern match at Livestream.Livestream (line 259, column 12 - line 262, column 33): "+[e.constructor.name])},uLe=function(e){if(e instanceof UL)return M.value;if(e instanceof HD)return new S(qc.value);if(e instanceof qD)return new S(Li.value);if(e instanceof WD)return new S(Vl.value);throw new Error("Failed pattern match at Livestream.Livestream (line 252, column 12 - line 256, column 42): "+[e.constructor.name])},mY=function(e){return function(n){var a=ML("")([xAe("d-inline")([ya(e.conference.isPrivate)(NAe("badge badge-info bg-info text-dark mr-2 mt-n1")("HQ")),en(e.conference.title)]),vE(e)(e.sharingButton)(function(r){return n(OL.create(r))})]),t=jAe("d-flex align-items-center")(ea)({href:e.paths.home})([rY("fe fe-grid mr-3")(""),rY("fe fe-arrow-left mr-2")(""),en("See all livestreams")]);return ML("mt-4 t--stream-page")([ML("row align-items-center mb-4")([oY("col-12 col-md-auto")(t),oY("col-12 col-md")(nK(e)),UAe({hashchange:OAe(n)(new yE({firstLoad:!1}))})]),function(){if(e.view instanceof UL)return Fe([a,Ew(e)]);if(e.view instanceof HD)return nY(e)(e.view.value0)(function(r){return n(bE.create(r))});if(e.view instanceof qD)return Fe([a,GQ(e)(e.view.value0)(function(r){return n(JD.create(r))}),Ew(e)]);if(e.view instanceof WD)return Fe([a,bK(e)(e.view.value0)(function(r){return n(wE.create(r))}),Ew(e)]);throw new Error("Failed pattern match at Livestream.Livestream (line 147, column 5 - line 163, column 10): "+[e.view.constructor.name])}(),function(){return e.user instanceof S&&e.user.value0.livestreamHost?cK(e):aa}()])}},iLe=function(e){var n=Rn(e);return function(a){return function(t){return n(kAe("Livestream: Page View")(cs(Nv(a.conference))(BAe({livestream_page_view:oLe(t)}))))}}},hY=iLe(Ne),DY=function(e){return HAe(function(n){return pY.create(ah(n))})(qAe(e.pusher.dataChannel)("update-conference"))},lLe=function(e){return function(n){var a=ze(e.conference.scheduledStartTime)(WAe(-15)(e.conference.scheduledStartTime)),t=function(r){if(r instanceof S)return Js(r.value0);if(r instanceof M){if(e.conference.streamStatus instanceof zr)return Js(Li.value);if(e.conference.streamStatus instanceof wr)return Js(Vl.value);if(e.conference.streamStatus instanceof bu)return cY(JAe(t_))(function(u){var i=$Ae(u)(a);return Js(i?Li.value:qc.value)});throw new Error("Failed pattern match at Livestream.Livestream (line 287, column 27 - line 301, column 32): "+[e.conference.streamStatus.constructor.name])}throw new Error("Failed pattern match at Livestream.Livestream (line 285, column 5 - line 286, column 18): "+[r.constructor.name])};return cY(zAe(t)(VAe(e)))(function(r){var u=QAe(uLe(e.view))(new S(r));return u?AL(KAe(n.firstLoad)(hY(e)(r)))(function(){return Js(_Y.value)}):AL(hY(e)(r))(function(){return Js(new fY(r))})})}},gY=function(e){return function(n){if(n instanceof qc)return LL(PL(bE.create)(tY(e)))(function(a){return Ql({allowedGradYears:e.allowedGradYears,authToken:e.authToken,conference:e.conference,ctas:e.ctas,featureFlags:e.featureFlags,isPrivilegedUser:e.isPrivilegedUser,isRegistered:e.isRegistered,pastQuestions:e.pastQuestions,paths:e.paths,pusher:e.pusher,sharingButton:e.sharingButton,showRecordedCta:e.showRecordedCta,user:e.user,videoLagSeconds:e.videoLagSeconds,vineBelowConnectionLimit:e.vineBelowConnectionLimit,view:new HD(a)})});if(n instanceof Li)return LL(PL(JD.create)(FQ(e)))(function(a){return Ql({allowedGradYears:e.allowedGradYears,authToken:e.authToken,conference:e.conference,ctas:e.ctas,featureFlags:e.featureFlags,isPrivilegedUser:e.isPrivilegedUser,isRegistered:e.isRegistered,pastQuestions:e.pastQuestions,paths:e.paths,pusher:e.pusher,sharingButton:e.sharingButton,showRecordedCta:e.showRecordedCta,user:e.user,videoLagSeconds:e.videoLagSeconds,vineBelowConnectionLimit:e.vineBelowConnectionLimit,view:new qD(a)})});if(n instanceof Vl)return LL(PL(wE.create)(yK))(function(a){return Ql({allowedGradYears:e.allowedGradYears,authToken:e.authToken,conference:e.conference,ctas:e.ctas,featureFlags:e.featureFlags,isPrivilegedUser:e.isPrivilegedUser,isRegistered:e.isRegistered,pastQuestions:e.pastQuestions,paths:e.paths,pusher:e.pusher,sharingButton:e.sharingButton,showRecordedCta:e.showRecordedCta,user:e.user,videoLagSeconds:e.videoLagSeconds,vineBelowConnectionLimit:e.vineBelowConnectionLimit,view:new WD(a)})});throw new Error("Failed pattern match at Livestream.Livestream (line 305, column 20 - line 314, column 41): "+[n.constructor.name])}},RY=function(e){var n=function(r){return xL(DE(cl.create)(r.eventCtas))(xL(DE(sl.create)(r.generalCtas))(xL(DE(vl.create)(r.featuredServiceProviderCtas))(DE(fl.create)(r.referralCtas))))},a=YAe({view:UL.value,sharingButton:fE,pusher:e.pusher,ctas:n(e.ctas),isPrivilegedUser:XAe(ZAe(function(r){return r.livestreamHost})(e.user))(eLe(!0)),vineBelowConnectionLimit:e.vineBelowConnectionLimit})(nLe(Qa.value)(aLe(Qa.value)(e))),t=function(){if(a.conference.streamStatus instanceof zr)return Li.value;if(a.conference.streamStatus instanceof wr)return Vl.value;if(a.conference.streamStatus instanceof bu)return qc.value;throw new Error("Failed pattern match at Livestream.Livestream (line 132, column 19 - line 135, column 44): "+[a.conference.streamStatus.constructor.name])}();return q_(gE(Js(new yE({firstLoad:!0}))))(function(){return q_(NL(jL(t)(Li.value))(DY(a)))(function(){return gY(a)(t)})})},yY=function(e){var n=gE(AL(Xt(1e4))(function(){return Js(new yE({firstLoad:!1}))}));return function(a){if(a instanceof fY)return q_(n)(function(){return q_(NL(jL(a.value0)(Vl.value))(gE(tLe(dY.create)(sb(e.conference.id)))))(function(){return q_(NL(jL(a.value0)(Li.value))(DY(e)))(function(){return gY(e)(a.value0)})})});if(a instanceof yE)return q_(gE(lLe(e)(a.value0)))(function(){return Ql(e)});if(a instanceof _Y)return q_(n)(function(){return Ql(e)});if(a instanceof bE)return e.view instanceof HD?RE(bE.create)(function(t){return{allowedGradYears:e.allowedGradYears,authToken:e.authToken,conference:e.conference,ctas:e.ctas,featureFlags:e.featureFlags,isPrivilegedUser:e.isPrivilegedUser,isRegistered:e.isRegistered,pastQuestions:e.pastQuestions,paths:e.paths,pusher:e.pusher,sharingButton:e.sharingButton,showRecordedCta:e.showRecordedCta,user:e.user,videoLagSeconds:e.videoLagSeconds,vineBelowConnectionLimit:e.vineBelowConnectionLimit,view:new HD(t)}})(aY(e)(e.view.value0)(a.value0)):Ql(e);if(a instanceof JD&&a.value0 instanceof wn)return Ql({allowedGradYears:e.allowedGradYears,authToken:e.authToken,conference:e.conference,ctas:e.ctas,featureFlags:e.featureFlags,isPrivilegedUser:e.isPrivilegedUser,isRegistered:e.isRegistered,pastQuestions:e.pastQuestions,paths:e.paths,pusher:e.pusher,sharingButton:e.sharingButton,showRecordedCta:e.showRecordedCta,videoLagSeconds:e.videoLagSeconds,view:e.view,vineBelowConnectionLimit:e.vineBelowConnectionLimit,user:rLe(e.user)(function(t){return{cvid:t.cvid,dismissedNetworkSettingsModalAt:t.dismissedNetworkSettingsModalAt,hasAccessToNetwork:t.hasAccessToNetwork,livestreamHost:t.livestreamHost,profile:t.profile,username:new S(a.value0.value0)}})});if(a instanceof JD)return e.view instanceof qD?RE(JD.create)(function(t){return{allowedGradYears:e.allowedGradYears,authToken:e.authToken,conference:e.conference,ctas:e.ctas,featureFlags:e.featureFlags,isPrivilegedUser:e.isPrivilegedUser,isRegistered:e.isRegistered,pastQuestions:e.pastQuestions,paths:e.paths,pusher:e.pusher,sharingButton:e.sharingButton,showRecordedCta:e.showRecordedCta,user:e.user,videoLagSeconds:e.videoLagSeconds,vineBelowConnectionLimit:e.vineBelowConnectionLimit,view:new qD(t)}})(CQ(e)(e.view.value0)(a.value0)):Ql(e);if(a instanceof wE)return e.view instanceof WD?RE(wE.create)(function(t){return{allowedGradYears:e.allowedGradYears,authToken:e.authToken,conference:e.conference,ctas:e.ctas,featureFlags:e.featureFlags,isPrivilegedUser:e.isPrivilegedUser,isRegistered:e.isRegistered,pastQuestions:e.pastQuestions,paths:e.paths,pusher:e.pusher,sharingButton:e.sharingButton,showRecordedCta:e.showRecordedCta,user:e.user,videoLagSeconds:e.videoLagSeconds,vineBelowConnectionLimit:e.vineBelowConnectionLimit,view:new WD(t)}})(RK(e)(e.view.value0)(a.value0)):Ql(e);if(a instanceof OL)return RE(OL.create)(function(t){return{allowedGradYears:e.allowedGradYears,authToken:e.authToken,conference:e.conference,ctas:e.ctas,featureFlags:e.featureFlags,isPrivilegedUser:e.isPrivilegedUser,isRegistered:e.isRegistered,pastQuestions:e.pastQuestions,paths:e.paths,pusher:e.pusher,showRecordedCta:e.showRecordedCta,user:e.user,videoLagSeconds:e.videoLagSeconds,view:e.view,vineBelowConnectionLimit:e.vineBelowConnectionLimit,sharingButton:t}})(sE(e)(e.sharingButton)(a.value0));if(a instanceof pY)return Ql({allowedGradYears:e.allowedGradYears,authToken:e.authToken,ctas:e.ctas,featureFlags:e.featureFlags,isPrivilegedUser:e.isPrivilegedUser,isRegistered:e.isRegistered,pastQuestions:e.pastQuestions,paths:e.paths,pusher:e.pusher,sharingButton:e.sharingButton,showRecordedCta:e.showRecordedCta,user:e.user,videoLagSeconds:e.videoLagSeconds,view:e.view,vineBelowConnectionLimit:e.vineBelowConnectionLimit,conference:a.value0});if(a instanceof dY)return Ql({allowedGradYears:e.allowedGradYears,authToken:e.authToken,conference:e.conference,ctas:e.ctas,featureFlags:e.featureFlags,isPrivilegedUser:e.isPrivilegedUser,isRegistered:e.isRegistered,paths:e.paths,pusher:e.pusher,sharingButton:e.sharingButton,showRecordedCta:e.showRecordedCta,user:e.user,videoLagSeconds:e.videoLagSeconds,view:e.view,vineBelowConnectionLimit:e.vineBelowConnectionLimit,pastQuestions:a.value0});throw new Error("Failed pattern match at Livestream.Livestream (line 190, column 16 - line 244, column 38): "+[a.constructor.name])}};var EE=function(e){return function(){console.error(e)}};var CY=function(e){var n=Rn(e);return function(a){return n(EE(a))}};var pLe=W(ft),FY=ne(er),dLe=k(Hn),mLe=CY(Rr),GY=function(e){var n=function(t){var r=e(t);return oS(r.view(r.init.value0)(hn(pLe(ge))))},a=function(t){return function(r){return function(u){return function(){var l=FY(FY(Zo)(function(){var h=dLe(Fy);return function(p){return h(Lv(p))}}()))(Sy(r))();if(l instanceof M)return mLe("Element #"+(r+" not found"))();if(l instanceof S){var s=cj(e(u))();return t(s)(l.value0)()}throw new Error("Failed pattern match at Elmish.Boot (line 117, column 11 - line 122, column 21): "+[l.constructor.name])}}}};return{mount:a($N),renderToString:n,hydrate:a(zN)}};var hLe=ta(py),DLe=ne(Au),MY=W(yn),AY=function(e){var n=Nf(e);return function(a){return GY(hLe({parse:function(t){return DLe(n(t))(function(r){return In(new xe("Component construction failed"))(Oe.create)(a.def(r))})},diagnosticName:"Props for "+a.diagnosticName,default:{init:MY(ge),update:function(t){return function(r){return MY(ge)}},view:function(t){return function(r){return aa}}}}))}};var LY=pe(an),gLe=k(an),RLe=pe(oe),yLe=k(oe),bLe=ne(tn),mr=La(),PY=H({reflectSymbol:function(){return"collegeFair"}}),xY=H({reflectSymbol:function(){return"description"}}),NY=H({reflectSymbol:function(){return"presenter"}}),jY=H({reflectSymbol:function(){return"id"}}),W_=jY(cn),wo=Ya(de),UY=H({reflectSymbol:function(){return"autoDisplayMinutesFromStart"}})(Ya(cn)),OY=H({reflectSymbol:function(){return"fullName"}}),kY=H({reflectSymbol:function(){return"name"}})(de),kL=H({reflectSymbol:function(){return"title"}})(de),BY=H({reflectSymbol:function(){return"url"}})(de),HY=kL(ln),qY=H({reflectSymbol:function(){return"cvid"}})(de),WY=H({reflectSymbol:function(){return"username"}}),wLe=W(_a),ELe=function(){var e=function(t){var r=ei(t.startTime);if(r instanceof S)return new S({registrationPath:t.registrationPath,title:t.title,conferenceId:t.conferenceId,startTime:r.value0});if(r instanceof M)return xl(gc)("Unable to parse livestream CTA start time")({value:t.startTime})(function(u){return M.value});throw new Error("Failed pattern match at EntryPoints.Livestream.Livestream (line 67, column 7 - line 75, column 26): "+[r.constructor.name])},n=function(t){return{featuredServiceProviderCtas:t.featuredServiceProviderCtas,eventCtas:Xr(e)(t.eventCtas),generalCtas:LY(t.generalCtas)(EC),referralCtas:LY(t.referralCtas)(wC)}},a=function(t){return{allowedGradYears:t.allowedGradYears,authToken:t.authToken,featureFlags:t.featureFlags,isRegistered:t.isRegistered,paths:t.paths,pusher:t.pusher,showRecordedCta:t.showRecordedCta,videoLagSeconds:t.videoLagSeconds,conference:ah(t.conference),pastQuestions:In([])(gLe(r_))(_e(t.pastQuestions)),user:RLe(_e(t.user))(function(r){return{cvid:r.cvid,hasAccessToNetwork:r.hasAccessToNetwork,livestreamHost:r.livestreamHost,username:_e(r.username),profile:yLe(C7)(_e(r.profile)),dismissedNetworkSettingsModalAt:bLe(_e(r.dismissedNetworkSettingsModalAt))(ei)}}),ctas:n(t.ctas),vineBelowConnectionLimit:_e(t.vineBelowConnectionLimit)}};return AY(mr(H({reflectSymbol:function(){return"allowedGradYears"}})(Pa(cn))(H({reflectSymbol:function(){return"authToken"}})(de)(H({reflectSymbol:function(){return"conference"}})(mr(PY(Sa)(xY(de)(H({reflectSymbol:function(){return"duration"}})(cn)(H({reflectSymbol:function(){return"guestPresenter"}})(Ya(mr(NY(xf)(H({reflectSymbol:function(){return"type"}})(de)(ln)))))(W_(H({reflectSymbol:function(){return"imageUrl"}})(de)(H({reflectSymbol:function(){return"isPrivate"}})(Sa)(H({reflectSymbol:function(){return"legacyRecording"}})(Sa)(H({reflectSymbol:function(){return"onAirTime"}})(wo)(H({reflectSymbol:function(){return"partnerType"}})(wo)(H({reflectSymbol:function(){return"polls"}})(Pa(mr(H({reflectSymbol:function(){return"poll"}})(mr(UY(W_(H({reflectSymbol:function(){return"multiSelect"}})(Sa)(H({reflectSymbol:function(){return"options"}})(Pa(de))(H({reflectSymbol:function(){return"question"}})(de)(ln)))))))(H({reflectSymbol:function(){return"status"}})(de)(ln)))))(NY(Ya(mr(H({reflectSymbol:function(){return"admissionsStory"}})(wo)(H({reflectSymbol:function(){return"allStreamsUrl"}})(wo)(H({reflectSymbol:function(){return"firstName"}})(de)(OY(de)(H({reflectSymbol:function(){return"gradCollege"}})(wo)(H({reflectSymbol:function(){return"pictureUrl"}})(wo)(H({reflectSymbol:function(){return"totalStreams"}})(cn)(H({reflectSymbol:function(){return"undergrad"}})(mr(H({reflectSymbol:function(){return"college"}})(wo)(H({reflectSymbol:function(){return"major"}})(wo)(H({reflectSymbol:function(){return"year"}})(wo)(ln)))))(H({reflectSymbol:function(){return"workExperience"}})(wo)(ln))))))))))))(H({reflectSymbol:function(){return"scheduledStartTime"}})(de)(H({reflectSymbol:function(){return"school"}})(Ya(mr(H({reflectSymbol:function(){return"cityState"}})(de)(jY(de)(kY(H({reflectSymbol:function(){return"slug"}})(de)(ln)))))))(H({reflectSymbol:function(){return"stats"}})(mr(H({reflectSymbol:function(){return"parentAttendances"}})(cn)(H({reflectSymbol:function(){return"parentRecordingWatchers"}})(cn)(H({reflectSymbol:function(){return"parentRegistrations"}})(cn)(H({reflectSymbol:function(){return"registrationsBySource"}})(Pa(mr(H({reflectSymbol:function(){return"parentCount"}})(cn)(H({reflectSymbol:function(){return"source"}})(de)(H({reflectSymbol:function(){return"studentCount"}})(cn)(ln))))))(H({reflectSymbol:function(){return"studentAttendances"}})(cn)(H({reflectSymbol:function(){return"studentRecordingWatchers"}})(cn)(H({reflectSymbol:function(){return"studentRegistrations"}})(cn)(H({reflectSymbol:function(){return"totalAttendances"}})(cn)(H({reflectSymbol:function(){return"totalRecordingWatchers"}})(cn)(H({reflectSymbol:function(){return"totalRegistrations"}})(cn)(ln))))))))))))(H({reflectSymbol:function(){return"streamStatus"}})(de)(H({reflectSymbol:function(){return"streamingStartTime"}})(wo)(H({reflectSymbol:function(){return"tailTime"}})(cn)(kL(H({reflectSymbol:function(){return"uid"}})(de)(BY(H({reflectSymbol:function(){return"watchUrl"}})(wo)(H({reflectSymbol:function(){return"zoomJoinUrl"}})(wo)(H({reflectSymbol:function(){return"zoomStartUrl"}})(wo)(ln))))))))))))))))))))))))))(H({reflectSymbol:function(){return"ctas"}})(mr(H({reflectSymbol:function(){return"eventCtas"}})(Pa(mr(H({reflectSymbol:function(){return"conferenceId"}})(cn)(H({reflectSymbol:function(){return"registrationPath"}})(de)(H({reflectSymbol:function(){return"startTime"}})(de)(HY))))))(H({reflectSymbol:function(){return"featuredServiceProviderCtas"}})(Pa(mr(W_(H({reflectSymbol:function(){return"linkText"}})(de)(H({reflectSymbol:function(){return"providers"}})(Pa(mr(H({reflectSymbol:function(){return"avatarUrl"}})(de)(W_(H({reflectSymbol:function(){return"linkUrl"}})(de)(H({reflectSymbol:function(){return"location"}})(de)(kY(ln))))))))(ln))))))(H({reflectSymbol:function(){return"generalCtas"}})(Pa(mr(UY(H({reflectSymbol:function(){return"buttonText"}})(de)(W_(kL(BY(ln))))))))(H({reflectSymbol:function(){return"referralCtas"}})(Pa(mr(xY(wo)(W_(H({reflectSymbol:function(){return"requireAnonymousUserEmail"}})(Sa)(H({reflectSymbol:function(){return"requireAnonymousUserFirstName"}})(Sa)(H({reflectSymbol:function(){return"requireAnonymousUserLastName"}})(Sa)(H({reflectSymbol:function(){return"requireReferredUserFirstName"}})(Sa)(H({reflectSymbol:function(){return"requireReferredUserLastName"}})(Sa)(HY))))))))))(ln))))))(H({reflectSymbol:function(){return"featureFlags"}})(mr(H({reflectSymbol:function(){return"mkt293LivestreamsEssayReviewCtaForAdvisorStreams"}})(Sa)(H({reflectSymbol:function(){return"rcr834NetworkSettingsModal"}})(Sa)(ln))))(H({reflectSymbol:function(){return"isRegistered"}})(Sa)(H({reflectSymbol:function(){return"pastQuestions"}})(Ya(Pa(mr(H({reflectSymbol:function(){return"author"}})(mr(qY(WY(de)(ln))))(W_(H({reflectSymbol:function(){return"isFromHQ"}})(Sa)(H({reflectSymbol:function(){return"isPublic"}})(Sa)(H({reflectSymbol:function(){return"text"}})(de)(H({reflectSymbol:function(){return"time"}})(de)(ln))))))))))(H({reflectSymbol:function(){return"paths"}})(mr(PY(de)(H({reflectSymbol:function(){return"editStream"}})(de)(H({reflectSymbol:function(){return"emailPresenter"}})(de)(H({reflectSymbol:function(){return"home"}})(de)(H({reflectSymbol:function(){return"streamReport"}})(de)(H({reflectSymbol:function(){return"termsAndConditions"}})(de)(H({reflectSymbol:function(){return"utmSource"}})(de)(ln)))))))))(H({reflectSymbol:function(){return"pusher"}})(mr(H({reflectSymbol:function(){return"dataChannel"}})(ub)(H({reflectSymbol:function(){return"presenceChannel"}})(ub)(ln))))(H({reflectSymbol:function(){return"showRecordedCta"}})(Sa)(H({reflectSymbol:function(){return"user"}})(Ya(mr(qY(H({reflectSymbol:function(){return"dismissedNetworkSettingsModalAt"}})(wo)(H({reflectSymbol:function(){return"hasAccessToNetwork"}})(Sa)(H({reflectSymbol:function(){return"livestreamHost"}})(Sa)(H({reflectSymbol:function(){return"profile"}})(Ya(mr(H({reflectSymbol:function(){return"autoRequestFromLivestreams"}})(Sa)(OY(wo)(H({reflectSymbol:function(){return"publishScope"}})(de)(ln))))))(WY(wo)(ln)))))))))(H({reflectSymbol:function(){return"videoLagSeconds"}})(cn)(H({reflectSymbol:function(){return"vineBelowConnectionLimit"}})(Ya(Sa))(ln)))))))))))))))({def:function(t){return wLe({init:RY(a(t)),view:mY,update:yY})},diagnosticName:"Livestream page"})}();return ILe;})(); /* object-assign (c) Sindre Sorhus @license MIT */ /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /*! * Pusher JavaScript Library v6.0.3 * https://pusher.com/ * * Copyright 2020, Pusher * Released under the MIT licence. */ /*! * focus-trap 6.9.4 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE */ /*! * tabbable 5.3.3 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ /** @license React v16.13.1 * react-is.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. */ /** @license React v17.0.2 * react-dom-server.browser.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. */ /** @license React v17.0.2 * 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. */