var Purs_EntryPoints_Livestream_Livestream=(()=>{var zre=Object.create;var nb=Object.defineProperty;var Vre=Object.getOwnPropertyDescriptor;var Qre=Object.getOwnPropertyNames;var Kre=Object.getPrototypeOf,Yre=Object.prototype.hasOwnProperty;var Xre=(e,n)=>()=>(e&&(n=e(e=0)),n);var He=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),$4=(e,n)=>{for(var a in n)nb(e,a,{get:n[a],enumerable:!0})},W4=(e,n,a,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Qre(n))!Yre.call(e,r)&&r!==a&&nb(e,r,{get:()=>n[r],enumerable:!(t=Vre(n,r))||t.enumerable});return e};var pl=(e,n,a)=>(a=e!=null?zre(Kre(e)):{},W4(n||!e||!e.__esModule?nb(a,"default",{value:e,enumerable:!0}):a,e)),Ng=e=>W4(nb({},"__esModule",{value:!0}),e);var Do={};$4(Do,{Children:()=>Gp,Component:()=>Mp,Fragment:()=>XG,PureComponent:()=>tse,Suspense:()=>rse,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>ese,cloneElement:()=>kD,createContext:()=>YG,createElement:()=>nr,createRef:()=>g1,default:()=>vt,forwardRef:()=>rc,isValidElement:()=>ZG,lazy:()=>nse,memo:()=>ase,useCallback:()=>BD,useContext:()=>ose,useDebugValue:()=>use,useEffect:()=>Lr,useImperativeHandle:()=>Gf,useLayoutEffect:()=>HD,useMemo:()=>JD,useReducer:()=>ise,useRef:()=>Kt,useState:()=>As,version:()=>lse});var vt,ese,Gp,kD,Mp,YG,nr,g1,rc,XG,ZG,nse,ase,tse,rse,BD,ose,use,Lr,Gf,HD,JD,ise,Kt,As,lse,Et=Xre(()=>{vt=window.React,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ese,Children:Gp,cloneElement:kD,Component:Mp,createContext:YG,createElement:nr,createRef:g1,forwardRef:rc,Fragment:XG,isValidElement:ZG,lazy:nse,memo:ase,PureComponent:tse,Suspense:rse,useCallback:BD,useContext:ose,useDebugValue:use,useEffect:Lr,useImperativeHandle:Gf,useLayoutEffect:HD,useMemo:JD,useReducer:ise,useRef:Kt,useState:As,version:lse}=window.React});var W6=He((MVe,$6)=>{"use strict";var q6=Object.getOwnPropertySymbols,Gse=Object.prototype.hasOwnProperty,Mse=Object.prototype.propertyIsEnumerable;function Ase(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Lse(){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}}$6.exports=Lse()?Object.assign:function(e,n){for(var a,t=Ase(e),r,u=1;u{"use strict";var Ls=W6(),Mf=(Et(),Ng(Do));function Eo(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;axD;xD++)ii[xD]=xD+1;var ii,xD;ii[15]=0;var Ose=/^[: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]*$/,x6=Object.prototype.hasOwnProperty,j6={},z6={};function iU(e){return x6.call(z6,e)?!0:x6.call(j6,e)?!1:Ose.test(e)?z6[e]=!0:(j6[e]=!0,!1)}function Use(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 kse(e,n,a,t){if(n===null||typeof n>"u"||Use(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 tl(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 li={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){li[e]=new tl(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];li[n]=new tl(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){li[e]=new tl(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){li[e]=new tl(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){li[e]=new tl(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){li[e]=new tl(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){li[e]=new tl(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){li[e]=new tl(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){li[e]=new tl(e,5,!1,e.toLowerCase(),null,!1,!1)});var fM=/[\-:]([a-z])/g;function _M(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(fM,_M);li[n]=new tl(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(fM,_M);li[n]=new tl(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(fM,_M);li[n]=new tl(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){li[e]=new tl(e,1,!1,e.toLowerCase(),null,!1,!1)});li.xlinkHref=new tl("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){li[e]=new tl(e,1,!1,e.toLowerCase(),null,!0,!0)});var Bse=/["'&<>]/;function Pp(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var n=Bse.exec(e);if(n){var a="",t,r=0;for(t=n.index;tI1))throw Error(Eo(301));if(e===yv)if(E1=!0,e={action:a,next:null},x_===null&&(x_=new Map),a=x_.get(n),a===void 0)x_.set(n,e);else{for(n=a;n.next!==null;)n=n.next;n.next=e}}function nM(){}var Op=null,Wse={readContext:function(e){var n=Op.threadID;return QD(e,n),e[n]},useContext:function(e){Np();var n=Op.threadID;return QD(e,n),e[n]},useMemo:K6,useReducer:Q6,useRef:function(e){yv=Np(),no=pM();var n=no.memoizedState;return n===null?(e={current:e},no.memoizedState=e):n},useState:function(e){return Q6(sU,e)},useLayoutEffect:function(){},useCallback:function(e,n){return K6(function(){return e},n)},useImperativeHandle:nM,useEffect:nM,useDebugValue:nM,useDeferredValue:function(e){return Np(),e},useTransition:function(){return Np(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(Op.identifierPrefix||"")+"R:"+(Op.uniqueID++).toString(36)},useMutableSource:function(e,n){return Np(),n(e._source)}},Y6={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function X6(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 vU={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},xse=Ls({menuitem:!0},vU),VD={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},jse=["Webkit","ms","Moz","O"];Object.keys(VD).forEach(function(e){jse.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),VD[n]=VD[e]})});var zse=/([A-Z])/g,Vse=/^ms-/,W_=Mf.Children.toArray,aM=Pse.ReactCurrentDispatcher,Qse={listing:!0,pre:!0,textarea:!0},Kse=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Z6={},tM={};function Yse(e){if(e==null)return e;var n="";return Mf.Children.forEach(e,function(a){a!=null&&(n+=a)}),n}var Xse=Object.prototype.hasOwnProperty,Zse={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function eU(e,n){if(e===void 0)throw Error(Eo(152,zD(n)||"Component"))}function eve(e,n,a){function t(i,l){var s=l.prototype&&l.prototype.isReactComponent,h=Nse(l,n,a,s),p=[],R=!1,E={isMounted:function(){return!1},enqueueForceUpdate:function(){if(p===null)return null},enqueueReplaceState:function(te,le){R=!0,p=[le]},enqueueSetState:function(te,le){if(p===null)return null;p.push(le)}};if(s){if(s=new l(i.props,h,E),typeof l.getDerivedStateFromProps=="function"){var w=l.getDerivedStateFromProps.call(null,i.props,s.state);w!=null&&(s.state=Ls({},s.state,w))}}else if(yv={},s=l(i.props,h,E),s=lU(l,i.props,s,h),s==null||s.render==null){e=s,eU(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 I=R;if(p=null,R=!1,I&&E.length===1)s.state=E[0];else{w=I?E[0]:s.state;var L=!0;for(I=I?1:0;I=l))throw Error(Eo(304));var s=new Uint16Array(l);for(s.set(i),ii=s,ii[0]=u+1,i=u;i=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===w1)this.popProvider(s.type);else if(s.type===b1){this.suspenseDepth--;var p=u.pop();if(i){i=!1;var R=s.fallbackFrame;if(!R)throw Error(Eo(303));this.stack.push(R),u[this.suspenseDepth]+="";continue}else u[this.suspenseDepth]+=p}u[this.suspenseDepth]+=h}else{var E=s.children[s.childIndex++],w="";try{w+=this.render(E,s.context,s.domNamespace)}catch(I){throw I!=null&&typeof I.then=="function"?Error(Eo(294)):I}u.length<=this.suspenseDepth&&u.push(""),u[this.suspenseDepth]+=w}}return u[0]}finally{aM.current=r,Op=t,cU()}},n.render=function(a,t,r){if(typeof a=="string"||typeof a=="number")return r=""+a,r===""?"":this.makeStaticMarkup?Pp(r):this.previousWasTextNode?""+Pp(r):(this.previousWasTextNode=!0,Pp(r));if(t=eve(a,t,this.threadID),a=t.child,t=t.context,a===null||a===!1)return"";if(!Mf.isValidElement(a)){if(a!=null&&a.$$typeof!=null)throw r=a.$$typeof,Error(r===rM?Eo(257):Eo(258,r.toString()));return a=W_(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 oU:case rU:case oM:case uM:case cM:case y1:return a=W_(a.props.children),this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case b1:throw Error(Eo(294));case tU:throw Error(Eo(343))}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case lM:yv={};var i=u.render(a.props,a.ref);return i=lU(u.render,a.props,i,a.ref),i=W_(i),this.stack.push({type:null,domNamespace:r,children:i,childIndex:0,context:t,footer:""}),"";case sM:return a=[Mf.createElement(u.type,Ls({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),"";case w1:return u=W_(a.props.children),r={type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""},this.pushProvider(a),this.stack.push(r),"";case iM:u=a.type,i=a.props;var l=this.threadID;return QD(u,l),u=W_(i.children(u[l])),this.stack.push({type:a,domNamespace:r,children:u,childIndex:0,context:t,footer:""}),"";case aU:throw Error(Eo(338));case vM:return u=a.type,i=u._init,u=i(u._payload),a=[Mf.createElement(u,Ls({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:r,children:a,childIndex:0,context:t,footer:""}),""}throw Error(Eo(130,u==null?u:typeof u,""))},n.renderDOM=function(a,t,r){var u=a.type.toLowerCase();if(r===Y6.html&&X6(u),!Z6.hasOwnProperty(u)){if(!Kse.test(u))throw Error(Eo(65,u));Z6[u]=!0}var i=a.props;if(u==="input")i=Ls({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(Eo(92));if(Array.isArray(s)){if(!(1>=s.length))throw Error(Eo(93));s=s[0]}l=""+s}l==null&&(l="")}i=Ls({},i,{value:void 0,children:""+l})}else if(u==="select")this.currentSelectValue=i.value!=null?i.value:i.defaultValue,i=Ls({},i,{value:void 0});else if(u==="option"){s=this.currentSelectValue;var h=Yse(i.children);if(s!=null){var p=i.value!=null?i.value+"":h;if(l=!1,Array.isArray(s)){for(var R=0;R":(le+=">",l="");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=Pp(s);break e}s=null}return s!=null?(i=[],Qse.hasOwnProperty(u)&&s.charAt(0)===` `&&(le+=` `),le+=s):i=W_(i.children),a=a.type,r=r==null||r==="http://www.w3.org/1999/xhtml"?X6(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,le},e})();xd.renderToNodeStream=function(){throw Error(Eo(207))};xd.renderToStaticMarkup=function(e,n){e=new fU(e,!0,n);try{return e.read(1/0)}finally{e.destroy()}};xd.renderToStaticNodeStream=function(){throw Error(Eo(208))};xd.renderToString=function(e,n){e=new fU(e,!1,n);try{return e.read(1/0)}finally{e.destroy()}};xd.version="17.0.2"});var mU=He((LVe,pU)=>{"use strict";pU.exports=_U()});var XH=He((eI,D2)=>{(function(n,a){typeof eI=="object"&&typeof D2=="object"?D2.exports=a():typeof define=="function"&&define.amd?define([],a):typeof eI=="object"?eI.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<"u"&&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 w=function(I,L){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(U,V){U.__proto__=V}||function(U,V){for(var Q in V)V.hasOwnProperty(Q)&&(U[Q]=V[Q])},w(I,L)};return function(I,L){w(I,L);function U(){this.constructor=I}I.prototype=L===null?Object.create(L):(U.prototype=L.prototype,new U)}})();Object.defineProperty(n,"__esModule",{value:!0});var r=256,u=(function(){function w(I){I===void 0&&(I="="),this._paddingCharacter=I}return w.prototype.encodedLength=function(I){return this._paddingCharacter?(I+2)/3*4|0:(I*8+5)/6|0},w.prototype.encode=function(I){for(var L="",U=0;U>>18&63),L+=this._encodeByte(V>>>12&63),L+=this._encodeByte(V>>>6&63),L+=this._encodeByte(V>>>0&63)}var Q=I.length-U;if(Q>0){var V=I[U]<<16|(Q===2?I[U+1]<<8:0);L+=this._encodeByte(V>>>18&63),L+=this._encodeByte(V>>>12&63),Q===2?L+=this._encodeByte(V>>>6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},w.prototype.maxDecodedLength=function(I){return this._paddingCharacter?I/4*3|0:(I*6+7)/8|0},w.prototype.decodedLength=function(I){return this.maxDecodedLength(I.length-this._getPaddingLength(I))},w.prototype.decode=function(I){if(I.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(I),U=I.length-L,V=new Uint8Array(this.maxDecodedLength(U)),Q=0,te=0,le=0,ne=0,Z=0,ee=0,me=0;te>>4,V[Q++]=Z<<4|ee>>>2,V[Q++]=ee<<6|me,le|=ne&r,le|=Z&r,le|=ee&r,le|=me&r;if(te>>4,le|=ne&r,le|=Z&r),te>>2,le|=ee&r),te>>8&6,L+=51-I>>>8&-75,L+=61-I>>>8&-15,L+=62-I>>>8&3,String.fromCharCode(L)},w.prototype._decodeChar=function(I){var L=r;return L+=(42-I&I-44)>>>8&-r+I-43+62,L+=(46-I&I-48)>>>8&-r+I-47+63,L+=(47-I&I-58)>>>8&-r+I-48+52,L+=(64-I&I-91)>>>8&-r+I-65+0,L+=(96-I&I-123)>>>8&-r+I-97+26,L},w.prototype._getPaddingLength=function(I){var L=0;if(this._paddingCharacter){for(var U=I.length-1;U>=0&&I[U]===this._paddingCharacter;U--)L++;if(I.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},w})();n.Coder=u;var i=new u;function l(w){return i.encode(w)}n.encode=l;function s(w){return i.decode(w)}n.decode=s;var h=(function(w){t(I,w);function I(){return w!==null&&w.apply(this,arguments)||this}return I.prototype._encodeByte=function(L){var U=L;return U+=65,U+=25-L>>>8&6,U+=51-L>>>8&-75,U+=61-L>>>8&-13,U+=62-L>>>8&49,String.fromCharCode(U)},I.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},I})(u);n.URLSafeCoder=h;var p=new h;function R(w){return p.encode(w)}n.encodeURLSafe=R;function E(w){return p.decode(w)}n.decodeURLSafe=E,n.encodedLength=function(w){return i.encodedLength(w)},n.maxDecodedLength=function(w){return i.maxDecodedLength(w)},n.decodedLength=function(w){return i.decodedLength(w)}}),(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,R=0;R>6,h[p++]=128|E&63):E<55296?(h[p++]=224|E>>12,h[p++]=128|E>>6&63,h[p++]=128|E&63):(R++,E=(E&1023)<<10,E|=s.charCodeAt(R)&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-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)throw new Error(r);var w=s[++p];if((w&192)!==128)throw new Error(r);R=(R&31)<<6|w&63,E=128}else if(R<240){if(p>=s.length-1)throw new Error(r);var w=s[++p],I=s[++p];if((w&192)!==128||(I&192)!==128)throw new Error(r);R=(R&15)<<12|(w&63)<<6|I&63,E=2048}else if(R<248){if(p>=s.length-2)throw new Error(r);var w=s[++p],I=s[++p],L=s[++p];if((w&192)!==128||(I&192)!==128||(L&192)!==128)throw new Error(r);R=(R&15)<<18|(w&63)<<12|(I&63)<<6|L&63,E=65536}else throw new Error(r);if(R=55296&&R<=57343)throw new Error(r);if(R>=65536){if(R>1114111)throw new Error(r);R-=65536,h.push(String.fromCharCode(55296|R>>10)),R=56320|R&1023}}h.push(String.fromCharCode(R))}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 d(m,D){this.lastId=0,this.prefix=m,this.name=D}return d.prototype.create=function(m){this.lastId++;var D=this.lastId,M=this.prefix+D,A=this.name+"["+D+"]",Y=!1,Ge=function(){Y||(m.apply(null,arguments),Y=!0)};return this[D]=Ge,{number:D,id:M,name:A,callback:Ge}},d.prototype.remove=function(m){delete this[m.number]},d})(),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 d(m){this.options=m,this.receivers=m.receivers||r,this.loading={}}return d.prototype.load=function(m,D,M){var A=this;if(A.loading[m]&&A.loading[m].length>0)A.loading[m].push(M);else{A.loading[m]=[M];var Y=Nt.createScriptRequest(A.getPath(m,D)),Ge=A.receivers.create(function(Cn){if(A.receivers.remove(Ge),A.loading[m]){var xa=A.loading[m];delete A.loading[m];for(var _r=function(Xu){Xu||Y.cleanup()},Zr=0;Zr>>6)+E(128|m&63):E(224|m>>>12&15)+E(128|m>>>6&63)+E(128|m&63)},Q=function(d){return d.replace(/[^\x00-\x7F]/g,V)},te=function(d){var m=[0,2,1][d.length%3],D=d.charCodeAt(0)<<16|(d.length>1?d.charCodeAt(1):0)<<8|(d.length>2?d.charCodeAt(2):0),M=[w.charAt(D>>>18),w.charAt(D>>>12&63),m>=2?"=":w.charAt(D>>>6&63),m>=1?"=":w.charAt(D&63)];return M.join("")},le=window.btoa||function(d){return d.replace(/[\s\S]{1,3}/g,te)},ne=(function(){function d(m,D,M,A){var Y=this;this.clear=D,this.timer=m(function(){Y.timer&&(Y.timer=A(Y.timer))},M)}return d.prototype.isRunning=function(){return this.timer!==null},d.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},d})(),Z=ne,ee=(function(){var d=function(m,D){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})();function me(d){window.clearTimeout(d)}function We(d){window.clearInterval(d)}var Qe=(function(d){ee(m,d);function m(D,M){return d.call(this,setTimeout,me,D,function(A){return M(),null})||this}return m})(Z),dn=(function(d){ee(m,d);function m(D,M){return d.call(this,setInterval,We,D,function(A){return M(),A})||this}return m})(Z),qn={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(d){return new Qe(0,d)},method:function(d){for(var m=[],D=1;D0)for(var A=0;A=1002&&d.code<=1004?"backoff":null:d.code===4e3?"tls_only":d.code<4100?"refused":d.code<4200?"backoff":d.code<4300?"retry":"refused"},getCloseError:function(d){return d.code!==1e3&&d.code!==1001?{type:"PusherError",data:{code:d.code,message:d.reason||d.message}}:null}},pe=ef,ms=(function(){var d=function(m,D){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),ds=(function(d){ms(m,d);function m(D,M){var A=d.call(this)||this;return A.id=D,A.transport=M,A.activityTimeout=M.activityTimeout,A.bindListeners(),A}return m.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},m.prototype.send=function(D){return this.transport.send(D)},m.prototype.send_event=function(D,M,A){var Y={event:D,data:M};return A&&(Y.channel=A),In.debug("Event sent",Y),this.send(pe.encodeMessage(Y))},m.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},m.prototype.close=function(){this.transport.close()},m.prototype.bindListeners=function(){var D=this,M={message:function(Y){var Ge;try{Ge=pe.decodeMessage(Y)}catch(Cn){D.emit("error",{type:"MessageParseError",error:Cn,data:Y.data})}if(Ge!==void 0){switch(In.debug("Event recd",Ge),Ge.event){case"pusher:error":D.emit("error",{type:"PusherError",data:Ge.data});break;case"pusher:ping":D.emit("ping");break;case"pusher:pong":D.emit("pong");break}D.emit("message",Ge)}},activity:function(){D.emit("activity")},error:function(Y){D.emit("error",{type:"WebSocketError",error:Y})},closed:function(Y){A(),Y&&Y.code&&D.handleCloseEvent(Y),D.transport=null,D.emit("closed")}},A=function(){Da(M,function(Y,Ge){D.transport.unbind(Ge,Y)})};Da(M,function(Y,Ge){D.transport.bind(Ge,Y)})},m.prototype.handleCloseEvent=function(D){var M=pe.getCloseAction(D),A=pe.getCloseError(D);A&&this.emit("error",A),M&&this.emit(M,{action:M,error:A})},m})($a),nf=ds,hs=(function(){function d(m,D){this.transport=m,this.callback=D,this.bindListeners()}return d.prototype.close=function(){this.unbindListeners(),this.transport.close()},d.prototype.bindListeners=function(){var m=this;this.onMessage=function(D){m.unbindListeners();var M;try{M=pe.processHandshake(D)}catch(A){m.finish("error",{error:A}),m.transport.close();return}M.action==="connected"?m.finish("connected",{connection:new nf(M.id,m.transport),activityTimeout:M.activityTimeout}):(m.finish(M.action,{error:M.error}),m.transport.close())},this.onClosed=function(D){m.unbindListeners();var M=pe.getCloseAction(D)||"backoff",A=pe.getCloseError(D);m.finish(M,{error:A})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},d.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},d.prototype.finish=function(m,D){this.callback(An({transport:this.transport,action:m},D))},d})(),Tc=hs,Rg=(function(){function d(m,D){this.channel=m;var M=D.authTransport;if(typeof Nt.getAuthorizers()[M]>"u")throw"'"+M+"' is not a recognized auth transport";this.type=M,this.options=D,this.authOptions=D.auth||{}}return d.prototype.composeQuery=function(m){var D="socket_id="+encodeURIComponent(m)+"&channel_name="+encodeURIComponent(this.channel.name);for(var M in this.authOptions.params)D+="&"+encodeURIComponent(M)+"="+encodeURIComponent(this.authOptions.params[M]);return D},d.prototype.authorize=function(m,D){d.authorizers=d.authorizers||Nt.getAuthorizers(),d.authorizers[this.type].call(this,Nt,m,D)},d})(),$0=Rg,xm=(function(){function d(m,D){this.timeline=m,this.options=D||{}}return d.prototype.send=function(m,D){this.timeline.isEmpty()||this.timeline.send(Nt.TimelineTransport.getAgent(this,m),D)},d})(),jm=xm,Sc=(function(){var d=function(m,D){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),Ui=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),af=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),zm=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),yg=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),Vm=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),ww=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),s_=(function(d){Sc(m,d);function m(D){var M=this.constructor,A=d.call(this,D)||this;return Object.setPrototypeOf(A,M.prototype),A}return m})(Error),NC=(function(){var d=function(m,D){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),OC=(function(d){NC(m,d);function m(D,M){var A=d.call(this,function(Y,Ge){In.debug("No callbacks on "+D+" for "+Y)})||this;return A.name=D,A.pusher=M,A.subscribed=!1,A.subscriptionPending=!1,A.subscriptionCancelled=!1,A}return m.prototype.authorize=function(D,M){return M(!1,{auth:""})},m.prototype.trigger=function(D,M){if(D.indexOf("client-")!==0)throw new Ui("Event '"+D+"' does not start with 'client-'");if(!this.subscribed){var A=za.buildLogSuffix("triggeringClientEvents");In.warn("Client event triggered before channel 'subscription_succeeded' event . "+A)}return this.pusher.send_event(D,M,this.name)},m.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},m.prototype.handleEvent=function(D){var M=D.event,A=D.data;if(M==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(D);else if(M.indexOf("pusher_internal:")!==0){var Y={};this.emit(M,A,Y)}},m.prototype.handleSubscriptionSucceededEvent=function(D){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",D.data)},m.prototype.subscribe=function(){var D=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(M,A){M?(In.error(A),D.emit("pusher:subscription_error",A)):(A=A,D.pusher.send_event("pusher:subscribe",{auth:A.auth,channel_data:A.channel_data,channel:D.name}))}))},m.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},m.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},m.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},m})($a),bw=OC,UC=(function(){var d=function(m,D){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),kC=(function(d){UC(m,d);function m(){return d!==null&&d.apply(this,arguments)||this}return m.prototype.authorize=function(D,M){var A=Cc.createAuthorizer(this,this.pusher.config);return A.authorize(D,M)},m})(bw),wg=kC,Ew=(function(){function d(){this.reset()}return d.prototype.get=function(m){return Object.prototype.hasOwnProperty.call(this.members,m)?{id:m,info:this.members[m]}:null},d.prototype.each=function(m){var D=this;Da(this.members,function(M,A){m(D.get(A))})},d.prototype.setMyID=function(m){this.myID=m},d.prototype.onSubscription=function(m){this.members=m.presence.hash,this.count=m.presence.count,this.me=this.get(this.myID)},d.prototype.addMember=function(m){return this.get(m.user_id)===null&&this.count++,this.members[m.user_id]=m.user_info,this.get(m.user_id)},d.prototype.removeMember=function(m){var D=this.get(m.user_id);return D&&(delete this.members[m.user_id],this.count--),D},d.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},d})(),BC=Ew,HC=(function(){var d=function(m,D){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),Iw=(function(d){HC(m,d);function m(D,M){var A=d.call(this,D,M)||this;return A.members=new BC,A}return m.prototype.authorize=function(D,M){var A=this;d.prototype.authorize.call(this,D,function(Y,Ge){if(!Y){if(Ge=Ge,Ge.channel_data===void 0){var Cn=za.buildLogSuffix("authenticationEndpoint");In.error("Invalid auth response for channel '"+A.name+"',"+("expected 'channel_data' field. "+Cn)),M("Invalid auth response");return}var xa=JSON.parse(Ge.channel_data);A.members.setMyID(xa.user_id)}M(Y,Ge)})},m.prototype.handleEvent=function(D){var M=D.event;if(M.indexOf("pusher_internal:")===0)this.handleInternalEvent(D);else{var A=D.data,Y={};D.user_id&&(Y.user_id=D.user_id),this.emit(M,A,Y)}},m.prototype.handleInternalEvent=function(D){var M=D.event,A=D.data;switch(M){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(D);break;case"pusher_internal:member_added":var Y=this.members.addMember(A);this.emit("pusher:member_added",Y);break;case"pusher_internal:member_removed":var Ge=this.members.removeMember(A);Ge&&this.emit("pusher:member_removed",Ge);break}},m.prototype.handleSubscriptionSucceededEvent=function(D){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(D.data),this.emit("pusher:subscription_succeeded",this.members))},m.prototype.disconnect=function(){this.members.reset(),d.prototype.disconnect.call(this)},m})(wg),JC=Iw,Tw=a(1),bg=a(0),qC=(function(){var d=function(m,D){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),$C=(function(d){qC(m,d);function m(D,M,A){var Y=d.call(this,D,M)||this;return Y.key=null,Y.nacl=A,Y}return m.prototype.authorize=function(D,M){var A=this;d.prototype.authorize.call(this,D,function(Y,Ge){if(Y){M(!0,Ge);return}var Cn=Ge.shared_secret;if(!Cn){var xa="No shared_secret key in auth payload for encrypted channel: "+A.name;M(!0,xa);return}A.key=Object(bg.decode)(Cn),delete Ge.shared_secret,M(!1,Ge)})},m.prototype.trigger=function(D,M){throw new Vm("Client events are not currently supported for encrypted channels")},m.prototype.handleEvent=function(D){var M=D.event,A=D.data;if(M.indexOf("pusher_internal:")===0||M.indexOf("pusher:")===0){d.prototype.handleEvent.call(this,D);return}this.handleEncryptedEvent(M,A)},m.prototype.handleEncryptedEvent=function(D,M){var A=this;if(!this.key){In.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!M.ciphertext||!M.nonce){In.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+M);return}var Y=Object(bg.decode)(M.ciphertext);if(Y.length0&&this.emit("connecting_in",Math.round(D/1e3)),this.retryTimer=new Qe(D||0,function(){M.disconnectInternally(),M.connect()})},m.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},m.prototype.setUnavailableTimer=function(){var D=this;this.unavailableTimer=new Qe(this.options.unavailableTimeout,function(){D.updateState("unavailable")})},m.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},m.prototype.sendActivityCheck=function(){var D=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new Qe(this.options.pongTimeout,function(){D.timeline.error({pong_timed_out:D.options.pongTimeout}),D.retryIn(0)})},m.prototype.resetActivityCheck=function(){var D=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new Qe(this.activityTimeout,function(){D.sendActivityCheck()}))},m.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},m.prototype.buildConnectionCallbacks=function(D){var M=this;return An({},D,{message:function(A){M.resetActivityCheck(),M.emit("message",A)},ping:function(){M.send_event("pusher:pong",{})},activity:function(){M.resetActivityCheck()},error:function(A){M.emit("error",{type:"WebSocketError",error:A})},closed:function(){M.abandonConnection(),M.shouldRetry()&&M.retryIn(1e3)}})},m.prototype.buildHandshakeCallbacks=function(D){var M=this;return An({},D,{connected:function(A){M.activityTimeout=Math.min(M.options.activityTimeout,A.activityTimeout,A.connection.activityTimeout||1/0),M.clearUnavailableTimer(),M.setConnection(A.connection),M.socket_id=M.connection.id,M.updateState("connected",{socket_id:M.socket_id})}})},m.prototype.buildErrorCallbacks=function(){var D=this,M=function(A){return function(Y){Y.error&&D.emit("error",{type:"WebSocketError",error:Y.error}),A(Y)}};return{tls_only:M(function(){D.usingTLS=!0,D.updateStrategy(),D.retryIn(0)}),refused:M(function(){D.disconnect()}),backoff:M(function(){D.retryIn(1e3)}),retry:M(function(){D.retryIn(0)})}},m.prototype.setConnection=function(D){this.connection=D;for(var M in this.connectionCallbacks)this.connection.bind(M,this.connectionCallbacks[M]);this.resetActivityCheck()},m.prototype.abandonConnection=function(){if(this.connection){this.stopActivityCheck();for(var D in this.connectionCallbacks)this.connection.unbind(D,this.connectionCallbacks[D]);var M=this.connection;return this.connection=null,M}},m.prototype.updateState=function(D,M){var A=this.state;if(this.state=D,A!==D){var Y=D;Y==="connected"&&(Y+=" with new socket ID "+M.socket_id),In.debug("State changed",A+" -> "+Y),this.timeline.info({state:D,params:M}),this.emit("state_change",{previous:A,current:D}),this.emit(D,M)}},m.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},m})($a),Sw=jC,zC=(function(){function d(){this.channels={}}return d.prototype.add=function(m,D){return this.channels[m]||(this.channels[m]=Cw(m,D)),this.channels[m]},d.prototype.all=function(){return Rt(this.channels)},d.prototype.find=function(m){return this.channels[m]},d.prototype.remove=function(m){var D=this.channels[m];return delete this.channels[m],D},d.prototype.disconnect=function(){Da(this.channels,function(m){m.disconnect()})},d})(),VC=zC;function Cw(d,m){if(d.indexOf("private-encrypted-")===0){if(m.config.nacl)return Cc.createEncryptedChannel(d,m,m.config.nacl);var D="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",M=za.buildLogSuffix("encryptedChannelSupport");throw new Vm(D+". "+M)}else return d.indexOf("private-")===0?Cc.createPrivateChannel(d,m):d.indexOf("presence-")===0?Cc.createPresenceChannel(d,m):Cc.createChannel(d,m)}var QC={createChannels:function(){return new VC},createConnectionManager:function(d,m){return new Sw(d,m)},createChannel:function(d,m){return new bw(d,m)},createPrivateChannel:function(d,m){return new wg(d,m)},createPresenceChannel:function(d,m){return new JC(d,m)},createEncryptedChannel:function(d,m,D){return new WC(d,m,D)},createTimelineSender:function(d,m){return new jm(d,m)},createAuthorizer:function(d,m){return m.authorizer?m.authorizer(d,m):new $0(d,m)},createHandshake:function(d,m){return new Tc(d,m)},createAssistantToTheTransportManager:function(d,m,D){return new Ks(d,m,D)}},Cc=QC,KC=(function(){function d(m){this.options=m||{},this.livesLeft=this.options.lives||1/0}return d.prototype.getAssistant=function(m){return Cc.createAssistantToTheTransportManager(this,m,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},d.prototype.isAlive=function(){return this.livesLeft>0},d.prototype.reportDeath=function(){this.livesLeft-=1},d})(),Fw=KC,YC=(function(){function d(m,D){this.strategies=m,this.loop=!!D.loop,this.failFast=!!D.failFast,this.timeout=D.timeout,this.timeoutLimit=D.timeoutLimit}return d.prototype.isSupported=function(){return zn(this.strategies,Mn.method("isSupported"))},d.prototype.connect=function(m,D){var M=this,A=this.strategies,Y=0,Ge=this.timeout,Cn=null,xa=function(_r,Zr){Zr?D(null,Zr):(Y=Y+1,M.loop&&(Y=Y%A.length),Y0&&(Y=new Qe(M.timeout,function(){Ge.abort(),A(!0)})),Ge=m.connect(D,function(Cn,xa){Cn&&Y&&Y.isRunning()&&!M.failFast||(Y&&Y.ensureAborted(),A(Cn,xa))}),{abort:function(){Y&&Y.ensureAborted(),Ge.abort()},forceMinPriority:function(Cn){Ge.forceMinPriority(Cn)}}},d})(),tf=YC,XC=(function(){function d(m){this.strategies=m}return d.prototype.isSupported=function(){return zn(this.strategies,Mn.method("isSupported"))},d.prototype.connect=function(m,D){return ZC(this.strategies,m,function(M,A){return function(Y,Ge){if(A[M].error=Y,Y){Gw(A)&&D(!0);return}_t(A,function(Cn){Cn.forceMinPriority(Ge.transport.priority)}),D(null,Ge)}})},d})(),Eg=XC;function ZC(d,m,D){var M=Ha(d,function(A,Y,Ge,Cn){return A.connect(m,D(Y,Cn))});return{abort:function(){_t(M,Ig)},forceMinPriority:function(A){_t(M,function(Y){Y.forceMinPriority(A)})}}}function Gw(d){return Un(d,function(m){return!!m.error})}function Ig(d){!d.error&&!d.aborted&&(d.abort(),d.aborted=!0)}var eF=(function(){function d(m,D,M){this.strategy=m,this.transports=D,this.ttl=M.ttl||1800*1e3,this.usingTLS=M.useTLS,this.timeline=M.timeline}return d.prototype.isSupported=function(){return this.strategy.isSupported()},d.prototype.connect=function(m,D){var M=this.usingTLS,A=Mw(M),Y=[this.strategy];if(A&&A.timestamp+this.ttl>=Mn.now()){var Ge=this.transports[A.transport];Ge&&(this.timeline.info({cached:!0,transport:A.transport,latency:A.latency}),Y.push(new tf([Ge],{timeout:A.latency*2+1e3,failFast:!0})))}var Cn=Mn.now(),xa=Y.pop().connect(m,function _r(Zr,Xu){Zr?(Aw(M),Y.length>0?(Cn=Mn.now(),xa=Y.pop().connect(m,_r)):D(Zr)):(aF(M,Xu.transport.name,Mn.now()-Cn),D(null,Xu))});return{abort:function(){xa.abort()},forceMinPriority:function(_r){m=_r,xa&&xa.forceMinPriority(_r)}}},d})(),nF=eF;function Tg(d){return"pusherTransport"+(d?"TLS":"NonTLS")}function Mw(d){var m=Nt.getLocalStorage();if(m)try{var D=m[Tg(d)];if(D)return JSON.parse(D)}catch{Aw(d)}return null}function aF(d,m,D){var M=Nt.getLocalStorage();if(M)try{M[Tg(d)]=pt({timestamp:Mn.now(),transport:m,latency:D})}catch{}}function Aw(d){var m=Nt.getLocalStorage();if(m)try{delete m[Tg(d)]}catch{}}var tF=(function(){function d(m,D){var M=D.delay;this.strategy=m,this.options={delay:M}}return d.prototype.isSupported=function(){return this.strategy.isSupported()},d.prototype.connect=function(m,D){var M=this.strategy,A,Y=new Qe(this.options.delay,function(){A=M.connect(m,D)});return{abort:function(){Y.ensureAborted(),A&&A.abort()},forceMinPriority:function(Ge){m=Ge,A&&A.forceMinPriority(Ge)}}},d})(),Qm=tF,Lw=(function(){function d(m,D,M){this.test=m,this.trueBranch=D,this.falseBranch=M}return d.prototype.isSupported=function(){var m=this.test()?this.trueBranch:this.falseBranch;return m.isSupported()},d.prototype.connect=function(m,D){var M=this.test()?this.trueBranch:this.falseBranch;return M.connect(m,D)},d})(),W0=Lw,rF=(function(){function d(m){this.strategy=m}return d.prototype.isSupported=function(){return this.strategy.isSupported()},d.prototype.connect=function(m,D){var M=this.strategy.connect(m,function(A,Y){Y&&M.abort(),D(A,Y)});return M},d})(),oF=rF;function gs(d){return function(){return d.isSupported()}}var Pw=function(d,m,D){var M={};function A($o,Xw,Zw,PF,eb){var b=D(d,$o,Xw,Zw,PF,eb);return M[$o]=b,b}var Y=Object.assign({},m,{hostNonTLS:d.wsHost+":"+d.wsPort,hostTLS:d.wsHost+":"+d.wssPort,httpPath:d.wsPath}),Ge=Object.assign({},Y,{useTLS:!0}),Cn=Object.assign({},m,{hostNonTLS:d.httpHost+":"+d.httpPort,hostTLS:d.httpHost+":"+d.httpsPort,httpPath:d.httpPath}),xa={loop:!0,timeout:15e3,timeoutLimit:6e4},_r=new Fw({lives:2,minPingDelay:1e4,maxPingDelay:d.activityTimeout}),Zr=new Fw({lives:2,minPingDelay:1e4,maxPingDelay:d.activityTimeout}),Xu=A("ws","ws",3,Y,_r),xl=A("wss","ws",3,Ge,_r),GF=A("sockjs","sockjs",1,Cn),xw=A("xhr_streaming","xhr_streaming",1,Cn,Zr),jw=A("xdr_streaming","xdr_streaming",1,Cn,Zr),zw=A("xhr_polling","xhr_polling",1,Cn),MF=A("xdr_polling","xdr_polling",1,Cn),Vw=new tf([Xu],xa),AF=new tf([xl],xa),LF=new tf([GF],xa),Qw=new tf([new W0(gs(xw),xw,jw)],xa),Kw=new tf([new W0(gs(zw),zw,MF)],xa),Yw=new tf([new W0(gs(Qw),new Eg([Qw,new Qm(Kw,{delay:4e3})]),Kw)],xa),Ag=new W0(gs(Yw),Yw,LF),Lg;return m.useTLS?Lg=new Eg([Vw,new Qm(Ag,{delay:2e3})]):Lg=new Eg([Vw,new Qm(AF,{delay:2e3}),new Qm(Ag,{delay:5e3})]),new nF(new oF(new W0(gs(Xu),Lg,Ag)),M,{ttl:18e5,timeline:m.timeline,useTLS:m.useTLS})},uF=Pw,iF=(function(){var d=this;d.timeline.info(d.buildTimelineMessage({transport:d.name+(d.options.useTLS?"s":"")})),d.hooks.isInitialized()?d.changeState("initialized"):d.hooks.file?(d.changeState("initializing"),p.load(d.hooks.file,{useTLS:d.options.useTLS},function(m,D){d.hooks.isInitialized()?(d.changeState("initialized"),D(!0)):(m&&d.onError(m),d.onClose(),D(!1))})):d.onClose()}),Nw={getRequest:function(d){var m=new window.XDomainRequest;return m.ontimeout=function(){d.emit("error",new af),d.close()},m.onerror=function(D){d.emit("error",D),d.close()},m.onprogress=function(){m.responseText&&m.responseText.length>0&&d.onChunk(200,m.responseText)},m.onload=function(){m.responseText&&m.responseText.length>0&&d.onChunk(200,m.responseText),d.emit("finished",200),d.close()},m},abortRequest:function(d){d.ontimeout=d.onerror=d.onprogress=d.onload=null,d.abort()}},lF=Nw,Ow=(function(){var d=function(m,D){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var Y in A)A.hasOwnProperty(Y)&&(M[Y]=A[Y])},d(m,D)};return function(m,D){d(m,D);function M(){this.constructor=m}m.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})(),cF=256*1024,Uw=(function(d){Ow(m,d);function m(D,M,A){var Y=d.call(this)||this;return Y.hooks=D,Y.method=M,Y.url=A,Y}return m.prototype.start=function(D){var M=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){M.close()},Nt.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(D)},m.prototype.close=function(){this.unloader&&(Nt.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},m.prototype.onChunk=function(D,M){for(;;){var A=this.advanceBuffer(M);if(A)this.emit("chunk",{status:D,data:A});else break}this.isBufferTooLong(M)&&this.emit("buffer_too_long")},m.prototype.advanceBuffer=function(D){var M=D.slice(this.position),A=M.indexOf(` `);return A!==-1?(this.position+=A+1,M.slice(0,A)):null},m.prototype.isBufferTooLong=function(D){return this.position===D.length&&D.length>cF},m})($a),kw=Uw,x0;(function(d){d[d.CONNECTING=0]="CONNECTING",d[d.OPEN=1]="OPEN",d[d.CLOSED=3]="CLOSED"})(x0||(x0={}));var Fc=x0,sF=1,Bw=(function(){function d(m,D){this.hooks=m,this.session=fl(1e3)+"/"+Ds(8),this.location=vF(D),this.readyState=Fc.CONNECTING,this.openStream()}return d.prototype.send=function(m){return this.sendRaw(JSON.stringify([m]))},d.prototype.ping=function(){this.hooks.sendHeartbeat(this)},d.prototype.close=function(m,D){this.onClose(m,D,!0)},d.prototype.sendRaw=function(m){if(this.readyState===Fc.OPEN)try{return Nt.createSocketRequest("POST",Sg(fF(this.location,this.session))).start(m),!0}catch{return!1}else return!1},d.prototype.reconnect=function(){this.closeStream(),this.openStream()},d.prototype.onClose=function(m,D,M){this.closeStream(),this.readyState=Fc.CLOSED,this.onclose&&this.onclose({code:m,reason:D,wasClean:M})},d.prototype.onChunk=function(m){if(m.status===200){this.readyState===Fc.OPEN&&this.onActivity();var D,M=m.data.slice(0,1);switch(M){case"o":D=JSON.parse(m.data.slice(1)||"{}"),this.onOpen(D);break;case"a":D=JSON.parse(m.data.slice(1)||"[]");for(var A=0;A0&&d.onChunk(D.status,D.responseText);break;case 4:D.responseText&&D.responseText.length>0&&d.onChunk(D.status,D.responseText),d.emit("finished",D.status),d.close();break}},D},abortRequest:function(d){d.onreadystatechange=null,d.abort()}},Pt=Jw,rf={createStreamingSocket:function(d){return this.createSocket(mF,d)},createPollingSocket:function(d){return this.createSocket(hF,d)},createSocket:function(d,m){return new _F(d,m)},createXHR:function(d,m){return this.createRequest(Pt,d,m)},createRequest:function(d,m,D){return new kw(d,m,D)}},Cg=rf;Cg.createXDR=function(d,m){return this.createRequest(lF,d,m)};var gF=Cg,DF={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:r,DependenciesReceivers:h,getDefaultStrategy:uF,Transports:Yu,transportConnectionInitializer:iF,HTTPFactory:gF,TimelineTransport:ce,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(d){var m=this;window.Pusher=d;var D=function(){m.onDocumentBody(d.ready)};window.JSON?D():p.load("json2",{},D)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:W,jsonp:k}},onDocumentBody:function(d){var m=this;document.body?d():setTimeout(function(){m.onDocumentBody(d)},0)},createJSONPRequest:function(d,m){return new j(d,m)},createScriptRequest:function(d){return new P(d)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var d=this.getXHRAPI();return new d},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return Wl},createWebSocket:function(d){var m=this.getWebSocketAPI();return new m(d)},createSocketRequest:function(d,m){if(this.isXHRSupported())return this.HTTPFactory.createXHR(d,m);if(this.isXDRSupported(m.indexOf("https:")===0))return this.HTTPFactory.createXDR(d,m);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var d=this.getXHRAPI();return!!d&&new d().withCredentials!==void 0},isXDRSupported:function(d){var m=d?"https:":"http:",D=this.getProtocol();return!!window.XDomainRequest&&D===m},addUnloadListener:function(d){window.addEventListener!==void 0?window.addEventListener("unload",d,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",d)},removeUnloadListener:function(d){window.addEventListener!==void 0?window.removeEventListener("unload",d,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",d)}},Nt=DF,Km;(function(d){d[d.ERROR=3]="ERROR",d[d.INFO=6]="INFO",d[d.DEBUG=7]="DEBUG"})(Km||(Km={}));var Ym=Km,RF=(function(){function d(m,D,M){this.key=m,this.session=D,this.events=[],this.options=M||{},this.sent=0,this.uniqueID=0}return d.prototype.log=function(m,D){m<=this.options.level&&(this.events.push(An({},D,{timestamp:Mn.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},d.prototype.error=function(m){this.log(Ym.ERROR,m)},d.prototype.info=function(m){this.log(Ym.INFO,m)},d.prototype.debug=function(m){this.log(Ym.DEBUG,m)},d.prototype.isEmpty=function(){return this.events.length===0},d.prototype.send=function(m,D){var M=this,A=An({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=[],m(A,function(Y,Ge){Y||M.sent++,D&&D(Y,Ge)}),!0},d.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},d})(),qw=RF,Fg=(function(){function d(m,D,M,A){this.name=m,this.priority=D,this.transport=M,this.options=A||{}}return d.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},d.prototype.connect=function(m,D){var M=this;if(this.isSupported()){if(this.priority{"use strict";var nTe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";i$.exports=nTe});var f$=He((cAn,v$)=>{"use strict";var aTe=l$();function c$(){}function s$(){}s$.resetWarningCache=c$;v$.exports=function(){function e(t,r,u,i,l,s){if(s!==aTe){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:s$,resetWarningCache:c$};return a.PropTypes=a,a}});var p$=He((fAn,_$)=>{_$.exports=f$()();var sAn,vAn});var cL=He(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var d$=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],bI=d$.join(","),h$=typeof Element>"u",fm=h$?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,iL=!h$&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},g$=function(n,a,t){var r=Array.prototype.slice.apply(n.querySelectorAll(bI));return a&&fm.call(n,bI)&&r.unshift(n),r=r.filter(t),r},D$=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=fm.call(i,bI);p&&t.filter(i)&&(a||!n.includes(i))&&r.push(i);var R=i.shadowRoot||typeof t.getShadowRoot=="function"&&t.getShadowRoot(i),E=!t.shadowRootFilter||t.shadowRootFilter(i);if(R&&E){var w=e(R===!0?i.children:R.children,!0,t);t.flatten?r.push.apply(r,w):r.push({scope:i,candidates:w})}else u.unshift.apply(u,i.children)}}return r},R$=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},tTe=function(n,a){return n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex},y$=function(n){return n.tagName==="INPUT"},rTe=function(n){return y$(n)&&n.type==="hidden"},oTe=function(n){var a=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(t){return t.tagName==="SUMMARY"});return a},uTe=function(n,a){for(var t=0;tsummary:first-of-type"),i=u?n.parentElement:n;if(fm.call(i,"details:not([open]) *"))return!0;var l=iL(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,R=iL(n);if(p&&!p.shadowRoot&&r(p)===!0)return m$(n);n.assignedSlot?n=n.assignedSlot:!p&&R!==n.ownerDocument?n=R.host:n=p}n=h}if(s)return!n.getClientRects().length}else if(t==="non-zero-area")return m$(n);return!1},vTe=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=0)},_Te=function e(n){var a=[],t=[];return n.forEach(function(r,u){var i=!!r.scope,l=i?r.scope:r,s=R$(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(tTe).reduce(function(r,u){return u.isScope?r.push.apply(r,u.content):r.push(u.content),r},[]).concat(a)},pTe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=D$([n],a.includeContainer,{filter:lL.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:fTe}):t=g$(n,a.includeContainer,lL.bind(null,a)),_Te(t)},mTe=function(n,a){a=a||{};var t;return a.getShadowRoot?t=D$([n],a.includeContainer,{filter:EI.bind(null,a),flatten:!0,getShadowRoot:a.getShadowRoot}):t=g$(n,a.includeContainer,EI.bind(null,a)),t},dTe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return fm.call(n,bI)===!1?!1:lL(a,n)},hTe=d$.concat("iframe").join(","),gTe=function(n,a){if(a=a||{},!n)throw new Error("No node provided");return fm.call(n,hTe)===!1?!1:EI(a,n)};bh.focusable=mTe;bh.isFocusable=gTe;bh.isTabbable=dTe;bh.tabbable=pTe});var S$=He(sL=>{"use strict";Object.defineProperty(sL,"__esModule",{value:!0});var Kf=cL();function w$(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 b$(e){for(var n=1;n0){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()}}})(),RTe=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},yTe=function(n){return n.key==="Escape"||n.key==="Esc"||n.keyCode===27},wTe=function(n){return n.key==="Tab"||n.keyCode===9},I$=function(n){return setTimeout(n,0)},T$=function(n,a){var t=-1;return n.every(function(r,u){return a(r)?(t=u,!1):!0}),t},JR=function(n){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r1?me-1:0),Qe=1;Qe=0)Z=t.activeElement;else{var ee=u.tabbableGroups[0],me=ee&&ee.firstTabbableNode;Z=me||h("fallbackFocus")}if(!Z)throw new Error("Your focus-trap needs to have at least one focusable element");return Z},R=function(){if(u.containerGroups=u.containers.map(function(Z){var ee=Kf.tabbable(Z,r.tabbableOptions),me=Kf.focusable(Z,r.tabbableOptions);return{container:Z,tabbableNodes:ee,focusableNodes:me,firstTabbableNode:ee.length>0?ee[0]:null,lastTabbableNode:ee.length>0?ee[ee.length-1]:null,nextTabbableNode:function(Qe){var dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,qn=me.findIndex(function(Mn){return Mn===Qe});if(!(qn<0))return dn?me.slice(qn+1).find(function(Mn){return Kf.isTabbable(Mn,r.tabbableOptions)}):me.slice(0,qn).reverse().find(function(Mn){return Kf.isTabbable(Mn,r.tabbableOptions)})}}}),u.tabbableGroups=u.containerGroups.filter(function(Z){return Z.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 ne(Z){if(Z!==!1&&Z!==t.activeElement){if(!Z||!Z.focus){ne(p());return}Z.focus({preventScroll:!!r.preventScroll}),u.mostRecentlyFocusedNode=Z,RTe(Z)&&Z.select()}},w=function(Z){var ee=h("setReturnFocus",Z);return ee||(ee===!1?!1:Z)},I=function(Z){var ee=II(Z);if(!(s(ee)>=0)){if(JR(r.clickOutsideDeactivates,Z)){i.deactivate({returnFocus:r.returnFocusOnDeactivate&&!Kf.isFocusable(ee,r.tabbableOptions)});return}JR(r.allowOutsideClick,Z)||Z.preventDefault()}},L=function(Z){var ee=II(Z),me=s(ee)>=0;me||ee instanceof Document?me&&(u.mostRecentlyFocusedNode=ee):(Z.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||p()))},U=function(Z){var ee=II(Z);R();var me=null;if(u.tabbableGroups.length>0){var We=s(ee),Qe=We>=0?u.containerGroups[We]:void 0;if(We<0)Z.shiftKey?me=u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:me=u.tabbableGroups[0].firstTabbableNode;else if(Z.shiftKey){var dn=T$(u.tabbableGroups,function(Da){var ha=Da.firstTabbableNode;return ee===ha});if(dn<0&&(Qe.container===ee||Kf.isFocusable(ee,r.tabbableOptions)&&!Kf.isTabbable(ee,r.tabbableOptions)&&!Qe.nextTabbableNode(ee,!1))&&(dn=We),dn>=0){var qn=dn===0?u.tabbableGroups.length-1:dn-1,Mn=u.tabbableGroups[qn];me=Mn.lastTabbableNode}}else{var An=T$(u.tabbableGroups,function(Da){var ha=Da.lastTabbableNode;return ee===ha});if(An<0&&(Qe.container===ee||Kf.isFocusable(ee,r.tabbableOptions)&&!Kf.isTabbable(ee,r.tabbableOptions)&&!Qe.nextTabbableNode(ee))&&(An=We),An>=0){var Hn=An===u.tabbableGroups.length-1?0:An+1,Ia=u.tabbableGroups[Hn];me=Ia.firstTabbableNode}}}else me=h("fallbackFocus");me&&(Z.preventDefault(),E(me))},V=function(Z){if(yTe(Z)&&JR(r.escapeDeactivates,Z)!==!1){Z.preventDefault(),i.deactivate();return}if(wTe(Z)){U(Z);return}},Q=function(Z){var ee=II(Z);s(ee)>=0||JR(r.clickOutsideDeactivates,Z)||JR(r.allowOutsideClick,Z)||(Z.preventDefault(),Z.stopImmediatePropagation())},te=function(){if(u.active)return E$.activateTrap(i),u.delayInitialFocusTimer=r.delayInitialFocus?I$(function(){E(p())}):E(p()),t.addEventListener("focusin",L,!0),t.addEventListener("mousedown",I,{capture:!0,passive:!1}),t.addEventListener("touchstart",I,{capture:!0,passive:!1}),t.addEventListener("click",Q,{capture:!0,passive:!1}),t.addEventListener("keydown",V,{capture:!0,passive:!1}),i},le=function(){if(u.active)return t.removeEventListener("focusin",L,!0),t.removeEventListener("mousedown",I,!0),t.removeEventListener("touchstart",I,!0),t.removeEventListener("click",Q,!0),t.removeEventListener("keydown",V,!0),i};return i={get active(){return u.active},get paused(){return u.paused},activate:function(Z){if(u.active)return this;var ee=l(Z,"onActivate"),me=l(Z,"onPostActivate"),We=l(Z,"checkCanFocusTrap");We||R(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=t.activeElement,ee&&ee();var Qe=function(){We&&R(),te(),me&&me()};return We?(We(u.containers.concat()).then(Qe,Qe),this):(Qe(),this)},deactivate:function(Z){if(!u.active)return this;var ee=b$({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},Z);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,le(),u.active=!1,u.paused=!1,E$.deactivateTrap(i);var me=l(ee,"onDeactivate"),We=l(ee,"onPostDeactivate"),Qe=l(ee,"checkCanReturnFocus"),dn=l(ee,"returnFocus","returnFocusOnDeactivate");me&&me();var qn=function(){I$(function(){dn&&E(w(u.nodeFocusedBeforeActivation)),We&&We()})};return dn&&Qe?(Qe(w(u.nodeFocusedBeforeActivation)).then(qn,qn),this):(qn(),this)},pause:function(){return u.paused||!u.active?this:(u.paused=!0,le(),this)},unpause:function(){return!u.paused||!u.active?this:(u.paused=!1,R(),te(),this)},updateContainerElements:function(Z){var ee=[].concat(Z).filter(Boolean);return u.containers=ee.map(function(me){return typeof me=="string"?t.querySelector(me):me}),u.active&&R(),this}},i.updateContainerElements(n),i};sL.createFocusTrap=bTe});var G$=He((mAn,F$)=>{"use strict";function vL(e){"@babel/helpers - typeof";return vL=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},vL(e)}function ETe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function C$(e,n){for(var a=0;a"u"||!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 SI(e){return SI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},SI(e)}function GTe(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}var TI=(Et(),Ng(Do)),Dt=p$(),MTe=S$(),ATe=MTe.createFocusTrap,LTe=cL(),PTe=LTe.isFocusable,_L=(function(e){TTe(a,e);var n=STe(a);function a(t){var r;ETe(this,a),r=n.call(this,t),GTe($R(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,R=new Array(p>1?p-1:0),E=1;E 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=TI.cloneElement(u,{ref:i});return l}return null}}]),a})(TI.Component),qR=typeof Element>"u"?Function:Element;_L.propTypes={active:Dt.bool,paused:Dt.bool,focusTrapOptions:Dt.shape({document:Dt.object,onActivate:Dt.func,onPostActivate:Dt.func,checkCanFocusTrap:Dt.func,onDeactivate:Dt.func,onPostDeactivate:Dt.func,checkCanReturnFocus:Dt.func,initialFocus:Dt.oneOfType([Dt.instanceOf(qR),Dt.string,Dt.bool,Dt.func]),fallbackFocus:Dt.oneOfType([Dt.instanceOf(qR),Dt.string,Dt.func]),escapeDeactivates:Dt.oneOfType([Dt.bool,Dt.func]),clickOutsideDeactivates:Dt.oneOfType([Dt.bool,Dt.func]),returnFocusOnDeactivate:Dt.bool,setReturnFocus:Dt.oneOfType([Dt.instanceOf(qR),Dt.string,Dt.bool,Dt.func]),allowOutsideClick:Dt.oneOfType([Dt.bool,Dt.func]),preventScroll:Dt.bool,tabbableOptions:Dt.shape({displayCheck:Dt.oneOf(["full","non-zero-area","none"]),getShadowRoot:Dt.oneOfType([Dt.bool,Dt.func])})}),containerElements:Dt.arrayOf(Dt.instanceOf(qR)),children:Dt.oneOfType([Dt.element,Dt.instanceOf(qR)])};_L.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:ATe};F$.exports=_L});var JW=He(Br=>{"use strict";var zu=typeof Symbol=="function"&&Symbol.for,QL=zu?Symbol.for("react.element"):60103,KL=zu?Symbol.for("react.portal"):60106,HI=zu?Symbol.for("react.fragment"):60107,JI=zu?Symbol.for("react.strict_mode"):60108,qI=zu?Symbol.for("react.profiler"):60114,$I=zu?Symbol.for("react.provider"):60109,WI=zu?Symbol.for("react.context"):60110,YL=zu?Symbol.for("react.async_mode"):60111,xI=zu?Symbol.for("react.concurrent_mode"):60111,jI=zu?Symbol.for("react.forward_ref"):60112,zI=zu?Symbol.for("react.suspense"):60113,GFe=zu?Symbol.for("react.suspense_list"):60120,VI=zu?Symbol.for("react.memo"):60115,QI=zu?Symbol.for("react.lazy"):60116,MFe=zu?Symbol.for("react.block"):60121,AFe=zu?Symbol.for("react.fundamental"):60117,LFe=zu?Symbol.for("react.responder"):60118,PFe=zu?Symbol.for("react.scope"):60119;function hc(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case QL:switch(e=e.type,e){case YL:case xI:case HI:case qI:case JI:case zI:return e;default:switch(e=e&&e.$$typeof,e){case WI:case jI:case QI:case VI:case $I:return e;default:return n}}case KL:return n}}}function HW(e){return hc(e)===xI}Br.AsyncMode=YL;Br.ConcurrentMode=xI;Br.ContextConsumer=WI;Br.ContextProvider=$I;Br.Element=QL;Br.ForwardRef=jI;Br.Fragment=HI;Br.Lazy=QI;Br.Memo=VI;Br.Portal=KL;Br.Profiler=qI;Br.StrictMode=JI;Br.Suspense=zI;Br.isAsyncMode=function(e){return HW(e)||hc(e)===YL};Br.isConcurrentMode=HW;Br.isContextConsumer=function(e){return hc(e)===WI};Br.isContextProvider=function(e){return hc(e)===$I};Br.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===QL};Br.isForwardRef=function(e){return hc(e)===jI};Br.isFragment=function(e){return hc(e)===HI};Br.isLazy=function(e){return hc(e)===QI};Br.isMemo=function(e){return hc(e)===VI};Br.isPortal=function(e){return hc(e)===KL};Br.isProfiler=function(e){return hc(e)===qI};Br.isStrictMode=function(e){return hc(e)===JI};Br.isSuspense=function(e){return hc(e)===zI};Br.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===HI||e===xI||e===qI||e===JI||e===zI||e===GFe||typeof e=="object"&&e!==null&&(e.$$typeof===QI||e.$$typeof===VI||e.$$typeof===$I||e.$$typeof===WI||e.$$typeof===jI||e.$$typeof===AFe||e.$$typeof===LFe||e.$$typeof===PFe||e.$$typeof===MFe)};Br.typeOf=hc});var $W=He((f4n,qW)=>{"use strict";qW.exports=JW()});var Dm=He((I4n,XI)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var r="",u=0;u{function RGe(){this.__data__=[],this.size=0}kx.exports=RGe});var g3=He((u7n,Hx)=>{function yGe(e,n){return e===n||e!==e&&n!==n}Hx.exports=yGe});var ny=He((i7n,Jx)=>{var wGe=g3();function bGe(e,n){for(var a=e.length;a--;)if(wGe(e[a][0],n))return a;return-1}Jx.exports=bGe});var $x=He((l7n,qx)=>{var EGe=ny(),IGe=Array.prototype,TGe=IGe.splice;function SGe(e){var n=this.__data__,a=EGe(n,e);if(a<0)return!1;var t=n.length-1;return a==t?n.pop():TGe.call(n,a,1),--this.size,!0}qx.exports=SGe});var xx=He((c7n,Wx)=>{var CGe=ny();function FGe(e){var n=this.__data__,a=CGe(n,e);return a<0?void 0:n[a][1]}Wx.exports=FGe});var zx=He((s7n,jx)=>{var GGe=ny();function MGe(e){return GGe(this.__data__,e)>-1}jx.exports=MGe});var Qx=He((v7n,Vx)=>{var AGe=ny();function LGe(e,n){var a=this.__data__,t=AGe(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this}Vx.exports=LGe});var ay=He((f7n,Kx)=>{var PGe=Bx(),NGe=$x(),OGe=xx(),UGe=zx(),kGe=Qx();function Ah(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var BGe=ay();function HGe(){this.__data__=new BGe,this.size=0}Yx.exports=HGe});var ej=He((p7n,Zx)=>{function JGe(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a}Zx.exports=JGe});var aj=He((m7n,nj)=>{function qGe(e){return this.__data__.get(e)}nj.exports=qGe});var rj=He((d7n,tj)=>{function $Ge(e){return this.__data__.has(e)}tj.exports=$Ge});var D3=He((h7n,oj)=>{var WGe=typeof global=="object"&&global&&global.Object===Object&&global;oj.exports=WGe});var Wv=He((g7n,uj)=>{var xGe=D3(),jGe=typeof self=="object"&&self&&self.Object===Object&&self,zGe=xGe||jGe||Function("return this")();uj.exports=zGe});var DT=He((D7n,ij)=>{var VGe=Wv(),QGe=VGe.Symbol;ij.exports=QGe});var vj=He((R7n,sj)=>{var lj=DT(),cj=Object.prototype,KGe=cj.hasOwnProperty,YGe=cj.toString,ty=lj?lj.toStringTag:void 0;function XGe(e){var n=KGe.call(e,ty),a=e[ty];try{e[ty]=void 0;var t=!0}catch{}var r=YGe.call(e);return t&&(n?e[ty]=a:delete e[ty]),r}sj.exports=XGe});var _j=He((y7n,fj)=>{var ZGe=Object.prototype,eMe=ZGe.toString;function nMe(e){return eMe.call(e)}fj.exports=nMe});var ry=He((w7n,dj)=>{var pj=DT(),aMe=vj(),tMe=_j(),rMe="[object Null]",oMe="[object Undefined]",mj=pj?pj.toStringTag:void 0;function uMe(e){return e==null?e===void 0?oMe:rMe:mj&&mj in Object(e)?aMe(e):tMe(e)}dj.exports=uMe});var R3=He((b7n,hj)=>{function iMe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}hj.exports=iMe});var y3=He((E7n,gj)=>{var lMe=ry(),cMe=R3(),sMe="[object AsyncFunction]",vMe="[object Function]",fMe="[object GeneratorFunction]",_Me="[object Proxy]";function pMe(e){if(!cMe(e))return!1;var n=lMe(e);return n==vMe||n==fMe||n==sMe||n==_Me}gj.exports=pMe});var Rj=He((I7n,Dj)=>{var mMe=Wv(),dMe=mMe["__core-js_shared__"];Dj.exports=dMe});var bj=He((T7n,wj)=>{var w3=Rj(),yj=(function(){var e=/[^.]+$/.exec(w3&&w3.keys&&w3.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function hMe(e){return!!yj&&yj in e}wj.exports=hMe});var b3=He((S7n,Ej)=>{var gMe=Function.prototype,DMe=gMe.toString;function RMe(e){if(e!=null){try{return DMe.call(e)}catch{}try{return e+""}catch{}}return""}Ej.exports=RMe});var Tj=He((C7n,Ij)=>{var yMe=y3(),wMe=bj(),bMe=R3(),EMe=b3(),IMe=/[\\^$.*+?()[\]{}|]/g,TMe=/^\[object .+?Constructor\]$/,SMe=Function.prototype,CMe=Object.prototype,FMe=SMe.toString,GMe=CMe.hasOwnProperty,MMe=RegExp("^"+FMe.call(GMe).replace(IMe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function AMe(e){if(!bMe(e)||wMe(e))return!1;var n=yMe(e)?MMe:TMe;return n.test(EMe(e))}Ij.exports=AMe});var Cj=He((F7n,Sj)=>{function LMe(e,n){return e==null?void 0:e[n]}Sj.exports=LMe});var ym=He((G7n,Fj)=>{var PMe=Tj(),NMe=Cj();function OMe(e,n){var a=NMe(e,n);return PMe(a)?a:void 0}Fj.exports=OMe});var RT=He((M7n,Gj)=>{var UMe=ym(),kMe=Wv(),BMe=UMe(kMe,"Map");Gj.exports=BMe});var oy=He((A7n,Mj)=>{var HMe=ym(),JMe=HMe(Object,"create");Mj.exports=JMe});var Pj=He((L7n,Lj)=>{var Aj=oy();function qMe(){this.__data__=Aj?Aj(null):{},this.size=0}Lj.exports=qMe});var Oj=He((P7n,Nj)=>{function $Me(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}Nj.exports=$Me});var kj=He((N7n,Uj)=>{var WMe=oy(),xMe="__lodash_hash_undefined__",jMe=Object.prototype,zMe=jMe.hasOwnProperty;function VMe(e){var n=this.__data__;if(WMe){var a=n[e];return a===xMe?void 0:a}return zMe.call(n,e)?n[e]:void 0}Uj.exports=VMe});var Hj=He((O7n,Bj)=>{var QMe=oy(),KMe=Object.prototype,YMe=KMe.hasOwnProperty;function XMe(e){var n=this.__data__;return QMe?n[e]!==void 0:YMe.call(n,e)}Bj.exports=XMe});var qj=He((U7n,Jj)=>{var ZMe=oy(),eAe="__lodash_hash_undefined__";function nAe(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=ZMe&&n===void 0?eAe:n,this}Jj.exports=nAe});var Wj=He((k7n,$j)=>{var aAe=Pj(),tAe=Oj(),rAe=kj(),oAe=Hj(),uAe=qj();function Lh(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var xj=Wj(),iAe=ay(),lAe=RT();function cAe(){this.size=0,this.__data__={hash:new xj,map:new(lAe||iAe),string:new xj}}jj.exports=cAe});var Qj=He((H7n,Vj)=>{function sAe(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}Vj.exports=sAe});var uy=He((J7n,Kj)=>{var vAe=Qj();function fAe(e,n){var a=e.__data__;return vAe(n)?a[typeof n=="string"?"string":"hash"]:a.map}Kj.exports=fAe});var Xj=He((q7n,Yj)=>{var _Ae=uy();function pAe(e){var n=_Ae(this,e).delete(e);return this.size-=n?1:0,n}Yj.exports=pAe});var ez=He(($7n,Zj)=>{var mAe=uy();function dAe(e){return mAe(this,e).get(e)}Zj.exports=dAe});var az=He((W7n,nz)=>{var hAe=uy();function gAe(e){return hAe(this,e).has(e)}nz.exports=gAe});var rz=He((x7n,tz)=>{var DAe=uy();function RAe(e,n){var a=DAe(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this}tz.exports=RAe});var E3=He((j7n,oz)=>{var yAe=zj(),wAe=Xj(),bAe=ez(),EAe=az(),IAe=rz();function Ph(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var TAe=ay(),SAe=RT(),CAe=E3(),FAe=200;function GAe(e,n){var a=this.__data__;if(a instanceof TAe){var t=a.__data__;if(!SAe||t.length{var MAe=ay(),AAe=Xx(),LAe=ej(),PAe=aj(),NAe=rj(),OAe=iz();function Nh(e){var n=this.__data__=new MAe(e);this.size=n.size}Nh.prototype.clear=AAe;Nh.prototype.delete=LAe;Nh.prototype.get=PAe;Nh.prototype.has=NAe;Nh.prototype.set=OAe;lz.exports=Nh});var vz=He((Q7n,sz)=>{var UAe="__lodash_hash_undefined__";function kAe(e){return this.__data__.set(e,UAe),this}sz.exports=kAe});var _z=He((K7n,fz)=>{function BAe(e){return this.__data__.has(e)}fz.exports=BAe});var mz=He((Y7n,pz)=>{var HAe=E3(),JAe=vz(),qAe=_z();function yT(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new HAe;++n{function $Ae(e,n){for(var a=-1,t=e==null?0:e.length;++a{function WAe(e,n){return e.has(n)}gz.exports=WAe});var I3=He((eOn,Rz)=>{var xAe=mz(),jAe=hz(),zAe=Dz(),VAe=1,QAe=2;function KAe(e,n,a,t,r,u){var i=a&VAe,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 R=-1,E=!0,w=a&QAe?new xAe:void 0;for(u.set(e,n),u.set(n,e);++R{var YAe=Wv(),XAe=YAe.Uint8Array;yz.exports=XAe});var Ez=He((aOn,bz)=>{function ZAe(e){var n=-1,a=Array(e.size);return e.forEach(function(t,r){a[++n]=[r,t]}),a}bz.exports=ZAe});var Tz=He((tOn,Iz)=>{function e2e(e){var n=-1,a=Array(e.size);return e.forEach(function(t){a[++n]=t}),a}Iz.exports=e2e});var Mz=He((rOn,Gz)=>{var Sz=DT(),Cz=wz(),n2e=g3(),a2e=I3(),t2e=Ez(),r2e=Tz(),o2e=1,u2e=2,i2e="[object Boolean]",l2e="[object Date]",c2e="[object Error]",s2e="[object Map]",v2e="[object Number]",f2e="[object RegExp]",_2e="[object Set]",p2e="[object String]",m2e="[object Symbol]",d2e="[object ArrayBuffer]",h2e="[object DataView]",Fz=Sz?Sz.prototype:void 0,T3=Fz?Fz.valueOf:void 0;function g2e(e,n,a,t,r,u,i){switch(a){case h2e:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case d2e:return!(e.byteLength!=n.byteLength||!u(new Cz(e),new Cz(n)));case i2e:case l2e:case v2e:return n2e(+e,+n);case c2e:return e.name==n.name&&e.message==n.message;case f2e:case p2e:return e==n+"";case s2e:var l=t2e;case _2e:var s=t&o2e;if(l||(l=r2e),e.size!=n.size&&!s)return!1;var h=i.get(e);if(h)return h==n;t|=u2e,i.set(e,n);var p=a2e(l(e),l(n),t,r,u,i);return i.delete(e),p;case m2e:if(T3)return T3.call(e)==T3.call(n)}return!1}Gz.exports=g2e});var Lz=He((oOn,Az)=>{function D2e(e,n){for(var a=-1,t=n.length,r=e.length;++a{var R2e=Array.isArray;Pz.exports=R2e});var Oz=He((iOn,Nz)=>{var y2e=Lz(),w2e=wT();function b2e(e,n,a){var t=n(e);return w2e(e)?t:y2e(t,a(e))}Nz.exports=b2e});var kz=He((lOn,Uz)=>{function E2e(e,n){for(var a=-1,t=e==null?0:e.length,r=0,u=[];++a{function I2e(){return[]}Bz.exports=I2e});var $z=He((sOn,qz)=>{var T2e=kz(),S2e=Hz(),C2e=Object.prototype,F2e=C2e.propertyIsEnumerable,Jz=Object.getOwnPropertySymbols,G2e=Jz?function(e){return e==null?[]:(e=Object(e),T2e(Jz(e),function(n){return F2e.call(e,n)}))}:S2e;qz.exports=G2e});var xz=He((vOn,Wz)=>{function M2e(e,n){for(var a=-1,t=Array(e);++a{function A2e(e){return e!=null&&typeof e=="object"}jz.exports=A2e});var Vz=He((_On,zz)=>{var L2e=ry(),P2e=iy(),N2e="[object Arguments]";function O2e(e){return P2e(e)&&L2e(e)==N2e}zz.exports=O2e});var Xz=He((pOn,Yz)=>{var Qz=Vz(),U2e=iy(),Kz=Object.prototype,k2e=Kz.hasOwnProperty,B2e=Kz.propertyIsEnumerable,H2e=Qz((function(){return arguments})())?Qz:function(e){return U2e(e)&&k2e.call(e,"callee")&&!B2e.call(e,"callee")};Yz.exports=H2e});var eV=He((mOn,Zz)=>{function J2e(){return!1}Zz.exports=J2e});var S3=He((ly,Oh)=>{var q2e=Wv(),$2e=eV(),tV=typeof ly=="object"&&ly&&!ly.nodeType&&ly,nV=tV&&typeof Oh=="object"&&Oh&&!Oh.nodeType&&Oh,W2e=nV&&nV.exports===tV,aV=W2e?q2e.Buffer:void 0,x2e=aV?aV.isBuffer:void 0,j2e=x2e||$2e;Oh.exports=j2e});var oV=He((dOn,rV)=>{var z2e=9007199254740991,V2e=/^(?:0|[1-9]\d*)$/;function Q2e(e,n){var a=typeof e;return n=n==null?z2e:n,!!n&&(a=="number"||a!="symbol"&&V2e.test(e))&&e>-1&&e%1==0&&e{var K2e=9007199254740991;function Y2e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=K2e}uV.exports=Y2e});var lV=He((gOn,iV)=>{var X2e=ry(),Z2e=C3(),eLe=iy(),nLe="[object Arguments]",aLe="[object Array]",tLe="[object Boolean]",rLe="[object Date]",oLe="[object Error]",uLe="[object Function]",iLe="[object Map]",lLe="[object Number]",cLe="[object Object]",sLe="[object RegExp]",vLe="[object Set]",fLe="[object String]",_Le="[object WeakMap]",pLe="[object ArrayBuffer]",mLe="[object DataView]",dLe="[object Float32Array]",hLe="[object Float64Array]",gLe="[object Int8Array]",DLe="[object Int16Array]",RLe="[object Int32Array]",yLe="[object Uint8Array]",wLe="[object Uint8ClampedArray]",bLe="[object Uint16Array]",ELe="[object Uint32Array]",_o={};_o[dLe]=_o[hLe]=_o[gLe]=_o[DLe]=_o[RLe]=_o[yLe]=_o[wLe]=_o[bLe]=_o[ELe]=!0;_o[nLe]=_o[aLe]=_o[pLe]=_o[tLe]=_o[mLe]=_o[rLe]=_o[oLe]=_o[uLe]=_o[iLe]=_o[lLe]=_o[cLe]=_o[sLe]=_o[vLe]=_o[fLe]=_o[_Le]=!1;function ILe(e){return eLe(e)&&Z2e(e.length)&&!!_o[X2e(e)]}iV.exports=ILe});var sV=He((DOn,cV)=>{function TLe(e){return function(n){return e(n)}}cV.exports=TLe});var fV=He((cy,Uh)=>{var SLe=D3(),vV=typeof cy=="object"&&cy&&!cy.nodeType&&cy,sy=vV&&typeof Uh=="object"&&Uh&&!Uh.nodeType&&Uh,CLe=sy&&sy.exports===vV,F3=CLe&&SLe.process,FLe=(function(){try{var e=sy&&sy.require&&sy.require("util").types;return e||F3&&F3.binding&&F3.binding("util")}catch{}})();Uh.exports=FLe});var G3=He((ROn,mV)=>{var GLe=lV(),MLe=sV(),_V=fV(),pV=_V&&_V.isTypedArray,ALe=pV?MLe(pV):GLe;mV.exports=ALe});var hV=He((yOn,dV)=>{var LLe=xz(),PLe=Xz(),NLe=wT(),OLe=S3(),ULe=oV(),kLe=G3(),BLe=Object.prototype,HLe=BLe.hasOwnProperty;function JLe(e,n){var a=NLe(e),t=!a&&PLe(e),r=!a&&!t&&OLe(e),u=!a&&!t&&!r&&kLe(e),i=a||t||r||u,l=i?LLe(e.length,String):[],s=l.length;for(var h in e)(n||HLe.call(e,h))&&!(i&&(h=="length"||r&&(h=="offset"||h=="parent")||u&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||ULe(h,s)))&&l.push(h);return l}dV.exports=JLe});var DV=He((wOn,gV)=>{var qLe=Object.prototype;function $Le(e){var n=e&&e.constructor,a=typeof n=="function"&&n.prototype||qLe;return e===a}gV.exports=$Le});var yV=He((bOn,RV)=>{function WLe(e,n){return function(a){return e(n(a))}}RV.exports=WLe});var bV=He((EOn,wV)=>{var xLe=yV(),jLe=xLe(Object.keys,Object);wV.exports=jLe});var IV=He((IOn,EV)=>{var zLe=DV(),VLe=bV(),QLe=Object.prototype,KLe=QLe.hasOwnProperty;function YLe(e){if(!zLe(e))return VLe(e);var n=[];for(var a in Object(e))KLe.call(e,a)&&a!="constructor"&&n.push(a);return n}EV.exports=YLe});var SV=He((TOn,TV)=>{var XLe=y3(),ZLe=C3();function e3e(e){return e!=null&&ZLe(e.length)&&!XLe(e)}TV.exports=e3e});var GV=He((SOn,FV)=>{var n3e=hV(),a3e=IV(),t3e=SV();function r3e(e){return t3e(e)?n3e(e):a3e(e)}FV.exports=r3e});var AV=He((COn,MV)=>{var o3e=Oz(),u3e=$z(),i3e=GV();function l3e(e){return o3e(e,i3e,u3e)}MV.exports=l3e});var NV=He((FOn,PV)=>{var LV=AV(),c3e=1,s3e=Object.prototype,v3e=s3e.hasOwnProperty;function f3e(e,n,a,t,r,u){var i=a&c3e,l=LV(e),s=l.length,h=LV(n),p=h.length;if(s!=p&&!i)return!1;for(var R=s;R--;){var E=l[R];if(!(i?E in n:v3e.call(n,E)))return!1}var w=u.get(e),I=u.get(n);if(w&&I)return w==n&&I==e;var L=!0;u.set(e,n),u.set(n,e);for(var U=i;++R{var _3e=ym(),p3e=Wv(),m3e=_3e(p3e,"DataView");OV.exports=m3e});var BV=He((MOn,kV)=>{var d3e=ym(),h3e=Wv(),g3e=d3e(h3e,"Promise");kV.exports=g3e});var JV=He((AOn,HV)=>{var D3e=ym(),R3e=Wv(),y3e=D3e(R3e,"Set");HV.exports=y3e});var $V=He((LOn,qV)=>{var w3e=ym(),b3e=Wv(),E3e=w3e(b3e,"WeakMap");qV.exports=E3e});var YV=He((POn,KV)=>{var M3=UV(),A3=RT(),L3=BV(),P3=JV(),N3=$V(),QV=ry(),kh=b3(),WV="[object Map]",I3e="[object Object]",xV="[object Promise]",jV="[object Set]",zV="[object WeakMap]",VV="[object DataView]",T3e=kh(M3),S3e=kh(A3),C3e=kh(L3),F3e=kh(P3),G3e=kh(N3),wm=QV;(M3&&wm(new M3(new ArrayBuffer(1)))!=VV||A3&&wm(new A3)!=WV||L3&&wm(L3.resolve())!=xV||P3&&wm(new P3)!=jV||N3&&wm(new N3)!=zV)&&(wm=function(e){var n=QV(e),a=n==I3e?e.constructor:void 0,t=a?kh(a):"";if(t)switch(t){case T3e:return VV;case S3e:return WV;case C3e:return xV;case F3e:return jV;case G3e:return zV}return n});KV.exports=wm});var oQ=He((NOn,rQ)=>{var O3=cz(),M3e=I3(),A3e=Mz(),L3e=NV(),XV=YV(),ZV=wT(),eQ=S3(),P3e=G3(),N3e=1,nQ="[object Arguments]",aQ="[object Array]",bT="[object Object]",O3e=Object.prototype,tQ=O3e.hasOwnProperty;function U3e(e,n,a,t,r,u){var i=ZV(e),l=ZV(n),s=i?aQ:XV(e),h=l?aQ:XV(n);s=s==nQ?bT:s,h=h==nQ?bT:h;var p=s==bT,R=h==bT,E=s==h;if(E&&eQ(e)){if(!eQ(n))return!1;i=!0,p=!1}if(E&&!p)return u||(u=new O3),i||P3e(e)?M3e(e,n,a,t,r,u):A3e(e,n,s,a,t,r,u);if(!(a&N3e)){var w=p&&tQ.call(e,"__wrapped__"),I=R&&tQ.call(n,"__wrapped__");if(w||I){var L=w?e.value():e,U=I?n.value():n;return u||(u=new O3),r(L,U,a,t,u)}}return E?(u||(u=new O3),L3e(e,n,a,t,r,u)):!1}rQ.exports=U3e});var cQ=He((OOn,lQ)=>{var k3e=oQ(),uQ=iy();function iQ(e,n,a,t,r){return e===n?!0:e==null||n==null||!uQ(e)&&!uQ(n)?e!==e&&n!==n:k3e(e,n,a,t,iQ,r)}lQ.exports=iQ});var vQ=He((UOn,sQ)=>{var B3e=cQ();function H3e(e,n){return B3e(e,n)}sQ.exports=H3e});var QQ=He((qUn,pPe)=>{pPe.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 Rne=He((ew,MN)=>{typeof window<"u"&&(function(n,a){typeof ew=="object"&&typeof MN=="object"?MN.exports=a():typeof define=="function"&&define.amd?define([],a):typeof ew=="object"?ew.Hls=a():n.Hls=a()})(ew,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<"u"&&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,R,E){this.fn=p,this.context=R,this.once=E||!1}function l(p,R,E,w,I){if(typeof E!="function")throw new TypeError("The listener must be a function");var L=new i(E,w||p,I),U=r?r+R:R;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,R){--p._eventsCount===0?p._events=new u:delete p._events[R]}function h(){this._events=new u,this._eventsCount=0}h.prototype.eventNames=function(){var R=[],E,w;if(this._eventsCount===0)return R;for(w in E=this._events)t.call(E,w)&&R.push(r?w.slice(1):w);return Object.getOwnPropertySymbols?R.concat(Object.getOwnPropertySymbols(E)):R},h.prototype.listeners=function(R){var E=r?r+R:R,w=this._events[E];if(!w)return[];if(w.fn)return[w.fn];for(var I=0,L=w.length,U=new Array(L);I0},!1)}function p(R,E){for(var w={main:[E]},I={main:[]},L={main:{}};h(w);)for(var U=Object.keys(w),V=0;V>>8^Rt&255^99,te[Ia]=Rt,le[Rt]=Ia;var _t=Hn[Ia],Ha=Hn[_t],Tr=Hn[Ha],Xe=Hn[Rt]*257^Rt*16843008;Z[Ia]=Xe<<24|Xe>>>8,ee[Ia]=Xe<<16|Xe>>>16,me[Ia]=Xe<<8|Xe>>>24,We[Ia]=Xe,Xe=Tr*16843009^Ha*65537^_t*257^Ia*16843008,dn[Rt]=Xe<<24|Xe>>>8,qn[Rt]=Xe<<16|Xe>>>16,Mn[Rt]=Xe<<8|Xe>>>24,An[Rt]=Xe,Ia?(Ia=_t^Hn[Hn[Hn[Tr^_t]]],Da^=Hn[Hn[Da]]):Ia=Da=1}},V.expandKey=function(te){for(var le=this.uint8ArrayToUint32Array_(te),ne=!0,Z=0;Z>>6)+1,O=(X[k+2]&60)>>>2,O>Ae.length-1){W.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+O});return}return K=(X[k+2]&1)<<2,K|=(X[k+3]&192)>>>6,l.logger.log("manifest codec:"+S+",ADTS data:type:"+P+",sampleingIndex:"+O+"["+Ae[O]+"Hz],channelConfig:"+K),/firefox/i.test(ce)?O>=6?(P=5,ve=new Array(4),j=O-3):(P=2,ve=new Array(2),j=O):ce.indexOf("android")!==-1?(P=2,ve=new Array(2),j=O):(P=5,ve=new Array(4),S&&(S.indexOf("mp4a.40.29")!==-1||S.indexOf("mp4a.40.5")!==-1)||!S&&O>=6?j=O-3:((S&&S.indexOf("mp4a.40.2")!==-1&&(O>=6&&K===1||/vivaldi/i.test(ce))||!S&&K===1)&&(P=2,ve=new Array(2)),j=O)),ve[0]=P<<3,ve[0]|=(O&14)>>1,ve[1]|=(O&1)<<7,ve[1]|=K<<3,P===5&&(ve[1]|=(j&14)>>1,ve[2]=(j&1)<<7,ve[2]|=8,ve[3]=0),{config:ve,samplerate:Ae[O],channelCount:K,codec:"mp4a.40."+P,manifestCodec:Te}}function p(W,X){return W[X]===255&&(W[X+1]&246)===240}function R(W,X){return W[X+1]&1?7:9}function E(W,X){return(W[X+3]&3)<<11|W[X+4]<<3|(W[X+5]&224)>>>5}function w(W,X){return!!(X+10&&X+O+j<=ve)return K=k+S*P,{headerLength:O,frameLength:j,stamp:K}}function Q(W,X,k,S,P){var O=U(W.samplerate),j=V(X,k,S,P,O);if(j){var K=j.stamp,ve=j.headerLength,ce=j.frameLength,Te={unit:X.subarray(k+ve,k+ve+ce),pts:K,dts:K};return W.samples.push(Te),{sample:Te,length:ce+ve}}}var te=a("./src/demux/id3.js"),le=(function(){function W(k,S,P){this.observer=k,this.config=P,this.remuxer=S}var X=W.prototype;return X.resetInitSegment=function(S,P,O,j){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:P,duration:j,inputTimeScale:9e4}},X.resetTimeStamp=function(){},W.probe=function(S){if(!S)return!1;for(var P=te.default.getID3Data(S,0)||[],O=P.length,j=S.length;Ok.length)){var j=this.parseHeader(k,S);if(j&&S+j.frameLength<=k.length){var K=j.samplesPerFrame*9e4/j.sampleRate,ve=P+O*K,ce={unit:k.subarray(S,S+j.frameLength),pts:ve,dts:ve};return X.config=[],X.channelCount=j.channelCount,X.samplerate=j.sampleRate,X.samples.push(ce),{sample:ce,length:j.frameLength}}}},parseHeader:function(X,k){var S=X[k+1]>>3&3,P=X[k+1]>>1&3,O=X[k+2]>>4&15,j=X[k+2]>>2&3,K=X[k+2]>>1&1;if(S!==1&&O!==0&&O!==15&&j!==3){var ve=S===3?3-P:P===3?3:4,ce=ee.BitratesMap[ve*14+O-1]*1e3,Te=S===3?0:S===2?1:2,Ae=ee.SamplingRateMap[Te*3+j],Ne=X[k+3]>>6===3?1:2,ke=ee.SamplesCoefficients[S][P],Rn=ee.BytesInSlot[P],Ln=ke*8*Rn,Ve=parseInt(ke*ce/Ae+K,10)*Rn;return{sampleRate:Ae,channelCount:Ne,frameLength:Ve,samplesPerFrame:Ln}}},isHeaderPattern:function(X,k){return X[k]===255&&(X[k+1]&224)===224&&(X[k+1]&6)!==0},isHeader:function(X,k){return!!(k+1S?(this.word<<=S,this.bitsAvailable-=S):(S-=this.bitsAvailable,P=S>>3,S-=P>>3,this.bytesAvailable-=P,this.loadWord(),this.word<<=S,this.bitsAvailable-=S)},X.readBits=function(S){var P=Math.min(this.bitsAvailable,S),O=this.word>>>32-P;return S>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=S-P,P>0&&this.bitsAvailable?O<>>S)!==0)return this.word<<=S,this.bitsAvailable-=S,S;return this.loadWord(),S+this.skipLZ()},X.skipUEG=function(){this.skipBits(1+this.skipLZ())},X.skipEG=function(){this.skipBits(1+this.skipLZ())},X.readUEG=function(){var S=this.skipLZ();return this.readBits(S+1)-1},X.readEG=function(){var S=this.readUEG();return 1&S?1+S>>>1:-1*(S>>>1)},X.readBoolean=function(){return this.readBits(1)===1},X.readUByte=function(){return this.readBits(8)},X.readUShort=function(){return this.readBits(16)},X.readUInt=function(){return this.readBits(32)},X.skipScalingList=function(S){var P=8,O=8,j,K;for(j=0;j=S.length){O();return}if(!(S[P].unit.length<32)){var j=this.decrypter.isSync();if(this.decryptAacSample(S,P,O,j),!j)return}}},X.getAvcEncryptedData=function(S){for(var P=Math.floor((S.length-48)/160)*16+16,O=new Int8Array(P),j=0,K=32;K<=S.length-16;K+=160,j+=16)O.set(S.subarray(K,K+16),j);return O},X.getAvcDecryptedUnit=function(S,P){P=new Uint8Array(P);for(var O=0,j=32;j<=S.length-16;j+=160,O+=16)S.set(P.subarray(O,O+16),j);return S},X.decryptAvcSample=function(S,P,O,j,K,ve){var ce=this.discardEPB(K.data),Te=this.getAvcEncryptedData(ce),Ae=this;this.decryptBuffer(Te.buffer,function(Ne){K.data=Ae.getAvcDecryptedUnit(ce,Ne),ve||Ae.decryptAvcSamples(S,P,O+1,j)})},X.decryptAvcSamples=function(S,P,O,j){for(;;P++,O=0){if(P>=S.length){j();return}for(var K=S[P].units;!(O>=K.length);O++){var ve=K[O];if(!(ve.length<=48||ve.type!==1&&ve.type!==5)){var ce=this.decrypter.isSync();if(this.decryptAvcSample(S,P,O,j,ve,ce),!ce)return}}}},W})(),qn=dn,Mn={video:1,audio:2,id3:3,text:4},An=(function(){function W(k,S,P,O){this.observer=k,this.config=P,this.typeSupported=O,this.remuxer=S,this.sampleAes=null}var X=W.prototype;return X.setDecryptData=function(S){S!=null&&S.key!=null&&S.method==="SAMPLE-AES"?this.sampleAes=new qn(this.observer,this.config,S,this.discardEPB):this.sampleAes=null},W.probe=function(S){var P=W._syncOffset(S);return P<0?!1:(P&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+P+", junk ahead ?"),!0)},W._syncOffset=function(S){for(var P=Math.min(1e3,S.length-564),O=0;O>4,Ae>1){if(Ne=K+5+S[K+4],Ne===K+188)continue}else Ne=K+4;switch(Te){case $a:ce&&(rr&&(ke=po(rr))&&Jo(ke,!1),rr={data:[],size:0}),rr&&(rr.data.push(S.subarray(Ne,K+188)),rr.size+=K+188-Ne);break;case qt:ce&&(yt&&(ke=po(yt))&&($n.isAAC?Pu(ke):Co(ke)),yt={data:[],size:0}),yt&&(yt.data.push(S.subarray(Ne,K+188)),yt.size+=K+188-Ne);break;case Pr:ce&&(Jr&&(ke=po(Jr))&&di(ke),Jr={data:[],size:0}),Jr&&(Jr.data.push(S.subarray(Ne,K+188)),Jr.size+=K+188-Ne);break;case 0:ce&&(Ne+=S[Ne]+1),Xa=this._pmtId=Lt(S,Ne);break;case Xa:ce&&(Ne+=S[Ne]+1);var oo=hr(S,Ne,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,this.sampleAes!=null);$a=oo.avc,$a>0&&(Ve.pid=$a),qt=oo.audio,qt>0&&($n.pid=qt,$n.isAAC=oo.isAAC),Pr=oo.id3,Pr>0&&(Ra.pid=Pr),Rn&&!Ln&&(l.logger.log("reparse from beginning"),Rn=!1,K=qo-188),Ln=this.pmtParsed=!0;break;case 17:case 8191:break;default:Rn=!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"});rr&&(ke=po(rr))?(Jo(ke,!0),Ve.pesData=null):Ve.pesData=rr,yt&&(ke=po(yt))?($n.isAAC?Pu(ke):Co(ke),$n.pesData=null):(yt&&yt.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),$n.pesData=yt),Jr&&(ke=po(Jr))?(di(ke),Ra.pesData=null):Ra.pesData=Jr,this.sampleAes==null?this.remuxer.remux($n,Ve,Ra,this._txtTrack,P,O,j):this.decryptAndRemux($n,Ve,Ra,this._txtTrack,P,O,j)},X.decryptAndRemux=function(S,P,O,j,K,ve,ce){if(S.samples&&S.isAAC){var Te=this;this.sampleAes.decryptAacSamples(S.samples,0,function(){Te.decryptAndRemuxAvc(S,P,O,j,K,ve,ce)})}else this.decryptAndRemuxAvc(S,P,O,j,K,ve,ce)},X.decryptAndRemuxAvc=function(S,P,O,j,K,ve,ce){if(P.samples){var Te=this;this.sampleAes.decryptAvcSamples(P.samples,0,0,function(){Te.remuxer.remux(S,P,O,j,K,ve,ce)})}else this.remuxer.remux(S,P,O,j,K,ve,ce)},X.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},X._parsePAT=function(S,P){return(S[P+10]&31)<<8|S[P+11]},X._parsePMT=function(S,P,O,j){var K,ve,ce,Te,Ae={audio:-1,avc:-1,id3:-1,isAAC:!0};for(K=(S[P+1]&15)<<8|S[P+2],ve=P+3+K-4,ce=(S[P+10]&15)<<8|S[P+11],P+=12+ce;P1;){var Ln=new Uint8Array(Rn[0].length+Rn[1].length);Ln.set(Rn[0]),Ln.set(Rn[1],Rn[0].length),Rn[0]=Ln,Rn.splice(1,1)}if(O=Rn[0],K=(O[0]<<16)+(O[1]<<8)+O[2],K===1){if(ve=(O[4]<<8)+O[5],ve&&ve>S.size-6||(j=O[7],j&192&&(Ae=(O[9]&14)*536870912+(O[10]&255)*4194304+(O[11]&254)*16384+(O[12]&255)*128+(O[13]&254)/2,Ae>4294967295&&(Ae-=8589934592),j&64?(Ne=(O[14]&14)*536870912+(O[15]&255)*4194304+(O[16]&254)*16384+(O[17]&255)*128+(O[18]&254)/2,Ne>4294967295&&(Ne-=8589934592),Ae-Ne>60*9e4&&(l.logger.warn(Math.round((Ae-Ne)/9e4)+"s delta between PTS and DTS, align them"),Ae=Ne)):Ne=Ae),ce=O[8],ke=ce+9,S.size<=ke))return null;S.size-=ke,Te=new Uint8Array(S.size);for(var Ve=0,$n=Rn.length;Ve<$n;Ve++){O=Rn[Ve];var Ra=O.byteLength;if(ke)if(ke>Ra){ke-=Ra;continue}else O=O.subarray(ke),Ra-=ke,ke=0;Te.set(O,P),P+=Ra}return ve&&(ve-=ce+3),{data:Te,pts:Ae,dts:Ne,len:ve}}else return null},X.pushAccesUnit=function(S,P){if(S.units.length&&S.frame){var O=P.samples,j=O.length;if(isNaN(S.pts))if(j){var K=O[j-1];S.pts=K.pts,S.dts=K.dts}else{P.dropped++;return}!this.config.forceKeyFrameOnDiscontinuity||S.key===!0||P.sps&&(j||this.contiguous)?(S.id=j,O.push(S)):P.dropped++}S.debug.length&&l.logger.log(S.pts+"/"+S.dts+":"+S.debug)},X._parseAVCPES=function(S,P){var O=this,j=this._avcTrack,K=this._parseAVCNALu(S.data),ve=!1,ce,Te=this.avcSample,Ae,Ne=!1,ke,Rn=this.pushAccesUnit.bind(this),Ln=function($n,Ra,$a,qt){return{key:$n,pts:Ra,dts:$a,units:[],debug:qt}};S.data=null,Te&&K.length&&!j.audFound&&(Rn(Te,j),Te=this.avcSample=Ln(!1,S.pts,S.dts,"")),K.forEach(function(Ve){switch(Ve.type){case 1:Ae=!0,Te||(Te=O.avcSample=Ln(!0,S.pts,S.dts,"")),ve&&(Te.debug+="NDR "),Te.frame=!0;var $n=Ve.data;if(Ne&&$n.length>4){var Ra=new Qe($n).readSliceType();(Ra===2||Ra===4||Ra===7||Ra===9)&&(Te.key=!0)}break;case 5:Ae=!0,Te||(Te=O.avcSample=Ln(!0,S.pts,S.dts,"")),ve&&(Te.debug+="IDR "),Te.key=!0,Te.frame=!0;break;case 6:Ae=!0,ve&&Te&&(Te.debug+="SEI "),ce=new Qe(O.discardEPB(Ve.data)),ce.readUByte();for(var $a=0,qt=0,Pr=!1,Xa=0;!Pr&&ce.bytesAvailable>1;){$a=0;do Xa=ce.readUByte(),$a+=Xa;while(Xa===255);qt=0;do Xa=ce.readUByte(),qt+=Xa;while(Xa===255);if($a===4&&ce.bytesAvailable!==0){Pr=!0;var rr=ce.readUByte();if(rr===181){var yt=ce.readUShort();if(yt===49){var Jr=ce.readUInt();if(Jr===1195456820){var Lt=ce.readUByte();if(Lt===3){var hr=ce.readUByte(),po=ce.readUByte(),Jo=31&hr,Pu=[hr,po];for(ke=0;ke16){var Co=[];for(ke=0;ke<16;ke++)Co.push(ce.readUByte().toString(16)),(ke===3||ke===5||ke===7||ke===9)&&Co.push("-");var di=qt-16,qo=new Uint8Array(di);for(ke=0;ke0){if(P.pts>=S[O-1].pts)S.push(P);else for(var j=O-1;j>=0;j--)if(P.pts=0)Ne={data:S.subarray(Rn,P-ce-1),type:Ln},Ae.push(Ne);else{var Ve=this._getLastNalUnit();if(Ve&&(Te&&P<=4-Te&&Ve.state&&(Ve.data=Ve.data.subarray(0,Ve.data.byteLength-Te)),K=P-ce-1,K>0)){var $n=new Uint8Array(Ve.data.byteLength+K);$n.set(Ve.data,0),$n.set(S.subarray(0,K),Ve.data.byteLength),Ve.data=$n}}P=0&&ce>=0&&(Ne={data:S.subarray(Rn,O),type:Ln,state:ce},Ae.push(Ne)),Ae.length===0){var Ra=this._getLastNalUnit();if(Ra){var $a=new Uint8Array(Ra.data.byteLength+S.byteLength);$a.set(Ra.data,0),$a.set(S,Ra.data.byteLength),Ra.data=$a}}return ve.naluState=ce,Ae},X.discardEPB=function(S){for(var P=S.byteLength,O=[],j=1,K,ve;j1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((Ra-j)/90)),j=Ra)}for(;Ne>24&255,K[1]=P>>16&255,K[2]=P>>8&255,K[3]=P&255,K.set(k,4),O=0,P=8;O>24&255,k>>16&255,k>>8&255,k&255,P>>24,P>>16&255,P>>8&255,P&255,O>>24,O>>16&255,O>>8&255,O&255,85,196,0,0]))},W.mdia=function(k){return W.box(W.types.mdia,W.mdhd(k.timescale,k.duration),W.hdlr(k.type),W.minf(k))},W.mfhd=function(k){return W.box(W.types.mfhd,new Uint8Array([0,0,0,0,k>>24,k>>16&255,k>>8&255,k&255]))},W.minf=function(k){return k.type==="audio"?W.box(W.types.minf,W.box(W.types.smhd,W.SMHD),W.DINF,W.stbl(k)):W.box(W.types.minf,W.box(W.types.vmhd,W.VMHD),W.DINF,W.stbl(k))},W.moof=function(k,S,P){return W.box(W.types.moof,W.mfhd(k),W.traf(P,S))},W.moov=function(k){for(var S=k.length,P=[];S--;)P[S]=W.trak(k[S]);return W.box.apply(null,[W.types.moov,W.mvhd(k[0].timescale,k[0].duration)].concat(P).concat(W.mvex(k)))},W.mvex=function(k){for(var S=k.length,P=[];S--;)P[S]=W.trex(k[S]);return W.box.apply(null,[W.types.mvex].concat(P))},W.mvhd=function(k,S){S*=k;var P=Math.floor(S/(_t+1)),O=Math.floor(S%(_t+1)),j=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,k>>24&255,k>>16&255,k>>8&255,k&255,P>>24,P>>16&255,P>>8&255,P&255,O>>24,O>>16&255,O>>8&255,O&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 W.box(W.types.mvhd,j)},W.sdtp=function(k){var S=k.samples||[],P=new Uint8Array(4+S.length),O,j;for(j=0;j>>8&255),S.push(K&255),S=S.concat(Array.prototype.slice.call(j));for(O=0;O>>8&255),P.push(K&255),P=P.concat(Array.prototype.slice.call(j));var ve=W.box(W.types.avcC,new Uint8Array([1,S[3],S[4],S[5],255,224|k.sps.length].concat(S).concat([k.pps.length]).concat(P))),ce=k.width,Te=k.height,Ae=k.pixelRatio[0],Ne=k.pixelRatio[1];return W.box(W.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,ce>>8&255,ce&255,Te>>8&255,Te&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]),ve,W.box(W.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),W.box(W.types.pasp,new Uint8Array([Ae>>24,Ae>>16&255,Ae>>8&255,Ae&255,Ne>>24,Ne>>16&255,Ne>>8&255,Ne&255])))},W.esds=function(k){var S=k.config.length;return new Uint8Array([0,0,0,0,3,23+S,0,1,0,4,15+S,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([S]).concat(k.config).concat([6,1,2]))},W.mp4a=function(k){var S=k.samplerate;return W.box(W.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,k.channelCount,0,16,0,0,0,0,S>>8&255,S&255,0,0]),W.box(W.types.esds,W.esds(k)))},W.mp3=function(k){var S=k.samplerate;return W.box(W.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,k.channelCount,0,16,0,0,0,0,S>>8&255,S&255,0,0]))},W.stsd=function(k){return k.type==="audio"?!k.isAAC&&k.codec==="mp3"?W.box(W.types.stsd,W.STSD,W.mp3(k)):W.box(W.types.stsd,W.STSD,W.mp4a(k)):W.box(W.types.stsd,W.STSD,W.avc1(k))},W.tkhd=function(k){var S=k.id,P=k.duration*k.timescale,O=k.width,j=k.height,K=Math.floor(P/(_t+1)),ve=Math.floor(P%(_t+1));return W.box(W.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,S>>24&255,S>>16&255,S>>8&255,S&255,0,0,0,0,K>>24,K>>16&255,K>>8&255,K&255,ve>>24,ve>>16&255,ve>>8&255,ve&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,O>>8&255,O&255,0,0,j>>8&255,j&255,0,0]))},W.traf=function(k,S){var P=W.sdtp(k),O=k.id,j=Math.floor(S/(_t+1)),K=Math.floor(S%(_t+1));return W.box(W.types.traf,W.box(W.types.tfhd,new Uint8Array([0,0,0,0,O>>24,O>>16&255,O>>8&255,O&255])),W.box(W.types.tfdt,new Uint8Array([1,0,0,0,j>>24,j>>16&255,j>>8&255,j&255,K>>24,K>>16&255,K>>8&255,K&255])),W.trun(k,P.length+16+20+8+16+8+8),P)},W.trak=function(k){return k.duration=k.duration||4294967295,W.box(W.types.trak,W.tkhd(k),W.mdia(k))},W.trex=function(k){var S=k.id;return W.box(W.types.trex,new Uint8Array([0,0,0,0,S>>24,S>>16&255,S>>8&255,S&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},W.trun=function(k,S){var P=k.samples||[],O=P.length,j=12+16*O,K=new Uint8Array(j),ve,ce,Te,Ae,Ne,ke;for(S+=8+j,K.set([0,0,15,1,O>>>24&255,O>>>16&255,O>>>8&255,O&255,S>>>24&255,S>>>16&255,S>>>8&255,S&255],0),ve=0;ve>>24&255,Te>>>16&255,Te>>>8&255,Te&255,Ae>>>24&255,Ae>>>16&255,Ae>>>8&255,Ae&255,Ne.isLeading<<2|Ne.dependsOn,Ne.isDependedOn<<6|Ne.hasRedundancy<<4|Ne.paddingValue<<1|Ne.isNonSync,Ne.degradPrio&61440,Ne.degradPrio&15,ke>>>24&255,ke>>>16&255,ke>>>8&255,ke&255],12+16*ve);return W.box(W.types.trun,K)},W.initSegment=function(k){W.types||W.init();var S=W.moov(k),P;return P=new Uint8Array(W.FTYP.byteLength+S.byteLength),P.set(W.FTYP),P.set(S,W.FTYP.byteLength),P},W})(),Tr=Ha,Xe=9e4;function Wa(W,X,k,S){return k===void 0&&(k=1),S===void 0&&(S=!1),At(W,X,1/k)}function At(W,X,k,S){k===void 0&&(k=1),S===void 0&&(S=!1);var P=W*X*k;return S?Math.round(P):P}function zn(W,X){return X===void 0&&(X=!1),At(W,1e3,1/Xe,X)}function Un(W,X){return X===void 0&&(X=1),At(W,Xe,1/X)}var Ze=Un(10),Ma=Un(.2),Ja=(function(){function W(k,S,P,O){this.observer=k,this.config=S,this.typeSupported=P;var j=navigator.userAgent;this.isSafari=O&&O.indexOf("Apple")>-1&&j&&!j.match("CriOS"),this.ISGenerated=!1}var X=W.prototype;return X.destroy=function(){},X.resetTimeStamp=function(S){this._initPTS=this._initDTS=S},X.resetInitSegment=function(){this.ISGenerated=!1},X.remux=function(S,P,O,j,K,ve,ce){if(this.ISGenerated||this.generateIS(S,P,K),this.ISGenerated){var Te=S.samples.length,Ae=P.samples.length,Ne=K,ke=K;if(Te&&Ae){var Rn=(S.samples[0].pts-P.samples[0].pts)/P.inputTimeScale;Ne+=Math.max(0,Rn),ke+=Math.max(0,-Rn)}if(Te){S.timescale||(l.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(S,P,K));var Ln=this.remuxAudio(S,Ne,ve,ce);if(Ae){var Ve;Ln&&(Ve=Ln.endPTS-Ln.startPTS),P.timescale||(l.logger.warn("regenerate InitSegment as video detected"),this.generateIS(S,P,K)),this.remuxVideo(P,ke,ve,Ve,ce)}}else if(Ae){var $n=this.remuxVideo(P,ke,ve,0,ce);$n&&S.codec&&this.remuxEmptyAudio(S,Ne,ve,$n)}}O.samples.length&&this.remuxID3(O,K),j.samples.length&&this.remuxText(j,K),this.observer.trigger(t.default.FRAG_PARSED)},X.generateIS=function(S,P,O){var j=this.observer,K=S.samples,ve=P.samples,ce=this.typeSupported,Te="audio/mp4",Ae={},Ne={tracks:Ae},ke=this._initPTS===void 0,Rn,Ln;if(ke&&(Rn=Ln=1/0),S.config&&K.length&&(S.timescale=S.samplerate,l.logger.log("audio sampling rate : "+S.samplerate),S.isAAC||(ce.mpeg?(Te="audio/mpeg",S.codec=""):ce.mp3&&(S.codec="mp3")),Ae.audio={container:Te,codec:S.codec,initSegment:!S.isAAC&&ce.mpeg?new Uint8Array:Tr.initSegment([S]),metadata:{channelCount:S.channelCount}},ke&&(Rn=Ln=K[0].pts-S.inputTimeScale*O)),P.sps&&P.pps&&ve.length){var Ve=P.inputTimeScale;P.timescale=Ve,Ae.video={container:"video/mp4",codec:P.codec,initSegment:Tr.initSegment([P]),metadata:{width:P.width,height:P.height}},ke&&(Rn=Math.min(Rn,ve[0].pts-Ve*O),Ln=Math.min(Ln,ve[0].dts-Ve*O),this.observer.trigger(t.default.INIT_PTS_FOUND,{initPTS:Rn}))}Object.keys(Ae).length?(j.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,Ne),this.ISGenerated=!0,ke&&(this._initPTS=Rn,this._initDTS=Ln)):j.trigger(t.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},X.remuxVideo=function(S,P,O,j,K){var ve=8,ce,Te,Ae,Ne,ke,Rn,Ln,Ve=S.timescale,$n=S.samples,Ra=[],$a=$n.length,qt=this._PTSNormalize,Pr=this._initPTS,Xa=this.nextAvcDts,rr=this.isSafari;if($a!==0){rr&&(O|=$n.length&&Xa&&(K&&Math.abs(P-Xa/Ve)<.1||Math.abs($n[0].pts-Xa-Pr)1?l.logger.log("AVC: "+zn(hr,!0)+" ms hole between fragments detected,filling it"):hr<-1&&l.logger.log("AVC: "+zn(-hr,!0)+" ms overlapping between fragments detected"),ke=Xa,$n[0].dts=ke,Ne=Math.max(Ne-hr,Xa),$n[0].pts=Ne,l.logger.log("Video: PTS/DTS adjusted: "+zn(Ne,!0)+"/"+zn(ke,!0)+", delta: "+zn(hr,!0)+" ms")),Lt=$n[$n.length-1],Ln=Math.max(Lt.dts,0),Rn=Math.max(Lt.pts,0,Ln),rr&&(ce=Math.round((Ln-ke)/($n.length-1)));for(var po=0,Jo=0,Pu=0;Pu<$a;Pu++){for(var Co=$n[Pu],di=Co.units,qo=di.length,oo=0,au=0;au0?Yu-1:Yu].dts;if(nf.stretchShortVideoTrack){var Tc=nf.maxBufferHole,Rg=Math.floor(Tc*Ve),$0=(j?Ne+j*Ve:this.nextAudioPts)-tu.pts;$0>Rg?(ce=$0-hs,ce<0&&(ce=hs),l.logger.log("It is approximately "+zn($0,!1)+" ms to the next segment; using duration "+zn(ce,!1)+" ms for the last video frame.")):ce=hs}else ce=hs}Ic=Math.round(tu.pts-tu.dts)}Ra.push({size:Wl,duration:ce,cts:Ic,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:tu.key?2:1,isNonSync:tu.key?0:1}})}this.nextAvcDts=Ln+ce;var xm=S.dropped;if(S.nbNalu=0,S.dropped=0,Ra.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var jm=Ra[0].flags;jm.dependsOn=2,jm.isNonSync=0}S.samples=Ra,Ae=Tr.moof(S.sequenceNumber++,ke,S),S.samples=[];var Sc={data1:Ae,data2:Te,startPTS:Ne/Ve,endPTS:(Rn+ce)/Ve,startDTS:ke/Ve,endDTS:this.nextAvcDts/Ve,type:"video",hasAudio:!1,hasVideo:!0,nb:Ra.length,dropped:xm};return this.observer.trigger(t.default.FRAG_PARSING_DATA,Sc),Sc}},X.remuxAudio=function(S,P,O,j){var K=S.inputTimeScale,ve=S.timescale,ce=K/ve,Te=S.isAAC?1024:1152,Ae=Te*ce,Ne=this._PTSNormalize,ke=this._initPTS,Rn=!S.isAAC&&this.typeSupported.mpeg,Ln,Ve,$n,Ra,$a,qt,Pr=Rn?0:8,Xa=S.samples,rr=[],yt=this.nextAudioPts;if(O|=Xa.length&&yt&&(j&&Math.abs(P-yt/K)<.1||Math.abs(Xa[0].pts-yt-ke)<20*Ae),Xa.forEach(function(Tc){Tc.pts=Tc.dts=Ne(Tc.pts-ke,P*K)}),Xa=Xa.filter(function(Tc){return Tc.pts>=0}),Xa.length!==0){if(O||(j?yt=P*K:yt=Xa[0].pts),S.isAAC)for(var Jr=this.config.maxAudioFramesDrift,Lt=0,hr=yt;Lt=Jr*Ae&&Jo.1*Ae,po.pts=po.dts=hr,hr+=Ae,Lt++}for(var oo=Xa.length,au=0;oo--;)au+=Xa[oo].unit.byteLength;for(var Ni=0,Oi=Xa.length;Ni0&&Wl0&&(Ve=Rt.getSilentFrame(S.manifestCodec||S.codec,S.channelCount),Ve||(Ve=tu.subarray()),au+=Ic*Ve.length);else if(Wl<-12){l.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+zn(yt,!0)+" ms / "+zn(vl,!0)+" ms / "+zn(-Wl,!0)+" ms"),au-=tu.byteLength;continue}vl=yt}if($a=vl,au>0){au+=Pr;try{$n=new Uint8Array(au)}catch{this.observer.trigger(t.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:au,reason:"fail allocating audio mdat "+au});return}if(!Rn){var Ks=new DataView($n.buffer);Ks.setUint32(0,au),$n.set(Tr.types.mdat,4)}}else return;for(var ef=0;ef=2&&(ms=rr[oo-2].duration,Ln.duration=ms),oo){this.nextAudioPts=yt=qt+ce*ms,S.samples=rr,Rn?Ra=new Uint8Array:Ra=Tr.moof(S.sequenceNumber++,$a/ce,S),S.samples=[];var ds=$a/K,nf=yt/K,hs={data1:Ra,data2:$n,startPTS:ds,endPTS:nf,startDTS:ds,endDTS:nf,type:"audio",hasAudio:!0,hasVideo:!1,nb:oo};return this.observer.trigger(t.default.FRAG_PARSING_DATA,hs),hs}return null}},X.remuxEmptyAudio=function(S,P,O,j){var K=S.inputTimeScale,ve=S.samplerate?S.samplerate:K,ce=K/ve,Te=this.nextAudioPts,Ae=(Te!==void 0?Te:j.startDTS*K)+this._initDTS,Ne=j.endDTS*K+this._initDTS,ke=1024,Rn=ce*ke,Ln=Math.ceil((Ne-Ae)/Rn),Ve=Rt.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);if(l.logger.warn("remux empty Audio"),!Ve){l.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");return}for(var $n=[],Ra=0;Ra4294967296;)S+=O;return S},W})(),pt=Ja,tr=(function(){function W(k){this.observer=k}var X=W.prototype;return X.destroy=function(){},X.resetTimeStamp=function(){},X.resetInitSegment=function(){},X.remux=function(S,P,O,j,K,ve,ce,Te){var Ae=this.observer,Ne="";S&&(Ne+="audio"),P&&(Ne+="video"),Ae.trigger(t.default.FRAG_PARSING_DATA,{data1:Te,startPTS:K,startDTS:K,type:Ne,hasAudio:!!S,hasVideo:!!P,nb:1,dropped:0}),Ae.trigger(t.default.FRAG_PARSED)},W})(),In=tr,Oa=Object(s.getSelfScope)(),dr;try{dr=Oa.performance.now.bind(Oa.performance)}catch{l.logger.debug("Unable to use Performance API on this environment"),dr=Oa.Date.now}var za=(function(){function W(k,S,P,O){this.observer=k,this.typeSupported=S,this.config=P,this.vendor=O}var X=W.prototype;return X.destroy=function(){var S=this.demuxer;S&&S.destroy()},X.push=function(S,P,O,j,K,ve,ce,Te,Ae,Ne,ke,Rn){var Ln=this;if(S.byteLength>0&&P!=null&&P.key!=null&&P.method==="AES-128"){var Ve=this.decrypter;Ve==null&&(Ve=this.decrypter=new u.default(this.observer,this.config));var $n=dr();Ve.decrypt(S,P.key.buffer,P.iv.buffer,function(Ra){var $a=dr();Ln.observer.trigger(t.default.FRAG_DECRYPTED,{stats:{tstart:$n,tdecrypt:$a}}),Ln.pushDecrypted(new Uint8Array(Ra),P,new Uint8Array(O),j,K,ve,ce,Te,Ae,Ne,ke,Rn)})}else this.pushDecrypted(new Uint8Array(S),P,new Uint8Array(O),j,K,ve,ce,Te,Ae,Ne,ke,Rn)},X.pushDecrypted=function(S,P,O,j,K,ve,ce,Te,Ae,Ne,ke,Rn){var Ln=this.demuxer;if(!Ln||(ce||Te)&&!this.probe(S)){for(var Ve=this.observer,$n=this.typeSupported,Ra=this.config,$a=[{demux:Hn,remux:pt},{demux:Z.default,remux:In},{demux:ne,remux:pt},{demux:Da,remux:pt}],qt=0,Pr=$a.length;qt1?L-1:0),V=1;V1?L-1:0),V=1;V0)return p.subarray(E,E+w)},s._readSize=function(p,R){var E=0;return E=(p[R]&127)<<21,E|=(p[R+1]&127)<<14,E|=(p[R+2]&127)<<7,E|=p[R+3]&127,E},s.getTimeStamp=function(p){for(var R=s.getID3Frames(p),E=0;E>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:te+=String.fromCharCode(U);break;case 12:case 13:V=p[le++],te+=String.fromCharCode((U&31)<<6|V&63);break;case 14:V=p[le++],Q=p[le++],te+=String.fromCharCode((U&15)<<12|(V&63)<<6|(Q&63)<<0);break;default:}}return te},s})(),u;function i(){var s=Object(t.getSelfScope)();return!u&&typeof s.TextDecoder<"u"&&(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,R,E,w){if(p&&p.byteLength){var I=this.initData=l.parseInitSegment(p);R==null&&(R="mp4a.40.5"),E==null&&(E="avc1.42e01e");var L={};I.audio&&I.video?L.audiovideo={container:"video/mp4",codec:R+","+E,initSegment:w?p:null}:(I.audio&&(L.audio={container:"audio/mp4",codec:R,initSegment:w?p:null}),I.video&&(L.video={container:"video/mp4",codec:E,initSegment:w?p:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:L})}else R&&(this.audioCodec=R),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,R){p.data&&(R+=p.start,p=p.data);var E=p[R]<<8|p[R+1];return E<0?65536+E:E},l.readUint32=function(p,R){p.data&&(R+=p.start,p=p.data);var E=p[R]<<24|p[R+1]<<16|p[R+2]<<8|p[R+3];return E<0?4294967296+E:E},l.writeUint32=function(p,R,E){p.data&&(R+=p.start,p=p.data),p[R]=E>>24,p[R+1]=E>>16&255,p[R+2]=E>>8&255,p[R+3]=E&255},l.findBox=function(p,R){var E=[],w,I,L,U,V,Q,te;if(p.data?(Q=p.start,U=p.end,p=p.data):(Q=0,U=p.byteLength),!R.length)return null;for(w=Q;w1?w+I:U,L===R[0]&&(R.length===1?E.push({data:p,start:w+8,end:te}):(V=l.findBox({data:p,start:w+8,end:te},R.slice(1)),V.length&&(E=E.concat(V)))),w=te;return E},l.parseSegmentIndex=function(p){var R=l.findBox(p,["moov"])[0],E=R?R.end:null,w=0,I=l.findBox(p,["sidx"]),L;if(!I||!I[0])return null;L=[],I=I[0];var U=I.data[0];w=U===0?8:16;var V=l.readUint32(I,w);w+=4;var Q=0,te=0;U===0?w+=8:w+=16,w+=2;var le=I.end+te,ne=l.readUint16(I,w);w+=2;for(var Z=0;Z>>31;if(Qe===1){console.warn("SIDX has hierarchical references (not supported)");return}var dn=l.readUint32(I,ee);ee+=4,L.push({referenceSize:We,subsegmentDuration:dn,info:{duration:dn/V,start:le,end:le+We-1}}),le+=We,ee+=4,w=ee}return{earliestPresentationTime:Q,timescale:V,version:U,referencesCount:ne,references:L,moovEndOffset:E}},l.parseInitSegment=function(p){var R=[],E=l.findBox(p,["moov","trak"]);return E.forEach(function(w){var I=l.findBox(w,["tkhd"])[0];if(I){var L=I.data[I.start],U=L===0?12:20,V=l.readUint32(I,U),Q=l.findBox(w,["mdia","mdhd"])[0];if(Q){L=Q.data[Q.start],U=L===0?12:20;var te=l.readUint32(Q,U),le=l.findBox(w,["mdia","hdlr"])[0];if(le){var ne=l.bin2str(le.data.subarray(le.start+8,le.start+12)),Z={soun:"audio",vide:"video"}[ne];if(Z){var ee=l.findBox(w,["mdia","minf","stbl","stsd"]);if(ee.length){ee=ee[0];var me=l.bin2str(ee.data.subarray(ee.start+12,ee.start+16));t.logger.log("MP4Demuxer:"+Z+":"+me+" found")}R[V]={timescale:te,type:Z},R[Z]={timescale:te,id:V}}}}}}),R},l.getStartDTS=function(p,R){var E,w,I;return E=l.findBox(R,["moof","traf"]),w=[].concat.apply([],E.map(function(L){return l.findBox(L,["tfhd"]).map(function(U){var V,Q,te;return V=l.readUint32(U,4),Q=p[V].timescale||9e4,te=l.findBox(L,["tfdt"]).map(function(le){var ne,Z;return ne=le.data[le.start],Z=l.readUint32(le,4),ne===1&&(Z*=Math.pow(2,32),Z+=l.readUint32(le,8)),Z})[0],te/Q})})),I=Math.min.apply(null,w),isFinite(I)?I:0},l.offsetStartDTS=function(p,R,E){l.findBox(R,["moof","traf"]).map(function(w){return l.findBox(w,["tfhd"]).map(function(I){var L=l.readUint32(I,4),U=p[L].timescale||9e4;l.findBox(w,["tfdt"]).map(function(V){var Q=V.data[V.start],te=l.readUint32(V,4);if(Q===0)l.writeUint32(V,4,te-E*U);else{te*=Math.pow(2,32),te+=l.readUint32(V,8),te-=E*U,te=Math.max(te,0);var le=Math.floor(te/(u+1)),ne=Math.floor(te%(u+1));l.writeUint32(V,4,le),l.writeUint32(V,8,ne)}})})})},s.append=function(p,R,E,w){var I=this.initData;I||(this.resetInitSegment(p,this.audioCodec,this.videoCodec,!1),I=this.initData);var L,U=this.initPTS;if(U===void 0){var V=l.getStartDTS(I,p);this.initPTS=U=V-R,this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:U})}l.offsetStartDTS(I,p,U),L=l.getStartDTS(I,p),this.remuxer.remux(I.audio,I.video,null,null,L,E,w,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 fF});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 b(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>8*(15-c)&255;return o},g.setDecryptDataFromLevelKey=function(v,o){var c=v;return v&&v.method&&v.uri&&!v.iv&&(c=new V(v.baseuri,v.reluri),c.method=v.method,c.iv=this.createInitializationVector(o)),c},te(b,[{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)}}]),b})();function Z(b,g){for(var f=0;fNumber.MAX_SAFE_INTEGER?1/0:o},g.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;_Number.MAX_SAFE_INTEGER?1/0:o},g.decimalFloatingPoint=function(v){return parseFloat(this[v])},g.enumeratedString=function(v){return this[v]},g.decimalResolution=function(v){var o=We.exec(this[v]);if(o!==null)return{width:parseInt(o[1],10),height:parseInt(o[2],10)}},b.parseAttrList=function(v){var o,c={};for(Qe.lastIndex=0;(o=Qe.exec(v))!==null;){var _=o[2],y='"';_.indexOf(y)===0&&_.lastIndexOf(y)===_.length-1&&(_=_.slice(1,-1)),c[o[1]]=_}return c},b})(),qn=dn,Mn={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 An(b,g){var f=Mn[g];return!!f&&f[b.slice(0,4)]===!0}function Hn(b,g){return MediaSource.isTypeSupported((g||"video")+'/mp4;codecs="'+b+'"')}var Ia=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,Da=/#EXT-X-MEDIA:(.*)/g,ha=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),Rt=/(?:(?:#(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?/,_t=/\.(mp4|m4s|m4v|m4a)$/i,Ha=(function(){function b(){}return b.findGroup=function(f,v){for(var o=0;o2?(o=v.shift()+".",o+=parseInt(v.shift()).toString(16),o+=("000"+parseInt(v.shift()).toString(16)).substr(-4)):o=f,o},b.resolve=function(f,v){return r.buildAbsoluteURL(v,f,{alwaysNormalize:!0})},b.parseMasterPlaylist=function(f,v){var o=[];Ia.lastIndex=0;function c(N,q){["video","audio"].forEach(function(J){var re=N.filter(function(en){return An(en,J)});if(re.length){var Fe=re.filter(function(en){return en.lastIndexOf("avc1",0)===0||en.lastIndexOf("mp4a",0)===0});q[J+"Codec"]=Fe.length>0?Fe[0]:re[0],N=N.filter(function(en){return re.indexOf(en)===-1})}}),q.unknownCodecs=N}for(var _;(_=Ia.exec(f))!=null;){var y={},C=y.attrs=new qn(_[1]);y.url=b.resolve(_[2],v);var F=C.decimalResolution("RESOLUTION");F&&(y.width=F.width,y.height=F.height),y.bitrate=C.decimalInteger("AVERAGE-BANDWIDTH")||C.decimalInteger("BANDWIDTH"),y.name=C.NAME,c([].concat((C.CODECS||"").split(/[ ,]+/)),y),y.videoCodec&&y.videoCodec.indexOf("avc1")!==-1&&(y.videoCodec=b.convertAVC1ToAVCOTI(y.videoCodec)),o.push(y)}return o},b.parseMasterPlaylistMedia=function(f,v,o,c){c===void 0&&(c=[]);var _,y=[],C=0;for(Da.lastIndex=0;(_=Da.exec(f))!==null;){var F=new qn(_[1]);if(F.TYPE===o){var N={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&&(N.url=b.resolve(F.URI,v)),c.length){var q=b.findGroup(c,N.groupId);N.audioCodec=q?q.codec:c[0].codec}y.push(N)}}return y},b.parseLevelPlaylist=function(f,v,o,c,_){var y=0,C=0,F=new me(v),N=0,q=null,J=new ne,re,Fe,en,Sn=null;for(ha.lastIndex=0;(re=ha.exec(f))!==null;){var qa=re[1];if(qa){J.duration=parseFloat(qa);var Sa=(" "+re[2]).slice(1);J.title=Sa||null,J.tagList.push(Sa?["INF",qa,Sa]:["INF",qa])}else if(re[3]){if(Object(i.isFiniteNumber)(J.duration)){var Ua=y++;J.type=c,J.start=C,en&&(J.levelkey=en),J.sn=Ua,J.level=o,J.cc=N,J.urlId=_,J.baseurl=v,J.relurl=(" "+re[3]).slice(1),Xe(J,q),F.fragments.push(J),q=J,C+=J.duration,J=new ne}}else if(re[4]){var Ka=(" "+re[4]).slice(1);q?J.setByteRange(Ka,q):J.setByteRange(Ka)}else if(re[5])J.rawProgramDateTime=(" "+re[5]).slice(1),J.tagList.push(["PROGRAM-DATE-TIME",J.rawProgramDateTime]),Sn===null&&(Sn=F.fragments.length);else{if(re=re[0].match(Rt),!re){s.logger.warn("No matches on slow regex match for level playlist!");continue}for(Fe=1;Fe=0&&(en.method=Xt,en.key=null,en.iv=wt));break}case"START":{var Zu=new qn(St),Zm=Zu.decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(Zm)&&(F.startTimeOffset=Zm);break}case"MAP":{var ed=new qn(St);J.relurl=ed.URI,ed.BYTERANGE&&J.setByteRange(ed.BYTERANGE),J.baseurl=v,J.level=o,J.type=c,J.sn="initSegment",F.initSegment=J,J=new ne,J.rawProgramDateTime=F.initSegment.rawProgramDateTime;break}default:s.logger.warn("line parsed but not handled: "+re);break}}}return J=q,J&&!J.relurl&&(F.fragments.pop(),C-=J.duration),F.totalduration=C,F.averagetargetduration=C/F.fragments.length,F.endSN=y-1,F.startCC=F.fragments[0]?F.fragments[0].cc:0,F.endCC=N,!F.initSegment&&F.fragments.length&&F.fragments.every(function(NF){return _t.test(NF.relurl)})&&(s.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),J=new ne,J.relurl=F.fragments[0].relurl,J.baseurl=v,J.level=o,J.type=c,J.sn="initSegment",F.initSegment=J,F.needSidxRanges=!0),Sn&&Tr(F.fragments,Sn),F},b})();function Tr(b,g){for(var f=b[g],v=g-1;v>=0;v--){var o=b[v];o.programDateTime=f.programDateTime-o.duration*1e3,f=o}}function Xe(b,g){b.rawProgramDateTime?b.programDateTime=Date.parse(b.rawProgramDateTime):g&&g.programDateTime&&(b.programDateTime=g.endProgramDateTime),Object(i.isFiniteNumber)(b.programDateTime)||(b.programDateTime=null,b.rawProgramDateTime=null)}function Wa(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var At=window,zn=At.performance,Un=(function(b){Wa(g,b);function g(v){var o;return o=b.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}g.canHaveQualityLevels=function(o){return o!==E.AUDIO_TRACK&&o!==E.SUBTITLE_TRACK},g.mapContextToLevelType=function(o){var c=o.type;switch(c){case E.AUDIO_TRACK:return w.AUDIO;case E.SUBTITLE_TRACK:return w.SUBTITLE;default:return w.MAIN}},g.getResponseUrl=function(o,c){var _=o.url;return(_===void 0||_.indexOf("data:")===0)&&(_=c.url),_};var f=g.prototype;return f.createInternalLoader=function(o){var c=this.hls.config,_=c.pLoader,y=c.loader,C=_||y,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(),b.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 y=_.context;if(y&&y.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,N,q;switch(o.type){case E.MANIFEST:C=c.manifestLoadingMaxRetry,F=c.manifestLoadingTimeOut,N=c.manifestLoadingRetryDelay,q=c.manifestLoadingMaxRetryTimeout;break;case E.LEVEL:C=0,q=0,N=0,F=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,F=c.levelLoadingTimeOut,N=c.levelLoadingRetryDelay,q=c.levelLoadingMaxRetryTimeout;break}_=this.createInternalLoader(o);var J={timeout:F,maxRetry:C,retryDelay:N,maxRetryDelay:q},re={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,J,re),!0},f.loadsuccess=function(o,c,_,y){if(y===void 0&&(y=null),_.isSidxRequest){this._handleSidxRequest(o,_),this._handlePlaylistLoaded(o,c,_,y);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=zn.now(),C.indexOf("#EXTM3U")!==0){this._handleManifestParsingError(o,_,"no EXTM3U delimiter",y);return}C.indexOf("#EXTINF:")>0||C.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(o,c,_,y):this._handleMasterPlaylist(o,c,_,y)},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,_,y){var C=this.hls,F=o.data,N=g.getResponseUrl(o,_),q=Ha.parseMasterPlaylist(F,N);if(!q.length){this._handleManifestParsingError(o,_,"no level found in manifest",y);return}var J=q.map(function(Sn){return{id:Sn.attrs.AUDIO,codec:Sn.audioCodec}}),re=Ha.parseMasterPlaylistMedia(F,N,"AUDIO",J),Fe=Ha.parseMasterPlaylistMedia(F,N,"SUBTITLES");if(re.length){var en=!1;re.forEach(function(Sn){Sn.url||(en=!0)}),en===!1&&q[0].audioCodec&&!q[0].attrs.AUDIO&&(s.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),re.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}C.trigger(l.default.MANIFEST_LOADED,{levels:q,audioTracks:re,subtitles:Fe,url:N,stats:c,networkDetails:y})},f._handleTrackOrLevelPlaylist=function(o,c,_,y){var C=this.hls,F=_.id,N=_.level,q=_.type,J=g.getResponseUrl(o,_),re=Object(i.isFiniteNumber)(F)?F:0,Fe=Object(i.isFiniteNumber)(N)?N:re,en=g.mapContextToLevelType(_),Sn=Ha.parseLevelPlaylist(o.data,J,Fe,en,re);if(Sn.tload=c.tload,q===E.MANIFEST){var qa={url:J,details:Sn};C.trigger(l.default.MANIFEST_LOADED,{levels:[qa],audioTracks:[],url:J,stats:c,networkDetails:y})}if(c.tparsed=zn.now(),Sn.needSidxRanges){var Sa=Sn.initSegment.url;this.load({url:Sa,isSidxRequest:!0,type:q,level:N,levelDetails:Sn,id:F,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"});return}_.levelDetails=Sn,this._handlePlaylistLoaded(o,c,_,y)},f._handleSidxRequest=function(o,c){if(typeof o.data=="string")throw new Error("sidx request must be made with responseType of array buffer");var _=I.default.parseSegmentIndex(new Uint8Array(o.data));if(_){var y=_.references,C=c.levelDetails;y.forEach(function(F,N){var q=F.info;if(C){var J=C.fragments[N];J.byteRange.length===0&&J.setByteRange(String(1+q.end-q.start)+"@"+String(q.start))}}),C&&C.initSegment.setByteRange(String(_.moovEndOffset)+"@0")}},f._handleManifestParsingError=function(o,c,_,y){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:o.url,reason:_,networkDetails:y})},f._handleNetworkError=function(o,c,_,y){_===void 0&&(_=!1),y===void 0&&(y=null),s.logger.info("A network error occured while loading a "+o.type+"-type playlist");var C,F,N=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}N&&(N.abort(),this.resetInternalLoader(o.type));var q={type:u.ErrorTypes.NETWORK_ERROR,details:C,fatal:F,url:o.url,loader:N,context:o,networkDetails:c};y&&(q.response=y),this.hls.trigger(l.default.ERROR,q)},f._handlePlaylistLoaded=function(o,c,_,y){var C=_.type,F=_.level,N=_.id,q=_.levelDetails;if(!q||!q.targetduration){this._handleManifestParsingError(o,_,"invalid target duration",y);return}var J=g.canHaveQualityLevels(_.type);if(J)this.hls.trigger(l.default.LEVEL_LOADED,{details:q,level:F||0,id:N||0,stats:c,networkDetails:y});else switch(C){case E.AUDIO_TRACK:this.hls.trigger(l.default.AUDIO_TRACK_LOADED,{details:q,id:N,stats:c,networkDetails:y});break;case E.SUBTITLE_TRACK:this.hls.trigger(l.default.SUBTITLE_TRACK_LOADED,{details:q,id:N,stats:c,networkDetails:y});break}},g})(R),Ze=Un;function Ma(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var Ja=(function(b){Ma(g,b);function g(v){var o;return o=b.call(this,v,l.default.FRAG_LOADING)||this,o.loaders={},o}var f=g.prototype;return f.destroy=function(){var o=this.loaders;for(var c in o){var _=o[c];_&&_.destroy()}this.loaders={},b.prototype.destroy.call(this)},f.onFragLoading=function(o){var c=o.frag,_=c.type,y=this.loaders,C=this.hls.config,F=C.fLoader,N=C.loader;c.loaded=0;var q=y[_];q&&(s.logger.warn("abort previous fragment loader for type: "+_),q.abort()),q=y[_]=c.loader=C.fLoader?new F(C):new N(C);var J,re,Fe;J={url:c.url,frag:c,responseType:"arraybuffer",progressData:!1};var en=c.byteRangeStartOffset,Sn=c.byteRangeEndOffset;Object(i.isFiniteNumber)(en)&&Object(i.isFiniteNumber)(Sn)&&(J.rangeStart=en,J.rangeEnd=Sn),re={timeout:C.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:C.fragLoadingMaxRetryTimeout},Fe={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},q.load(J,re,Fe)},f.loadsuccess=function(o,c,_,y){y===void 0&&(y=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:y})},f.loaderror=function(o,c,_){_===void 0&&(_=null);var y=c.frag,C=y.loader;C&&C.abort(),this.loaders[y.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 y=c.frag,C=y.loader;C&&C.abort(),this.loaders[y.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,_,y){y===void 0&&(y=null);var C=c.frag;C.loaded=o.loaded,this.hls.trigger(l.default.FRAG_LOAD_PROGRESS,{frag:C,stats:o,networkDetails:y})},g})(R),pt=Ja;function tr(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var In=(function(b){tr(g,b);function g(v){var o;return o=b.call(this,v,l.default.KEY_LOADING)||this,o.loaders={},o.decryptkey=null,o.decrypturl=null,o}var f=g.prototype;return f.destroy=function(){for(var o in this.loaders){var c=this.loaders[o];c&&c.destroy()}this.loaders={},b.prototype.destroy.call(this)},f.onKeyLoading=function(o){var c=o.frag,_=c.type,y=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(y&&(s.logger.warn("abort previous key loader for type:"+_),y.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 N={url:C,frag:c,responseType:"arraybuffer"},q={timeout:F.fragLoadingTimeOut,maxRetry:0,retryDelay:F.fragLoadingRetryDelay,maxRetryDelay:F.fragLoadingMaxRetryTimeout},J={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};c.loader.load(N,q,J)}else this.decryptkey&&(c.decryptdata.key=this.decryptkey,this.hls.trigger(l.default.KEY_LOADED,{frag:c}))},f.loadsuccess=function(o,c,_){var y=_.frag;if(!y.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=y.decryptdata.key=new Uint8Array(o.data),y.loader=void 0,delete this.loaders[y.type],this.hls.trigger(l.default.KEY_LOADED,{frag:y})},f.loaderror=function(o,c){var _=c.frag,y=_.loader;y&&y.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,y=_.loader;y&&y.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:_})},g})(R),Oa=In;function dr(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var za={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},jt=(function(b){dr(g,b);function g(v){var o;return o=b.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=g.prototype;return f.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,R.prototype.destroy.call(this),b.prototype.destroy.call(this)},f.getBufferedFrag=function(o,c){var _=this.fragments,y=Object.keys(_).filter(function(F){var N=_[F];if(N.body.type!==c||!N.buffered)return!1;var q=N.body;return q.startPTS<=o&&o<=q.endPTS});if(y.length===0)return null;var C=y.pop();return _[C].body},f.detectEvictedFragments=function(o,c){var _=this,y,C;Object.keys(this.fragments).forEach(function(F){var N=_.fragments[F];if(N.buffered===!0){var q=N.range[o];if(q){y=q.time;for(var J=0;J=C&&c<=F){y.push({startPTS:Math.max(o,_.start(q)),endPTS:Math.min(c,_.end(q))});break}else if(oC)y.push({startPTS:Math.max(o,_.start(q)),endPTS:Math.min(c,_.end(q))}),N=!0;else if(c<=C)break;return{time:y,partial:N}},f.getFragmentKey=function(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn},f.getPartialFragment=function(o){var c=this,_,y,C,F=null,N=0;return Object.keys(this.fragments).forEach(function(q){var J=c.fragments[q];c.isPartial(J)&&(y=J.body.startPTS-c.bufferPadding,C=J.body.endPTS+c.bufferPadding,o>=y&&o<=C&&(_=Math.min(o-y,C-o),N<=_&&(F=J.body,N=_)))}),F},f.getState=function(o){var c=this.getFragmentKey(o),_=this.fragments[c],y=za.NOT_LOADED;return _!==void 0&&(_.buffered?this.isPartial(_)===!0?y=za.PARTIAL:y=za.OK:y=za.APPENDING),y},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 y,C,F=0;F<_.length;F++){if(y=_.start(F)-this.bufferPadding,C=_.end(F)+this.bufferPadding,o>=y&&c<=C)return!0;if(c<=y)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 y=c.timeRanges[_];c.detectEvictedFragments(_,y)})},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)},g})(R),W={search:function(g,f){for(var v=0,o=g.length-1,c=null,_=null;v<=o;){c=(v+o)/2|0,_=g[c];var y=f(_);if(y>0)v=c+1;else if(y<0)o=c-1;else return _}return null}},X=W,k=(function(){function b(){}return b.isBuffered=function(f,v){try{if(f){for(var o=f.buffered,c=0;c=o.start(c)&&v<=o.end(c))return!0}}catch{}return!1},b.bufferInfo=function(f,v,o){try{if(f){var c=f.buffered,_=[],y;for(y=0;yC&&(c[y-1].end=f[_].end):c.push(f[_])}else c.push(f[_])}else c=f;for(var F=0,N,q=v,J=v,re=0;re=Fe&&v1?c-1:0),y=1;yg?(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>g?o.start=v.start+v.duration:o.start=Math.max(v.start-o.duration,0)}function Ve(b,g,f,v,o,c){var _=f;if(Object(i.isFiniteNumber)(g.startPTS)){var y=Math.abs(g.startPTS-f);Object(i.isFiniteNumber)(g.deltaPTS)?g.deltaPTS=Math.max(y,g.deltaPTS):g.deltaPTS=y,_=Math.max(f,g.startPTS),f=Math.min(f,g.startPTS),v=Math.max(v,g.endPTS),o=Math.min(o,g.startDTS),c=Math.max(c,g.endDTS)}var C=f-g.start;g.start=g.startPTS=f,g.maxStartPTS=_,g.endPTS=v,g.startDTS=o,g.endDTS=c,g.duration=v-f;var F=g.sn;if(!b||Fb.endSN)return 0;var N,q,J;for(N=F-b.startSN,q=b.fragments,q[N]=g,J=N;J>0;J--)Ln(q,J,J-1);for(J=N;Jv.length))for(var c=0;cg?-1:0})}function Lt(b,g,f){var v=!1;return g&&g.details&&f&&(f.endCC>f.startCC||b&&b.cc=(o||0))return null;f=f||0;for(var c=0;cb&&f.start?-1:0}function au(b,g,f){var v=Math.min(g,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,o=f.endProgramDateTime||0;return o-v>b}var Ni=250,Oi=2,Yu=.1,tu=.05,vl=(function(){function b(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 g=b.prototype;return g.poll=function(v){var o=this.config,c=this.media,_=this.stalled,y=c.currentTime,C=c.seeking,F=this.seeking&&!C,N=!this.seeking&&C;if(this.seeking=C,y!==v){if(this.moved=!0,_!==null){if(this.stallReported){var q=self.performance.now()-_;s.logger.warn("playback not stuck anymore @"+y+", after "+Math.round(q)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((N||F)&&(this.stalled=null),!(c.paused||c.ended||c.playbackRate===0||!c.buffered.length)){var J=k.bufferInfo(c,y,0),re=J.len>0,Fe=J.nextStart||0;if(!(!re&&!Fe)){if(C){var en=J.len>Oi,Sn=!Fe||Fe-y>Oi;if(en||Sn)return;this.moved=!1}if(!this.moved&&this.stalled){var qa=Math.max(Fe,J.start||0)-y;if(qa>0&&qa<=Oi){this._trySkipBufferHole(null);return}}var Sa=self.performance.now();if(_===null){this.stalled=Sa;return}var Ua=Sa-_;!C&&Ua>=Ni&&this._reportStall(J.len);var Ka=k.bufferInfo(c,y,o.maxBufferHole);this._tryFixBufferStall(Ka,Ua)}}},g._tryFixBufferStall=function(v,o){var c=this.config,_=this.fragmentTracker,y=this.media,C=y.currentTime,F=_.getPartialFragment(C);if(F){var N=this._trySkipBufferHole(F);if(N)return}v.len>c.maxBufferHole&&o>c.highBufferWatchdogPeriod*1e3&&(s.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},g._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}))},g._trySkipBufferHole=function(v){for(var o=this.config,c=this.hls,_=this.media,y=_.currentTime,C=0,F=0;F<_.buffered.length;F++){var N=_.buffered.start(F);if(y+o.maxBufferHole>=C&&y1?c-1:0),y=1;y1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},f.doTick=function(){},g})(R);function ef(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var pe={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"},ms=(function(b){ef(g,b);function g(){return b.apply(this,arguments)||this}var f=g.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=pe.STOPPED},f._streamEnded=function(o,c){var _=this.fragCurrent,y=this.fragmentTracker;if(!c.live&&_&&!_.backtracked&&_.sn===c.endSN&&!o.nextStart){var C=y.getState(_);return C===za.PARTIAL||C===za.OK}return!1},f.onMediaSeeking=function(){var o=this.config,c=this.media,_=this.mediaBuffer,y=this.state,C=c?c.currentTime:null,F=k.bufferInfo(_||c,C,this.config.maxBufferHole);if(Object(i.isFiniteNumber)(C)&&s.logger.log("media seeking to "+C.toFixed(3)),y===pe.FRAG_LOADING){var N=this.fragCurrent;if(F.len===0&&N){var q=o.maxFragLookUpTolerance,J=N.start-q,re=N.start+N.duration+q;Cre?(N.loader&&(s.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),N.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=pe.IDLE):s.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else y===pe.ENDED&&(F.len===0&&(this.fragPrevious=null,this.fragCurrent=null),this.state=pe.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(),b.prototype.onHandlerDestroying.call(this)},f.onHandlerDestroyed=function(){this.state=pe.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-_)},g})(Ks);function ds(b,g){for(var f=0;f0&&o===-1&&(s.logger.log("override startPosition with lastCurrentTime @"+c.toFixed(3)),o=c),this.state=pe.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()}else this.forceStartLoad=!0,this.state=pe.STOPPED},f.stopLoad=function(){this.forceStartLoad=!1,b.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case pe.BUFFER_FLUSHING:this.fragLoadError=0;break;case pe.IDLE:this._doTickIdle();break;case pe.WAITING_LEVEL:var o=this.levels[this.level];o&&o.details&&(this.state=pe.IDLE);break;case pe.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=pe.IDLE);break;case pe.ERROR:case pe.STOPPED:case pe.FRAG_LOADING:case pe.PARSING:case pe.PARSED:case pe.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 y;this.loadedmetadata?y=_.currentTime:y=this.nextLoadPosition;var C=o.nextLoadLevel,F=this.levels[C];if(F){var N=F.bitrate,q;N?q=Math.max(8*c.maxBufferSize/N,c.maxBufferLength):q=c.maxBufferLength,q=Math.min(q,c.maxMaxBufferLength);var J=k.bufferInfo(this.mediaBuffer?this.mediaBuffer:_,y,c.maxBufferHole),re=J.len;if(!(re>=q)){s.logger.trace("buffer length of "+re.toFixed(3)+" is below max of "+q.toFixed(3)+". checking for more payload ..."),this.level=o.nextLoadLevel=C;var Fe=F.details;if(!Fe||Fe.live&&this.levelLastLoaded!==C){this.state=pe.WAITING_LEVEL;return}if(this._streamEnded(J,Fe)){var en={};this.altAudio&&(en.type="video"),this.hls.trigger(l.default.BUFFER_EOS,en),this.state=pe.ENDED;return}this._fetchPayloadOrEos(y,J,Fe)}}}},f._fetchPayloadOrEos=function(o,c,_){var y=this.fragPrevious,C=this.level,F=_.fragments,N=F.length;if(N!==0){var q=F[0].start,J=F[N-1].start+F[N-1].duration,re=c.end,Fe;if(_.initSegment&&!_.initSegment.data)Fe=_.initSegment;else if(_.live){var en=this.config.initialLiveManifestSize;if(Nen&&en>J.currentTime&&(s.logger.log("buffer end: "+c.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+en.toFixed(3)),J.currentTime=en),this.nextLoadPosition=en}if(o.PTSKnown&&c>y&&J&&J.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),re=di(F,C.endProgramDateTime,q.maxFragLookUpTolerance);else{var Sn=C.sn+1;if(Sn>=o.startSN&&Sn<=o.endSN){var qa=F[Sn-o.startSN];C.cc===qa.cc&&(re=qa,s.logger.log("live playlist, switching playlist, load frag with next SN: "+re.sn))}re||(re=X.search(F,function(Sa){return C.cc-Sa.cc}),re&&s.logger.log("live playlist, switching playlist, load frag with same CC: "+re.sn))}re||(re=F[Math.min(N-1,Math.round(N/2))],s.logger.log("live playlist, switching playlist, unknown, load middle frag : "+re.sn))}return re},f._findFragment=function(o,c,_,y,C,F,N){var q=this.hls.config,J;if(CF-q.maxFragLookUpTolerance?0:q.maxFragLookUpTolerance;J=qo(c,y,C,re)}else J=y[_-1];if(J){var Fe=J.sn-N.startSN,en=c&&J.level===c.level,Sn=y[Fe-1],qa=y[Fe+1];if(c&&J.sn===c.sn)if(en&&!J.backtracked)if(J.snq.maxBufferHole&&c.dropped&&Fe?(J=Sn,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")):(J=qa,s.logger.log("Re-loading fragment with SN: "+J.sn))}else J=null;else J.backtracked&&(qa&&qa.backtracked?(s.logger.warn("Already backtracked from fragment "+qa.sn+", will not backtrack to fragment "+J.sn+". Loading fragment "+qa.sn),J=qa):(s.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),J.dropped=0,Sn?(J=Sn,J.backtracked=!0):Fe&&(J=null)))}return J},f._loadKey=function(o){this.state=pe.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===za.NOT_LOADED||c===za.PARTIAL?(o.autoLevel=this.hls.autoLevelEnabled,o.bitrateTest=this.bitrateTest,this.hls.trigger(l.default.FRAG_LOADING,{frag:o}),this.demuxer||(this.demuxer=new ke(this.hls,"main")),this.state=pe.FRAG_LOADING):c===za.APPENDING&&this._reduceMaxBufferLength(o.duration)&&this.fragmentTracker.removeFragment(o)},f.getBufferedFrag=function(o){return this.fragmentTracker.getBufferedFrag(o,w.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),k.isBuffered(_,c)?o=this.getBufferedFrag(c):k.isBuffered(_,c+.1)&&(o=this.getBufferedFrag(c+.1)),o)){var y=o;if(y!==this.fragPlaying){this.hls.trigger(l.default.FRAG_CHANGED,{frag:y});var C=y.level;(!this.fragPlaying||this.fragPlaying.level!==C)&&this.hls.trigger(l.default.LEVEL_SWITCHED,{level:C}),this.fragPlaying=y}}},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,k.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,_,y;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],N=this.fragLastKbps;N&&this.fragCurrent?c=this.fragCurrent.duration*F.bitrate/(1e3*N)+1:c=0}if(y=this.getBufferedFrag(o.currentTime+c),y&&(y=this.followingBufferedFrag(y),y)){var q=this.fragCurrent;q&&q.loader&&q.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(y.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(o,c){this.state=pe.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 vl(_,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(y){y.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,y;o.levels.forEach(function(F){y=F.audioCodec,y&&(y.indexOf("mp4a.40.2")!==-1&&(c=!0),y.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,y=this.levels[this.levelLastLoaded],C=this.levels[_],F=c.totalduration,N=0;if(s.logger.log("level "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+F),c.live){var q=C.details;q&&c.fragments.length>0?($n(q,c),N=c.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(N,q),c.PTSKnown&&Object(i.isFiniteNumber)(N)?s.logger.log("live playlist sliding:"+N.toFixed(3)):(s.logger.log("live playlist - outdated PTS, unknown sliding"),Jo(this.fragPrevious,y,c))):(s.logger.log("live playlist - first load, unknown sliding"),c.PTSKnown=!1,Jo(this.fragPrevious,y,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 J=c.startTimeOffset;Object(i.isFiniteNumber)(J)?(J<0&&(s.logger.log("negative start time offset "+J+", count from end of last fragment"),J=N+F+J),s.logger.log("start time offset found in playlist, adjust startPosition to "+J),this.startPosition=J):c.live?(this.startPosition=this.computeLivePosition(N,c),s.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===pe.WAITING_LEVEL&&(this.state=pe.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===pe.KEY_LOADING&&(this.state=pe.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=this.hls,y=this.levels,C=this.media,F=o.frag;if(this.state===pe.FRAG_LOADING&&c&&F.type==="main"&&F.level===c.level&&F.sn===c.sn){var N=o.stats,q=y[c.level],J=q.details;if(this.bitrateTest=!1,this.stats=N,s.logger.log("Loaded "+c.sn+" of ["+J.startSN+" ,"+J.endSN+"],level "+c.level),F.bitrateTest&&_.nextLoadLevel)this.state=pe.IDLE,this.startFragRequested=!1,N.tparsed=N.tbuffered=window.performance.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:N,frag:c,id:"main"}),this.tick();else if(F.sn==="initSegment")this.state=pe.IDLE,N.tparsed=N.tbuffered=window.performance.now(),J.initSegment.data=o.payload,_.trigger(l.default.FRAG_BUFFERED,{stats:N,frag:c,id:"main"}),this.tick();else{s.logger.log("Parsing "+c.sn+" of ["+J.startSN+" ,"+J.endSN+"],level "+c.level+", cc "+c.cc),this.state=pe.PARSING,this.pendingBuffering=!0,this.appended=!1,F.bitrateTest&&(F.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:F}));var re=!(C&&C.seeking)&&(J.PTSKnown||!J.live),Fe=J.initSegment?J.initSegment.data:[],en=this._getAudioCodec(q),Sn=this.demuxer=this.demuxer||new ke(this.hls,"main");Sn.push(o.payload,Fe,en,q.videoCodec,c,J.totalduration,re)}}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===pe.PARSING){var y=o.tracks,C,F;if(y.audio&&this.altAudio&&delete y.audio,F=y.audio,F){var N=this.levels[this.level].audioCodec,q=navigator.userAgent.toLowerCase();N&&this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),N.indexOf("mp4a.40.5")!==-1?N="mp4a.40.2":N="mp4a.40.5"),this.audioCodecSwitch&&F.metadata.channelCount!==1&&q.indexOf("firefox")===-1&&(N="mp4a.40.5"),q.indexOf("android")!==-1&&F.container!=="audio/mpeg"&&(N="mp4a.40.2",s.logger.log("Android: force audio codec to "+N)),F.levelCodec=N,F.id=o.id}F=y.video,F&&(F.levelCodec=this.levels[this.level].videoCodec,F.id=o.id),this.hls.trigger(l.default.BUFFER_CODECS,y);for(C in y){F=y[C],s.logger.log("main track:"+C+",container:"+F.container+",codecs[level/parsed]=["+F.levelCodec+"/"+F.codec+"]");var J=F.initSegment;J&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,{type:C,data:J,parent:"main",content:"initSegment"}))}this.tick()}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,y=o.frag;if(_&&o.id==="main"&&y.sn===_.sn&&y.level===_.level&&!(o.type==="audio"&&this.altAudio)&&this.state===pe.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(le.AUDIO),o.hasVideo===!0&&F.addElementaryStream(le.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 N=C.details;if(N&&F.sn===N.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=pe.IDLE,this.fragPrevious=F,this.tick();return}}else F.backtracked=!1;var q=Ve(C.details,F,o.startPTS,o.endPTS,o.startDTS,o.endDTS),J=this.hls;J.trigger(l.default.LEVEL_PTS_UPDATED,{details:C.details,level:this.level,drift:q,type:o.type,start:o.startPTS,end:o.endPTS}),[o.data1,o.data2].forEach(function(re){re&&re.length&&c.state===pe.PARSING&&(c.appended=!0,c.pendingBuffering=!0,J.trigger(l.default.BUFFER_APPENDING,{type:o.type,data:re,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===pe.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=pe.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 y=this.fragCurrent;y.loader&&(s.logger.log("switching to main audio track, cancel main fragment load"),y.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=pe.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 y=this.videoBuffer;y&&this.mediaBuffer!==y&&(s.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=y)}this.altAudio=_,this.tick()},f.onBufferCreated=function(o){var c=o.tracks,_,y,C=!1;for(var F in c){var N=c[F];N.id==="main"?(y=F,_=N,F==="video"&&(this.videoBuffer=c[F].buffer)):C=!0}C&&_?(s.logger.log("alternate track found, use "+y+".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===pe.PARSING||c===pe.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===pe.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent;if(o){var c=this.mediaBuffer?this.mediaBuffer:this.media;s.logger.log("main buffered : "+rr.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=pe.IDLE}this.tick()}},f.onError=function(o){var c=o.frag||this.fragCurrent;if(!(c&&c.type!=="main")){var _=!!this.media&&k.isBuffered(this.media,this.media.currentTime)&&k.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 y=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);s.logger.warn("mediaController: frag loading failed, retry in "+y+" ms"),this.retryDate=window.performance.now()+y,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=pe.FRAG_LOADING_WAITING_RETRY}else s.logger.error("mediaController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=pe.ERROR;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==pe.ERROR&&(o.fatal?(this.state=pe.ERROR,s.logger.warn("streamController: "+o.details+",switch to "+this.state+" state ...")):!o.levelRetry&&this.state===pe.WAITING_LEVEL&&(this.state=pe.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:o.parent==="main"&&(this.state===pe.PARSING||this.state===pe.PARSED)&&(_?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=pe.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=pe.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(le.VIDEO,o.buffered),this.state=pe.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},nf(g,[{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}}]),g})(ms),$0=Rg;function xm(b,g){for(var f=0;f0){y=c[0].bitrate,c.sort(function(re,Fe){return re.bitrate-Fe.bitrate}),this._levels=c;for(var J=0;J=0&&o1&&q.loadError0){var c=this.currentLevelIndex,_=o.urlId,y=o.url[_];s.logger.log("Attempt loading level index "+c+" with URL-id "+_),this.hls.trigger(l.default.LEVEL_LOADING,{url:y,level:c,id:_})}}},jm(g,[{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)}}]),g})(R),Vm=a("./src/demux/id3.js");function ww(b,g){var f;try{f=new Event("addtrack")}catch{f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=b,g.dispatchEvent(f)}function s_(b){if(b&&b.cues)for(;b.cues.length>0;)b.removeCue(b.cues[0])}function NC(b,g){if(gb[b.length-1].endTime)return b[b.length-1];for(var f=0,v=b.length-1;f<=v;){var o=Math.floor((v+f)/2);if(gb[o].endTime)f=o+1;else return b[o]}return b[f].endTime-gq&&(s.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),q=N+.25);for(var J=0;J=this.minWeight_},g.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},g.destroy=function(){},b})(),HC=BC;function Iw(b,g){for(var f=0;f500*_.duration/q){var J=o.levels,re=Math.max(1,F.bw?F.bw/8:F.loaded*1e3/N),Fe=J[_.level],en=Fe.realBitrate?Math.max(Fe.realBitrate,Fe.bitrate):Fe.bitrate,Sn=F.total?F.total:Math.max(F.loaded,Math.round(_.duration*en/8)),qa=c.currentTime,Sa=(Sn-F.loaded)/re,Ua=(k.bufferInfo(c,qa,o.config.maxBufferHole).end-qa)/q;if(Ua<2*_.duration/q&&Sa>Ua){var Ka,St;for(St=_.level-1;St>C;St--){var _l=J[St].realBitrate?Math.max(J[St].realBitrate,J[St].bitrate):J[St].bitrate,hi=_.duration*_l/(8*.8*re);if(hi=y;re--){var Fe=J[re];if(Fe){var en=Fe.details,Sn=en?en.totalduration/en.fragments.length:c,qa=en?en.live:!1,Sa=void 0;re<=o?Sa=N*_:Sa=q*_;var Ua=J[re].realBitrate?Math.max(J[re].realBitrate,J[re].bitrate):J[re].bitrate,Ka=Ua*Sn/Sa;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+re+"/"+Math.round(Sa)+"/"+Ua+"/"+Sn+"/"+F+"/"+Ka),Sa>Ua&&(!Ka||qa&&!this.bitrateTestDelay||Ka=0)return Sn;s.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var qa=q?Math.min(q,y.maxStarvationDelay):y.maxStarvationDelay,Sa=y.abrBandWidthFactor,Ua=y.abrBandWidthUpFactor;if(en===0){var Ka=this.bitrateTestDelay;if(Ka){var St=q?Math.min(q,y.maxLoadingDelay):y.maxLoadingDelay;qa=St-Ka,s.logger.trace("bitrate test took "+Math.round(1e3*Ka)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*qa)+" ms"),Sa=Ua=1}}return Sn=this._findBestLevel(N,q,Fe,C,c,en+qa,Sa,Ua,_),Math.max(Sn,0)}}]),g})(R),xC=WC;function jC(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var Sw=j(),zC=(function(b){jC(g,b);function g(v){var o;return o=b.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,y=o.segments.reduce(function(J,re){return re.parent===_?J+1:J},0),C={},F=o.sourceBuffer;for(var N in F){var q=F[N];if(!q)throw Error("handling source buffer update end error: source buffer for "+N+" uninitilized and unable to update buffered TimeRanges.");C[N]=q.buffered}o.hls.trigger(l.default.BUFFER_APPENDED,{parent:_,pending:y,timeRanges:C}),o._needsFlush||o.doAppending(),o.updateMediaElementDuration(),y===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=g.prototype;return f.destroy=function(){R.prototype.destroy.call(this)},f.onLevelPtsUpdated=function(o){var c=o.type,_=this.tracks.audio;if(c==="audio"&&_&&_.container==="audio/mpeg"){var y=this.sourceBuffer.audio;if(!y)throw Error("Level PTS Updated and source buffer for audio uninitalized");var C=Math.abs(y.timestampOffset-o.start);if(C>.1){var F=y.updating;try{y.abort()}catch(N){s.logger.warn("can not abort audio buffer: "+N)}F?this.audioTimestampOffset=o.start:(s.logger.warn("change mpeg audio timestamp offset from "+y.timestampOffset+" to "+o.start),y.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&&Sw){var _=this.mediaSource=new Sw;_.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 y in o)if(!c[y]){var C=o[y];if(!C)throw Error("source buffer exists for track "+y+", however track does not");var F=C.levelCodec||C.codec,N=C.container+";codecs="+F;s.logger.log("creating sourceBuffer("+N+")");try{var q=c[y]=_.addSourceBuffer(N);q.addEventListener("updateend",this._onSBUpdateEnd),q.addEventListener("error",this._onSBUpdateError),this.tracks[y]={buffer:q,codec:F,id:C.id,container:C.container,levelCodec:C.levelCodec}}catch(J){s.logger.error("error while trying to add sourceBuffer:"+J.message),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:J,mimeType:N})}}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 y=o[_];if(y){if(!y.ended)return;if(y.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,y=Object.keys(_),C=c-Math.max(o,this._levelTargetDuration),F=y.length-1;F>=0;F--){var N=y[F],q=_[N];if(q){var J=q.buffered;J.length>0&&C>J.start(0)&&this.removeBufferRange(N,q,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 y=this.sourceBuffer[_];if(y&&y.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 y in _){var C=_[y];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,y=this.sourceBuffer;if(Object.keys(y).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=y[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(q){s.logger.error("error while trying to append buffer:"+q.message),_.unshift(C);var N={type:u.ErrorTypes.MEDIA_ERROR,parent:C.parent,details:"",fatal:!1};q.code===22?(this.segments=[],N.details=u.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,N.details=u.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>o.appendErrorMaxRetry&&(s.logger.log("fail "+o.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],N.fatal=!0)),c.trigger(l.default.ERROR,N)}}}},f.flushBuffer=function(o,c,_){var y=this.sourceBuffer;if(!Object.keys(y).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=y[_];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,_,y){try{for(var C=0;C.5){var re="null";return this.media&&(re=this.media.currentTime.toString()),s.logger.log("sb remove "+o+" ["+q+","+J+"], of ["+F+","+N+"], pos:"+re),c.remove(q,J),!0}}}catch(Fe){s.logger.warn("removeBufferRange failed",Fe)}return!1},g})(R),VC=zC;function Cw(b,g){for(var f=0;fthis.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(y,C){return g.isLevelAllowed(C,c.restrictedLevels)&&C<=o});return g.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)},g.isLevelAllowed=function(o,c){return c===void 0&&(c=[]),c.indexOf(o)===-1},g.getMaxLevelByMediaSize=function(o,c,_){if(!o||o&&!o.length)return-1;for(var y=function(J,re){return re?J.width!==re.width||J.height!==re.height:!0},C=o.length-1,F=0;F=c||N.height>=_)&&y(N,o[F+1])){C=F;break}}return C},QC(g,[{key:"mediaWidth",get:function(){var o,c=this.media;return c&&(o=c.width||c.clientWidth||c.offsetWidth,o*=g.contentScaleFactor),o}},{key:"mediaHeight",get:function(){var o,c=this.media;return c&&(o=c.height||c.clientHeight||c.offsetHeight,o*=g.contentScaleFactor),o}}],[{key:"contentScaleFactor",get:function(){var o=1;try{o=window.devicePixelRatio}catch{}return o}}]),g})(R),Fw=KC;function YC(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var tf=window,XC=tf.performance,Eg=(function(b){YC(g,b);function g(v){return b.call(this,v,l.default.MEDIA_ATTACHING)||this}var f=g.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 y=XC.now();if(c){if(this.lastTime){var C=y-this.lastTime,F=_-this.lastDroppedFrames,N=c-this.lastDecodedFrames,q=1e3*F/C,J=this.hls;if(J.trigger(l.default.FPS_DROP,{currentDropped:F,currentDecoded:N,totalDroppedFrames:_}),q>0&&F>J.config.fpsDroppedMonitoringThreshold*N){var re=J.currentLevel;s.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+re),re>0&&(J.autoLevelCapping===-1||J.autoLevelCapping>=re)&&(re=re-1,J.trigger(l.default.FPS_DROP_LEVEL_CAPPING,{level:re,droppedLevel:J.currentLevel}),J.autoLevelCapping=re,J.streamController.nextLevelSwitch())}}this.lastTime=y,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)},g})(R),ZC=Eg,Gw=window,Ig=Gw.performance,eF=Gw.XMLHttpRequest,nF=(function(){function b(f){f&&f.xhrSetup&&(this.xhrSetup=f.xhrSetup)}var g=b.prototype;return g.destroy=function(){this.abort(),this.loader=null},g.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},g.load=function(v,o,c){this.context=v,this.config=o,this.callbacks=c,this.stats={trequest:Ig.now(),retry:0},this.retryDelay=o.retryDelay,this.loadInternal()},g.loadInternal=function(){var v,o=this.context;v=this.loader=new eF;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(y){this.callbacks.onError({code:v.status,text:y.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()},g.readystatechange=function(v){var o=v.currentTarget,c=o.readyState,_=this.stats,y=this.context,C=this.config;if(!_.aborted&&c>=2)if(window.clearTimeout(this.requestTimeout),_.tfirst===0&&(_.tfirst=Math.max(Ig.now(),_.trequest)),c===4){var F=o.status;if(F>=200&&F<300){_.tload=Math.max(_.tfirst,Ig.now());var N,q;y.responseType==="arraybuffer"?(N=o.response,q=N.byteLength):(N=o.responseText,q=N.length),_.loaded=_.total=q;var J={url:o.responseURL,data:N};this.callbacks.onSuccess(J,_,y,o)}else _.retry>=C.maxRetry||F>=400&&F<499?(s.logger.error(F+" while loading "+y.url),this.callbacks.onError({code:F,text:o.statusText},y,o)):(s.logger.warn(F+" while loading "+y.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)},g.loadtimeout=function(){s.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},g.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)},b})(),Tg=nF;function Mw(b,g){for(var f=0;f=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,y=c.type,C=c.id;this.hls.trigger(l.default.AUDIO_TRACK_SWITCHING,{id:C,type:y,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],y=null;if(_&&(y=_.name),this._selectDefaultTrack){var C=c.filter(function(q){return q.default});C.length?c=C:s.logger.warn("No default audio tracks defined")}var F=!1,N=function(){c.forEach(function(J){F||(!o.audioGroupId||J.groupId===o.audioGroupId)&&(!y||y===J.name)&&(o._setAudioTrack(J.id),F=!0)})};N(),F||(y=null,N()),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,y=c.language,C=c.groupId;s.logger.warn("Loading failed on audio track id: "+o+", group-id: "+C+', name/language: "'+_+'" / "'+y+'"');for(var F=o,N=0;N0&&o===-1?(s.logger.log("audio:override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=pe.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:o,this.state=pe.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=o,this.state=pe.STOPPED},f.doTick=function(){var o,c,_,y=this.hls,C=y.config;switch(this.state){case pe.ERROR:case pe.PAUSED:case pe.BUFFER_FLUSHING:break;case pe.STARTING:this.state=pe.WAITING_TRACK,this.loadedmetadata=!1;break;case pe.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 N=this.mediaBuffer?this.mediaBuffer:this.media,q=this.videoBuffer?this.videoBuffer:this.media,J=k.bufferInfo(N,o,C.maxBufferHole),re=k.bufferInfo(q,o,C.maxBufferHole),Fe=J.len,en=J.end,Sn=this.fragPrevious,qa=Math.min(C.maxBufferLength,C.maxMaxBufferLength),Sa=Math.max(qa,re.len),Ua=this.audioSwitch,Ka=this.trackId;if((Fe"u"){this.state=pe.WAITING_TRACK;break}if(!Ua&&this._streamEnded(J,_)){this.hls.trigger(l.default.BUFFER_EOS,{type:"audio"}),this.state=pe.ENDED;return}var St=_.fragments,_l=St.length,hi=St[0].start,Gc=St[_l-1].start+St[_l-1].duration,Xt;if(Ua){if(_.live&&!_.PTSKnown)s.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),en=0;else if(en=o,_.PTSKnown&&ohi||J.nextStart)s.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=hi+.05;else return}if(_.initSegment&&!_.initSegment.data)Xt=_.initSegment;else if(en<=hi){if(Xt=St[0],this.videoTrackCC!==null&&Xt.cc!==this.videoTrackCC&&(Xt=Jr(St,this.videoTrackCC)),_.live&&Xt.loadIdx&&Xt.loadIdx===this.fragLoadIdx){var or=J.nextStart?J.nextStart:hi;s.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(or+.05)),this.media.currentTime=or+.05;return}}else{var wt,Zu=C.maxFragLookUpTolerance,Zm=Sn?St[Sn.sn-St[0].sn+1]:void 0,ed=function(Pg){var q4=Math.min(Zu,Pg.duration);return Pg.start+Pg.duration-q4<=en?1:Pg.start-q4>en&&Pg.start?-1:0};enGc-Zu&&(Zu=0),Zm&&!ed(Zm)?wt=Zm:wt=X.search(St,ed)):wt=St[_l-1],wt&&(Xt=wt,hi=wt.start,Sn&&Xt.level===Sn.level&&Xt.sn===Sn.sn&&(Xt.sn<_.endSN?(Xt=St[Xt.sn+1-_.startSN],s.logger.log("SN just loaded, load next one: "+Xt.sn)):Xt=null))}Xt&&(Xt.encrypted?(s.logger.log("Loading key for "+Xt.sn+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ka),this.state=pe.KEY_LOADING,y.trigger(l.default.KEY_LOADING,{frag:Xt})):(s.logger.log("Loading "+Xt.sn+", cc: "+Xt.cc+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ka+", currentTime:"+o+",bufferEnd:"+en.toFixed(3)),this.fragCurrent=Xt,(Ua||this.fragmentTracker.getState(Xt)===za.NOT_LOADED)&&(Xt.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(Xt.sn)&&(this.nextLoadPosition=Xt.start+Xt.duration),y.trigger(l.default.FRAG_LOADING,{frag:Xt}),this.state=pe.FRAG_LOADING)))}break;case pe.WAITING_TRACK:c=this.tracks[this.trackId],c&&c.details&&(this.state=pe.IDLE);break;case pe.FRAG_LOADING_WAITING_RETRY:var NF=gs.now(),B4=this.retryDate;N=this.media;var jre=N&&N.seeking;(!B4||NF>=B4||jre)&&(s.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=pe.IDLE);break;case pe.WAITING_INIT_PTS:var OF=this.videoTrackCC;if(this.initPTS[OF]===void 0)break;var H4=this.waitingFragment;if(H4){var J4=H4.frag.cc;OF!==J4?(c=this.tracks[this.trackId],c.details&&c.details.live&&(s.logger.warn("Waiting fragment CC ("+J4+") does not match video track CC ("+OF+")"),this.waitingFragment=null,this.state=pe.IDLE)):(this.state=pe.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=pe.IDLE;break;case pe.STOPPED:case pe.FRAG_LOADING:case pe.PARSING:case pe.PARSED:case pe.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=pe.PAUSED,this.waitingFragment=null,c?this.setInterval(Pw):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),c&&(this.audioSwitch=!0,this.state=pe.IDLE),this.tick()},f.onAudioTrackLoaded=function(o){var c=o.details,_=o.id,y=this.tracks[_],C=c.totalduration,F=0;if(s.logger.log("track "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+C),c.live){var N=y.details;N&&c.fragments.length>0?($n(N,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(y.details=c,!this.startFragRequested){if(this.startPosition===-1){var q=c.startTimeOffset;Object(i.isFiniteNumber)(q)?(s.logger.log("start time offset found in playlist, adjust startPosition to "+q),this.startPosition=q):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===pe.WAITING_TRACK&&(this.state=pe.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===pe.KEY_LOADING&&(this.state=pe.IDLE,this.tick())},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag;if(this.state===pe.FRAG_LOADING&&c&&_.type==="audio"&&_.level===c.level&&_.sn===c.sn){var y=this.tracks[this.trackId],C=y.details,F=C.totalduration,N=c.level,q=c.sn,J=c.cc,re=this.config.defaultAudioCodec||y.audioCodec||"mp4a.40.2",Fe=this.stats=o.stats;if(q==="initSegment")this.state=pe.IDLE,Fe.tparsed=Fe.tbuffered=gs.now(),C.initSegment.data=o.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:Fe,frag:c,id:"audio"}),this.tick();else{this.state=pe.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new ke(this.hls,"audio"));var en=this.initPTS[J],Sn=C.initSegment?C.initSegment.data:[];if(C.initSegment||en!==void 0){this.pendingBuffering=!0,s.logger.log("Demuxing "+q+" of ["+C.startSN+" ,"+C.endSN+"],track "+N);var qa=!1;this.demuxer.push(o.payload,Sn,re,null,c,F,qa,en)}else s.logger.log("unknown video PTS for continuity counter "+J+", waiting for video PTS before demuxing audio frag "+q+" of ["+C.startSN+" ,"+C.endSN+"],track "+N),this.waitingFragment=o,this.state=pe.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===pe.PARSING){var y=o.tracks,C;if(y.video&&delete y.video,C=y.audio,C){C.levelCodec=C.codec,C.id=o.id,this.hls.trigger(l.default.BUFFER_CODECS,y),s.logger.log("audio track:audio,container:"+C.container+",codecs[level/parsed]=["+C.levelCodec+"/"+C.codec+"]");var F=C.initSegment;if(F){var N={type:"audio",data:F,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[N]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,N))}this.tick()}}},f.onFragParsingData=function(o){var c=this,_=this.fragCurrent,y=o.frag;if(_&&o.id==="audio"&&o.type==="audio"&&y.sn===_.sn&&y.level===_.level&&this.state===pe.PARSING){var C=this.trackId,F=this.tracks[C],N=this.hls;Object(i.isFiniteNumber)(o.endPTS)||(o.endPTS=o.startPTS+_.duration,o.endDTS=o.startDTS+_.duration),_.addElementaryStream(le.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),Ve(F.details,_,o.startPTS,o.endPTS);var q=this.audioSwitch,J=this.media,re=!1;if(q)if(J&&J.readyState){var Fe=J.currentTime;s.logger.log("switching audio track : currentTime:"+Fe),Fe>=o.startPTS&&(s.logger.log("switching audio track : flushing all audio"),this.state=pe.BUFFER_FLUSHING,N.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),re=!0,this.audioSwitch=!1,N.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C}))}else this.audioSwitch=!1,N.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C});var en=this.pendingData;if(!en){s.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),N.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});return}this.audioSwitch||([o.data1,o.data2].forEach(function(Sn){Sn&&Sn.length&&en.push({type:o.type,data:Sn,parent:"audio",content:"data"})}),!re&&en.length&&(en.forEach(function(Sn){c.state===pe.PARSING&&(c.pendingBuffering=!0,c.hls.trigger(l.default.BUFFER_APPENDING,Sn))}),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===pe.PARSING&&(this.stats.tparsed=gs.now(),this.state=pe.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===pe.PARSING||c===pe.PARSED)&&(this.pendingBuffering=o.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===pe.PARSED&&(!this.appended||!this.pendingBuffering)){var o=this.fragCurrent,c=this.stats,_=this.hls;if(o){this.fragPrevious=o,c.tbuffered=gs.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:c,frag:o,id:"audio"});var y=this.mediaBuffer?this.mediaBuffer:this.media;y&&s.logger.log("audio buffered : "+rr.toString(y.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,_.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=pe.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 y=this.fragLoadError;y?y++:y=1;var C=this.config;if(y<=C.fragLoadingMaxRetry){this.fragLoadError=y;var F=Math.min(Math.pow(2,y-1)*C.fragLoadingRetryDelay,C.fragLoadingMaxRetryTimeout);s.logger.warn("AudioStreamController: frag loading failed, retry in "+F+" ms"),this.retryDate=gs.now()+F,this.state=pe.FRAG_LOADING_WAITING_RETRY}else s.logger.error("AudioStreamController: "+o.details+" reaches max retry, redispatch as fatal ..."),o.fatal=!0,this.state=pe.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!==pe.ERROR&&(this.state=o.fatal?pe.ERROR:pe.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===pe.PARSING||this.state===pe.PARSED)){var N=this.mediaBuffer,q=this.media.currentTime,J=N&&k.isBuffered(N,q)&&k.isBuffered(N,q+.5);if(J){var re=this.config;re.maxMaxBufferLength>=re.maxBufferLength&&(re.maxMaxBufferLength/=2,s.logger.warn("AudioStreamController: reduce max buffer length to "+re.maxMaxBufferLength+"s")),this.state=pe.IDLE}else s.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=pe.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=pe.PARSED):(this.state=pe.IDLE,this.fragPrevious=null,this.tick())},W0(g,[{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}}]),g})(ms),iF=uF,Nw=(function(){if(typeof window<"u"&&window.VTTCue)return window.VTTCue;var b="auto",g={"":!0,lr:!0,rl:!0},f={start:!0,middle:!0,end:!0,left:!0,right:!0};function v(y){if(typeof y!="string")return!1;var C=g[y.toLowerCase()];return C?y.toLowerCase():!1}function o(y){if(typeof y!="string")return!1;var C=f[y.toLowerCase()];return C?y.toLowerCase():!1}function c(y){for(var C=1;C100)throw new Error("Position must be between 0 and 100.");_l=wt,this.hasBeenReset=!0}})),Object.defineProperty(N,"positionAlign",c({},q,{get:function(){return hi},set:function(wt){var Zu=o(wt);if(!Zu)throw new SyntaxError("An invalid or illegal string was specified.");hi=Zu,this.hasBeenReset=!0}})),Object.defineProperty(N,"size",c({},q,{get:function(){return Gc},set:function(wt){if(wt<0||wt>100)throw new Error("Size must be between 0 and 100.");Gc=wt,this.hasBeenReset=!0}})),Object.defineProperty(N,"align",c({},q,{get:function(){return Xt},set:function(wt){var Zu=o(wt);if(!Zu)throw new SyntaxError("An invalid or illegal string was specified.");Xt=Zu,this.hasBeenReset=!0}})),N.displayState=void 0}return _.prototype.getCueAsHTML=function(){var y=window.WebVTT;return y.convertCueToDOMTree(window,this.text)},_})(),lF=function(){return{decode:function(f){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))}}};function Ow(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new lF,this.regionList=[]}function cF(b){function g(v,o,c,_){return(v|0)*3600+(o|0)*60+(c|0)+(_|0)/1e3}var f=b.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return f?f[3]?g(f[1],f[2],f[3].replace(":",""),f[4]):f[1]>59?g(f[1],f[2],0,f[4]):g(0,f[1],f[2],f[4]):null}function Uw(){this.values=Object.create(null)}Uw.prototype={set:function(g,f){!this.get(g)&&f!==""&&(this.values[g]=f)},get:function(g,f,v){return v?this.has(g)?this.values[g]:f[v]:this.has(g)?this.values[g]:f},has:function(g){return g in this.values},alt:function(g,f,v){for(var o=0;o=0&&f<=100)?(this.set(g,f),!0):!1}};function kw(b,g,f,v){var o=v?b.split(v):[b];for(var c in o)if(typeof o[c]=="string"){var _=o[c].split(f);if(_.length===2){var y=_[0],C=_[1];g(y,C)}}}var x0=new Nw(0,0,0),Fc=x0.align==="middle"?"middle":"center";function sF(b,g,f){var v=b;function o(){var y=cF(b);if(y===null)throw new Error("Malformed timestamp: "+v);return b=b.replace(/^[^\sa-zA-Z-]+/,""),y}function c(y,C){var F=new Uw;kw(y,function(J,re){switch(J){case"region":for(var Fe=f.length-1;Fe>=0;Fe--)if(f[Fe].id===re){F.set(J,f[Fe].region);break}break;case"vertical":F.alt(J,re,["rl","lr"]);break;case"line":var en=re.split(","),Sn=en[0];F.integer(J,Sn),F.percent(J,Sn)&&F.set("snapToLines",!1),F.alt(J,Sn,["auto"]),en.length===2&&F.alt("lineAlign",en[1],["start",Fc,"end"]);break;case"position":en=re.split(","),F.percent(J,en[0]),en.length===2&&F.alt("positionAlign",en[1],["start",Fc,"end","line-left","line-right","auto"]);break;case"size":F.percent(J,re);break;case"align":F.alt(J,re,["start",Fc,"end","left","right"]);break}},/:/,/\s/),C.region=F.get("region",null),C.vertical=F.get("vertical","");var N=F.get("line","auto");N==="auto"&&x0.line===-1&&(N=-1),C.line=N,C.lineAlign=F.get("lineAlign","start"),C.snapToLines=F.get("snapToLines",!0),C.size=F.get("size",100),C.align=F.get("align",Fc);var q=F.get("position","auto");q==="auto"&&x0.position===50&&(q=C.align==="start"||C.align==="left"?0:C.align==="end"||C.align==="right"?100:50),C.position=q}function _(){b=b.replace(/^\s+/,"")}if(_(),g.startTime=o(),_(),b.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+v);b=b.substr(3),_(),g.endTime=o(),_(),c(b,g)}function Bw(b){return b.replace(//gi,` `)}Ow.prototype={parse:function(g){var f=this;g&&(f.buffer+=f.decoder.decode(g,{stream:!0}));function v(){var F=f.buffer,N=0;for(F=Bw(F);N")===-1){f.cue.id=c;continue}case"CUE":try{sF(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&&(y=!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 g=this;try{if(g.buffer+=g.decoder.decode(),(g.cue||g.state==="HEADER")&&(g.buffer+=` `,g.parse()),g.state==="INITIAL")throw new Error("Malformed WebVTT signature.")}catch(f){throw f}return g.onflush&&g.onflush(),this}};var vF=Ow;function fF(b,g,f,v){for(var o,c,_,y,C,F=window.VTTCue||TextTrackCue,N=0;N=16?y--:y++,navigator.userAgent.match(/Firefox\//)?c.line=N+1:c.line=N>7?N-2:N+1,c.align="left",c.position=Math.max(0,Math.min(100,100*(y/32))),b.addCue(c)}}var Sg={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},Hw=function(g){var f=g;return Sg.hasOwnProperty(g)&&(f=Sg[g]),String.fromCharCode(f)},fl=15,Ds=100,_F={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},pF={17:2,18:4,21:6,22:8,23:10,19:13,20:15},mF={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},dF={25:2,26:4,29:6,30:8,31:10,27:13,28:15},hF=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Jw;(function(b){b[b.ERROR=0]="ERROR",b[b.TEXT=1]="TEXT",b[b.WARNING=2]="WARNING",b[b.INFO=2]="INFO",b[b.DEBUG=3]="DEBUG",b[b.DATA=3]="DATA"})(Jw||(Jw={}));var Pt={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(g){this.time=g},log:function(g,f){var v=this.verboseFilter[g];this.verboseLevel>=v}},rf=function(g){for(var f=[],v=0;vDs&&(Pt.log("ERROR","Too large cursor position "+this.pos),this.pos=Ds)},g.moveCursor=function(v){var o=this.pos+v;if(v>1)for(var c=this.pos+1;c=144&&this.backSpace();var o=Hw(v);if(this.pos>=Ds){Pt.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)},g.clearFromPos=function(v){var o;for(o=v;o0&&(v?c="["+o.join(" | ")+"]":c=o.join(` `)),c},g.getTextAndFormat=function(){return this.rows},b})(),Km=(function(){function b(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 Nt,this.nonDisplayedMemory=new Nt,this.lastOutputScreen=new Nt,this.currRollUpRow=this.displayedMemory.rows[fl-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var g=b.prototype;return g.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[fl-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},g.getHandler=function(){return this.outputFilter},g.setHandler=function(v){this.outputFilter=v},g.setPAC=function(v){this.writeScreen.setPAC(v)},g.setBkgData=function(v){this.writeScreen.setBkgData(v)},g.setMode=function(v){v!==this.mode&&(this.mode=v,Pt.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)},g.insertChars=function(v){for(var o=0;o=46,o.italics)o.foreground="white";else{var c=Math.floor(v/2)-16,_=["white","green","blue","cyan","red","yellow","magenta"];o.foreground=_[c]}Pt.log("INFO","MIDROW: "+JSON.stringify(o)),this.writeScreen.setPen(o)},g.outputDataUpdate=function(v){v===void 0&&(v=!1);var o=Pt.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))},g.cueSplitAtTime=function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))},b})(),Ym=(function(){function b(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 Km(1,v),new Km(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 g=b.prototype;return g.getHandler=function(v){return this.channels[v].getHandler()},g.setHandler=function(v,o){this.channels[v].setHandler(o)},g.addData=function(v,o){var c,_,y,C=!1;this.lastTime=v,Pt.setTime(v);for(var F=0;F ("+rf([_,y])+")");if(c=this.parseCmd(_,y),c||(c=this.parseMidrow(_,y)),c||(c=this.parsePAC(_,y)),c||(c=this.parseBackgroundAttributes(_,y)),!c&&(C=this.parseChars(_,y),C))if(this.currChNr&&this.currChNr>=0){var N=this.channels[this.currChNr-1];N.insertChars(C)}else Pt.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:C?this.dataCounters.char+=2:(this.dataCounters.other+=2,Pt.log("WARNING","Couldn't parse cleaned data "+rf([_,y])+" orig: "+rf([o[F],o[F+1]])))}},g.parseCmd=function(v,o){var c=null,_=(v===20||v===28)&&o>=32&&o<=47,y=(v===23||v===31)&&o>=33&&o<=35;if(!(_||y))return!1;if(v===this.lastCmdA&&o===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Pt.log("DEBUG","Repeated command ("+rf([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},g.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 Pt.log("ERROR","Mismatch channel in midrow parsing"),!1;var _=this.channels[c-1];return _.ccMIDROW(o),Pt.log("DEBUG","MIDROW ("+rf([v,o])+")"),!0}return!1},g.parsePAC=function(v,o){var c=null,_=null,y=(v>=17&&v<=23||v>=25&&v<=31)&&o>=64&&o<=127,C=(v===16||v===24)&&o>=64&&o<=95;if(!(y||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?_F[v]:mF[v]:_=c===1?pF[v]:dF[v];var F=this.interpretPAC(_,o),N=this.channels[c-1];return N.setPAC(F),this.lastCmdA=v,this.lastCmdB=o,this.currChNr=c,!0},g.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,_},g.parseChars=function(v,o){var c=null,_=null,y=null;if(v>=25?(c=2,y=v-8):(c=1,y=v),y>=17&&y<=19){var C=o;y===17?C=o+80:y===18?C=o+112:C=o+144,Pt.log("INFO","Special char '"+Hw(C)+"' in channel "+c),_=[C]}else v>=32&&v<=127&&(_=o===0?[v]:[v,o]);if(_){var F=rf(_);Pt.log("DEBUG","Char codes = "+F.join(",")),this.lastCmdA=null,this.lastCmdB=null}return _},g.parseBackgroundAttributes=function(v,o){var c,_,y,C,F=(v===16||v===24)&&o>=32&&o<=47,N=(v===23||v===31)&&o>=45&&o<=47;return F||N?(c={},v===16||v===24?(_=Math.floor((o-32)/2),c.background=hF[_],o%2===1&&(c.background=c.background+"_semi")):o===45?c.background="transparent":(c.foreground="black",o===47&&(c.underline=!0)),y=v<24?1:2,C=this.channels[y-1],C.setBkgData(c),this.lastCmdA=null,this.lastCmdB=null,!0):!1},g.reset=function(){for(var v=0;vv)&&(this.startTime=v),this.endTime=o,this.screen=c,this.timelineController.createCaptionsTrack(this.trackName)},b})(),Fg=function(g,f,v){return g.substr(v||0,f.length)===f},yF=function(g){var f=parseInt(g.substr(-3)),v=parseInt(g.substr(-6,2)),o=parseInt(g.substr(-9,2)),c=g.length>9?parseInt(g.substr(0,g.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:"+g);return f+=1e3*v,f+=60*1e3*o,f+=3600*1e3*c,f},Xm=function(g){for(var f=5381,v=g.length;v;)f=f*33^g.charCodeAt(--v);return(f>>>0).toString()},wF=function(g,f,v){var o=g[f],c=g[o.prevCC];if(!c||!c.new&&o.new){g.ccOffset=g.presentationOffset=o.start,o.new=!1;return}for(;c&&c.new;)g.ccOffset+=o.start-c.start,o.new=!1,o=c,c=g[o.prevCC];g.presentationOffset=v},bF={parse:function(g,f,v,o,c,_){var y=/\r\n|\n\r|\n|\r/g,C=Object(Vm.utf8ArrayToStr)(new Uint8Array(g)).trim().replace(y,` `).split(` `),F="00:00.000",N=0,q=0,J=0,re=[],Fe,en=!0,Sn=!1,qa=new vF;qa.oncue=function(Sa){var Ua=v[o],Ka=v.ccOffset;Ua&&Ua.new&&(q!==void 0?Ka=v.ccOffset=Ua.start:wF(v,o,J)),J&&(Ka=J-v.presentationOffset),Sn&&(Sa.startTime+=Ka-q,Sa.endTime+=Ka-q),Sa.id=Xm(Sa.startTime.toString())+Xm(Sa.endTime.toString())+Xm(Sa.text),Sa.text=decodeURIComponent(encodeURIComponent(Sa.text)),Sa.endTime>0&&re.push(Sa)},qa.onparsingerror=function(Sa){Fe=Sa},qa.onflush=function(){if(Fe&&_){_(Fe);return}c(re)},C.forEach(function(Sa){if(en)if(Fg(Sa,"X-TIMESTAMP-MAP=")){en=!1,Sn=!0,Sa.substr(16).split(",").forEach(function(Ua){Fg(Ua,"LOCAL:")?F=Ua.substr(6):Fg(Ua,"MPEGTS:")&&(N=parseInt(Ua.substr(7)))});try{f+(v[o].start*9e4||0)<0&&(f+=8589934592),N-=f,q=yF(F)/1e3,J=N/9e4}catch(Ua){Sn=!1,Fe=Ua}return}else Sa===""&&(en=!1);qa.parse(Sa+` `)}),qa.flush()}},EF=bF;function $w(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function IF(b,g){b.prototype=Object.create(g.prototype),b.prototype.constructor=b,b.__proto__=g}var TF=(function(b){IF(g,b);function g(v){var o;if(o=b.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 qw($w(o),"textTrack1"),_=new qw($w(o),"textTrack2");o.cea608Parser=new RF(0,c,_)}return o}var f=g.prototype;return f.addCues=function(o,c,_,y){for(var C=this.cueRanges,F=!1,N=C.length;N--;){var q=C[N],J=SF(q[0],q[1],c,_);if(J>=0&&(q[0]=Math.min(q[0],c),q[1]=Math.max(q[1],_),F=!0,J/(_-c)>.5))return}F||C.push([c,_]),this.Cues.newCue(this.captionsTracks[o],c,_,y)},f.onInitPtsFound=function(o){var c=this,_=o.frag,y=o.id,C=o.initPTS,F=this.unparsedVttFrags;y==="main"&&(this.initPTS[_.cc]=C),F.length&&(this.unparsedVttFrags=[],F.forEach(function(N){c.onFragLoaded(N)}))},f.getExistingTrack=function(o){var c=this.media;if(c)for(var _=0;_=F.length||_!==C||!N||this.stopped){this._clearReloadTimer();return}if(s.logger.log("subtitle track "+_+" loaded"),y.live){var q=Pr(N.details,y,o.stats.trequest);s.logger.log("Reloading live subtitle playlist in "+q+"ms"),this.timer=setTimeout(function(){c._loadCurrentTrack()},q)}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,y=c[o];o<0||!y||y.details&&!y.details.live||(s.logger.log("Loading subtitle track "+o),_.trigger(l.default.SUBTITLE_TRACK_LOADING,{url:y.url,id:o}))},f._toggleTrackModes=function(o){var c=this.media,_=this.subtitleDisplay,y=this.trackId;if(c){var C=m(c.textTracks);if(o===-1)[].slice.call(C).forEach(function(q){q.mode="disabled"});else{var F=C[y];F&&(F.mode="disabled")}var N=C[o];N&&(N.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=m(this.media.textTracks),_=0;_=y[N].start&&F<=y[N].end){C=y[N];break}var q=c.start+c.duration;C?C.end=q:(C={start:F,end:q},y.push(C))}}},f.onMediaAttached=function(o){var c=o.media;this.media=c,c.addEventListener("seeking",this._onMediaSeeking),this.state=pe.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=pe.STOPPED)},f.onError=function(o){var c=o.frag;!c||c.type!=="subtitle"||(this.state=pe.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(xa)},f.onSubtitleTrackLoaded=function(o){var c=o.id,_=o.details,y=this.currentTrackId,C=this.tracks,F=C[y];c>=C.length||c!==y||!F||(_.live&&Ra(F.details,_,this.lastAVStart),F.details=_,this.setInterval(xa))},f.onKeyLoaded=function(){this.state===pe.KEY_LOADING&&(this.state=pe.IDLE)},f.onFragLoaded=function(o){var c=this.fragCurrent,_=o.frag.decryptdata,y=o.frag,C=this.hls;if(this.state===pe.FRAG_LOADING&&c&&o.frag.type==="subtitle"&&c.sn===o.frag.sn&&o.payload.byteLength>0&&_&&_.key&&_.method==="AES-128"){var F=Cn.now();this.decrypter.decrypt(o.payload,_.key.buffer,_.iv.buffer,function(N){var q=Cn.now();C.trigger(l.default.FRAG_DECRYPTED,{frag:y,payload:N,stats:{tstart:F,tdecrypt:q}})})}},f.onLevelUpdated=function(o){var c=o.details,_=c.fragments;this.lastAVStart=_.length?_[0].start:0},f.doTick=function(){if(!this.media){this.state=pe.IDLE;return}switch(this.state){case pe.IDLE:{var o=this.config,c=this.currentTrackId,_=this.fragmentTracker,y=this.media,C=this.tracks;if(!C||!C[c]||!C[c].details)break;var F=o.maxBufferHole,N=o.maxFragLookUpTolerance,q=Math.min(o.maxBufferLength,o.maxMaxBufferLength),J=k.bufferedInfo(this._getBuffered(),y.currentTime,F),re=J.end,Fe=J.len,en=C[c].details,Sn=en.fragments,qa=Sn.length,Sa=Sn[qa-1].start+Sn[qa-1].duration;if(Fe>q)return;var Ua,Ka=this.fragPrevious;rejw){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=jw-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(_,y)}break}},f._generateLicenseRequestChallenge=function(o,c){if(o.mediaKeySystemDomain===Zr.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 y=this.getLicenseServerUrl(_.mediaKeySystemDomain),C=this._createLicenseXhr(y,o,c);s.logger.log("Sending license request to URL: "+y);var F=this._generateLicenseRequestChallenge(_,o);C.send(F)}catch(N){s.logger.error("Failure requesting DRM license: "+N),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(y){return y.audioCodec}),_=o.levels.map(function(y){return y.videoCodec});this._attemptKeySystemAccess(Zr.WIDEVINE,c,_)}},GF(g,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),g})(R),AF=Vw;function LF(b){for(var g=1;gc)return y}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)}}]),g})(ce);eb.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>"u"?self:window}}),"./src/utils/logger.js":(function(e,n,a){"use strict";a.r(n),a.d(n,"enableLogs",function(){return R}),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(w,I){return I="["+w+"] > "+I,I}var s=Object(t.getSelfScope)();function h(w){var I=s.console[w];return I?function(){for(var L=arguments.length,U=new Array(L),V=0;V1?I-1:0),U=1;U{"use strict";Object.defineProperty(nw,"__esModule",{value:!0});nw.Direction=void 0;var FUe;(function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"})(FUe=nw.Direction||(nw.Direction={}))});var LN=He(ft=>{"use strict";var aw=ft&&ft.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;te)return s;if(h&&ht)return t;if(e=a)throw new RangeError("min (".concat(n,") is equal/bigger than max (").concat(a,")"));if(ea)throw new RangeError("value (".concat(e,") is bigger than max (").concat(a,")"))}ft.checkBoundaries=NUe;function OUe(e,n,a){return ea?a:e}ft.checkValuesAgainstBoundaries=OUe;function UUe(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}"))}ft.checkInitialOverlap=UUe;function kUe(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)}}ft.getMargin=kUe;function BUe(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)}}ft.getPaddingAndBorder=BUe;function HUe(e,n,a){var t=a?-1:1;e.forEach(function(r,u){return Tne(r,t*n[u].x,n[u].y)})}ft.translateThumbs=HUe;function JUe(e,n,a,t){for(var r=0,u=Ene(e[0],n,a,t),i=1;ii?s:i},e.getBoundingClientRect().width));return u},zUe=function(e,n,a,t,r,u,i){i===void 0&&(i=function(h){return h});var l=[],s=function(h){var p=bne(a[h],t[h],r,u,i),R=n[h].x;n.forEach(function(E,w){var I=E.x,L=bne(a[w],t[w],r,u,i);h!==w&&(R>=I&&R<=I+L||R+p>=I&&R+p<=I+L)&&(l.includes(w)||(l.push(h),l.push(w),l=aw(aw([],l,!0),[h,w],!1),s(w)))})};return s(e),Array.from(new Set(l.sort()))},VUe=function(e,n,a,t,r,u){t===void 0&&(t=.1),r===void 0&&(r=" - "),u===void 0&&(u=function(w){return w});var i=(0,ft.getStepDecimals)(t),l=(0,AN.useState)({}),s=l[0],h=l[1],p=(0,AN.useState)(u(n[a].toFixed(i))),R=p[0],E=p[1];return(0,AN.useEffect)(function(){if(e){var w=e.getThumbs();if(w.length<1)return;var I={},L=e.getOffsets(),U=zUe(a,L,w,n,r,i,u),V=u(n[a].toFixed(i));if(U.length){var Q=U.reduce(function(ee,me,We,Qe){return ee.length?aw(aw([],ee,!0),[L[Qe[We]].x],!1):[L[Qe[We]].x]},[]);if(Math.min.apply(Math,Q)===L[a].x){var te=[];U.forEach(function(ee){te.push(n[ee].toFixed(i))}),V=Array.from(new Set(te.sort(function(ee,me){return parseFloat(ee)-parseFloat(me)}))).map(u).join(r);var le=Math.min.apply(Math,Q),ne=Math.max.apply(Math,Q),Z=w[U[Q.indexOf(ne)]].getBoundingClientRect().width;I.left="".concat(Math.abs(le-(ne+Z))/2,"px"),I.transform="translate(-50%, 0)"}else I.visibility="hidden"}E(V),h(I)}},[e,n]),[R,s]};ft.useThumbOverlap=VUe;function Ene(e,n,a,t){var r=e.getBoundingClientRect(),u=r.left,i=r.top,l=r.width,s=r.height;return Ine(t)?Math.abs(a-(i+s/2)):Math.abs(n-(u+l/2))}});var Cne=He(yc=>{"use strict";var QUe=yc&&yc.__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)}})(),KUe=yc&&yc.__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]})),YUe=yc&&yc.__setModuleDefault||(Object.create?(function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}):function(e,n){e.default=n}),XUe=yc&&yc.__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)&&KUe(n,e,a);return YUe(n,e),n},Sne=yc&&yc.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,r=n.length,u;t1&&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,fr.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,fr.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,fr.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,fr.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,R=t.state.isChanged,E=t.getTargetIndex(r.nativeEvent),w=h||p===Mu.Direction.Left||p===Mu.Direction.Down?-1:1;E!==-1&&(ZUe.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,fr.replaceAt)(i,E,t.normalizeValue(i[E]+w*(r.key==="PageUp"?s*10:s),E)))):e5e.includes(r.key)?(r.preventDefault(),t.setState({draggedThumbIndex:E,isChanged:!0}),l((0,fr.replaceAt)(i,E,t.normalizeValue(i[E]-w*(r.key==="PageDown"?s*10:s),E)))):r.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){R&&t.fireOnFinalChange()}):R&&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,R=h.min,E=h.max,w=h.onChange,I=h.values,L=h.step,U=h.rtl;if(l===-1&&s[0]===-1&&s[1]===-1)return null;var V=t.trackRef.current;if(!V)return null;var Q=V.getBoundingClientRect(),te=(0,fr.isVertical)(p)?Q.height:Q.width;if(s[0]!==-1&&s[1]!==-1){var le=r-s[0],ne=u-s[1],Z=0;switch(p){case Mu.Direction.Right:case Mu.Direction.Left:Z=le/te*(E-R);break;case Mu.Direction.Down:case Mu.Direction.Up:Z=ne/te*(E-R);break;default:(0,fr.assertUnreachable)(p)}if(U&&(Z*=-1),Math.abs(Z)>=L/2){for(var ee=0;eeE?Z=E-I[ee]:me=L/2&&w((0,fr.replaceAt)(I,l,t.normalizeValue(Qe,l)))}},t.normalizeValue=function(r,u){var i=t.props,l=i.min,s=i.max,h=i.step,p=i.allowOverlap,R=i.values;return(0,fr.normalizeValue)(r,u,l,s,h,p,R)},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-1?"grabbing":this.props.draggableTrack?(0,fr.isVertical)(this.props.direction)?"ns-resize":"ew-resize":s.length===1&&!E?"pointer":"inherit"},onMouseDown:E?fr.voidFn:this.onMouseDownTrack,onTouchStart:E?fr.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:E,children:Sne(Sne([],U.map(function(V,Q,te){return l({props:{style:a.props.direction===Mu.Direction.Left||a.props.direction===Mu.Direction.Right?{position:"absolute",left:"".concat(V[0],"px"),marginTop:"".concat(V[1],"px")}:{position:"absolute",top:"".concat(V[0],"px"),marginLeft:"".concat(V[1],"px")},key:"mark".concat(Q),ref:a.markRefs[Q]},index:Q})}),!0),s.map(function(V,Q){var te=a.state.draggedThumbIndex===Q;return u({index:Q,value:V,isDragged:te,props:{style:{position:"absolute",zIndex:L[Q],cursor:E?"inherit":te?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:Q,tabIndex:E?void 0:0,"aria-valuemax":R?p:s[Q+1]||p,"aria-valuemin":R?h:s[Q-1]||h,"aria-valuenow":V,draggable:!1,ref:a.thumbRefs[Q],role:"slider",onKeyDown:E?fr.voidFn:a.onKeyDown,onKeyUp:E?fr.voidFn:a.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:Mu.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n})(xS.Component);yc.default=n5e});var Fne=He(Pi=>{"use strict";var a5e=Pi&&Pi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pi,"__esModule",{value:!0});Pi.checkValuesAgainstBoundaries=Pi.relativeValue=Pi.useThumbOverlap=Pi.Direction=Pi.getTrackBackground=Pi.Range=void 0;var t5e=a5e(Cne());Pi.Range=t5e.default;var jS=LN();Object.defineProperty(Pi,"getTrackBackground",{enumerable:!0,get:function(){return jS.getTrackBackground}});Object.defineProperty(Pi,"useThumbOverlap",{enumerable:!0,get:function(){return jS.useThumbOverlap}});Object.defineProperty(Pi,"relativeValue",{enumerable:!0,get:function(){return jS.relativeValue}});Object.defineProperty(Pi,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return jS.checkValuesAgainstBoundaries}});var r5e=WS();Object.defineProperty(Pi,"Direction",{enumerable:!0,get:function(){return r5e.Direction}})});var KHe={};$4(KHe,{boot:()=>QHe});var x4=function(e){return function(n){for(var a=e.length,t=n.length,r=new Array(a*t),u=0,i=0;i=a.length?n:e(a[t])};var X4=function(e,n,a,t){for(var r=0,u=t.length;r=t.length)return n;var r=t.slice();return r.splice(a,1),e(r)};var td=function(e){return e.slice().reverse()};var e8=function(e,n){return n.filter(e)};var n8=(function(){function e(n,a,t,r,u,i){var l,s,h,p,R,E,w;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;s0?(t[p++]=E,++h):(t[p++]=R,++s);for(;s="0"&&e[r]<="9"?"\\&":"";return"\\"+a.charCodeAt(0).toString(10)+u})+'"'};var ir={show:E8};var I8=function(e){return e.showRecordFields},D_=function(){return function(){return function(e){var n=I8(e);return{show:function(a){return"{"+(n(lt.value)(a)+"}")}}}}};var Y0={show:w8},pn={show:y8},qg={show:b8},id={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])}},oe=function(e){return e.show};var R_=function(e){var n=Vt(e);return function(a){var t=I8(a);return function(r){var u=oe(r);return{showRecordFields:function(i){return function(l){var s=t(lt.value)(l),h=n(lt.value),p=mu(h)(l);return" "+(h+(": "+(u(p)+(","+s))))}}}}}},y_=function(e){var n=Vt(e);return function(a){var t=oe(a);return{showRecordFields:function(r){return function(u){var i=n(lt.value),l=mu(i)(u);return" "+(i+(": "+(t(l)+" ")))}}}}};var Se=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),fe=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var je=(function(){function e(){}return e.value=new e,e})(),$g=function(e){return e};var ld=function(e){return e.to};var cd=function(e){return e.from};var Toe=hn(En),G=(function(){function e(){}return e.value=new e,e})(),T=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var T8=function(e){var n=tn(e);return{append:function(a){return function(t){if(a instanceof G)return t;if(t instanceof G)return a;if(a instanceof T&&t instanceof T)return new T(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 Wn=function(e){return function(n){return function(a){if(a instanceof G)return e;if(a instanceof T)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])}}},Rr=Wn(!0)(gn(!1)),Fr=Wn(!1)(gn(!0));var ue={map:function(e){return function(n){return n instanceof T?new T(e(n.value0)):G.value}}},Soe=B(ue);var ze=function(e){return Wn(e)(Toe)},lr=function(){return function(e){if(e instanceof T)return e.value0;throw new Error("Failed pattern match at Data.Maybe (line 288, column 1 - line 288, column 46): "+[e.constructor.name])}};var qr=function(e){var n=be(e);return{eq:function(a){return function(t){return a instanceof G&&t instanceof G?!0:a instanceof T&&t instanceof T?n(a.value0)(t.value0):!1}}}},Di=function(e){var n=xe(e),a=qr(e.Eq0());return{compare:function(t){return function(r){if(t instanceof G&&r instanceof G)return Be.value;if(t instanceof G)return ye.value;if(r instanceof G)return De.value;if(t instanceof T&&r instanceof T)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 Ro={apply:function(e){return function(n){if(e instanceof T)return Soe(e.value0)(n);if(e instanceof G)return G.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 ue}};var nn={bind:function(e){return function(n){if(e instanceof T)return n(e.value0);if(e instanceof G)return G.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 Ro}};var ka=(function(){return{pure:T.create,Apply0:function(){return Ro}}})();var du={alt:function(e){return function(n){return e instanceof G?n:e}},Functor0:function(){return ue}},Coe=(function(){return{empty:G.value,Alt0:function(){return du}}})(),hu={Applicative0:function(){return ka},Plus1:function(){return Coe}};var Me=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Le=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var Ac=function(e){return Wn(new Me(e))(Le.create)};var eo={map:function(e){return function(n){if(n instanceof Me)return new Me(n.value0);if(n instanceof Le)return new Le(e(n.value0));throw new Error("Failed pattern match at Data.Either (line 0, column 0 - line 0, column 0): "+[n.constructor.name])}}},Goe=B(eo);var yr=function(e){return function(n){return function(a){if(a instanceof Me)return e(a.value0);if(a instanceof Le)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])}}},vf=(function(){return yr(gn(G.value))(T.create)})();var Wg={apply:function(e){return function(n){if(e instanceof Me)return new Me(e.value0);if(e instanceof Le)return Goe(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 eo}};var Ri={bind:yr(function(e){return function(n){return new Me(e)}})(function(e){return function(n){return n(e)}}),Apply0:function(){return Wg}};var uv=(function(){return{pure:Le.create,Apply0:function(){return Wg}}})(),fb={Applicative0:function(){return uv},Bind1:function(){return Ri}};var gl=function(e){return e};var ws={map:function(e){return function(n){return e(n)}}};var S8={apply:function(e){return function(n){return e(n)}},Functor0:function(){return ws}},Moe={bind:function(e){return function(n){return n(e)}},Apply0:function(){return S8}},sd={pure:gl,Apply0:function(){return S8}},Nr={Applicative0:function(){return sd},Bind1:function(){return Moe}};var C8=function(e){return Math.min(Math.abs(e),2147483647)},F8=function(e){return function(n){return n===0?0:n>0?Math.floor(e/n):-Math.floor(e/-n)}},G8=function(e){return function(n){if(n===0)return 0;var a=Math.abs(n);return(e%a+a)%a}};var xF={Ring0:function(){return tv}};var gu=function(e){return e.mod};var ho={degree:C8,div:F8,mod:G8,CommutativeRing0:function(){return xF}},ou=function(e){return e.div};var cr={mempty:"",Semigroup0:function(){return V0}};var Gt=function(e){return e.mempty};var A8=function(e){return function(){return e}},L8=function(e){return function(n){return function(){return n(e())()}}};var jF=function(e){return function(n){return function(){for(var a=0,t=e.length;a=0;u--)t=e(a[u])(t);return t}}},u7=function(e){return function(n){return function(a){for(var t=n,r=a.length,u=0;u":e===void 0?"":e instanceof Date?e.toString():typeof Blob<"u"&&e instanceof Blob?"file["+e.name+"]":JSON.stringify(e)}var hie=Or(Je),k7=Es(I_),gie=Zt(Je);var Dd=function(e){return e.foldrWithIndex};var Rd=function(e){return e.foldlWithIndex};var Die=function(e){var n=Dd(e);return function(a){var t=tn(a.Semigroup0()),r=Gt(a);return function(u){return n(function(i){return function(l){return function(s){return t(u(i)(l))(s)}}})(r)}}},iD={foldrWithIndex:function(e){return function(n){var a=hie(function(r){return function(u){return e(r.value0)(r.value1)(u)}})(n),t=k7(yn.create);return function(r){return a(t(r))}}},foldlWithIndex:function(e){return function(n){var a=gie(function(r){return function(u){return e(u.value0)(r)(u.value1)}})(n),t=k7(yn.create);return function(r){return a(t(r))}}},foldMapWithIndex:function(e){return Die(iD)(e)},Foldable0:function(){return Je}};var B7=function(e){var n=Rd(e);return function(a){var t=function(r){return function(u){return function(i){return u instanceof G?a(r)(i):u}}};return n(t)(G.value)}};var H7=function(e){return function(n){return function(a){return(a|0)===a?e(a):n}}},br=function(e){return e},J7=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 Lb=isFinite;var hG=Math.abs;var yd=Math.floor,gG=Math.log;var Pb=function(e){return function(n){return Math.pow(e,n)}};var hp=Math.round;var q7=2.302585092994046;var $7=Cr(Jg),W7=kt(Jg);var Tie=(function(){return J7(T.create)(G.value)})(),Ts=Tie(10),hf=(function(){return H7(T.create)(G.value)})(),j7=function(e){if(!Lb(e))return 0;if(e>=br($7))return $7;if(e<=br(W7))return W7;if($e)return ze(0)(hf(e));throw new Error("Failed pattern match at Data.Int (line 72, column 1 - line 72, column 29): "+[e.constructor.name])},RG=function(e){return j7(hp(e))};var ku=function(e){return j7(yd(e))};function lD(e){return Object.prototype.toString.call(e).slice(8,-1)}function F_(e){return e===null}function G_(e){return e===void 0}var Nb=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function z7(e){return e.stack||e.toString()}function zi(e){return new Error(e)}function gp(e){return e.message}function Ob(e){return function(){throw e}}var Q7=function(e){return Ob(zi(e))};var K7={show:z7};var wo=function(e){return e.throwError};var Mr=function(e){return e.catchError};var M_=function(e){var n=Mr(e),a=e.MonadThrow0().Monad0(),t=B(a.Bind1().Apply0().Functor0()),r=x(a.Applicative0());return function(u){return n(t(Le.create)(u))(function(i){return r(Me.create(i))})}};var Go={liftEffect:hn(En),Monad0:function(){return iv}},kn=function(e){return e.liftEffect};var Gie=B(eo);var Bb=function(e){return e};var vD=function(e){return e};var Hb=function(e){return function(n){return e(n)}},Id=function(e){var n=B(e);return{map:function(a){return Hb(n(Gie(a)))}}};var X7=function(e){return{Applicative0:function(){return Xl(e)},Bind1:function(){return Oc(e)}}},Oc=function(e){var n=ae(e.Bind1()),a=x(e.Applicative0());return{bind:function(t){return function(r){return n(t)(yr(function(u){return a(Me.create(u))})(function(u){var i=r(u);return i}))}},Apply0:function(){return Jb(e)}}},Jb=function(e){var n=Id(e.Bind1().Apply0().Functor0());return{apply:ml(X7(e)),Functor0:function(){return n}}},Xl=function(e){return{pure:(function(){var n=x(e.Applicative0());return function(a){return Bb(n(Le.create(a)))}})(),Apply0:function(){return Jb(e)}}};var qb=function(e){var n=X7(e);return{throwError:(function(){var a=x(e.Applicative0());return function(t){return Bb(a(Me.create(t)))}})(),Monad0:function(){return n}}};var fD=function(e){var n=tn(e);return function(a){var t=a.Bind1(),r=ae(t),u=x(a.Applicative0()),i=Id(t.Apply0().Functor0());return{alt:function(l){return function(s){return r(l)(function(h){if(h instanceof Le)return u(new Le(h.value0));if(h instanceof Me)return r(s)(function(p){if(p instanceof Le)return u(new Le(p.value0));if(p instanceof Me)return u(new Me(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 yl=(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 $b=function(e){var n=Uu(e);return function(a){return new yl(a,n)}};var yG=function(e){var n=B(e);return{map:function(a){return function(t){return new yl(a(t.value0),n(a)(t.value1))}}}};var wG=function(e){var n=Fo(e),a=Zt(e),t=Or(e);return{foldMap:function(r){var u=tn(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 Ar=(function(){function e(){}return e.value=new e,e})(),Mt=(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})(),Wb=function(e){return e},Bie=function(e){return new Mt(e.value0,e.value1)};var Hie=function(e){var n=function(a){return function(t){var r=a,u=!1,i;function l(s,h){if(h instanceof Mt&&h.value1 instanceof Mt&&h.value1.value1 instanceof Mt){r=new Mt(h,s),t=h.value1.value1.value1;return}var p=function(E){return E instanceof Mt&&E.value1 instanceof Mt&&E.value1.value1 instanceof Ar?new Mt(e(E.value0),new Mt(e(E.value1.value0),Ar.value)):E instanceof Mt&&E.value1 instanceof Ar?new Mt(e(E.value0),Ar.value):Ar.value},R=function(E){return function(w){var I=E,L=!1,U;function V(Q,te){if(Q instanceof Mt&&Q.value0 instanceof Mt&&Q.value0.value1 instanceof Mt&&Q.value0.value1.value1 instanceof Mt){I=Q.value1,w=new Mt(e(Q.value0.value0),new Mt(e(Q.value0.value1.value0),new Mt(e(Q.value0.value1.value1.value0),te)));return}return L=!0,te}for(;!L;)U=V(I,w);return U}};return u=!0,R(s)(p(h))}for(;!u;)i=l(r,t);return i}};return n(Ar.value)},bG={map:Hie};var xb=yG(bG),Vo={foldr:function(e){return function(n){var a=(function(){var r=function(u){return function(i){var l=u,s=!1,h;function p(R,E){if(E instanceof Ar)return s=!0,R;if(E instanceof Mt){l=new Mt(E.value0,R),i=E.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 107, column 7 - line 107, column 23): "+[R.constructor.name,E.constructor.name])}for(;!s;)h=p(l,i);return h}};return r(Ar.value)})(),t=Zt(Vo)(it(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 Ar)return u=!0,s;if(h instanceof Mt){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=tn(e.Semigroup0()),a=Gt(e);return function(t){return Zt(Vo)(function(r){var u=n(r);return function(i){return u(t(i))}})(a)}}};var Jie=Or(Vo);var pD=wG(Vo);var jb={append:function(e){return function(n){return Jie(Mt.create)(n)(e)}}},aO=tn(jb);var mD={append:function(e){return function(n){return new yl(e.value0,aO(e.value1)(Bie(n)))}}};var tO={alt:aO,Functor0:function(){return bG}},EG=(function(){return{empty:Ar.value,Alt0:function(){return tO}}})();var Qie=$t(H8);var iO=function(e){return new Mt(e,Ar.value)};var IG=(function(){var e=function(n){return function(a){var t=n,r=!1,u;function i(l,s){if(s instanceof Ar)return r=!0,l;if(s instanceof Mt){t=new Mt(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(Ar.value)})();var TG=function(e){var n=ae(e.Monad0().Bind1()),a=ni(e);return function(t){var r=t.Plus1().Alt0(),u=La(r),i=B(r.Functor0()),l=x(t.Applicative0());return function(s){var h=function(p){return n(u(i(Kr.create)(s))(l(new $r(void 0))))(function(R){return l(Qie(function(E){return new Mt(E,p)})(function(E){return IG(p)})(R))})};return a(h)(Ar.value)}}};var Bu=function(e){return Or(e)(Mt.create)(Ar.value)};var lO=function(e){return e()};var cO=function(e){throw new Error(e)};var sO=function(){return cO};var Zie=sO(),ele=lO,wl=function(e){return ele(function(){return Zie(e)})};var hD=(function(){var e=$b(EG);return function(n){return Wb(e(n))}})();var _O=function(e){return e.value0};var Sd=function(e){return e.join("")},gD=function(e){return e.split("")},Vi=function(e){return e},pO=function(e){return function(n){return function(a){return function(t){return a>=0&&a=0&&e=0&&e<100&&l.setUTCFullYear(e),l.getTime()};function SO(e,n){var a=LG(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond),t=LG(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return a-t}function CO(e){return function(n){return function(a){return function(t){var r=LG(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 FO=function(e,n,a){var t=new Date(Date.UTC(e,n,a));return e>=0&&e<100&&t.setUTCFullYear(e),t};function GO(e,n,a,t){var r=FO(n,a-1,t);return e(r.getUTCFullYear())(r.getUTCMonth()+1)(r.getUTCDate())}function MO(e,n,a){return FO(e,n-1,a).getUTCDay()}function U_(e){return e.charCodeAt(0)}function AO(e){return String.fromCharCode(e)}var Qo=function(e){var n=x(e.Applicative0()),a=Uu(e.Plus1());return function(t){if(t)return n(void 0);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 LO=kt(g_),PO=Cr(g_);var Fa=function(e){return e.toEnum};var Yn=function(e){return e.fromEnum},NG=function(e){var n=Fa(e),a=Yn(e),t=kt(e.Bounded0());return function(r){return function(u){return function(i){var l=n(i);if(l instanceof T)return l.value0;if(l instanceof G){var s=i=U_(LO)&&e<=U_(PO)?new T(AO(e)):G.value},Cle={succ:Ip(PG)(U_),pred:Tp(PG)(U_),Ord0:function(){return sb}};var Sp=(function(){return{cardinality:U_(PO)-U_(LO)|0,toEnum:PG,fromEnum:U_,Bounded0:function(){return g_},Enum1:function(){return Cle}}})();var Xb=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}},NO=oe(pn);var ec=(function(){function e(){}return e.value=new e,e})(),Bc=(function(){function e(){}return e.value=new e,e})(),Hc=(function(){function e(){}return e.value=new e,e})(),Jc=(function(){function e(){}return e.value=new e,e})(),qc=(function(){function e(){}return e.value=new e,e})(),$c=(function(){function e(){}return e.value=new e,e})(),Gs=(function(){function e(){}return e.value=new e,e})(),Ei=(function(){function e(){}return e.value=new e,e})(),Qi=(function(){function e(){}return e.value=new e,e})(),Ii=(function(){function e(){}return e.value=new e,e})(),Ki=(function(){function e(){}return e.value=new e,e})(),Yi=(function(){function e(){}return e.value=new e,e})(),Ti=(function(){function e(){}return e.value=new e,e})(),Si=(function(){function e(){}return e.value=new e,e})(),Xi=(function(){function e(){}return e.value=new e,e})(),Zi=(function(){function e(){}return e.value=new e,e})(),el=(function(){function e(){}return e.value=new e,e})(),nl=(function(){function e(){}return e.value=new e,e})(),Tl=(function(){function e(){}return e.value=new e,e})();var OO={show:function(e){return"(Year "+(NO(e)+")")}},UO={show:function(e){if(e instanceof ec)return"Monday";if(e instanceof Bc)return"Tuesday";if(e instanceof Hc)return"Wednesday";if(e instanceof Jc)return"Thursday";if(e instanceof qc)return"Friday";if(e instanceof $c)return"Saturday";if(e instanceof Gs)return"Sunday";throw new Error("Failed pattern match at Data.Date.Component (line 184, column 1 - line 191, column 25): "+[e.constructor.name])}},Zb={show:function(e){if(e instanceof Ei)return"January";if(e instanceof Qi)return"February";if(e instanceof Ii)return"March";if(e instanceof Ki)return"April";if(e instanceof Yi)return"May";if(e instanceof Ti)return"June";if(e instanceof Si)return"July";if(e instanceof Xi)return"August";if(e instanceof Zi)return"September";if(e instanceof el)return"October";if(e instanceof nl)return"November";if(e instanceof Tl)return"December";throw new Error("Failed pattern match at Data.Date.Component (line 101, column 1 - line 113, column 29): "+[e.constructor.name])}},kO={show:function(e){return"(Day "+(NO(e)+")")}},e1=Ca,n1=Ca,BO=Wt,Fle={eq:function(e){return function(n){return e instanceof ec&&n instanceof ec||e instanceof Bc&&n instanceof Bc||e instanceof Hc&&n instanceof Hc||e instanceof Jc&&n instanceof Jc||e instanceof qc&&n instanceof qc||e instanceof $c&&n instanceof $c||e instanceof Gs&&n instanceof Gs}}},HO={compare:function(e){return function(n){if(e instanceof ec&&n instanceof ec)return Be.value;if(e instanceof ec)return ye.value;if(n instanceof ec)return De.value;if(e instanceof Bc&&n instanceof Bc)return Be.value;if(e instanceof Bc)return ye.value;if(n instanceof Bc)return De.value;if(e instanceof Hc&&n instanceof Hc)return Be.value;if(e instanceof Hc)return ye.value;if(n instanceof Hc)return De.value;if(e instanceof Jc&&n instanceof Jc)return Be.value;if(e instanceof Jc)return ye.value;if(n instanceof Jc)return De.value;if(e instanceof qc&&n instanceof qc)return Be.value;if(e instanceof qc)return ye.value;if(n instanceof qc)return De.value;if(e instanceof $c&&n instanceof $c)return Be.value;if(e instanceof $c)return ye.value;if(n instanceof $c)return De.value;if(e instanceof Gs&&n instanceof Gs)return Be.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 Fle}},OG={eq:function(e){return function(n){return e instanceof Ei&&n instanceof Ei||e instanceof Qi&&n instanceof Qi||e instanceof Ii&&n instanceof Ii||e instanceof Ki&&n instanceof Ki||e instanceof Yi&&n instanceof Yi||e instanceof Ti&&n instanceof Ti||e instanceof Si&&n instanceof Si||e instanceof Xi&&n instanceof Xi||e instanceof Zi&&n instanceof Zi||e instanceof el&&n instanceof el||e instanceof nl&&n instanceof nl||e instanceof Tl&&n instanceof Tl}}},Ad={compare:function(e){return function(n){if(e instanceof Ei&&n instanceof Ei)return Be.value;if(e instanceof Ei)return ye.value;if(n instanceof Ei)return De.value;if(e instanceof Qi&&n instanceof Qi)return Be.value;if(e instanceof Qi)return ye.value;if(n instanceof Qi)return De.value;if(e instanceof Ii&&n instanceof Ii)return Be.value;if(e instanceof Ii)return ye.value;if(n instanceof Ii)return De.value;if(e instanceof Ki&&n instanceof Ki)return Be.value;if(e instanceof Ki)return ye.value;if(n instanceof Ki)return De.value;if(e instanceof Yi&&n instanceof Yi)return Be.value;if(e instanceof Yi)return ye.value;if(n instanceof Yi)return De.value;if(e instanceof Ti&&n instanceof Ti)return Be.value;if(e instanceof Ti)return ye.value;if(n instanceof Ti)return De.value;if(e instanceof Si&&n instanceof Si)return Be.value;if(e instanceof Si)return ye.value;if(n instanceof Si)return De.value;if(e instanceof Xi&&n instanceof Xi)return Be.value;if(e instanceof Xi)return ye.value;if(n instanceof Xi)return De.value;if(e instanceof Zi&&n instanceof Zi)return Be.value;if(e instanceof Zi)return ye.value;if(n instanceof Zi)return De.value;if(e instanceof el&&n instanceof el)return Be.value;if(e instanceof el)return ye.value;if(n instanceof el)return De.value;if(e instanceof nl&&n instanceof nl)return Be.value;if(e instanceof nl)return ye.value;if(n instanceof nl)return De.value;if(e instanceof Tl&&n instanceof Tl)return Be.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 OG}},JO=Wt,a1=(function(){return{bottom:-271820,top:275759,Ord0:function(){return e1}}})(),Gle=(function(){return{bottom:ec.value,top:Gs.value,Ord0:function(){return HO}}})(),t1=(function(){return{bottom:Ei.value,top:Tl.value,Ord0:function(){return Ad}}})(),cu={cardinality:547580,toEnum:function(e){if(e>=-271820&&e<=275759)return new T(e);if($e)return G.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 a1},Enum1:function(){return Mle(0)}},Mle=Xb("enumYear","Data.Date.Component",function(){return{succ:(function(){var e=Fa(cu),n=Yn(cu);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(cu),n=Yn(cu);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return e1}}});var k_={cardinality:7,toEnum:function(e){return e===1?new T(ec.value):e===2?new T(Bc.value):e===3?new T(Hc.value):e===4?new T(Jc.value):e===5?new T(qc.value):e===6?new T($c.value):e===7?new T(Gs.value):G.value},fromEnum:function(e){if(e instanceof ec)return 1;if(e instanceof Bc)return 2;if(e instanceof Hc)return 3;if(e instanceof Jc)return 4;if(e instanceof qc)return 5;if(e instanceof $c)return 6;if(e instanceof Gs)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 Gle},Enum1:function(){return Ale(0)}},Ale=Xb("enumWeekday","Data.Date.Component",function(){return{succ:(function(){var e=Fa(k_),n=Yn(k_);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(k_),n=Yn(k_);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return HO}}});var go={cardinality:12,toEnum:function(e){return e===1?new T(Ei.value):e===2?new T(Qi.value):e===3?new T(Ii.value):e===4?new T(Ki.value):e===5?new T(Yi.value):e===6?new T(Ti.value):e===7?new T(Si.value):e===8?new T(Xi.value):e===9?new T(Zi.value):e===10?new T(el.value):e===11?new T(nl.value):e===12?new T(Tl.value):G.value},fromEnum:function(e){if(e instanceof Ei)return 1;if(e instanceof Qi)return 2;if(e instanceof Ii)return 3;if(e instanceof Ki)return 4;if(e instanceof Yi)return 5;if(e instanceof Ti)return 6;if(e instanceof Si)return 7;if(e instanceof Xi)return 8;if(e instanceof Zi)return 9;if(e instanceof el)return 10;if(e instanceof nl)return 11;if(e instanceof Tl)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 t1},Enum1:function(){return Lle(0)}},Lle=Xb("enumMonth","Data.Date.Component",function(){return{succ:(function(){var e=Fa(go),n=Yn(go);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(go),n=Yn(go);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return Ad}}});var TD={bottom:1,top:31,Ord0:function(){return n1}},Il={cardinality:31,toEnum:function(e){if(e>=1&&e<=31)return new T(e);if($e)return G.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 TD},Enum1:function(){return Ple(0)}},Ple=Xb("enumDay","Data.Date.Component",function(){return{succ:(function(){var e=Fa(Il),n=Yn(Il);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(Il),n=Yn(Il);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return n1}}});var Ld=Rb()();var qO=hn(En),r1=function(e){return e},$O=function(e){return e},Pd=function(e){return e};var WO=function(e){return e},SD=function(e){return e.toDuration};var xO={append:function(e){return function(n){return e+n}}};var o1={append:function(e){return function(n){return e+n}}};var jO=rv;var zO=rv;var UG=function(e){return e.fromDuration};var If={fromDuration:Ld(r1)(function(e){return e*1e3}),toDuration:Ld(Pd)(function(e){return e/1e3})},Cp={fromDuration:Ld($O)(function(e){return e*6e4}),toDuration:Ld(Pd)(function(e){return e/6e4})},Nd={fromDuration:qO,toDuration:qO};var kG={fromDuration:Ld(WO)(function(e){return e*864e5}),toDuration:Ld(Pd)(function(e){return e/864e5})};var QO=Yn(go),BG=lr(),VO=Fa(k_),Ole=oe(OO),Ule=oe(Zb),kle=oe(kO);var Ble=be(BO),Hle=be(OG),Jle=be(JO),qle=xe(e1),$le=xe(Ad),Wle=xe(n1);var xle=Fa(go);var u1=(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})(),Cl=function(e){return e.value0},CD=function(e){var n=MO(e.value0,QO(e.value1),e.value2),a=n===0;return BG(VO(a?7:n))},KO={show:function(e){return"(Date "+(Ole(e.value0)+(" "+(Ule(e.value1)+(" "+(kle(e.value2)+")")))))}},Fl=function(e){return e.value1};var i1={eq:function(e){return function(n){return Ble(e.value0)(n.value0)&&Hle(e.value1)(n.value1)&&Jle(e.value2)(n.value2)}}},jle=be(i1),qG={compare:function(e){return function(n){var a=qle(e.value0)(n.value0);if(a instanceof ye)return ye.value;if(a instanceof De)return De.value;var t=$le(e.value1)(n.value1);return t instanceof ye?ye.value:t instanceof De?De.value:Wle(e.value2)(n.value2)}},Eq0:function(){return i1}};var hv=function(e){return e.value2},B_=function(e){return function(n){return function(a){var t=function(r){return function(u){return function(i){return new u1(r,BG(xle(u)),i)}}};return GO(t,e,QO(n),a)}}},l1=function(e){return function(n){return function(a){var t=new u1(e,n,a),r=jle(B_(e)(n)(a))(t);return r?new T(t):G.value}}},$G=(function(){return{bottom:new u1(kt(a1),kt(t1),kt(TD)),top:new u1(Cr(a1),Cr(t1),Cr(TD)),Ord0:function(){return qG}}})();var c1=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}},s1=oe(pn);var YO={show:function(e){return"(Second "+(s1(e)+")")}},XO={show:function(e){return"(Minute "+(s1(e)+")")}},ZO={show:function(e){return"(Millisecond "+(s1(e)+")")}},e6={show:function(e){return"(Hour "+(s1(e)+")")}},v1=Ca,f1=Ca,_1=Ca,p1=Ca,n6=Wt,a6=Wt,t6=Wt,r6=Wt,FD={bottom:0,top:59,Ord0:function(){return v1}},GD={bottom:0,top:59,Ord0:function(){return f1}},MD={bottom:0,top:999,Ord0:function(){return _1}},AD={bottom:0,top:23,Ord0:function(){return p1}},nc={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if($e)return G.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 FD},Enum1:function(){return zle(0)}},zle=c1("enumSecond","Data.Time.Component",function(){return{succ:(function(){var e=Fa(nc),n=Yn(nc);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(nc),n=Yn(nc);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return v1}}});var ac={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if($e)return G.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 GD},Enum1:function(){return Vle(0)}},Vle=c1("enumMinute","Data.Time.Component",function(){return{succ:(function(){var e=Fa(ac),n=Yn(ac);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(ac),n=Yn(ac);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return f1}}});var al={cardinality:1e3,toEnum:function(e){if(e>=0&&e<=999)return new T(e);if($e)return G.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 MD},Enum1:function(){return Qle(0)}},Qle=c1("enumMillisecond","Data.Time.Component",function(){return{succ:(function(){var e=Fa(al),n=Yn(al);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(al),n=Yn(al);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return _1}}});var tc={cardinality:24,toEnum:function(e){if(e>=0&&e<=23)return new T(e);if($e)return G.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 AD},Enum1:function(){return Kle(0)}},Kle=c1("enumHour","Data.Time.Component",function(){return{succ:(function(){var e=Fa(tc),n=Yn(tc);return function(a){return e((function(t){return t+1|0})(n(a)))}})(),pred:(function(){var e=Fa(tc),n=Yn(tc);return function(a){return e((function(t){return t-1|0})(n(a)))}})(),Ord0:function(){return p1}}});var Zle=oe(e6),ece=oe(XO),nce=oe(YO),ace=oe(ZO);var tce=be(r6),rce=be(a6),oce=be(n6),uce=be(t6),ice=xe(p1),lce=xe(f1),cce=xe(v1),sce=xe(_1);var gv=(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})(),o6={show:function(e){return"(Time "+(Zle(e.value0)+(" "+(ece(e.value1)+(" "+(nce(e.value2)+(" "+(ace(e.value3)+")")))))))}};var Sf=function(e){return e.value2},Dv=function(e){return e.value1},Wc=function(e){return e.value3};var Ms=function(e){return e.value0};var WG={eq:function(e){return function(n){return tce(e.value0)(n.value0)&&rce(e.value1)(n.value1)&&oce(e.value2)(n.value2)&&uce(e.value3)(n.value3)}}},xG={compare:function(e){return function(n){var a=ice(e.value0)(n.value0);if(a instanceof ye)return ye.value;if(a instanceof De)return De.value;var t=lce(e.value1)(n.value1);if(t instanceof ye)return ye.value;if(t instanceof De)return De.value;var r=cce(e.value2)(n.value2);return r instanceof ye?ye.value:r instanceof De?De.value:sce(e.value3)(n.value3)}},Eq0:function(){return WG}};var Od=(function(){return{bottom:new gv(kt(AD),kt(GD),kt(FD),kt(MD)),top:new gv(Cr(AD),Cr(GD),Cr(FD),Cr(MD)),Ord0:function(){return xG}}})();var vce=Yn(cu),fce=Yn(go),_ce=Yn(Il),pce=Yn(tc),mce=Yn(ac),dce=Yn(nc),hce=Yn(al),gce=oe(KO),Dce=oe(o6),Rce=be(i1),yce=be(WG),wce=xe(qG),bce=xe(xG),Ece=ae(nn),Ud=va(Ro),jG=B(ue),Ice=Bi(nn),Tce=Fa(cu),Sce=Fa(go),Cce=Fa(Il),Fce=Fa(tc),Gce=Fa(ac),Mce=Fa(nc),Ace=Fa(al),xc=(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})(),zG=function(e){return{year:vce(Cl(e.value0)),month:fce(Fl(e.value0)),day:_ce(hv(e.value0)),hour:pce(Ms(e.value1)),minute:mce(Dv(e.value1)),second:dce(Sf(e.value1)),millisecond:hce(Wc(e.value1))}},LD=function(e){return e.value1},u6={show:function(e){return"(DateTime "+(gce(e.value0)+(" "+(Dce(e.value1)+")")))}};var Lce={eq:function(e){return function(n){return Rce(e.value0)(n.value0)&&yce(e.value1)(n.value1)}}},Gl={compare:function(e){return function(n){var a=wce(e.value0)(n.value0);return a instanceof ye?ye.value:a instanceof De?De.value:bce(e.value1)(n.value1)}},Eq0:function(){return Lce}},Ml=function(e){var n=SD(e);return function(a){return function(t){return n(SO(zG(a),zG(t)))}}},Ff=function(e){return e.value0},kd=(function(){return{bottom:new xc(kt($G),kt(Od)),top:new xc(Cr($G),Cr(Od)),Ord0:function(){return Gl}}})(),Rv=function(e){var n=UG(e);return function(a){return function(t){return Ece(CO(T.create)(G.value)(n(a))(zG(t)))(function(r){return Ud(jG(xc.create)(Ice(Ud(Ud(jG(l1)(Tce(r.year)))(Sce(r.month)))(Cce(r.day)))))(Ud(Ud(Ud(jG(gv.create)(Fce(r.hour)))(Gce(r.minute)))(Mce(r.second)))(Ace(r.millisecond)))})}}};var Fi=(function(){var e={},n="Pure",a="Throw",t="Catch",r="Sync",u="Async",i="Bind",l="Bracket",s="Fork",h="Sequential",p="Map",R="Apply",E="Alt",w="Cons",I="Resume",L="Release",U="Finalizer",V="Finalized",Q="Forked",te="Fiber",le="Thunk";function ne(Xe,Wa,At,zn){this.tag=Xe,this._1=Wa,this._2=At,this._3=zn}function Z(Xe){var Wa=function(At,zn,Un){return new ne(Xe,At,zn,Un)};return Wa.tag=Xe,Wa}function ee(Xe){return new ne(n,void 0)}function me(Xe){try{Xe()}catch(Wa){setTimeout(function(){throw Wa},0)}}function We(Xe,Wa,At){try{return Wa(At())}catch(zn){return Xe(zn)}}function Qe(Xe,Wa,At){try{return Wa(At)()}catch(zn){return At(Xe(zn))(),ee}}var dn=(function(){var Xe=1024,Wa=0,At=0,zn=new Array(Xe),Un=!1;function Ze(){var Ma;for(Un=!0;Wa!==0;)Wa--,Ma=zn[At],zn[At]=void 0,At=(At+1)%Xe,Ma();Un=!1}return{isDraining:function(){return Un},enqueue:function(Ma){var Ja,pt;Wa===Xe&&(pt=Un,Ze(),Un=pt),zn[(At+Wa)%Xe]=Ma,Wa++,Un||Ze()}}})();function qn(Xe){var Wa={},At=0,zn=0;return{register:function(Un){var Ze=At++;Un.onComplete({rethrow:!0,handler:function(Ma){return function(){zn--,delete Wa[Ze]}}})(),Wa[Ze]=Un,zn++},isEmpty:function(){return zn===0},killAll:function(Un,Ze){return function(){if(zn===0)return Ze();var Ma=0,Ja={};function pt(In){Ja[In]=Wa[In].kill(Un,function(Oa){return function(){delete Ja[In],Ma--,Xe.isLeft(Oa)&&Xe.fromLeft(Oa)&&setTimeout(function(){throw Xe.fromLeft(Oa)},0),Ma===0&&Ze()}})()}for(var tr in Wa)Wa.hasOwnProperty(tr)&&(Ma++,pt(tr));return Wa={},At=0,zn=0,function(In){return new ne(r,function(){for(var Oa in Ja)Ja.hasOwnProperty(Oa)&&Ja[Oa]()})}}}}}var Mn=0,An=1,Hn=2,Ia=3,Da=4,ha=5,Rt=6;function _t(Xe,Wa,At){var zn=0,Un=Mn,Ze=At,Ma=null,Ja=null,pt=null,tr=null,In=null,Oa=0,dr=0,za=null,jt=!0;function W(P){for(var O,j,K;;)switch(O=null,j=null,K=null,Un){case Hn:Un=An;try{Ze=pt(Ze),tr===null?pt=null:(pt=tr._1,tr=tr._2)}catch(ce){Un=ha,Ma=Xe.left(ce),Ze=null}break;case Ia:Xe.isLeft(Ze)?(Un=ha,Ma=Ze,Ze=null):pt===null?Un=ha:(Un=Hn,Ze=Xe.fromRight(Ze));break;case An:switch(Ze.tag){case i:pt&&(tr=new ne(w,pt,tr)),pt=Ze._2,Un=An,Ze=Ze._1;break;case n:pt===null?(Un=ha,Ze=Xe.right(Ze._1)):(Un=Hn,Ze=Ze._1);break;case r:Un=Ia,Ze=We(Xe.left,Xe.right,Ze._1);break;case u:Un=Da,Ze=Qe(Xe.left,Ze._1,function(ce){return function(){zn===P&&(zn++,dn.enqueue(function(){zn===P+1&&(Un=Ia,Ze=ce,W(zn))}))}});return;case a:Un=ha,Ma=Xe.left(Ze._1),Ze=null;break;case t:pt===null?In=new ne(w,Ze,In,Ja):In=new ne(w,Ze,new ne(w,new ne(I,pt,tr),In,Ja),Ja),pt=null,tr=null,Un=An,Ze=Ze._1;break;case l:Oa++,pt===null?In=new ne(w,Ze,In,Ja):In=new ne(w,Ze,new ne(w,new ne(I,pt,tr),In,Ja),Ja),pt=null,tr=null,Un=An,Ze=Ze._1;break;case s:Un=Ia,O=_t(Xe,Wa,Ze._2),Wa&&Wa.register(O),Ze._1&&O.run(),Ze=Xe.right(O);break;case h:Un=An,Ze=Tr(Xe,Wa,Ze._1);break}break;case ha:if(pt=null,tr=null,In===null)Un=Rt,Ze=Ja||Ma||Ze;else switch(O=In._3,K=In._1,In=In._2,K.tag){case t:Ja&&Ja!==O&&Oa===0?Un=ha:Ma&&(Un=An,Ze=K._2(Xe.fromLeft(Ma)),Ma=null);break;case I:Ja&&Ja!==O&&Oa===0||Ma?Un=ha:(pt=K._1,tr=K._2,Un=Hn,Ze=Xe.fromRight(Ze));break;case l:Oa--,Ma===null&&(j=Xe.fromRight(Ze),In=new ne(w,new ne(L,K._2,j),In,O),(Ja===O||Oa>0)&&(Un=An,Ze=K._3(j)));break;case L:In=new ne(w,new ne(V,Ze,Ma),In,Ja),Un=An,Ja&&Ja!==O&&Oa===0?Ze=K._1.killed(Xe.fromLeft(Ja))(K._2):Ma?Ze=K._1.failed(Xe.fromLeft(Ma))(K._2):Ze=K._1.completed(Xe.fromRight(Ze))(K._2),Ma=null,Oa++;break;case U:Oa++,In=new ne(w,new ne(V,Ze,Ma),In,Ja),Un=An,Ze=K._1;break;case V:Oa--,Un=ha,Ze=K._1,Ma=K._2;break}break;case Rt:for(var ve in za)za.hasOwnProperty(ve)&&(jt=jt&&za[ve].rethrow,me(za[ve].handler(Ze)));za=null,Ja&&Ma?setTimeout(function(){throw Xe.fromLeft(Ma)},0):Xe.isLeft(Ze)&&jt&&setTimeout(function(){if(jt)throw Xe.fromLeft(Ze)},0);return;case Mn:Un=An;break;case Da:return}}function X(P){return function(){if(Un===Rt)return jt=jt&&P.rethrow,P.handler(Ze)(),function(){};var O=dr++;return za=za||{},za[O]=P,function(){za!==null&&delete za[O]}}}function k(P,O){return function(){if(Un===Rt)return O(Xe.right(void 0))(),function(){};var j=X({rethrow:!1,handler:function(){return O(Xe.right(void 0))}})();switch(Un){case Mn:Ja=Xe.left(P),Un=Rt,Ze=Ja,W(zn);break;case Da:Ja===null&&(Ja=Xe.left(P)),Oa===0&&(Un===Da&&(In=new ne(w,new ne(U,Ze(P)),In,Ja)),Un=ha,Ze=null,Ma=null,W(++zn));break;default:Ja===null&&(Ja=Xe.left(P)),Oa===0&&(Un=ha,Ze=null,Ma=null)}return j}}function S(P){return function(){var O=X({rethrow:!1,handler:P})();return Un===Mn&&W(zn),O}}return{kill:k,join:S,onComplete:X,isSuspended:function(){return Un===Mn},run:function(){Un===Mn&&(dn.isDraining()?W(zn):dn.enqueue(function(){W(zn)}))}}}function Ha(Xe,Wa,At,zn){var Un=0,Ze={},Ma=0,Ja={},pt=new Error("[ParAff] Early exit"),tr=null,In=e;function Oa(X,k,S){var P=k,O=null,j=null,K=0,ve={},ce,Te;e:for(;;)switch(ce=null,P.tag){case Q:if(P._3===e&&(ce=Ze[P._1],ve[K++]=ce.kill(X,function(Ae){return function(){K--,K===0&&S(Ae)()}})),O===null)break e;P=O._2,j===null?O=null:(O=j._1,j=j._2);break;case p:P=P._2;break;case R:case E:O&&(j=new ne(w,O,j)),O=P,P=P._1;break}if(K===0)S(Xe.right(void 0))();else for(Te=0,ce=K;Te()=>e.props.def;function N6(e){class n extends vt.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 D1=typeof module>"u"?void 0:module.require,DVe=(function(){try{return D1===void 0?void 0:D1("util")}catch{return}})();var RVe=(function(){var e;if(typeof performance<"u")e=performance;else if(D1)try{e=D1("perf_hooks").performance}catch{}return(function(){return(e||Date).now()})})();var O6=(e,n)=>n[e],U6=(e,n,a)=>a[e]=n;var Wd=function(n){return function(a){return n(a)()}};var Ap=function(n){return function(a){return function(){return n(a)}}},$_=function(n){return function(a){return function(t){return function(){return n(a,t)}}}},Lp=function(n){return function(a){return function(t){return function(r){return function(){return n(a,t,r)}}}}};var Cse=ge(ca),WD=(function(){function e(){}return e.value=new e,e})(),H6=function(){return function(e){var n=Vt(e);return function(a){return Lp(U6)(n(lt.value))}}},eM=function(e){var n=sr(e);return function(a){var t=Vt(a);return function(r){return function(u){return Cse(function(){return O6(t(lt.value),u)})(n)}}}};Et();var oc=window.ReactDOM,{createPortal:J6,findDOMNode:SVe,flushSync:CVe,unstable_batchedUpdates:FVe}=window.ReactDOM;var mM=pl(mU(),1);function dU(e){return e.state&&e.state.s}function hU(e,n,a){return e.setState({s:n},a)}function gU(e,n){return e.state={s:n}}var DU=oc.render,RU=oc.hydrate,dM=mM.default&&mM.default.renderToString||(e=>""),nve=oc.unmountComponentAtNode,yU=vt.Fragment;function wU(e,n,a){return vt.createElement.apply(null,[e,ave(e,n)].concat(a))}function ave(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 bU(e){return n=>e===n}var T1=function(e){return function(n){return function(a){var t=he(a);if(e instanceof G&&t instanceof G)return void 0;if(e instanceof T&&t instanceof G)return void 0;if(e instanceof T&&t instanceof T){if(bU(e.value0)(t.value0))return void 0;if($e)return n(new T(t.value0))()}return n(t)()}}};var ie={asReactChildren:function(e){return[e]}},on={asReactChildren:function(e){return[e]}},Ce={asReactChildren:hn(En)};var cn=Ke,hM=Lp(hU),EU=$_(DU),IU=$_(RU),TU=Ap(dU),Aa=!1;var SU=$_(gU),KD=function(e){return e.asReactChildren},uc=function(){return function(e){var n=KD(e);return function(a){return function(t){return function(r){return wU(a,t,n(r))}}}}},CU=uc()(Ce),wv=function(){return function(e){return function(n){return CU(e)(n)([])}}},Oe=CU(yU)({});var gM=B(ca),uve=x(Ct),FU=function(e){return{initialize:function(n){return SU(n)(e.initialState)},getState:function(n){return function(){var t=gM(he)(TU(n))();return ze(e.initialState)(t)}},setState:hM}},GU=(function(){var e=function(n){return function(a){return{initialize:function(t){return ep(new T(a.initialState))(n)},getState:function(t){return gM(ze(a.initialState))(Z0(n))},setState:function(t){return function(r){return function(u){return function(){return ep(new T(r))(n)(),hM(t)(r)(uve(void 0))(),u()}}}}}}};return gM(e)(vd(G.value))})();var LU=ge(Ye),PU=tn(gr);var lve=x(Ct),NU=H6(),OU={reflectSymbol:function(){return"__unmounted"}},cve=NU(OU),UU={reflectSymbol:function(){return"__subscriptions"}},sve=NU(UU),S1=ge(ca),vve=eM(ct)(OU),MU=B(ca),fve=eM(gt(IO))(UU),_ve=fn(ln),pve=tt(uo),mve=yb(Ct)(Je),dve=_ve(Na),kU=kn(Go),hve=od(iv),gve=tn(__(VF(ob))),DM=function(e){return e},j_=(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})(),Dve={map:function(e){return function(n){return new j_(e(n.value0),n.value1)}}},Lo=function(e){return{bimap:function(n){return function(a){return function(t){return new j_(a(t.value0),LU(t.value1)(function(r){return function(u){return r({dispatch:function(i){return u.dispatch(n(i))},onStop:u.onStop})}}))}}}}},BU={apply:function(e){return function(n){return new j_(e.value0(n.value0),PU(e.value1)(n.value1))}},Functor0:function(){return Dve}},da={bind:function(e){return function(n){var a=n(e.value0);return new j_(a.value0,PU(e.value1)(a.value1))}},Apply0:function(){return BU}},Bn={pure:function(e){return new j_(e,[])},Apply0:function(){return BU}};var HU=function(e){var n=ae(e);return function(a){var t=kn(a);return function(r){return function(u){return new j_(r,LU(u)(function(i){return function(l){return n(i)(function(s){return t(l.dispatch(s))})}}))}}}};var Up=function(e){return new j_(void 0,[e])},Ut=function(e){return Up(gn(e))},z_=function(e){var n=ae(e.Monad0().Bind1()),a=kn(e);return function(t){return Up(function(r){return n(t)(function(u){return a(Wn(lve(void 0))(r.dispatch)(u))})})}},nt=function(e){var n=HU(e.Monad0().Bind1())(e);return function(a){return n(void 0)([a])}},JU=function(e){return function(n){var a=cve(WD.value),t=sve(WD.value),r=function(w){return function(I){return function(L){return function(){var V=S1(qD(w))(function(Q){return Q.init})();return n({initialState:V.value0}).setState(w)(I)(L)()}}}},u=(function(){var w=MU(ze(!1)),I=vve(WD.value);return function(L){return w(I(L))}})(),i=(function(){var w=MU(ze([])),I=fve(WD.value);return function(L){return w(I(L))}})(),l=function(w){return function(){return pve(mve)(i(w))(),t([])(w)()}},s=function(w){return function(){var L=S1(qD(w))(function(U){return U.init})();return n({initialState:L.value0}).getState(w)()}},h=function(w){return function(I){return function(){var U=i(w)();return t(wu(Jd(I))(U))(w)()}}},p=function(w){return function(I){var L=function(U){return Jd(dve(Wr(0))(function(){return U({dispatch:(function(){var V=R(I);return function(Q){return kU(V(Q))}})(),onStop:h(I)})}))};return jF(w)(L)}},R=function(w){return function(I){return hve(u(w))(function(){var U=s(w)(),V=S1(qD(w))(function(te){return te.update})(),Q=V(U)(I);return r(w)(Q.value0)(p(Q.value1)(w))()})}},E=function(w){return function(){var L=s(w)(),U=S1(qD(w))(function(V){return V.view})();return U(L)(R(w))}};return function(w){return P6(e,{def:w,init:n({initialState:w.init.value0}).initialize,render:E,componentDidMount:p(w.init.value1),componentWillUnmount:gve(a(!0))(l)})}}},RM=function(e){return function(){var a=kU(GU)();return L6(function(t){return JU(t)(a)(e)})}},Af=function(e){return function(n){return A6(e,function(a){var t=JU(a)(FU);return function(r){return t(n(r))}})}};function YD(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 Ps=function(){return function(){return function(e){return function(n){return YD(e,n)}}}};var C1=function(e){var n=Vt(e);return function(){return function(){return function(a){return function(t){return rb(n(a))(t)}}}}};var $U=wv(),yM=uc(),WU=Ps()();var XD=Ke;var wM=function(e){var n=yM(e);return function(a){return function(t){return n(XD(a))(t)}}},Os=function(e){var n=yM(e);return function(a){return function(t){return function(r){return n(XD(a))(WU(r)({className:t}))}}}},ZD=function(e){return function(n){return function(a){return $U(XD(e))(WU(a)({className:n}))}}},bM=function(e){return function(n){return $U(XD(e))({className:n})}},Xo=function(e){return function(n){var a=yM(n);return function(t){return function(r){return a(XD(e))({className:t})(r)}}}};var Yt=Ke;var jd=function(e){var n=Os(e);return function(){return function(){return n("video")}}},F1=function(e){return Xo("video")(e)};var G1=function(e){return Xo("ul")(e)};var Lf=function(e){return Xo("tr")(e)};var V_=function(e){return Xo("thead")(e)};var Q_=function(e){return Xo("th")(e)};var zd=function(){return function(){return ZD("textarea")}};var M1=function(e){var n=Os(e);return function(){return function(){return n("td")}}},Us=function(e){return Xo("td")(e)};var K_=function(e){return Xo("tbody")(e)};var Y_=function(e){return Xo("table")(e)};var qu=function(e){return Xo("strong")(e)},Vd=function(e){var n=Os(e);return function(){return function(){return n("span")}}},Ft=function(e){return Xo("span")(e)},A1=function(){return function(){return ZD("source")}};var L1=function(e){var n=Os(e);return function(){return function(){return n("select")}}};var Qd=function(e){var n=Os(e);return function(){return function(){return n("p")}}},xr=function(e){return Xo("p")(e)};var P1=function(e){var n=Os(e);return function(){return function(){return n("option")}}};var N1=function(e){return Xo("li")(e)};var X_=function(e){return Xo("label")(e)};var su=function(){return function(){return ZD("input")}};var jc=function(){return function(){return ZD("img")}};var Ht=function(e){return Xo("i")(e)};var ks=bM("hr");var Kd=function(e){return Xo("h6")(e)};var zc=function(e){return Xo("h4")(e)},O1=function(e){var n=Os(e);return function(){return function(){return n("h3")}}},vu=function(e){return Xo("h3")(e)},bv=function(e){var n=Os(e);return function(){return function(){return n("h2")}}},jr=function(e){return Xo("h2")(e)};var Z_=function(e){return Xo("h1")(e)},e0=function(e){var n=Os(e);return function(){return function(){return n("form")}}};var zr=function(e){var n=Os(e);return function(){return function(){return n("div")}}},Pe=function(e){return Xo("div")(e)};var U1=bM("br");var xU=Bd(ND);var yve=x(Ct);var EM={map:function(e){return function(n){return xU(xU(e))(n)}}},jU=ge(EM),zU=function(e){var n=ae(e.Monad0().Bind1()),a=kn(e);return function(t){return Up(function(r){return n(t(r.dispatch))(function(u){return a(r.onStop(u))})})}},Gi=function(e){var n=zU(e);return function(a){return function(t){return n(jU(t)(a))}}};var VU=function(e){return function(n){return e(Wn(yve(void 0))(n))}},Yd=function(e){var n=zU(e);return function(a){return function(t){return n(VU(jU(t)(a)))}}};var Xn=(function(){return{"genericTop'":je.value}})();var IM=function(e){return e["genericTop'"]},Zn=function(e){return{"genericTop'":IM(e)}};var ea=(function(){return{"genericBottom'":je.value}})();var eR=function(e){return e["genericBottom'"]},na=function(e){return{"genericBottom'":eR(e)}};var aa=function(e){return{"genericBottom'":new Se(eR(e))}},QU=function(e){var n=ld(e);return function(a){return n(eR(a))}};var n0=B(ue),k1=ut();var TM=function(e){return e["genericToEnum'"]};var B1=function(e){return e["genericSucc'"]},GM=function(e){var n=ld(e),a=cd(e);return function(t){var r=n0(n),u=B1(t);return function(i){return r(u(a(i)))}}},SM=function(e){return e["genericPred'"]};var CM=function(e){return e["genericFromEnum'"]};var ta=function(e){var n=SM(e),a=B1(e);return function(t){var r=IM(t);return function(u){var i=SM(u),l=B1(u);return function(s){var h=eR(s);return{"genericPred'":function(p){if(p instanceof Se)return n0(Se.create)(n(p.value0));if(p instanceof fe){var R=i(p.value0);if(R instanceof G)return new T(new Se(r));if(R instanceof T)return new T(new fe(R.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 30, column 14 - line 32, column 31): "+[R.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 Se){var R=a(p.value0);if(R instanceof G)return new T(new fe(h));if(R instanceof T)return new T(new Se(R.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 34, column 14 - line 36, column 31): "+[R.constructor.name])}if(p instanceof fe)return n0(fe.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 ra={"genericPred'":function(e){return G.value},"genericSucc'":function(e){return G.value}},oa=function(e){var n=SM(e),a=B1(e);return{"genericPred'":function(t){return n0($g)(n(t))},"genericSucc'":function(t){return n0($g)(a(t))}}};var FM=function(e){return e["genericCardinality'"]};var ua=function(e){var n=FM(e),a=TM(e),t=CM(e);return function(r){var u=TM(r),i=CM(r);return{"genericCardinality'":k1(n)+k1(FM(r))|0,"genericToEnum'":function(l){var s=function(h){if(l>=0&&lt.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 J1=function(e){return function(n){return new ci(1,1,e,n,Qc.value,Qc.value)}},o5=(function(){var e=function(t){if(t instanceof Qc)return 0;if(t instanceof ci)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 ci&&s.value0>e(h)?Vc(s.value2,s.value3,Vc(t,r,u,s.value4),Vc(i,l,s.value5,h)):Vc(i,l,Vc(t,r,u,s),h)},a=function(t,r,u,i,l,s,h){return s instanceof ci&&e(l)<=s.value0?Vc(s.value2,s.value3,Vc(u,i,l,s.value4),Vc(t,r,s.value5,h)):Vc(u,i,l,Vc(t,r,s,h))};return function(t,r,u,i){if(u instanceof Qc)return i instanceof Qc?J1(t)(r):i instanceof ci&&i.value0>1?n(t,r,u,i.value2,i.value3,i.value4,i.value5):Vc(t,r,u,i);if(u instanceof ci){if(i instanceof ci){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 Qc&&u.value0>1?a(t,r,u.value2,u.value3,u.value4,u.value5,i):Vc(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 Bs=function(e){var n=xe(e);return function(a){var t=function(r){var u=!1,i;function l(s){if(s instanceof Qc)return u=!0,G.value;if(s instanceof ci){var h=n(a)(s.value2);if(h instanceof ye){r=s.value4;return}if(h instanceof De){r=s.value5;return}if(h instanceof Be)return u=!0,new T(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 Xd=function(e){var n=xe(e);return function(a){return function(t){var r=function(u){if(u instanceof Qc)return J1(a)(t);if(u instanceof ci){var i=n(a)(u.value2);if(i instanceof ye)return o5(u.value2,u.value3,r(u.value4),u.value5);if(i instanceof De)return o5(u.value2,u.value3,u.value4,r(u.value5));if(i instanceof Be)return new ci(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 ic=(function(){return Qc.value})(),si=function(e){var n=Xd(e);return function(a){return Zt(a)(function(t){return function(r){return n(r.value0)(r.value1)(t)}})(ic)}};var afe=typeof Array.from=="function",c5=typeof Symbol<"u"&&Symbol!=null&&typeof Symbol.iterator<"u"&&typeof String.prototype[Symbol.iterator]=="function",tfe=typeof String.prototype.fromCodePoint=="function",rfe=typeof String.prototype.codePointAt=="function",s5=function(e){return rfe?function(n){return n.codePointAt(0)}:e},v5=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(c5)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 f5=function(e){return tfe?String.fromCodePoint:e},_5=function(e){return function(n){return c5?function(a){for(var t="",r=a[Symbol.iterator](),u=0;u1;if(a){var t=rR(Df(1)(e)),r=h5(t);return r?d5(n)(t):n}return n},BM=s5(dfe),Hp=p5(mfe)(BM),bu=function(e){return Wo(Hp(e))};var q1=function(e){return function(n){return m5(function(a){return bu(Cd(a)(n))})(Vb(e)(n))}},kM=(function(){var e=NG(Sp)(kt(g_))(Cr(g_));return function(n){return Vi(e(n))}})(),hfe=function(e){if(e<=65535)return kM(e);var n=vfe(e-65536|0)(1024)+55296|0,a=ffe(e-65536|0)(1024)+56320|0;return kM(n)+kM(a)};var nh=f5(hfe),D5=function(e){return function(n){if(e<1)return"";var a=t0(n);return a instanceof T?nh(a.value0.head)+D5(e-1|0)(a.value0.tail):n}},rl=_5(D5);var $1={eq:function(e){return function(n){return e===n}}},W1={compare:function(e){return function(n){return _fe(e)(n)}},Eq0:function(){return $1}},Nf=function(e){return function(n){return mv(Uc(rl(e)(n)))(n)}};var gfe=function(e){return function(n){var a=e,t=!1,r;function u(i,l){var s=t0(l);if(s instanceof T){var h=i===0;if(h)return t=!0,new T(s.value0.head);a=i-1|0,n=s.value0.tail;return}return t=!0,G.value}for(;!t;)r=u(a,n);return r}},ah=function(e){return function(n){return e<0?G.value:e===0&&n===""?G.value:e===0?new T(BM(n)):v5(gfe)(T.create)(G.value)(BM)(e)(n)}},Dfe={bottom:0,top:1114111,Ord0:function(){return W1}},Tv=(function(){return{cardinality:1114112,fromEnum:function(e){return e},toEnum:function(e){if(e>=0&&e<=1114111)return new T(e);if($e)return G.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 Dfe},Enum1:function(){return Rfe(0)}}})(),Rfe=cfe("enumCodePoint","Data.String.CodePoints",function(){return{succ:Ip(Fa(Tv))(Yn(Tv)),pred:Tp(Fa(Tv))(Yn(Tv)),Ord0:function(){return W1}}});var Ofe=ut();var M5={show:Ofe};var A5=Ee;var kfe=bf(Je),Bfe=ge(Ye),Hfe=vp(LM),Vn=function(e){return function(n){var a=kfe(Bfe(n)(function(t){return new yn(e(t),t)}));return function(t){return Fs(t)(a)}}},L5=function(e){var n=GM(e),a=QU(e);return function(t){var r=n(t);return function(u){return function(i){return Hfe(function(l){return new yn(l,r(l))})(a(i))}}}},Qn=function(e){var n=L5(e);return function(a){var t=n(a);return function(r){var u=t(r);return function(i){return Ev(u(i))}}}};var Jfe={info:"info",warning:"warn",error:"error"},cc=e=>n=>a=>t=>{let r=Jfe[e];if(typeof console<"u"&&console[r]&&console[r](n,a),typeof window<"u"){let u=new Error(n);typeof window.Sentry<"u"&&window.Sentry.captureException(u,{extra:a})}return t()},P5=(e,n)=>(n.__sentryFingerprint=e,n);var N5=function(e){return Nc(P5)(e)};var Kc="error";var V1={parseOrPanic:function(e){return function(n){var a=e.parse(n);if(a instanceof Le)return a.value0;if(a instanceof Me)return cc(Kc)("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])}}},Ga=function(e){return e.parseOrPanic},$fe=Ga(V1),It=function(e){var n=Ga(e);return function(a){var t=B(a);return function(r){return n({parse:function(u){return t(T.create)(r.parse(u))},default:G.value,diagnosticName:r.diagnosticName})}}},Wfe=It(V1)(eo),o0=function(e){var n=O_(e);return function(a){return Wfe({parse:n,diagnosticName:a})}},sn={parseOrPanic:function(e){return $fe({default:e.default,diagnosticName:e.diagnosticName,parse:(function(){var n=Wn(new Me(""))(Le.create);return function(a){return n(e.parse(a))}})()})}};var O5=oa(ra),U5=na(ea),k5=la(ia),Uf=(function(){function e(){}return e.value=new e,e})(),kf=(function(){function e(){}return e.value=new e,e})(),xfe={to:function(e){if(e instanceof Se)return Uf.value;if(e instanceof fe)return kf.value;throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 17, column 1 - line 17, column 32): "+[e.constructor.name])},from:function(e){if(e instanceof Uf)return new Se(je.value);if(e instanceof kf)return new fe(je.value);throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 17, column 1 - line 17, column 32): "+[e.constructor.name])}};var jfe=function(e){if(e instanceof Uf)return"school";if(e instanceof kf)return"vine";throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 28, column 1 - line 28, column 29): "+[e.constructor.name])},Q1=(function(){return Ga(sn)({parse:Vn(jfe)(Qn(xfe)(ta(O5)(Zn(Xn))(O5)(U5))(ua(k5)(k5))(aa(U5))),default:Uf.value,diagnosticName:"Sem.Connections.Types.Actor"})})();var q5=oa(ra),B5=ta(q5)(Zn(Xn)),$5=na(ea),H5=aa($5),W5=la(ia),J5=ua(W5),zfe=La(du),Hs=(function(){function e(){}return e.value=new e,e})(),u0=(function(){function e(){}return e.value=new e,e})(),Bf=(function(){function e(){}return e.value=new e,e})(),Vfe={to:function(e){if(e instanceof Se)return Hs.value;if(e instanceof fe&&e.value0 instanceof Se)return u0.value;if(e instanceof fe&&e.value0 instanceof fe)return Bf.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 Hs)return new Se(je.value);if(e instanceof u0)return new fe(new Se(je.value));if(e instanceof Bf)return new fe(new fe(je.value));throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 18, column 1 - line 18, column 33): "+[e.constructor.name])}};var Qfe=function(e){if(e instanceof Hs)return"pending";if(e instanceof u0)return"connected";if(e instanceof Bf)return"ignored";throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 35, column 1 - line 35, column 30): "+[e.constructor.name])},qM=(function(){var e=Vn(Qfe)(Qn(Vfe)(B5(B5(q5)($5))(H5))(J5(J5(W5)))(H5)),n=function(a){return a==="cold"?new T(Bf.value):G.value};return Ga(sn)({parse:function(a){return zfe(e(a))(n(a))},default:Hs.value,diagnosticName:"Sem.Connections.Types.Status"})})();var Kfe=dd(cr),x5=oe(pn),Yfe=yo(Je)(cr),Xfe=Ft(ie);var j5=function(e){return{initiator:Q1(e.initiator),status:qM(e.status),introMessage:ze("")(he(e.introMessage))}},z5=25,$M=function(e){return bu(e)>=z5},V5=function(e){var n=bu(e),a=n>0,t=Kfe(" ")([(function(){return a?x5(n)+" characters":""})(),Yfe(["(",x5(z5),(function(){return a?"":" character"})()," minimum)"])]),r=(function(){var u=$M(e);return u?"text-success":""})();return Xfe(r)(t)};var X1=(function(){function e(){}return e.value=new e,e})(),K5=(function(){function e(){}return e.value=new e,e})();var Y5=(function(){var e=Ga(sn)({parse:function(n){return n instanceof T&&n.value0==="paid"?new T(K5.value):n instanceof T&&n.value0==="free"?new T(X1.value):n instanceof T&&n.value0==="churned"?new T(X1.value):n instanceof G?new T(X1.value):G.value},default:X1.value,diagnosticName:"Sem.Types.PartnerStatus"});return function(n){return e(he(n))}})();var X5=function(e){return{allowedToContact:e.allowedToContact,id:e.id,name:e.name,imageUrl:he(e.imageUrl),partnerStatus:Y5(e.partnerStatus)}};var n_e=ae(nn),WM=ht(),uR=Bt(Ee),Z5=$({reflectSymbol:function(){return"id"}}),a_e=fn(ln)(nn),t_e=Qo(hu),r_e=B(ue);var o_e=(function(){function e(){}return e.value=new e,e})(),u_e=(function(){function e(){}return e.value=new e,e})(),i_e=(function(){function e(){}return e.value=new e,e})(),xM=(function(){function e(){}return e.value=new e,e})(),l_e=(function(){function e(){}return e.value=new e,e})(),Z1=(function(){function e(){}return e.value=new e,e})(),iR=(function(){function e(){}return e.value=new e,e})(),jM=(function(){function e(){}return e.value=new e,e})(),zM=(function(){function e(){}return e.value=new e,e})();var e9={show:ut()};var c_e=Ee,s_e=o0(WM($({reflectSymbol:function(){return"avatarUrl"}})(uR)($({reflectSymbol:function(){return"bio"}})(uR)($({reflectSymbol:function(){return"connection"}})(Bt(WM($({reflectSymbol:function(){return"initiator"}})(Ee)($({reflectSymbol:function(){return"introMessage"}})(uR)($({reflectSymbol:function(){return"status"}})(Ee)(mn))))))($({reflectSymbol:function(){return"firstName"}})(Ee)(Z5(c_e)($({reflectSymbol:function(){return"lastName"}})(Ee)($({reflectSymbol:function(){return"school"}})(WM($({reflectSymbol:function(){return"allowedToContact"}})(ct)(Z5(A5)($({reflectSymbol:function(){return"imageUrl"}})(uR)($({reflectSymbol:function(){return"name"}})(Ee)($({reflectSymbol:function(){return"partnerStatus"}})(uR)(mn)))))))($({reflectSymbol:function(){return"title"}})(Ee)($({reflectSymbol:function(){return"type"}})(Ee)($({reflectSymbol:function(){return"unreadMessageCountFromSemUser"}})(Dn)(mn))))))))))));var n9=function(e){if(e instanceof o_e)return"sheet-view";if(e instanceof u_e)return"school-details";if(e instanceof i_e)return"network-gallery";if(e instanceof xM)return"livestream-details";if(e instanceof l_e)return"card-view";throw new Error("Failed pattern match at Sem.Types.User (line 102, column 25 - line 107, column 26): "+[e.constructor.name])},a9=function(e){return n_e(s_e("SemUser")(e))(function(n){return a_e(t_e(n.type==="Sem::User"))(function(){return new T({school:X5(n.school),firstName:n.firstName,lastName:n.lastName,avatarUrl:he(n.avatarUrl),title:n.title,bio:he(n.bio),connection:r_e(j5)(he(n.connection)),unreadMessageCountFromSemUser:n.unreadMessageCountFromSemUser,id:n.id})})})};var Sv=function(e){var n=null;return function(){return e===void 0||(n=e(),e=void 0),n}},Cv=function(e){return e()};var m9=(function(){function e(){}return e.value=new e,e})(),d9=(function(){function e(){}return e.value=new e,e})(),h9=(function(){function e(){}return e.value=new e,e})();var U_e=function(e){if(e instanceof m9)return"disabled";if(e instanceof d9)return"free-consultation";if(e instanceof h9)return"more-information";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types.InquiryMode (line 26, column 13 - line 29, column 40): "+[e.constructor.name])};var k_e=(function(){return[m9.value,d9.value,h9.value]})(),g9=It(sn)(ue)({parse:Vn(U_e)(k_e),diagnosticName:"InquiryMode"});var H_e=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 D9(e,n,a,t,r,u,i){return H_e(e,n-1,a,t,r,u,i).getTime()}function R9(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 q_e=lr(),$_e=Fa(go);var W_e=Yn(go);var y9=function(e){return e},aE=(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 xc(B_(n)(q_e($_e(a)))(t),new gv(r,u,i,l))}}}}}}};return R9(e)})();var w9=function(e){return D9(Cl(e.value0),W_e(Fl(e.value0)),hv(e.value0),Ms(e.value1),Dv(e.value1),Sf(e.value1),Wc(e.value1))};var b9=function(e){var n=tn(e.Semigroup0()),a=function(t){return function(r){return function(u){var i=t,l=r,s=!1,h;function p(R,E,w){if(w<1)return s=!0,R;i=n(R)(E),l=E,u=w-1|0}for(;!s;)h=p(i,l,u);return h}}};return a(Gt(e))};var x_e=ut();var qp=(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})(),sR=(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 E9=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),I9=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),aA=(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 rh={defer:function(e){var n=Sv(e);return function(a,t,r,u,i){var l=Cv(n);return l(a,t,r,u,i)}}};var Fv={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 Gv={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(R,E){return t(function(w){return i(R,h(E))})})})})})}}},Functor0:function(){return Fv}};var Mv={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 R=n(h);return R(s,t,r,u,i)})})})}}},Apply0:function(){return Gv}},j_e=tt(Mv);var Yc={pure:function(e){return function(n,a,t,r,u){return u(n,e)}},Apply0:function(){return Gv}};var z_e={Applicative0:function(){return Yc},Bind1:function(){return Mv}};var T9={throwError:function(e){return function(n,a,t,r,u){return r(n,e)}},Monad0:function(){return z_e}},V_e=wo(T9);var $p={alt:function(e){return function(n){return function(a,t,r,u,i){return t(function(l){return e(new qp(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 Fv}},Q_e=function(e){return function(n,a,t,r,u){var i=e(n);return u(i.value1,i.value0)}};var K_e=function(e){var n=e.Monad0(),a=B(n.Bind1().Apply0().Functor0()),t=x(n.Applicative0()),r=ni(e);return function(u){return function(i){var l=function(s){var h=!1,p;function R(E){var w=E(void 0);if(w instanceof E9){s=w.value0;return}if(w instanceof I9)return h=!0,a(Kr.create)(w.value0);if(w instanceof aA)return h=!0,t(new $r(new yn(w.value1,w.value0)));throw new Error("Failed pattern match at Parsing (line 152, column 13 - line 158, column 32): "+[w.constructor.name])}for(;!h;)p=R(s);return p};return r(l)(function(s){return i(u,E9.create,I9.create,function(h,p){return new aA(h,new Me(p))},function(h,p){return new aA(h,new Le(p))})})}}};var S9=Q_e(function(e){return new yn(e.value1,e)}),tA=function(e){return e.value1},rA=function(e){return e.value0};var Y_e={index:0,line:1,column:1},C9=function(e){var n=B(e.Monad0().Bind1().Apply0().Functor0()),a=K_e(e);return function(t){return function(r){var u=new qp(t,Y_e,!1);return n(jo)(a(u)(r))}}},X_e=C9(xg),F9=function(e){var n=X_e(e);return function(a){return x_e(n(a))}};var Z_e=function(e){return function(n){return V_e(new sR(e,n))}},oh=function(e){return j_e(Z_e(e))(S9)};var G9={empty:oh("No alternative"),Alt0:function(){return $p}},Wp={Applicative0:function(){return Yc},Plus1:function(){return G9}};var c0e=La($p);var s0e=x(Yc);var v0e=B(Fv);var Av=function(e){return function(n,a,t,r,u){return e(n,a,t,function(i,l){return r(new qp(i.value0,i.value1,n.value2),l)},u)}};var tE=function(e){return function(n){return c0e(n)(s0e(e))}},xp=function(e){return tE(G.value)(v0e(T.create)(e))};var L9=Yn(Tv),m0e=gu(ho);var d0e=oe(ir);var P9=function(e){return function(n){return function(a){var t=L9(n);if(t===10)return{index:e.index+1|0,line:e.line+1|0,column:1};if(t===13){var r=ah(0)(a);return r instanceof T&&L9(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)-m0e(e.column-1|0)(8)|0}:{index:e.index+1|0,line:e.line,column:e.column+1|0}}}},h0e=function(e){return function(n){return function(a){var t=e,r=n,u=!1,i;function l(s,h,p){var R=t0(h);if(R instanceof G)return u=!0,s;if(R instanceof T){var E=(function(){if(lc(R.value0.tail))return P9(s)(R.value0.head)(p);if($e)return P9(s)(R.value0.head)(R.value0.tail);throw new Error("Failed pattern match at Parsing.String (line 165, column 7 - line 167, column 52): ")})();t=E,r=R.value0.tail,a=p;return}throw new Error("Failed pattern match at Parsing.String (line 161, column 36 - line 168, column 38): "+[R.constructor.name])}for(;!u;)i=l(t,r,a);return i}}};var uA=bb(function(e){return function(n){return function(a){return function(t){return function(r){var u=lc(e.value0);return u?r(new qp(e.value0,e.value1,!0),void 0):t(e,new sR("Expected EOF",e.value1))}}}}}),O9=function(e){return bb(function(n){return function(a){return function(t){return function(r){return function(u){var i=e(n.value0);if(i instanceof Me)return r(n,new sR(i.value0,n.value1));if(i instanceof Le)return u(new qp(i.value0.remainder,h0e(n.value1)(i.value0.consumed)(i.value0.remainder),!lc(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 Lv=function(e){return O9(function(n){var a=bl(e)(n);return a instanceof T?new Le({value:e,consumed:e,remainder:a.value0}):new Me("Expected "+d0e(e))})};var U9=oe(pn),D0e=wr(Du),R0e=nd(Gv);var y0e=function(e){return"(line "+(U9(e.line)+(", col "+(U9(e.column)+")")))},w0e=function(e){return rA(e)+(" "+y0e(tA(e)))},iA=function(e){return function(n){return D0e(w0e)(F9(n)(R0e(e)(uA)))}};var uE=Fa(Sp);var vi=oe(pn);var O0e=Fo(Vo),U0e=O0e(cr);var k0e=vb(Ca)(tv);var sA=Yn(cu),B0e=oe(Zb),H0e=Yn(go),W9=Yn(Il),J0e=ut(),q0e=Yn(k_),x9=oe(UO),vA=Yn(tc),$0e=gu(ho),j9=Yn(ac),z9=Yn(nc),fA=Yn(al),V9=ou(ho);var Qp=(function(){function e(){}return e.value=new e,e})(),K9=(function(){function e(){}return e.value=new e,e})(),W0e=(function(){function e(){}return e.value=new e,e})(),Js=(function(){function e(){}return e.value=new e,e})(),cE=(function(){function e(){}return e.value=new e,e})(),Y9=(function(){function e(){}return e.value=new e,e})(),X9=(function(){function e(){}return e.value=new e,e})(),Xc=(function(){function e(){}return e.value=new e,e})(),x0e=(function(){function e(){}return e.value=new e,e})(),j0e=(function(){function e(){}return e.value=new e,e})(),qs=(function(){function e(){}return e.value=new e,e})(),z0e=(function(){function e(){}return e.value=new e,e})(),sE=(function(){function e(){}return e.value=new e,e})(),Zc=(function(){function e(){}return e.value=new e,e})(),es=(function(){function e(){}return e.value=new e,e})(),V0e=(function(){function e(){}return e.value=new e,e})(),Al=(function(){function e(){}return e.value=new e,e})(),Q0e=(function(){function e(){}return e.value=new e,e})(),vE=(function(){function e(){}return e.value=new e,e})(),K0e=(function(){function e(){}return e.value=new e,e})(),Y0e=(function(){function e(){}return e.value=new e,e})(),X0e=(function(){function e(){}return e.value=new e,e})(),ar=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var Z0e=function(e){if(e instanceof Ei)return"Jan";if(e instanceof Qi)return"Feb";if(e instanceof Ii)return"Mar";if(e instanceof Ki)return"Apr";if(e instanceof Yi)return"May";if(e instanceof Ti)return"Jun";if(e instanceof Si)return"Jul";if(e instanceof Xi)return"Aug";if(e instanceof Zi)return"Sep";if(e instanceof el)return"Oct";if(e instanceof nl)return"Nov";if(e instanceof Tl)return"Dec";throw new Error("Failed pattern match at Data.Formatter.DateTime (line 489, column 19 - line 501, column 22): "+[e.constructor.name])};var c0=function(e){if(e<0)return"-"+c0(-e|0);if(e<10)return"0"+vi(e);if($e)return vi(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 194, column 1 - line 194, column 32): "+[e.constructor.name])},Z9=function(e){if(e<0)return"-"+Z9(-e|0);if(e<10)return"000"+vi(e);if(e<100)return"00"+vi(e);if(e<1e3)return"0"+vi(e);if($e)return vi(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 207, column 1 - line 207, column 35): "+[e.constructor.name])},ek=function(e){if(e<0)return"-"+ek(-e|0);if(e<10)return"00"+vi(e);if(e<100)return"0"+vi(e);if($e)return vi(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 200, column 1 - line 200, column 32): "+[e.constructor.name])};var epe=function(e){var n=vi(k0e(e)),a=bu(n);return a===1?"0"+n:a===2?n:Nf(a-2|0)(n)};var npe=function(e){var n=e===0;return n?12:e},ape=function(e){return function(n){if(n instanceof Qp)return Z9(sA(Cl(e.value0)));if(n instanceof K9)return epe(sA(Cl(e.value0)));if(n instanceof W0e)return vi(sA(Cl(e.value0)));if(n instanceof Js)return B0e(Fl(e.value0));if(n instanceof cE)return Z0e(Fl(e.value0));if(n instanceof Y9)return c0(H0e(Fl(e.value0)));if(n instanceof X9)return c0(W9(hv(e.value0)));if(n instanceof Xc)return vi(W9(hv(e.value0)));if(n instanceof x0e)return vi(ku((function(t){return t/1e3})(J0e(y9(w9(e))))));if(n instanceof j0e)return vi(q0e(CD(e.value0)));if(n instanceof qs)return x9(CD(e.value0));if(n instanceof z0e)return rl(3)(x9(CD(e.value0)));if(n instanceof sE)return c0(vA(Ms(e.value1)));if(n instanceof Zc)return c0(npe($0e(vA(Ms(e.value1)))(12)));if(n instanceof es){var a=vA(Ms(e.value1))>=12;return a?"PM":"AM"}if(n instanceof V0e)return vi(j9(Dv(e.value1)));if(n instanceof Al)return c0(j9(Dv(e.value1)));if(n instanceof Q0e)return vi(z9(Sf(e.value1)));if(n instanceof vE)return c0(z9(Sf(e.value1)));if(n instanceof K0e)return ek(fA(Wc(e.value1)));if(n instanceof Y0e)return vi((function(t){return V9(t)(100)})(fA(Wc(e.value1))));if(n instanceof X0e)return c0((function(t){return V9(t)(10)})(fA(Wc(e.value1))));if(n instanceof ar)return n.value0;throw new Error("Failed pattern match at Data.Formatter.DateTime (line 169, column 38 - line 192, column 21): "+[n.constructor.name])}},xu=function(e){return function(n){return U0e(ape(n))(e)}};var VZe=new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short",maximumFractionDigits:2});function fE(e){return Math.round(e).toString()}var ih=ae(Mv);var rpe=x(Yc),ope=gd(Wp)(rh);var upe=pG(Wp)(rh),_E=b9(cr),ipe=sp(Yc)(md),lpe=B(ue);var nk=ys(Ca),cpe=ou(ho),spe=oe(pn),vpe=ge(eo),fpe=oe(Y0),_pe=hn(En);var ppe=ih(xp(Av(Lv("+"))))(function(e){return ih(ope(Lv("0")))(function(n){return ih(xp(Av(Lv(",0"))))(function(a){return ih(xp(Av(Lv("."))))(function(t){return ih(ipe(t)(function(r){return Av(upe(Lv("0")))}))(function(r){return ih(xp(Av(Lv("a"))))(function(u){return rpe({sign:Fr(e),before:Wo(n),comma:Fr(a),after:ze(0)(lpe(Wo)(r)),abbreviations:Fr(u)})})})})})})}),mpe=iA(ppe);var ak=function(e){return function(n){var a=hG(n),t=(function(){if(a>0)return nk(ku(gG(a)/q7))(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=cpe(t)(3),u=(function(){var V=r<1;return V?n:n/Pb(1e3)(br(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+"+spe(r*3|0);throw new Error("Failed pattern match at Data.Formatter.Number (line 107, column 7 - line 117, column 53): ")})();return ak({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=Pb(10)(br(nk(0)(e.after))),h=hp(a*s)/s,p=yd(h),R=h-p,E=hp(R*s),w=(function(){var V=fE(E),Q=bu(V),te=_E("0")(e.after-Q|0);return te+V})(),I=(function(){var V=e.after<1;return V?"":"."+((function(){var Q=E===0;return Q?_E("0")(e.after):""})()+(function(){var Q=E>0;return Q?w:""})())})(),L=function(V){return function(Q){return function(te){var le=V,ne=Q,Z=!1,ee;function me(We,Qe,dn){var qn=_p(dn);if(qn instanceof G)return Z=!0,Sd(We);if(qn instanceof T&&Qe<3){le=wu(qn.value0.head)(We),ne=Qe+1|0,te=qn.value0.tail;return}le=wu(",")(We),ne=0,te=dn}for(;!Z;)ee=me(le,ne,te);return ee}}},U=(function(){return e.comma?L([])(0)(td(gD(_E("0")(l)+fE(p)))):_E("0")(l)+fE(p)})();return(function(){var V=n<0;if(V)return"-";var Q=n>0&&e.sign;return Q?"+":""})()+(U+I)}},dpe=function(e){return function(n){return vpe(mpe(e))(it(ak)(n))}},lh=function(e){return function(n){return yr(gn(fpe(n)))(_pe)(dpe(e)(n))}};var gpe=Ke;var tk=function(e){return G_(e)};var Ll=function(e){var n=tk(e);return n?G.value:new T(gpe(e))};var Za=function(e){return function(n){var a=tk(e);return a?n:e}};var eu=function(){return Ke};var fR=oe(pn),Dpe=Yn(cu),Rpe=Yn(go),ype=eu(),wpe=yi(),bpe=Ml(Cp),_A=ou(ho),Epe=Bu(Je);var Ipe=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 fR(n.minutes)+(" minutes"+e.suffix);if(n.hours<=1)return"an hour"+e.suffix;if(n.hours<24)return fR(n.hours)+(" hours"+e.suffix);if(n.days<=1)return"a day"+e.suffix;if(n.days<30)return fR(n.days)+(" days"+e.suffix);if(n.months<=1)return"a month"+e.suffix;if(n.months<12)return fR(n.months)+(" months"+e.suffix);if(n.years<=1)return"a year"+e.suffix;if($e)return fR(n.years)+(" years"+e.suffix);throw new Error("Failed pattern match at Utils.Format (line 158, column 1 - line 158, column 81): "+[e.constructor.name,n.constructor.name])}},mE=function(e){return Ipe({suffix:" "+e,justNow:"just now"})},rk=function(){return function(e){var n=function(h){return(Dpe(Cl(Ff(h)))*12|0)+Rpe(Fl(Ff(h)))|0},a=ype(e),t=Za(a.format)(mE("ago")),r=RG(wpe(bpe(a.to)(a.from))),u=_A(r+30|0)(60),i=_A(u+12|0)(24),l=n(a.to)-n(a.from)|0,s=_A(l+6|0)(12);return t({minutes:r,hours:u,days:i,months:l,years:s})}};var ok=function(e){return function(n){return function(a){var t=e===1;return t?n:a}}};var pA=lh("0,0");var uk=function(e){return pA(br(e))},fc=function(e){return function(n){return function(a){return uk(e)+(" "+ok(e)(n)(a))}}};var ik=(function(){return xu(Epe([qs.value,new ar(", "),Js.value,new ar(" "),Xc.value,new ar(" at "),Zc.value,new ar(":"),Al.value,new ar(" "),es.value]))})();Et();var lk=vt.Fragment,mA=()=>document.visibilityState=="visible",ck=(e,n)=>document.elementFromPoint(e,n);function sk(e){return function(n){return function(){return n.getElementById(e)}}}var Cpe=B(ca),dE=function(e){var n=Cpe(he),a=sk(e);return function(t){return n(a(t))}};var hE=function(e){return function(n){return function(){return n[e]}}},Fpe=hE("children"),Gpe=hE("firstElementChild"),Mpe=hE("lastElementChild"),Ape=hE("childElementCount");var Mi=function(){return window};function fk(e,n,a,t){if(typeof window<"u"){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 Kn=function(e){return function(n){return fk(G.value,T.create,e,n)}};var _k=Ke;var gE=Ke;var pk=Ke;function mk(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 dA=Ke;var dk=function(e){return mk(G.value,T.create,e)};function gA(e){return function(){return e.seeking}}function _R(e){return function(){return e.currentTime}}function DA(e){return function(){return e.volume}}function RA(e){return function(n){return function(){n.volume=e}}}function yA(e){return function(){return e.muted}}function Yp(e){return function(n){return function(){n.muted=e}}}var gk=Kn("HTMLMediaElement");var Dk=Kn("HTMLMediaElement");function bA(e){return function(){return e.hash}}function EA(e){return function(n){return function(){n.hash=e}}}function IA(e){return function(){return e.platform}}function s0(e){return function(){return e.document}}function TA(e){return function(){return e.navigator}}function pR(e){return function(){return e.location}}var yk=Ke;var Sme=B(Ye);var Cme=sp(Ct)(md),wk=ae(uo),Ek=ge(ca),Fme=ae(nn);var FA=cn("\xA0");var ja=it(Wn(Aa));var Ik=function(e){return function(n){if(e)return Aa;if($e)return n(void 0);throw new Error("Failed pattern match at Utils.HTML (line 113, column 1 - line 113, column 65): "+[e.constructor.name,n.constructor.name])}},GA=function(e){return function(n){return Ik(e)(gn(n))}};var MA=function(e){return function(n){if(e)return n(void 0);if($e)return Aa;throw new Error("Failed pattern match at Utils.HTML (line 100, column 1 - line 100, column 61): "+[e.constructor.name,n.constructor.name])}},Qa=function(e){return function(n){return MA(e)(gn(n))}};var Gme=uc()(Ce)(lk),Mme=function(e){return function(n){return Gme({key:e.key})(rD(U1(""))(Sme(cn)(Wu(` `)(n))))}},sh=Mme({key:""}),yE=function(e){return Cme(Dk(e.target))(_R)};var Tk=function(e){return function(){return ck(e.x,e.y)}},Sk=function(e){return wk(Ek(wk(Mi)(s0))(gE))(dE(e))},wE=function(e){return Ek(Sk(e))(function(n){return Fme(n)(dk)})};var mR=Dn;var Fk=({just:e,nothing:n})=>a=>{try{let t=new Date(a);return isNaN(t.getTime())?n:e(t)}catch{return n}},AA=e=>({year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),Gk=()=>new Date,Mk=(()=>{let e=new Date;return typeof window<"u"?()=>e:()=>{let n=new Date;return n-e>1e3&&(e=n),e}})();var Xp=(()=>{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:"")})();var Lk={liftAff:hn(En),MonadEffect0:function(){return qe}};var mhn=(function(){function e(){this.head=null,this.last=null,this.size=0}function n(p,R){this.queue=p,this.value=R,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(R){setTimeout(function(){throw R},0)}}function u(p,R){var E=new n(p,R);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 R;switch(p.size){case 0:return null;case 1:R=p.head,p.head=null;break;case 2:R=p.last,p.head.next=null,p.last=null;break;default:R=p.last,p.last=R.prev,p.last.next=null}return R.prev=null,R.queue=null,p.size--,R.value}function l(p){var R;switch(p.size){case 0:return null;case 1:R=p.head,p.head=null;break;case 2:R=p.head,p.last.prev=null,p.head=p.last,p.last=null;break;default:R=p.head,p.head=R.next,p.head.prev=null}return R.next=null,R.queue=null,p.size--,R.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,R){if(!R.draining){var E=R.puts,w=R.takes,I=R.reads,L,U,V,Q,te;for(R.draining=!0;;){if(L=null,U=null,V=null,Q=R.value,te=I.size,R.error!==null){for(Q=p.left(R.error);L=l(E);)r(L.cb(Q));for(;U=l(I);)r(U(Q));for(;V=l(w);)r(V(Q));break}if(Q===t&&(L=l(E))&&(R.value=Q=L.value),Q!==t){for(V=l(w);te--&&(U=l(I));)r(U(p.right(Q)));V!==null&&(R.value=t,r(V(p.right(Q))))}if(L!==null&&r(L.cb(p.right(void 0))),R.value===t&&E.size===0||R.value!==t&&w.size===0)break}R.draining=!1}}return a.EMPTY=t,a.putLast=u,a.takeLast=i,a.takeHead=l,a.deleteCell=s,a.drainVar=h,a})();var dR=function(e){return q_(Z0(e))},hR=function(e){return q_(vd(e))};var nde=x(Ct),_0=ae(nn),ade=Fa(cu),tde=Fa(go),rde=Fa(Il),ode=Fa(tc),ude=Fa(ac),ide=Fa(nc),lde=Fa(al),cde=x(ka),Uk=tt(uo),sde=ge(ue);var vde=(function(){return hR(G.value)})();var kk=function(e){return _0(ade(e.year))(function(n){return _0(tde(e.month+1|0))(function(a){return _0(rde(e.day))(function(t){return _0(ode(e.hour))(function(r){return _0(ude(e.minute))(function(u){return _0(ide(e.second))(function(i){return _0(lde(e.millisecond))(function(l){return cde(new xc(B_(n)(a)(t),new gv(r,u,i,l)))})})})})})})})},Bk=function(e){var n=Q7("Failed to obtain current time. This should never happen.");return Wn(n)(nde)(kk(AA(e)))},p0=Uk(Bk)(Gk),bE=function(e){var n=dR(vde);if(n instanceof T)return n.value0;if(n instanceof G)return q_(Uk(Bk)(Mk));throw new Error("Failed pattern match at Utils.DateTime (line 60, column 3 - line 62, column 76): "+[n.constructor.name])},Ai=function(e){return _0(sde(Fk({just:T.create,nothing:G.value})(e))(AA))(kk)};var NA=x(ka),fde=B(ue),Hk=ae(nn);var Wk=oa(ra),Jk=ta(Wk)(Zn(Xn)),xk=na(ea),qk=aa(xk),jk=la(ia),$k=ua(jk);var OA=(function(){function e(){}return e.value=new e,e})(),UA=(function(){function e(){}return e.value=new e,e})(),kA=(function(){function e(){}return e.value=new e,e})();var _de={to:function(e){if(e instanceof Se)return OA.value;if(e instanceof fe&&e.value0 instanceof Se)return UA.value;if(e instanceof fe&&e.value0 instanceof fe)return kA.value;throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 175, column 1 - line 175, column 41): "+[e.constructor.name])},from:function(e){if(e instanceof OA)return new Se(je.value);if(e instanceof UA)return new fe(new Se(je.value));if(e instanceof kA)return new fe(new fe(je.value));throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 175, column 1 - line 175, column 41): "+[e.constructor.name])}};var pde=function(e){if(e instanceof OA)return"stuffed";if(e instanceof UA)return"satisfied";if(e instanceof kA)return"hungry";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 235, column 27 - line 238, column 35): "+[e.constructor.name])};var mde=It(sn)(ue)({parse:Vn(pde)(Qn(_de)(Jk(Jk(Wk)(xk))(qk))($k($k(jk)))(qk)),diagnosticName:"ClientAppetite"}),zk=function(e){return Hk(Wn(NA(G.value))((function(){var n=fde(NA);return function(a){return n(mde(a))}})())(he(e.clientAppetite)))(function(n){return Hk(g9(e.inquiryMode))(function(a){return NA({packages:e.packages,pricePerHourCents:e.pricePerHourCents,singleSessionDurationMinutes:e.singleSessionDurationMinutes,singleSessionRefundPeriodLengthDays:e.singleSessionRefundPeriodLengthDays,themes:e.themes,freeConsultationDurationMinutes:he(e.freeConsultationDurationMinutes),canSubmitConsultInquiry:he(e.canSubmitConsultInquiry),clientAppetite:n,inquiryMode:a})})})};var Vk=ae(nn),vh=ht(),BA=Bt(Ee),Qk=$({reflectSymbol:function(){return"description"}})(Ee),EE=$({reflectSymbol:function(){return"id"}})(Dn),JA=$({reflectSymbol:function(){return"name"}})(Ee),Yk=vh(EE(JA($({reflectSymbol:function(){return"slug"}})(Ee)(mn)))),Kk=gt(Yk),hde=o0(vh($({reflectSymbol:function(){return"advisingConfig"}})(Bt(vh($({reflectSymbol:function(){return"canSubmitConsultInquiry"}})(Bt(ct))($({reflectSymbol:function(){return"clientAppetite"}})(BA)($({reflectSymbol:function(){return"freeConsultationDurationMinutes"}})(Bt(Dn))($({reflectSymbol:function(){return"inquiryMode"}})(Ee)($({reflectSymbol:function(){return"packages"}})(gt(vh($({reflectSymbol:function(){return"activeForSale"}})(ct)(Qk(EE(JA($({reflectSymbol:function(){return"numMinutes"}})(Dn)($({reflectSymbol:function(){return"packageCategories"}})(Kk)($({reflectSymbol:function(){return"refundPeriodLengthDays"}})(Dn)($({reflectSymbol:function(){return"totalPriceCents"}})(mR)(mn)))))))))))($({reflectSymbol:function(){return"pricePerHourCents"}})(mR)($({reflectSymbol:function(){return"singleSessionDurationMinutes"}})(Dn)($({reflectSymbol:function(){return"singleSessionRefundPeriodLengthDays"}})(Dn)($({reflectSymbol:function(){return"themes"}})(gt(vh($({reflectSymbol:function(){return"active"}})(ct)($({reflectSymbol:function(){return"category"}})(Yk)(Qk($({reflectSymbol:function(){return"durationMinutes"}})(Dn)(EE($({reflectSymbol:function(){return"priceCents"}})(mR)($({reflectSymbol:function(){return"title"}})(Ee)(mn))))))))))(mn))))))))))))($({reflectSymbol:function(){return"entity"}})(vh($({reflectSymbol:function(){return"bio"}})(Ee)(EE($({reflectSymbol:function(){return"imageUrl"}})(BA)(JA($({reflectSymbol:function(){return"organizationId"}})(Dn)($({reflectSymbol:function(){return"organizationName"}})(Ee)($({reflectSymbol:function(){return"shortEducation"}})(BA)($({reflectSymbol:function(){return"tags"}})(Kk)(mn))))))))))(mn)))),HA=x(ka),qA=B(ue),gR=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),DR=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),gde=function(e){return Vk(hde("ServiceProviderPresenter")(e))(function(n){return Vk(Wn(HA(G.value))((function(){var a=qA(HA);return function(t){return a(zk(t))}})())(he(n.advisingConfig)))(function(a){return HA({entity:n.entity,advisingConfig:a})})})},Xk=It(sn)(ue)({parse:function(e){return e.type==="Sem::User"?qA(gR.create)(a9(e.presenter)):e.type==="ServiceProviders::Individual"?qA(DR.create)(gde(e.presenter)):G.value},diagnosticName:"Livestream Guest Presenter"});var aB=oa(ra),Zk=ta(aB)(Zn(Xn)),tB=na(ea),eB=aa(tB),rB=la(ia),nB=ua(rB),qf=(function(){function e(){}return e.value=new e,e})(),Nv=(function(){function e(){}return e.value=new e,e})(),$f=(function(){function e(){}return e.value=new e,e})(),Dde={to:function(e){if(e instanceof Se)return qf.value;if(e instanceof fe&&e.value0 instanceof Se)return Nv.value;if(e instanceof fe&&e.value0 instanceof fe)return $f.value;throw new Error("Failed pattern match at Livestream.Types.Poll (line 39, column 1 - line 39, column 37): "+[e.constructor.name])},from:function(e){if(e instanceof qf)return new Se(je.value);if(e instanceof Nv)return new fe(new Se(je.value));if(e instanceof $f)return new fe(new fe(je.value));throw new Error("Failed pattern match at Livestream.Types.Poll (line 39, column 1 - line 39, column 37): "+[e.constructor.name])}},oB={eq:function(e){return function(n){return e instanceof qf&&n instanceof qf||e instanceof Nv&&n instanceof Nv||e instanceof $f&&n instanceof $f}}},IE=function(e){if(e instanceof qf)return"ready";if(e instanceof Nv)return"live";if(e instanceof $f)return"closed";throw new Error("Failed pattern match at Livestream.Types.Poll (line 64, column 23 - line 67, column 21): "+[e.constructor.name])};var RR=(function(){return Ga(sn)({parse:Vn(IE)(Qn(Dde)(Zk(Zk(aB)(tB))(eB))(nB(nB(rB)))(eB)),default:qf.value,diagnosticName:"livestream poll status"})})(),WA=function(e){return{id:e.id,question:e.question,multiSelect:e.multiSelect,options:e.options,autoDisplayMinutesFromStart:he(e.autoDisplayMinutesFromStart)}};var uB=function(e){return{fullName:e.fullName,firstName:e.firstName,totalStreams:e.totalStreams,undergrad:{college:he(e.undergrad.college),major:he(e.undergrad.major),year:he(e.undergrad.year)},gradCollege:he(e.gradCollege),workExperience:he(e.workExperience),admissionsStory:he(e.admissionsStory),pictureUrl:he(e.pictureUrl),allStreamsUrl:he(e.allStreamsUrl)}};var yde=xe(Ca),wde=El(),fB=ge(ue),_B=oa(ra),iB=ta(_B)(Zn(Xn)),pB=na(ea),lB=aa(pB),mB=la(ia),cB=ua(mB),dB=Ga(sn),sB=lv(),vB=tt(nn),bde=ge(Ye),Ede=B(ue),Ide=ae(nn),ol=(function(){function e(){}return e.value=new e,e})(),fu=(function(){function e(){}return e.value=new e,e})(),Uo=(function(){function e(){}return e.value=new e,e})();var $s=pn,Tde=oe($s);var Sde={to:function(e){if(e instanceof Se)return ol.value;if(e instanceof fe&&e.value0 instanceof Se)return fu.value;if(e instanceof fe&&e.value0 instanceof fe)return Uo.value;throw new Error("Failed pattern match at Livestream.Types.Conference (line 172, column 1 - line 172, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof ol)return new Se(je.value);if(e instanceof fu)return new fe(new Se(je.value));if(e instanceof Uo)return new fe(new fe(je.value));throw new Error("Failed pattern match at Livestream.Types.Conference (line 172, column 1 - line 172, column 39): "+[e.constructor.name])}},m0={eq:function(e){return function(n){return e instanceof ol&&n instanceof ol||e instanceof fu&&n instanceof fu||e instanceof Uo&&n instanceof Uo}}},yR={eq:function(e){return function(n){return e===n}}},hB={compare:function(e){return function(n){return yde(e)(n)}},Eq0:function(){return yR}};var d0=function(e){return wde({livestream_conference_id:Tde(e.id),livestream_conference_presenter_name:ze("")(fB(e.presenter)(function(n){return n.fullName})),livestream_conference_uid:e.uid,livestream_conference_title:e.title,livestream_conference_partner_type:ze("")(e.partnerType)})},gB=(function(){var e=function(n){if(n instanceof ol)return"waiting_room";if(n instanceof fu)return"on_air";if(n instanceof Uo)return"complete";throw new Error("Failed pattern match at Livestream.Types.Conference (line 185, column 15 - line 188, column 33): "+[n.constructor.name])};return Vn(e)(Qn(Sde)(iB(iB(_B)(pB))(lB))(cB(cB(mB)))(lB))})(),DB=(function(){return dB({parse:gB,default:ol.value,diagnosticName:"livestream status"})})(),Cde=dB({parse:Ai,default:kt(kd),diagnosticName:"livestream scheduled start time"}),wR=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:fB(he(e.school))(function(n){return{cityState:n.cityState,name:n.name,id:sB(n.id),slug:sB(n.slug)}}),scheduledStartTime:Cde(e.scheduledStartTime),onAirTime:vB(Ai)(he(e.onAirTime)),streamStatus:DB(e.streamStatus),watchUrl:he(e.watchUrl),streamingStartTime:vB(Ai)(he(e.streamingStartTime)),polls:bde(e.polls)(function(n){return{poll:WA(n.poll),status:RR(n.status)}}),presenter:Ede(uB)(he(e.presenter)),partnerType:he(e.partnerType),guestPresenter:Ide(he(e.guestPresenter))(Xk),zoomJoinUrl:he(e.zoomJoinUrl),zoomStartUrl:he(e.zoomStartUrl)}};var RB=oa(ra),yB=na(ea),wB=la(ia),_c=(function(){function e(){}return e.value=new e,e})(),fh=(function(){function e(){}return e.value=new e,e})(),Fde={to:function(e){if(e instanceof Se)return _c.value;if(e instanceof fe)return fh.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 _c)return new Se(je.value);if(e instanceof fh)return new fe(je.value);throw new Error("Failed pattern match at Profile.PublishScope (line 20, column 1 - line 20, column 39): "+[e.constructor.name])}},TE={eq:function(e){return function(n){return e instanceof _c&&n instanceof _c||e instanceof fh&&n instanceof fh}}};var bR=function(e){if(e instanceof fh)return"anonymous-all-schools";if(e instanceof _c)return"all-schools";throw new Error("Failed pattern match at Profile.PublishScope (line 30, column 13 - line 32, column 30): "+[e.constructor.name])},SE=(function(){return Ga(sn)({parse:Vn(bR)(Qn(Fde)(ta(RB)(Zn(Xn))(RB)(yB))(ua(wB)(wB))(aa(yB))),diagnosticName:"Profile.PublishScope",default:fh.value})})();var ns=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),as=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ts=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),rs=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var jA=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:he(e.description)}},Zp=function(e){return{author:e.author,text:e.text,isFromHQ:e.isFromHQ,isPublic:e.isPublic,id:e.id,time:Ai(e.time)}},bB=function(e){return{autoRequestFromLivestreams:e.autoRequestFromLivestreams,fullName:he(e.fullName),publishScope:SE(e.publishScope)}},zA=function(e){return{id:e.id,title:e.title,url:e.url,buttonText:e.buttonText,autoDisplayMinutesFromStart:he(e.autoDisplayMinutesFromStart)}},pc="overlay-visibility-test";var EB=oa(ra),CE=ta(EB)(Zn(Xn)),IB=na(ea),FE=aa(IB),TB=la(ia),GE=ua(TB),Wf=(function(){function e(){}return e.value=new e,e})(),h0=(function(){function e(){}return e.value=new e,e})(),em=(function(){function e(){}return e.value=new e,e})(),g0=(function(){function e(){}return e.value=new e,e})(),D0=(function(){function e(){}return e.value=new e,e})(),Gde={to:function(e){if(e instanceof Se)return Wf.value;if(e instanceof fe&&e.value0 instanceof Se)return h0.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof Se)return em.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof Se)return g0.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof fe)return D0.value;throw new Error("Failed pattern match at Livestream.Types.Reaction (line 20, column 1 - line 20, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof Wf)return new Se(je.value);if(e instanceof h0)return new fe(new Se(je.value));if(e instanceof em)return new fe(new fe(new Se(je.value)));if(e instanceof g0)return new fe(new fe(new fe(new Se(je.value))));if(e instanceof D0)return new fe(new fe(new fe(new fe(je.value))));throw new Error("Failed pattern match at Livestream.Types.Reaction (line 20, column 1 - line 20, column 39): "+[e.constructor.name])}},SB=function(e){if(e instanceof Wf)return"love-this";if(e instanceof h0)return"helpful";if(e instanceof em)return"not-helpful";if(e instanceof g0)return"writing-down";if(e instanceof D0)return"funny";throw new Error("Failed pattern match at Livestream.Types.Reaction (line 51, column 17 - line 56, column 19): "+[e.constructor.name])},CB=function(e){return{authorTag:e.authorTag,kind:SB(e.kind)}},Mde=(function(){return Ga(sn)({parse:Vn(SB)(Qn(Gde)(CE(CE(CE(CE(EB)(IB))(FE))(FE))(FE))(GE(GE(GE(GE(TB)))))(FE)),default:Wf.value,diagnosticName:"Livestream Reaction Kind"})})(),FB=function(e){return{authorTag:e.authorTag,kind:Mde(e.kind)}};var MB=typeof CV<"u"&&CV.pathInfo||typeof global<"u"&&global.CV&&global.CV.pathInfo||(e=>null);function AB(e,n){let a=typeof CV<"u"&&CV.apiEndpoint||typeof global<"u"&&global.CV&&global.CV.apiEndpoint;return a||console.error("Missing `CV.apiEndpoint` function"),a&&a(e,n)}function LB(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 R=function(E){return function(){u(new Error(E))}};return l.onerror=R(a),l.ontimeout=R(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 w=E.indexOf(":");return t(E.substring(0,w))(E.substring(w+2))}),body:l.response})},l.responseType=r.responseType,l.withCredentials=r.withCredentials,l.timeout=r.timeout,l.send(r.content),function(E,w,I){try{l.abort()}catch(L){return w(L)}return I()}}}var ME="application/json",PB="application/x-www-form-urlencoded";var OB=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),UB=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),kB=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),BB=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),HB=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),VA=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),AE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),JB=function(e){return e instanceof VA?new T(PB):e instanceof AE?new T(ME):G.value};var qB=(function(){return AE.create})();var $B=ut();var LE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),PE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),nm=(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})(),WB=function(e){if(e instanceof LE||e instanceof PE)return $B(e.value0);if(e instanceof nm)return e.value1;throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): "+[e.constructor.name])};var KA=function(e){if(e instanceof LE)return"Accept";if(e instanceof PE)return"Content-Type";if(e instanceof nm)return e.value0;throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): "+[e.constructor.name])};var jB=hn(En),YA=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),XA=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ZA=(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})(),OE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),UE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),zB=function(e){if(e instanceof YA)return"arraybuffer";if(e instanceof XA)return"blob";if(e instanceof ZA)return"document";if(e instanceof NE||e instanceof OE)return"text";if(e instanceof UE)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 44, column 3 - line 50, column 19): "+[e.constructor.name])},VB=function(e){return e instanceof NE?new T(ME):G.value},QB=(function(){return new OE(jB)})();var KB=(function(){return new UE(jB)})();var XB=(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 Ude=ut();var am=function(e){return Ude(vD(e))};function ZB(e,n,a){try{return n(JSON.parse(a))}catch(t){return e(t.message)}}var BE=function(e){return ZB(Me.create,Le.create,e)};function nH(e){return e.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})}function aH(e,n,a){try{return n(nH(encodeURIComponent(a)))}catch(t){return e(t)}}function tH(e,n,a){try{return n(nH(encodeURIComponent(a)).replace(/%20/g,"+"))}catch(t){return e(t)}}var IR=(function(){return b_(aH)(gn(G.value))(T.create)})();var HE=(function(){return b_(tH)(gn(G.value))(T.create)})();var Jde=va(Ro),rH=B(ue),qde=lu(Rl)(ka);var $de=function(e){return e};var oH=(function(){var e=function(t){if(t.value1 instanceof G)return HE(t.value0);if(t.value1 instanceof T)return Jde(rH(function(r){return function(u){return r+("="+u)}})(HE(t.value0)))(HE(t.value1.value0));throw new Error("Failed pattern match at Data.FormURLEncoded (line 37, column 16 - line 39, column 114): "+[t.constructor.name])},n=rH(vo("&")),a=qde(e);return function(t){return n(a($de(t)))}})();var e2=(function(){function e(){}return e.value=new e,e})(),tm=(function(){function e(){}return e.value=new e,e})(),n2=(function(){function e(){}return e.value=new e,e})(),rm=(function(){function e(){}return e.value=new e,e})(),qE=(function(){function e(){}return e.value=new e,e})(),TR=(function(){function e(){}return e.value=new e,e})(),a2=(function(){function e(){}return e.value=new e,e})(),t2=(function(){function e(){}return e.value=new e,e})(),r2=(function(){function e(){}return e.value=new e,e})(),o2=(function(){function e(){}return e.value=new e,e})(),u2=(function(){function e(){}return e.value=new e,e})(),i2=(function(){function e(){}return e.value=new e,e})(),l2=(function(){function e(){}return e.value=new e,e})(),c2=(function(){function e(){}return e.value=new e,e})(),s2=(function(){function e(){}return e.value=new e,e})(),$E=(function(){function e(){}return e.value=new e,e})();var xde=function(e){return e},jde={show:function(e){if(e instanceof e2)return"OPTIONS";if(e instanceof tm)return"GET";if(e instanceof n2)return"HEAD";if(e instanceof rm)return"POST";if(e instanceof qE)return"PUT";if(e instanceof TR)return"DELETE";if(e instanceof a2)return"TRACE";if(e instanceof t2)return"CONNECT";if(e instanceof r2)return"PROPFIND";if(e instanceof o2)return"PROPPATCH";if(e instanceof u2)return"MKCOL";if(e instanceof i2)return"COPY";if(e instanceof l2)return"MOVE";if(e instanceof c2)return"LOCK";if(e instanceof s2)return"UNLOCK";if(e instanceof $E)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 43, column 1 - line 59, column 23): "+[e.constructor.name])}};var uH=yr(oe(jde))(xde);var iH={eq:function(e){return function(n){return e instanceof e2&&n instanceof e2||e instanceof tm&&n instanceof tm||e instanceof n2&&n instanceof n2||e instanceof rm&&n instanceof rm||e instanceof qE&&n instanceof qE||e instanceof TR&&n instanceof TR||e instanceof a2&&n instanceof a2||e instanceof t2&&n instanceof t2||e instanceof r2&&n instanceof r2||e instanceof o2&&n instanceof o2||e instanceof u2&&n instanceof u2||e instanceof i2&&n instanceof i2||e instanceof l2&&n instanceof l2||e instanceof c2&&n instanceof c2||e instanceof s2&&n instanceof s2||e instanceof $E&&n instanceof $E}}};var lH=function(e){return H_(function(n){return function(){var t=e(function(r){return n(Me.create(r))()},function(r){return n(Le.create(r))()});return function(r){return H_(function(u){return function(){return t(r,function(l){return u(Me.create(l))()},function(l){return u(Le.create(l))()}),KG}})}}})};var f2=x(Xl(Nr)),Vde=wp(Nr),om=yf(Nr),cH=La(fD(mD)(Nr)),Qde=Xs(Oc(Nr)),WE=B(ue),Kde=Wi(Je)(Ot),Yde=be(Dr),Xde=tt(nn),Zde=B(Ye),ehe=ge(st),nhe=M_(Yo),ahe=x(ba);var xE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),jE=(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})(),zE=(function(){function e(){}return e.value=new e,e})(),VE=(function(){function e(){}return e.value=new e,e})(),QE=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),sH=function(e){return function(n){var a=function(p){return p===""?f2(YU):yr(function(R){return Vde(yp.create(R))})(f2)(BE(p))},t=(function(){if(n.responseFormat instanceof YA)return om("ArrayBuffer");if(n.responseFormat instanceof XA)return om("Blob");if(n.responseFormat instanceof ZA)return function(p){return cH(om("Document")(p))(cH(om("XMLDocument")(p))(om("HTMLDocument")(p)))};if(n.responseFormat instanceof NE)return Qde(function(p){return n.responseFormat.value0(a(p))})(om("String"));if(n.responseFormat instanceof OE)return om("String");if(n.responseFormat instanceof UE)return gn(n.responseFormat.value0(f2(void 0)));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 OB)return new Le(p.value0(bo));if(p instanceof UB)return new Le(bo(p.value0));if(p instanceof kB)return new Le(bo(p.value0));if(p instanceof BB)return new Le(bo(p.value0));if(p instanceof HB)return new Le(bo(p.value0));if(p instanceof VA)return Ac("Body contains values that cannot be encoded as application/x-www-form-urlencoded")(WE(bo)(oH(p.value0)));if(p instanceof AE)return new Le(bo(H1(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(R){return p instanceof T&&!Kde(f_(Yde)(KA)(p.value0))(R)?pp(R)(p.value0):R}},i=function(p){return u(WE(PE.create)(Xde(JB)(p)))(u(WE(LE.create)(VB(n.responseFormat)))(n.headers))},l=function(p){return{method:uH(n.method),url:n.url,headers:Zde(function(R){return{field:KA(R),value:WB(R)}})(i(n.content)),content:p,responseType:zB(n.responseFormat),username:et(n.username),password:et(n.password),withCredentials:n.withCredentials,timeout:ze(0)(WE(function(R){return R})(n.timeout))}},s=function(p){return ehe(nhe(lH(LB(e,"AffjaxTimeoutErrorMessageIdent","AffjaxRequestFailedMessageIdent",XB.create,l(p)))))(function(R){if(R instanceof Le){var E=am(t(R.value0.body));if(E instanceof Me)return new Me(new jE(_O(E.value0),R.value0));if(E instanceof Le)return new Le({headers:R.value0.headers,status:R.value0.status,statusText:R.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(R instanceof Me)return new Me((function(){var w=gp(R.value0),I=w==="AffjaxTimeoutErrorMessageIdent";if(I)return zE.value;var L=w==="AffjaxRequestFailedMessageIdent";return L?VE.value:new QE(R.value0)})());throw new Error("Failed pattern match at Affjax (line 207, column 144 - line 219, column 28): "+[R.constructor.name])})};if(n.content instanceof G)return s(et(G.value));if(n.content instanceof T){var h=r(n.content.value0);if(h instanceof Le)return s(et(new T(h.value0)));if(h instanceof Me)return ahe(new Me(new xE(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 ph=(function(){return{method:new Me(tm.value),url:"/",headers:[],content:G.value,username:G.value,password:G.value,withCredentials:!1,responseFormat:KB,timeout:G.value}})();var fH={eq:function(e){return function(n){return e===n}}};var _2={newXHR:function(){return new XMLHttpRequest},fixupUrl:function(e){return e||"/"}};var _H=sH(_2);function NH(e){return Buffer.from(e).toString("base64")}function OH(e,n,a){let t;try{t=n(btoa(a))}catch(r){t=e(r)}return t}var h2=typeof btoa=="function";function UH(e){let a=[];for(let t=0;t{let e=null,n=0,a=()=>{if(!Bv||!Bv.key)return Bv||console.error("Pusher config is missing in global context"),new nge;let t={auth:{headers:{"X-CSRF-Token":Bv.authToken}},authEndpoint:Bv.authPath,cluster:Bv.cluster};return Bv.dev&&Object.assign(t,{wsHost:Bv.dev.wsHost,wsPort:Bv.dev.wsPort,enabledTransports:["ws"],forceTLS:!1,disableStats:!0}),new ZH.default(Bv.key,t)};return{acquireConnection:()=>(e||(e=a(),n=0),n++,e),releaseConnection:()=>{--n<=0&&(e&&e.disconnect(),e=null)}}})(),eJ=e=>{let n=Zhe().subscribe(e.channel);return n.bind(e.event,e.handler),()=>{n.unbind(e.event,e.handler),ege()}};function nge(){typeof document<"u"&&(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 age(e);return this.channels.push(a),a},this.channelNames=function(){return this.channels.map(e=>e.name)}}function age(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 nI=function(e){return e};var cge=function(e){return e},tJ=function(e){var n=xe(e),a=cge(e.Eq0());return{compare:function(t){return function(r){return d8(n(t)(r))}},Eq0:function(){return a}}};var tI=function(e){return function(){console.error(e)}};var vJ=function(e){var n=kn(e);return function(a){return n(tI(a))}};var Tge=x(Ct),fJ=ae(uo),Sge=B(ca),Cge=vJ(Go),R2=function(e){var n=function(t){var r=e(t);return dM(r.view(r.init.value0)(gn(Tge(void 0))))},a=function(t){return function(r){return function(u){return function(){var l=fJ(fJ(Mi)((function(){var h=Sge(gE);return function(p){return h(s0(p))}})()))(dE(r))();if(l instanceof G)return Cge("Element #"+(r+" not found"))();if(l instanceof T){var s=RM(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(EU),renderToString:n,hydrate:a(IU)}};var Gge=x(Ct),Mge=yi(),_J=function(e){return{handleMaybe:function(n){return function(a){return Wd((function(){var t=Wn(Gge(void 0))(n);return function(r){return t(Mge(a(r)))}})())}}}};var Dh={handle:function(e){return function(n){return function(a){return e(n(a))()}}}},pJ={handleEffect:function(e){return Wd(e)}};var Hv={handle:function(e){return function(n){return function(a){return e(n)()}}}},y2=function(e){return e.handleMaybe},w2=function(e){return e.handleEffect},Pl=function(e){return e.handle};var AR="";function dJ(e){var n=e.split(` `);return n.reduce(function(a,t){var r=Pge(t)||Oge(t)||Bge(t)||$ge(t)||Jge(t);return r&&a.push(r),a},[])}var Age=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Lge=/\((\S*)(?::(\d+))(?::(\d+))\)/;function Pge(e){var n=Age.exec(e);if(!n)return null;var a=n[2]&&n[2].indexOf("native")===0,t=n[2]&&n[2].indexOf("eval")===0,r=Lge.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]||AR,arguments:a?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var Nge=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Oge(e){var n=Nge.exec(e);return n?{file:n[2],methodName:n[1]||AR,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}var Uge=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,kge=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Bge(e){var n=Uge.exec(e);if(!n)return null;var a=n[3]&&n[3].indexOf(" > eval")>-1,t=kge.exec(n[3]);return a&&t!=null&&(n[3]=t[1],n[4]=t[2],n[5]=null),{file:n[3],methodName:n[1]||AR,arguments:n[2]?n[2].split(","):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var Hge=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Jge(e){var n=Hge.exec(e);return n?{file:n[3],methodName:n[1]||AR,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}:null}var qge=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function $ge(e){var n=qge.exec(e);return n?{file:n[2],methodName:n[1]||AR,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}function gJ({skipFrames:e,prefix:n}){let a=new Error().stack,r=dJ(a)[e],u=hJ(r.file.replace(/^(http(s?):\/\/)?[^\/]+/,"")),i=hJ(r.methodName);return`${n}_${u}_${i}_${r.lineNumber}_${r.column}`}var hJ=e=>e.replace(/[^\d\w]+/g,"_").replace(/(^_|_$)/g,"");var jge=x(Bn),zge=hn(En),rI=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Vge={map:function(e){return function(n){return new rI(function(a){return n.value0(function(t){return a(e(t))})})}}},Qge=B(Vge);var DJ=function(e){return DM(gJ(e))},xf=function(e){return new rI(function(n){return n(e)})},lm=function(e){return function(n){return new rI(function(a){return Af(e)(n)(a)})}},RJ=function(e){return function(n){return Af(e)(function(a){return{init:jge(void 0),update:gn(uf),view:gn(gn(n.value0(zge)))}})(void 0)}},yJ=function(e){var n=DJ({skipFrames:3,prefix:"WithHook"});return function(a){return RJ(n)(Qge(a)(e))}};var Rh=function(e){var n=DJ({skipFrames:3,prefix:"HooksComponent"});return RJ(n)(e)},Jv=function(){return function(e){return function(n){return new rI(function(a){return e.value0(function(t){var r=n(t);return r.value0(a)})})}}},Kge=Jv(),cm=function(e){return function(){return Kge}};Et();var b2=class extends vt.Component{componentDidUpdate(n){this.props.componentDidUpdate(n.deps)}render(){return this.props.children}},wJ=b2;var Xge=lr();var bJ=function(e){return"ref:"+Vt(e)(lt.value)},EJ=function(e){var n=bJ(e);return function(a){return Xge(Fs(n)(a))}},IJ=function(e){var n=bJ(e);return function(a){return Yb(n)(a)}};var eDe=uc(),TJ=fn(ln)(da),SJ=x(Bn),nDe=y2(_J(y6)),CJ={reflectSymbol:function(){return"deps"}},aDe=EJ(CJ),tDe=IJ(CJ),rDe=hn(En);var oDe=function(e){var n=eDe(e);return function(){return function(){return n(wJ)}}},uDe=oDe(on)()(),iDe=function(e){var n=Ou(e);return function(a){return function(t){return function(r){return function(u){return lm(a)(function(i){return t({init:TJ(Ut(u(r)))(function(){return SJ(r)}),update:function(l){return function(s){return TJ(Ut(u(s)))(function(){return SJ(s)})}},view:function(l){return function(s){return uDe({componentDidUpdate:nDe(s)(function(h){var p=n(aDe(h))(r);return p?new T(r):G.value}),deps:tDe(r)})(i(void 0))}}})})}}}}};var yh=function(e){var n=iDe(e);return function(a){return function(t){return n("UseEffectPrime")(rDe)(a)(t)}}};var FJ=x(Bn),lDe=hn(En);var cDe=function(e){return function(n){return function(a){return lm(e)(function(t){return n({init:FJ(a),update:function(r){return function(u){return FJ(u)}},view:op(t)})})}}},is=function(e){return cDe("UseState")(lDe)(e)};var E2=(function(){return Jv()(is(G.value))(function(e){return xf(new yn(e.value0,T1(e.value0)(e.value1)))})})();var GJ=fn(ln)(da),vDe=Gi(qe),fDe=hn(En),MJ=x(Bn),LR=function(e){return function(n){return lm("UseSubscription")(function(a){return{init:GJ(vDe(fDe)(e))(function(){return MJ(void 0)}),update:function(t){return function(r){return GJ(Ut(n(r)))(function(){return MJ(void 0)})}},view:function(t){return function(r){return a(void 0)}}}})}};var uI=typeof CV<"u"&&CV.assetsRoot||typeof global<"u"&&global.CV&&global.CV.assetsRoot||"/";var NR=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Nl=(function(){function e(){}return e.value=new e,e})();var UJ=function(e){if(e instanceof NR)return e.value0;if(e instanceof Nl)return"";throw new Error("Failed pattern match at Utils.HTML.Img.Alt (line 23, column 15 - line 25, column 19): "+[e.constructor.name])};var dDe=(function(){function e(){}return e.value=new e,e})(),hDe=(function(){function e(){}return e.value=new e,e})();var kJ=function(e){if(e instanceof dDe)return"eager";if(e instanceof hDe)return"lazy";throw new Error("Failed pattern match at Utils.HTML.Img.Loading (line 18, column 15 - line 20, column 17): "+[e.constructor.name])};var I2=Lc(uu(Ot)),DDe=eu(),RDe=ge(ue),yDe=jc()(),iI=function(e){var n=bl(e);return function(a){return Fr(n(a))}},BJ=function(e){if(I2(iI("http://"))(I2(iI("https://"))(I2(iI("//"))(iI("blob:"))))(e))return e;if($e)return uI+ze(e)(bl("/")(e));throw new Error("Failed pattern match at Utils.AppAssets (line 68, column 1 - line 68, column 30): "+[e.constructor.name])},Ol=function(){return function(e){return function(n){var a=DDe(n),t={alt:UJ(a.alt),height:Za(a.height)(void 0),loading:ze(void 0)(RDe(Ll(a.loading))(kJ)),onClick:Za(a.onClick)(void 0),src:BJ(a.src),style:Za(a.style)(void 0),width:Za(a.width)(void 0)};return yDe(e)(t)}}};var JJ=x(Bn),wDe=Ga(V1),bDe=ae(Ri);var EDe={init:JJ(void 0),update:function(e){return function(n){return JJ(void 0)}},view:function(e){return function(n){return Aa}}},T2=function(e){var n=O_(e);return function(a){return R2(wDe({parse:function(t){return bDe(n(t))(function(r){return Wn(new Me("Component construction failed"))(Le.create)(a.def(r))})},diagnosticName:"Props for "+a.diagnosticName,default:EDe}))}};var Ue=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Jn=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var iRe=yo(Je)(cr),lRe=ai(Ct)(iu),cRe=ge(EM);var sRe={show:function(e){return e}},vRe=oe(sRe);var vI=Ee;var fRe=function(e){var n=o0(e);return function(a){return function(t){return function(r){var u=iRe(["Pusher event ",t," over channel ",vRe(a)]),i=function(l){return lRe(n(u)(l))(r)()};return function(){return eJ({channel:a,event:t,handler:i})}}}}},mc=function(e){var n=fRe(e);return function(a){var t=a.Monad0(),r=ae(t.Bind1()),u=kn(a),i=x(t.Applicative0());return function(l){return function(s){return function(h){return r(u(n(l)(s)(h)))(function(p){return i(u(p))})}}}}},_Re=mc(Ep),fI=function(e){var n=_Re(e);return function(a){return function(t){return cRe(n(a)(t))(gn(void 0))}}};var vq=kv(Ov),il=Ws(vq),ko=ae(Na),UR=Ws(kv(vq)),fq=x(ba),pRe=ge(ue),OR=ht(),_q=$({reflectSymbol:function(){return"pollId"}})(Dn),mRe=$({reflectSymbol:function(){return"status"}})(Ee)(mn),dRe=sr(gt(OR(_q(mRe)))),pq=B(Ye),mq=B(st),hRe=$({reflectSymbol:function(){return"id"}}),gRe=hRe(Dn),dq=OR($({reflectSymbol:function(){return"author"}})(OR($({reflectSymbol:function(){return"cvid"}})(Ee)($({reflectSymbol:function(){return"username"}})(Ee)(mn))))(gRe($({reflectSymbol:function(){return"isFromHQ"}})(ct)($({reflectSymbol:function(){return"isPublic"}})(ct)($({reflectSymbol:function(){return"text"}})(Ee)($({reflectSymbol:function(){return"time"}})(Ee)(mn))))))),DRe=gh(dq);var RRe=Bt(Ee);var yRe=gh(gt(OR(_q($({reflectSymbol:function(){return"responses"}})(OR($({reflectSymbol:function(){return"answered"}})(Dn)($({reflectSymbol:function(){return"optionCounts"}})(gt(Dn))($({reflectSymbol:function(){return"seen"}})(Dn)($({reflectSymbol:function(){return"skipped"}})(Dn)(mn))))))(mn))))),wRe=gh(RRe),bRe=gh(gt(dq));var L2=UR("livestreams_polls_status_path")(function(e){return function(n){return function(a){return ko(e({id:n.id,status:IE(a)}))(Uv(function(t){return fq(ze([])(pRe(dRe(t))(pq(function(r){return{pollId:r.pollId,status:RR(r.status)}}))))}))}}});var P2=UR("livestreams_polls_answer_path")(function(e){return function(n){return function(a){return ko(e({id:n.id,options:a}))(to)}}}),hq=il("livestreams_conferences_status_on_air_path")(function(e){return function(n){return ko(e({conference_id:n}))(to)}}),gq=il("livestreams_conferences_status_complete_path")(function(e){return function(n){return ko(e({conference_id:n}))(to)}}),Dq=il("livestreams_cta_save_referral_path")(function(e){return function(n){return ko(e(n))(to)}}),Rq=il("livestreams_polls_report_shown_path")(function(e){return function(n){return ko(e({id:n.id}))(to)}}),yq=UR("livestreams_client_window_visibility_path")(function(e){return function(n){return function(a){return ko(e({stream_id:n,visible:a.visible}))(to)}}}),wq=UR("livestreams_recording_watch_event_path")(function(e){return function(n){return function(a){return ko(e({conference_id:n,current_time_minutes:a}))(to)}}}),bq=il("livestreams_questions_visibility_path")(function(e){return function(n){return ko(e({question_id:n.questionId,is_public:n.isPublic}))(to)}}),Eq=il("livestreams_questions_post_path")(function(e){return function(n){return ko(e({conference_id:n.conferenceId,question_text:n.text,hq_broadcast:n.hqBroadcast}))(Uv(function(a){return mq(Zp)(DRe("Livestream question")(a))}))}}),Iq=il("livestreams_cta_open_path")(function(e){return function(n){return ko(e({is_referral:!0,from_conference_id:n.fromConference,id:n.ctaId}))(to)}}),Tq=il("livestreams_cta_open_path")(function(e){return function(n){return ko(e({is_general:!0,from_conference_id:n.fromConference,id:n.ctaId}))(to)}}),Sq=il("livestreams_cta_open_path")(function(e){return function(n){return ko(e({is_featured_service_providers:!0,from_conference_id:n.fromConference,id:n.ctaId}))(to)}}),Cq=il("livestreams_cta_open_path")(function(e){return function(n){return ko(e({is_event:!0,from_conference_id:n.fromConference,cta_conference_id:n.cta}))(to)}}),_I=il("livestreams_register_path")(function(e){return function(n){return ko(e({from_conference_id:et(n.fromConference),register_for_conference_id:n.registerForConference,utm_cv_source:n.utmSource}))(to)}});var Fq=UR("livestreams_reactions_launch_path")(function(e){return function(n){return function(a){return ko(e({conference_id:n,reaction:CB(a)}))(to)}}}),Gq=il("livestreams_polls_responses_path")(function(e){return function(n){return ko(e({conference_id:n}))(Uv(yRe("livestream poll responses")))}}),Mq=il("livestreams_conferences_download_url_path")(function(e){return function(n){return ko(e({conference_id:n}))(Uv(function(a){return mq(he)(wRe("Livestream download URL")(a))}))}}),pI=Ws(Ov)("livestreams_dismiss_network_settings_modal_path")(function(e){return ko(e({}))(to)});var Aq=il("livestreams_conferences_ban_user_path")(function(e){return function(n){return ko(e({conference_id:n.conferenceId,user_cvid:n.userCvid}))(to)}}),mI=il("livestreams_questions_all_path")(function(e){return function(n){return ko(e({conference_id:n}))(Uv(function(a){return ko(bRe("Livestream questions")(a))(function(t){return fq(pq(Zp)(t))})}))}});var U2=(function(){function e(){}return e.value=new e,e})(),k2=(function(){function e(){}return e.value=new e,e})(),B2=(function(){function e(){}return e.value=new e,e})(),H2=(function(){function e(){}return e.value=new e,e})(),J2=(function(){function e(){}return e.value=new e,e})(),q2=(function(){function e(){}return e.value=new e,e})(),$2=(function(){function e(){}return e.value=new e,e})(),W2=(function(){function e(){}return e.value=new e,e})(),x2=(function(){function e(){}return e.value=new e,e})(),j2=(function(){function e(){}return e.value=new e,e})(),z2=(function(){function e(){}return e.value=new e,e})(),V2=(function(){function e(){}return e.value=new e,e})(),Q2=(function(){function e(){}return e.value=new e,e})(),K2=(function(){function e(){}return e.value=new e,e})(),kr=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Y2=(function(){function e(){}return e.value=new e,e})();var hI=function(e){if(e instanceof kr&&e.value0 instanceof U2)return"architecture";if(e instanceof kr&&e.value0 instanceof B2)return"chemistry";if(e instanceof kr&&e.value0 instanceof k2)return"business";if(e instanceof kr&&e.value0 instanceof H2)return"computer-science";if(e instanceof kr&&e.value0 instanceof J2)return"criminal-justice-and-corrections";if(e instanceof kr&&e.value0 instanceof q2)return"economics";if(e instanceof kr&&e.value0 instanceof $2)return"engineering";if(e instanceof kr&&e.value0 instanceof W2)return"english";if(e instanceof kr&&e.value0 instanceof x2)return"film";if(e instanceof kr&&e.value0 instanceof j2)return"finance";if(e instanceof kr&&e.value0 instanceof z2)return"history";if(e instanceof kr&&e.value0 instanceof V2)return"political-science";if(e instanceof kr&&e.value0 instanceof Q2)return"pre-med";if(e instanceof kr&&e.value0 instanceof K2)return"psychology";if(e instanceof Y2)return"overall";throw new Error("Failed pattern match at Hub.Ranking (line 97, column 8 - line 112, column 23): "+[e.constructor.name])};var gI=(function(){function e(){}return e.value=new e,e})(),ARe=(function(){function e(){}return e.value=new e,e})(),LRe=(function(){function e(){}return e.value=new e,e})();var Nq=function(e){if(e instanceof gI)return G.value;if(e instanceof LRe)return new T("open");if(e instanceof ARe)return new T("on");throw new Error("Failed pattern match at Hub.Types.WhatificatorPhase (line 21, column 13 - line 24, column 22): "+[e.constructor.name])};var Uq=function(e){var n=wM(e);return function(){return function(){return n("button")}}};var kq=function(e){var n=wM(e);return function(){return function(){return n("a")}}};var p1e=Yr(uu(Ot)),m1e=function(e){return e},vn=bo(null),d1e=function(e){return p1e(F_)(e)},Bq=function(e){var n=d1e(e);return n?e:""},Vr=function(e){return m1e(bo(e))};var h1e=w2(pJ),Hq=Ps()(),un=function(e){return h1e(e)},ga=function(e){var n=Uq(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(Hq(r)({className:a,"aria-label":t}))(u)}}}}}}},Jq=function(e){var n=ga(e)()();return function(a){return function(t){return function(r){return n(a)(t)({})(r)}}}},ro=function(e){var n=kq(e)()();return function(){return function(){return function(a){return function(t){return function(r){return function(u){return n(Hq(r)({className:a,"aria-label":t}))(u)}}}}}}};var Kq=lr();var yI=function(e){return function(n){var a=(function(){var u=dv("?")(n);return u?"&":"?"})(),t=Kq(IR(e.value)),r=Kq(IR(e.key));return n+(a+(r+("="+t)))}};var eEe=(function(){function e(){}return e.value=new e,e})(),nEe=(function(){function e(){}return e.value=new e,e})(),aEe=(function(){function e(){}return e.value=new e,e})(),tEe=(function(){function e(){}return e.value=new e,e})(),rEe=(function(){function e(){}return e.value=new e,e})(),oEe=(function(){function e(){}return e.value=new e,e})(),uEe=(function(){function e(){}return e.value=new e,e})(),iEe=(function(){function e(){}return e.value=new e,e})(),lEe=(function(){function e(){}return e.value=new e,e})(),cEe=(function(){function e(){}return e.value=new e,e})(),sEe=(function(){function e(){}return e.value=new e,e})(),vEe=(function(){function e(){}return e.value=new e,e})(),fEe=(function(){function e(){}return e.value=new e,e})(),_Ee=(function(){function e(){}return e.value=new e,e})(),pEe=(function(){function e(){}return e.value=new e,e})(),mEe=(function(){function e(){}return e.value=new e,e})(),dEe=(function(){function e(){}return e.value=new e,e})(),hEe=(function(){function e(){}return e.value=new e,e})(),gEe=(function(){function e(){}return e.value=new e,e})(),DEe=(function(){function e(){}return e.value=new e,e})(),REe=(function(){function e(){}return e.value=new e,e})(),yEe=(function(){function e(){}return e.value=new e,e})(),wEe=(function(){function e(){}return e.value=new e,e})(),bEe=(function(){function e(){}return e.value=new e,e})(),EEe=(function(){function e(){}return e.value=new e,e})(),IEe=(function(){function e(){}return e.value=new e,e})(),TEe=(function(){function e(){}return e.value=new e,e})(),SEe=(function(){function e(){}return e.value=new e,e})(),CEe=(function(){function e(){}return e.value=new e,e})(),FEe=(function(){function e(){}return e.value=new e,e})(),GEe=(function(){function e(){}return e.value=new e,e})(),MEe=(function(){function e(){}return e.value=new e,e})(),AEe=(function(){function e(){}return e.value=new e,e})(),LEe=(function(){function e(){}return e.value=new e,e})(),PEe=(function(){function e(){}return e.value=new e,e})(),NEe=(function(){function e(){}return e.value=new e,e})(),OEe=(function(){function e(){}return e.value=new e,e})(),UEe=(function(){function e(){}return e.value=new e,e})(),kEe=(function(){function e(){}return e.value=new e,e})(),BEe=(function(){function e(){}return e.value=new e,e})(),HEe=(function(){function e(){}return e.value=new e,e})(),JEe=(function(){function e(){}return e.value=new e,e})(),qEe=(function(){function e(){}return e.value=new e,e})(),$Ee=(function(){function e(){}return e.value=new e,e})(),WEe=(function(){function e(){}return e.value=new e,e})(),xEe=(function(){function e(){}return e.value=new e,e})(),jEe=(function(){function e(){}return e.value=new e,e})(),zEe=(function(){function e(){}return e.value=new e,e})(),VEe=(function(){function e(){}return e.value=new e,e})(),QEe=(function(){function e(){}return e.value=new e,e})(),KEe=(function(){function e(){}return e.value=new e,e})(),YEe=(function(){function e(){}return e.value=new e,e})(),XEe=(function(){function e(){}return e.value=new e,e})(),ZEe=(function(){function e(){}return e.value=new e,e})(),eIe=(function(){function e(){}return e.value=new e,e})(),nIe=(function(){function e(){}return e.value=new e,e})();var Ba=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ll=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var Yq=function(e){if(e instanceof Ba&&e.value0 instanceof eEe)return"AcceptanceRate";if(e instanceof Ba&&e.value0 instanceof nEe)return"AcceptanceRateMen";if(e instanceof Ba&&e.value0 instanceof aEe)return"AcceptanceRateWomen";if(e instanceof Ba&&e.value0 instanceof tEe)return"Address";if(e instanceof Ba&&e.value0 instanceof rEe)return"AdmissionChances";if(e instanceof Ba&&e.value0 instanceof oEe)return"AdmissionDifficulty";if(e instanceof Ba&&e.value0 instanceof uEe)return"AdmissionsNotificationDate";if(e instanceof Ba&&e.value0 instanceof iEe)return"AdmissionsWebsite";if(e instanceof Ba&&e.value0 instanceof lEe)return"AppDeadlineIsRolling";if(e instanceof Ba&&e.value0 instanceof cEe)return"ApplicationEffort";if(e instanceof Ba&&e.value0 instanceof sEe)return"ApplicationRound";if(e instanceof Ba&&e.value0 instanceof vEe)return"BasketballConference";if(e instanceof Ba&&e.value0 instanceof fEe)return"CampusSetting";if(e instanceof Ba&&e.value0 instanceof _Ee)return"City";if(e instanceof Ba&&e.value0 instanceof pEe)return"ClassRank";if(e instanceof Ba&&e.value0 instanceof mEe)return"CoEdSingleSex";if(e instanceof Ba&&e.value0 instanceof dEe)return"CollegeType";if(e instanceof Ba&&e.value0 instanceof hEe)return"CommuterCollege";if(e instanceof Ba&&e.value0 instanceof gEe)return"Diversity";if(e instanceof Ba&&e.value0 instanceof DEe)return"DropoutRate";if(e instanceof Ba&&e.value0 instanceof yEe)return"FinancialAidWebsite";if(e instanceof Ba&&e.value0 instanceof wEe)return"FirstYearEnrollment";if(e instanceof Ba&&e.value0 instanceof bEe)return"FootballConference";if(e instanceof Ba&&e.value0 instanceof EEe)return"FourYearGraduationRate";if(e instanceof Ba&&e.value0 instanceof IEe)return"HasDivisionOneBasketball";if(e instanceof Ba&&e.value0 instanceof TEe)return"HasDivisionOneFootball";if(e instanceof Ba&&e.value0 instanceof SEe)return"HasMedicalSchool";if(e instanceof Ba&&e.value0 instanceof CEe)return"HasStudyAbroad";if(e instanceof Ba&&e.value0 instanceof FEe)return"HBCU";if(e instanceof Ba&&e.value0 instanceof GEe)return"InListStatus";if(e instanceof Ba&&e.value0 instanceof MEe)return"MainWebsite";if(e instanceof Ba&&e.value0 instanceof REe)return"Majors";if(e instanceof Ba&&e.value0 instanceof AEe)return"Name";if(e instanceof Ba&&e.value0 instanceof LEe)return"NetCostEstimate";if(e instanceof Ba&&e.value0 instanceof PEe)return"Notes";if(e instanceof Ba&&e.value0 instanceof NEe)return"PercentInternationalStudents";if(e instanceof Ba&&e.value0 instanceof OEe)return"Phone";if(e instanceof Ba&&e.value0 instanceof UEe)return"Photo";if(e instanceof Ba&&e.value0 instanceof kEe)return"Prestige";if(e instanceof Ba&&e.value0 instanceof BEe)return"ProgramLength";if(e instanceof Ba&&e.value0 instanceof HEe)return"PublicPrivate";if(e instanceof Ba&&e.value0 instanceof JEe)return"RecommendationLetters";if(e instanceof Ba&&e.value0 instanceof qEe)return"Region";if(e instanceof Ba&&e.value0 instanceof $Ee)return"ReligiousAffiliation";if(e instanceof Ba&&e.value0 instanceof WEe)return"SatActDeadline";if(e instanceof Ba&&e.value0 instanceof xEe)return"SatActTestPolicy";if(e instanceof Ba&&e.value0 instanceof jEe)return"SatSubjectTestDeadline";if(e instanceof Ba&&e.value0 instanceof zEe)return"SixYearGraduationRate";if(e instanceof Ba&&e.value0 instanceof VEe)return"State";if(e instanceof Ba&&e.value0 instanceof QEe)return"StudentFacultyRatio";if(e instanceof Ba&&e.value0 instanceof KEe)return"SubmissionDeadline";if(e instanceof Ba&&e.value0 instanceof YEe)return"TOEFLPolicy";if(e instanceof Ba&&e.value0 instanceof XEe)return"TotalUndergrads";if(e instanceof Ba&&e.value0 instanceof ZEe)return"TuitionInState";if(e instanceof Ba&&e.value0 instanceof eIe)return"TuitionOutOfState";if(e instanceof Ba&&e.value0 instanceof nIe)return"YieldRate";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof U2)return"RankingArchitecture";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof k2)return"RankingBusiness";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof B2)return"RankingChemistry";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof H2)return"RankingComputerScience";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof J2)return"RankingCriminalJusticeAndCorrections";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof q2)return"RankingEconomics";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof $2)return"RankingEngineering";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof W2)return"RankingEnglish";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof x2)return"RankingFilm";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof j2)return"RankingFinance";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof z2)return"RankingHistory";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof V2)return"RankingPoliticalScience";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof Q2)return"RankingPreMed";if(e instanceof ll&&e.value0 instanceof kr&&e.value0.value0 instanceof K2)return"RankingPsychology";if(e instanceof ll&&e.value0 instanceof Y2)return"OverallRanking";throw new Error("Failed pattern match at Hub.Facet (line 315, column 6 - line 387, column 43): "+[e.constructor.name])};var tIe=(function(){function e(){}return e.value=new e,e})(),rIe=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),oIe=(function(){function e(){}return e.value=new e,e})();var Xq=function(e){if(e instanceof tIe)return"filters";if(e instanceof rIe)return"filter:"+Yq(e.value0);if(e instanceof oIe)return"rankings";throw new Error("Failed pattern match at Hub.Visuals.MobileOverlay (line 36, column 26 - line 39, column 39): "+[e.constructor.name])};function Zq(e,n){typeof CV<"u"&&CV.tracking&&CV.tracking.event(e,n)}var lIe=El();var zf=function(e){var n=kn(e);return function(a){return function(t){return n(function(){return Zq(a,t)})}}},Vf=function(e){var n=zf(e);return function(){return function(a){return function(t){return n(a)(lIe(t))}}}};var BR=(function(){function e(){}return e.value=new e,e})(),I0=(function(){function e(){}return e.value=new e,e})(),HR=(function(){function e(){}return e.value=new e,e})(),eTe=(function(){function e(){}return e.value=new e,e})(),u$=function(e){if(e instanceof BR)return"modal-sm";if(e instanceof I0)return"";if(e instanceof HR)return"modal-lg";if(e instanceof eTe)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 M$=pl(G$(),1),A$=M$.default;var OTe=uc(),L$=function(e){var n=OTe(e);return function(){return function(){return n(A$)}}};function pL(e){return function(){return function(n){return e(n)()}}}function mL(e){return function(n){return function(a){return function(t){return function(){return t.addEventListener(e,n,a)}}}}}function dL(e){return function(n){return function(a){return function(t){return function(){return t.removeEventListener(e,n,a)}}}}}var P$="message";var N$="hashchange";var O$="popstate";var U$="keyup",k$="keydown";var B$="mouseup";var H$="mousemove";var J$=kn(qe),q$=B(ca),WTe=tt(uo),WR=(function(){var e=function(t){return function(r){return function(u){return J$(function(){var l=r(),s=pL(function(h){return u(h)})();return mL(t)(s)(!1)(l)(),J$(dL(t)(s)(!1)(l))})}}},n=function(t){return e(t)(q$(yk)(Mi))},a=function(t){return e(t)(q$(pk)(WTe(s0)(Mi)))};return{hashchange:n(N$),mousemove:n(H$),mouseup:n(B$),popstate:n(O$),resize:n("resize"),message:n(P$),keydown:a(k$),keyup:a(U$),selectionchange:a("selectionchange"),visibilitychange:a("visibilitychange")}})();var CI=function(){return Ke};var FI=Pe(on),DL=eu(),xTe=L$(on)()(),gL=zr(on)()(),jTe=zr(Ce)()(),zTe=Pe(Ce),VTe=ga(ie)()(),QTe=Sr(ba),KTe=kn(qe),W$=CI(),xs=function(){return function(e){var n=FI("modal-backdrop fade show")(Aa),a=DL(e),t=a.id+"-description",r=Ll(a.footer),u=Ll(a.header),i=a.id+"-label",l={style:Za(a.dialogStyle)(Yt({})),role:"dialog","aria-modal":"true","aria-labelledby":(function(){if(u instanceof T)return i;if(u instanceof G)return"";throw new Error("Failed pattern match at Bootstrap.Modal (line 71, column 9 - line 73, column 24): "+[u.constructor.name])})(),"aria-describedby":t},s=Za(a.size)(I0.value),h=vo(" ")([(function(){var R=Za(a.scrollable)(!0);return R?"modal-dialog-scrollable":""})(),(function(){var R=Za(a.centered)(!0);return R?"modal-dialog-centered":""})(),u$(s),Za(a.dialogClass)("")]),p=xTe({focusTrapOptions:{escapeDeactivates:!1,fallbackFocus:".modal-content",allowOutsideClick:!0}})(FI("modal fade show d-block")(gL("modal-dialog "+h)(l)(jTe("modal-content "+Za(a.contentClass)(""))({style:Za(a.contentStyle)(Yt({}))})([ja(u)(gL("modal-header "+Za(a.headerClass)(""))({id:i})),gL("modal-body "+Za(a.bodyClass)(""))({id:t})(a.body),ja(r)(FI("modal-footer "+Za(a.footerClass)("")))]))));return Oe([p,n])}},RL=xs(),js=function(){return function(e){var n=DL(e),a=zTe("d-flex w-100 justify-content-between align-items-center")([FI("mr-4")(Za(n.title)(Aa)),VTe("btn btn-link large mr-n3 py-0 fe fe-x t--close "+Za(n.dismissButtonClass)("text-body"))(Vr("Close"))({type:"button",onClick:un(function(r){return n.onDismiss})})("")]),t=function(r){return QTe(r.key==="Escape")(KTe(n.onDismiss))};return yJ(LR(WR.keyup)(t))(function(r){var u=Za(n.bodyScrollable)(!1);return RL(u?(function(){var i=DL(W$(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,id:i.id,scrollable:i.scrollable,size:i.size,header:a}})():W$({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,id:n.id,onDismiss:n.onDismiss,scrollable:n.scrollable,size:n.size,title:n.title,body:Oe([a,n.body])}))})}},Eh=function(e){var n=KD(e);return function(a){return function(t){return function(r){return RL({id:t.id,bodyClass:a,body:Oe(n(r))})}}}};var XTe=eu(),ZTe=hn(En),eSe=e0(Ce)()(),nSe=ga(on)()(),aSe=su()();var GI="login",yL=function(){return function(e){var n=XTe(e),a=(function(){var u=Za(n.auth0ActiveTab)(GI);return u})(),t=ze({path:"",token:"",impersonationToken:""})(ZE("login_path")),r=function(u){return function(i){return Wn(ZTe)(function(l){return yI((function(s){return{key:u,value:s}})(l))})(Ll(i))}};return eSe("d-inline")({method:"post",action:r("origin")(n.origin)(r("login_hint")(n.auth0LoginHint)(yI({key:"screen_hint",value:a})(t.path))),target:(function(){var u=Za(n.openInNewTab)(!1);return u?"_blank":""})()})([nSe(Za(n.className)("btn btn-primary px-4"))(vn)({type:"submit",disabled:Za(n.disabled)(!1)})(Za(n.content)(cn(Za(n.text)("Log in")))),aSe("")({type:"hidden",name:"authenticity_token",value:t.token})])}};var _m=function(e){return function(n){return function(){return n[e]}}},uSe=_m("URL"),iSe=_m("documentURI"),lSe=_m("origin"),cSe=_m("compatMode"),sSe=_m("characterSet"),vSe=_m("contentType");var fSe=_m("documentElement");var MI=function(e){return function(n){return n[e]}},dSe=MI("namespaceURI"),hSe=MI("prefix"),gSe=MI("localName"),DSe=MI("tagName");function bL(e){return function(){return e.id}}function EL(e){return function(){return e.classList}}function IL(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 TL=Ke;var j$=Kn("Element");var zs=function(e){return function(n){return function(){return n[e]}}};var ESe=zs("baseURI"),ISe=zs("ownerDocument"),z$=zs("parentNode"),TSe=zs("parentElement");var SSe=zs("childNodes"),CSe=zs("firstChild"),FSe=zs("lastChild"),GSe=zs("previousSibling"),MSe=zs("nextSibling"),ASe=zs("nodeValue");var LSe=zs("textContent");function CL(e){return function(n){return function(){return e.isEqualNode(n)}}}var kSe=B(ca);var V$=(function(){var e=kSe(he);return function(n){return e(z$(n))}})();var mm=(function(){function e(){}return e.value=new e,e})(),K$=(function(){function e(){}return e.value=new e,e})(),Y$=(function(){function e(){}return e.value=new e,e})(),xR=(function(){function e(){}return e.value=new e,e})(),X$=(function(){function e(){}return e.value=new e,e})(),Z$=(function(){function e(){}return e.value=new e,e})(),eW=(function(){function e(){}return e.value=new e,e})();var AI=function(e){if(e instanceof mm)return G.value;if(e instanceof K$)return new T("for-you");if(e instanceof Y$)return new T("chancing");if(e instanceof xR)return new T("finances");if(e instanceof X$)return new T("majors");if(e instanceof Z$)return new T("admission-requirements");if(e instanceof eW)return new T("essay-prompts");throw new Error("Failed pattern match at SchoolDetails.Types (line 98, column 14 - line 105, column 39): "+[e.constructor.name])};var GL=ge(ue);var ML=dd(cr),mCe=ut(),dCe=jl(ue),AL=function(e){return"/schools/"+e.slug},LL="/schools/hub";var nW=function(e){return function(n){var a=GL(Nq(n.whatificator))(function(l){return"simulator="+l}),t=GL(n.mobileOverlay)(function(l){return"overlay="+Xq(l)}),r=vo("&")(ri([t,a])),u=GL(n.focusedSchool)(function(l){return ML("/")(ri([new T(mCe(l.slug)),AI(l.tab)]))}),i=(function(){return e.knownSeoState instanceof T&&n.seoView?ML("/")(ri([new T(AL({slug:e.knownSeoState.value0.slug})),u])):ML("/")(ri([new T(LL),new T(Wn(e.basePath)(hI)(n.ranking)),dCe(u)("d"),u]))})();return i+((function(){var l=r==="";return l?"":"?"})()+r)}};var tW="/profile";var RCe=ut();var PL=function(e){return function(n){return vo("/")(ri([new T("/schools"),new T(RCe(n)),AI(e)]))}},rW=tW,oW="/livestreams/upcoming";var yCe=function(e){return nW({basePath:"all",knownSeoState:G.value})({ranking:G.value,focusedSchool:e,mobileOverlay:G.value,seoView:!1,whatificator:gI.value})};var LI=function(e){return function(n){return yCe(new T({tab:e,slug:n}))}};var uW=(function(){function e(){}return e.value=new e,e})(),iW=(function(){function e(){}return e.value=new e,e})(),PI=(function(){function e(){}return e.value=new e,e})(),NI=(function(){function e(){}return e.value=new e,e})(),lW=(function(){function e(){}return e.value=new e,e})(),cW=(function(){function e(){}return e.value=new e,e})(),sW=(function(){function e(){}return e.value=new e,e})(),vW=function(e){if(e instanceof uW)return"avatar-xxs";if(e instanceof iW)return"avatar-xs";if(e instanceof PI)return"avatar-sm";if(e instanceof NI)return"";if(e instanceof lW)return"avatar-lg";if(e instanceof cW)return"avatar-xl";if(e instanceof sW)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 _W={show:ut()};var FCe=Number.MAX_SAFE_INTEGER;var kL=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 10, column 1 - line 10, column 27): "+[e.constructor.name])};var yFe=be(TE);var yW={show:function(e){return e}};var wW=function(e){return yFe(e.publishScope)(_c.value)};var Ih=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),BL=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),HL=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),JL=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qL=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),$L=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),WL=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})();var xL=oe(_W);var wFe=oe(e9),EW=oe(M5),bFe=oe(yW);var EFe="/messages";var IFe=function(e){return function(n){return e+("/"+(function(){if(n instanceof Ih)return"admission-officer/"+wFe(n.value0);if(n instanceof BL)return"school/"+EW(n.value0);if(n instanceof HL)return"student/"+bFe(n.value0);if(n instanceof JL)return"high-school/"+xL(n.value0);if(n instanceof qL)return"service-provider/"+xL(n.value0);if(n instanceof $L)return"parent/"+xL(n.value0);if(n instanceof WL)return"recruiter/"+EW(n.value0);throw new Error("Failed pattern match at DirectMessages.Urls (line 29, column 59 - line 36, column 63): "+[n.constructor.name])})())}},jL=IFe(EFe);var SFe=Ws(kv(Ov)),CFe=ae(Na),IW=ge(ue),TW=ut(),FFe=zt(st);var SW=SFe("network_connections_invite_school_path")(function(e){return function(n){return CFe(e({school_id:n.schoolId,message:et(n.introMessage),sem_user_id:et(IW(n.semUserId)(TW)),livestream_id:et(IW(n.livestreamId)(TW))}))(to)}}),CW=function(e){return function(n){return FFe(SW({schoolId:e,introMessage:G.value,semUserId:G.value,livestreamId:new T(n)}))}};var FW=function(e){return function(n){return function(a){return SW({schoolId:e,introMessage:new T(a.introMessage),semUserId:new T(n),livestreamId:G.value})}}};Et();function pi(){return pi=Object.assign?Object.assign.bind():function(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:1;OW+=1;var a=OW;function t(r){if(r===0)BW(a),e();else{var u=UW(function(){t(r-1)});VL.set(a,u)}}return t(n),a}dc.cancel=function(e){var n=VL.get(e);return BW(n),kW(n)};function gm(e,n){return e?e.contains(n):!1}function zR(e){return e instanceof HTMLElement?e:oc.findDOMNode(e)}var WW=pl($W());Et();function XL(e,n){typeof e=="function"?e(n):To(e)==="object"&&e&&"current"in e&&(e.current=n)}function KI(){for(var e=arguments.length,n=new Array(e),a=0;ae.length)&&(n=e.length);for(var a=0,t=Array(n);a"u"||typeof window>"u")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)))});Et();var _x=pl(Dm());Et();Et();var vx=pl(Dm());function ZW(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 UFe(e,n){var a={animationend:ZW("Animation","AnimationEnd"),transitionend:ZW("Transition","TransitionEnd")};return e&&("AnimationEvent"in n||delete a.animationend.animation,"TransitionEvent"in n||delete a.transitionend.transition),a}var kFe=UFe(qv(),typeof window<"u"?window:{}),nx={};qv()&&(ex=document.createElement("div"),nx=ex.style);var ex,ZI={};function ax(e){if(ZI[e])return ZI[e];var n=kFe[e];if(n)for(var a=Object.keys(n),t=a.length,r=0;r1&&arguments[1]!==void 0?arguments[1]:2;n();var u=dc(function(){r<=1?t({isCanceled:function(){return u!==e.current}}):a(t,r-1)});e.current=u}return Lr(function(){return function(){n()}},[]),[a,n]});Et();var BFe=qv()?HD:Lr,aT=BFe;var ux=[ls,Yf,C0,nT],r3=!1,ix=!0;function tT(e){return e===C0||e===nT}var lx=(function(e,n){var a=Xf(t3),t=Hr(a,2),r=t[0],u=t[1],i=ox(),l=Hr(i,2),s=l[0],h=l[1];function p(){u(ls,!0)}return aT(function(){if(r!==t3&&r!==nT){var R=ux.indexOf(r),E=ux[R+1],w=n(r);w===r3?u(E,!0):s(function(I){function L(){I.isCanceled()||u(E,!0)}w===!0?L():Promise.resolve(w).then(L)})}},[e,r]),Lr(function(){return function(){h()}},[]),[p,r]});Et();Et();var cx=(function(e){var n=Kt(),a=Kt(e);a.current=e;var t=BD(function(i){a.current(i)},[]);function r(i){i&&(i.removeEventListener(n3,t),i.removeEventListener(e3,t))}function u(i){n.current&&n.current!==i&&r(n.current),i&&i!==n.current&&(i.addEventListener(n3,t),i.addEventListener(e3,t),n.current=i)}return Lr(function(){return function(){r(n.current)}},[]),[u,r]});function o3(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,R=t.motionLeaveImmediately,E=t.onAppearPrepare,w=t.onEnterPrepare,I=t.onLeavePrepare,L=t.onAppearStart,U=t.onEnterStart,V=t.onLeaveStart,Q=t.onAppearActive,te=t.onEnterActive,le=t.onLeaveActive,ne=t.onAppearEnd,Z=t.onEnterEnd,ee=t.onLeaveEnd,me=t.onVisibleChanged,We=Xf(),Qe=Hr(We,2),dn=Qe[0],qn=Qe[1],Mn=Xf(S0),An=Hr(Mn,2),Hn=An[0],Ia=An[1],Da=Xf(null),ha=Hr(Da,2),Rt=ha[0],_t=ha[1],Ha=Kt(!1),Tr=Kt(null);function Xe(){return a()}var Wa=Kt(!1);function At(jt){var W=Xe();if(!(jt&&!jt.deadline&&jt.target!==W)){var X=Wa.current,k;Hn===VR&&X?k=ne==null?void 0:ne(W,jt):Hn===QR&&X?k=Z==null?void 0:Z(W,jt):Hn===KR&&X&&(k=ee==null?void 0:ee(W,jt)),Hn!==S0&&X&&k!==!1&&(Ia(S0,!0),_t(null,!0))}}var zn=cx(At),Un=Hr(zn,1),Ze=Un[0],Ma=JD(function(){var jt,W,X;switch(Hn){case VR:return jt={},cl(jt,ls,E),cl(jt,Yf,L),cl(jt,C0,Q),jt;case QR:return W={},cl(W,ls,w),cl(W,Yf,U),cl(W,C0,te),W;case KR:return X={},cl(X,ls,I),cl(X,Yf,V),cl(X,C0,le),X;default:return{}}},[Hn]),Ja=lx(Hn,function(jt){if(jt===ls){var W=Ma[ls];return W?W(Xe()):r3}if(In in Ma){var X;_t(((X=Ma[In])===null||X===void 0?void 0:X.call(Ma,Xe(),null))||null)}return In===C0&&(Ze(Xe()),p>0&&(clearTimeout(Tr.current),Tr.current=setTimeout(function(){At({deadline:!0})},p))),ix}),pt=Hr(Ja,2),tr=pt[0],In=pt[1],Oa=tT(In);Wa.current=Oa,aT(function(){qn(n);var jt=Ha.current;if(Ha.current=!0,!!e){var W;!jt&&n&&l&&(W=VR),jt&&n&&u&&(W=QR),(jt&&!n&&h||!jt&&R&&!n&&h)&&(W=KR),W&&(Ia(W),tr())}},[n]),Lr(function(){(Hn===VR&&!l||Hn===QR&&!u||Hn===KR&&!h)&&Ia(S0)},[l,u,h]),Lr(function(){return function(){Ha.current=!1,clearTimeout(Tr.current)}},[]);var dr=Kt(!1);Lr(function(){dn&&(dr.current=!0),dn!==void 0&&Hn===S0&&((dr.current||dn)&&(me==null||me(dn)),dr.current=!0)},[dn,Hn]);var za=Rt;return Ma[ls]&&In===Yf&&(za=at({transition:"none"},za)),[Hn,In,za,dn!=null?dn:n]}Et();var HFe=(function(e){Ch(a,e);var n=Fh(a);function a(){return Th(this,a),n.apply(this,arguments)}return Sh(a,[{key:"render",value:function(){return this.props.children}}]),a})(Mp),sx=HFe;function JFe(e){var n=e;To(e)==="object"&&(n=e.transitionSupport);function a(r){return!!(r.motionName&&n)}var t=rc(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,R=r.children,E=r.motionName,w=r.leavedClassName,I=r.eventProps,L=a(r),U=Kt(),V=Kt();function Q(){try{return U.current instanceof HTMLElement?U.current:zR(V.current)}catch{return null}}var te=o3(L,l,Q,r),le=Hr(te,4),ne=le[0],Z=le[1],ee=le[2],me=le[3],We=Kt(me);me&&(We.current=!0);var Qe=BD(function(Da){U.current=Da,XL(u,Da)},[u]),dn,qn=at(at({},I),{},{visible:l});if(!R)dn=null;else if(ne===S0||!a(r))me?dn=R(at({},qn),Qe):!h&&We.current?dn=R(at(at({},qn),{},{className:w}),Qe):p?dn=R(at(at({},qn),{},{style:{display:"none"}}),Qe):dn=null;else{var Mn,An;Z===ls?An="prepare":tT(Z)?An="active":Z===Yf&&(An="start"),dn=R(at(at({},qn),{},{className:(0,vx.default)(a3(E,ne),(Mn={},cl(Mn,a3(E,"".concat(ne,"-").concat(An)),An),cl(Mn,E,typeof E=="string"),Mn)),style:ee}),Qe)}if(ZG(dn)&&YI(dn)){var Hn=dn,Ia=Hn.ref;Ia||(dn=kD(dn,{ref:Qe}))}return nr(sx,{ref:V},dn)});return t.displayName="CSSMotion",t}var rT=JFe(eT);Et();var oT="add",uT="keep",iT="remove",cT="removed";function qFe(e){var n;return e&&To(e)==="object"&&"key"in e?n=e:n={key:e},at(at({},n),{},{key:String(n.key)})}function lT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(qFe)}function fx(){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=lT(e),i=lT(n);u.forEach(function(h){for(var p=!1,R=t;R1});return s.forEach(function(h){a=a.filter(function(p){var R=p.key,E=p.status;return R!==h||E!==iT}),a.forEach(function(p){p.key===h&&(p.status=uT)})}),a}var $Fe=["component","children","onVisibleChanged","onAllRemoved"],WFe=["status"],xFe=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function jFe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rT,a=(function(t){Ch(u,t);var r=Fh(u);function u(){var i;Th(this,u);for(var l=arguments.length,s=new Array(l),h=0;h=0&&a.left>=0&&a.bottom>a.top&&a.right>a.left?a:null}function dGe(e,n,a,t){var r=Tt.clone(e),u={width:n.width,height:n.height};return t.adjustX&&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+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)),Tt.mix(r,u)}function h3(e){var n,a,t;if(!Tt.isWindow(e)&&e.nodeType!==9)n=Tt.offset(e),a=Tt.outerWidth(e),t=Tt.outerHeight(e);else{var r=Tt.getWindow(e);n={left:Tt.getWindowScrollLeft(r),top:Tt.getWindowScrollTop(r)},a=Tt.viewportWidth(r),t=Tt.viewportHeight(r)}return n.width=a,n.height=t,n}function Ex(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 fT(e,n,a,t,r){var u=Ex(n,a[1]),i=Ex(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 Ix(e,n,a){return e.lefta.right}function Tx(e,n,a){return e.topa.bottom}function hGe(e,n,a){return e.left>a.right||e.left+n.widtha.bottom||e.top+n.height=a.right||t.top>=a.bottom}function gT(e,n,a){var t=a.target||n,r=h3(t),u=!DGe(t,a.overflow&&a.overflow.alwaysByViewport);return Ox(e,r,a,u)}gT.__getOffsetParent=_3;gT.__getVisibleRectForElement=d3;function Ux(e,n,a){var t,r,u=Tt.getDocument(e),i=u.defaultView||u.parentWindow,l=Tt.getWindowScrollLeft(i),s=Tt.getWindowScrollTop(i),h=Tt.viewportWidth(i),p=Tt.viewportHeight(i);"pageX"in n?t=n.pageX:t=l+n.clientX,"pageY"in n?r=n.pageY:r=s+n.clientY;var R={left:t,top:r,width:0,height:0},E=t>=0&&t<=l+h&&r>=0&&r<=s+p,w=[a.points[0],"cc"];return Ox(e,R,dx(dx({},a),{},{points:w}),E)}var EQ=pl(vQ());var _Q=(function(){if(typeof Map<"u")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__;r0},e.prototype.connect_=function(){!U3||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),j3e?(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(){!U3||!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=x3e.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})(),pQ=(function(e,n){for(var a=0,t=Object.keys(n);a"u"||!(Element instanceof Object))){if(!(n instanceof Bh(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)||(a.set(n,new nPe(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>"u"||!(Element instanceof Object))){if(!(n instanceof Bh(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 aPe(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})(),dQ=typeof WeakMap<"u"?new WeakMap:new _Q,hQ=(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=z3e.getInstance(),t=new tPe(n,a,this);dQ.set(this,t)}return e})();["observe","unobserve","disconnect"].forEach(function(e){hQ.prototype[e]=function(){var n;return(n=dQ.get(this))[e].apply(n,arguments)}});var rPe=(function(){return typeof ET.ResizeObserver<"u"?ET.ResizeObserver:hQ})(),gQ=rPe;function DQ(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 RQ(e,n){e!==document.activeElement&&gm(n,e)&&typeof e.focus=="function"&&e.focus()}function k3(e,n){var a=null,t=null;function r(i){var l=Hr(i,1),s=l[0].target;if(document.documentElement.contains(s)){var h=s.getBoundingClientRect(),p=h.width,R=h.height,E=Math.floor(p),w=Math.floor(R);(a!==E||t!==w)&&Promise.resolve().then(function(){n({width:E,height:w})}),a=E,t=w}}var u=new gQ(r);return e&&u.observe(e),function(){u.disconnect()}}Et();var yQ=(function(e,n){var a=vt.useRef(!1),t=vt.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 wQ(e){return typeof e!="function"?null:e()}function bQ(e){return To(e)!=="object"||!e?null:e}var oPe=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,R=vt.useRef({}),E=vt.useRef(),w=vt.Children.only(t),I=vt.useRef({});I.current.disabled=r,I.current.target=u,I.current.align=i,I.current.onAlign=l;var L=yQ(function(){var Z=I.current,ee=Z.disabled,me=Z.target,We=Z.align,Qe=Z.onAlign;if(!ee&&me){var dn=E.current,qn,Mn=wQ(me),An=bQ(me);R.current.element=Mn,R.current.point=An,R.current.align=We;var Hn=document,Ia=Hn.activeElement;return Mn&&px(Mn)?qn=gT(dn,Mn,We):An&&(qn=Ux(dn,An,We)),RQ(Ia,dn),Qe&&qn&&Qe(dn,qn),!0}return!1},p),U=Hr(L,2),V=U[0],Q=U[1],te=vt.useRef({cancel:function(){}}),le=vt.useRef({cancel:function(){}});vt.useEffect(function(){var Z=wQ(u),ee=bQ(u);E.current!==le.current.element&&(le.current.cancel(),le.current.element=E.current,le.current.cancel=k3(E.current,V)),(R.current.element!==Z||!DQ(R.current.point,ee)||!(0,EQ.default)(R.current.align,i))&&(V(),te.current.element!==Z&&(te.current.cancel(),te.current.element=Z,te.current.cancel=k3(Z,V)))}),vt.useEffect(function(){r?Q():V()},[r]);var ne=vt.useRef(null);return vt.useEffect(function(){s?ne.current||(ne.current=T0(window,"resize",V)):ne.current&&(ne.current.remove(),ne.current=null)},[s]),vt.useEffect(function(){return function(){te.current.cancel(),le.current.cancel(),ne.current&&ne.current.remove(),Q()}},[]),vt.useImperativeHandle(a,function(){return{forceAlign:function(){return V(!0)}}}),vt.isValidElement(w)&&(w=vt.cloneElement(w,{ref:KI(w.ref,E)})),w},IQ=vt.forwardRef(oPe);IQ.displayName="Align";var TQ=IQ;var SQ=TQ;Et();var uPe=qv()?HD:Lr,B3=uPe;var NQ=pl(Dm());function ST(e,n){this.v=e,this.k=n}function Vu(e,n,a,t){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Vu=function(i,l,s,h){function p(R,E){Vu(i,R,function(w){return this._invoke(R,E,w)})}l?r?r(i,l,{value:s,enumerable:!h,configurable:!h,writable:!h}):i[l]=s:(p("next",0),p("throw",1),p("return",2))},Vu(e,n,a,t)}function vy(){var e,n,a=typeof Symbol=="function"?Symbol:{},t=a.iterator||"@@iterator",r=a.toStringTag||"@@toStringTag";function u(w,I,L,U){var V=I&&I.prototype instanceof l?I:l,Q=Object.create(V.prototype);return Vu(Q,"_invoke",(function(te,le,ne){var Z,ee,me,We=0,Qe=ne||[],dn=!1,qn={p:0,n:0,v:e,a:Mn,f:Mn.bind(e,4),d:function(Hn,Ia){return Z=Hn,ee=0,me=e,qn.n=Ia,i}};function Mn(An,Hn){for(ee=An,me=Hn,n=0;!dn&&We&&!Ia&&n3?(Ia=Rt===Hn)&&(me=Da[(ee=Da[4])?5:(ee=3,3)],Da[4]=Da[5]=e):Da[0]<=ha&&((Ia=An<2&&haHn||Hn>Rt)&&(Da[4]=An,Da[5]=Hn,qn.n=Rt,ee=0))}if(Ia||An>1)return i;throw dn=!0,Hn}return function(An,Hn,Ia){if(We>1)throw TypeError("Generator is already running");for(dn&&Hn===1&&Mn(Hn,Ia),ee=Hn,me=Ia;(n=ee<2?e:me)||!dn;){Z||(ee?ee<3?(ee>1&&(qn.n=-1),Mn(ee,me)):qn.n=me:qn.v=me);try{if(We=2,Z){if(ee||(An="next"),n=Z[An]){if(!(n=n.call(Z,me)))throw TypeError("iterator result is not an object");if(!n.done)return n;me=n.value,ee<2&&(ee=0)}else ee===1&&(n=Z.return)&&n.call(Z),ee<2&&(me=TypeError("The iterator does not provide a '"+An+"' method"),ee=1);Z=e}else if((n=(dn=qn.n<0)?me:te.call(le,qn))!==i)break}catch(Da){Z=e,ee=1,me=Da}finally{We=1}}return{value:n,done:dn}}})(w,L,U),!0),Q}var i={};function l(){}function s(){}function h(){}n=Object.getPrototypeOf;var p=[][t]?n(n([][t]())):(Vu(n={},t,function(){return this}),n),R=h.prototype=l.prototype=Object.create(p);function E(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,h):(w.__proto__=h,Vu(w,r,"GeneratorFunction")),w.prototype=Object.create(R),w}return s.prototype=h,Vu(R,"constructor",h),Vu(h,"constructor",s),s.displayName="GeneratorFunction",Vu(h,r,"GeneratorFunction"),Vu(R),Vu(R,r,"Generator"),Vu(R,t,function(){return this}),Vu(R,"toString",function(){return"[object Generator]"}),(vy=function(){return{w:u,m:E}})()}function Hh(e,n){function a(r,u,i,l){try{var s=e[r](u),h=s.value;return h instanceof ST?n.resolve(h.v).then(function(p){a("next",p,i,l)},function(p){a("throw",p,i,l)}):n.resolve(h).then(function(p){s.value=p,i(s)},function(p){return a("throw",p,i,l)})}catch(p){l(p)}}var t;this.next||(Vu(Hh.prototype),Vu(Hh.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Vu(this,"_invoke",function(r,u,i){function l(){return new n(function(s,h){a(r,i,s,h)})}return t=t?t.then(l,l):l()},!0)}function CT(e,n,a,t,r){return new Hh(vy().w(e,n,a,t),r||Promise)}function CQ(e,n,a,t,r){var u=CT(e,n,a,t,r);return u.next().then(function(i){return i.done?i.value:u.next()})}function FQ(e){var n=Object(e),a=[];for(var t in n)a.unshift(t);return function r(){for(;a.length;)if((t=a.pop())in n)return r.value=t,r.done=!1,r;return r.done=!0,r}}function H3(e){if(e!=null){var n=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],a=0;if(n)return n.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}}throw new TypeError(To(e)+" is not iterable")}function fy(){"use strict";var e=vy(),n=e.m(fy),a=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function t(i){var l=typeof i=="function"&&i.constructor;return!!l&&(l===a||(l.displayName||l.name)==="GeneratorFunction")}var r={throw:1,return:2,break:3,continue:3};function u(i){var l,s;return function(h){l||(l={stop:function(){return s(h.a,2)},catch:function(){return h.v},abrupt:function(R,E){return s(h.a,r[R],E)},delegateYield:function(R,E,w){return l.resultName=E,s(h.d,H3(R),w)},finish:function(R){return s(h.f,R)}},s=function(R,E,w){h.p=l.prev,h.n=l.next;try{return R(E,w)}finally{l.next=h.n}}),l.resultName&&(l[l.resultName]=h.v,l.resultName=void 0),l.sent=h.v,l.next=h.n;try{return i.call(this,l)}finally{h.p=l.prev,h.n=l.next}}}return(fy=function(){return{wrap:function(s,h,p,R){return e.w(u(s),h,p,R&&R.reverse())},isGeneratorFunction:t,mark:e.m,awrap:function(s,h){return new ST(s,h)},AsyncIterator:Hh,async:function(s,h,p,R,E){return(t(h)?CT:CQ)(u(s),h,p,R,E)},keys:FQ,values:H3}})()}function GQ(e,n,a,t,r,u,i){try{var l=e[u](i),s=l.value}catch(h){return void a(h)}l.done?n(s):Promise.resolve(s).then(t,r)}function MQ(e){return function(){var n=this,a=arguments;return new Promise(function(t,r){var u=e.apply(n,a);function i(s){GQ(u,t,r,i,l,"next",s)}function l(s){GQ(u,t,r,i,l,"throw",s)}i(void 0)})}}Et();var AQ=["measure","alignPre","align",null,"motion"],LQ=(function(e,n){var a=Xf(null),t=Hr(a,2),r=t[0],u=t[1],i=Kt();function l(p){u(p,!0)}function s(){dc.cancel(i.current)}function h(p){s(),i.current=dc(function(){l(function(R){switch(r){case"align":return"motion";case"motion":return"stable";default:}return R}),p==null||p()})}return Lr(function(){l("measure")},[e]),Lr(function(){r==="measure"&&n(),r&&(i.current=dc(MQ(fy().mark(function p(){var R,E;return fy().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:R=AQ.indexOf(r),E=AQ[R+1],E&&R!==-1&&l(E);case 3:case"end":return I.stop()}},p)}))))},[r]),Lr(function(){return function(){s()}},[]),[r,h]});Et();var PQ=(function(e){var n=As({width:0,height:0}),a=Hr(n,2),t=a[0],r=a[1];function u(l){r({width:l.offsetWidth,height:l.offsetHeight})}var i=JD(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 OQ=rc(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,R=e.align,E=e.point,w=e.getRootDomNode,I=e.getClassNameFromAlign,L=e.onAlign,U=e.onMouseEnter,V=e.onMouseLeave,Q=e.onMouseDown,te=e.onTouchStart,le=e.onClick,ne=Kt(),Z=Kt(),ee=As(),me=Hr(ee,2),We=me[0],Qe=me[1],dn=PQ(s),qn=Hr(dn,2),Mn=qn[0],An=qn[1];function Hn(){s&&An(w())}var Ia=LQ(a,Hn),Da=Hr(Ia,2),ha=Da[0],Rt=Da[1],_t=As(0),Ha=Hr(_t,2),Tr=Ha[0],Xe=Ha[1],Wa=Kt();B3(function(){ha==="alignPre"&&Xe(0)},[ha]);function At(){return E||w}function zn(){var In;(In=ne.current)===null||In===void 0||In.forceAlign()}function Un(In,Oa){var dr=I(Oa);We!==dr&&Qe(dr),Xe(function(za){return za+1}),ha==="align"&&(L==null||L(In,Oa))}B3(function(){ha==="align"&&(Tr<2?zn():Rt(function(){var In;(In=Wa.current)===null||In===void 0||In.call(Wa)}))},[Tr]);var Ze=at({},sT(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(In){var Oa=Ze[In];Ze[In]=function(dr,za){return Rt(),Oa==null?void 0:Oa(dr,za)}});function Ma(){return new Promise(function(In){Wa.current=In})}Lr(function(){!Ze.motionName&&ha==="motion"&&Rt()},[Ze.motionName,ha]),Gf(n,function(){return{forceAlign:zn,getElement:function(){return Z.current}}});var Ja=at(at({},Mn),{},{zIndex:l,opacity:ha==="motion"||ha==="stable"||!a?void 0:0,pointerEvents:!a&&ha!=="stable"?"none":void 0},u),pt=!0;R!=null&&R.points&&(ha==="align"||ha==="stable")&&(pt=!1);var tr=i;return Gp.count(i)>1&&(tr=nr("div",{className:"".concat(t,"-content")},i)),nr(Gh,pi({visible:a,ref:Z,leavedClassName:"".concat(t,"-hidden")},Ze,{onAppearPrepare:Ma,onEnterPrepare:Ma,removeOnLeave:h,forceRender:p}),function(In,Oa){var dr=In.className,za=In.style,jt=(0,NQ.default)(t,r,We,dr);return nr(SQ,{target:At(),key:"popup",ref:ne,monitorWindowResize:!0,disabled:pt,align:R,onAlign:Un},nr("div",{ref:Oa,className:jt,onMouseEnter:U,onMouseLeave:V,onMouseDownCapture:Q,onTouchStartCapture:te,onClick:le,style:at(at({},za),Ja)},tr))})});OQ.displayName="PopupInner";var UQ=OQ;Et();var kQ=pl(Dm()),BQ=rc(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,R=i.popupRender,E=e.onClick,w=Kt();Gf(n,function(){return{forceAlign:function(){},getElement:function(){return w.current}}});var I=at({zIndex:r},s),L=u;return Gp.count(u)>1&&(L=nr("div",{className:"".concat(a,"-content")},u)),R&&(L=R(L)),nr(Gh,pi({visible:t,ref:w,removeOnLeave:!0},p),function(U,V){var Q=U.className,te=U.style,le=(0,kQ.default)(a,l,Q);return nr("div",{ref:V,className:le,onClick:E,style:at(at({},te),I)},L)})});BQ.displayName="MobilePopupInner";var HQ=BQ;var iPe=["visible","mobile"],JQ=rc(function(e,n){var a=e.visible,t=e.mobile,r=hm(e,iPe),u=As(a),i=Hr(u,2),l=i[0],s=i[1],h=As(!1),p=Hr(h,2),R=p[0],E=p[1],w=at(at({},r),{},{visible:l});Lr(function(){s(a),a&&t&&E(XW())},[a,t]);var I=R?nr(HQ,pi({},w,{mobile:t,ref:n})):nr(UQ,pi({},w,{ref:n}));return nr("div",null,nr(u3,w),I)});JQ.displayName="Popup";var qQ=JQ;Et();var lPe=YG(null),J3=lPe;function q3(){}function cPe(){return""}function sPe(e){return e?e.ownerDocument:window.document}var vPe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function fPe(e){var n=(function(a){Ch(r,a);var t=Fh(r);function r(u){var i;Th(this,r),i=t.call(this,u),i.popupRef=g1(),i.triggerRef=g1(),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&&gm((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(),R=i.getPopupDomNode();(!gm(p,h)||i.isContextMenuOnly())&&!gm(R,h)&&!i.hasPopupMouseDown&&i.close()}},i.getRootDomNode=function(){var s=i.props.getTriggerDOMNode;if(s)return s(i.triggerRef.current);try{var h=zR(i.triggerRef.current);if(h)return h}catch{}return oc.findDOMNode(kI(i))},i.getPopupClassNameFromAlign=function(s){var h=[],p=i.props,R=p.popupPlacement,E=p.builtinPlacements,w=p.prefixCls,I=p.alignPoint,L=p.getPopupClassNameFromAlign;return R&&E&&h.push(zW(E,w,s,I)),L&&h.push(L(s)),h.join(" ")},i.getComponent=function(){var s=i.props,h=s.prefixCls,p=s.destroyPopupOnHide,R=s.popupClassName,E=s.onPopupAlign,w=s.popupMotion,I=s.popupAnimation,L=s.popupTransitionName,U=s.popupStyle,V=s.mask,Q=s.maskAnimation,te=s.maskTransitionName,le=s.maskMotion,ne=s.zIndex,Z=s.popup,ee=s.stretch,me=s.alignPoint,We=s.mobile,Qe=s.forceRender,dn=s.onPopupClick,qn=i.state,Mn=qn.popupVisible,An=qn.point,Hn=i.getPopupAlign(),Ia={};return i.isMouseEnterToShow()&&(Ia.onMouseEnter=i.onPopupMouseEnter),i.isMouseLeaveToHide()&&(Ia.onMouseLeave=i.onPopupMouseLeave),Ia.onMouseDown=i.onPopupMouseDown,Ia.onTouchStart=i.onPopupMouseDown,nr(qQ,pi({prefixCls:h,destroyPopupOnHide:p,visible:Mn,point:me&&An,className:R,align:Hn,onAlign:E,animation:I,getClassNameFromAlign:i.getPopupClassNameFromAlign},Ia,{stretch:ee,getRootDomNode:i.getRootDomNode,style:U,mask:V,zIndex:ne,transitionName:L,maskAnimation:Q,maskTransitionName:te,maskMotion:le,ref:i.popupRef,motion:w,mobile:We,forceRender:Qe,onClick:dn}),typeof Z=="function"?Z():Z)},i.attachParent=function(s){dc.cancel(i.attachId);var h=i.props,p=h.getPopupContainer,R=h.getDocument,E=i.getRootDomNode(),w;p?(E||p.length===0)&&(w=p(E)):w=R(i.getRootDomNode()).body,w?w.appendChild(s):i.attachId=dc(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},vPe.forEach(function(s){i["fire".concat(s)]=function(h){i.fireEvents(s,h)}}),i}return Sh(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=T0(s,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(s=s||i.getDocument(this.getRootDomNode()),this.touchOutsideHandler=T0(s,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(s=s||i.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=T0(s,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=T0(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),dc.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?jW(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 R=s?{pageX:s.pageX,pageY:s.pageY}:null;this.delayTimer=window.setTimeout(function(){h.setPopupVisible(i,R),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,R=l.className,E=l.autoDestroy,w=Gp.only(s),I={key:"trigger"};this.isContextMenuToShow()?I.onContextMenu=this.onContextMenu:I.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(I.onClick=this.onClick,I.onMouseDown=this.onMouseDown,I.onTouchStart=this.onTouchStart):(I.onClick=this.createTwoChains("onClick"),I.onMouseDown=this.createTwoChains("onMouseDown"),I.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(I.onMouseEnter=this.onMouseEnter,p&&(I.onMouseMove=this.onMouseMove)):I.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?I.onMouseLeave=this.onMouseLeave:I.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(I.onFocus=this.onFocus,I.onBlur=this.onBlur):(I.onFocus=this.createTwoChains("onFocus"),I.onBlur=this.createTwoChains("onBlur"));var L=(0,$Q.default)(w&&w.props&&w.props.className,R);L&&(I.className=L);var U=at({},I);YI(w)&&(U.ref=KI(this.triggerRef,w.ref));var V=kD(w,U),Q;return(i||this.popupRef.current||h)&&(Q=nr(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!i&&E&&(Q=null),nr(J3.Provider,{value:this.triggerContextValue},V,Q)}}],[{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})(Mp);return n.contextType=J3,n.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:cPe,getDocument:sPe,onPopupVisibleChange:q3,afterPopupVisibleChange:q3,onPopupAlign:q3,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 WQ=fPe(xW);var cs={adjustX:1,adjustY:1},ss=[0,0],xQ={left:{points:["cr","cl"],overflow:cs,offset:[-4,0],targetOffset:ss},right:{points:["cl","cr"],overflow:cs,offset:[4,0],targetOffset:ss},top:{points:["bc","tc"],overflow:cs,offset:[0,-4],targetOffset:ss},bottom:{points:["tc","bc"],overflow:cs,offset:[0,4],targetOffset:ss},topLeft:{points:["bl","tl"],overflow:cs,offset:[0,-4],targetOffset:ss},leftTop:{points:["tr","tl"],overflow:cs,offset:[-4,0],targetOffset:ss},topRight:{points:["br","tr"],overflow:cs,offset:[0,-4],targetOffset:ss},rightTop:{points:["tl","tr"],overflow:cs,offset:[4,0],targetOffset:ss},bottomRight:{points:["tr","br"],overflow:cs,offset:[0,4],targetOffset:ss},rightBottom:{points:["bl","br"],overflow:cs,offset:[4,0],targetOffset:ss},bottomLeft:{points:["tl","bl"],overflow:cs,offset:[0,4],targetOffset:ss},leftBottom:{points:["br","bl"],overflow:cs,offset:[-4,0],targetOffset:ss}};Et();var jQ=pl(Dm());function FT(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 nr("div",{className:(0,jQ.default)("".concat(r,"-content"),l),style:s},n!==!1&&nr("div",{className:"".concat(r,"-arrow"),key:"arrow"},a),nr("div",{className:"".concat(r,"-inner"),id:u,role:"tooltip",style:i},typeof t=="function"?t():t))}var _Pe=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,R=n.prefixCls,E=R===void 0?"rc-tooltip":R,w=n.children,I=n.onVisibleChange,L=n.afterVisibleChange,U=n.transitionName,V=n.animation,Q=n.motion,te=n.placement,le=te===void 0?"right":te,ne=n.align,Z=ne===void 0?{}:ne,ee=n.destroyTooltipOnHide,me=ee===void 0?!1:ee,We=n.defaultVisible,Qe=n.getTooltipContainer,dn=n.overlayInnerStyle,qn=n.arrowContent,Mn=n.overlay,An=n.id,Hn=n.showArrow,Ia=hm(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),Da=Kt(null);Gf(a,function(){return Da.current});var ha=at({},Ia);"visible"in n&&(ha.popupVisible=n.visible);var Rt=function(){return nr(FT,{showArrow:Hn,arrowContent:qn,key:"content",prefixCls:E,id:An,overlayInnerStyle:dn},Mn)},_t=!1,Ha=!1;if(typeof me=="boolean")_t=me;else if(me&&To(me)==="object"){var Tr=me.keepParent;_t=Tr===!0,Ha=Tr===!1}return nr(WQ,pi({popupClassName:t,prefixCls:E,popup:Rt,action:u,builtinPlacements:xQ,popupPlacement:le,ref:Da,popupAlign:Z,getPopupContainer:Qe,onPopupVisibleChange:I,afterPopupVisibleChange:L,popupTransitionName:U,popupAnimation:V,popupMotion:Q,defaultPopupVisible:We,destroyPopupOnHide:_t,autoDestroy:Ha,mouseLeaveDelay:h,popupStyle:p,mouseEnterDelay:l},ha),w)},zQ=rc(_Pe);var VQ=zQ;var KQ=e=>vt.createElement(VQ,Object.assign({},e,{overlayClassName:`cv-tooltip ${e.overlayClassName}`,getTooltipContainer:e.tooltipContainerSelector?(()=>document.querySelector(e.tooltipContainerSelector)||document.body):void 0}));if(typeof window<"u"&&typeof global>"u")try{Promise.resolve().then(()=>pl(QQ(),1)).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)}var RPe=uc();var YQ="click";var GT="top",Jh=function(e){var n=RPe(e);return function(){return function(){return n(KQ)}}};var XQ="right";var ZQ=e=>()=>e.preventDefault&&e.preventDefault();var W3=function(){return ZQ};var bPe=ht();var x3=ae(nn),j3=sr(bPe($({reflectSymbol:function(){return"value"}})(Ee)(mn))),z3=x(ka);var MT=function(e){return ze("")(x3(j3(bo(e.target)))(function(n){return z3(n.value)}))},V3=function(e){return ze("")(x3(j3(bo(e.target)))(function(n){return z3(n.value)}))},Zf=function(e){return ze("")(x3(j3(bo(e.target)))(function(n){return z3(n.value)}))};var eK="/network/connections";var nK=15;var CPe=Jh(on)()(),FPe=Ft(Ce),GPe=(function(){return"You\u2019ve hit the "+(oe(pn)(nK)+`-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. `)})(),MPe=qu(on)("text-decoration-underline")(ro(ie)()()("text-dark")(vn)({href:eK})("Manage my connections")),aK=function(e){return function(n){return CPe({placement:e,trigger:YQ,overlay:FPe("")([cn(GPe),MPe]),overlayStyle:Yt({width:"15rem"}),overlayClassName:"t--connection-limit-tooltip"})(n)}};var tK=ae(nn),qh=function(e){var n=tK(e.guestPresenter)(function(a){if(a instanceof gR)return new T(a.value0);if(a instanceof DR)return G.value;throw new Error("Failed pattern match at Livestream.Utils (line 19, column 29 - line 21, column 38): "+[a.constructor.name])});return tK(n)(function(a){return new T({name:a.school.name,id:a.school.id})})};var LPe=(function(){function e(){}return e.value=new e,e})(),PPe=(function(){function e(){}return e.value=new e,e})(),K3=(function(){function e(){}return e.value=new e,e})(),NPe=(function(){function e(){}return e.value=new e,e})(),OPe=(function(){function e(){}return e.value=new e,e})(),UPe=(function(){function e(){}return e.value=new e,e})(),rK=function(e){if(e instanceof LPe)return"account_settings_page";if(e instanceof PPe)return"preference_survey";if(e instanceof K3)return"livestream_registration";if(e instanceof NPe)return"chancing_wizard_network_step";if(e instanceof OPe)return"main_profile_page";if(e instanceof UPe)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 zPe=kv(Ov),Y3=Ws(zPe),X3=ae(Na);var VPe=eu(),uK=ge(ue);var iK=Y3("profile_visibility_path")(function(e){return function(n){return X3(e({visibility:{publish_scope:bR(n)}}))(to)}}),lK=function(){return Y3("profile_network_settings_path")(function(e){return function(n){return(function(a){return X3(e({network_settings:{publish_scope:bR(a.publishScope),publish_context:rK(a.publishContext),automatic_accept_requests_for_school_list:a.autoAcceptForSchoolList,automatic_connection_requests_from_livestreams:a.autoRequestFromLivestreams,livestream:et(uK(Ll(a.livestreamConference))(function(t){return{school_name:et(uK(qh(t))(function(r){return r.name})),title:t.title,id:t.id}}))}}))(to)})(VPe(n))}})},cK=Y3("profile_name_path")(function(e){return function(n){return X3(e({name:n}))(to)}});var QPe=js(),KPe=vu(ie),YPe=jr(ie),Z3=xr(ie),eP=zc(ie),F0=Pe(Ce),$h=ga(ie)()(),XPe=fn(ln),nP=Pl(Hv),bm=Pe(on),vK=Ol(),ZPe=Z_(ie),eNe=yo(Je)(cr),fK=su()(),aP=Pl(Dh),nNe=zd()(),_K=Pe(ie),aNe=G1(Ce),tP=N1(ie),tNe=Ft(ie),rNe=Jh(on)()(),oNe=xr(Ce),uNe=ro(ie)()(),iNe=Ht(ie),Em=x(Bn),pK=XPe(da),lNe=CI(),py=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),mK=(function(){function e(){}return e.value=new e,e})(),dK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),hK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),gK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),DK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),my=(function(){function e(){}return e.value=new e,e})(),rP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),RK=function(e){return function(n){var a=function(h){return QPe({id:"invite-school-modal",body:h,title:KPe("my-0")((function(){return e.stage instanceof Z1?"Join the CollegeVine network":"Connect with "+e.schoolName})()),headerClass:"pb-0",onDismiss:n(new Jn(my.value)),size:HR.value})},t=n9(e.context),r=Oe([YPe("mt-3")("Review your message before you send it"),Z3("mt-2")(` Because this is your first message to the counselor, we want to make sure you\u2019re ready to send. `),eP("mt-4")("Your message"),sh(e.message),F0("d-flex mt-4 justify-content-start")([$h("btn btn-primary btn-lg t--sem-user-connection-modal-confirm-message-"+t)(vn)({onClick:un(function(h){return function(){return n(new Jn(new rP({introMessage:e.message})))(),n(new Ue(new py(zM.value)))()}})})("Send"),$h("btn btn-lg btn-outline-primary ml-3 text-nowrap")(vn)({onClick:nP(n)(new Ue(new py(iR.value)))})("No, I need to edit something")])]),u=Oe([F0("text-center")([bm("")(vK("mt-4")({src:"/img/checkmate-icon.png",alt:Nl.value,height:"80",width:"80"})),ZPe("mt-4")("Connection request sent!"),Z3("mx-md-4")(eNe(["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."])),$h("btn btn-lg btn-outline-secondary mt-4")(vn)({onClick:nP(n)(new Jn(my.value))})("Close")])]),i=$h("btn btn-outline-secondary ml-3 t--sem-user-connection-modal-close-"+t)(vn)({onClick:nP(n)(new Jn(my.value))})("Cancel"),l=(function(){var h=$M(e.message)&&(function(){if(e.profile.fullName instanceof T)return!0;if(e.profile.fullName instanceof G)return!lc(e.firstName)&&!lc(e.lastName);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 248, column 9 - line 252, column 82): "+[e.profile.fullName.constructor.name])})(),p=(function(){if(e.vineBelowConnectionLimit instanceof T&&e.vineBelowConnectionLimit.value0)return!1;if(e.vineBelowConnectionLimit instanceof T&&!e.vineBelowConnectionLimit.value0)return!0;if(e.vineBelowConnectionLimit instanceof G)return!1;throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 241, column 7 - line 244, column 25): "+[e.vineBelowConnectionLimit.constructor.name])})();return Oe([Qa(Rr(e.profile.fullName))(Oe([eP("mt-md-4")("Your preferred name"),F0("form-row mx-1")([fK("col form-control mr-2 t--sem-user-connection-modal-first-name-"+t)({type:"text",value:e.firstName,onChange:aP(n)(function(R){return Ue.create(gK.create(Zf(R)))}),placeholder:"First name"}),fK("col form-control ml-2 t--sem-user-connection-modal-last-name-"+t)({type:"text",value:e.lastName,onChange:aP(n)(function(R){return Ue.create(DK.create(Zf(R)))}),placeholder:"Last name"})])])),eP("mt-md-4")("Your message"),nNe("form-control t--sem-user-connection-modal-text-area-"+t)({rows:7,value:e.message,onChange:aP(n)(function(R){return Ue.create(hK.create(MT(R)))}),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! `}),bm("mt-2")(V5(e.message)),_K("mt-3 mt-md-4 small")("The ideal connection message should include:"),aNe("small")([tP("")("Your name, where you\u2019re from, and a bit about who you are"),tP("")("What you\u2019re interested in studying along with one or two insightful questions"),tP("")("That you\u2019re eager to connect with an admissions counselor and would love to stay in touch")]),F0("d-flex mt-4 justify-content-start")([aK(GT)(bm("")($h("btn btn-primary btn-lg t--sem-user-connection-modal-connect-"+t)(vn)({onClick:un(function(R){return function(){return(function(){if(e.profile.fullName instanceof T)return void 0;if(e.profile.fullName instanceof G)return n(new Ue(new dK({first:e.firstName,last:e.lastName})))();throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 222, column 23 - line 227, column 77): "+[e.profile.fullName.constructor.name])})(),n(new Ue(new py(jM.value)))()}}),disabled:!h||p,style:Yt({pointerEvents:(function(){return p?"none":"auto"})()})})("Connect"))),i])])})(),s=F0("mx-md-7")([bm("border border-success rounded p-4 my-4")(F0("row align-items-center")([bm("col-12 col-md-auto text-center text-md-left")(vK("img-fluid")({src:"/img/network/publish-profile-icon.png",alt:Nl.value,height:"67",width:"143"})),bm("col text-center text-md-left")(tNe("fw-bold font-weight-bold text-gray-800")("Network with verified admissions counselors on CollegeVine"))])),F0("d-flex flex-nowrap align-items-center")([_K("mr-4")("Publish your profile to join the CollegeVine Network"),rNe({placement:XQ,overlay:oNe("")([cn(` 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 `),uNe("")(vn)({href:rW})("your profile"),cn(".")]),overlayStyle:Yt({width:"15rem"})})(iNe("cursor-default text-secondary fe fe-info large")(""))]),Z3("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."),F0("d-flex mt-4 justify-content-start justify-content-md-center")([$h("btn btn-primary t--sem-user-connection-modal-publish-profile-"+t)(vn)({onClick:un(function(h){return function(){return n(new Ue(mK.value))(),n(new Ue(new py(iR.value)))()}})})("Publish profile"),i])]);return bm("t--network-sem-user-modal")((function(){if(e.stage instanceof Z1)return a(s);if(e.stage instanceof iR)return a(l);if(e.stage instanceof jM)return a(r);if(e.stage instanceof zM)return a(u);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 95, column 5 - line 99, column 38): "+[e.stage.constructor.name])})())}},yK=function(e){return function(n){if(n instanceof Ue){if(n.value0 instanceof py)return Em({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 mK)return pK(Ut(iK(_c.value)))(function(){return Em({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:_c.value}})});if(n.value0 instanceof dK)return pK(Ut(cK(n.value0.value0)))(function(){return Em({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 T(kL(n.value0.value0))}})});if(n.value0 instanceof hK)return Em({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 gK)return Em({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 DK)return Em({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 74, column 31 - line 88, column 39): "+[n.value0.constructor.name])}if(n instanceof Jn)return Em(e);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 73, column 1 - line 73, column 55): "+[e.constructor.name,n.constructor.name])}},cNe=function(e){var n=wW(e);return n?iR.value:Z1.value},wK=function(e){return{firstName:"",lastName:"",message:"",profile:lNe(e.profile),stage:cNe(e.profile),schoolName:e.schoolName,context:e.context,vineBelowConnectionLimit:e.vineBelowConnectionLimit}};var AT=be(qr(Dr)),vNe=eu(),fNe=Pe(on),_Ne=Ol(),oP=Ft(ie),uP=zr(on)()(),pNe=Ht(ie),mNe=Jv(),dNe=cm(ln)(),hNe=kn(qe),gNe=ga(Ce)()(),DNe=W3(),RNe=tt(uo),Wh=(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})(),iP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),lP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),bK=(function(){function e(){}return e.value=new e,e})(),yNe=(function(){function e(){}return e.value=new e,e})(),wNe={eq:function(e){return function(n){return e instanceof Wh&&n instanceof Wh?e.value0.url===n.value0.url:e instanceof dy&&n instanceof dy?AT(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.initials===n.value0.initials&&AT(e.value0.textColorClass)(n.value0.textColorClass):e instanceof iP&&n instanceof iP?AT(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.iconClass===n.value0.iconClass:e instanceof lP&&n instanceof lP?AT(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.name===n.value0.name:!1}}},bNe=yh(wNe),EK=function(){return function(e){var n=vNe(e),a=(function(){var r=Za(n.shape)(bK.value);if(r instanceof bK)return"rounded-circle";if(r instanceof yNe)return"rounded";throw new Error("Failed pattern match at Dashkit.Avatar (line 134, column 5 - line 136, column 33): "+[r.constructor.name])})(),t=function(r){return fNe("avatar "+(vW(Za(n.size)(NI.value))+(" "+Za(n.className)(""))))((function(){if(r instanceof Wh)return _Ne("avatar-img img-fluid "+(a+(" "+Za(n.borderClassName)(""))))({src:r.value0.url,alt:new NR(Bq(Za(n.ariaLabel)(vn)))});if(r instanceof dy)return oP("avatar-title font-weight-bold fw-bold "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+(ze("")(r.value0.textColorClass)+(" "+Za(n.borderClassName)(""))))))))(r.value0.initials);if(r instanceof iP)return uP("avatar-title "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+Za(n.borderClassName)(""))))))({"aria-label":Za(n.ariaLabel)(vn)})(pNe(r.value0.iconClass)(""));if(r instanceof lP)return uP("avatar-title "+(a+(" "+(ze("")(r.value0.backgroundColorClass)+(" "+Za(n.borderClassName)(""))))))({"aria-label":Za(n.ariaLabel)(vn)})(oP("material-symbol")(r.value0.name));throw new Error("Failed pattern match at Dashkit.Avatar (line 89, column 7 - line 131, column 44): "+[r.constructor.name])})())};return Rh(mNe(is(n.source))(function(r){return dNe(bNe(n.source)(function(u){return hNe(r.value1(u))}))(function(){return xf(Oe([t(r.value0),(function(){return r.value0 instanceof Wh?ja(Ll(n.hideAvatar))(function(u){return uP("hq-only-menu-item")({style:Yt({marginTop:"-50px",marginLeft:"200px"})})(gNe("btn btn-sm btn-warning mb-4 t--hide-avatar")(vn)({onClick:un(function(i){return function(){return DNe(i)(),RNe(r.value1)(u)()}})})([oP("badge badge-info bg-info text-dark mr-2")("HQ"),cn("Hide")]))}):Aa})()]))})}))}};var INe=EK();var IK=function(e){return function(n){return INe({source:(function(){if(e.avatarUrl instanceof T)return new Wh({url:e.avatarUrl.value0});if(e.avatarUrl instanceof G)return new dy({initials:e.initials,backgroundColorClass:G.value,textColorClass:G.value});throw new Error("Failed pattern match at Sem.Utils (line 15, column 15 - line 23, column 14): "+[e.avatarUrl.constructor.name])})(),size:n})}};var cP=B(ue),SNe=tn(T8(V0));var TK=function(e){var n=function(a){return ze("")(cP(Vi)(RD(0)(a)))};return Iv((function(){var a=Wu(" ")(e);return a.length===2?n(a[0])+n(a[1]):a.length===1?n(a[0]):a.length===0?"":ze("?")(SNe(cP(n)(mp(a)))(cP(n)(hd(a))))})())},SK=function(e){return Zd(e.firstName+(" "+e.lastName))};var sP=vu(ie),FNe=ro(ie)()(),GNe=ro(Ce)()(),CK=Ht(ie),MNe=ga(Ce)()(),ANe=$i(Ct)(iu),LNe=ge(ue),PNe=ae(nn),vP=Pe(ie),LT=Pe(Ce),FK=Pe(on),NNe=Kd(ie),GK=Ps()(),ONe=zc(ie),UNe=xr(ie),xh=x(Bn),PK=fn(ln),kNe=PK(da),BNe=nt(qe),HNe=PK(Na),JNe=x(ba),qNe=$t(Lo(st)),MK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),hy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),AK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),LK=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),NK=(function(){var e=function(a){return function(t){return function(r){var u=sP("text-primary")(t.semUser.firstName+(" from "+(t.semUser.school.name+" sent you a connection request!"))),i=sP("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question or introduce yourself!")),l=[u,FNe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-view-pending-invitation-from-sem-user")(vn)({href:jL(new Ih(t.semUser.id))})("View Message")],s=SK(t.semUser),h=TK(s),p=sP("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question!")),R=[p,GNe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-messages-link")(vn)({href:jL(new Ih(t.semUser.id))})([CK("fe fe-message-square mr-2 large")(""),cn("Send a message to "+t.semUser.firstName)])],E=function(L){return MNe("btn btn-primary d-flex align-items-center justify-content-center t--livestream-details-connect-with-sem-user")(vn)({onClick:un(function(U){return ANe(r)(LNe(PNe(a.currentUser)(function(V){return V.profile}))(AK.create))}),disabled:L.isDisabled})([CK("fe fe-message-square mr-2 large")(""),cn("Connect with "+t.semUser.firstName)])},w=[i,E({isDisabled:!1})],I=[i,E({isDisabled:!0}),vP("mt-4 text-secondary small")("Invitation pending")];return LT("t--livestream-details-guest-presenter-sem-user mb-4")([ja(a.currentUser)(function(L){return Qa(L.hasAccessToNetwork&&t.semUser.school.allowedToContact)(FK("card")(LT("card-body")((function(){if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof u0)return R;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Hs&&t.semUser.connection.value0.initiator instanceof kf||t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Bf&&t.semUser.connection.value0.initiator instanceof kf)return I;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Hs&&t.semUser.connection.value0.initiator instanceof Uf)return l;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Bf&&t.semUser.connection.value0.initiator instanceof Uf||t.semUser.connection instanceof G)return w;throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 95, column 17 - line 105, column 53): "+[t.semUser.connection.constructor.name])})())))}),NNe("text-uppercase text-secondary")("Your guest presenter"),LT("row align-items-center mt-4")([FK("col-auto")(IK(GK(t.semUser)({initials:h}))(PI.value)),LT("col")([ONe("mb-1")(s),vP("text-secondary small")(t.semUser.school.name),vP("text-secondary small")(t.semUser.title)]),ja(t.semUser.bio)(function(L){return UNe("mt-4 mb-2 ml-2")(L)})]),ja(t.modal)(function(L){return RK(L.value0)(function(U){return r(hy.create(U))})})])}}},n=function(a){return function(t){return function(r){if(r instanceof hy&&r.value0 instanceof Jn){if(r.value0.value0 instanceof my)return xh({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:G.value});if(r.value0.value0 instanceof rP)return kNe(BNe(HNe(FW(t.semUser.school.id)(t.semUser.id)({introMessage:r.value0.value0.value0.introMessage}))(function(){return JNe(new LK({introMessage:r.value0.value0.value0.introMessage}))})))(function(){return xh(t)});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 49, column 53 - line 56, column 17): "+[r.value0.value0.constructor.name])}if(t.modal instanceof T&&r instanceof hy&&r.value0 instanceof Ue)return qNe(hy.create)(function(u){return{currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new MK(u))}})(yK(t.modal.value0.value0)(new Ue(r.value0.value0)));if(r instanceof hy&&r.value0 instanceof Ue)return xh(t);if(r instanceof AK)return xh({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new MK(wK({schoolName:a.semUser.school.name,context:xM.value,profile:r.value0,vineBelowConnectionLimit:a.vineBelowConnectionLimit})))});if(r instanceof LK)return xh({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 T({initiator:kf.value,introMessage:r.value0.introMessage,status:Hs.value})}});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 48, column 3 - line 48, column 65): "+[a.constructor.name,t.constructor.name,r.constructor.name])}}};return Af("Livestream Guest Presenter SEM user")(function(a){return{init:xh(GK(a)({modal:G.value})),view:e(a),update:n(a)}})})();var WNe=Ft(Ce),xNe=Ht(ie),gy=Pe(Ce),OK=Kd(ie),jNe=B(Ye),fP=Pe(on),zNe=jc()(),VNe=vu(ie),UK=function(e){return function(n){var a=function(i){return WNe("badge badge-light bg-light text-dark mr-3")([xNe("fe fe-tag mr-2")(""),cn(i.name)])},t=function(i){return function(l){return gy("mb-3")([OK("text-secondary text-uppercase mb-2")(i),l])}},r=gy("mt-4")([ja(he(n.entity.shortEducation))(function(i){return t("Education")(cn(i))}),t("Bio")(sh(n.entity.bio)),GA(xi(n.entity.tags))(t("Specialties")(Oe(jNe(a)(n.entity.tags))))]),u=gy("row")([ja(he(n.entity.imageUrl))(function(i){return fP("p-0 m-0")(fP("col-auto my-auto")(fP("avatar avatar-md")(zNe("avatar-img rounded-circle")({src:i,alt:n.entity.name}))))}),gy("col-auto my-auto")([OK("text-uppercase text-secondary mb-2")("Advisor"),VNe("m-0")(n.entity.name)])]);return gy("mt-4 mt-md-0 t--service-provider-guest-presenter")([u,r])}};var Dy=function(e){return function(n){return function(a){return function(t){if(n instanceof gR)return NK({semUser:n.value0,currentUser:a,vineBelowConnectionLimit:t.vineBelowConnectionLimit});if(n instanceof DR)return UK(e)(n.value0);throw new Error("Failed pattern match at Livestream.GuestPresenter.GuestPresenter (line 15, column 1 - line 15, column 78): "+[e.constructor.name,n.constructor.name,a.constructor.name,t.constructor.name])}}}};var KNe=ro(Ce)()(),YNe=Ht(ie),jh=Pe(ie),gc=Pe(on),Dc=Pe(Ce),HK=vu(ie),JK=jc()(),qK=ge(Ye),XNe=Ft(ie),BK=ge(ue),ZNe=xr(Ce),$K=qu(ie),WK=ro(ie)()(),e4e=oe(pn),Ry=B(ue),n4e=Qd(Ce)()(),a4e=oe($s),yy=function(e){var n=function(a){return function(t){return KNe("mr-3")(vn)({href:t,target:"_blank"})([cn(a),YNe("fe fe-external-link ml-1")("")])}};return Oe([jh("text-uppercase text-muted small mb-2")("School information"),gc("card shadow-none")(Dc("card-body")([HK("mb-1")(e.name),jh("text-uppercase small text-secondary")(e.cityState),Dc("mt-3 d-none d-md-block")([n("Stats")(LI(mm.value)(e.slug)),n("Cost")(LI(xR.value)(e.slug)),n("Map")(LI(mm.value)(e.slug))]),Dc("mt-3 d-md-none")([n("Stats")(PL(mm.value)(e.slug)),n("Cost")(PL(xR.value)(e.slug))])]))])},t4e=function(e){var n=function(i){return JK("avatar-img rounded-circle")({src:i,alt:e.fullName})},a=vo(" ")(qK(Wu(" ")(e.fullName))(rl(1))),t=XNe("avatar-title rounded-circle text-uppercase")(a),r=function(i){return ze("")(BK(i)(function(l){return" '"+l}))},u=function(i){return function(l){return ZNe("")([$K("")(i+": "),cn(l)])}};return Oe([jh("text-uppercase text-muted small mb-2")("Your host"),Dc("row align-items-center mb-4 pr-4")([gc("col-auto")(gc("avatar")(Wn(t)(n)(e.pictureUrl))),gc("col")(Dc("row align-items-center justify-content-between")([jh("col-12 col-md-auto x-large")(e.fullName),gc("col-12 col-md-auto")(ja(e.allStreamsUrl)(function(i){return WK("t--host-streams")(vn)({href:i})("See all "+(e4e(e.totalStreams)+(" streams by "+e.firstName)))}))]))]),Oe(ri([Ry(u("Undergrad College"))(BK(e.undergrad.college)(function(i){return i+r(e.undergrad.year)})),Ry(u("Major"))(e.undergrad.major),Ry(u("Graduate College"))(e.gradCollege),Ry(u("Work Experience"))(e.workExperience),Ry(u("My Admissions Story"))(e.admissionsStory)]))])},r4e=function(e){return Oe([jh("text-uppercase text-muted small mb-2")("Description"),Dc("")([gc("col-6 col-md-4 float-right")(JK("img-fluid rounded")({src:e.imageUrl,alt:e.title})),Dc("")(qK(Wu(` `)(e.description))(function(n){return n4e("")({dangerouslySetInnerHTML:{__html:n}})([])}))])])},o4e=function(e){var n=e.paths.collegeFair+("?utm_cv_source=banner-livestream-watch-"+a4e(e.conference.id));return gc("card mt-3")(gc("card-body py-3")(Dc("row align-items-center")([gc("col-12 col-md-auto mb-3 mb-md-0")(jh("bg-warning rounded px-3 py-1 small mt-2 mt-md-0")("SPECIAL EVENT")),Dc("col-12 col-md mb-3 mb-md-0")([cn("This livestream was part of the "),$K("")("\u{1F3AA} Student panel college fair"),cn(". Recordings for all 100+ Q&A panels are available.")]),gc("col-12 col-md-auto")(WK("btn btn-sm btn-outline-primary px-3")(vn)({href:n})("See all recordings"))])))},PT=function(e){var n=(function(){if(e.conference.presenter instanceof T&&e.conference.guestPresenter instanceof T||e.conference.presenter instanceof T&&e.conference.guestPresenter instanceof G||e.conference.presenter instanceof G&&e.conference.guestPresenter instanceof T)return"col-12 col-md-6";if(e.conference.presenter instanceof G&&e.conference.guestPresenter instanceof G)return"col-12";throw new Error("Failed pattern match at Livestream.AboutLivestream (line 52, column 14 - line 56, column 33): "+[e.conference.presenter.constructor.name,e.conference.guestPresenter.constructor.name])})();return Oe([Qa(e.conference.collegeFair)(o4e(e)),gc("card")(Dc("card-body")([HK("text-center mb-4")("About this livestream"),Dc("row")([Dc(n)([ja(e.conference.school)(function(a){return gc("d-md-none")(yy(a))}),r4e(e.conference)]),Dc(n)([ja(e.conference.guestPresenter)(function(a){return Dy(e.conference.id)(a)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit})}),ja(e.conference.school)(function(a){return gc("d-none d-md-block")(yy(a))}),ja(e.conference.presenter)(t4e)])])]))])};var KK=fn(ln),u4e=KK(da),i4e=nt(qe),l4e=Mr(Yo),jK=x(ba),$T=x(Bn),c4e=KK(Na),NT=x(ka),zK=Pe(ie),OT=zc(ie),UT=Y_(Ce),kT=V_(Ce),G0=Lf(Ce),vs=Q_(ie),BT=K_(Ce),HT=ge(Ye),M0=Us(ie),JT=Us(on),qT=ga(ie)()(),s4e=zl(ot),v4e=B(Ye),f4e=tn(__(__(cb))),_4e=zl(Gl),p4e=zl(hB),m4e=oe($s),d4e=jr(ie),h4e=Pe(Ce),WT=(function(){function e(){}return e.value=new e,e})(),YK=(function(){function e(){}return e.value=new e,e})(),wy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),VK=(function(){function e(){}return e.value=new e,e})(),QK=(function(){function e(){}return e.value=new e,e})(),XK=function(e){return function(n){return function(a){var t=function(u){return u4e(i4e(l4e(u)(function(i){return jK(QK.value)})))(function(){return $T({ctas:n.ctas,stage:YK.value,error:G.value})})},r=function(u){if(u instanceof ns)return Cq({fromConference:e.conference.id,cta:u.value0.conferenceId});if(u instanceof as)return Tq({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof ts)return Sq({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof rs)return Iq({fromConference:e.conference.id,ctaId:u.value0.id});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 227, column 13 - line 235, column 81): "+[u.constructor.name])};if(a instanceof wy)return t(c4e(r(a.value0))(function(){return jK(VK.value)}));if(a instanceof VK)return $T({ctas:n.ctas,error:n.error,stage:WT.value});if(a instanceof QK)return $T({ctas:n.ctas,stage:WT.value,error:new T("That didn't work for some reason, try again")});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 210, column 24 - line 220, column 92): "+[a.constructor.name])}}},ZK=function(e){return $T({stage:WT.value,error:G.value,ctas:e})},g4e=(function(){return xu(Bu(Je)([Js.value,new ar(" "),Xc.value,new ar(", "),Zc.value,new ar(":"),Al.value,new ar(" "),es.value]))})(),eY=function(e){return function(n){if(e.ctas.length===0)return Aa;var a=function(L){return L instanceof rs?NT(L.value0):G.value},t=function(L){return L instanceof as?NT(L.value0):G.value},r=function(L){return L instanceof ts?NT(L.value0):G.value},u=function(L){return L instanceof ns?NT(L.value0):G.value},i=(function(){if(e.stage instanceof WT)return Aa;if(e.stage instanceof YK)return zK("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 188, column 22 - line 194, column 21): "+[e.stage.constructor.name])})(),l=function(L){return L.length===0?Aa:Oe([OT("")("Referrals"),UT("table table-sm mb-0")([kT("")([G0("")([vs("")("Title"),vs("")("Actions")])]),BT("")(HT(L)(function(U){return G0("t--cta t--cta-referral")([M0("pt-3")(U.title),JT("text-nowrap")(qT("btn btn-white btn-sm px-4 t--open")(vn)({onClick:un(function(V){return n(new wy(new rs(U)))})})("Launch CTA"))])}))])])},s=function(L){return L.length===0?Aa:Oe([OT("")("General"),UT("table table-sm mb-0")([kT("")([G0("")([vs("")("Title"),vs("")("URL"),vs("")("Link Text"),vs("")("Actions")])]),BT("")(HT(S_(s4e(function(U){return U.title}))(L))(function(U){return G0("t--cta t--cta-general")([M0("pt-3")((function(){var V=Fr(U.autoDisplayMinutesFromStart);return V?"\u23F0 ":""})()+U.title),M0("pt-3")(U.url),M0("pt-3")(U.buttonText),JT("text-nowrap")(qT("btn btn-white btn-sm px-4 t--open")(vn)({onClick:un(function(V){return n(new wy(new as(U)))})})("Launch CTA"))])}))])])},h=function(L){return L.length===0?Aa:Oe([OT("")("Featured Service Providers"),UT("table table-sm mb-0")([kT("")([G0("")([vs("")("Advisors"),vs("")("Link Text"),vs("")("Actions")])]),BT("")(HT(L)(function(U){return G0("t--cta t--cta-featured-sp")([M0("pt-3")(vo(", ")(v4e(function(V){return V.name})(U.providers))),M0("pt-3")(U.linkText),JT("text-nowrap")(qT("btn btn-white btn-sm px-4 t--open")(vn)({onClick:un(function(V){return n(new wy(new ts(U)))})})("Launch CTA"))])}))])])},p=function(L){return L.length===0?Aa:Oe([OT("")("Upcoming events"),UT("table table-sm mb-0")([kT("")([G0("")([vs("")("Livestream"),vs("")("Date & Time"),vs("")("Actions")])]),BT("")(HT(S_(f4e(_4e(function(U){return U.startTime}))(p4e(function(U){return U.conferenceId})))(L))(function(U){return G0("t--cta t--cta-stream-"+m4e(U.conferenceId))([M0("pt-3")(U.title),M0("pt-3")(g4e(U.startTime)+(" "+Xp)),JT("text-nowrap")(qT("btn btn-white btn-sm px-4 t--open")(vn)({onClick:un(function(V){return n(new wy(new ns(U)))})})("Launch CTA"))])}))])])},R=zo(a)(e.ctas),E=zo(t)(e.ctas),w=zo(r)(e.ctas),I=zo(u)(e.ctas);return Oe([d4e("")("Calls to action"),h4e("t--ctas position-relative")([ja(e.error)(function(L){return zK("alert alert-danger")(L)}),p(I),s(E),h(w),l(R),i])])}};var nY=Ws(kv(Ov)),aY=ae(Na),R4e=g2(Ee),zh=(function(){function e(){}return e.value=new e,e})(),by=(function(){function e(){}return e.value=new e,e})(),Ey=(function(){function e(){}return e.value=new e,e})(),tY={eq:function(e){return function(n){return e instanceof zh&&n instanceof zh||e instanceof by&&n instanceof by||e instanceof Ey&&n instanceof Ey}}},rY=nY("profile_validate_username_path")(function(e){return function(n){return aY(e({username:n}))(Uv(function(a){return R4e("username validation result")(a)(function(t){return t==="available"?new T(zh.value):t==="taken"?new T(by.value):t==="invalid"?new T(Ey.value):G.value})}))}}),oY=nY("profile_set_username_path")(function(e){return function(n){return aY(e({username:n}))(to)}});var w4e=be(qr(nv()(Rs(Rs(ev)()({reflectSymbol:function(){return"username"}})(Dr))()({reflectSymbol:function(){return"result"}})(tY)))),_P=Pe(Ce),uY=Pe(on),b4e=xr(ie),E4e=Ol(),Iy=Pe(ie),I4e=su()(),iY=ga(ie)()(),T4e=Sr(Ct),pP=fn(ln)(da),S4e=Sr(Bn),mP=nt(qe),C4e=jl(st),Im=x(Bn),F4e=B(st),G4e=ae(Na),M4e=M_(Yo),lY=x(ba),fY=(function(){function e(){}return e.value=new e,e})(),_Y=(function(){function e(){}return e.value=new e,e})(),pY=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),cY=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),sY=(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})(),mY=(function(){function e(){}return e.value=new e,e})(),vY=(function(){function e(){}return e.value=new e,e})(),dP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),hP=(function(){function e(){}return e.value=new e,e})(),dY=function(e){return function(n){var a=e.username!==""&&Rr(e.updating)&&w4e(e.validated)(new T({username:e.username,result:zh.value}));return Oe([_P("row")([uY("col col-md-6")(b4e("")("This username will keep your identity private in CollegeVine communities, livestreams, and on peer essay review leaderboards.")),uY("col-6 d-none d-md-block")(E4e("img-fluid")({alt:Nl.value,src:"/img/illustrations/clipboards.svg"}))]),Iy("")("Your username:"),_P("input-group")([I4e("form-control")({autoFocus:!0,type:"text",value:e.username,onChange:un(function(t){return n(new Ue(new pY(Zf(t))))})})]),_P("d-flex mt-3")([iY("btn btn-light mr-3")(vn)({onClick:un(function(t){return n(new Jn(hP.value))})})("Cancel"),iY("btn btn-primary t--submit-username")(vn)({type:"button",disabled:!a,onClick:un(function(t){return T4e(a)(n(new Ue(mY.value)))})})("Save")]),ja(e.validated)(function(t){if(t.result instanceof zh)return Aa;if(t.result instanceof by)return Iy("small text-danger")("Sorry, this username is already taken");if(t.result instanceof Ey)return Iy("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 74, column 39 - line 81, column 99): "+[t.result.constructor.name])}),ja(e.updating)(function(t){if(t instanceof fY)return Iy("text-success")("Updating your username...");if(t instanceof _Y)return Iy("small text-danger")("There was an error saving your username. Please try again.");throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 82, column 32 - line 86, column 97): "+[t.constructor.name])})])}},hY=function(e){return function(n){if(n instanceof Ue){if(n.value0 instanceof pY)return pP(S4e(n.value0.value0!=="")(mP(C4e(Wr(100))(new Ue(new cY(n.value0.value0))))))(function(){return Im({updating:e.updating,validated:e.validated,username:n.value0.value0})});if(n.value0 instanceof cY){if(n.value0.value0===e.username)return pP(mP(F4e((function(){var a=sY.create(n.value0.value0);return function(t){return Ue.create(a(t))}})())(rY(n.value0.value0))))(function(){return Im({username:e.username,validated:G.value,updating:G.value})});if($e)return Im(e)}if(n.value0 instanceof sY)return Im({updating:e.updating,username:e.username,validated:new T({username:n.value0.value0,result:n.value0.value1})});if(n.value0 instanceof mY)return pP(mP(G4e(M4e(oY(e.username)))(function(a){if(a instanceof Le)return lY(new Jn(new dP(e.username)));if(a instanceof Me)return lY(new Ue(vY.value));throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 114, column 7 - line 118, column 48): "+[a.constructor.name])})))(function(){return Im({username:e.username,validated:G.value,updating:new T(fY.value)})});if(n.value0 instanceof vY)return Im({username:e.username,validated:e.validated,updating:new T(_Y.value)});throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 95, column 31 - line 122, column 48): "+[n.value0.constructor.name])}if(n instanceof Jn)return Im(e);throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 94, column 1 - line 94, column 55): "+[e.constructor.name,n.constructor.name])}},gY=function(e){return{username:e,validated:G.value,updating:G.value}};var L4e=eu(),P4e=Jh(on)()(),N4e=Ft(Ce),O4e=Ht(ie),U4e=function(e){var n=KD(e);return function(){return function(a){return function(t){var r=L4e(a);return P4e({placement:GT,overlay:Oe(n(t)),overlayStyle:Za(r.overlayStyle)(Yt({width:"15rem"}))})(N4e("d-inline-flex align-items-center text-secondary "+r.className)([O4e("d-inline-block fe fe-help-circle "+(function(){var u=r.anchorText==="";return u?"":"mr-2"})())(""),cn(r.anchorText)]))}}}},xT=function(e){var n=U4e(e)();return function(a){return n({className:a,anchorText:""})}};var RY=oa(ra),Ty=ta(RY)(Zn(Xn)),yY=na(ea),Sy=aa(yY),wY=la(ia),Cy=ua(wY),k4e=B(ue),Vh=(function(){function e(){}return e.value=new e,e})(),Qh=(function(){function e(){}return e.value=new e,e})(),Kh=(function(){function e(){}return e.value=new e,e})(),Yh=(function(){function e(){}return e.value=new e,e})(),Xh=(function(){function e(){}return e.value=new e,e})(),Tm=(function(){function e(){}return e.value=new e,e})(),B4e={to:function(e){if(e instanceof Se)return Vh.value;if(e instanceof fe&&e.value0 instanceof Se)return Qh.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof Se)return Kh.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof Se)return Yh.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof fe&&e.value0.value0.value0.value0 instanceof Se)return Xh.value;if(e instanceof fe&&e.value0 instanceof fe&&e.value0.value0 instanceof fe&&e.value0.value0.value0 instanceof fe&&e.value0.value0.value0.value0 instanceof fe)return Tm.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 Vh)return new Se(je.value);if(e instanceof Qh)return new fe(new Se(je.value));if(e instanceof Kh)return new fe(new fe(new Se(je.value)));if(e instanceof Yh)return new fe(new fe(new fe(new Se(je.value))));if(e instanceof Xh)return new fe(new fe(new fe(new fe(new Se(je.value)))));if(e instanceof Tm)return new fe(new fe(new fe(new fe(new fe(je.value)))));throw new Error("Failed pattern match at Common.Persona (line 21, column 1 - line 21, column 34): "+[e.constructor.name])}},bY=Qn(B4e)(Ty(Ty(Ty(Ty(Ty(RY)(yY))(Sy))(Sy))(Sy))(Sy))(Cy(Cy(Cy(Cy(Cy(wY))))))(Sy);var H4e={eq:function(e){return function(n){return e instanceof Vh&&n instanceof Vh||e instanceof Qh&&n instanceof Qh||e instanceof Kh&&n instanceof Kh||e instanceof Yh&&n instanceof Yh||e instanceof Xh&&n instanceof Xh||e instanceof Tm&&n instanceof Tm}}},jT=function(e){if(e instanceof Vh)return"student";if(e instanceof Qh)return"transfer_student";if(e instanceof Kh)return"counselor";if(e instanceof Yh)return"iec";if(e instanceof Xh)return"parent";if(e instanceof Tm)return"sem_user";throw new Error("Failed pattern match at Common.Persona (line 40, column 13 - line 46, column 24): "+[e.constructor.name])},EY=(function(){var e=Vn(jT)(bY);return Ga(sn)({parse:function(n){return n==="unknown"?new T(G.value):k4e(T.create)(e(n))},default:G.value,diagnosticName:"User Persona"})})(),IY=function(e){if(e instanceof Vh)return"Student";if(e instanceof Qh)return"Transfer Student";if(e instanceof Kh)return"High School Counselor";if(e instanceof Yh)return"Independent Educational Counselor (IEC)";if(e instanceof Xh)return"Parent";if(e instanceof Tm)return"SEM User";throw new Error("Failed pattern match at Common.Persona (line 30, column 11 - line 36, column 24): "+[e.constructor.name])},TY=(function(){return C_(H4e)(Tm.value)(bY)})();function SY(){typeof fbq>"u"||fbq("trackCustom","LivestreamRegistrationComplete")}var $4e=x(Ct),W4e=hR(!1);var zT=function(e){if(dR(W4e))return $4e(void 0);if($e)return SY;throw new Error("Failed pattern match at Livestream.Upcoming.Register.Tracking (line 13, column 1 - line 13, column 53): "+[e.constructor.name])};var DP=B(eo);var gP=ae(Ri),x4e=x(uv),j4e=ni(B8);var FY=function(e){return e},GY=function(e){return function(n){return DP(function(a){return a.result})(e({substring:n,position:0}))}};var xv={map:function(e){return function(n){var a=DP(function(t){return{result:e(t.result),suffix:t.suffix}});return function(t){return a(n(t))}}}},Sm=function(e){return function(n){return new Me({pos:n.position,error:e})}},Cm={apply:function(e){return function(n){return function(a){return gP(e(a))(function(t){return gP(n(t.suffix))(function(r){return x4e({result:t.result(r.result),suffix:r.suffix})})})}}},Functor0:function(){return xv}};var e_={bind:function(e){return function(n){return function(a){return gP(e(a))(function(t){return FY(n(t.result))(t.suffix)})}}},Apply0:function(){return Cm}};var n_={pure:function(e){return function(n){return new Le({result:e,suffix:n})}},Apply0:function(){return Cm}};var z4e={Applicative0:function(){return n_},Bind1:function(){return e_}},MY={tailRecM:function(e){return function(n){var a=function(t){if(t.result instanceof Kr)return new Kr({state:t.result.value0,str:t.suffix});if(t.result instanceof $r)return new $r({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 j4e(function(r){return DP(a)(FY(e(r.state))(r.str))})({state:n,str:t})}}},Monad0:function(){return z4e}};var Fm={alt:function(e){return function(n){return function(a){var t=e(a);if(t instanceof Me){if(a.position===t.value0.pos)return n(a);if($e)return new Me({error:t.value0.error,pos:t.value0.pos})}return t}}},Functor0:function(){return xv}},V4e={empty:Sm("No alternative"),Alt0:function(){return Fm}},AY={Applicative0:function(){return n_},Plus1:function(){return V4e}};var LY=La(Fm),RP=ae(e_),yP=x(n_),K4e=B(xv);var Y4e=Nu(Cm),X4e=va(Cm);var wP=function(e){return function(n){return LY(e)(Sm(n))}},bP=function(e){return function(n){var a=e(n);return a instanceof Me?new Me({pos:n.position,error:a.value0.error}):a}},jv=function(e){return LY(RP(e)(function(n){return yP(void 0)}))(yP(void 0))};var PY=function(e){return function(n){return new yl(e,n)}};var Z4e=function(e){return function(n){var a=e(n);if(a instanceof Le){var t=n.position65535;return t?e(n):kY(a.value0)}if(a instanceof G)return e(n);throw new Error("Failed pattern match at StringParser.CodePoints (line 57, column 3 - line 65, column 27): "+[a.constructor.name])})})(),A0=function(e){return bP(UY(r8e)(function(n){var a=e(n);return a?kY(n):Sm("Character "+(BY(n)+" did not satisfy predicate"))}))},Rc=function(e){return wP(A0(function(n){return n===e}))("Could not match character "+BY(e))};var u8e=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}},i8e=lr(),TP=B(xv),l8e=yo(pD)(cr),c8e=B(xb),Qu=fn(ln)(e_),Li=zt(xv),a_=x(n_),Bl=La(Fm);var Zh=Nu(Cm),L0=ae(e_),qY=yo(Vo)(cr);var Bo=function(e){return i8e(uE(e))},SP=function(e){return TP((function(){var n=c8e(Vi);return function(a){return l8e(n(a))}})())(NY(A0(e)))},$Y=function(e){return Qu(Li(e))(function(){return Qu(Li(QT(e)))(function(){return a_(void 0)})})},QT=function(e){return Bl($Y(e))(a_(void 0))},WY=function(e){return Qu(Li(A0(e)))(function(){return Qu(Li(QT(A0(e))))(function(){return a_(void 0)})})},s8e=Rc(Bo(0));var xY=Rc(` `),jY=function(e){return e===" "||e===" "},v8e=A0(jY),IP=WY(jY),f8e=function(e){var n=e>="0"&&e<="9",a=e>="a"&&e<="z"||e>="A"&&e<="Z";return n||a},zv=function(e){return function(n){return function(a){return a>=e&&a<=n}}},_8e=zv(Bo(33))(Bo(126)),p8e=A0(_8e),CP=function(e){return function(n){return dv(Vi(n))(e)}},KT=function(e){return zv(Bo(1))(Bo(8))(e)||zv(Bo(14))(Bo(31))(e)||CP("\v\f\x7F")(e)},m8e=function(e){return zv(Bo(33))(Bo(39))(e)||zv(Bo(42))(Bo(91))(e)||zv(Bo(93))(Bo(126))(e)||KT(e)},d8e=function(e){return zv(Bo(33))(Bo(90))(e)||zv(Bo(94))(Bo(126))(e)||KT(e)},h8e=A0(KT),g8e=function(e){return CP(Vi(Bo(33)))(e)||zv(Bo(35))(Bo(91))(e)||zv(Bo(93))(Bo(126))(e)||KT(e)};var zY=Rc("\r"),JY=Li(Zh(zY)(xY)),eg=(function(){var e=$Y(Zh(JY)(IP)),n=Zh(IP)(jv(Zh(JY)(IP)));return Bl(n)(e)})(),VY=(function(){var e=Qu(Li(Rc("\\")))(function(){return Bl(p8e)(Bl(v8e)(Bl(xY)(Bl(zY)(Bl(h8e)(s8e)))))});return L0(e)(function(n){return a_("\\"+Vi(n))})})(),D8e=Bl(SP(g8e))(VY),R8e=(function(){var e=Qu(Li(Rc('"')))(function(){return L0(Gm(Zh(jv(eg))(D8e)))(function(n){return Qu(Li(jv(eg)))(function(){return Qu(Li(Rc('"')))(function(){return a_(n)})})})});return TP(function(n){return'"'+(qY(n)+'"')})(e)})(),QY=u8e("comment","Text.Email.Parser",function(){return Qu(Li(Rc("(")))(function(){return Qu(QT(Bl(WY(m8e))(Bl(Li(VY))(Bl(QY(155))(eg)))))(function(){return Qu(Li(Rc(")")))(function(){return a_(void 0)})})})}),y8e=QY(152),VT=QT(Bl(y8e)(eg)),w8e=Qu(jv(VT))(function(){return Qu(Li(Rc("[")))(function(){return L0(Gm(Zh(jv(eg))(SP(d8e))))(function(e){return Qu(jv(eg))(function(){return Qu(Li(Rc("]")))(function(){return Qu(jv(VT))(function(){return a_("["+(qY(e)+"]"))})})})})})}),b8e=(function(){var e=function(n){return f8e(n)||CP("!#$%&'*+/=?^_`{|}~-")(n)};return SP(e)})(),KY=(function(){var e=Qu(Li(jv(VT)))(function(){return L0(Bl(b8e)(R8e))(function(a){return Qu(Li(jv(VT)))(function(){return a_(a)})})}),n=OY(e)(Rc("."));return TP(Pc(pD)(cr)("."))(n)})(),E8e=Bl(KY)(w8e),I8e=KY,FP=L0(I8e)(function(e){return L0(Rc("@"))(function(){return L0(E8e)(function(n){return L0(HY)(function(){return a_({localPart:e,domainPart:n})})})})});var C8e=function(e){return GY(FP)(e)},F8e=(function(){var e=wr(Du)(oe(D_()()(R_({reflectSymbol:function(){return"error"}})(y_({reflectSymbol:function(){return"pos"}})(pn))(ir))));return function(n){return e(C8e(n))}})(),Gy=function(e){var n=F8e(e);if(n instanceof Me)return!1;if(n instanceof Le)return!0;throw new Error("Failed pattern match at Text.Email.Validate (line 35, column 5 - line 37, column 25): "+[n.constructor.name])};var GP=qu(ie),YT=su()(),XY=L1(Ce)()(),ZY=ge(ue),eX=$i(Ct)(iu),nX=B(ue),XT=P1(ie)()(),aX=ge(Ye),My=Pe(Ce),G8e=yL(),MP=oe(pn),M8e=wb(Je)(Ot),A8e=e0(Ce)()(),Mm=Pe(on),tX=ga(ie)()(),L8e=oe($s),Ay=x(Bn),rX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),oX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),uX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),iX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),lX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ng=function(e){return function(n){return function(a){return function(t){var r=function(p){return function(R){return function(E){return function(w){return function(I){return function(L){return Oe([GP("")(R),YT("form-control")({type:"text",name:"livestream_public_registration_form["+(p+"]"),value:w,placeholder:E,autoFocus:L.autoFocus,onChange:un(function(U){return t(I(Zf(U)))})})])}}}}}},u=[GP("")("I'm a..."),XY("form-control")({name:"livestream_public_registration_form[i_am_a]",value:ze("")(ZY(a.persona)(jT)),onChange:un(function(p){return eX(t)(nX(lX.create)(EY(V3(p))))})})([Qa(Rr(a.persona))(XT("")({value:""})("Select one...")),Oe(aX(TY)(function(p){return XT("")({value:jT(p)})(IY(p))}))])],i=My("d-flex align-items-center")([cn("Already have an account? "),G8e({text:"Log in",className:"btn btn-link px-2",auth0ActiveTab:GI,openInNewTab:!1})]),l=[GP("")("Graduation year"),XY("form-control")({name:"livestream_public_registration_form[high_school_graduation_year]",value:ze("")(ZY(a.gradYear)(MP)),onChange:un(function(p){return eX(t)(nX(iX.create)(Ts(V3(p))))})})([Qa(Rr(a.gradYear))(XT("")({value:""})("Select one...")),Oe(aX(n.allowedGradYears)(function(p){return XT("")({value:MP(p)})(MP(p))}))])],s=ze({path:"",token:"",impersonationToken:""})(ZE("livestreams_register_path")),h=M8e([Gy(a.email),a.firstName!=="",a.lastName!=="",Fr(a.gradYear),Fr(a.persona)]);return Oe([i,A8e("")({action:s.path,method:"POST"})([Mm("row")(Mm("col")(r("email")("Email")("Your email")(a.email)(rX.create)({autoFocus:e.autoFocus}))),Mm("row mt-3")(Mm("col")(r("first_name")("First name")("Your first name")(a.firstName)(oX.create)({autoFocus:!1}))),Mm("row mt-3")(Mm("col")(r("last_name")("Last name")("Your last name")(a.lastName)(uX.create)({autoFocus:!1}))),My("row mt-3")([My("col-6")(l),My("col-6")(u)]),Mm("row mt-3")(My("col-12")([tX("btn btn-primary w-100 mt-3 t--register")(vn)({type:"submit",disabled:!h,onClick:un(function(p){return zT(void 0)})})("Register"),ja(e.cancelButton)(function(p){return tX("btn btn-outline-primary w-100 mt-3 t--cancel-registration")(vn)({type:"button",onClick:un(function(R){return p.click})})(p.text)})])),YT("")({type:"hidden",name:"authenticity_token",value:s.token}),YT("")({type:"hidden",name:"register_for_conference_id",value:L8e(n.conference.id)}),YT("")({type:"hidden",name:"utm_cv_source",value:n.paths.utmSource})])])}}}},ag=function(e){return function(n){if(n instanceof rX)return Ay({firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,email:n.value0});if(n instanceof oX)return Ay({email:e.email,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,firstName:n.value0});if(n instanceof uX)return Ay({email:e.email,firstName:e.firstName,gradYear:e.gradYear,persona:e.persona,lastName:n.value0});if(n instanceof iX)return Ay({email:e.email,firstName:e.firstName,lastName:e.lastName,persona:e.persona,gradYear:new T(n.value0)});if(n instanceof lX)return Ay({email:e.email,firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:new T(n.value0)});throw new Error("Failed pattern match at Livestream.Register.Anonymous (line 182, column 16 - line 192, column 36): "+[n.constructor.name])}},tg=(function(){return{email:"",firstName:"",lastName:"",gradYear:G.value,persona:G.value}})();var cX=Pe(Ce),P8e=xT(ie),N8e=ro(ie)()(),rg=function(e){return Oe([cX("")([cn(` For college information sessions, we may tell the college that you attended. You can opt out anytime in your profile. `),P8e("")(` 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. `)]),cX("")([cn(` By completing this registration form you agree to CollegeVine\u2019s Website Terms and Conditions, which can be found `),N8e("")(Vr("Open terms and conditions"))({href:e.paths.termsAndConditions})("here"),cn(".")])])};var PP={eq:function(e){return function(n){return e===n}}};var t_=fn(ln)(da),U8e=Gi(qe),sX=ht(),k8e=mc(sX($({reflectSymbol:function(){return"author"}})(sX($({reflectSymbol:function(){return"cvid"}})(Ee)($({reflectSymbol:function(){return"username"}})(Ee)(mn))))($({reflectSymbol:function(){return"id"}})(Dn)($({reflectSymbol:function(){return"isFromHQ"}})(ct)($({reflectSymbol:function(){return"isPublic"}})(ct)($({reflectSymbol:function(){return"text"}})(Ee)($({reflectSymbol:function(){return"time"}})(Ee)(mn))))))))(qe),ug=nt(qe),eS=x(ba),Ho=x(Bn),NP=js(),B8e=xr(Ce),OP=Ft(ie),UP=qu(ie),H8e=Ht(ie),Am=Pe(Ce),og=Pe(on),ZT=ga(ie)()(),Ly=Pe(ie),vX=jr(ie),dX=ge(Ye),J8e=zr(Ce)()(),q8e=Ft(Ce),hX=ae(nn),$8e=zd()(),W8e=$i(Ct)(iu),x8e=X_(Ce),j8e=su()(),z8e=xT(ie),V8e=be(qr(Dr)),Q8e=ge(ue),fX=ti(tJ(Di(Gl))),K8e=Ou(PP),_X=B(st),Y8e=tn(gr),X8e=bs(Je)(PP),pX=$t(Lo(st)),gX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),DX=(function(){function e(){}return e.value=new e,e})(),RX=(function(){function e(){}return e.value=new e,e})(),Lm=(function(){function e(){}return e.value=new e,e})(),nS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),aS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),tS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),yX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),wX=(function(){function e(){}return e.value=new e,e})(),kP=(function(){function e(){}return e.value=new e,e})(),BP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),bX=(function(){function e(){}return e.value=new e,e})(),mX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),HP=(function(){function e(){}return e.value=new e,e})(),rS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),oS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),EX=(function(){function e(){}return e.value=new e,e})(),ig=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Py=(function(){function e(){}return e.value=new e,e})();var IX=function(e){return t_(U8e(function(n){return Ue.create(BP.create(Zp(n)))})(k8e(e.pusher.dataChannel)("question")))(function(){return t_(ug(eS(new Ue(bX.value))))(function(){return Ho({newQuestionText:"",newQuestionBroadcast:!1,questions:[],modal:Lm.value})})})},TX=function(e){if(e.user instanceof G)return new T(new Ue(HP.value));if(e.user instanceof T&&e.user.value0.username instanceof G)return new T(new Ue(EX.value));if(e.user instanceof T&&e.user.value0.username instanceof T)return G.value;throw new Error("Failed pattern match at Livestream.Live.Questions (line 372, column 3 - line 378, column 14): "+[e.user.constructor.name])},Z8e=(function(){return xu(Bu(Je)([Zc.value,new ar(":"),Al.value,new ar(" "),es.value]))})(),SX=function(e){return function(n){return function(a){var t=function(s){return a(Ue.create(s))},r=function(s){return NP({id:"question-modal",onDismiss:t(Py.value),body:Oe([B8e("")([OP("")("By: "),UP("")("@"+s.author.username)]),H8e("")(s.text),ks(""),Am("row align-items-center mb-3")([og("col-4")(ZT("btn w-100 btn-"+(function(){return s.isPublic?"secondary":"success"})())(vn)({onClick:un(function(h){return t(new oS(DX.value))})})((function(){return s.isPublic?"Hide from audience":"Show to audience"})())),Ly("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."})())]),Am("row align-items-center")([og("col-4")(ZT("btn w-100 btn-danger")(vn)({onClick:un(function(h){return t(new oS(RX.value))})})("Ban this user")),Am("col")([cn("This user will not be able to ask any more questions "),UP("")("in this livestream. "),OP("text-danger")("There is no way to un-ban a user!")])])]),bodyClass:"t--question-modal",footer:Oe([ZT("btn btn-outline-primary px-4")(vn)({onClick:un(function(h){return t(Py.value)})})("Never mind, close this dialog")])})},u=function(s){return NP({id:"questions-registration-form-modal",onDismiss:t(Py.value),title:vX("")("Please introduce yourself to participate:"),bodyClass:"t--questions-registration-form",body:Oe([ng({cancelButton:G.value,autoFocus:!0})(e)(s)(function(h){return t(rS.create(h))}),og("small mt-3")(rg(e))])})},i=function(s){return NP({id:"questions-username-modal",onDismiss:t(Py.value),title:vX("")("Please select a user name"),body:dY(s)(function(h){return t(ig.create(h))}),bodyClass:"t--username-modal"})},l=function(s){var h=function(R){return function(E){return function(w){return Oe([Ly("ml-2 badge badge-"+E)(R),ja(w)(function(I){return Ly("ml-2 text-secondary")(Z8e(I))})])}}},p=s.isFromHQ&&s.isPublic;return p?h("CollegeVine")("success")(s.time):s.isPublic?h("Question")("warning")(G.value):Aa};return Oe([og("position-relative h-100")(og("d-flex flex-column position-absolute-fullsize")(Am("d-flex flex-column flex-grow-1 min-height-0")([Am("flex-grow-1 min-height-0 overflow-y-auto bg-white border rounded mb-2 p-2 t--questions-list")(dX(n.questions)(function(s){return J8e("p-1 t--question"+(function(){return e.isPrivilegedUser?" cursor-pointer":""})())({onClick:un(function(h){return t(new oS(new gX(s)))})})([q8e("small d-inline-flex align-items-center")([UP("")("@"+s.author.username),l(s),cn(":")]),OP("ml-1")(s.text)])})),Am("")([ja(hX(e.user)(function(s){return s.username}))(function(s){return Ly("small text-secondary mt-2")("@"+s)}),$8e("form-control t--question-text")({onChange:un(function(s){return t(new yX(MT(s)))}),onClick:un(function(s){return W8e(a)(TX(e))}),placeholder:"Ask a question...",rows:1,value:n.newQuestionText}),Qa(e.isPrivilegedUser)(og("form-check my-2")(x8e("form-check-label d-flex align-items-center t--broadcast-checkbox")([j8e("form-check-input mr-2 mt-0")({type:"checkbox",checked:n.newQuestionBroadcast,onChange:un(function(s){return t(wX.value)})}),Ly("badge badge-info bg-info text-dark mr-2")("HQ"),cn("Send to all viewers")]))),Am("d-flex justify-content-end align-items-center")([z8e("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. `),ZT("mt-2 px-5 btn-sm btn btn-primary t--submit-question")(vn)({onClick:un(function(s){return t(kP.value)}),disabled:n.newQuestionText===""})((function(){return n.newQuestionBroadcast?"Send to all":"Send to host"})())])])]))),(function(){if(n.modal instanceof Lm)return Aa;if(n.modal instanceof aS)return u(n.modal.value0);if(n.modal instanceof nS)return r(n.modal.value0);if(n.modal instanceof tS)return i(n.modal.value0);throw new Error("Failed pattern match at Livestream.Live.Questions (line 146, column 5 - line 150, column 41): "+[n.modal.constructor.name])})()])}}},e7e=function(e){return function(n){return V8e(Q8e(e.user)(function(a){return a.cvid}))(new T(n.author.cvid))||n.isPublic||e.isPrivilegedUser}},CX=function(e){return function(n){return function(a){if(a instanceof Jn)return Ho(n);if(a instanceof Ue){if(a.value0 instanceof yX){var t=TX(e);if(t instanceof T)return t_(ug(eS(t.value0)))(function(){return Ho(n)});if(t instanceof G)return Ho({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,questions:n.questions,newQuestionText:a.value0.value0});throw new Error("Failed pattern match at Livestream.Live.Questions (line 258, column 5 - line 263, column 46): "+[t.constructor.name])}if(a.value0 instanceof wX)return Ho({modal:n.modal,newQuestionText:n.newQuestionText,questions:n.questions,newQuestionBroadcast:!n.newQuestionBroadcast});var t=function(r){if(a.value0 instanceof kP)return t_(ug(eS(new Ue(HP.value))))(function(){return Ho(n)});if(a.value0 instanceof BP)return Ho({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:fX(function(l){return nI((function(s){return s.time})(l))})(yu(e7e(e))(wu(a.value0.value0)(yu((function(){var l=K8e(a.value0.value0.id);return function(s){return l((function(h){return h.id})(s))}})())(n.questions))))});if(a.value0 instanceof bX)return t_(ug(_X(function(l){return Ue.create(mX.create(l))})(mI(e.conference.id))))(function(){return Ho(n)});if(a.value0 instanceof mX){var u=dX(a.value0.value0)(function(l){return l.id});return Ho({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:fX(function(l){return nI((function(s){return s.time})(l))})(Y8e(a.value0.value0)(yu(function(l){return X8e(l.id)(u)})(n.questions)))})}if(a.value0 instanceof HP)return Ho({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new aS(tg)});var i=function(l){if(a.value0 instanceof rS)return Ho(n);if(a.value0 instanceof EX)return Ho({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new tS(gY(ze("")(hX(e.user)(function(h){return h.username}))))});if(a.value0 instanceof ig&&a.value0.value0 instanceof Jn&&a.value0.value0.value0 instanceof dP)return t_(ug(eS(new Jn(a.value0.value0.value0.value0))))(function(){return Ho({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Lm.value})});if(a.value0 instanceof ig&&a.value0.value0 instanceof Jn&&a.value0.value0.value0 instanceof hP)return Ho({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Lm.value});var s=function(h){if(a.value0 instanceof ig&&$e)return Ho(n);if(a.value0 instanceof Py)return Ho({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Lm.value});if(a.value0 instanceof oS){if(e.isPrivilegedUser){if(a.value0.value0 instanceof gX)return Ho({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new nS(a.value0.value0.value0)});var p=function(R){var E=function(w){return Ho(n)};return a.value0.value0 instanceof RX&&n.modal instanceof nS?t_(Ut(Aq({conferenceId:e.conference.id,userCvid:n.modal.value0.author.cvid})))(function(){return Ho({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Lm.value})}):E(!0)};return a.value0.value0 instanceof DX&&n.modal instanceof nS?t_(Ut(bq({questionId:n.modal.value0.id,isPublic:!n.modal.value0.isPublic})))(function(){return Ho({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:Lm.value})}):p(!0)}if($e)return Ho(n)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 254, column 1 - line 254, column 76): "+[a.value0.constructor.name])};return a.value0 instanceof ig&&n.modal instanceof tS?pX(function(h){return Ue.create(ig.create(h))})(function(h){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new tS(h)}})(hY(n.modal.value0)(a.value0.value0)):s(!0)};return a.value0 instanceof rS&&n.modal instanceof aS?pX(function(l){return Ue.create(rS.create(l))})(function(l){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new aS(l)}})(ag(n.modal.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof kP&&e.user instanceof T?t_(ug(_X(function(r){return Ue.create(BP.create(r))})(Eq({conferenceId:e.conference.id,text:n.newQuestionText,hqBroadcast:n.newQuestionBroadcast}))))(function(){return Ho({modal:n.modal,questions:n.questions,newQuestionText:"",newQuestionBroadcast:!1})}):t(!0)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 254, column 1 - line 254, column 76): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}};var nu={PRIMARY:"#1557B0",SECONDARY:"#4A5568",SUCCESS:"#007A3D",DANGER:"#C91E3E",WHITE:"#FFF",GRAY_300:"#E3EBF6",GRAY_500:"#6B7C93",GRAY_600:"#5E7290",GRAY_700:"#4A5568"};var a7e=nu.PRIMARY,t7e=nu.SECONDARY,r7e=nu.SUCCESS,o7e=nu.DANGER,u7e=nu.WHITE,i7e=nu.GRAY_300,l7e=nu.GRAY_500,c7e=nu.GRAY_600,JP=nu.GRAY_700;var uS,v7e=new Uint8Array(16);function qP(){if(!uS&&(uS=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!uS))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return uS(v7e)}var FX=/^(?:[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 f7e(e){return typeof e=="string"&&FX.test(e)}var $P=f7e;var mi=[];for(iS=0;iS<256;++iS)mi.push((iS+256).toString(16).substr(1));var iS;function _7e(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(mi[e[n+0]]+mi[e[n+1]]+mi[e[n+2]]+mi[e[n+3]]+"-"+mi[e[n+4]]+mi[e[n+5]]+"-"+mi[e[n+6]]+mi[e[n+7]]+"-"+mi[e[n+8]]+mi[e[n+9]]+"-"+mi[e[n+10]]+mi[e[n+11]]+mi[e[n+12]]+mi[e[n+13]]+mi[e[n+14]]+mi[e[n+15]]).toLowerCase();if(!$P(a))throw TypeError("Stringified UUID is invalid");return a}var GX=_7e;function p7e(e,n,a){e=e||{};var t=e.random||(e.rng||qP)();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 GX(t)}var WP=p7e;var MX=WP;var d7e=function(e){return e},xP=function(e){return e};var jP=ae(uo)(MX)((function(){var e=x(Ct);return function(n){return e(d7e(n))}})());function zP(){return Date.now()}var g7e=B(ca);var Hl=g7e(aE)(zP);var lg=nt(qe),HX=fn(ln),D7e=HX(Na),R7e=tn(o1),y7e=B(st),Oy=kn(qe),w7e=Ht(ie),b7e=Ol(),JX=zr(on)()(),LX=Hg(Gl),E7e=gu(ho),I7e=Yn(al),T7e=oe(u6),PX=oe(Y0),S7e=B(Ye),Vv=HX(da),C7e=Gi(qe),F7e=mc(ht()($({reflectSymbol:function(){return"authorTag"}})(Ee)($({reflectSymbol:function(){return"kind"}})(Ee)(mn))))(qe),sS=B(ca),P0=x(Bn),NX=kt(kd),OX=Bg(Gl),G7e=x(ba),VP=Rv(Nd),M7e=Pe(Ce),A7e=ge(Ye),L7e=ga(Ce)()(),P7e=Ft(ie),cS=(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})(),Ny=(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})(),qX=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),KP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),QP=function(e){return lg(D7e(Wr(R7e(e)(10)))(function(){return y7e(KP.create)(Oy(Hl))}))},UX=50,$X=function(e){var n=function(r){return w7e("text-white fe fe-"+r)("")},a=(function(){if(e instanceof Wf)return n("heart");if(e instanceof h0)return n("thumbs-up");if(e instanceof em)return n("thumbs-down");if(e instanceof g0)return n("file-text");if(e instanceof D0)return b7e("")({src:"/img/icons/smile-white.svg",alt:Nl.value,style:Yt({width:"1em"})});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 152, column 10 - line 158, column 100): "+[e.constructor.name])})(),t=(function(){if(e instanceof Wf)return"#F0747B";if(e instanceof h0)return"#008CFD";if(e instanceof em)return JP;if(e instanceof g0)return"#18A668";if(e instanceof D0)return"#F6C343";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 160, column 21 - line 165, column 32): "+[e.constructor.name])})();return JX("d-flex justify-content-center align-items-center rounded-circle")({style:Yt({backgroundColor:t,height:"1.5rem",width:"1.5rem"})})(a)},WX=6,kX=(function(){return WX*1e3})(),xX=function(e){return function(n){var a=function(t){if(LX(t.removeAt)(e.currentTime))return Aa;var r=br(E7e(I7e(Wc(LD(t.startDecayAt))))(10)),u=(function(){var p=r<=3;if(p)return"linear";var R=r<=7;return R?"ease-in":"ease"})(),i=t.reaction.authorTag===e.authorTag,l=1+(r-5)/4,s=LX(t.startDecayAt)(e.currentTime),h=WX+(r-5)/10;return JX("position-absolute mb-4 mt-2")({key:T7e(t.startDecayAt),style:Yt({right:PX(l)+"rem",top:(function(){return s?"0":"90%"})(),opacity:(function(){return s?0:i?1:.6})(),transitionProperty:"top opacity",transitionDuration:PX(h)+"s",transitionTimingFunction:u})})($X(t.reaction.kind))};return Oe(S7e(a)(e.reactions))}},jX=function(e){return Vv(C7e(function(n){return new Ny(FB(n),G.value)})(F7e(e.pusher.dataChannel)("reaction")))(function(){return Vv(lg(Oy(sS(function(n){return qX.create(xP(n))})(jP))))(function(){return Vv(lg(Oy(sS(KP.create)(Hl))))(function(){return P0({authorTag:"",currentTime:NX,coolDownUntil:NX,reactions:[]})})})})},BX=800,zX=function(e){return function(n){return function(a){if(a instanceof cS&&a.value1 instanceof G)return Vv(lg(Oy(sS((function(){var t=cS.create(a.value0);return function(r){return t(T.create(r))}})())(Hl))))(function(){return P0(n)});if(a instanceof cS&&a.value1 instanceof T){if(OX(n.coolDownUntil)(a.value1.value0))return Vv(lg(G7e(new Ny({kind:a.value0,authorTag:n.authorTag},new T(a.value1.value0)))))(function(){return P0(n)});if($e)return Vv(Ut(Fq(e.conference.id)({authorTag:n.authorTag,kind:a.value0})))(function(){return Vv(QP(BX))(function(){return P0({authorTag:n.authorTag,currentTime:n.currentTime,reactions:n.reactions,coolDownUntil:ze(a.value1.value0)(VP(BX)(a.value1.value0))})})})}if(a instanceof Ny&&a.value1 instanceof G)return Vv(lg(Oy(sS((function(){var t=Ny.create(a.value0);return function(r){return t(T.create(r))}})())(Hl))))(function(){return P0(n)});if(a instanceof Ny&&a.value1 instanceof T)return Vv(QP(UX))(function(){return Vv(QP(kX))(function(){var t={reaction:a.value0,startDecayAt:ze(a.value1.value0)(VP(UX)(a.value1.value0)),removeAt:ze(a.value1.value0)(VP(kX)(a.value1.value0))};return P0({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:pp(n.reactions)(t),currentTime:a.value1.value0})})});if(a instanceof qX)return P0({coolDownUntil:n.coolDownUntil,currentTime:n.currentTime,reactions:n.reactions,authorTag:a.value0});if(a instanceof KP)return P0({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:yu(function(t){return OX(t.removeAt)(a.value0)})(n.reactions),currentTime:a.value0});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 171, column 22 - line 215, column 8): "+[a.constructor.name])}}},VX=function(e){return function(n){var a=function(t){if(t instanceof Wf)return"love this";if(t instanceof h0)return"helpful";if(t instanceof em)return"not helpful";if(t instanceof g0)return"taking notes";if(t instanceof D0)return"LOL";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 139, column 11 - line 144, column 28): "+[t.constructor.name])};return M7e("d-flex justify-content-end my-2")(A7e([Wf.value,D0.value,h0.value,g0.value])(function(t){return L7e("btn bg-light d-flex align-items-center p-0 ml-3")(Vr(a(t)))({onClick:un(function(r){return n(new cS(t,G.value))}),style:Yt({borderRadius:"1em"})})([$X(t),P7e("d-none d-md-inline text-secondary small ml-2 mr-3")(a(t))])}))}};var rZ=fn(ln),O7e=ae(Na),XP=kn(qe),vS=x(ba),pS=xr(ie),fS=oe(pn),Uy=rZ(da),ky=nt(qe),fs=x(Bn),QX=Mr(Yo),KX=Nu(UD),YX=B(st),U7e=ai(Bn)(iu),k7e=Ml(If),XX=Pe(ie),B7e=xs(),H7e=jr(ie),ZX=ga(ie)()(),eZ=Pe(on),J7e=ga(Ce)()(),q7e=Ht(ie),$7e=Pe(Ce),oZ=(function(){function e(){}return e.value=new e,e})(),uZ=(function(){function e(){}return e.value=new e,e})(),iZ=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),lZ=(function(){function e(){}return e.value=new e,e})(),nZ=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),cZ=(function(){function e(){}return e.value=new e,e})(),aZ=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ZP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),sZ=(function(){function e(){}return e.value=new e,e})(),vZ=(function(){function e(){}return e.value=new e,e})(),eN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),YP=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),_S=(function(){function e(){}return e.value=new e,e})(),fZ=rZ(Na)(Wr(1e3))(function(){return O7e(XP(Hl))(function(e){return vS(new eN(e))})}),W7e=function(e){return{header:"Go on-air?",body:Oe([pS("")("Are you sure you want to go on-air?"),pS("mb-0 font-weight-bold fw-bold")(` Watchers will start seeing your stream in `+(fS(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:lZ.value}},tZ=function(e){return function(n){return function(a){return function(t){return Uy(ky(fZ))(function(){return fs({confirmation:n.confirmation,network:oZ.value,streamStatus:t,transition:new T({since:a,secondsLeft:e.videoLagSeconds})})})}}}},_Z=function(e){return function(n){return function(a){if(a instanceof lZ)return Uy(ky(QX(KX(hq(e.conference.id))(YX(nZ.create)(XP(Hl))))(function(l){return vS(new YP("Error opening the stream. Please try again."))})))(function(){return fs({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:uZ.value})});if(a instanceof nZ)return tZ(e)(n)(a.value0)(fu.value);if(a instanceof cZ)return Uy(ky(QX(KX(gq(e.conference.id))(YX(aZ.create)(XP(Hl))))(function(l){return vS(new YP("Error closing the stream. Please try again."))})))(function(){return fs(n)});if(a instanceof aZ)return tZ(e)(n)(a.value0)(Uo.value);if(a instanceof ZP)return fs({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:new T(a.value0)});if(a instanceof sZ)return Uy(U7e(n.confirmation)(function(l){return ky(vS(l.confirmMsg))}))(function(){return fs({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value})});if(a instanceof vZ)return fs({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:G.value});if(a instanceof YP)return fs({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:new iZ(a.value0)});var t=function(l){if(a instanceof eN||a instanceof _S)return fs(n);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 191, column 1 - line 191, column 76): "+[a.constructor.name])};if(a instanceof eN){if(n.transition instanceof T){var r=k7e(a.value0)(n.transition.value0.since),u=e.videoLagSeconds-ku(r)|0,i=u>0;return i?Uy(ky(fZ))(function(){return fs({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:new T({since:n.transition.value0.since,secondsLeft:u})})}):fs({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:G.value})}return t(!0)}return t(!0)}}},pZ=function(e){return fs({streamStatus:e.streamStatus,transition:G.value,network:oZ.value,confirmation:G.value})},x7e=(function(){return{header:"End the stream?",body:Oe([pS("")("Are you sure you want to end the stream?"),pS("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:cZ.value}})(),mZ=function(e){return function(n){return function(a){var t=(function(){return n.network instanceof uZ?XX("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching..."):Aa})(),r=function(h){return B7e({id:"stream-controls-confirmation-modal",header:H7e("my-0")(h.header),bodyClass:"p-5",body:h.body,footerClass:"p-4",footer:Oe([ZX("btn btn-primary px-4")(vn)({onClick:un(function(p){return a(sZ.value)})})(h.confirmText),ZX("btn btn-outline-primary px-4")(vn)({onClick:un(function(p){return a(vZ.value)})})(h.cancelText)])})},u=function(h){return function(p){return function(R){return function(E){return function(w){return eZ("col-auto pr-0")(J7e("btn btn-"+(h+(" px-5 d-flex align-items-center font-size-lg btn-"+E)))(vn)({onClick:un(function(I){return a(w)})})([q7e("fe mr-2 fe-"+p)(""),cn(R)]))}}}}},i=(function(){if(n.streamStatus instanceof ol)return u("lg")("power")("GO ON-AIR")("outline-secondary")(new ZP(W7e(e)));var h=function(p){if(n.streamStatus instanceof fu)return Oe([u("lg")("radio")("ON AIR")("success")(_S.value),u("sm")("x-circle")("End stream")("outline-danger")(new ZP(x7e))]);if(n.streamStatus instanceof Uo)return u("lg")("slash")("STREAM IS OVER")("outline-secondary")(_S.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 fu&&n.transition instanceof T?u("lg")("radio")("ON AIR")("success")(_S.value):h(!0)})(),l=function(h){return XX("alert small m-0 flex-grow-1 alert-"+h)},s=(function(){if(n.network instanceof iZ)return l("danger")(n.network.value0);if(n.streamStatus instanceof ol)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 fu)return l("light")(` We're live. The audience should see your video with a `+(fS(e.videoLagSeconds)+`-second delay. If you don't see your face above (give it a few seconds), it means you're not streaming. `));var R=function(E){if(n.streamStatus instanceof Uo)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 Uo&&n.transition instanceof T?l("info")("You may stop presenting now. The audience will keep seeing the tail of the stream for another "+(fS(n.transition.value0.secondsLeft)+" seconds.")):R(!0)};return n.streamStatus instanceof fu&&n.transition instanceof T?l("info")("Start presenting now. The audience will see the stream in "+(fS(n.transition.value0.secondsLeft)+" seconds...")):h(!0)})();return $7e("position-relative row align-items-center t--stream-controls")([i,eZ("col")(s),t,ja(n.confirmation)(r)])}}};var z7e=Rv(Cp),gZ=Ml(Cp),dZ=rk(),V7e=js(),Q7e=jr(ie),K7e=Pe(ie),hZ=xr(ie),Y7e=ga(ie)()(),DZ=nt(qe),RZ=fn(ln),yZ=B(st),wZ=kn(qe),bZ=RZ(da),X7e=wi(Je)(Wt),nN=x(Bn),tN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),aN=(function(){function e(){}return e.value=new e,e})(),Z7e=[30,15,5,0],EZ=function(e){return ze(e.conference.scheduledStartTime)(z7e(br(e.conference.duration))(e.conference.scheduledStartTime))},IZ=function(e){return function(n){return function(a){if(!n.modal)return Aa;if(n.now instanceof G)return Aa;if(n.now instanceof T){var t=EZ(e),r=gZ(t)(n.now.value0),u=(function(){if(r<1)return" ended "+dZ({from:t,to:n.now.value0,format:mE("ago")});if($e)return" ends "+dZ({from:n.now.value0,to:t,format:mE("from now")});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 77, column 3 - line 80, column 101): ")})();return V7e({id:"stream-end-warning-modal",onDismiss:a(aN.value),body:Oe([Q7e("mb-0")("Host-only warning"),K7e("text-secondary mb-4")("You see this because you're the host. The audience doesn't see this."),hZ("font-weight-bold fw-bold")("\u23F0 Scheduled stream time "+u),hZ("")(` You have `+(fc(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. `)),Y7e("btn btn-primary px-4")(vn)({onClick:un(function(i){return a(aN.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])}}},eOe=DZ(RZ(Na)(Wr(60100))(function(){return yZ(tN.create)(wZ(p0))})),TZ=function(e){return function(n){return function(a){if(a instanceof tN)return bZ(eOe)(function(){var t=gZ(EZ(e))(a.value0),r=X7e(ku(t))(Z7e);return nN({now:new T(a.value0),modal:n.modal||r})});if(a instanceof aN)return nN({now:n.now,modal:!1});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 83, column 22 - line 95, column 33): "+[a.constructor.name])}}},SZ=(function(){return bZ(DZ(yZ(tN.create)(wZ(p0))))(function(){return nN({modal:!1,now:G.value})})})();var AZ=fn(ln),aOe=AZ(Na),CZ=x(ba),tOe=AZ(da),rOe=nt(qe),oOe=Mr(Yo),dS=x(Bn),uOe=be(yR),LZ=Bu(Je),rN=Pe(Ce),mS=Ht(ie),iOe=ga(ie)()(),lOe=ro(ie)()(),cOe=ga(on)()(),sOe=xs(),FZ=Pe(on),vOe=qu(ie),fOe=bv(ie)()(),_Oe=Ft(ie),PZ=(function(){function e(){}return e.value=new e,e})(),NZ=(function(){function e(){}return e.value=new e,e})(),oN=(function(){function e(){}return e.value=new e,e})(),OZ=(function(){function e(){}return e.value=new e,e})(),UZ=(function(){function e(){}return e.value=new e,e})(),GZ=(function(){function e(){}return e.value=new e,e})(),MZ=(function(){function e(){}return e.value=new e,e})(),pOe=(function(){function e(){}return e.value=new e,e})(),kZ=function(e){return function(n){return function(a){var t=aOe(_I({fromConference:new T(e.conference.id),registerForConference:n.cta.conferenceId,utmSource:e.paths.utmSource}))(function(){return CZ(new Ue(GZ.value))});if(a instanceof UZ)return tOe(rOe(oOe(t)(function(r){return CZ(new Ue(MZ.value))})))(function(){return dS({cta:n.cta,stage:NZ.value})});if(a instanceof GZ)return dS({cta:n.cta,stage:OZ.value});if(a instanceof MZ)return dS({cta:n.cta,stage:oN.value});throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 135, column 24 - line 145, column 44): "+[a.constructor.name])}}},BZ=function(e){return function(n){return uOe(e.cta.conferenceId)(n.conferenceId)}},HZ=function(e){return dS({cta:e,stage:PZ.value})},mOe=(function(){return xu(LZ([qs.value,new ar(", "),Js.value,new ar(" "),Xc.value,new ar(" at "),Zc.value,new ar(":"),Al.value,new ar(" "),es.value]))})(),dOe=(function(){return xu(LZ([qs.value]))})(),JZ=function(e){return function(n){return function(a){var t=(function(){return n.stage instanceof oN?rN("text-danger small mt-2")([mS("fe fe-x-circle mr-2")(""),cn("Something went wrong. Please try again.")]):Aa})(),r=function(h){return a(Ue.create(h))},u=(function(){if(e.user instanceof T)return iOe("btn btn-primary px-4 t--register-one-click")(Vr("Register for this livestream"))({onClick:un(function(h){return r(UZ.value)})})("Register (one-click)");if(e.user instanceof G)return lOe("btn btn-primary px-4 t--register-new-tab")(Vr("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 20 - line 96, column 23): "+[e.user.constructor.name])})(),i=(function(){if(n.stage instanceof PZ||n.stage instanceof oN)return u;if(n.stage instanceof NZ)return rN("text-secondary")([mS("fe fe-refresh-cw mr-2")(""),cn("Hold on tight...")]);if(n.stage instanceof OZ)return rN("text-success")([mS("fe fe-check-circle mr-2")(""),cn("You\u2019ve registered \u2013\xA0see you "+(dOe(n.cta.startTime)+"!"))]);throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 70, column 34 - line 84, column 10): "+[n.stage.constructor.name])})(),l=function(h){return a(Jn.create(h))},s=cOe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(Vr("Close"))({onClick:un(function(h){return l(pOe.value)})})(mS("fe fe-x")(""));return sOe({id:"livestream-event-cta-modal",body:Oe([FZ("row justify-content-end mt-n3")(s),vOe("")("Join us for our upcoming livestream:"),fOe("mt-3")({id:pc})(n.cta.title),_Oe("small")(mOe(n.cta.startTime)+(" "+Xp)),FZ("row mt-6 ml-0")(i),t]),bodyClass:"t--cta-active",size:BR.value})}}};var gOe=xs(),hS=Pe(Ce),DOe=O1(ie)()(),gS=Pe(on),ROe=ga(on)()(),yOe=Ht(ie),wOe=ge(Ye),bOe=jc()(),EOe=vu(ie),IOe=xr(ie),TOe=ro(ie)()(),SOe=fn(ln),COe=SOe(da),FOe=nt(qe),GOe=kn(qe),MOe=Vf(Go)(),AOe=oe(pn),qZ=x(Bn),LOe=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),$Z=(function(){function e(){}return e.value=new e,e})(),WZ=function(e){return function(n){var a=(function(){var i=Wo(e.cta.providers);return i===1?I0.value:i===2?I0.value:HR.value})(),t=function(i){return n(Ue.create(i))},r=function(i){return n(Jn.create(i))},u=(function(){var i=Wo(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 gOe({id:"featured-service-providers-cta-modal",bodyClass:"bg-gray-900 text-white t--cta-active",body:Oe([hS("row no-gutters g-0 mb-4")([hS("col text-center")([DOe("mb-2")({id:pc})("The admissions process is hard - advisors are here to help!"),cn("Schedule a free consultation to get your questions answered")]),gS("col-auto text-right")(ROe("btn btn-link p-0 m-0 text-white")(Vr("Close"))({onClick:un(function(i){return r($Z.value)})})(yOe("fe fe-x")("")))]),hS("row text-center")(wOe(e.cta.providers)(function(i){return hS(u)([gS("row mb-3")(gS("col-auto mx-auto")(gS("avatar avatar-xl")(bOe("avatar-img rounded-circle img-fluid")({src:i.avatarUrl,alt:i.name})))),EOe("mb-2")(i.name),IOe("mb-3")(i.location),TOe("btn btn-primary btn-sm px-3 py-1")(vn)({target:"_blank",href:i.linkUrl,onClick:un(function(l){return t(new LOe(i.avatarUrl))})})(e.cta.linkText)])}))]),size:a})}},xZ=function(e){return function(n){return COe(FOe(GOe(function(){return MOe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:AOe(e.cta.id),livestream_cta_url:n.value0})(),new Jn($Z.value)})))(function(){return qZ(e)})}},jZ=function(e){return function(n){return e.cta.id===n.id}},zZ=function(e){return qZ({cta:e})};var NOe=ro(ie)()(),OOe=ga(on)()(),UOe=Ht(ie),kOe=xs(),VZ=Pe(on),BOe=bv(ie)()(),HOe=fn(ln),JOe=HOe(da),qOe=nt(qe),$Oe=kn(qe),WOe=Vf(Go)(),xOe=oe(pn),QZ=x(Bn),jOe=(function(){function e(){}return e.value=new e,e})(),KZ=(function(){function e(){}return e.value=new e,e})(),YZ=function(e){return function(n){var a=function(i){return n(Ue.create(i))},t=NOe("btn btn-primary px-4 t--register-new-tab")(vn)({href:e.cta.url,target:"_blank",rel:"noopener",onClick:un(function(i){return a(jOe.value)})})(e.cta.buttonText),r=function(i){return n(Jn.create(i))},u=OOe("btn btn-sm btn-outline-primary d-flex py-1 px-2")(Vr("Close"))({onClick:un(function(i){return r(KZ.value)})})(UOe("fe fe-x")(""));return kOe({id:"general-cta-modal",body:Oe([VZ("row justify-content-end mt-n3")(u),BOe("mt-3")({id:pc})(e.cta.title),VZ("row mt-6 ml-0")(t)]),bodyClass:"t--cta-active",size:BR.value})}},XZ=function(e){return function(n){return JOe(qOe($Oe(function(){return WOe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:xOe(e.cta.id),livestream_cta_title:e.cta.title,livestream_cta_url:e.cta.url})(),new Jn(KZ.value)})))(function(){return QZ(e)})}},ZZ=function(e){return function(n){return e.cta.id===n.id}},eee=function(e){return QZ({cta:e})};var lN=fn(ln),Jl=lN(nn),ql=Qo(hu),cg=x(ka),nee=Yr(uu(Ot)),By=La(du),r_=x(Bn),VOe=lN(da),QOe=nt(qe),KOe=lN(Na),YOe=x(ba),uN=Pe(Ce),XOe=X_(ie),ZOe=su()(),e6e=ga(on)()(),n6e=Ht(ie),a6e=xs(),iN=Pe(on),t6e=bv(ie)()(),r6e=xr(ie),o6e=ga(ie)()(),aee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),tee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ree=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),oee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),uee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),iee=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),lee=(function(){function e(){}return e.value=new e,e})(),cee=(function(){function e(){}return e.value=new e,e})(),see=function(e){return function(n){return e.cta.id===n.id}},vee=function(e){return function(n){var a=Jl(ql(n.cta.requireReferredUserLastName))(function(){return Jl(ql(n.referredUserLastName===""))(function(){return cg("Please enter the other person\u2019s last name")})}),t=Jl(ql(n.cta.requireReferredUserFirstName))(function(){return Jl(ql(n.referredUserFirstName===""))(function(){return cg("Please enter the other person\u2019s first name")})}),r=Jl(ql(nee(Gy)(n.referredUserEmail)))(function(){return cg("Please enter a valid email address")}),u=Jl(ql(Rr(e.user)))(function(){return Jl(ql(n.cta.requireAnonymousUserLastName))(function(){return Jl(ql(n.anonymousUserLastName===""))(function(){return cg("Please enter your last name")})})}),i=Jl(ql(Rr(e.user)))(function(){return Jl(ql(n.cta.requireAnonymousUserFirstName))(function(){return Jl(ql(n.anonymousUserFirstName===""))(function(){return cg("Please enter your first name")})})}),l=Jl(ql(Rr(e.user)))(function(){return Jl(ql(n.cta.requireAnonymousUserEmail))(function(){return Jl(ql(nee(Gy)(n.anonymousUserEmail)))(function(){return cg("Please enter a valid email address")})})});return By(i)(By(u)(By(l)(By(t)(By(a)(r)))))}},fee=function(e){return function(n){return function(a){if(a instanceof aee)return r_({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 tee)return r_({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 ree)return r_({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 oee)return r_({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 uee)return r_({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 iee)return r_({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 lee){var t=Rr(vee(e)(n));return t?VOe(QOe(KOe(Dq({ctaId:n.cta.id,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,anonymousUserEmail:n.anonymousUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,referredUserEmail:n.referredUserEmail}))(function(){return YOe(new Jn(cee.value))})))(function(){return r_(n)}):r_({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 152, column 24 - line 180, column 45): "+[a.constructor.name])}}},_ee=function(e){return function(n){return function(a){var t=vee(e)(n),r=function(E){return function(w){return function(I){return function(L){return function(U){return uN(E)([XOe("mb-2")(I),ZOe("form-control "+w)({type:"text",value:L,onChange:un(function(V){return a(new Ue(U(Zf(V))))})})])}}}}},u=Qa(Rr(e.user)&&n.cta.requireAnonymousUserEmail)(r("col-12 mb-3")("t--anon-email")("Your email")(n.anonymousUserEmail)(ree.create)),i=Qa(Rr(e.user))(Oe([Qa(n.cta.requireAnonymousUserFirstName)(r("col-12 col-md-6 mb-3")("t--anon-first-name")("Your first name")(n.anonymousUserFirstName)(aee.create)),Qa(n.cta.requireAnonymousUserLastName)(r("col-12 col-md-6 mb-3")("t--anon-last-name")("Your last name")(n.anonymousUserLastName)(tee.create))])),l=r("col-12 mb-3")("t--referred-email")("Other person\u2019s email")(n.referredUserEmail)(iee.create),s=Oe([Qa(n.cta.requireReferredUserFirstName)(r("col-12 col-md-6 mb-3")("t--referred-first-name")("Other person\u2019s first name")(n.referredUserFirstName)(oee.create)),Qa(n.cta.requireReferredUserLastName)(r("col-12 col-md-6 mb-3")("t--referred-last-name")("Other person\u2019s last name")(n.referredUserLastName)(uee.create))]),h=function(E){return a(Ue.create(E))},p=function(E){return a(Jn.create(E))},R=e6e("btn btn-sm btn-outline-primary d-flex py-1 px-2 t--close")(Vr("Close"))({onClick:un(function(E){return p(cee.value)})})(n6e("fe fe-x")(""));return a6e({id:"referral-cta-modal",body:Oe([iN("row justify-content-end mt-n3")(R),t6e("mt-3")({id:pc})(n.cta.title),ja(n.cta.description)(r6e("")),uN("row")([i,u,s,l]),uN("row")([iN("col-auto my-auto")(o6e("btn btn-primary t--save")(vn)({onClick:un(function(E){return h(lee.value)})})("Save")),iN("col my-auto text-danger")(Qa(n.validationActive)(ja(t)(cn)))])]),bodyClass:"t--cta-active",size:I0.value})}}},pee=function(e){return r_({cta:e,anonymousUserFirstName:"",anonymousUserLastName:"",anonymousUserEmail:"",referredUserFirstName:"",referredUserLastName:"",referredUserEmail:"",validationActive:!1})};var i6e=nt(qe),l6e=x(ba),N0=$t(Lo(st)),DS=fn(ln)(da),Hy=x(Bn),Jy=(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})(),$y=(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})(),RS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),yS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),wS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),bS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),c6e=(function(){function e(){}return e.value=new e,e})(),mee=function(e){return function(n){return function(a){var t=function(r){return a(Ue.create(r))};if(n instanceof Jy)return JZ(e)(n.value0)(function(r){return t(RS.create(r))});if(n instanceof qy)return WZ(n.value0)(function(r){return t(yS.create(r))});if(n instanceof $y)return YZ(n.value0)(function(r){return t(wS.create(r))});if(n instanceof Wy)return _ee(e)(n.value0)(function(r){return t(bS.create(r))});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 57, column 29 - line 65, column 61): "+[n.constructor.name])}}},dee=function(e){return function(n){return function(a){var t=i6e(l6e(new Jn(c6e.value)));if(n instanceof Jy&&a instanceof RS){if(a.value0 instanceof Ue)return N0(function(r){return Ue.create(RS.create(r))})(Jy.create)(kZ(e)(n.value0)(a.value0.value0));if(a.value0 instanceof Jn)return DS(t)(function(){return Hy(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 72, column 5 - line 77, column 19): "+[a.value0.constructor.name])}if(n instanceof qy&&a instanceof yS){if(a.value0 instanceof Ue)return N0(function(r){return Ue.create(yS.create(r))})(qy.create)(xZ(n.value0)(a.value0.value0));if(a.value0 instanceof Jn)return DS(t)(function(){return Hy(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 80, column 5 - line 86, column 19): "+[a.value0.constructor.name])}if(n instanceof $y&&a instanceof wS){if(a.value0 instanceof Ue)return N0(function(r){return Ue.create(wS.create(r))})($y.create)(XZ(n.value0)(a.value0.value0));if(a.value0 instanceof Jn)return DS(t)(function(){return Hy(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 89, column 5 - line 94, column 19): "+[a.value0.constructor.name])}if(n instanceof Wy&&a instanceof bS){if(a.value0 instanceof Ue)return N0(function(r){return Ue.create(bS.create(r))})(Wy.create)(fee(e)(n.value0)(a.value0.value0));if(a.value0 instanceof Jn)return DS(t)(function(){return Hy(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 97, column 5 - line 103, column 19): "+[a.value0.constructor.name])}return Hy(n)}}},hee=function(e){return function(n){return e instanceof Jy&&n instanceof ns?BZ(e.value0)(n.value0):e instanceof $y&&n instanceof as?ZZ(e.value0)(n.value0):e instanceof qy&&n instanceof ts?jZ(e.value0)(n.value0):e instanceof Wy&&n instanceof rs?see(e.value0)(n.value0):!1}},gee=function(e){if(e instanceof ns)return N0(function(n){return Ue.create(RS.create(n))})(Jy.create)(HZ(e.value0));if(e instanceof ts)return N0(function(n){return Ue.create(yS.create(n))})(qy.create)(zZ(e.value0));if(e instanceof as)return N0(function(n){return Ue.create(wS.create(n))})($y.create)(eee(e.value0));if(e instanceof rs)return N0(function(n){return Ue.create(bS.create(n))})(Wy.create)(pee(e.value0));throw new Error("Failed pattern match at Livestream.Ctas.Display (line 45, column 8 - line 54, column 66): "+[e.constructor.name])};var Dee=jr(ie),ES=Pe(Ce),v6e=qu(ie),f6e=bv(ie)()(),wee=Es(I_),_6e=X_(Ce),p6e=su()(),sN=wi(Je)(Wt),Ree=ga(ie)()(),m6e=Eh(on),d6e=kn(qe),h6e=zf(Go),g6e=El(),D6e=oe(pn),Pm=x(Bn),R6e=C_(Wt),Nm=fn(ln)(da),y6e=Mr(Yo),cN=x(ba),w6e=ai(ba)(Je),b6e=Sr(ba),yee=nt(qe),E6e=$t(Lo(st)),sg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),vN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),fN=(function(){function e(){}return e.value=new e,e})(),bee=(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})(),Eee=function(e){return function(n){return function(a){var t=Oe([Dee("text-center")("The host just asked a poll question!"),Dee("text-center")("To participate in live polls, please introduce yourself:"),ng({cancelButton:new T({text:"Not now",click:a(new sg({keepShowingPolls:!1}))}),autoFocus:!0})(e)(n.registration)(function(i){return a(_N.create(i))}),ES("small mt-3")([rg(e),ES("mt-2")([cn("After submitting, you\u2019ll be able to answer all "),v6e("")("future"),cn(" poll questions in this stream!")])])]),r=Oe([f6e("font-weight-bold fw-bold")({id:pc})(n.poll.question),ES("d-flex flex-column ml-4")(wee(function(i){return function(l){return _6e("form-check-label mb-2")([p6e("form-check-input mt-2 t--option")({checked:sN(i)(n.selected),onChange:un(function(s){return a(new vN(i))}),type:(function(){return n.poll.multiSelect?"checkbox":"radio"})()}),cn(l)])}})(n.poll.options)),ES("d-flex justify-content-start mt-6")([Ree("btn btn-primary px-4 mr-3 t--submit")(vn)({onClick:un(function(i){return a(fN.value)}),disabled:xi(n.selected)})("Submit answer"),Ree("btn btn-outline-primary px-4 d-flex align-items-center t--skip")(vn)({onClick:un(function(i){return a(bee.value)})})("Do it later")])]),u=(function(){if(e.user instanceof T)return"t--poll-active";if(e.user instanceof G)return"t--poll-registration-form";throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 55, column 16 - line 57, column 43): "+[e.user.constructor.name])})();return m6e(u)({id:"livestream-poll-display-modal"})((function(){if(e.user instanceof T)return r;if(e.user instanceof G)return t;throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 51, column 5 - line 53, column 34): "+[e.user.constructor.name])})())}}},Iee=function(e){return function(n){return function(a){var t=function(r){return d6e(h6e("Livestream: Poll Response")(Ef(d0(e.conference))(g6e({livestream_poll_id:D6e(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 sg)return Pm(n);if(a instanceof vN&&n.poll.multiSelect)return Pm({poll:n.poll,registration:n.registration,selected:(function(){var r=sN(a.value0)(n.selected);return r?R6e(a.value0)(n.selected):wu(a.value0)(n.selected)})()});if(a instanceof vN)return Pm({poll:n.poll,registration:n.registration,selected:[a.value0]});if(a instanceof fN&&xi(n.selected))return Pm(n);if(a instanceof fN)return Nm(Ut(y6e(P2(n.poll)(n.selected))(function(r){return cc(Kc)("Error answering a Livestream poll")({poll_id:n.poll.id})(function(u){return cN(void 0)})})))(function(){return Nm(Ut(w6e(wee(function(r){return function(u){return{idx:r,opt:u}}})(n.poll.options))(function(r){return b6e(sN(r.idx)(n.selected))(t({skipped:!1,option:r.opt}))})))(function(){return Nm(yee(cN(new sg({keepShowingPolls:!0}))))(function(){return Pm(n)})})});if(a instanceof bee)return Nm(Ut(P2(n.poll)([])))(function(){return Nm(Ut(t({skipped:!0,option:""})))(function(){return Nm(yee(cN(new sg({keepShowingPolls:!0}))))(function(){return Pm(n)})})});if(a instanceof _N)return E6e(_N.create)(function(r){return{poll:n.poll,selected:n.selected,registration:r}})(ag(n.registration)(a.value0));throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 109, column 24 - line 155, column 57): "+[a.constructor.name])}}},Tee=function(e){return Nm(Ut(Rq(e)))(function(){return Pm({poll:e,selected:[],registration:tg})})};var Lee=fn(ln),T6e=Lee(Na),S6e=ae(Na),See=kn(qe),C6e=ai(ba)(iu),F6e=zf(Go),Cee=El(),G6e=oe(id),M6e=oe($s),IS=oe(pn),_s=x(Bn),Pee=Lo(st),Fee=$t(Pee),Gee=ae(da),Mee=wr(Pee),U0=Lee(da),A6e=be(Wt),O0=x(ka),xy=Yd(qe),jy=B(ue),L6e=B(ki),zy=_f(Je),hN=ht(),Aee=mc(hN($({reflectSymbol:function(){return"poll_id"}})(Dn)(mn)))(qe),P6e=Gi(qe),N6e=be(qr(yR)),O6e=mc(hN($({reflectSymbol:function(){return"conference_id"}})(Dn)(mn)))(qe),pN=be(qr(Wt)),mN=mc(hN($({reflectSymbol:function(){return"id"}})(Dn)(mn)))(qe),Vy=(function(){function e(){}return e.value=new e,e})(),vg=(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})(),fg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),TS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),SS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),dN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),_g=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Nee=function(e){return function(n){return function(a){if(n.stage instanceof Vy)return Aa;if(n.stage instanceof vg)return Eee(e)(n.stage.value0)(function(t){return a(fg.create(t))});if(n.stage instanceof Qy)return mee(e)(n.stage.value0)(function(t){return a(TS.create(t))});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 103, column 3 - line 109, column 59): "+[n.stage.constructor.name])}}},U6e=function(e){return function(n){return e instanceof Qy?hee(e.value0)(n):!1}},k6e=function(){return function(e){return function(n){return function(a){return T6e(Wr(100))(function(){return S6e(See(wE(pc)))(function(t){return C6e(t)(function(r){return See(function(){var i=IL(dA(r))(),l=Tk({x:i.left+1,y:i.top+1})(),s=bL(dA(l))();return F6e(n)(Ef(Cee(a))(Ef(d0(e.conference))(Cee({livestream_popup_visible:G6e(s===pc)}))))()})})})})}}}},Oee=k6e(),B6e=function(e){var n=function(){return Oee(e)("Livestream: CTA Popup Shown")},a=n();return function(t){if(t instanceof ns)return a({livestream_cta_target_conference_id:M6e(t.value0.conferenceId)});if(t instanceof ts)return a({livestream_cta_id:IS(t.value0.id)});if(t instanceof as)return a({livestream_cta_id:IS(t.value0.id),livestream_cta_title:t.value0.title,livestream_cta_url:t.value0.url});if(t instanceof rs)return a({livestream_cta_id:IS(t.value0.id),livestream_cta_title:t.value0.title});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 163, column 29 - line 180, column 8): "+[t.constructor.name])}},Uee=function(e){return function(n){return function(a){if(a instanceof fg&&a.value0 instanceof sg)return _s({stage:Vy.value,showPolls:a.value0.value0.keepShowingPolls});var t=function(r){if(a instanceof fg)return _s(n);if(a instanceof TS){if(a.value0 instanceof Jn)return _s({showPolls:n.showPolls,stage:Vy.value});var u=function(s){return _s(n)};return a.value0 instanceof Ue&&n.stage instanceof Qy?Fee(TS.create)(function(s){return{showPolls:n.showPolls,stage:new Qy(s)}})(dee(e)(n.stage.value0)(a.value0.value0)):u(!0)}var u=function(l){if(a instanceof SS&&n.showPolls)return Gee(Mee(fg.create)(Tee(a.value0)))(function(p){return U0(Ut(Oee(e)("Livestream: Poll Popup Shown")({livestream_poll_id:IS(a.value0.id)})))(function(){return _s({showPolls:n.showPolls,stage:new vg(p)})})});if(a instanceof SS)return _s(n);var s=function(p){if(a instanceof dN||a instanceof _g&&U6e(n.stage)(a.value0))return _s(n);if(a instanceof _g)return U0(Ut(B6e(e)(a.value0)))(function(){return Gee(Mee(TS.create)(gee(a.value0)))(function(R){return _s({showPolls:n.showPolls,stage:new Qy(R)})})});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 111, column 1 - line 111, column 76): "+[a.constructor.name])};if(a instanceof dN){if(n.stage instanceof vg){var h=n.stage.value0.poll.id===a.value0.pollId;return h?_s({showPolls:n.showPolls,stage:Vy.value}):s(!0)}return s(!0)}return s(!0)};if(a instanceof SS){if(n.stage instanceof vg){var i=n.stage.value0.poll.id===a.value0.id;return i?_s(n):u(!0)}return u(!0)}return u(!0)};return a instanceof fg&&n.stage instanceof vg?Fee(fg.create)(function(r){return{showPolls:n.showPolls,stage:new vg(r)}})(Iee(e)(n.stage.value0)(a.value0)):t(!0)}}},kee=function(e){var n=function(u){return u instanceof rs?O0(u.value0.id):G.value},a=function(u){return u instanceof ts?O0(u.value0.id):G.value},t=function(u){return u instanceof as?O0(u.value0.id):G.value},r=function(u){return u instanceof ns?O0(u.value0.conferenceId):G.value};return U0(xy(function(u){return jy(L6e(SS.create)(function(i){return i.poll}))(zy((function(){var i=A6e(u.poll_id);return function(l){return i((function(s){return s.poll.id})(l))}})())(e.conference.polls))})(Aee(e.pusher.dataChannel)("show-poll")))(function(){return U0(P6e(function(u){return new dN({pollId:u.poll_id})})(Aee(e.pusher.dataChannel)("hide-poll")))(function(){return U0(xy(function(u){return jy(_g.create)(zy((function(){var i=N6e(O0(u.conference_id));return function(l){return i(r(l))}})())(e.ctas))})(O6e(e.pusher.dataChannel)("show-event-cta")))(function(){return U0(xy(function(u){return jy(_g.create)(zy((function(){var i=pN(O0(u.id));return function(l){return i(t(l))}})())(e.ctas))})(mN(e.pusher.dataChannel)("show-general-cta")))(function(){return U0(xy(function(u){return jy(_g.create)(zy((function(){var i=pN(O0(u.id));return function(l){return i(a(l))}})())(e.ctas))})(mN(e.pusher.dataChannel)("show-featured-sps-cta")))(function(){return U0(xy(function(u){return jy(_g.create)(zy((function(){var i=pN(O0(u.id));return function(l){return i(n(l))}})())(e.ctas))})(mN(e.pusher.dataChannel)("show-referral-cta")))(function(){return _s({stage:Vy.value,showPolls:!0})})})})})})})};var J6e=js(),gN=Pe(Ce),q6e=jr(on),$6e=Ft(Ce),W6e=Ht(ie),Bee=Ol(),Hee=jr(ie),x6e=xr(ie),CS=ga(ie)()(),j6e=fn(ln),Jee=j6e(da),z6e=lK(),DN=x(Bn),qee=ae(nn),V6e=h_(zO),Q6e=Ml(kG),K6e=be(TE),Y6e=pf(Je)(Ot),X6e=be(av),Z6e=Ps()(),$ee=(function(){function e(){}return e.value=new e,e})(),yN=(function(){function e(){}return e.value=new e,e})(),Wee=(function(){function e(){}return e.value=new e,e})(),wN=(function(){function e(){}return e.value=new e,e})(),RN=(function(){function e(){}return e.value=new e,e})(),FS=function(e){return function(n){return J6e({id:"network-settings-modal",onDismiss:n(new Jn(RN.value)),bodyClass:"t--livestreams-update-network-settings-modal",body:(function(){if(e.modalView instanceof $ee)return gN("text-center")([Qa(e.confirmConferenceRegistration)(q6e("mb-4")($6e("badge badge-soft-primary bg-primary-soft")([W6e("fe fe-check mr-1")(""),cn("You\u2019re registered!")]))),Bee("my-4")({alt:Nl.value,height:"76",src:"/img/network/counselor.svg",width:"91"}),Hee("")("Connect with colleges when you attend or register for their livestreams?"),x6e("text-secondary")("Connecting with colleges puts you on their radar and introduces you to admissions officers and current students"),gN("mx-md-6 mt-4")([CS("btn btn-primary w-100 t--livestream-opt-into-auto-connect")(vn)({onClick:un(function(a){return function(){return n(new Ue(Wee.value))(),n(new Ue(wN.value))()}})})("Yes, always connect"),CS("btn btn-outline-primary w-100 mt-3 t--livestream-connect-with-school")(vn)({onClick:un(function(a){return n(new Ue(wN.value))})})("Only connect with "+e.school.name),CS("btn btn-link mt-3")(vn)({onClick:un(function(a){return n(new Jn(RN.value))})})("Close")])]);if(e.modalView instanceof yN)return gN("text-center")([Bee("mt-4")({alt:Nl.value,height:"42",src:"/img/livestreams/network-settings-modal/connection-sent.png",width:"42"}),Hee("")("Connection request sent!"),CS("mt-4 btn btn-primary t--livestream-network-settings-modal-close")(vn)({onClick:un(function(a){return n(new Jn(RN.value))})})("Close")]);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 71, column 13 - line 122, column 14): "+[e.modalView.constructor.name])})()})}},GS=function(e){return function(n){if(n instanceof Ue){if(n.value0 instanceof Wee)return Jee(Ut(z6e({publishScope:_c.value,publishContext:K3.value,autoRequestFromLivestreams:!0,livestreamConference:e.conference})))(function(){return DN({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:yN.value})});if(n.value0 instanceof wN)return Jee(Ut(CW(e.school.id)(e.conference.id)))(function(){return DN({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:yN.value})});throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 49, column 31 - line 61, column 44): "+[n.value0.constructor.name])}if(n instanceof Jn)return DN(e);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 48, column 1 - line 48, column 55): "+[e.constructor.name,n.constructor.name])}},MS=function(e){return function(n){var a=ze(!1)(qee(e.dismissedNetworkSettingsModalAt)(function(r){return new T(V6e(Q6e(bE(void 0))(r))(30))})),t=function(r){return[n.rcr834NetworkSettingsModal,K6e(r.publishScope)(_c.value),!r.autoRequestFromLivestreams,e.hasAccessToNetwork,!a]};return ze(!1)(qee(e.profile)(function(r){return new T(Y6e(X6e(!0))(t(r)))}))}},AS=function(e){return Z6e(e)({modalView:$ee.value})};var Ky=(function(){function e(){}return e.value=new e,e})(),pg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Yy=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),LS=(function(){function e(){}return e.value=new e,e})();var zee=fn(ln),jee=zee(da),bN=nt(qe),nUe=zee(Na),EN=x(ba),PS=x(Bn),Vee=function(e){return function(n){return function(a){return function(t){return a.throttleState instanceof Ky&&t instanceof Yy?jee(bN(nUe(Wr(a.delay))(function(){return EN(e(LS.value))})))(function(){return PS(n({delay:a.delay,throttleState:new pg(t.value0)}))}):a.throttleState instanceof pg&&t instanceof Yy?PS(n({delay:a.delay,throttleState:new pg(t.value0)})):a.throttleState instanceof pg&&t instanceof LS?jee(bN(EN(a.throttleState.value0)))(function(){return PS(n({delay:a.delay,throttleState:Ky.value}))}):PS(n(a))}}}},Qee=function(e){return function(n){return bN(EN(e(new Yy(n))))}},Kee=function(e){return{throttleState:Ky.value,delay:e}};var NS=Pe(ie),OS=Pe(Ce),tUe=jr(ie),o_=oe(pn),rUe=ou(ho),Yee=Pe(on),oUe=zr(ie)()(),uUe=qu(ie),iUe=Ft(ie),lUe=Lf(on),cUe=M1(Ce)()(),Xee=Bs(Ca),US=ga(ie)()(),tne=wi(Je)(Wt),Zee=Lf(Ce),kS=Us(ie),sUe=Us(on),vUe=Us(Ce),fUe=Y_(Ce),_Ue=V_(Ce),mg=Q_(ie),pUe=K_(Ce),BS=ge(Ye),mUe=ti(Ca),Xy=fn(ln)(da),CN=nt(qe),dUe=Mr(Yo),rne=x(ba),k0=x(Bn),IN=B(st),hUe=be(oB),ene=si(Ca)(Je),gUe=tn(gr),DUe=oD(Ca),RUe=C_(Wt),yUe=Gi(qe),wUe=fI(qe),HS=(function(){function e(){}return e.value=new e,e})(),one=(function(){function e(){}return e.value=new e,e})(),une=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ine=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),TN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),nne=(function(){function e(){}return e.value=new e,e})(),lne=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),cne=(function(){function e(){}return e.value=new e,e})(),FN=(function(){function e(){}return e.value=new e,e})(),ane=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),SN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),sne=function(e){return function(n){return function(a){if(e.conference.polls.length===0)return Aa;var t=(function(){if(n.stage instanceof HS)return Aa;if(n.stage instanceof one)return NS("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 187, column 22 - line 193, column 23): "+[n.stage.constructor.name])})(),r=OS("d-flex flex-nowrap align-items-baseline")([tUe("")("Polls"),NS("text-muted ml-3 small")("Polls will be shown to viewers "+(o_(e.videoLagSeconds)+" seconds after you launch them, to account for the audio/video delay"))]),u=function(s){return function(h){return function(p){var R=function(E){return function(w){var I=(function(){if(h===0)return"0%";if($e)return o_(rUe(100*w|0)(h))+"%";throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 183, column 7 - line 185, column 63): ")})();return OS("row align-items-center bg-light-grey mb-1 py-2 t--poll-response-option")([NS("col-7 d-flex justify-content-end")(E),Yee("col-4")(Yee("progress")(oUe("progress-bar")({style:Yt({width:I})})(""))),OS("col-1")([uUe("")(o_(w)),iUe("text-secondary text-nowrap")(" ("+(I+")"))])])}};return lUe("t--poll-responses-"+o_(s.id))(cUe("py-0")({colSpan:6})(Gb(R)(s.options)(p.optionCounts)))}}},i=function(s){var h=ze(s.status)(Xee(s.poll.id)(n.statuses)),p=US("btn btn-white btn-sm px-4 t--open")(vn)({onClick:un(function(R){return a(new une(s.poll))})})("Launch poll");if(h instanceof qf)return p;if(h instanceof Nv)return Oe([US("btn btn-success btn-sm px-4 mr-3")(vn)({disabled:!0})("Poll LIVE"),US("btn btn-danger btn-sm px-4 t--close")(vn)({onClick:un(function(R){return a(new ine(s.poll))})})("Close poll")]);if(h instanceof $f)return p;throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 141, column 15 - line 154, column 19): "+[h.constructor.name])},l=function(s){var h=tne(s.poll.id)(n.expandedResponses),p=Xee(s.poll.id)(n.responses),R=Wn(0)(function(I){return I.answered})(p),E=Wn(0)(function(I){return I.seen})(p),w=Wn(0)(function(I){return I.skipped})(p);return Oe([Zee("t--poll t--poll-"+o_(s.poll.id))([kS("pt-3")((function(){var I=Fr(s.poll.autoDisplayMinutesFromStart);return I?"\u23F0 ":""})()+s.poll.question),sUe("text-nowrap")(i(s)),kS("t--shown")(o_(E)),vUe("t--answers")([cn(o_(R)),US("btn btn-sm btn-white ml-2 py-0 px-1 "+("fe fe-chevron-"+(function(){return h?"up":"down t--expand-responses"})()))(Vr((function(){return h?"Collapse responses":"Expand responses"})()))({onClick:un(function(I){return a(new lne(s.poll.id))})})("")]),kS("t--skipped")(o_(w)),kS("t--pending")(o_((E-R|0)-w|0))]),Qa(h)(ja(p)(u(s.poll)(R)))])};return Oe([r,OS("t--polls position-relative")([ja(n.error)(function(s){return NS("alert alert-danger")(s)}),fUe("table table-sm mb-0")([_Ue("")([Zee("")([mg("")("Question"),mg("")("Actions"),mg("")("# saw poll"),mg("")("# answered"),mg("")("# skipped"),mg("")("# not responded")])]),pUe("")(BS(mUe(function(s){return-(function(h){return h.poll.id})(s)|0})(e.conference.polls))(l))]),t])])}}},vne=function(e){return function(n){var a=function(t){return Xy(CN(dUe(t)(function(r){return rne(nne.value)})))(function(){return k0({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:one.value,error:G.value})})};return function(t){if(t instanceof une)return a(IN(TN.create)(L2(t.value0)(Nv.value)));if(t instanceof ine)return a(IN(TN.create)(L2(t.value0)($f.value)));if(t instanceof TN){var r=BS(yu((function(){var u=hUe(Nv.value);return function(i){return u((function(l){return l.status})(i))}})())(t.value0))(function(u){return u.pollId});return k0({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,statuses:ene(BS(t.value0)(function(u){return new yn(u.pollId,u.status)})),expandedResponses:gUe(n.expandedResponses)(DUe(r)),stage:HS.value})}if(t instanceof nne)return k0({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:HS.value,error:new T("That didn't work for some reason, try again")});if(t instanceof lne)return k0({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,stage:n.stage,statuses:n.statuses,expandedResponses:(function(){var u=tne(t.value0)(n.expandedResponses);return u?RUe(t.value0)(n.expandedResponses):wu(t.value0)(n.expandedResponses)})()});if(t instanceof cne)return Xy(Qee(SN.create)(FN.value))(function(){return k0(n)});if(t instanceof FN)return Xy(CN(IN(ane.create)(Gq(e.conference.id))))(function(){return k0(n)});if(t instanceof ane)return k0({error:n.error,expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,stage:n.stage,statuses:n.statuses,responses:ene(BS(t.value0)(function(u){return new yn(u.pollId,u.responses)}))});if(t instanceof SN)return Vee(SN.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 205, column 22 - line 251, column 98): "+[t.constructor.name])}}},fne=function(e){return Xy(yUe(gn(cne.value))(wUe(e.pusher.dataChannel)("poll-responses-changed")))(function(){return Xy(CN(rne(FN.value)))(function(){return k0({statuses:ic,responses:ic,expandedResponses:[],responseThrottle:Kee(500),stage:HS.value,error:G.value})})})};var _ne=Ol(),pne=Pe(Ce),mne=jr(ie),dne=vu(ie),hne=(function(){return _ne("img-fluid mb-6")({alt:new NR("CollegeVine"),src:"/img/cv-logo-lilac-on-dark.svg",style:Yt({width:"5em"})})})(),JS=function(e){return pne(e+` t--splashscreen position-absolute-fullsize d-flex flex-column align-items-center justify-content-around bg-dark text-white `)},Zy=function(e){return JS("")([mne("text-center")(e)])},GN=JS("t--splashscreen-intro")([Pe(on)("text-center mt-7")(dne("")("The recording will load in a moment.")),hne]),qS=(function(){return JS("px-4 px-md-6 t--splashscreen-intro")([_ne("img-fluid")({alt:Nl.value,src:"/img/illustrations/livestreams/2022-02-intro.svg"})])})(),gne=JS("t--splashscreen-complete")([pne("text-center mt-7")([dne("")("The event is now over."),mne("")("Thank you for attending!"),zc(ie)("")("A recording will be available to watch shortly.")]),hne]);var $S=e=>e.play();var B0=pl(Rne(),1);Et();var yne=e=>{let[n,a]=vt.useState(),[t,r]=vt.useState(),u=vt.useRef();return u.current=e,Lr(()=>{if(!t)return B0.default.isSupported()?a(IUe(e.videoStreamUrl,e.videoElementId,u)):e.onNotSupported(),r(!0),()=>{n&&n.destroy()}}),null},IUe=(e,n,a)=>{let t=document.getElementById(n);return t?(hls=new B0.default,a.current.onInstanceCreated&&a.current.onInstanceCreated(hls),hls.on(B0.default.Events.ERROR,function(r,u){a.current.onError&&a.current.onError("HLS error: "+u.type,u),u.fatal&&(u.type===B0.default.ErrorTypes.MEDIA_ERROR?hls.recoverMediaError():(hls.destroy(),a.current.onCriticalFail&&a.current.onCriticalFail(u.type)))}),hls.on(B0.default.Events.MEDIA_ATTACHED,()=>hls.loadSource(e)),hls.on(B0.default.Events.MANIFEST_PARSED,()=>a.current.onReady&&a.current.onReady()),hls.on(B0.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 SUe=wv();var wne=function(){return function(){return SUe(yne)}};Et();var tw=pl(Fne(),1),Gne=4,o5e=({trackColor:e,background:n})=>({props:a,children:t})=>vt.createElement("div",Object.assign({},a,{style:Object.assign({},a.style,{height:`${Gne}px`,borderRadius:`${Gne*2}px`,background:n||e})}),...t),u5e=({horizontal:e})=>({props:n,isDragged:a})=>vt.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18"}),vt.createElement("circle",{cx:"9",cy:"9",r:"8.5",fill:a?nu.SECONDARY:nu.WHITE,stroke:nu.SECONDARY}),vt.createElement("path",{stroke:a?nu.WHITE:nu.SECONDARY,d:e?"M7.5 6L7.5 12":"M6 7.5L12 7.5"}),vt.createElement("path",{stroke:a?nu.WHITE:nu.SECONDARY,d:e?"M10.5 6L10.5 12":"M6 10.5L12 10.5"})),Mne=e=>vt.createElement("div",{"aria-label":e.ariaLabel},vt.createElement(tw.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:o5e({trackColor:e.trackColor||nu.GRAY_300,background:e.fillBefore?(0,tw.getTrackBackground)({values:[e.value],colors:[nu.PRIMARY,nu.GRAY_300],min:e.min,max:e.max,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":e.value}):void 0}),renderThumb:u5e({horizontal:!0})}));var l5e=wv(),Ane={CanPassToJavaScript0:function(){},CanReceiveFromJavaScript1:function(){return Gd}};var Lne=function(e){return function(){return function(){return l5e(Mne)}}};var s5e=zr(on)()(),v5e=Lne(Ane)()(),f5e=Pl(Dh),_5e=ga(on)()(),p5e=Pl(Hv),Pne=Pe(Ce),m5e=Ft(ie),zS=nt(qe),NN=x(ba),Hne=fn(ln),d5e=kt(kd),Qv=x(Bn),h5e=z_(qe),PN=kn(qe),g5e=B(ue),D5e=Rv(Nd),R5e=Hne(Na),H0=Hne(da),y5e=Sr(Bn),w5e=ae(Na),b5e=ov(Gl),E5e=Sr(Ct),ON=(function(){function e(){}return e.value=new e,e})(),UN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),BN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Nne=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),kN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),One=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Une=(function(){function e(){}return e.value=new e,e})(),I5e=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),Jne=function(e){return function(n){if(e.videoState instanceof G)return Aa;if(e.videoState instanceof T){var a=s5e("")({style:Yt({minWidth:"6rem",width:"6rem"})})(v5e({value:(function(){return e.videoState.value0.muted?0:e.videoState.value0.volume})(),min:0,max:1,step:.05,onChange:f5e(n)(function(i){return Ue.create(UN.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 122, column 3 - line 124, column 32): ")})(),r=_5e("btn large px-3 py-1 mr-3 text-white fe "+t)(Vr("Mute the video"))({onClick:p5e(n)(new Ue(ON.value))})(Aa),u=Pne("d-flex align-items-center text-white px-3")([cn("LIVE"),m5e("text-danger x-large ml-2 mt-n1")("\u25CF")]);return Pne("mb-2 w-100 d-flex align-items-center bg-semi-transparent-black "+(function(){return e.visible?"":"hidden"})())([Qa(e.config.liveIndicator)(u),Qa(e.config.mute)(r),Qa(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])}},qne=function(e){return Ue.create(BN.create(e))},kne=function(e){return zS(NN(new Jn(new I5e(function(n){return function(){return e(n)(),new Ue(new BN(n))}}))))},VS=(function(){return new Ue(new kN(!0))})(),$ne=function(e){return{config:e,videoState:G.value,visible:!1,visibilityExpiration:d5e}},Bne=2e3,Wne=function(e){return function(n){if(n instanceof Jn)return Qv(e);if(n instanceof Ue){var a=h5e(PN(function(){var i=Hl();return g5e(function(l){return Ue.create(One.create(l))})(D5e(Bne)(i))})),t=R5e(Wr(Bne))(function(){return NN(new Ue(Une.value))}),r=function(u){if(n.value0 instanceof ON)return Qv(e);var i=function(l){if(n.value0 instanceof UN)return Qv(e);if(n.value0 instanceof BN)return H0(zS(PN(function(){var h=yA(n.value0.value0)(),p=DA(n.value0.value0)();return new Ue(new Nne({muted:h,volume:p}))})))(function(){return Qv(e)});if(n.value0 instanceof Nne)return Qv({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T(n.value0.value0)});if(n.value0 instanceof kN)return H0(y5e(n.value0.value0)(a))(function(){return H0(zS(t))(function(){return Qv({config:e.config,videoState:e.videoState,visibilityExpiration:e.visibilityExpiration,visible:n.value0.value0})})});if(n.value0 instanceof One)return Qv({config:e.config,videoState:e.videoState,visible:e.visible,visibilityExpiration:n.value0.value0});if(n.value0 instanceof Une)return H0(zS(w5e(PN(Hl))(function(s){var h=b5e(s)(e.visibilityExpiration);return h?NN(new Ue(new kN(!1))):t})))(function(){return Qv(e)});throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 138, column 1 - line 138, column 55): "+[n.value0.constructor.name])};return n.value0 instanceof UN&&e.videoState instanceof T?H0(a)(function(){return H0(kne(function(l){return function(){return E5e(n.value0.value0>0)(Yp(!1)(l))(),RA(n.value0.value0)(l)()}}))(function(){return Qv({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T({muted:e.videoState.value0.muted,volume:n.value0.value0})})})}):i(!0)};return n.value0 instanceof ON&&e.videoState instanceof T?H0(a)(function(){return H0(kne(Yp(!e.videoState.value0.muted)))(function(){return Qv({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T({volume:e.videoState.value0.volume,muted:!e.videoState.value0.muted})})})}):r(!0)}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 138, column 1 - line 138, column 55): "+[e.constructor.name,n.constructor.name])}},xne=function(e){if(e instanceof T)return!1;if(e instanceof G)return!0;throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 206, column 1 - line 206, column 37): "+[e.constructor.name])};var jne=e=>n=>a=>()=>e.then(a,n),zne=e=>e instanceof Error,Vne=e=>e===null?"null":typeof e>"u"?"undefined":e.toString();var C5e=x(Xl(Nr)),F5e=wp(Nr),G5e=hn(En),Qne=La(fD(mD)(Nr)),M5e=yf(Nr),A5e=B(Id(ws)),L5e=Fd(Nr),P5e=ab(ca),N5e=Gt(M6);var O5e=function(e){var n=function(a){if(zne(a))return C5e(a);if($e)return F5e(new yp(""));throw new Error("Failed pattern match at Utils.Promise (line 58, column 3 - line 60, column 41): "+[a.constructor.name])};return yr(function(a){return zi("Promise failed: "+Vne(e))})(G5e)(am(Qne(n(e))(Qne(M5e("Error")(e))(A5e(zi)(L5e(e))))))},QS=function(e){return H_(function(n){return P5e(N5e)(jne(e)(function(a){return n(Me.create(O5e(a)))()})(function(a){return n(Le.create(a))()}))})};var k5e=ae(nn),B5e=Pe(on),rw=ae(uo),HN=$i(Ct)(iu),Um=Pl(Hv),Kne=jd(ie)()(),H5e=wne()(),J5e=x(Ct),Yne=Pl(Dh),Xne=zr(on)()(),q5e=ga(Ce)()(),$5e=Ht(ie),W5e=Pe(Ce),rae=fn(ln),x5e=Vf(qe)(),j5e=Wi(Je)(Ot),z5e=be(qr(Wt)),dg=rae(Na),V5e=Ys(ba),Q5e=wo($d),Lu=x(ba),oae=kn(qe),Zne=Mr(Yo),uae=Og(Na),_u=x(Bn),Au=rae(da),sl=nt(qe),eae=B(st),nae=z_(qe),iae=B(ca),K5e=$t(Lo(st)),Y5e=B(ue),X5e=ge(ue),aae=tn(xO),lae=(function(){function e(){}return e.value=new e,e})(),cae=(function(){function e(){}return e.value=new e,e})(),uw=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),sae=(function(){function e(){}return e.value=new e,e})(),hg=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),vae=(function(){function e(){}return e.value=new e,e})(),fae=(function(){function e(){}return e.value=new e,e})(),tae=(function(){function e(){}return e.value=new e,e})(),JN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),qN=(function(){function e(){}return e.value=new e,e})(),YS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),XS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),KS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),_ae=(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})(),WN=(function(){function e(){}return e.value=new e,e})(),pae=(function(){function e(){}return e.value=new e,e})(),mae=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),km=(function(){function e(){}return e.value=new e,e})(),Kv=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ZS=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),zN=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),ow=(function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e})(),VN=function(e){var n=e.Monad0(),a=ae(n.Bind1()),t=kn(e),r=x(n.Applicative0());return function(u){return function(i){return function(l){return a(t(wE(u.videoId)))(function(s){return Wn(r(i.whenNotFound))(l)(k5e(s)(gk))})}}}},dae=VN(Go),xN=VN(qe),hae=function(e){var n=VN(e);return function(a){return n(a)({whenNotFound:void 0})}},Z5e=hae(Go),e9e=hae(qe),eC=function(e){return function(n){return function(a){var t=(function(){var I=B5e("position-absolute-fullsize py-6 d-flex align-items-center justify-content-around");if(n.stage instanceof sae)return I(e.errorScreen("It appears that video playback is not supported in your browser."));if(n.stage instanceof vae)return I(e.errorScreen("The video didn't load correctly, try refreshing the page."));if(n.stage instanceof uw)return I(e.introScreen);if(n.stage instanceof hg)return Aa;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 246, column 18 - line 258, column 14): "+[n.stage.constructor.name])})(),r=(function(){return n.stage instanceof uw?n.stage.value0.reset:!1})(),u=un(function(I){return rw(yE(I))(HN(function(L){return a(new Ue(new zN({time:L})))}))}),i=un(function(I){return rw(yE(I))(HN(function(L){return a(new Ue(new ZS({playing:!0,time:L})))}))}),l=function(I){return a(Jn.create(I))},s=un(function(I){return rw(yE(I))(HN(function(L){return l(new $N(L))}))}),h=Um(l)(_ae.value),p=Oe([Kne("w-100 t--real-video")({id:n.videoId,controls:Rr(n.customControls),onVolumeChange:h,onTimeUpdate:u,onPlay:i,onPause:s})(""),Qa(!r)(H5e({videoStreamUrl:e.watchUrl,videoElementId:n.videoId,onNotSupported:l(fae.value),onError:function(I,L){return void 0},onCriticalFail:Yne(l)(function(I){var L=I==="networkError";return L?qN.value:new YS("HLS player crashed")}),onReady:l(new XS({autoPlay:e.autoPlay})),onInitialPts:Yne(l)(function(I){return new mae(I.initPTS)})}))]),R=(function(){return n.stage instanceof hg&&n.stage.value0.unmuteOverlay?Xne("position-absolute-fullsize d-flex align-items-center justify-content-center t--unmute-overlay")({style:Yt({pointerEvents:"none"})})(q5e("btn btn-sm btn-light border-dark px-4 d-flex align-items-center")(vn)({onClick:Um(l)(pae.value),style:Yt({pointerEvents:"all"})})([cn("click for sound"),$5e("fe fe-volume-2 ml-2")("")])):Aa})(),E=function(I){return Xne("position-absolute-fullsize d-flex align-items-end t--controls-overlay")({onMouseMove:Um(l)(new Kv(VS)),onMouseDown:Um(l)(new Kv(VS)),onTouchStart:Um(l)(new Kv(VS))})(Jne(I)(function(L){return l(Kv.create(L))}))},w=Kne("w-100 t--real-video")({id:n.videoId,controls:Rr(n.customControls),playsInline:!0,onVolumeChange:h,onTimeUpdate:u,onPlay:i,onPause:s,onLoadedMetadata:Um(l)(new XS({autoPlay:e.autoPlay})),onError:Um(l)(qN.value),src:(function(){return r?"":e.watchUrl})()})("");return W5e("position-relative w-100")([(function(){if(n.support instanceof lae)return p;if(n.support instanceof cae)return w;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 165, column 7 - line 167, column 40): "+[n.support.constructor.name])})(),ja(n.customControls)(E),Qa(n.allowSound)(R),t])}}},n9e=function(e){var n=kn(e.MonadEffect0());return function(a){return n(function(){return Z5e(a)(Yp(!1))(),WN.value})}},a9e=n9e(Lk),jN=function(e){return x5e("Livestream: Error")({livestream_error_message:e})},gae=function(e){return dae(e)({whenNotFound:!1})(gA)},t9e=function(e){return kn(e)(function(){var a=rw(rw(Mi)(TA))(IA)();return j5e(function(t){return z5e(q1(t)(a))(new T(0))})(["iPad","iPod","iPhone"])})},Dae=t9e(qe),r9e=function(e){var n=function(t){return dg(V5e(e.allowSound)(Q5e(zi("Skipping attempt to play unmuted because sound was programmatically disallowed"))))(function(){return dg(QS($S(t)))(function(){return Lu(new KS({unmuteOverlay:!1}))})})},a=function(t){return dg(oae(Yp(!0)(t)))(function(){return dg(QS($S(t)))(function(){return Lu(new KS({unmuteOverlay:!0}))})})};return xN(e)({whenNotFound:new YS("