var Purs_EntryPoints_Livestream_Livestream=(()=>{var XK=Object.create;var gg=Object.defineProperty;var ZK=Object.getOwnPropertyDescriptor;var eY=Object.getOwnPropertyNames;var nY=Object.getPrototypeOf,aY=Object.prototype.hasOwnProperty;var GL=e=>gg(e,"__esModule",{value:!0});var tY=(e,n)=>()=>(e&&(n=e(e=0)),n);var je=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),ML=(e,n)=>{GL(e);for(var a in n)gg(e,a,{get:n[a],enumerable:!0})},rY=(e,n,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of eY(n))!aY.call(e,t)&&t!=="default"&&gg(e,t,{get:()=>n[t],enumerable:!(a=ZK(n,t))||a.enumerable});return e},Cu=e=>rY(GL(gg(e!=null?XK(nY(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var ET={};ML(ET,{Children:()=>kf,Component:()=>Bf,Fragment:()=>wT,Suspense:()=>mne,cloneElement:()=>wm,createContext:()=>yT,createElement:()=>vt,createRef:()=>PR,default:()=>ka,forwardRef:()=>Di,isValidElement:()=>bT,lazy:()=>dne,useCallback:()=>bm,useContext:()=>hne,useEffect:()=>Gt,useImperativeHandle:()=>rs,useLayoutEffect:()=>Em,useMemo:()=>Im,useReducer:()=>Dne,useRef:()=>lt,useState:()=>Ll});var ka,kf,wm,Bf,yT,vt,PR,Di,wT,bT,dne,mne,bm,hne,Gt,rs,Em,Im,Dne,lt,Ll,$a=tY(()=>{ka=window.React,{Children:kf,cloneElement:wm,Component:Bf,createContext:yT,createElement:vt,createRef:PR,forwardRef:Di,Fragment:wT,isValidElement:bT,lazy:dne,Suspense:mne,useCallback:bm,useContext:hne,useEffect:Gt,useImperativeHandle:rs,useLayoutEffect:Em,useMemo:Im,useReducer:Dne,useRef:lt,useState:Ll}=window.React});var IT=je((Uze,Tx)=>{"use strict";var Ix=Object.getOwnPropertySymbols,gne=Object.prototype.hasOwnProperty,Rne=Object.prototype.propertyIsEnumerable;function yne(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function wne(){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 o={};return"abcdefghijklmnopqrst".split("").forEach(function(u){o[u]=u}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Tx.exports=wne()?Object.assign:function(e,n){for(var a,t=yne(e),o,u=1;u{"use strict";var TT=IT(),J0=60103,Sx=60106;mt.Fragment=60107;mt.StrictMode=60108;mt.Profiler=60114;var Cx=60109,Fx=60110,Gx=60112;mt.Suspense=60113;var Mx=60115,Ax=60116;typeof Symbol=="function"&&Symbol.for&&(el=Symbol.for,J0=el("react.element"),Sx=el("react.portal"),mt.Fragment=el("react.fragment"),mt.StrictMode=el("react.strict_mode"),mt.Profiler=el("react.profiler"),Cx=el("react.provider"),Fx=el("react.context"),Gx=el("react.forward_ref"),mt.Suspense=el("react.suspense"),Mx=el("react.memo"),Ax=el("react.lazy"));var el,Lx=typeof Symbol=="function"&&Symbol.iterator;function bne(e){return e===null||typeof e!="object"?null:(e=Lx&&e[Lx]||e["@@iterator"],typeof e=="function"?e:null)}function Tm(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a{"use strict";qx.exports=Hx()});var fN=je($0=>{"use strict";var Pl=IT(),us=AT();function _r(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;aFm;Fm++)Go[Fm]=Fm+1;var Go,Fm;Go[15]=0;var Gne=/^[: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]*$/,Kx=Object.prototype.hasOwnProperty,Yx={},Xx={};function Zx(e){return Kx.call(Xx,e)?!0:Kx.call(Yx,e)?!1:Gne.test(e)?Xx[e]=!0:(Yx[e]=!0,!1)}function Mne(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 Ane(e,n,a,t){if(n===null||typeof n=="undefined"||Mne(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 mu(e,n,a,t,o,u,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=t,this.attributeNamespace=o,this.mustUseProperty=a,this.propertyName=e,this.type=n,this.sanitizeURL=u,this.removeEmptyString=i}var Mo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mo[e]=new mu(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Mo[n]=new mu(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mo[e]=new mu(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mo[e]=new mu(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){Mo[e]=new mu(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mo[e]=new mu(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mo[e]=new mu(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mo[e]=new mu(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mo[e]=new mu(e,5,!1,e.toLowerCase(),null,!1,!1)});var BT=/[\-:]([a-z])/g;function HT(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(BT,HT);Mo[n]=new mu(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(BT,HT);Mo[n]=new mu(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(BT,HT);Mo[n]=new mu(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mo[e]=new mu(e,1,!1,e.toLowerCase(),null,!1,!1)});Mo.xlinkHref=new mu("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mo[e]=new mu(e,1,!1,e.toLowerCase(),null,!0,!0)});var Lne=/["'&<>]/;function Hf(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var n=Lne.exec(e);if(n){var a="",t,o=0;for(t=n.index;tqR))throw Error(_r(301));if(e===vc)if(HR=!0,e={action:a,next:null},_v===null&&(_v=new Map),a=_v.get(n),a===void 0)_v.set(n,e);else{for(n=a;n.next!==null;)n=n.next;n.next=e}}function JT(){}var Jf=null,One={readContext:function(e){var n=Jf.threadID;return Cm(e,n),e[n]},useContext:function(e){qf();var n=Jf.threadID;return Cm(e,n),e[n]},useMemo:oN,useReducer:rN,useRef:function(e){vc=qf(),Xt=qT();var n=Xt.memoizedState;return n===null?(e={current:e},Xt.memoizedState=e):n},useState:function(e){return rN(tN,e)},useLayoutEffect:function(){},useCallback:function(e,n){return oN(function(){return e},n)},useImperativeHandle:JT,useEffect:JT,useDebugValue:JT,useDeferredValue:function(e){return qf(),e},useTransition:function(){return qf(),[function(e){e()},!1]},useOpaqueIdentifier:function(){return(Jf.identifierPrefix||"")+"R:"+(Jf.uniqueID++).toString(36)},useMutableSource:function(e,n){return qf(),n(e._source)}},uN={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function iN(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 lN={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},Une=Pl({menuitem:!0},lN),Mm={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},kne=["Webkit","ms","Moz","O"];Object.keys(Mm).forEach(function(e){kne.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Mm[n]=Mm[e]})});var Bne=/([A-Z])/g,Hne=/^ms-/,pv=us.Children.toArray,WT=Cne.ReactCurrentDispatcher,qne={listing:!0,pre:!0,textarea:!0},Jne=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,cN={},$T={};function Wne(e){if(e==null)return e;var n="";return us.Children.forEach(e,function(a){a!=null&&(n+=a)}),n}var $ne=Object.prototype.hasOwnProperty,zne={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function sN(e,n){if(e===void 0)throw Error(_r(152,Sm(n)||"Component"))}function Vne(e,n,a){function t(i,l){var s=l.prototype&&l.prototype.isReactComponent,R=Fne(l,n,a,s),d=[],y=!1,I={isMounted:function(){return!1},enqueueForceUpdate:function(){if(d===null)return null},enqueueReplaceState:function(ee,oe){y=!0,d=[oe]},enqueueSetState:function(ee,oe){if(d===null)return null;d.push(oe)}};if(s){if(s=new l(i.props,R,I),typeof l.getDerivedStateFromProps=="function"){var b=l.getDerivedStateFromProps.call(null,i.props,s.state);b!=null&&(s.state=Pl({},s.state,b))}}else if(vc={},s=l(i.props,R,I),s=nN(l,i.props,s,R),s==null||s.render==null){e=s,sN(e,l);return}if(s.props=i.props,s.context=R,s.updater=I,I=s.state,I===void 0&&(s.state=I=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(),d.length){I=d;var S=y;if(d=null,y=!1,S&&I.length===1)s.state=I[0];else{b=S?I[0]:s.state;var L=!0;for(S=S?1:0;S=l))throw Error(_r(304));var s=new Uint16Array(l);for(s.set(i),Go=s,Go[0]=u+1,i=u;i=s.children.length){var R=s.footer;if(R!==""&&(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===UR)this.popProvider(s.type);else if(s.type===kR){this.suspenseDepth--;var d=u.pop();if(i){i=!1;var y=s.fallbackFrame;if(!y)throw Error(_r(303));this.stack.push(y),u[this.suspenseDepth]+="";continue}else u[this.suspenseDepth]+=d}u[this.suspenseDepth]+=R}else{var I=s.children[s.childIndex++],b="";try{b+=this.render(I,s.context,s.domNamespace)}catch(S){throw S!=null&&typeof S.then=="function"?Error(_r(294)):S}finally{}u.length<=this.suspenseDepth&&u.push(""),u[this.suspenseDepth]+=b}}return u[0]}finally{WT.current=o,Jf=t,aN()}},n.render=function(a,t,o){if(typeof a=="string"||typeof a=="number")return o=""+a,o===""?"":this.makeStaticMarkup?Hf(o):this.previousWasTextNode?""+Hf(o):(this.previousWasTextNode=!0,Hf(o));if(t=Vne(a,t,this.threadID),a=t.child,t=t.context,a===null||a===!1)return"";if(!us.isValidElement(a)){if(a!=null&&a.$$typeof!=null)throw o=a.$$typeof,Error(o===LT?_r(257):_r(258,o.toString()));return a=pv(a),this.stack.push({type:null,domNamespace:o,children:a,childIndex:0,context:t,footer:""}),""}var u=a.type;if(typeof u=="string")return this.renderDOM(a,t,o);switch(u){case Vx:case zx:case PT:case xT:case OT:case OR:return a=pv(a.props.children),this.stack.push({type:null,domNamespace:o,children:a,childIndex:0,context:t,footer:""}),"";case kR:throw Error(_r(294));case $x:throw Error(_r(343))}if(typeof u=="object"&&u!==null)switch(u.$$typeof){case jT:vc={};var i=u.render(a.props,a.ref);return i=nN(u.render,a.props,i,a.ref),i=pv(i),this.stack.push({type:null,domNamespace:o,children:i,childIndex:0,context:t,footer:""}),"";case UT:return a=[us.createElement(u.type,Pl({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:o,children:a,childIndex:0,context:t,footer:""}),"";case UR:return u=pv(a.props.children),o={type:a,domNamespace:o,children:u,childIndex:0,context:t,footer:""},this.pushProvider(a),this.stack.push(o),"";case NT:u=a.type,i=a.props;var l=this.threadID;return Cm(u,l),u=pv(i.children(u[l])),this.stack.push({type:a,domNamespace:o,children:u,childIndex:0,context:t,footer:""}),"";case Wx:throw Error(_r(338));case kT:return u=a.type,i=u._init,u=i(u._payload),a=[us.createElement(u,Pl({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:o,children:a,childIndex:0,context:t,footer:""}),""}throw Error(_r(130,u==null?u:typeof u,""))},n.renderDOM=function(a,t,o){var u=a.type.toLowerCase();if(o===uN.html&&iN(u),!cN.hasOwnProperty(u)){if(!Jne.test(u))throw Error(_r(65,u));cN[u]=!0}var i=a.props;if(u==="input")i=Pl({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(_r(92));if(Array.isArray(s)){if(!(1>=s.length))throw Error(_r(93));s=s[0]}l=""+s}l==null&&(l="")}i=Pl({},i,{value:void 0,children:""+l})}else if(u==="select")this.currentSelectValue=i.value!=null?i.value:i.defaultValue,i=Pl({},i,{value:void 0});else if(u==="option"){s=this.currentSelectValue;var R=Wne(i.children);if(s!=null){var d=i.value!=null?i.value+"":R;if(l=!1,Array.isArray(s)){for(var y=0;y":(oe+=">",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=Hf(s);break e}s=null}return s!=null?(i=[],qne.hasOwnProperty(u)&&s.charAt(0)===` `&&(oe+=` `),oe+=s):i=pv(i.children),a=a.type,o=o==null||o==="http://www.w3.org/1999/xhtml"?iN(a):o==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":o,this.stack.push({domNamespace:o,type:u,children:i,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,oe},e}();$0.renderToNodeStream=function(){throw Error(_r(207))};$0.renderToStaticMarkup=function(e,n){e=new vN(e,!0,n);try{return e.read(1/0)}finally{e.destroy()}};$0.renderToStaticNodeStream=function(){throw Error(_r(208))};$0.renderToString=function(e,n){e=new vN(e,!1,n);try{return e.read(1/0)}finally{e.destroy()}};$0.version="17.0.2"});var pN=je((qze,_N)=>{"use strict";_N.exports=fN()});var pO=je((Qy,LC)=>{(function(n,a){typeof Qy=="object"&&typeof LC=="object"?LC.exports=a():typeof define=="function"&&define.amd?define([],a):typeof Qy=="object"?Qy.Pusher=a():n.Pusher=a()})(window,function(){return function(e){var n={};function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=e,a.c=n,a.d=function(t,o,u){a.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,o){if(o&1&&(t=a(t)),o&8||o&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}),o&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 o=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(o,"a",o),o},a.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},a.p="",a(a.s=2)}([function(e,n,a){"use strict";var t=this&&this.__extends||function(){var b=function(S,L){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,$){O.__proto__=$}||function(O,$){for(var z in $)$.hasOwnProperty(z)&&(O[z]=$[z])},b(S,L)};return function(S,L){b(S,L);function O(){this.constructor=S}S.prototype=L===null?Object.create(L):(O.prototype=L.prototype,new O)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=256,u=function(){function b(S){S===void 0&&(S="="),this._paddingCharacter=S}return b.prototype.encodedLength=function(S){return this._paddingCharacter?(S+2)/3*4|0:(S*8+5)/6|0},b.prototype.encode=function(S){for(var L="",O=0;O>>3*6&63),L+=this._encodeByte($>>>2*6&63),L+=this._encodeByte($>>>1*6&63),L+=this._encodeByte($>>>0*6&63)}var z=S.length-O;if(z>0){var $=S[O]<<16|(z===2?S[O+1]<<8:0);L+=this._encodeByte($>>>3*6&63),L+=this._encodeByte($>>>2*6&63),z===2?L+=this._encodeByte($>>>1*6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},b.prototype.maxDecodedLength=function(S){return this._paddingCharacter?S/4*3|0:(S*6+7)/8|0},b.prototype.decodedLength=function(S){return this.maxDecodedLength(S.length-this._getPaddingLength(S))},b.prototype.decode=function(S){if(S.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(S),O=S.length-L,$=new Uint8Array(this.maxDecodedLength(O)),z=0,ee=0,oe=0,te=0,ve=0,Re=0,nn=0;ee>>4,$[z++]=ve<<4|Re>>>2,$[z++]=Re<<6|nn,oe|=te&o,oe|=ve&o,oe|=Re&o,oe|=nn&o;if(ee>>4,oe|=te&o,oe|=ve&o),ee>>2,oe|=Re&o),ee>>8&0-65-26+97,L+=51-S>>>8&26-97-52+48,L+=61-S>>>8&52-48-62+43,L+=62-S>>>8&62-43-63+47,String.fromCharCode(L)},b.prototype._decodeChar=function(S){var L=o;return L+=(42-S&S-44)>>>8&-o+S-43+62,L+=(46-S&S-48)>>>8&-o+S-47+63,L+=(47-S&S-58)>>>8&-o+S-48+52,L+=(64-S&S-91)>>>8&-o+S-65+0,L+=(96-S&S-123)>>>8&-o+S-97+26,L},b.prototype._getPaddingLength=function(S){var L=0;if(this._paddingCharacter){for(var O=S.length-1;O>=0&&S[O]===this._paddingCharacter;O--)L++;if(S.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},b}();n.Coder=u;var i=new u;function l(b){return i.encode(b)}n.encode=l;function s(b){return i.decode(b)}n.decode=s;var R=function(b){t(S,b);function S(){return b!==null&&b.apply(this,arguments)||this}return S.prototype._encodeByte=function(L){var O=L;return O+=65,O+=25-L>>>8&0-65-26+97,O+=51-L>>>8&26-97-52+48,O+=61-L>>>8&52-48-62+45,O+=62-L>>>8&62-45-63+95,String.fromCharCode(O)},S.prototype._decodeChar=function(L){var O=o;return O+=(44-L&L-46)>>>8&-o+L-45+62,O+=(94-L&L-96)>>>8&-o+L-95+63,O+=(47-L&L-58)>>>8&-o+L-48+52,O+=(64-L&L-91)>>>8&-o+L-65+0,O+=(96-L&L-123)>>>8&-o+L-97+26,O},S}(u);n.URLSafeCoder=R;var d=new R;function y(b){return d.encode(b)}n.encodeURLSafe=y;function I(b){return d.decode(b)}n.decodeURLSafe=I,n.encodedLength=function(b){return i.encodedLength(b)},n.maxDecodedLength=function(b){return i.maxDecodedLength(b)},n.decodedLength=function(b){return i.decodedLength(b)}},function(e,n,a){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t="utf8: invalid string",o="utf8: invalid source encoding";function u(s){for(var R=new Uint8Array(i(s)),d=0,y=0;y>6,R[d++]=128|I&63):I<55296?(R[d++]=224|I>>12,R[d++]=128|I>>6&63,R[d++]=128|I&63):(y++,I=(I&1023)<<10,I|=s.charCodeAt(y)&1023,I+=65536,R[d++]=240|I>>18,R[d++]=128|I>>12&63,R[d++]=128|I>>6&63,R[d++]=128|I&63)}return R}n.encode=u;function i(s){for(var R=0,d=0;d=s.length-1)throw new Error(t);d++,R+=4}else throw new Error(t)}return R}n.encodedLength=i;function l(s){for(var R=[],d=0;d=s.length)throw new Error(o);var b=s[++d];if((b&192)!=128)throw new Error(o);y=(y&31)<<6|b&63,I=128}else if(y<240){if(d>=s.length-1)throw new Error(o);var b=s[++d],S=s[++d];if((b&192)!=128||(S&192)!=128)throw new Error(o);y=(y&15)<<12|(b&63)<<6|S&63,I=2048}else if(y<248){if(d>=s.length-2)throw new Error(o);var b=s[++d],S=s[++d],L=s[++d];if((b&192)!=128||(S&192)!=128||(L&192)!=128)throw new Error(o);y=(y&15)<<18|(b&63)<<12|(S&63)<<6|L&63,I=65536}else throw new Error(o);if(y=55296&&y<=57343)throw new Error(o);if(y>=65536){if(y>1114111)throw new Error(o);y-=65536,R.push(String.fromCharCode(55296|y>>10)),y=56320|y&1023}}R.push(String.fromCharCode(y))}return R.join("")}n.decode=l},function(e,n,a){e.exports=a(3).default},function(e,n,a){"use strict";a.r(n);var t=function(){function m(p,D){this.lastId=0,this.prefix=p,this.name=D}return m.prototype.create=function(p){this.lastId++;var D=this.lastId,G=this.prefix+D,A=this.name+"["+D+"]",Q=!1,be=function(){Q||(p.apply(null,arguments),Q=!0)};return this[D]=be,{number:D,id:G,name:A,callback:be}},m.prototype.remove=function(p){delete this[p.number]},m}(),o=new t("_pusher_script_","Pusher.ScriptReceivers"),u={VERSION:"6.0.3",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},i=u,l=function(){function m(p){this.options=p,this.receivers=p.receivers||o,this.loading={}}return m.prototype.load=function(p,D,G){var A=this;if(A.loading[p]&&A.loading[p].length>0)A.loading[p].push(G);else{A.loading[p]=[G];var Q=qa.createScriptRequest(A.getPath(p,D)),be=A.receivers.create(function(_n){if(A.receivers.remove(be),A.loading[p]){var ha=A.loading[p];delete A.loading[p];for(var gt=function(bo){bo||Q.cleanup()},zt=0;zt>>6)+I(128|p&63):I(224|p>>>12&15)+I(128|p>>>6&63)+I(128|p&63)},z=function(m){return m.replace(/[^\x00-\x7F]/g,$)},ee=function(m){var p=[0,2,1][m.length%3],D=m.charCodeAt(0)<<16|(m.length>1?m.charCodeAt(1):0)<<8|(m.length>2?m.charCodeAt(2):0),G=[b.charAt(D>>>18),b.charAt(D>>>12&63),p>=2?"=":b.charAt(D>>>6&63),p>=1?"=":b.charAt(D&63)];return G.join("")},oe=window.btoa||function(m){return m.replace(/[\s\S]{1,3}/g,ee)},te=function(){function m(p,D,G,A){var Q=this;this.clear=D,this.timer=p(function(){Q.timer&&(Q.timer=A(Q.timer))},G)}return m.prototype.isRunning=function(){return this.timer!==null},m.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},m}(),ve=te,Re=function(){var m=function(p,D){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(p,D)};return function(p,D){m(p,D);function G(){this.constructor=p}p.prototype=D===null?Object.create(D):(G.prototype=D.prototype,new G)}}();function nn(m){window.clearTimeout(m)}function cn(m){window.clearInterval(m)}var ce=function(m){Re(p,m);function p(D,G){return m.call(this,setTimeout,nn,D,function(A){return G(),null})||this}return p}(ve),le=function(m){Re(p,m);function p(D,G){return m.call(this,setInterval,cn,D,function(A){return G(),A})||this}return p}(ve),Ne={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(m){return new ce(0,m)},method:function(m){for(var p=[],D=1;D0)for(var A=0;A=1002&&m.code<=1004?"backoff":null:m.code===4e3?"tls_only":m.code<4100?"refused":m.code<4200?"backoff":m.code<4300?"retry":"refused"},getCloseError:function(m){return m.code!==1e3&&m.code!==1001?{type:"PusherError",data:{code:m.code,message:m.reason||m.message}}:null}},se=xc,yl=function(){var m=function(p,D){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(p,D)};return function(p,D){m(p,D);function G(){this.constructor=p}p.prototype=D===null?Object.create(D):(G.prototype=D.prototype,new G)}}(),wl=function(m){yl(p,m);function p(D,G){var A=m.call(this)||this;return A.id=D,A.transport=G,A.activityTimeout=G.activityTimeout,A.bindListeners(),A}return p.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},p.prototype.send=function(D){return this.transport.send(D)},p.prototype.send_event=function(D,G,A){var Q={event:D,data:G};return A&&(Q.channel=A),sn.debug("Event sent",Q),this.send(se.encodeMessage(Q))},p.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},p.prototype.close=function(){this.transport.close()},p.prototype.bindListeners=function(){var D=this,G={message:function(Q){var be;try{be=se.decodeMessage(Q)}catch(_n){D.emit("error",{type:"MessageParseError",error:_n,data:Q.data})}if(be!==void 0){switch(sn.debug("Event recd",be),be.event){case"pusher:error":D.emit("error",{type:"PusherError",data:be.data});break;case"pusher:ping":D.emit("ping");break;case"pusher:pong":D.emit("pong");break}D.emit("message",be)}},activity:function(){D.emit("activity")},error:function(Q){D.emit("error",{type:"WebSocketError",error:Q})},closed:function(Q){A(),Q&&Q.code&&D.handleCloseEvent(Q),D.transport=null,D.emit("closed")}},A=function(){ra(G,function(Q,be){D.transport.unbind(be,Q)})};ra(G,function(Q,be){D.transport.bind(be,Q)})},p.prototype.handleCloseEvent=function(D){var G=se.getCloseAction(D),A=se.getCloseError(D);A&&this.emit("error",A),G&&this.emit(G,{action:G,error:A})},p}(pa),Nc=wl,bl=function(){function m(p,D){this.transport=p,this.callback=D,this.bindListeners()}return m.prototype.close=function(){this.unbindListeners(),this.transport.close()},m.prototype.bindListeners=function(){var p=this;this.onMessage=function(D){p.unbindListeners();var G;try{G=se.processHandshake(D)}catch(A){p.finish("error",{error:A}),p.transport.close();return}G.action==="connected"?p.finish("connected",{connection:new Nc(G.id,p.transport),activityTimeout:G.activityTimeout}):(p.finish(G.action,{error:G.error}),p.transport.close())},this.onClosed=function(D){p.unbindListeners();var G=se.getCloseAction(D)||"backoff",A=se.getCloseError(D);p.finish(G,{error:A})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},m.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},m.prototype.finish=function(p,D){this.callback(Be({transport:this.transport,action:p},D))},m}(),Pi=bl,pd=function(){function m(p,D){this.channel=p;var G=D.authTransport;if(typeof qa.getAuthorizers()[G]=="undefined")throw"'"+G+"' is not a recognized auth transport";this.type=G,this.options=D,this.authOptions=D.auth||{}}return m.prototype.composeQuery=function(p){var D="socket_id="+encodeURIComponent(p)+"&channel_name="+encodeURIComponent(this.channel.name);for(var G in this.authOptions.params)D+="&"+encodeURIComponent(G)+"="+encodeURIComponent(this.authOptions.params[G]);return D},m.prototype.authorize=function(p,D){m.authorizers=m.authorizers||qa.getAuthorizers(),m.authorizers[this.type].call(this,qa,p,D)},m}(),ef=pd,$_=function(){function m(p,D){this.timeline=p,this.options=D||{}}return m.prototype.send=function(p,D){this.timeline.isEmpty()||this.timeline.send(qa.TimelineTransport.getAgent(this,p),D)},m}(),z_=$_,xi=function(){var m=function(p,D){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(p,D)};return function(p,D){m(p,D);function G(){this.constructor=p}p.prototype=D===null?Object.create(D):(G.prototype=D.prototype,new G)}}(),tu=function(m){xi(p,m);function p(D){var G=this.constructor,A=m.call(this,D)||this;return Object.setPrototypeOf(A,G.prototype),A}return p}(Error),jc=function(m){xi(p,m);function p(D){var G=this.constructor,A=m.call(this,D)||this;return Object.setPrototypeOf(A,G.prototype),A}return p}(Error),V_=function(m){xi(p,m);function p(D){var G=this.constructor,A=m.call(this,D)||this;return Object.setPrototypeOf(A,G.prototype),A}return p}(Error),dd=function(m){xi(p,m);function p(D){var G=this.constructor,A=m.call(this,D)||this;return Object.setPrototypeOf(A,G.prototype),A}return p}(Error),Q_=function(m){xi(p,m);function p(D){var G=this.constructor,A=m.call(this,D)||this;return Object.setPrototypeOf(A,G.prototype),A}return p}(Error),kD=function(m){xi(p,m);function p(D){var G=this.constructor,A=m.call(this,D)||this;return Object.setPrototypeOf(A,G.prototype),A}return p}(Error),Js=function(m){xi(p,m);function p(D){var G=this.constructor,A=m.call(this,D)||this;return Object.setPrototypeOf(A,G.prototype),A}return p}(Error),fE=function(){var m=function(p,D){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(p,D)};return function(p,D){m(p,D);function G(){this.constructor=p}p.prototype=D===null?Object.create(D):(G.prototype=D.prototype,new G)}}(),_E=function(m){fE(p,m);function p(D,G){var A=m.call(this,function(Q,be){sn.debug("No callbacks on "+D+" for "+Q)})||this;return A.name=D,A.pusher=G,A.subscribed=!1,A.subscriptionPending=!1,A.subscriptionCancelled=!1,A}return p.prototype.authorize=function(D,G){return G(!1,{auth:""})},p.prototype.trigger=function(D,G){if(D.indexOf("client-")!==0)throw new tu("Event '"+D+"' does not start with 'client-'");if(!this.subscribed){var A=Da.buildLogSuffix("triggeringClientEvents");sn.warn("Client event triggered before channel 'subscription_succeeded' event . "+A)}return this.pusher.send_event(D,G,this.name)},p.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},p.prototype.handleEvent=function(D){var G=D.event,A=D.data;if(G==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(D);else if(G.indexOf("pusher_internal:")!==0){var Q={};this.emit(G,A,Q)}},p.prototype.handleSubscriptionSucceededEvent=function(D){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",D.data)},p.prototype.subscribe=function(){var D=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(G,A){G?(sn.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}))}))},p.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},p.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},p.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},p}(pa),BD=_E,pE=function(){var m=function(p,D){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(p,D)};return function(p,D){m(p,D);function G(){this.constructor=p}p.prototype=D===null?Object.create(D):(G.prototype=D.prototype,new G)}}(),dE=function(m){pE(p,m);function p(){return m!==null&&m.apply(this,arguments)||this}return p.prototype.authorize=function(D,G){var A=Ni.createAuthorizer(this,this.pusher.config);return A.authorize(D,G)},p}(BD),md=dE,HD=function(){function m(){this.reset()}return m.prototype.get=function(p){return Object.prototype.hasOwnProperty.call(this.members,p)?{id:p,info:this.members[p]}:null},m.prototype.each=function(p){var D=this;ra(this.members,function(G,A){p(D.get(A))})},m.prototype.setMyID=function(p){this.myID=p},m.prototype.onSubscription=function(p){this.members=p.presence.hash,this.count=p.presence.count,this.me=this.get(this.myID)},m.prototype.addMember=function(p){return this.get(p.user_id)===null&&this.count++,this.members[p.user_id]=p.user_info,this.get(p.user_id)},m.prototype.removeMember=function(p){var D=this.get(p.user_id);return D&&(delete this.members[p.user_id],this.count--),D},m.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},m}(),mE=HD,hE=function(){var m=function(p,D){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(p,D)};return function(p,D){m(p,D);function G(){this.constructor=p}p.prototype=D===null?Object.create(D):(G.prototype=D.prototype,new G)}}(),qD=function(m){hE(p,m);function p(D,G){var A=m.call(this,D,G)||this;return A.members=new mE,A}return p.prototype.authorize=function(D,G){var A=this;m.prototype.authorize.call(this,D,function(Q,be){if(!Q){if(be=be,be.channel_data===void 0){var _n=Da.buildLogSuffix("authenticationEndpoint");sn.error("Invalid auth response for channel '"+A.name+"',"+("expected 'channel_data' field. "+_n)),G("Invalid auth response");return}var ha=JSON.parse(be.channel_data);A.members.setMyID(ha.user_id)}G(Q,be)})},p.prototype.handleEvent=function(D){var G=D.event;if(G.indexOf("pusher_internal:")===0)this.handleInternalEvent(D);else{var A=D.data,Q={};D.user_id&&(Q.user_id=D.user_id),this.emit(G,A,Q)}},p.prototype.handleInternalEvent=function(D){var G=D.event,A=D.data;switch(G){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(D);break;case"pusher_internal:member_added":var Q=this.members.addMember(A);this.emit("pusher:member_added",Q);break;case"pusher_internal:member_removed":var be=this.members.removeMember(A);be&&this.emit("pusher:member_removed",be);break}},p.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))},p.prototype.disconnect=function(){this.members.reset(),m.prototype.disconnect.call(this)},p}(md),DE=qD,JD=a(1),hd=a(0),gE=function(){var m=function(p,D){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(p,D)};return function(p,D){m(p,D);function G(){this.constructor=p}p.prototype=D===null?Object.create(D):(G.prototype=D.prototype,new G)}}(),RE=function(m){gE(p,m);function p(D,G,A){var Q=m.call(this,D,G)||this;return Q.key=null,Q.nacl=A,Q}return p.prototype.authorize=function(D,G){var A=this;m.prototype.authorize.call(this,D,function(Q,be){if(Q){G(!0,be);return}var _n=be.shared_secret;if(!_n){var ha="No shared_secret key in auth payload for encrypted channel: "+A.name;G(!0,ha);return}A.key=Object(hd.decode)(_n),delete be.shared_secret,G(!1,be)})},p.prototype.trigger=function(D,G){throw new Q_("Client events are not currently supported for encrypted channels")},p.prototype.handleEvent=function(D){var G=D.event,A=D.data;if(G.indexOf("pusher_internal:")===0||G.indexOf("pusher:")===0){m.prototype.handleEvent.call(this,D);return}this.handleEncryptedEvent(G,A)},p.prototype.handleEncryptedEvent=function(D,G){var A=this;if(!this.key){sn.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!G.ciphertext||!G.nonce){sn.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+G);return}var Q=Object(hd.decode)(G.ciphertext);if(Q.length0&&this.emit("connecting_in",Math.round(D/1e3)),this.retryTimer=new ce(D||0,function(){G.disconnectInternally(),G.connect()})},p.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},p.prototype.setUnavailableTimer=function(){var D=this;this.unavailableTimer=new ce(this.options.unavailableTimeout,function(){D.updateState("unavailable")})},p.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},p.prototype.sendActivityCheck=function(){var D=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new ce(this.options.pongTimeout,function(){D.timeline.error({pong_timed_out:D.options.pongTimeout}),D.retryIn(0)})},p.prototype.resetActivityCheck=function(){var D=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new ce(this.activityTimeout,function(){D.sendActivityCheck()}))},p.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},p.prototype.buildConnectionCallbacks=function(D){var G=this;return Be({},D,{message:function(A){G.resetActivityCheck(),G.emit("message",A)},ping:function(){G.send_event("pusher:pong",{})},activity:function(){G.resetActivityCheck()},error:function(A){G.emit("error",{type:"WebSocketError",error:A})},closed:function(){G.abandonConnection(),G.shouldRetry()&&G.retryIn(1e3)}})},p.prototype.buildHandshakeCallbacks=function(D){var G=this;return Be({},D,{connected:function(A){G.activityTimeout=Math.min(G.options.activityTimeout,A.activityTimeout,A.connection.activityTimeout||1/0),G.clearUnavailableTimer(),G.setConnection(A.connection),G.socket_id=G.connection.id,G.updateState("connected",{socket_id:G.socket_id})}})},p.prototype.buildErrorCallbacks=function(){var D=this,G=function(A){return function(Q){Q.error&&D.emit("error",{type:"WebSocketError",error:Q.error}),A(Q)}};return{tls_only:G(function(){D.usingTLS=!0,D.updateStrategy(),D.retryIn(0)}),refused:G(function(){D.disconnect()}),backoff:G(function(){D.retryIn(1e3)}),retry:G(function(){D.retryIn(0)})}},p.prototype.setConnection=function(D){this.connection=D;for(var G in this.connectionCallbacks)this.connection.bind(G,this.connectionCallbacks[G]);this.resetActivityCheck()},p.prototype.abandonConnection=function(){if(!!this.connection){this.stopActivityCheck();for(var D in this.connectionCallbacks)this.connection.unbind(D,this.connectionCallbacks[D]);var G=this.connection;return this.connection=null,G}},p.prototype.updateState=function(D,G){var A=this.state;if(this.state=D,A!==D){var Q=D;Q==="connected"&&(Q+=" with new socket ID "+G.socket_id),sn.debug("State changed",A+" -> "+Q),this.timeline.info({state:D,params:G}),this.emit("state_change",{previous:A,current:D}),this.emit(D,G)}},p.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},p}(pa),WD=bE,EE=function(){function m(){this.channels={}}return m.prototype.add=function(p,D){return this.channels[p]||(this.channels[p]=$D(p,D)),this.channels[p]},m.prototype.all=function(){return Hn(this.channels)},m.prototype.find=function(p){return this.channels[p]},m.prototype.remove=function(p){var D=this.channels[p];return delete this.channels[p],D},m.prototype.disconnect=function(){ra(this.channels,function(p){p.disconnect()})},m}(),IE=EE;function $D(m,p){if(m.indexOf("private-encrypted-")===0){if(p.config.nacl)return Ni.createEncryptedChannel(m,p,p.config.nacl);var D="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",G=Da.buildLogSuffix("encryptedChannelSupport");throw new Q_(D+". "+G)}else return m.indexOf("private-")===0?Ni.createPrivateChannel(m,p):m.indexOf("presence-")===0?Ni.createPresenceChannel(m,p):Ni.createChannel(m,p)}var TE={createChannels:function(){return new IE},createConnectionManager:function(m,p){return new WD(m,p)},createChannel:function(m,p){return new BD(m,p)},createPrivateChannel:function(m,p){return new md(m,p)},createPresenceChannel:function(m,p){return new DE(m,p)},createEncryptedChannel:function(m,p,D){return new yE(m,p,D)},createTimelineSender:function(m,p){return new z_(m,p)},createAuthorizer:function(m,p){return p.authorizer?p.authorizer(m,p):new ef(m,p)},createHandshake:function(m,p){return new Pi(m,p)},createAssistantToTheTransportManager:function(m,p,D){return new Ql(m,p,D)}},Ni=TE,SE=function(){function m(p){this.options=p||{},this.livesLeft=this.options.lives||1/0}return m.prototype.getAssistant=function(p){return Ni.createAssistantToTheTransportManager(this,p,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},m.prototype.isAlive=function(){return this.livesLeft>0},m.prototype.reportDeath=function(){this.livesLeft-=1},m}(),zD=SE,CE=function(){function m(p,D){this.strategies=p,this.loop=Boolean(D.loop),this.failFast=Boolean(D.failFast),this.timeout=D.timeout,this.timeoutLimit=D.timeoutLimit}return m.prototype.isSupported=function(){return En(this.strategies,Ce.method("isSupported"))},m.prototype.connect=function(p,D){var G=this,A=this.strategies,Q=0,be=this.timeout,_n=null,ha=function(gt,zt){zt?D(null,zt):(Q=Q+1,G.loop&&(Q=Q%A.length),Q0&&(Q=new ce(G.timeout,function(){be.abort(),A(!0)})),be=p.connect(D,function(_n,ha){_n&&Q&&Q.isRunning()&&!G.failFast||(Q&&Q.ensureAborted(),A(_n,ha))}),{abort:function(){Q&&Q.ensureAborted(),be.abort()},forceMinPriority:function(_n){be.forceMinPriority(_n)}}},m}(),Oc=CE,FE=function(){function m(p){this.strategies=p}return m.prototype.isSupported=function(){return En(this.strategies,Ce.method("isSupported"))},m.prototype.connect=function(p,D){return GE(this.strategies,p,function(G,A){return function(Q,be){if(A[G].error=Q,Q){VD(A)&&D(!0);return}Kn(A,function(_n){_n.forceMinPriority(be.transport.priority)}),D(null,be)}})},m}(),Dd=FE;function GE(m,p,D){var G=qn(m,function(A,Q,be,_n){return A.connect(p,D(Q,_n))});return{abort:function(){Kn(G,gd)},forceMinPriority:function(A){Kn(G,function(Q){Q.forceMinPriority(A)})}}}function VD(m){return gn(m,function(p){return Boolean(p.error)})}function gd(m){!m.error&&!m.aborted&&(m.abort(),m.aborted=!0)}var ME=function(){function m(p,D,G){this.strategy=p,this.transports=D,this.ttl=G.ttl||1800*1e3,this.usingTLS=G.useTLS,this.timeline=G.timeline}return m.prototype.isSupported=function(){return this.strategy.isSupported()},m.prototype.connect=function(p,D){var G=this.usingTLS,A=QD(G),Q=[this.strategy];if(A&&A.timestamp+this.ttl>=Ce.now()){var be=this.transports[A.transport];be&&(this.timeline.info({cached:!0,transport:A.transport,latency:A.latency}),Q.push(new Oc([be],{timeout:A.latency*2+1e3,failFast:!0})))}var _n=Ce.now(),ha=Q.pop().connect(p,function gt(zt,bo){zt?(KD(G),Q.length>0?(_n=Ce.now(),ha=Q.pop().connect(p,gt)):D(zt)):(LE(G,bo.transport.name,Ce.now()-_n),D(null,bo))});return{abort:function(){ha.abort()},forceMinPriority:function(gt){p=gt,ha&&ha.forceMinPriority(gt)}}},m}(),AE=ME;function Rd(m){return"pusherTransport"+(m?"TLS":"NonTLS")}function QD(m){var p=qa.getLocalStorage();if(p)try{var D=p[Rd(m)];if(D)return JSON.parse(D)}catch{KD(m)}return null}function LE(m,p,D){var G=qa.getLocalStorage();if(G)try{G[Rd(m)]=La({timestamp:Ce.now(),transport:p,latency:D})}catch{}}function KD(m){var p=qa.getLocalStorage();if(p)try{delete p[Rd(m)]}catch{}}var PE=function(){function m(p,D){var G=D.delay;this.strategy=p,this.options={delay:G}}return m.prototype.isSupported=function(){return this.strategy.isSupported()},m.prototype.connect=function(p,D){var G=this.strategy,A,Q=new ce(this.options.delay,function(){A=G.connect(p,D)});return{abort:function(){Q.ensureAborted(),A&&A.abort()},forceMinPriority:function(be){p=be,A&&A.forceMinPriority(be)}}},m}(),K_=PE,YD=function(){function m(p,D,G){this.test=p,this.trueBranch=D,this.falseBranch=G}return m.prototype.isSupported=function(){var p=this.test()?this.trueBranch:this.falseBranch;return p.isSupported()},m.prototype.connect=function(p,D){var G=this.test()?this.trueBranch:this.falseBranch;return G.connect(p,D)},m}(),nf=YD,xE=function(){function m(p){this.strategy=p}return m.prototype.isSupported=function(){return this.strategy.isSupported()},m.prototype.connect=function(p,D){var G=this.strategy.connect(p,function(A,Q){Q&&G.abort(),D(A,Q)});return G},m}(),NE=xE;function El(m){return function(){return m.isSupported()}}var XD=function(m,p,D){var G={};function A(Gr,mg,hg,vI,Dg){var w=D(m,Gr,mg,hg,vI,Dg);return G[Gr]=w,w}var Q=Object.assign({},p,{hostNonTLS:m.wsHost+":"+m.wsPort,hostTLS:m.wsHost+":"+m.wssPort,httpPath:m.wsPath}),be=Object.assign({},Q,{useTLS:!0}),_n=Object.assign({},p,{hostNonTLS:m.httpHost+":"+m.httpPort,hostTLS:m.httpHost+":"+m.httpsPort,httpPath:m.httpPath}),ha={loop:!0,timeout:15e3,timeoutLimit:6e4},gt=new zD({lives:2,minPingDelay:1e4,maxPingDelay:m.activityTimeout}),zt=new zD({lives:2,minPingDelay:1e4,maxPingDelay:m.activityTimeout}),bo=A("ws","ws",3,Q,gt),oi=A("wss","ws",3,be,gt),iI=A("sockjs","sockjs",1,_n),cg=A("xhr_streaming","xhr_streaming",1,_n,zt),sg=A("xdr_streaming","xdr_streaming",1,_n,zt),vg=A("xhr_polling","xhr_polling",1,_n),lI=A("xdr_polling","xdr_polling",1,_n),fg=new Oc([bo],ha),cI=new Oc([oi],ha),sI=new Oc([iI],ha),_g=new Oc([new nf(El(cg),cg,sg)],ha),pg=new Oc([new nf(El(vg),vg,lI)],ha),dg=new Oc([new nf(El(_g),new Dd([_g,new K_(pg,{delay:4e3})]),pg)],ha),Td=new nf(El(dg),dg,sI),Sd;return p.useTLS?Sd=new Dd([fg,new K_(Td,{delay:2e3})]):Sd=new Dd([fg,new K_(cI,{delay:2e3}),new K_(Td,{delay:5e3})]),new AE(new NE(new nf(El(bo),Sd,Td)),G,{ttl:18e5,timeline:p.timeline,useTLS:p.useTLS})},jE=XD,OE=function(){var m=this;m.timeline.info(m.buildTimelineMessage({transport:m.name+(m.options.useTLS?"s":"")})),m.hooks.isInitialized()?m.changeState("initialized"):m.hooks.file?(m.changeState("initializing"),d.load(m.hooks.file,{useTLS:m.options.useTLS},function(p,D){m.hooks.isInitialized()?(m.changeState("initialized"),D(!0)):(p&&m.onError(p),m.onClose(),D(!1))})):m.onClose()},ZD={getRequest:function(m){var p=new window.XDomainRequest;return p.ontimeout=function(){m.emit("error",new jc),m.close()},p.onerror=function(D){m.emit("error",D),m.close()},p.onprogress=function(){p.responseText&&p.responseText.length>0&&m.onChunk(200,p.responseText)},p.onload=function(){p.responseText&&p.responseText.length>0&&m.onChunk(200,p.responseText),m.emit("finished",200),m.close()},p},abortRequest:function(m){m.ontimeout=m.onerror=m.onprogress=m.onload=null,m.abort()}},UE=ZD,eg=function(){var m=function(p,D){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,A){G.__proto__=A}||function(G,A){for(var Q in A)A.hasOwnProperty(Q)&&(G[Q]=A[Q])},m(p,D)};return function(p,D){m(p,D);function G(){this.constructor=p}p.prototype=D===null?Object.create(D):(G.prototype=D.prototype,new G)}}(),kE=256*1024,ng=function(m){eg(p,m);function p(D,G,A){var Q=m.call(this)||this;return Q.hooks=D,Q.method=G,Q.url=A,Q}return p.prototype.start=function(D){var G=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){G.close()},qa.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)},p.prototype.close=function(){this.unloader&&(qa.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},p.prototype.onChunk=function(D,G){for(;;){var A=this.advanceBuffer(G);if(A)this.emit("chunk",{status:D,data:A});else break}this.isBufferTooLong(G)&&this.emit("buffer_too_long")},p.prototype.advanceBuffer=function(D){var G=D.slice(this.position),A=G.indexOf(` `);return A!==-1?(this.position+=A+1,G.slice(0,A)):null},p.prototype.isBufferTooLong=function(D){return this.position===D.length&&D.length>kE},p}(pa),ag=ng,af;(function(m){m[m.CONNECTING=0]="CONNECTING",m[m.OPEN=1]="OPEN",m[m.CLOSED=3]="CLOSED"})(af||(af={}));var ji=af,BE=1,tg=function(){function m(p,D){this.hooks=p,this.session=Tu(1e3)+"/"+Il(8),this.location=HE(D),this.readyState=ji.CONNECTING,this.openStream()}return m.prototype.send=function(p){return this.sendRaw(JSON.stringify([p]))},m.prototype.ping=function(){this.hooks.sendHeartbeat(this)},m.prototype.close=function(p,D){this.onClose(p,D,!0)},m.prototype.sendRaw=function(p){if(this.readyState===ji.OPEN)try{return qa.createSocketRequest("POST",yd(qE(this.location,this.session))).start(p),!0}catch{return!1}else return!1},m.prototype.reconnect=function(){this.closeStream(),this.openStream()},m.prototype.onClose=function(p,D,G){this.closeStream(),this.readyState=ji.CLOSED,this.onclose&&this.onclose({code:p,reason:D,wasClean:G})},m.prototype.onChunk=function(p){if(p.status===200){this.readyState===ji.OPEN&&this.onActivity();var D,G=p.data.slice(0,1);switch(G){case"o":D=JSON.parse(p.data.slice(1)||"{}"),this.onOpen(D);break;case"a":D=JSON.parse(p.data.slice(1)||"[]");for(var A=0;A0&&m.onChunk(D.status,D.responseText);break;case 4:D.responseText&&D.responseText.length>0&&m.onChunk(D.status,D.responseText),m.emit("finished",D.status),m.close();break}},D},abortRequest:function(m){m.onreadystatechange=null,m.abort()}},Ha=og,Uc={createStreamingSocket:function(m){return this.createSocket($E,m)},createPollingSocket:function(m){return this.createSocket(VE,m)},createSocket:function(m,p){return new JE(m,p)},createXHR:function(m,p){return this.createRequest(Ha,m,p)},createRequest:function(m,p,D){return new ag(m,p,D)}},wd=Uc;wd.createXDR=function(m,p){return this.createRequest(UE,m,p)};var QE=wd,KE={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:o,DependenciesReceivers:R,getDefaultStrategy:jE,Transports:wo,transportConnectionInitializer:OE,HTTPFactory:QE,TimelineTransport:re,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(m){var p=this;window.Pusher=m;var D=function(){p.onDocumentBody(m.ready)};window.JSON?D():d.load("json2",{},D)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:q,jsonp:j}},onDocumentBody:function(m){var p=this;document.body?m():setTimeout(function(){p.onDocumentBody(m)},0)},createJSONPRequest:function(m,p){return new J(m,p)},createScriptRequest:function(m){return new P(m)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var m=this.getXHRAPI();return new m},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return ri},createWebSocket:function(m){var p=this.getWebSocketAPI();return new p(m)},createSocketRequest:function(m,p){if(this.isXHRSupported())return this.HTTPFactory.createXHR(m,p);if(this.isXDRSupported(p.indexOf("https:")===0))return this.HTTPFactory.createXDR(m,p);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var m=this.getXHRAPI();return Boolean(m)&&new m().withCredentials!==void 0},isXDRSupported:function(m){var p=m?"https:":"http:",D=this.getProtocol();return Boolean(window.XDomainRequest)&&D===p},addUnloadListener:function(m){window.addEventListener!==void 0?window.addEventListener("unload",m,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",m)},removeUnloadListener:function(m){window.addEventListener!==void 0?window.removeEventListener("unload",m,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",m)}},qa=KE,Y_;(function(m){m[m.ERROR=3]="ERROR",m[m.INFO=6]="INFO",m[m.DEBUG=7]="DEBUG"})(Y_||(Y_={}));var X_=Y_,YE=function(){function m(p,D,G){this.key=p,this.session=D,this.events=[],this.options=G||{},this.sent=0,this.uniqueID=0}return m.prototype.log=function(p,D){p<=this.options.level&&(this.events.push(Be({},D,{timestamp:Ce.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},m.prototype.error=function(p){this.log(X_.ERROR,p)},m.prototype.info=function(p){this.log(X_.INFO,p)},m.prototype.debug=function(p){this.log(X_.DEBUG,p)},m.prototype.isEmpty=function(){return this.events.length===0},m.prototype.send=function(p,D){var G=this,A=Be({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=[],p(A,function(Q,be){Q||G.sent++,D&&D(Q,be)}),!0},m.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},m}(),ug=YE,bd=function(){function m(p,D,G,A){this.name=p,this.priority=D,this.transport=G,this.options=A||{}}return m.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},m.prototype.connect=function(p,D){var G=this;if(this.isSupported()){if(this.priority{"use strict";var Do=typeof Symbol=="function"&&Symbol.for,MF=Do?Symbol.for("react.element"):60103,AF=Do?Symbol.for("react.portal"):60106,dw=Do?Symbol.for("react.fragment"):60107,mw=Do?Symbol.for("react.strict_mode"):60108,hw=Do?Symbol.for("react.profiler"):60114,Dw=Do?Symbol.for("react.provider"):60109,gw=Do?Symbol.for("react.context"):60110,LF=Do?Symbol.for("react.async_mode"):60111,Rw=Do?Symbol.for("react.concurrent_mode"):60111,yw=Do?Symbol.for("react.forward_ref"):60112,ww=Do?Symbol.for("react.suspense"):60113,Vve=Do?Symbol.for("react.suspense_list"):60120,bw=Do?Symbol.for("react.memo"):60115,Ew=Do?Symbol.for("react.lazy"):60116,Qve=Do?Symbol.for("react.block"):60121,Kve=Do?Symbol.for("react.fundamental"):60117,Yve=Do?Symbol.for("react.responder"):60118,Xve=Do?Symbol.for("react.scope"):60119;function Si(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case MF:switch(e=e.type,e){case LF:case Rw:case dw:case hw:case mw:case ww:return e;default:switch(e=e&&e.$$typeof,e){case gw:case yw:case Ew:case bw:case Dw:return e;default:return n}}case AF:return n}}}function OU(e){return Si(e)===Rw}jt.AsyncMode=LF;jt.ConcurrentMode=Rw;jt.ContextConsumer=gw;jt.ContextProvider=Dw;jt.Element=MF;jt.ForwardRef=yw;jt.Fragment=dw;jt.Lazy=Ew;jt.Memo=bw;jt.Portal=AF;jt.Profiler=hw;jt.StrictMode=mw;jt.Suspense=ww;jt.isAsyncMode=function(e){return OU(e)||Si(e)===LF};jt.isConcurrentMode=OU;jt.isContextConsumer=function(e){return Si(e)===gw};jt.isContextProvider=function(e){return Si(e)===Dw};jt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===MF};jt.isForwardRef=function(e){return Si(e)===yw};jt.isFragment=function(e){return Si(e)===dw};jt.isLazy=function(e){return Si(e)===Ew};jt.isMemo=function(e){return Si(e)===bw};jt.isPortal=function(e){return Si(e)===AF};jt.isProfiler=function(e){return Si(e)===hw};jt.isStrictMode=function(e){return Si(e)===mw};jt.isSuspense=function(e){return Si(e)===ww};jt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===dw||e===Rw||e===hw||e===mw||e===ww||e===Vve||typeof e=="object"&&e!==null&&(e.$$typeof===Ew||e.$$typeof===bw||e.$$typeof===Dw||e.$$typeof===gw||e.$$typeof===yw||e.$$typeof===Kve||e.$$typeof===Yve||e.$$typeof===Xve||e.$$typeof===Qve)};jt.typeOf=Si});var BU=je((gCa,kU)=>{"use strict";kU.exports=UU()});var y_=je((LCa,Sw)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var a=[],t=0;t{function Ofe(){this.__data__=[],this.size=0}A6.exports=Ofe});var tG=je((bGa,P6)=>{function Ufe(e,n){return e===n||e!==e&&n!==n}P6.exports=Ufe});var Dh=je((EGa,x6)=>{var kfe=tG();function Bfe(e,n){for(var a=e.length;a--;)if(kfe(e[a][0],n))return a;return-1}x6.exports=Bfe});var j6=je((IGa,N6)=>{var Hfe=Dh(),qfe=Array.prototype,Jfe=qfe.splice;function Wfe(e){var n=this.__data__,a=Hfe(n,e);if(a<0)return!1;var t=n.length-1;return a==t?n.pop():Jfe.call(n,a,1),--this.size,!0}N6.exports=Wfe});var U6=je((TGa,O6)=>{var $fe=Dh();function zfe(e){var n=this.__data__,a=$fe(n,e);return a<0?void 0:n[a][1]}O6.exports=zfe});var B6=je((SGa,k6)=>{var Vfe=Dh();function Qfe(e){return Vfe(this.__data__,e)>-1}k6.exports=Qfe});var q6=je((CGa,H6)=>{var Kfe=Dh();function Yfe(e,n){var a=this.__data__,t=Kfe(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this}H6.exports=Yfe});var gh=je((FGa,J6)=>{var Xfe=L6(),Zfe=j6(),e_e=U6(),n_e=B6(),a_e=q6();function Tp(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var t_e=gh();function r_e(){this.__data__=new t_e,this.size=0}W6.exports=r_e});var V6=je((MGa,z6)=>{function o_e(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a}z6.exports=o_e});var K6=je((AGa,Q6)=>{function u_e(e){return this.__data__.get(e)}Q6.exports=u_e});var X6=je((LGa,Y6)=>{function i_e(e){return this.__data__.has(e)}Y6.exports=i_e});var rG=je((PGa,Z6)=>{var l_e=typeof global=="object"&&global&&global.Object===Object&&global;Z6.exports=l_e});var Tc=je((xGa,e5)=>{var c_e=rG(),s_e=typeof self=="object"&&self&&self.Object===Object&&self,v_e=c_e||s_e||Function("return this")();e5.exports=v_e});var Qw=je((NGa,n5)=>{var f_e=Tc(),__e=f_e.Symbol;n5.exports=__e});var o5=je((jGa,r5)=>{var a5=Qw(),t5=Object.prototype,p_e=t5.hasOwnProperty,d_e=t5.toString,Rh=a5?a5.toStringTag:void 0;function m_e(e){var n=p_e.call(e,Rh),a=e[Rh];try{e[Rh]=void 0;var t=!0}catch{}var o=d_e.call(e);return t&&(n?e[Rh]=a:delete e[Rh]),o}r5.exports=m_e});var i5=je((OGa,u5)=>{var h_e=Object.prototype,D_e=h_e.toString;function g_e(e){return D_e.call(e)}u5.exports=g_e});var yh=je((UGa,s5)=>{var l5=Qw(),R_e=o5(),y_e=i5(),w_e="[object Null]",b_e="[object Undefined]",c5=l5?l5.toStringTag:void 0;function E_e(e){return e==null?e===void 0?b_e:w_e:c5&&c5 in Object(e)?R_e(e):y_e(e)}s5.exports=E_e});var oG=je((kGa,v5)=>{function I_e(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}v5.exports=I_e});var uG=je((BGa,f5)=>{var T_e=yh(),S_e=oG(),C_e="[object AsyncFunction]",F_e="[object Function]",G_e="[object GeneratorFunction]",M_e="[object Proxy]";function A_e(e){if(!S_e(e))return!1;var n=T_e(e);return n==F_e||n==G_e||n==C_e||n==M_e}f5.exports=A_e});var p5=je((HGa,_5)=>{var L_e=Tc(),P_e=L_e["__core-js_shared__"];_5.exports=P_e});var h5=je((qGa,m5)=>{var iG=p5(),d5=function(){var e=/[^.]+$/.exec(iG&&iG.keys&&iG.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function x_e(e){return!!d5&&d5 in e}m5.exports=x_e});var lG=je((JGa,D5)=>{var N_e=Function.prototype,j_e=N_e.toString;function O_e(e){if(e!=null){try{return j_e.call(e)}catch{}try{return e+""}catch{}}return""}D5.exports=O_e});var R5=je((WGa,g5)=>{var U_e=uG(),k_e=h5(),B_e=oG(),H_e=lG(),q_e=/[\\^$.*+?()[\]{}|]/g,J_e=/^\[object .+?Constructor\]$/,W_e=Function.prototype,$_e=Object.prototype,z_e=W_e.toString,V_e=$_e.hasOwnProperty,Q_e=RegExp("^"+z_e.call(V_e).replace(q_e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function K_e(e){if(!B_e(e)||k_e(e))return!1;var n=U_e(e)?Q_e:J_e;return n.test(H_e(e))}g5.exports=K_e});var w5=je(($Ga,y5)=>{function Y_e(e,n){return e==null?void 0:e[n]}y5.exports=Y_e});var b_=je((zGa,b5)=>{var X_e=R5(),Z_e=w5();function e0e(e,n){var a=Z_e(e,n);return X_e(a)?a:void 0}b5.exports=e0e});var Kw=je((VGa,E5)=>{var n0e=b_(),a0e=Tc(),t0e=n0e(a0e,"Map");E5.exports=t0e});var wh=je((QGa,I5)=>{var r0e=b_(),o0e=r0e(Object,"create");I5.exports=o0e});var C5=je((KGa,S5)=>{var T5=wh();function u0e(){this.__data__=T5?T5(null):{},this.size=0}S5.exports=u0e});var G5=je((YGa,F5)=>{function i0e(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}F5.exports=i0e});var A5=je((XGa,M5)=>{var l0e=wh(),c0e="__lodash_hash_undefined__",s0e=Object.prototype,v0e=s0e.hasOwnProperty;function f0e(e){var n=this.__data__;if(l0e){var a=n[e];return a===c0e?void 0:a}return v0e.call(n,e)?n[e]:void 0}M5.exports=f0e});var P5=je((ZGa,L5)=>{var _0e=wh(),p0e=Object.prototype,d0e=p0e.hasOwnProperty;function m0e(e){var n=this.__data__;return _0e?n[e]!==void 0:d0e.call(n,e)}L5.exports=m0e});var N5=je((eMa,x5)=>{var h0e=wh(),D0e="__lodash_hash_undefined__";function g0e(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=h0e&&n===void 0?D0e:n,this}x5.exports=g0e});var O5=je((nMa,j5)=>{var R0e=C5(),y0e=G5(),w0e=A5(),b0e=P5(),E0e=N5();function Sp(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var U5=O5(),I0e=gh(),T0e=Kw();function S0e(){this.size=0,this.__data__={hash:new U5,map:new(T0e||I0e),string:new U5}}k5.exports=S0e});var q5=je((tMa,H5)=>{function C0e(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}H5.exports=C0e});var bh=je((rMa,J5)=>{var F0e=q5();function G0e(e,n){var a=e.__data__;return F0e(n)?a[typeof n=="string"?"string":"hash"]:a.map}J5.exports=G0e});var $5=je((oMa,W5)=>{var M0e=bh();function A0e(e){var n=M0e(this,e).delete(e);return this.size-=n?1:0,n}W5.exports=A0e});var V5=je((uMa,z5)=>{var L0e=bh();function P0e(e){return L0e(this,e).get(e)}z5.exports=P0e});var K5=je((iMa,Q5)=>{var x0e=bh();function N0e(e){return x0e(this,e).has(e)}Q5.exports=N0e});var X5=je((lMa,Y5)=>{var j0e=bh();function O0e(e,n){var a=j0e(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this}Y5.exports=O0e});var cG=je((cMa,Z5)=>{var U0e=B5(),k0e=$5(),B0e=V5(),H0e=K5(),q0e=X5();function Cp(e){var n=-1,a=e==null?0:e.length;for(this.clear();++n{var J0e=gh(),W0e=Kw(),$0e=cG(),z0e=200;function V0e(e,n){var a=this.__data__;if(a instanceof J0e){var t=a.__data__;if(!W0e||t.length{var Q0e=gh(),K0e=$6(),Y0e=V6(),X0e=K6(),Z0e=X6(),epe=n9();function Fp(e){var n=this.__data__=new Q0e(e);this.size=n.size}Fp.prototype.clear=K0e;Fp.prototype.delete=Y0e;Fp.prototype.get=X0e;Fp.prototype.has=Z0e;Fp.prototype.set=epe;a9.exports=Fp});var o9=je((fMa,r9)=>{var npe="__lodash_hash_undefined__";function ape(e){return this.__data__.set(e,npe),this}r9.exports=ape});var i9=je((_Ma,u9)=>{function tpe(e){return this.__data__.has(e)}u9.exports=tpe});var c9=je((pMa,l9)=>{var rpe=cG(),ope=o9(),upe=i9();function Yw(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new rpe;++n{function ipe(e,n){for(var a=-1,t=e==null?0:e.length;++a{function lpe(e,n){return e.has(n)}f9.exports=lpe});var sG=je((hMa,p9)=>{var cpe=c9(),spe=v9(),vpe=_9(),fpe=1,_pe=2;function ppe(e,n,a,t,o,u){var i=a&fpe,l=e.length,s=n.length;if(l!=s&&!(i&&s>l))return!1;var R=u.get(e),d=u.get(n);if(R&&d)return R==n&&d==e;var y=-1,I=!0,b=a&_pe?new cpe:void 0;for(u.set(e,n),u.set(n,e);++y{var dpe=Tc(),mpe=dpe.Uint8Array;d9.exports=mpe});var D9=je((gMa,h9)=>{function hpe(e){var n=-1,a=Array(e.size);return e.forEach(function(t,o){a[++n]=[o,t]}),a}h9.exports=hpe});var R9=je((RMa,g9)=>{function Dpe(e){var n=-1,a=Array(e.size);return e.forEach(function(t){a[++n]=t}),a}g9.exports=Dpe});var I9=je((yMa,E9)=>{var y9=Qw(),w9=m9(),gpe=tG(),Rpe=sG(),ype=D9(),wpe=R9(),bpe=1,Epe=2,Ipe="[object Boolean]",Tpe="[object Date]",Spe="[object Error]",Cpe="[object Map]",Fpe="[object Number]",Gpe="[object RegExp]",Mpe="[object Set]",Ape="[object String]",Lpe="[object Symbol]",Ppe="[object ArrayBuffer]",xpe="[object DataView]",b9=y9?y9.prototype:void 0,vG=b9?b9.valueOf:void 0;function Npe(e,n,a,t,o,u,i){switch(a){case xpe:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case Ppe:return!(e.byteLength!=n.byteLength||!u(new w9(e),new w9(n)));case Ipe:case Tpe:case Fpe:return gpe(+e,+n);case Spe:return e.name==n.name&&e.message==n.message;case Gpe:case Ape:return e==n+"";case Cpe:var l=ype;case Mpe:var s=t&bpe;if(l||(l=wpe),e.size!=n.size&&!s)return!1;var R=i.get(e);if(R)return R==n;t|=Epe,i.set(e,n);var d=Rpe(l(e),l(n),t,o,u,i);return i.delete(e),d;case Lpe:if(vG)return vG.call(e)==vG.call(n)}return!1}E9.exports=Npe});var S9=je((wMa,T9)=>{function jpe(e,n){for(var a=-1,t=n.length,o=e.length;++a{var Ope=Array.isArray;C9.exports=Ope});var G9=je((EMa,F9)=>{var Upe=S9(),kpe=Xw();function Bpe(e,n,a){var t=n(e);return kpe(e)?t:Upe(t,a(e))}F9.exports=Bpe});var A9=je((IMa,M9)=>{function Hpe(e,n){for(var a=-1,t=e==null?0:e.length,o=0,u=[];++a{function qpe(){return[]}L9.exports=qpe});var j9=je((SMa,N9)=>{var Jpe=A9(),Wpe=P9(),$pe=Object.prototype,zpe=$pe.propertyIsEnumerable,x9=Object.getOwnPropertySymbols,Vpe=x9?function(e){return e==null?[]:(e=Object(e),Jpe(x9(e),function(n){return zpe.call(e,n)}))}:Wpe;N9.exports=Vpe});var U9=je((CMa,O9)=>{function Qpe(e,n){for(var a=-1,t=Array(e);++a{function Kpe(e){return e!=null&&typeof e=="object"}k9.exports=Kpe});var H9=je((GMa,B9)=>{var Ype=yh(),Xpe=Eh(),Zpe="[object Arguments]";function ede(e){return Xpe(e)&&Ype(e)==Zpe}B9.exports=ede});var $9=je((MMa,W9)=>{var q9=H9(),nde=Eh(),J9=Object.prototype,ade=J9.hasOwnProperty,tde=J9.propertyIsEnumerable,rde=q9(function(){return arguments}())?q9:function(e){return nde(e)&&ade.call(e,"callee")&&!tde.call(e,"callee")};W9.exports=rde});var V9=je((AMa,z9)=>{function ode(){return!1}z9.exports=ode});var fG=je((Ih,Gp)=>{var ude=Tc(),ide=V9(),Q9=typeof Ih=="object"&&Ih&&!Ih.nodeType&&Ih,K9=Q9&&typeof Gp=="object"&&Gp&&!Gp.nodeType&&Gp,lde=K9&&K9.exports===Q9,Y9=lde?ude.Buffer:void 0,cde=Y9?Y9.isBuffer:void 0,sde=cde||ide;Gp.exports=sde});var Z9=je((LMa,X9)=>{var vde=9007199254740991,fde=/^(?:0|[1-9]\d*)$/;function _de(e,n){var a=typeof e;return n=n==null?vde:n,!!n&&(a=="number"||a!="symbol"&&fde.test(e))&&e>-1&&e%1==0&&e{var pde=9007199254740991;function dde(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=pde}ek.exports=dde});var ak=je((xMa,nk)=>{var mde=yh(),hde=_G(),Dde=Eh(),gde="[object Arguments]",Rde="[object Array]",yde="[object Boolean]",wde="[object Date]",bde="[object Error]",Ede="[object Function]",Ide="[object Map]",Tde="[object Number]",Sde="[object Object]",Cde="[object RegExp]",Fde="[object Set]",Gde="[object String]",Mde="[object WeakMap]",Ade="[object ArrayBuffer]",Lde="[object DataView]",Pde="[object Float32Array]",xde="[object Float64Array]",Nde="[object Int8Array]",jde="[object Int16Array]",Ode="[object Int32Array]",Ude="[object Uint8Array]",kde="[object Uint8ClampedArray]",Bde="[object Uint16Array]",Hde="[object Uint32Array]",ur={};ur[Pde]=ur[xde]=ur[Nde]=ur[jde]=ur[Ode]=ur[Ude]=ur[kde]=ur[Bde]=ur[Hde]=!0;ur[gde]=ur[Rde]=ur[Ade]=ur[yde]=ur[Lde]=ur[wde]=ur[bde]=ur[Ede]=ur[Ide]=ur[Tde]=ur[Sde]=ur[Cde]=ur[Fde]=ur[Gde]=ur[Mde]=!1;function qde(e){return Dde(e)&&hde(e.length)&&!!ur[mde(e)]}nk.exports=qde});var rk=je((NMa,tk)=>{function Jde(e){return function(n){return e(n)}}tk.exports=Jde});var uk=je((Sh,Mp)=>{var Wde=rG(),ok=typeof Sh=="object"&&Sh&&!Sh.nodeType&&Sh,Th=ok&&typeof Mp=="object"&&Mp&&!Mp.nodeType&&Mp,$de=Th&&Th.exports===ok,pG=$de&&Wde.process,zde=function(){try{var e=Th&&Th.require&&Th.require("util").types;return e||pG&&pG.binding&&pG.binding("util")}catch{}}();Mp.exports=zde});var dG=je((jMa,ck)=>{var Vde=ak(),Qde=rk(),ik=uk(),lk=ik&&ik.isTypedArray,Kde=lk?Qde(lk):Vde;ck.exports=Kde});var vk=je((OMa,sk)=>{var Yde=U9(),Xde=$9(),Zde=Xw(),eme=fG(),nme=Z9(),ame=dG(),tme=Object.prototype,rme=tme.hasOwnProperty;function ome(e,n){var a=Zde(e),t=!a&&Xde(e),o=!a&&!t&&eme(e),u=!a&&!t&&!o&&ame(e),i=a||t||o||u,l=i?Yde(e.length,String):[],s=l.length;for(var R in e)(n||rme.call(e,R))&&!(i&&(R=="length"||o&&(R=="offset"||R=="parent")||u&&(R=="buffer"||R=="byteLength"||R=="byteOffset")||nme(R,s)))&&l.push(R);return l}sk.exports=ome});var _k=je((UMa,fk)=>{var ume=Object.prototype;function ime(e){var n=e&&e.constructor,a=typeof n=="function"&&n.prototype||ume;return e===a}fk.exports=ime});var dk=je((kMa,pk)=>{function lme(e,n){return function(a){return e(n(a))}}pk.exports=lme});var hk=je((BMa,mk)=>{var cme=dk(),sme=cme(Object.keys,Object);mk.exports=sme});var gk=je((HMa,Dk)=>{var vme=_k(),fme=hk(),_me=Object.prototype,pme=_me.hasOwnProperty;function dme(e){if(!vme(e))return fme(e);var n=[];for(var a in Object(e))pme.call(e,a)&&a!="constructor"&&n.push(a);return n}Dk.exports=dme});var yk=je((qMa,Rk)=>{var mme=uG(),hme=_G();function Dme(e){return e!=null&&hme(e.length)&&!mme(e)}Rk.exports=Dme});var bk=je((JMa,wk)=>{var gme=vk(),Rme=gk(),yme=yk();function wme(e){return yme(e)?gme(e):Rme(e)}wk.exports=wme});var Ik=je((WMa,Ek)=>{var bme=G9(),Eme=j9(),Ime=bk();function Tme(e){return bme(e,Ime,Eme)}Ek.exports=Tme});var Ck=je(($Ma,Sk)=>{var Tk=Ik(),Sme=1,Cme=Object.prototype,Fme=Cme.hasOwnProperty;function Gme(e,n,a,t,o,u){var i=a&Sme,l=Tk(e),s=l.length,R=Tk(n),d=R.length;if(s!=d&&!i)return!1;for(var y=s;y--;){var I=l[y];if(!(i?I in n:Fme.call(n,I)))return!1}var b=u.get(e),S=u.get(n);if(b&&S)return b==n&&S==e;var L=!0;u.set(e,n),u.set(n,e);for(var O=i;++y{var Mme=b_(),Ame=Tc(),Lme=Mme(Ame,"DataView");Fk.exports=Lme});var Ak=je((VMa,Mk)=>{var Pme=b_(),xme=Tc(),Nme=Pme(xme,"Promise");Mk.exports=Nme});var Pk=je((QMa,Lk)=>{var jme=b_(),Ome=Tc(),Ume=jme(Ome,"Set");Lk.exports=Ume});var Nk=je((KMa,xk)=>{var kme=b_(),Bme=Tc(),Hme=kme(Bme,"WeakMap");xk.exports=Hme});var Jk=je((YMa,qk)=>{var mG=Gk(),hG=Kw(),DG=Ak(),gG=Pk(),RG=Nk(),jk=yh(),Ap=lG(),Ok="[object Map]",qme="[object Object]",Uk="[object Promise]",kk="[object Set]",Bk="[object WeakMap]",Hk="[object DataView]",Jme=Ap(mG),Wme=Ap(hG),$me=Ap(DG),zme=Ap(gG),Vme=Ap(RG),E_=jk;(mG&&E_(new mG(new ArrayBuffer(1)))!=Hk||hG&&E_(new hG)!=Ok||DG&&E_(DG.resolve())!=Uk||gG&&E_(new gG)!=kk||RG&&E_(new RG)!=Bk)&&(E_=function(e){var n=jk(e),a=n==qme?e.constructor:void 0,t=a?Ap(a):"";if(t)switch(t){case Jme:return Hk;case Wme:return Ok;case $me:return Uk;case zme:return kk;case Vme:return Bk}return n});qk.exports=E_});var Xk=je((XMa,Yk)=>{var yG=t9(),Qme=sG(),Kme=I9(),Yme=Ck(),Wk=Jk(),$k=Xw(),zk=fG(),Xme=dG(),Zme=1,Vk="[object Arguments]",Qk="[object Array]",Zw="[object Object]",ehe=Object.prototype,Kk=ehe.hasOwnProperty;function nhe(e,n,a,t,o,u){var i=$k(e),l=$k(n),s=i?Qk:Wk(e),R=l?Qk:Wk(n);s=s==Vk?Zw:s,R=R==Vk?Zw:R;var d=s==Zw,y=R==Zw,I=s==R;if(I&&zk(e)){if(!zk(n))return!1;i=!0,d=!1}if(I&&!d)return u||(u=new yG),i||Xme(e)?Qme(e,n,a,t,o,u):Kme(e,n,s,a,t,o,u);if(!(a&Zme)){var b=d&&Kk.call(e,"__wrapped__"),S=y&&Kk.call(n,"__wrapped__");if(b||S){var L=b?e.value():e,O=S?n.value():n;return u||(u=new yG),o(L,O,a,t,u)}}return I?(u||(u=new yG),Yme(e,n,a,t,o,u)):!1}Yk.exports=nhe});var aB=je((ZMa,nB)=>{var ahe=Xk(),Zk=Eh();function eB(e,n,a,t,o){return e===n?!0:e==null||n==null||!Zk(e)&&!Zk(n)?e!==e&&n!==n:ahe(e,n,a,t,eB,o)}nB.exports=eB});var rB=je((eAa,tB)=>{var the=aB();function rhe(e,n){return the(e,n)}tB.exports=rhe});var UB=je((zLa,Ahe)=>{Ahe.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 yz=je((mD,hA)=>{typeof window!="undefined"&&function(n,a){typeof mD=="object"&&typeof hA=="object"?hA.exports=a():typeof define=="function"&&define.amd?define([],a):typeof mD=="object"?mD.Hls=a():n.Hls=a()}(mD,function(){return function(e){var n={};function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=e,a.c=n,a.d=function(t,o,u){a.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:u})},a.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,o){if(o&1&&(t=a(t)),o&8||o&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}),o&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 o=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(o,"a",o),o},a.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},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,o="~";function u(){}Object.create&&(u.prototype=Object.create(null),new u().__proto__||(o=!1));function i(d,y,I){this.fn=d,this.context=y,this.once=I||!1}function l(d,y,I,b,S){if(typeof I!="function")throw new TypeError("The listener must be a function");var L=new i(I,b||d,S),O=o?o+y:y;return d._events[O]?d._events[O].fn?d._events[O]=[d._events[O],L]:d._events[O].push(L):(d._events[O]=L,d._eventsCount++),d}function s(d,y){--d._eventsCount==0?d._events=new u:delete d._events[y]}function R(){this._events=new u,this._eventsCount=0}R.prototype.eventNames=function(){var y=[],I,b;if(this._eventsCount===0)return y;for(b in I=this._events)t.call(I,b)&&y.push(o?b.slice(1):b);return Object.getOwnPropertySymbols?y.concat(Object.getOwnPropertySymbols(I)):y},R.prototype.listeners=function(y){var I=o?o+y:y,b=this._events[I];if(!b)return[];if(b.fn)return[b.fn];for(var S=0,L=b.length,O=new Array(L);S0},!1)}function d(y,I){for(var b={main:[I]},S={main:[]},L={main:{}};R(b);)for(var O=Object.keys(b),$=0;$>>8^Hn&255^99,ee[Sn]=Hn,oe[Hn]=Sn;var Kn=Xe[Sn],qn=Xe[Kn],ft=Xe[qn],Oe=Xe[Hn]*257^Hn*16843008;ve[Sn]=Oe<<24|Oe>>>8,Re[Sn]=Oe<<16|Oe>>>16,nn[Sn]=Oe<<8|Oe>>>24,cn[Sn]=Oe,Oe=ft*16843009^qn*65537^Kn*257^Sn*16843008,le[Hn]=Oe<<24|Oe>>>8,Ne[Hn]=Oe<<16|Oe>>>16,Ce[Hn]=Oe<<8|Oe>>>24,Be[Hn]=Oe,Sn?(Sn=Kn^Xe[Xe[Xe[ft^Kn]]],ra^=Xe[Xe[ra]]):Sn=ra=1}},$.expandKey=function(ee){for(var oe=this.uint8ArrayToUint32Array_(ee),te=!0,ve=0;ve>>6)+1,N=(K[j+2]&60)>>>2,N>Ie.length-1){q.trigger(t.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+N});return}return V=(K[j+2]&1)<<2,V|=(K[j+3]&192)>>>6,l.logger.log("manifest codec:"+E+",ADTS data:type:"+P+",sampleingIndex:"+N+"["+Ie[N]+"Hz],channelConfig:"+V),/firefox/i.test(re)?N>=6?(P=5,ue=new Array(4),J=N-3):(P=2,ue=new Array(2),J=N):re.indexOf("android")!==-1?(P=2,ue=new Array(2),J=N):(P=5,ue=new Array(4),E&&(E.indexOf("mp4a.40.29")!==-1||E.indexOf("mp4a.40.5")!==-1)||!E&&N>=6?J=N-3:((E&&E.indexOf("mp4a.40.2")!==-1&&(N>=6&&V===1||/vivaldi/i.test(re))||!E&&V===1)&&(P=2,ue=new Array(2)),J=N)),ue[0]=P<<3,ue[0]|=(N&14)>>1,ue[1]|=(N&1)<<7,ue[1]|=V<<3,P===5&&(ue[1]|=(J&14)>>1,ue[2]=(J&1)<<7,ue[2]|=2<<2,ue[3]=0),{config:ue,samplerate:Ie[N],channelCount:V,codec:"mp4a.40."+P,manifestCodec:he}}function d(q,K){return q[K]===255&&(q[K+1]&246)==240}function y(q,K){return q[K+1]&1?7:9}function I(q,K){return(q[K+3]&3)<<11|q[K+4]<<3|(q[K+5]&224)>>>5}function b(q,K){return!!(K+10&&K+N+J<=ue)return V=j+E*P,{headerLength:N,frameLength:J,stamp:V}}function z(q,K,j,E,P){var N=O(q.samplerate),J=$(K,j,E,P,N);if(J){var V=J.stamp,ue=J.headerLength,re=J.frameLength,he={unit:K.subarray(j+ue,j+ue+re),pts:V,dts:V};return q.samples.push(he),{sample:he,length:re+ue}}}var ee=a("./src/demux/id3.js"),oe=function(){function q(j,E,P){this.observer=j,this.config=P,this.remuxer=E}var K=q.prototype;return K.resetInitSegment=function(E,P,N,J){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:P,duration:J,inputTimeScale:9e4}},K.resetTimeStamp=function(){},q.probe=function(E){if(!E)return!1;for(var P=ee.default.getID3Data(E,0)||[],N=P.length,J=E.length;Nj.length)){var J=this.parseHeader(j,E);if(J&&E+J.frameLength<=j.length){var V=J.samplesPerFrame*9e4/J.sampleRate,ue=P+N*V,re={unit:j.subarray(E,E+J.frameLength),pts:ue,dts:ue};return K.config=[],K.channelCount=J.channelCount,K.samplerate=J.sampleRate,K.samples.push(re),{sample:re,length:J.frameLength}}}},parseHeader:function(K,j){var E=K[j+1]>>3&3,P=K[j+1]>>1&3,N=K[j+2]>>4&15,J=K[j+2]>>2&3,V=K[j+2]>>1&1;if(E!==1&&N!==0&&N!==15&&J!==3){var ue=E===3?3-P:P===3?3:4,re=Re.BitratesMap[ue*14+N-1]*1e3,he=E===3?0:E===2?1:2,Ie=Re.SamplingRateMap[he*3+J],Fe=K[j+3]>>6==3?1:2,Ge=Re.SamplesCoefficients[E][P],ln=Re.BytesInSlot[P],mn=Ge*8*ln,Pe=parseInt(Ge*re/Ie+V,10)*ln;return{sampleRate:Ie,channelCount:Fe,frameLength:Pe,samplesPerFrame:mn}}},isHeaderPattern:function(K,j){return K[j]===255&&(K[j+1]&224)==224&&(K[j+1]&6)!=0},isHeader:function(K,j){return!!(j+1E?(this.word<<=E,this.bitsAvailable-=E):(E-=this.bitsAvailable,P=E>>3,E-=P>>3,this.bytesAvailable-=P,this.loadWord(),this.word<<=E,this.bitsAvailable-=E)},K.readBits=function(E){var P=Math.min(this.bitsAvailable,E),N=this.word>>>32-P;return E>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=E-P,P>0&&this.bitsAvailable?N<>>E)!=0)return this.word<<=E,this.bitsAvailable-=E,E;return this.loadWord(),E+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var E=this.skipLZ();return this.readBits(E+1)-1},K.readEG=function(){var E=this.readUEG();return 1&E?1+E>>>1:-1*(E>>>1)},K.readBoolean=function(){return this.readBits(1)===1},K.readUByte=function(){return this.readBits(8)},K.readUShort=function(){return this.readBits(16)},K.readUInt=function(){return this.readBits(32)},K.skipScalingList=function(E){var P=8,N=8,J,V;for(J=0;J=E.length){N();return}if(!(E[P].unit.length<32)){var J=this.decrypter.isSync();if(this.decryptAacSample(E,P,N,J),!J)return}}},K.getAvcEncryptedData=function(E){for(var P=Math.floor((E.length-48)/160)*16+16,N=new Int8Array(P),J=0,V=32;V<=E.length-16;V+=160,J+=16)N.set(E.subarray(V,V+16),J);return N},K.getAvcDecryptedUnit=function(E,P){P=new Uint8Array(P);for(var N=0,J=32;J<=E.length-16;J+=160,N+=16)E.set(P.subarray(N,N+16),J);return E},K.decryptAvcSample=function(E,P,N,J,V,ue){var re=this.discardEPB(V.data),he=this.getAvcEncryptedData(re),Ie=this;this.decryptBuffer(he.buffer,function(Fe){V.data=Ie.getAvcDecryptedUnit(re,Fe),ue||Ie.decryptAvcSamples(E,P,N+1,J)})},K.decryptAvcSamples=function(E,P,N,J){for(;;P++,N=0){if(P>=E.length){J();return}for(var V=E[P].units;!(N>=V.length);N++){var ue=V[N];if(!(ue.length<=48||ue.type!==1&&ue.type!==5)){var re=this.decrypter.isSync();if(this.decryptAvcSample(E,P,N,J,ue,re),!re)return}}}},q}(),Ne=le,Ce={video:1,audio:2,id3:3,text:4},Be=function(){function q(j,E,P,N){this.observer=j,this.config=P,this.typeSupported=N,this.remuxer=E,this.sampleAes=null}var K=q.prototype;return K.setDecryptData=function(E){E!=null&&E.key!=null&&E.method==="SAMPLE-AES"?this.sampleAes=new Ne(this.observer,this.config,E,this.discardEPB):this.sampleAes=null},q.probe=function(E){var P=q._syncOffset(E);return P<0?!1:(P&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+P+", junk ahead ?"),!0)},q._syncOffset=function(E){for(var P=Math.min(1e3,E.length-3*188),N=0;N>4,Ie>1){if(Fe=V+5+E[V+4],Fe===V+188)continue}else Fe=V+4;switch(he){case pa:re&&(pt&&(Ge=ir(pt))&&Cr(Ge,!1),pt={data:[],size:0}),pt&&(pt.data.push(E.subarray(Fe,V+188)),pt.size+=V+188-Fe);break;case Za:re&&(Pa&&(Ge=ir(Pa))&&(Rn.isAAC?ro(Ge):mr(Ge)),Pa={data:[],size:0}),Pa&&(Pa.data.push(E.subarray(Fe,V+188)),Pa.size+=V+188-Fe);break;case Lt:re&&(Ot&&(Ge=ir(Ot))&&No(Ge),Ot={data:[],size:0}),Ot&&(Ot.data.push(E.subarray(Fe,V+188)),Ot.size+=V+188-Fe);break;case 0:re&&(Fe+=E[Fe]+1),wa=this._pmtId=Ba(E,Fe);break;case wa:re&&(Fe+=E[Fe]+1);var er=Et(E,Fe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,this.sampleAes!=null);pa=er.avc,pa>0&&(Pe.pid=pa),Za=er.audio,Za>0&&(Rn.pid=Za,Rn.isAAC=er.isAAC),Lt=er.id3,Lt>0&&(Vn.pid=Lt),ln&&!mn&&(l.logger.log("reparse from beginning"),ln=!1,V=Fr-188),mn=this.pmtParsed=!0;break;case 17:case 8191:break;default:ln=!0;break}}else this.observer.trigger(t.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});pt&&(Ge=ir(pt))?(Cr(Ge,!0),Pe.pesData=null):Pe.pesData=pt,Pa&&(Ge=ir(Pa))?(Rn.isAAC?ro(Ge):mr(Ge),Rn.pesData=null):(Pa&&Pa.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),Rn.pesData=Pa),Ot&&(Ge=ir(Ot))?(No(Ge),Vn.pesData=null):Vn.pesData=Ot,this.sampleAes==null?this.remuxer.remux(Rn,Pe,Vn,this._txtTrack,P,N,J):this.decryptAndRemux(Rn,Pe,Vn,this._txtTrack,P,N,J)},K.decryptAndRemux=function(E,P,N,J,V,ue,re){if(E.samples&&E.isAAC){var he=this;this.sampleAes.decryptAacSamples(E.samples,0,function(){he.decryptAndRemuxAvc(E,P,N,J,V,ue,re)})}else this.decryptAndRemuxAvc(E,P,N,J,V,ue,re)},K.decryptAndRemuxAvc=function(E,P,N,J,V,ue,re){if(P.samples){var he=this;this.sampleAes.decryptAvcSamples(P.samples,0,0,function(){he.remuxer.remux(E,P,N,J,V,ue,re)})}else this.remuxer.remux(E,P,N,J,V,ue,re)},K.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},K._parsePAT=function(E,P){return(E[P+10]&31)<<8|E[P+11]},K._parsePMT=function(E,P,N,J){var V,ue,re,he,Ie={audio:-1,avc:-1,id3:-1,isAAC:!0};for(V=(E[P+1]&15)<<8|E[P+2],ue=P+3+V-4,re=(E[P+10]&15)<<8|E[P+11],P+=12+re;P1;){var mn=new Uint8Array(ln[0].length+ln[1].length);mn.set(ln[0]),mn.set(ln[1],ln[0].length),ln[0]=mn,ln.splice(1,1)}if(N=ln[0],V=(N[0]<<16)+(N[1]<<8)+N[2],V===1){if(ue=(N[4]<<8)+N[5],ue&&ue>E.size-6||(J=N[7],J&192&&(Ie=(N[9]&14)*536870912+(N[10]&255)*4194304+(N[11]&254)*16384+(N[12]&255)*128+(N[13]&254)/2,Ie>4294967295&&(Ie-=8589934592),J&64?(Fe=(N[14]&14)*536870912+(N[15]&255)*4194304+(N[16]&254)*16384+(N[17]&255)*128+(N[18]&254)/2,Fe>4294967295&&(Fe-=8589934592),Ie-Fe>60*9e4&&(l.logger.warn(Math.round((Ie-Fe)/9e4)+"s delta between PTS and DTS, align them"),Ie=Fe)):Fe=Ie),re=N[8],Ge=re+9,E.size<=Ge))return null;E.size-=Ge,he=new Uint8Array(E.size);for(var Pe=0,Rn=ln.length;PeVn){Ge-=Vn;continue}else N=N.subarray(Ge),Vn-=Ge,Ge=0;he.set(N,P),P+=Vn}return ue&&(ue-=re+3),{data:he,pts:Ie,dts:Fe,len:ue}}else return null},K.pushAccesUnit=function(E,P){if(E.units.length&&E.frame){var N=P.samples,J=N.length;if(isNaN(E.pts))if(J){var V=N[J-1];E.pts=V.pts,E.dts=V.dts}else{P.dropped++;return}!this.config.forceKeyFrameOnDiscontinuity||E.key===!0||P.sps&&(J||this.contiguous)?(E.id=J,N.push(E)):P.dropped++}E.debug.length&&l.logger.log(E.pts+"/"+E.dts+":"+E.debug)},K._parseAVCPES=function(E,P){var N=this,J=this._avcTrack,V=this._parseAVCNALu(E.data),ue=!1,re,he=this.avcSample,Ie,Fe=!1,Ge,ln=this.pushAccesUnit.bind(this),mn=function(Rn,Vn,pa,Za){return{key:Rn,pts:Vn,dts:pa,units:[],debug:Za}};E.data=null,he&&V.length&&!J.audFound&&(ln(he,J),he=this.avcSample=mn(!1,E.pts,E.dts,"")),V.forEach(function(Pe){switch(Pe.type){case 1:Ie=!0,he||(he=N.avcSample=mn(!0,E.pts,E.dts,"")),ue&&(he.debug+="NDR "),he.frame=!0;var Rn=Pe.data;if(Fe&&Rn.length>4){var Vn=new ce(Rn).readSliceType();(Vn===2||Vn===4||Vn===7||Vn===9)&&(he.key=!0)}break;case 5:Ie=!0,he||(he=N.avcSample=mn(!0,E.pts,E.dts,"")),ue&&(he.debug+="IDR "),he.key=!0,he.frame=!0;break;case 6:Ie=!0,ue&&he&&(he.debug+="SEI "),re=new ce(N.discardEPB(Pe.data)),re.readUByte();for(var pa=0,Za=0,Lt=!1,wa=0;!Lt&&re.bytesAvailable>1;){pa=0;do wa=re.readUByte(),pa+=wa;while(wa===255);Za=0;do wa=re.readUByte(),Za+=wa;while(wa===255);if(pa===4&&re.bytesAvailable!==0){Lt=!0;var pt=re.readUByte();if(pt===181){var Pa=re.readUShort();if(Pa===49){var Ot=re.readUInt();if(Ot===1195456820){var Ba=re.readUByte();if(Ba===3){var Et=re.readUByte(),ir=re.readUByte(),Cr=31&Et,ro=[Et,ir];for(Ge=0;Ge16){var mr=[];for(Ge=0;Ge<16;Ge++)mr.push(re.readUByte().toString(16)),(Ge===3||Ge===5||Ge===7||Ge===9)&&mr.push("-");var No=Za-16,Fr=new Uint8Array(No);for(Ge=0;Ge0){if(P.pts>=E[N-1].pts)E.push(P);else for(var J=N-1;J>=0;J--)if(P.pts=0)Fe={data:E.subarray(ln,P-re-1),type:mn},Ie.push(Fe);else{var Pe=this._getLastNalUnit();if(Pe&&(he&&P<=4-he&&Pe.state&&(Pe.data=Pe.data.subarray(0,Pe.data.byteLength-he)),V=P-re-1,V>0)){var Rn=new Uint8Array(Pe.data.byteLength+V);Rn.set(Pe.data,0),Rn.set(E.subarray(0,V),Pe.data.byteLength),Pe.data=Rn}}P=0&&re>=0&&(Fe={data:E.subarray(ln,N),type:mn,state:re},Ie.push(Fe)),Ie.length===0){var Vn=this._getLastNalUnit();if(Vn){var pa=new Uint8Array(Vn.data.byteLength+E.byteLength);pa.set(Vn.data,0),pa.set(E,Vn.data.byteLength),Vn.data=pa}}return ue.naluState=re,Ie},K.discardEPB=function(E){for(var P=E.byteLength,N=[],J=1,V,ue;J1&&(l.logger.log("AAC: align PTS for overlapping frames by "+Math.round((Vn-J)/90)),J=Vn)}for(;Fe>24&255,V[1]=P>>16&255,V[2]=P>>8&255,V[3]=P&255,V.set(j,4),N=0,P=8;N>24&255,j>>16&255,j>>8&255,j&255,P>>24,P>>16&255,P>>8&255,P&255,N>>24,N>>16&255,N>>8&255,N&255,85,196,0,0]))},q.mdia=function(j){return q.box(q.types.mdia,q.mdhd(j.timescale,j.duration),q.hdlr(j.type),q.minf(j))},q.mfhd=function(j){return q.box(q.types.mfhd,new Uint8Array([0,0,0,0,j>>24,j>>16&255,j>>8&255,j&255]))},q.minf=function(j){return j.type==="audio"?q.box(q.types.minf,q.box(q.types.smhd,q.SMHD),q.DINF,q.stbl(j)):q.box(q.types.minf,q.box(q.types.vmhd,q.VMHD),q.DINF,q.stbl(j))},q.moof=function(j,E,P){return q.box(q.types.moof,q.mfhd(j),q.traf(P,E))},q.moov=function(j){for(var E=j.length,P=[];E--;)P[E]=q.trak(j[E]);return q.box.apply(null,[q.types.moov,q.mvhd(j[0].timescale,j[0].duration)].concat(P).concat(q.mvex(j)))},q.mvex=function(j){for(var E=j.length,P=[];E--;)P[E]=q.trex(j[E]);return q.box.apply(null,[q.types.mvex].concat(P))},q.mvhd=function(j,E){E*=j;var P=Math.floor(E/(Kn+1)),N=Math.floor(E%(Kn+1)),J=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,j>>24&255,j>>16&255,j>>8&255,j&255,P>>24,P>>16&255,P>>8&255,P&255,N>>24,N>>16&255,N>>8&255,N&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return q.box(q.types.mvhd,J)},q.sdtp=function(j){var E=j.samples||[],P=new Uint8Array(4+E.length),N,J;for(J=0;J>>8&255),E.push(V&255),E=E.concat(Array.prototype.slice.call(J));for(N=0;N>>8&255),P.push(V&255),P=P.concat(Array.prototype.slice.call(J));var ue=q.box(q.types.avcC,new Uint8Array([1,E[3],E[4],E[5],252|3,224|j.sps.length].concat(E).concat([j.pps.length]).concat(P))),re=j.width,he=j.height,Ie=j.pixelRatio[0],Fe=j.pixelRatio[1];return q.box(q.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,re>>8&255,re&255,he>>8&255,he&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]),ue,q.box(q.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),q.box(q.types.pasp,new Uint8Array([Ie>>24,Ie>>16&255,Ie>>8&255,Ie&255,Fe>>24,Fe>>16&255,Fe>>8&255,Fe&255])))},q.esds=function(j){var E=j.config.length;return new Uint8Array([0,0,0,0,3,23+E,0,1,0,4,15+E,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([E]).concat(j.config).concat([6,1,2]))},q.mp4a=function(j){var E=j.samplerate;return q.box(q.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,j.channelCount,0,16,0,0,0,0,E>>8&255,E&255,0,0]),q.box(q.types.esds,q.esds(j)))},q.mp3=function(j){var E=j.samplerate;return q.box(q.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,j.channelCount,0,16,0,0,0,0,E>>8&255,E&255,0,0]))},q.stsd=function(j){return j.type==="audio"?!j.isAAC&&j.codec==="mp3"?q.box(q.types.stsd,q.STSD,q.mp3(j)):q.box(q.types.stsd,q.STSD,q.mp4a(j)):q.box(q.types.stsd,q.STSD,q.avc1(j))},q.tkhd=function(j){var E=j.id,P=j.duration*j.timescale,N=j.width,J=j.height,V=Math.floor(P/(Kn+1)),ue=Math.floor(P%(Kn+1));return q.box(q.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,E>>24&255,E>>16&255,E>>8&255,E&255,0,0,0,0,V>>24,V>>16&255,V>>8&255,V&255,ue>>24,ue>>16&255,ue>>8&255,ue&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,N>>8&255,N&255,0,0,J>>8&255,J&255,0,0]))},q.traf=function(j,E){var P=q.sdtp(j),N=j.id,J=Math.floor(E/(Kn+1)),V=Math.floor(E%(Kn+1));return q.box(q.types.traf,q.box(q.types.tfhd,new Uint8Array([0,0,0,0,N>>24,N>>16&255,N>>8&255,N&255])),q.box(q.types.tfdt,new Uint8Array([1,0,0,0,J>>24,J>>16&255,J>>8&255,J&255,V>>24,V>>16&255,V>>8&255,V&255])),q.trun(j,P.length+16+20+8+16+8+8),P)},q.trak=function(j){return j.duration=j.duration||4294967295,q.box(q.types.trak,q.tkhd(j),q.mdia(j))},q.trex=function(j){var E=j.id;return q.box(q.types.trex,new Uint8Array([0,0,0,0,E>>24,E>>16&255,E>>8&255,E&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},q.trun=function(j,E){var P=j.samples||[],N=P.length,J=12+16*N,V=new Uint8Array(J),ue,re,he,Ie,Fe,Ge;for(E+=8+J,V.set([0,0,15,1,N>>>24&255,N>>>16&255,N>>>8&255,N&255,E>>>24&255,E>>>16&255,E>>>8&255,E&255],0),ue=0;ue>>24&255,he>>>16&255,he>>>8&255,he&255,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&255,Fe.isLeading<<2|Fe.dependsOn,Fe.isDependedOn<<6|Fe.hasRedundancy<<4|Fe.paddingValue<<1|Fe.isNonSync,Fe.degradPrio&240<<8,Fe.degradPrio&15,Ge>>>24&255,Ge>>>16&255,Ge>>>8&255,Ge&255],12+16*ue);return q.box(q.types.trun,V)},q.initSegment=function(j){q.types||q.init();var E=q.moov(j),P;return P=new Uint8Array(q.FTYP.byteLength+E.byteLength),P.set(q.FTYP),P.set(E,q.FTYP.byteLength),P},q}(),ft=qn,Oe=9e4;function ua(q,K,j,E){return j===void 0&&(j=1),E===void 0&&(E=!1),Ta(q,K,1/j)}function Ta(q,K,j,E){j===void 0&&(j=1),E===void 0&&(E=!1);var P=q*K*j;return E?Math.round(P):P}function En(q,K){return K===void 0&&(K=!1),Ta(q,1e3,1/Oe,K)}function gn(q,K){return K===void 0&&(K=1),Ta(q,Oe,1/K)}var He=gn(10),ea=gn(.2),va=function(){function q(j,E,P,N){this.observer=j,this.config=E,this.typeSupported=P;var J=navigator.userAgent;this.isSafari=N&&N.indexOf("Apple")>-1&&J&&!J.match("CriOS"),this.ISGenerated=!1}var K=q.prototype;return K.destroy=function(){},K.resetTimeStamp=function(E){this._initPTS=this._initDTS=E},K.resetInitSegment=function(){this.ISGenerated=!1},K.remux=function(E,P,N,J,V,ue,re){if(this.ISGenerated||this.generateIS(E,P,V),this.ISGenerated){var he=E.samples.length,Ie=P.samples.length,Fe=V,Ge=V;if(he&&Ie){var ln=(E.samples[0].pts-P.samples[0].pts)/P.inputTimeScale;Fe+=Math.max(0,ln),Ge+=Math.max(0,-ln)}if(he){E.timescale||(l.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(E,P,V));var mn=this.remuxAudio(E,Fe,ue,re);if(Ie){var Pe;mn&&(Pe=mn.endPTS-mn.startPTS),P.timescale||(l.logger.warn("regenerate InitSegment as video detected"),this.generateIS(E,P,V)),this.remuxVideo(P,Ge,ue,Pe,re)}}else if(Ie){var Rn=this.remuxVideo(P,Ge,ue,0,re);Rn&&E.codec&&this.remuxEmptyAudio(E,Fe,ue,Rn)}}N.samples.length&&this.remuxID3(N,V),J.samples.length&&this.remuxText(J,V),this.observer.trigger(t.default.FRAG_PARSED)},K.generateIS=function(E,P,N){var J=this.observer,V=E.samples,ue=P.samples,re=this.typeSupported,he="audio/mp4",Ie={},Fe={tracks:Ie},Ge=this._initPTS===void 0,ln,mn;if(Ge&&(ln=mn=1/0),E.config&&V.length&&(E.timescale=E.samplerate,l.logger.log("audio sampling rate : "+E.samplerate),E.isAAC||(re.mpeg?(he="audio/mpeg",E.codec=""):re.mp3&&(E.codec="mp3")),Ie.audio={container:he,codec:E.codec,initSegment:!E.isAAC&&re.mpeg?new Uint8Array:ft.initSegment([E]),metadata:{channelCount:E.channelCount}},Ge&&(ln=mn=V[0].pts-E.inputTimeScale*N)),P.sps&&P.pps&&ue.length){var Pe=P.inputTimeScale;P.timescale=Pe,Ie.video={container:"video/mp4",codec:P.codec,initSegment:ft.initSegment([P]),metadata:{width:P.width,height:P.height}},Ge&&(ln=Math.min(ln,ue[0].pts-Pe*N),mn=Math.min(mn,ue[0].dts-Pe*N),this.observer.trigger(t.default.INIT_PTS_FOUND,{initPTS:ln}))}Object.keys(Ie).length?(J.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,Fe),this.ISGenerated=!0,Ge&&(this._initPTS=ln,this._initDTS=mn)):J.trigger(t.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},K.remuxVideo=function(E,P,N,J,V){var ue=8,re,he,Ie,Fe,Ge,ln,mn,Pe=E.timescale,Rn=E.samples,Vn=[],pa=Rn.length,Za=this._PTSNormalize,Lt=this._initPTS,wa=this.nextAvcDts,pt=this.isSafari;if(pa!==0){pt&&(N|=Rn.length&&wa&&(V&&Math.abs(P-wa/Pe)<.1||Math.abs(Rn[0].pts-wa-Lt)1?l.logger.log("AVC: "+En(Et,!0)+" ms hole between fragments detected,filling it"):Et<-1&&l.logger.log("AVC: "+En(-Et,!0)+" ms overlapping between fragments detected"),Ge=wa,Rn[0].dts=Ge,Fe=Math.max(Fe-Et,wa),Rn[0].pts=Fe,l.logger.log("Video: PTS/DTS adjusted: "+En(Fe,!0)+"/"+En(Ge,!0)+", delta: "+En(Et,!0)+" ms")),Ba=Rn[Rn.length-1],mn=Math.max(Ba.dts,0),ln=Math.max(Ba.pts,0,mn),pt&&(re=Math.round((mn-Ge)/(Rn.length-1)));for(var ir=0,Cr=0,ro=0;ro0?wo-1:wo].dts;if(Nc.stretchShortVideoTrack){var Pi=Nc.maxBufferHole,pd=Math.floor(Pi*Pe),ef=(J?Fe+J*Pe:this.nextAudioPts)-kr.pts;ef>pd?(re=ef-bl,re<0&&(re=bl),l.logger.log("It is approximately "+En(ef,!1)+" ms to the next segment; using duration "+En(re,!1)+" ms for the last video frame.")):re=bl}else re=bl}Li=Math.round(kr.pts-kr.dts)}Vn.push({size:ri,duration:re,cts:Li,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:kr.key?2:1,isNonSync:kr.key?0:1}})}this.nextAvcDts=mn+re;var $_=E.dropped;if(E.nbNalu=0,E.dropped=0,Vn.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var z_=Vn[0].flags;z_.dependsOn=2,z_.isNonSync=0}E.samples=Vn,Ie=ft.moof(E.sequenceNumber++,Ge,E),E.samples=[];var xi={data1:Ie,data2:he,startPTS:Fe/Pe,endPTS:(ln+re)/Pe,startDTS:Ge/Pe,endDTS:this.nextAvcDts/Pe,type:"video",hasAudio:!1,hasVideo:!0,nb:Vn.length,dropped:$_};return this.observer.trigger(t.default.FRAG_PARSING_DATA,xi),xi}},K.remuxAudio=function(E,P,N,J){var V=E.inputTimeScale,ue=E.timescale,re=V/ue,he=E.isAAC?1024:1152,Ie=he*re,Fe=this._PTSNormalize,Ge=this._initPTS,ln=!E.isAAC&&this.typeSupported.mpeg,mn,Pe,Rn,Vn,pa,Za,Lt=ln?0:8,wa=E.samples,pt=[],Pa=this.nextAudioPts;if(N|=wa.length&&Pa&&(J&&Math.abs(P-Pa/V)<.1||Math.abs(wa[0].pts-Pa-Ge)<20*Ie),wa.forEach(function(Pi){Pi.pts=Pi.dts=Fe(Pi.pts-Ge,P*V)}),wa=wa.filter(function(Pi){return Pi.pts>=0}),wa.length!==0){if(N||(J?Pa=P*V:Pa=wa[0].pts),E.isAAC)for(var Ot=this.config.maxAudioFramesDrift,Ba=0,Et=Pa;Ba=Ot*Ie&&Cr.1*Ie,ir.pts=ir.dts=Et,Et+=Ie,Ba++}for(var er=wa.length,Ur=0;er--;)Ur+=wa[er].unit.byteLength;for(var nu=0,au=wa.length;nu0&&ri0&&(Pe=Hn.getSilentFrame(E.manifestCodec||E.codec,E.channelCount),Pe||(Pe=kr.subarray()),Ur+=Li*Pe.length);else if(ri<-12){l.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+En(Pa,!0)+" ms / "+En(Iu,!0)+" ms / "+En(-ri,!0)+" ms"),Ur-=kr.byteLength;continue}Iu=Pa}if(pa=Iu,Ur>0){Ur+=Lt;try{Rn=new Uint8Array(Ur)}catch{this.observer.trigger(t.default.ERROR,{type:o.ErrorTypes.MUX_ERROR,details:o.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ur,reason:"fail allocating audio mdat "+Ur});return}if(!ln){var Ql=new DataView(Rn.buffer);Ql.setUint32(0,Ur),Rn.set(ft.types.mdat,4)}}else return;for(var xc=0;xc=2&&(yl=pt[er-2].duration,mn.duration=yl),er){this.nextAudioPts=Pa=Za+re*yl,E.samples=pt,ln?Vn=new Uint8Array:Vn=ft.moof(E.sequenceNumber++,pa/re,E),E.samples=[];var wl=pa/V,Nc=Pa/V,bl={data1:Vn,data2:Rn,startPTS:wl,endPTS:Nc,startDTS:wl,endDTS:Nc,type:"audio",hasAudio:!0,hasVideo:!1,nb:er};return this.observer.trigger(t.default.FRAG_PARSING_DATA,bl),bl}return null}},K.remuxEmptyAudio=function(E,P,N,J){var V=E.inputTimeScale,ue=E.samplerate?E.samplerate:V,re=V/ue,he=this.nextAudioPts,Ie=(he!==void 0?he:J.startDTS*V)+this._initDTS,Fe=J.endDTS*V+this._initDTS,Ge=1024,ln=re*Ge,mn=Math.ceil((Fe-Ie)/ln),Pe=Hn.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);if(l.logger.warn("remux empty Audio"),!Pe){l.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");return}for(var Rn=[],Vn=0;Vn4294967296;)E+=N;return E},q}(),La=va,_t=function(){function q(j){this.observer=j}var K=q.prototype;return K.destroy=function(){},K.resetTimeStamp=function(){},K.resetInitSegment=function(){},K.remux=function(E,P,N,J,V,ue,re,he){var Ie=this.observer,Fe="";E&&(Fe+="audio"),P&&(Fe+="video"),Ie.trigger(t.default.FRAG_PARSING_DATA,{data1:he,startPTS:V,startDTS:V,type:Fe,hasAudio:!!E,hasVideo:!!P,nb:1,dropped:0}),Ie.trigger(t.default.FRAG_PARSED)},q}(),sn=_t,ia=Object(s.getSelfScope)(),bt;try{bt=ia.performance.now.bind(ia.performance)}catch{l.logger.debug("Unable to use Performance API on this environment"),bt=ia.Date.now}var Da=function(){function q(j,E,P,N){this.observer=j,this.typeSupported=E,this.config=P,this.vendor=N}var K=q.prototype;return K.destroy=function(){var E=this.demuxer;E&&E.destroy()},K.push=function(E,P,N,J,V,ue,re,he,Ie,Fe,Ge,ln){var mn=this;if(E.byteLength>0&&P!=null&&P.key!=null&&P.method==="AES-128"){var Pe=this.decrypter;Pe==null&&(Pe=this.decrypter=new u.default(this.observer,this.config));var Rn=bt();Pe.decrypt(E,P.key.buffer,P.iv.buffer,function(Vn){var pa=bt();mn.observer.trigger(t.default.FRAG_DECRYPTED,{stats:{tstart:Rn,tdecrypt:pa}}),mn.pushDecrypted(new Uint8Array(Vn),P,new Uint8Array(N),J,V,ue,re,he,Ie,Fe,Ge,ln)})}else this.pushDecrypted(new Uint8Array(E),P,new Uint8Array(N),J,V,ue,re,he,Ie,Fe,Ge,ln)},K.pushDecrypted=function(E,P,N,J,V,ue,re,he,Ie,Fe,Ge,ln){var mn=this.demuxer;if(!mn||(re||he)&&!this.probe(E)){for(var Pe=this.observer,Rn=this.typeSupported,Vn=this.config,pa=[{demux:Xe,remux:La},{demux:ve.default,remux:sn},{demux:te,remux:La},{demux:ra,remux:La}],Za=0,Lt=pa.length;Za1?L-1:0),$=1;$1?L-1:0),$=1;$0)return d.subarray(I,I+b)},s._readSize=function(d,y){var I=0;return I=(d[y]&127)<<21,I|=(d[y+1]&127)<<14,I|=(d[y+2]&127)<<7,I|=d[y+3]&127,I},s.getTimeStamp=function(d){for(var y=s.getID3Frames(d),I=0;I>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:ee+=String.fromCharCode(O);break;case 12:case 13:$=d[oe++],ee+=String.fromCharCode((O&31)<<6|$&63);break;case 14:$=d[oe++],z=d[oe++],ee+=String.fromCharCode((O&15)<<12|($&63)<<6|(z&63)<<0);break;default:}}return ee},s}(),u;function i(){var s=Object(t.getSelfScope)();return!u&&typeof s.TextDecoder!="undefined"&&(u=new s.TextDecoder("utf-8")),u}var l=o._utf8ArrayToStr;n.default=o},"./src/demux/mp4demuxer.js":function(e,n,a){"use strict";a.r(n);var t=a("./src/utils/logger.js"),o=a("./src/events.js"),u=Math.pow(2,32)-1,i=function(){function l(R,d){this.observer=R,this.remuxer=d}var s=l.prototype;return s.resetTimeStamp=function(d){this.initPTS=d},s.resetInitSegment=function(d,y,I,b){if(d&&d.byteLength){var S=this.initData=l.parseInitSegment(d);y==null&&(y="mp4a.40.5"),I==null&&(I="avc1.42e01e");var L={};S.audio&&S.video?L.audiovideo={container:"video/mp4",codec:y+","+I,initSegment:b?d:null}:(S.audio&&(L.audio={container:"audio/mp4",codec:y,initSegment:b?d:null}),S.video&&(L.video={container:"video/mp4",codec:I,initSegment:b?d:null})),this.observer.trigger(o.default.FRAG_PARSING_INIT_SEGMENT,{tracks:L})}else y&&(this.audioCodec=y),I&&(this.videoCodec=I)},l.probe=function(d){return l.findBox({data:d,start:0,end:Math.min(d.length,16384)},["moof"]).length>0},l.bin2str=function(d){return String.fromCharCode.apply(null,d)},l.readUint16=function(d,y){d.data&&(y+=d.start,d=d.data);var I=d[y]<<8|d[y+1];return I<0?65536+I:I},l.readUint32=function(d,y){d.data&&(y+=d.start,d=d.data);var I=d[y]<<24|d[y+1]<<16|d[y+2]<<8|d[y+3];return I<0?4294967296+I:I},l.writeUint32=function(d,y,I){d.data&&(y+=d.start,d=d.data),d[y]=I>>24,d[y+1]=I>>16&255,d[y+2]=I>>8&255,d[y+3]=I&255},l.findBox=function(d,y){var I=[],b,S,L,O,$,z,ee;if(d.data?(z=d.start,O=d.end,d=d.data):(z=0,O=d.byteLength),!y.length)return null;for(b=z;b1?b+S:O,L===y[0]&&(y.length===1?I.push({data:d,start:b+8,end:ee}):($=l.findBox({data:d,start:b+8,end:ee},y.slice(1)),$.length&&(I=I.concat($)))),b=ee;return I},l.parseSegmentIndex=function(d){var y=l.findBox(d,["moov"])[0],I=y?y.end:null,b=0,S=l.findBox(d,["sidx"]),L;if(!S||!S[0])return null;L=[],S=S[0];var O=S.data[0];b=O===0?8:16;var $=l.readUint32(S,b);b+=4;var z=0,ee=0;O===0?b+=8:b+=16,b+=2;var oe=S.end+ee,te=l.readUint16(S,b);b+=2;for(var ve=0;ve>>31;if(ce===1){console.warn("SIDX has hierarchical references (not supported)");return}var le=l.readUint32(S,Re);Re+=4,L.push({referenceSize:cn,subsegmentDuration:le,info:{duration:le/$,start:oe,end:oe+cn-1}}),oe+=cn,Re+=4,b=Re}return{earliestPresentationTime:z,timescale:$,version:O,referencesCount:te,references:L,moovEndOffset:I}},l.parseInitSegment=function(d){var y=[],I=l.findBox(d,["moov","trak"]);return I.forEach(function(b){var S=l.findBox(b,["tkhd"])[0];if(S){var L=S.data[S.start],O=L===0?12:20,$=l.readUint32(S,O),z=l.findBox(b,["mdia","mdhd"])[0];if(z){L=z.data[z.start],O=L===0?12:20;var ee=l.readUint32(z,O),oe=l.findBox(b,["mdia","hdlr"])[0];if(oe){var te=l.bin2str(oe.data.subarray(oe.start+8,oe.start+12)),ve={soun:"audio",vide:"video"}[te];if(ve){var Re=l.findBox(b,["mdia","minf","stbl","stsd"]);if(Re.length){Re=Re[0];var nn=l.bin2str(Re.data.subarray(Re.start+12,Re.start+16));t.logger.log("MP4Demuxer:"+ve+":"+nn+" found")}y[$]={timescale:ee,type:ve},y[ve]={timescale:ee,id:$}}}}}}),y},l.getStartDTS=function(d,y){var I,b,S;return I=l.findBox(y,["moof","traf"]),b=[].concat.apply([],I.map(function(L){return l.findBox(L,["tfhd"]).map(function(O){var $,z,ee;return $=l.readUint32(O,4),z=d[$].timescale||9e4,ee=l.findBox(L,["tfdt"]).map(function(oe){var te,ve;return te=oe.data[oe.start],ve=l.readUint32(oe,4),te===1&&(ve*=Math.pow(2,32),ve+=l.readUint32(oe,8)),ve})[0],ee/z})})),S=Math.min.apply(null,b),isFinite(S)?S:0},l.offsetStartDTS=function(d,y,I){l.findBox(y,["moof","traf"]).map(function(b){return l.findBox(b,["tfhd"]).map(function(S){var L=l.readUint32(S,4),O=d[L].timescale||9e4;l.findBox(b,["tfdt"]).map(function($){var z=$.data[$.start],ee=l.readUint32($,4);if(z===0)l.writeUint32($,4,ee-I*O);else{ee*=Math.pow(2,32),ee+=l.readUint32($,8),ee-=I*O,ee=Math.max(ee,0);var oe=Math.floor(ee/(u+1)),te=Math.floor(ee%(u+1));l.writeUint32($,4,oe),l.writeUint32($,8,te)}})})})},s.append=function(d,y,I,b){var S=this.initData;S||(this.resetInitSegment(d,this.audioCodec,this.videoCodec,!1),S=this.initData);var L,O=this.initPTS;if(O===void 0){var $=l.getStartDTS(S,d);this.initPTS=O=$-y,this.observer.trigger(o.default.INIT_PTS_FOUND,{initPTS:O})}l.offsetStartDTS(S,d,O),L=l.getStartDTS(S,d),this.remuxer.remux(S.audio,S.video,null,null,L,I,b,d)},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 o});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 o;(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"})(o||(o={}))},"./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 qE});var o=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"),R={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},d=function(){function w(f){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=f,this.onEvent=this.onEvent.bind(this);for(var v=arguments.length,r=new Array(v>1?v-1:0),c=1;c>8*(15-c)&255;return r},h.setDecryptDataFromLevelKey=function(v,r){var c=v;return v&&v.method&&v.uri&&!v.iv&&(c=new $(v.baseuri,v.reluri),c.method=v.method,c.iv=this.createInitializationVector(r)),c},ee(w,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(o.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(v){this._url=v}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&s.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null||!Object(i.isFiniteNumber)(this.programDateTime))return null;var v=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){return!!(this.decryptdata&&this.decryptdata.uri!==null&&this.decryptdata.key===null)}}]),w}();function ve(w,h){for(var f=0;fNumber.MAX_SAFE_INTEGER?1/0:r},h.hexadecimalInteger=function(v){if(this[v]){var r=(this[v]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var c=new Uint8Array(r.length/2),_=0;_Number.MAX_SAFE_INTEGER?1/0:r},h.decimalFloatingPoint=function(v){return parseFloat(this[v])},h.enumeratedString=function(v){return this[v]},h.decimalResolution=function(v){var r=cn.exec(this[v]);if(r!==null)return{width:parseInt(r[1],10),height:parseInt(r[2],10)}},w.parseAttrList=function(v){var r,c={};for(ce.lastIndex=0;(r=ce.exec(v))!==null;){var _=r[2],g='"';_.indexOf(g)===0&&_.lastIndexOf(g)===_.length-1&&(_=_.slice(1,-1)),c[r[1]]=_}return c},w}(),Ne=le,Ce={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 Be(w,h){var f=Ce[h];return!!f&&f[w.slice(0,4)]===!0}function Xe(w,h){return MediaSource.isTypeSupported((h||"video")+'/mp4;codecs="'+w+'"')}var Sn=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,ra=/#EXT-X-MEDIA:(.*)/g,kn=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),Hn=/(?:(?:#(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?/,Kn=/\.(mp4|m4s|m4v|m4a)$/i,qn=function(){function w(){}return w.findGroup=function(f,v){for(var r=0;r2?(r=v.shift()+".",r+=parseInt(v.shift()).toString(16),r+=("000"+parseInt(v.shift()).toString(16)).substr(-4)):r=f,r},w.resolve=function(f,v){return o.buildAbsoluteURL(v,f,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(f,v){var r=[];Sn.lastIndex=0;function c(x,H){["video","audio"].forEach(function(U){var X=x.filter(function(qe){return Be(qe,U)});if(X.length){var ye=X.filter(function(qe){return qe.lastIndexOf("avc1",0)===0||qe.lastIndexOf("mp4a",0)===0});H[U+"Codec"]=ye.length>0?ye[0]:X[0],x=x.filter(function(qe){return X.indexOf(qe)===-1})}}),H.unknownCodecs=x}for(var _;(_=Sn.exec(f))!=null;){var g={},C=g.attrs=new Ne(_[1]);g.url=w.resolve(_[2],v);var F=C.decimalResolution("RESOLUTION");F&&(g.width=F.width,g.height=F.height),g.bitrate=C.decimalInteger("AVERAGE-BANDWIDTH")||C.decimalInteger("BANDWIDTH"),g.name=C.NAME,c([].concat((C.CODECS||"").split(/[ ,]+/)),g),g.videoCodec&&g.videoCodec.indexOf("avc1")!==-1&&(g.videoCodec=w.convertAVC1ToAVCOTI(g.videoCodec)),r.push(g)}return r},w.parseMasterPlaylistMedia=function(f,v,r,c){c===void 0&&(c=[]);var _,g=[],C=0;for(ra.lastIndex=0;(_=ra.exec(f))!==null;){var F=new Ne(_[1]);if(F.TYPE===r){var x={id:C++,groupId:F["GROUP-ID"],name:F.NAME||F.LANGUAGE,type:r,default:F.DEFAULT==="YES",autoselect:F.AUTOSELECT==="YES",forced:F.FORCED==="YES",lang:F.LANGUAGE};if(F.URI&&(x.url=w.resolve(F.URI,v)),c.length){var H=w.findGroup(c,x.groupId);x.audioCodec=H?H.codec:c[0].codec}g.push(x)}}return g},w.parseLevelPlaylist=function(f,v,r,c,_){var g=0,C=0,F=new nn(v),x=0,H=null,U=new te,X,ye,qe,vn=null;for(kn.lastIndex=0;(X=kn.exec(f))!==null;){var fa=X[1];if(fa){U.duration=parseFloat(fa);var Zn=(" "+X[2]).slice(1);U.title=Zn||null,U.tagList.push(Zn?["INF",fa,Zn]:["INF",fa])}else if(X[3]){if(Object(i.isFiniteNumber)(U.duration)){var la=g++;U.type=c,U.start=C,qe&&(U.levelkey=qe),U.sn=la,U.level=r,U.cc=x,U.urlId=_,U.baseurl=v,U.relurl=(" "+X[3]).slice(1),Oe(U,H),F.fragments.push(U),H=U,C+=U.duration,U=new te}}else if(X[4]){var Ra=(" "+X[4]).slice(1);H?U.setByteRange(Ra,H):U.setByteRange(Ra)}else if(X[5])U.rawProgramDateTime=(" "+X[5]).slice(1),U.tagList.push(["PROGRAM-DATE-TIME",U.rawProgramDateTime]),vn===null&&(vn=F.fragments.length);else{if(X=X[0].match(Hn),!X){s.logger.warn("No matches on slow regex match for level playlist!");continue}for(ye=1;ye=0&&(qe.method=ct,qe.key=null,qe.iv=xa));break}case"START":{var Eo=new Ne(Oa),e0=Eo.decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(e0)&&(F.startTimeOffset=e0);break}case"MAP":{var n0=new Ne(Oa);U.relurl=n0.URI,n0.BYTERANGE&&U.setByteRange(n0.BYTERANGE),U.baseurl=v,U.level=r,U.type=c,U.sn="initSegment",F.initSegment=U,U=new te,U.rawProgramDateTime=F.initSegment.rawProgramDateTime;break}default:s.logger.warn("line parsed but not handled: "+X);break}}}return U=H,U&&!U.relurl&&(F.fragments.pop(),C-=U.duration),F.totalduration=C,F.averagetargetduration=C/F.fragments.length,F.endSN=g-1,F.startCC=F.fragments[0]?F.fragments[0].cc:0,F.endCC=x,!F.initSegment&&F.fragments.length&&F.fragments.every(function(fI){return Kn.test(fI.relurl)})&&(s.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),U=new te,U.relurl=F.fragments[0].relurl,U.baseurl=v,U.level=r,U.type=c,U.sn="initSegment",F.initSegment=U,F.needSidxRanges=!0),vn&&ft(F.fragments,vn),F},w}();function ft(w,h){for(var f=w[h],v=h-1;v>=0;v--){var r=w[v];r.programDateTime=f.programDateTime-r.duration*1e3,f=r}}function Oe(w,h){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):h&&h.programDateTime&&(w.programDateTime=h.endProgramDateTime),Object(i.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}function ua(w,h){w.prototype=Object.create(h.prototype),w.prototype.constructor=w,w.__proto__=h}var Ta=window,En=Ta.performance,gn=function(w){ua(h,w);function h(v){var r;return r=w.call(this,v,l.default.MANIFEST_LOADING,l.default.LEVEL_LOADING,l.default.AUDIO_TRACK_LOADING,l.default.SUBTITLE_TRACK_LOADING)||this,r.loaders={},r}h.canHaveQualityLevels=function(r){return r!==I.AUDIO_TRACK&&r!==I.SUBTITLE_TRACK},h.mapContextToLevelType=function(r){var c=r.type;switch(c){case I.AUDIO_TRACK:return b.AUDIO;case I.SUBTITLE_TRACK:return b.SUBTITLE;default:return b.MAIN}},h.getResponseUrl=function(r,c){var _=r.url;return(_===void 0||_.indexOf("data:")===0)&&(_=c.url),_};var f=h.prototype;return f.createInternalLoader=function(r){var c=this.hls.config,_=c.pLoader,g=c.loader,C=_||g,F=new C(c);return r.loader=F,this.loaders[r.type]=F,F},f.getInternalLoader=function(r){return this.loaders[r.type]},f.resetInternalLoader=function(r){this.loaders[r]&&delete this.loaders[r]},f.destroyInternalLoaders=function(){for(var r in this.loaders){var c=this.loaders[r];c&&c.destroy(),this.resetInternalLoader(r)}},f.destroy=function(){this.destroyInternalLoaders(),w.prototype.destroy.call(this)},f.onManifestLoading=function(r){this.load({url:r.url,type:I.MANIFEST,level:0,id:null,responseType:"text"})},f.onLevelLoading=function(r){this.load({url:r.url,type:I.LEVEL,level:r.level,id:r.id,responseType:"text"})},f.onAudioTrackLoading=function(r){this.load({url:r.url,type:I.AUDIO_TRACK,level:null,id:r.id,responseType:"text"})},f.onSubtitleTrackLoading=function(r){this.load({url:r.url,type:I.SUBTITLE_TRACK,level:null,id:r.id,responseType:"text"})},f.load=function(r){var c=this.hls.config;s.logger.debug("Loading playlist of type "+r.type+", level: "+r.level+", id: "+r.id);var _=this.getInternalLoader(r);if(_){var g=_.context;if(g&&g.url===r.url)return s.logger.trace("playlist request ongoing"),!1;s.logger.warn("aborting previous loader for type: "+r.type),_.abort()}var C,F,x,H;switch(r.type){case I.MANIFEST:C=c.manifestLoadingMaxRetry,F=c.manifestLoadingTimeOut,x=c.manifestLoadingRetryDelay,H=c.manifestLoadingMaxRetryTimeout;break;case I.LEVEL:C=0,H=0,x=0,F=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,F=c.levelLoadingTimeOut,x=c.levelLoadingRetryDelay,H=c.levelLoadingMaxRetryTimeout;break}_=this.createInternalLoader(r);var U={timeout:F,maxRetry:C,retryDelay:x,maxRetryDelay:H},X={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: "+r.url),_.load(r,U,X),!0},f.loadsuccess=function(r,c,_,g){if(g===void 0&&(g=null),_.isSidxRequest){this._handleSidxRequest(r,_),this._handlePlaylistLoaded(r,c,_,g);return}if(this.resetInternalLoader(_.type),typeof r.data!="string")throw new Error('expected responseType of "text" for PlaylistLoader');var C=r.data;if(c.tload=En.now(),C.indexOf("#EXTM3U")!==0){this._handleManifestParsingError(r,_,"no EXTM3U delimiter",g);return}C.indexOf("#EXTINF:")>0||C.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(r,c,_,g):this._handleMasterPlaylist(r,c,_,g)},f.loaderror=function(r,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!1,r)},f.loadtimeout=function(r,c,_){_===void 0&&(_=null),this._handleNetworkError(c,_,!0)},f._handleMasterPlaylist=function(r,c,_,g){var C=this.hls,F=r.data,x=h.getResponseUrl(r,_),H=qn.parseMasterPlaylist(F,x);if(!H.length){this._handleManifestParsingError(r,_,"no level found in manifest",g);return}var U=H.map(function(vn){return{id:vn.attrs.AUDIO,codec:vn.audioCodec}}),X=qn.parseMasterPlaylistMedia(F,x,"AUDIO",U),ye=qn.parseMasterPlaylistMedia(F,x,"SUBTITLES");if(X.length){var qe=!1;X.forEach(function(vn){vn.url||(qe=!0)}),qe===!1&&H[0].audioCodec&&!H[0].attrs.AUDIO&&(s.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),X.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}C.trigger(l.default.MANIFEST_LOADED,{levels:H,audioTracks:X,subtitles:ye,url:x,stats:c,networkDetails:g})},f._handleTrackOrLevelPlaylist=function(r,c,_,g){var C=this.hls,F=_.id,x=_.level,H=_.type,U=h.getResponseUrl(r,_),X=Object(i.isFiniteNumber)(F)?F:0,ye=Object(i.isFiniteNumber)(x)?x:X,qe=h.mapContextToLevelType(_),vn=qn.parseLevelPlaylist(r.data,U,ye,qe,X);if(vn.tload=c.tload,H===I.MANIFEST){var fa={url:U,details:vn};C.trigger(l.default.MANIFEST_LOADED,{levels:[fa],audioTracks:[],url:U,stats:c,networkDetails:g})}if(c.tparsed=En.now(),vn.needSidxRanges){var Zn=vn.initSegment.url;this.load({url:Zn,isSidxRequest:!0,type:H,level:x,levelDetails:vn,id:F,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"});return}_.levelDetails=vn,this._handlePlaylistLoaded(r,c,_,g)},f._handleSidxRequest=function(r,c){if(typeof r.data=="string")throw new Error("sidx request must be made with responseType of array buffer");var _=S.default.parseSegmentIndex(new Uint8Array(r.data));if(!!_){var g=_.references,C=c.levelDetails;g.forEach(function(F,x){var H=F.info;if(!!C){var U=C.fragments[x];U.byteRange.length===0&&U.setByteRange(String(1+H.end-H.start)+"@"+String(H.start))}}),C&&C.initSegment.setByteRange(String(_.moovEndOffset)+"@0")}},f._handleManifestParsingError=function(r,c,_,g){this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:r.url,reason:_,networkDetails:g})},f._handleNetworkError=function(r,c,_,g){_===void 0&&(_=!1),g===void 0&&(g=null),s.logger.info("A network error occured while loading a "+r.type+"-type playlist");var C,F,x=this.getInternalLoader(r);switch(r.type){case I.MANIFEST:C=_?u.ErrorDetails.MANIFEST_LOAD_TIMEOUT:u.ErrorDetails.MANIFEST_LOAD_ERROR,F=!0;break;case I.LEVEL:C=_?u.ErrorDetails.LEVEL_LOAD_TIMEOUT:u.ErrorDetails.LEVEL_LOAD_ERROR,F=!1;break;case I.AUDIO_TRACK:C=_?u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,F=!1;break;default:F=!1}x&&(x.abort(),this.resetInternalLoader(r.type));var H={type:u.ErrorTypes.NETWORK_ERROR,details:C,fatal:F,url:r.url,loader:x,context:r,networkDetails:c};g&&(H.response=g),this.hls.trigger(l.default.ERROR,H)},f._handlePlaylistLoaded=function(r,c,_,g){var C=_.type,F=_.level,x=_.id,H=_.levelDetails;if(!H||!H.targetduration){this._handleManifestParsingError(r,_,"invalid target duration",g);return}var U=h.canHaveQualityLevels(_.type);if(U)this.hls.trigger(l.default.LEVEL_LOADED,{details:H,level:F||0,id:x||0,stats:c,networkDetails:g});else switch(C){case I.AUDIO_TRACK:this.hls.trigger(l.default.AUDIO_TRACK_LOADED,{details:H,id:x,stats:c,networkDetails:g});break;case I.SUBTITLE_TRACK:this.hls.trigger(l.default.SUBTITLE_TRACK_LOADED,{details:H,id:x,stats:c,networkDetails:g});break}},h}(y),He=gn;function ea(w,h){w.prototype=Object.create(h.prototype),w.prototype.constructor=w,w.__proto__=h}var va=function(w){ea(h,w);function h(v){var r;return r=w.call(this,v,l.default.FRAG_LOADING)||this,r.loaders={},r}var f=h.prototype;return f.destroy=function(){var r=this.loaders;for(var c in r){var _=r[c];_&&_.destroy()}this.loaders={},w.prototype.destroy.call(this)},f.onFragLoading=function(r){var c=r.frag,_=c.type,g=this.loaders,C=this.hls.config,F=C.fLoader,x=C.loader;c.loaded=0;var H=g[_];H&&(s.logger.warn("abort previous fragment loader for type: "+_),H.abort()),H=g[_]=c.loader=C.fLoader?new F(C):new x(C);var U,X,ye;U={url:c.url,frag:c,responseType:"arraybuffer",progressData:!1};var qe=c.byteRangeStartOffset,vn=c.byteRangeEndOffset;Object(i.isFiniteNumber)(qe)&&Object(i.isFiniteNumber)(vn)&&(U.rangeStart=qe,U.rangeEnd=vn),X={timeout:C.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:C.fragLoadingMaxRetryTimeout},ye={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},H.load(U,X,ye)},f.loadsuccess=function(r,c,_,g){g===void 0&&(g=null);var C=r.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:g})},f.loaderror=function(r,c,_){_===void 0&&(_=null);var g=c.frag,C=g.loader;C&&C.abort(),this.loaders[g.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:r,networkDetails:_})},f.loadtimeout=function(r,c,_){_===void 0&&(_=null);var g=c.frag,C=g.loader;C&&C.abort(),this.loaders[g.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(r,c,_,g){g===void 0&&(g=null);var C=c.frag;C.loaded=r.loaded,this.hls.trigger(l.default.FRAG_LOAD_PROGRESS,{frag:C,stats:r,networkDetails:g})},h}(y),La=va;function _t(w,h){w.prototype=Object.create(h.prototype),w.prototype.constructor=w,w.__proto__=h}var sn=function(w){_t(h,w);function h(v){var r;return r=w.call(this,v,l.default.KEY_LOADING)||this,r.loaders={},r.decryptkey=null,r.decrypturl=null,r}var f=h.prototype;return f.destroy=function(){for(var r in this.loaders){var c=this.loaders[r];c&&c.destroy()}this.loaders={},w.prototype.destroy.call(this)},f.onKeyLoading=function(r){var c=r.frag,_=c.type,g=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(g&&(s.logger.warn("abort previous key loader for type:"+_),g.abort()),!C){s.logger.warn("key uri is falsy");return}c.loader=this.loaders[_]=new F.loader(F),this.decrypturl=C,this.decryptkey=null;var x={url:C,frag:c,responseType:"arraybuffer"},H={timeout:F.fragLoadingTimeOut,maxRetry:0,retryDelay:F.fragLoadingRetryDelay,maxRetryDelay:F.fragLoadingMaxRetryTimeout},U={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};c.loader.load(x,H,U)}else this.decryptkey&&(c.decryptdata.key=this.decryptkey,this.hls.trigger(l.default.KEY_LOADED,{frag:c}))},f.loadsuccess=function(r,c,_){var g=_.frag;if(!g.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=g.decryptdata.key=new Uint8Array(r.data),g.loader=void 0,delete this.loaders[g.type],this.hls.trigger(l.default.KEY_LOADED,{frag:g})},f.loaderror=function(r,c){var _=c.frag,g=_.loader;g&&g.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:r})},f.loadtimeout=function(r,c){var _=c.frag,g=_.loader;g&&g.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:_})},h}(y),ia=sn;function bt(w,h){w.prototype=Object.create(h.prototype),w.prototype.constructor=w,w.__proto__=h}var Da={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},ut=function(w){bt(h,w);function h(v){var r;return r=w.call(this,v,l.default.BUFFER_APPENDED,l.default.FRAG_BUFFERED,l.default.FRAG_LOADED)||this,r.bufferPadding=.2,r.fragments=Object.create(null),r.timeRanges=Object.create(null),r.config=v.config,r}var f=h.prototype;return f.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,y.prototype.destroy.call(this),w.prototype.destroy.call(this)},f.getBufferedFrag=function(r,c){var _=this.fragments,g=Object.keys(_).filter(function(F){var x=_[F];if(x.body.type!==c||!x.buffered)return!1;var H=x.body;return H.startPTS<=r&&r<=H.endPTS});if(g.length===0)return null;var C=g.pop();return _[C].body},f.detectEvictedFragments=function(r,c){var _=this,g,C;Object.keys(this.fragments).forEach(function(F){var x=_.fragments[F];if(x.buffered===!0){var H=x.range[r];if(H){g=H.time;for(var U=0;U=C&&c<=F){g.push({startPTS:Math.max(r,_.start(H)),endPTS:Math.min(c,_.end(H))});break}else if(rC)g.push({startPTS:Math.max(r,_.start(H)),endPTS:Math.min(c,_.end(H))}),x=!0;else if(c<=C)break;return{time:g,partial:x}},f.getFragmentKey=function(r){return r.type+"_"+r.level+"_"+r.urlId+"_"+r.sn},f.getPartialFragment=function(r){var c=this,_,g,C,F=null,x=0;return Object.keys(this.fragments).forEach(function(H){var U=c.fragments[H];c.isPartial(U)&&(g=U.body.startPTS-c.bufferPadding,C=U.body.endPTS+c.bufferPadding,r>=g&&r<=C&&(_=Math.min(r-g,C-r),x<=_&&(F=U.body,x=_)))}),F},f.getState=function(r){var c=this.getFragmentKey(r),_=this.fragments[c],g=Da.NOT_LOADED;return _!==void 0&&(_.buffered?this.isPartial(_)===!0?g=Da.PARTIAL:g=Da.OK:g=Da.APPENDING),g},f.isPartial=function(r){return r.buffered===!0&&(r.range.video!==void 0&&r.range.video.partial===!0||r.range.audio!==void 0&&r.range.audio.partial===!0)},f.isTimeBuffered=function(r,c,_){for(var g,C,F=0;F<_.length;F++){if(g=_.start(F)-this.bufferPadding,C=_.end(F)+this.bufferPadding,r>=g&&c<=C)return!0;if(c<=g)return!1}return!1},f.onFragLoaded=function(r){var c=r.frag;!Object(i.isFiniteNumber)(c.sn)||c.bitrateTest||(this.fragments[this.getFragmentKey(c)]={body:c,range:Object.create(null),buffered:!1})},f.onBufferAppended=function(r){var c=this;this.timeRanges=r.timeRanges,Object.keys(this.timeRanges).forEach(function(_){var g=c.timeRanges[_];c.detectEvictedFragments(_,g)})},f.onFragBuffered=function(r){this.detectPartialFragments(r.frag)},f.hasFragment=function(r){var c=this.getFragmentKey(r);return this.fragments[c]!==void 0},f.removeFragment=function(r){var c=this.getFragmentKey(r);delete this.fragments[c]},f.removeAllFragments=function(){this.fragments=Object.create(null)},h}(y),q={search:function(h,f){for(var v=0,r=h.length-1,c=null,_=null;v<=r;){c=(v+r)/2|0,_=h[c];var g=f(_);if(g>0)v=c+1;else if(g<0)r=c-1;else return _}return null}},K=q,j=function(){function w(){}return w.isBuffered=function(f,v){try{if(f){for(var r=f.buffered,c=0;c=r.start(c)&&v<=r.end(c))return!0}}catch{}return!1},w.bufferInfo=function(f,v,r){try{if(f){var c=f.buffered,_=[],g;for(g=0;gC&&(c[g-1].end=f[_].end):c.push(f[_])}else c.push(f[_])}else c=f;for(var F=0,x,H=v,U=v,X=0;X=ye&&v1?c-1:0),g=1;gh?(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!")):(r.duration=v.start-c,r.duration<0&&s.logger.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!")):f>h?r.start=v.start+v.duration:r.start=Math.max(v.start-r.duration,0)}function Pe(w,h,f,v,r,c){var _=f;if(Object(i.isFiniteNumber)(h.startPTS)){var g=Math.abs(h.startPTS-f);Object(i.isFiniteNumber)(h.deltaPTS)?h.deltaPTS=Math.max(g,h.deltaPTS):h.deltaPTS=g,_=Math.max(f,h.startPTS),f=Math.min(f,h.startPTS),v=Math.max(v,h.endPTS),r=Math.min(r,h.startDTS),c=Math.max(c,h.endDTS)}var C=f-h.start;h.start=h.startPTS=f,h.maxStartPTS=_,h.endPTS=v,h.startDTS=r,h.endDTS=c,h.duration=v-f;var F=h.sn;if(!w||Fw.endSN)return 0;var x,H,U;for(x=F-w.startSN,H=w.fragments,H[x]=h,U=x;U>0;U--)mn(H,U,U-1);for(U=x;Uv.length))for(var c=0;ch?-1:0})}function Ba(w,h,f){var v=!1;return h&&h.details&&f&&(f.endCC>f.startCC||w&&w.cc=(r||0))return null;f=f||0;for(var c=0;cw&&f.start?-1:0}function Ur(w,h,f){var v=Math.min(h,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,r=f.endProgramDateTime||0;return r-v>w}var nu=250,au=2,wo=.1,kr=.05,Iu=function(){function w(f,v,r,c){this.config=f,this.media=v,this.fragmentTracker=r,this.hls=c,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var h=w.prototype;return h.poll=function(v){var r=this.config,c=this.media,_=this.stalled,g=c.currentTime,C=c.seeking,F=this.seeking&&!C,x=!this.seeking&&C;if(this.seeking=C,g!==v){if(this.moved=!0,_!==null){if(this.stallReported){var H=self.performance.now()-_;s.logger.warn("playback not stuck anymore @"+g+", after "+Math.round(H)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((x||F)&&(this.stalled=null),!(c.paused||c.ended||c.playbackRate===0||!c.buffered.length)){var U=j.bufferInfo(c,g,0),X=U.len>0,ye=U.nextStart||0;if(!(!X&&!ye)){if(C){var qe=U.len>au,vn=!ye||ye-g>au;if(qe||vn)return;this.moved=!1}if(!this.moved&&this.stalled){var fa=Math.max(ye,U.start||0)-g;if(fa>0&&fa<=au){this._trySkipBufferHole(null);return}}var Zn=self.performance.now();if(_===null){this.stalled=Zn;return}var la=Zn-_;!C&&la>=nu&&this._reportStall(U.len);var Ra=j.bufferInfo(c,g,r.maxBufferHole);this._tryFixBufferStall(Ra,la)}}},h._tryFixBufferStall=function(v,r){var c=this.config,_=this.fragmentTracker,g=this.media,C=g.currentTime,F=_.getPartialFragment(C);if(F){var x=this._trySkipBufferHole(F);if(x)return}v.len>c.maxBufferHole&&r>c.highBufferWatchdogPeriod*1e3&&(s.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},h._reportStall=function(v){var r=this.hls,c=this.media,_=this.stallReported;_||(this.stallReported=!0,s.logger.warn("Playback stalling at @"+c.currentTime+" due to low buffer"),r.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:v}))},h._trySkipBufferHole=function(v){for(var r=this.config,c=this.hls,_=this.media,g=_.currentTime,C=0,F=0;F<_.buffered.length;F++){var x=_.buffered.start(F);if(g+r.maxBufferHole>=C&&g1?c-1:0),g=1;g1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},f.doTick=function(){},h}(y);function xc(w,h){w.prototype=Object.create(h.prototype),w.prototype.constructor=w,w.__proto__=h}var se={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"},yl=function(w){xc(h,w);function h(){return w.apply(this,arguments)||this}var f=h.prototype;return f.doTick=function(){},f.startLoad=function(){},f.stopLoad=function(){var r=this.fragCurrent;r&&(r.loader&&r.loader.abort(),this.fragmentTracker.removeFragment(r)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=se.STOPPED},f._streamEnded=function(r,c){var _=this.fragCurrent,g=this.fragmentTracker;if(!c.live&&_&&!_.backtracked&&_.sn===c.endSN&&!r.nextStart){var C=g.getState(_);return C===Da.PARTIAL||C===Da.OK}return!1},f.onMediaSeeking=function(){var r=this.config,c=this.media,_=this.mediaBuffer,g=this.state,C=c?c.currentTime:null,F=j.bufferInfo(_||c,C,this.config.maxBufferHole);if(Object(i.isFiniteNumber)(C)&&s.logger.log("media seeking to "+C.toFixed(3)),g===se.FRAG_LOADING){var x=this.fragCurrent;if(F.len===0&&x){var H=r.maxFragLookUpTolerance,U=x.start-H,X=x.start+x.duration+H;CX?(x.loader&&(s.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),x.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=se.IDLE):s.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else g===se.ENDED&&(F.len===0&&(this.fragPrevious=null,this.fragCurrent=null),this.state=se.IDLE);c&&(this.lastCurrentTime=C),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=C),this.tick()},f.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},f.onHandlerDestroying=function(){this.stopLoad(),w.prototype.onHandlerDestroying.call(this)},f.onHandlerDestroyed=function(){this.state=se.STOPPED,this.fragmentTracker=null},f.computeLivePosition=function(r,c){var _=this.config.liveSyncDuration!==void 0?this.config.liveSyncDuration:this.config.liveSyncDurationCount*c.targetduration;return r+Math.max(0,c.totalduration-_)},h}(Ql);function wl(w,h){for(var f=0;f0&&r===-1&&(s.logger.log("override startPosition with lastCurrentTime @"+c.toFixed(3)),r=c),this.state=se.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=r,this.tick()}else this.forceStartLoad=!0,this.state=se.STOPPED},f.stopLoad=function(){this.forceStartLoad=!1,w.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case se.BUFFER_FLUSHING:this.fragLoadError=0;break;case se.IDLE:this._doTickIdle();break;case se.WAITING_LEVEL:var r=this.levels[this.level];r&&r.details&&(this.state=se.IDLE);break;case se.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=se.IDLE);break;case se.ERROR:case se.STOPPED:case se.FRAG_LOADING:case se.PARSING:case se.PARSED:case se.ENDED:break;default:break}this._checkBuffer(),this._checkFragmentChanged()},f._doTickIdle=function(){var r=this.hls,c=r.config,_=this.media;if(!(this.levelLastLoaded===void 0||!_&&(this.startFragRequested||!c.startFragPrefetch))){var g;this.loadedmetadata?g=_.currentTime:g=this.nextLoadPosition;var C=r.nextLoadLevel,F=this.levels[C];if(!!F){var x=F.bitrate,H;x?H=Math.max(8*c.maxBufferSize/x,c.maxBufferLength):H=c.maxBufferLength,H=Math.min(H,c.maxMaxBufferLength);var U=j.bufferInfo(this.mediaBuffer?this.mediaBuffer:_,g,c.maxBufferHole),X=U.len;if(!(X>=H)){s.logger.trace("buffer length of "+X.toFixed(3)+" is below max of "+H.toFixed(3)+". checking for more payload ..."),this.level=r.nextLoadLevel=C;var ye=F.details;if(!ye||ye.live&&this.levelLastLoaded!==C){this.state=se.WAITING_LEVEL;return}if(this._streamEnded(U,ye)){var qe={};this.altAudio&&(qe.type="video"),this.hls.trigger(l.default.BUFFER_EOS,qe),this.state=se.ENDED;return}this._fetchPayloadOrEos(g,U,ye)}}}},f._fetchPayloadOrEos=function(r,c,_){var g=this.fragPrevious,C=this.level,F=_.fragments,x=F.length;if(x!==0){var H=F[0].start,U=F[x-1].start+F[x-1].duration,X=c.end,ye;if(_.initSegment&&!_.initSegment.data)ye=_.initSegment;else if(_.live){var qe=this.config.initialLiveManifestSize;if(xqe&&qe>U.currentTime&&(s.logger.log("buffer end: "+c.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+qe.toFixed(3)),U.currentTime=qe),this.nextLoadPosition=qe}if(r.PTSKnown&&c>g&&U&&U.readyState)return null;if(this.startFragRequested&&!r.PTSKnown){if(C)if(r.hasProgramDateTime)s.logger.log("live playlist, switching playlist, load frag with same PDT: "+C.programDateTime),X=No(F,C.endProgramDateTime,H.maxFragLookUpTolerance);else{var vn=C.sn+1;if(vn>=r.startSN&&vn<=r.endSN){var fa=F[vn-r.startSN];C.cc===fa.cc&&(X=fa,s.logger.log("live playlist, switching playlist, load frag with next SN: "+X.sn))}X||(X=K.search(F,function(Zn){return C.cc-Zn.cc}),X&&s.logger.log("live playlist, switching playlist, load frag with same CC: "+X.sn))}X||(X=F[Math.min(x-1,Math.round(x/2))],s.logger.log("live playlist, switching playlist, unknown, load middle frag : "+X.sn))}return X},f._findFragment=function(r,c,_,g,C,F,x){var H=this.hls.config,U;if(CF-H.maxFragLookUpTolerance?0:H.maxFragLookUpTolerance;U=Fr(c,g,C,X)}else U=g[_-1];if(U){var ye=U.sn-x.startSN,qe=c&&U.level===c.level,vn=g[ye-1],fa=g[ye+1];if(c&&U.sn===c.sn)if(qe&&!U.backtracked)if(U.snH.maxBufferHole&&c.dropped&&ye?(U=vn,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")):(U=fa,s.logger.log("Re-loading fragment with SN: "+U.sn))}else U=null;else U.backtracked&&(fa&&fa.backtracked?(s.logger.warn("Already backtracked from fragment "+fa.sn+", will not backtrack to fragment "+U.sn+". Loading fragment "+fa.sn),U=fa):(s.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),U.dropped=0,vn?(U=vn,U.backtracked=!0):ye&&(U=null)))}return U},f._loadKey=function(r){this.state=se.KEY_LOADING,this.hls.trigger(l.default.KEY_LOADING,{frag:r})},f._loadFragment=function(r){var c=this.fragmentTracker.getState(r);this.fragCurrent=r,r.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(r.sn)&&!r.bitrateTest&&(this.nextLoadPosition=r.start+r.duration),r.backtracked||c===Da.NOT_LOADED||c===Da.PARTIAL?(r.autoLevel=this.hls.autoLevelEnabled,r.bitrateTest=this.bitrateTest,this.hls.trigger(l.default.FRAG_LOADING,{frag:r}),this.demuxer||(this.demuxer=new Ge(this.hls,"main")),this.state=se.FRAG_LOADING):c===Da.APPENDING&&this._reduceMaxBufferLength(r.duration)&&this.fragmentTracker.removeFragment(r)},f.getBufferedFrag=function(r){return this.fragmentTracker.getBufferedFrag(r,b.MAIN)},f.followingBufferedFrag=function(r){return r?this.getBufferedFrag(r.endPTS+.5):null},f._checkFragmentChanged=function(){var r,c,_=this.media;if(_&&_.readyState&&_.seeking===!1&&(c=_.currentTime,c>this.lastCurrentTime&&(this.lastCurrentTime=c),j.isBuffered(_,c)?r=this.getBufferedFrag(c):j.isBuffered(_,c+.1)&&(r=this.getBufferedFrag(c+.1)),r)){var g=r;if(g!==this.fragPlaying){this.hls.trigger(l.default.FRAG_CHANGED,{frag:g});var C=g.level;(!this.fragPlaying||this.fragPlaying.level!==C)&&this.hls.trigger(l.default.LEVEL_SWITCHED,{level:C}),this.fragPlaying=g}}},f.immediateLevelSwitch=function(){if(s.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var r=this.media,c;r?(c=r.paused,r.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 r=this.media;r&&r.buffered.length&&(this.immediateSwitch=!1,j.isBuffered(r,r.currentTime)&&(r.currentTime-=1e-4),this.previouslyPaused||r.play())},f.nextLevelSwitch=function(){var r=this.media;if(r&&r.readyState){var c,_,g;if(_=this.getBufferedFrag(r.currentTime),_&&_.startPTS>1&&this.flushMainBuffer(0,_.startPTS-1),r.paused)c=0;else{var C=this.hls.nextLoadLevel,F=this.levels[C],x=this.fragLastKbps;x&&this.fragCurrent?c=this.fragCurrent.duration*F.bitrate/(1e3*x)+1:c=0}if(g=this.getBufferedFrag(r.currentTime+c),g&&(g=this.followingBufferedFrag(g),g)){var H=this.fragCurrent;H&&H.loader&&H.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(g.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(r,c){this.state=se.BUFFER_FLUSHING;var _={startOffset:r,endOffset:c};this.altAudio&&(_.type="video"),this.hls.trigger(l.default.BUFFER_FLUSHING,_)},f.onMediaAttached=function(r){var c=this.media=this.mediaBuffer=r.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 Iu(_,c,this.fragmentTracker,this.hls)},f.onMediaDetaching=function(){var r=this.media;r&&r.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(g){g.backtracked=void 0})}),r&&(r.removeEventListener("seeking",this.onvseeking),r.removeEventListener("seeked",this.onvseeked),r.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 r=this.media,c=r?r.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(r){var c=!1,_=!1,g;r.levels.forEach(function(F){g=F.audioCodec,g&&(g.indexOf("mp4a.40.2")!==-1&&(c=!0),g.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=r.altAudio,this.levels=r.levels,this.startFragRequested=!1;var C=this.config;(C.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(C.startPosition)},f.onLevelLoaded=function(r){var c=r.details,_=r.level,g=this.levels[this.levelLastLoaded],C=this.levels[_],F=c.totalduration,x=0;if(s.logger.log("level "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+F),c.live){var H=C.details;H&&c.fragments.length>0?(Rn(H,c),x=c.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(x,H),c.PTSKnown&&Object(i.isFiniteNumber)(x)?s.logger.log("live playlist sliding:"+x.toFixed(3)):(s.logger.log("live playlist - outdated PTS, unknown sliding"),Cr(this.fragPrevious,g,c))):(s.logger.log("live playlist - first load, unknown sliding"),c.PTSKnown=!1,Cr(this.fragPrevious,g,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 U=c.startTimeOffset;Object(i.isFiniteNumber)(U)?(U<0&&(s.logger.log("negative start time offset "+U+", count from end of last fragment"),U=x+F+U),s.logger.log("start time offset found in playlist, adjust startPosition to "+U),this.startPosition=U):c.live?(this.startPosition=this.computeLivePosition(x,c),s.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===se.WAITING_LEVEL&&(this.state=se.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE,this.tick())},f.onFragLoaded=function(r){var c=this.fragCurrent,_=this.hls,g=this.levels,C=this.media,F=r.frag;if(this.state===se.FRAG_LOADING&&c&&F.type==="main"&&F.level===c.level&&F.sn===c.sn){var x=r.stats,H=g[c.level],U=H.details;if(this.bitrateTest=!1,this.stats=x,s.logger.log("Loaded "+c.sn+" of ["+U.startSN+" ,"+U.endSN+"],level "+c.level),F.bitrateTest&&_.nextLoadLevel)this.state=se.IDLE,this.startFragRequested=!1,x.tparsed=x.tbuffered=window.performance.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:x,frag:c,id:"main"}),this.tick();else if(F.sn==="initSegment")this.state=se.IDLE,x.tparsed=x.tbuffered=window.performance.now(),U.initSegment.data=r.payload,_.trigger(l.default.FRAG_BUFFERED,{stats:x,frag:c,id:"main"}),this.tick();else{s.logger.log("Parsing "+c.sn+" of ["+U.startSN+" ,"+U.endSN+"],level "+c.level+", cc "+c.cc),this.state=se.PARSING,this.pendingBuffering=!0,this.appended=!1,F.bitrateTest&&(F.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:F}));var X=!(C&&C.seeking)&&(U.PTSKnown||!U.live),ye=U.initSegment?U.initSegment.data:[],qe=this._getAudioCodec(H),vn=this.demuxer=this.demuxer||new Ge(this.hls,"main");vn.push(r.payload,ye,qe,H.videoCodec,c,U.totalduration,X)}}this.fragLoadError=0},f.onFragParsingInitSegment=function(r){var c=this.fragCurrent,_=r.frag;if(c&&r.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING){var g=r.tracks,C,F;if(g.audio&&this.altAudio&&delete g.audio,F=g.audio,F){var x=this.levels[this.level].audioCodec,H=navigator.userAgent.toLowerCase();x&&this.audioCodecSwap&&(s.logger.log("swapping playlist audio codec"),x.indexOf("mp4a.40.5")!==-1?x="mp4a.40.2":x="mp4a.40.5"),this.audioCodecSwitch&&F.metadata.channelCount!==1&&H.indexOf("firefox")===-1&&(x="mp4a.40.5"),H.indexOf("android")!==-1&&F.container!=="audio/mpeg"&&(x="mp4a.40.2",s.logger.log("Android: force audio codec to "+x)),F.levelCodec=x,F.id=r.id}F=g.video,F&&(F.levelCodec=this.levels[this.level].videoCodec,F.id=r.id),this.hls.trigger(l.default.BUFFER_CODECS,g);for(C in g){F=g[C],s.logger.log("main track:"+C+",container:"+F.container+",codecs[level/parsed]=["+F.levelCodec+"/"+F.codec+"]");var U=F.initSegment;U&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,{type:C,data:U,parent:"main",content:"initSegment"}))}this.tick()}},f.onFragParsingData=function(r){var c=this,_=this.fragCurrent,g=r.frag;if(_&&r.id==="main"&&g.sn===_.sn&&g.level===_.level&&!(r.type==="audio"&&this.altAudio)&&this.state===se.PARSING){var C=this.levels[this.level],F=_;if(Object(i.isFiniteNumber)(r.endPTS)||(r.endPTS=r.startPTS+_.duration,r.endDTS=r.startDTS+_.duration),r.hasAudio===!0&&F.addElementaryStream(oe.AUDIO),r.hasVideo===!0&&F.addElementaryStream(oe.VIDEO),s.logger.log("Parsed "+r.type+",PTS:["+r.startPTS.toFixed(3)+","+r.endPTS.toFixed(3)+"],DTS:["+r.startDTS.toFixed(3)+"/"+r.endDTS.toFixed(3)+"],nb:"+r.nb+",dropped:"+(r.dropped||0)),r.type==="video")if(F.dropped=r.dropped,F.dropped)if(F.backtracked)s.logger.warn("Already backtracked on this fragment, appending with the gap",F.sn);else{var x=C.details;if(x&&F.sn===x.startSN)s.logger.warn("missing video frame(s) on first frag, appending with gap",F.sn);else{s.logger.warn("missing video frame(s), backtracking fragment",F.sn),this.fragmentTracker.removeFragment(F),F.backtracked=!0,this.nextLoadPosition=r.startPTS,this.state=se.IDLE,this.fragPrevious=F,this.tick();return}}else F.backtracked=!1;var H=Pe(C.details,F,r.startPTS,r.endPTS,r.startDTS,r.endDTS),U=this.hls;U.trigger(l.default.LEVEL_PTS_UPDATED,{details:C.details,level:this.level,drift:H,type:r.type,start:r.startPTS,end:r.endPTS}),[r.data1,r.data2].forEach(function(X){X&&X.length&&c.state===se.PARSING&&(c.appended=!0,c.pendingBuffering=!0,U.trigger(l.default.BUFFER_APPENDING,{type:r.type,data:X,parent:"main",content:"data"}))}),this.tick()}},f.onFragParsed=function(r){var c=this.fragCurrent,_=r.frag;c&&r.id==="main"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=se.PARSED,this._checkAppendedParsed())},f.onAudioTrackSwitching=function(r){var c=!!r.url,_=r.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 g=this.fragCurrent;g.loader&&(s.logger.log("switching to main audio track, cancel main fragment load"),g.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=se.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(r){var c=r.id,_=!!this.hls.audioTracks[c].url;if(_){var g=this.videoBuffer;g&&this.mediaBuffer!==g&&(s.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=g)}this.altAudio=_,this.tick()},f.onBufferCreated=function(r){var c=r.tracks,_,g,C=!1;for(var F in c){var x=c[F];x.id==="main"?(g=F,_=x,F==="video"&&(this.videoBuffer=c[F].buffer)):C=!0}C&&_?(s.logger.log("alternate track found, use "+g+".buffered to schedule main fragment loading"),this.mediaBuffer=_.buffer):this.mediaBuffer=this.media},f.onBufferAppended=function(r){if(r.parent==="main"){var c=this.state;(c===se.PARSING||c===se.PARSED)&&(this.pendingBuffering=r.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===se.PARSED&&(!this.appended||!this.pendingBuffering)){var r=this.fragCurrent;if(r){var c=this.mediaBuffer?this.mediaBuffer:this.media;s.logger.log("main buffered : "+pt.toString(c.buffered)),this.fragPrevious=r;var _=this.stats;_.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*_.total/(_.tbuffered-_.tfirst)),this.hls.trigger(l.default.FRAG_BUFFERED,{stats:_,frag:r,id:"main"}),this.state=se.IDLE}this.tick()}},f.onError=function(r){var c=r.frag||this.fragCurrent;if(!(c&&c.type!=="main")){var _=!!this.media&&j.isBuffered(this.media,this.media.currentTime)&&j.isBuffered(this.media,this.media.currentTime+.5);switch(r.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(!r.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var g=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);s.logger.warn("mediaController: frag loading failed, retry in "+g+" ms"),this.retryDate=window.performance.now()+g,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=se.FRAG_LOADING_WAITING_RETRY}else s.logger.error("mediaController: "+r.details+" reaches max retry, redispatch as fatal ..."),r.fatal=!0,this.state=se.ERROR;break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==se.ERROR&&(r.fatal?(this.state=se.ERROR,s.logger.warn("streamController: "+r.details+",switch to "+this.state+" state ...")):!r.levelRetry&&this.state===se.WAITING_LEVEL&&(this.state=se.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:r.parent==="main"&&(this.state===se.PARSING||this.state===se.PARSED)&&(_?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=se.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(r){var c=this.config;return c.maxMaxBufferLength>=r?(c.maxMaxBufferLength/=2,s.logger.warn("main:reduce max buffer length to "+c.maxMaxBufferLength+"s"),!0):!1},f._checkBuffer=function(){var r=this.media;if(!(!r||r.readyState===0)){var c=this.mediaBuffer?this.mediaBuffer:r,_=c.buffered;!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,_)}},f.onFragLoadEmergencyAborted=function(){this.state=se.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},f.onBufferFlushed=function(){var r=this.mediaBuffer?this.mediaBuffer:this.media;r&&this.fragmentTracker.detectEvictedFragments(oe.VIDEO,r.buffered),this.state=se.IDLE,this.fragPrevious=null},f.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},f._seekToStartPos=function(){var r=this.media,c=r.currentTime,_=r.seeking?c:this.startPosition;c!==_&&_>=0&&(s.logger.log("target start position not buffered, seek to buffered.start(0) "+_+" from current time "+c+" "),r.currentTime=_)},f._getAudioCodec=function(r){var c=this.config.defaultAudioCodec||r.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},Nc(h,[{key:"state",set:function(r){if(this.state!==r){var c=this.state;this._state=r,s.logger.log("main stream-controller: "+c+"->"+r),this.hls.trigger(l.default.STREAM_STATE_TRANSITION,{previousState:c,nextState:r})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var r=this.media;if(r){var c=this.getBufferedFrag(r.currentTime);if(c)return c.level}return-1}},{key:"nextBufferedFrag",get:function(){var r=this.media;return r?this.followingBufferedFrag(this.getBufferedFrag(r.currentTime)):null}},{key:"nextLevel",get:function(){var r=this.nextBufferedFrag;return r?r.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(r){this._liveSyncPosition=r}}]),h}(yl),ef=pd;function $_(w,h){for(var f=0;f0){g=c[0].bitrate,c.sort(function(X,ye){return X.bitrate-ye.bitrate}),this._levels=c;for(var U=0;U=0&&r1&&H.loadError0){var c=this.currentLevelIndex,_=r.urlId,g=r.url[_];s.logger.log("Attempt loading level index "+c+" with URL-id "+_),this.hls.trigger(l.default.LEVEL_LOADING,{url:g,level:c,id:_})}}},z_(h,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(r){var c=this._levels;c&&(r=Math.min(r,c.length-1),(this.currentLevelIndex!==r||!c[r].details)&&this.setLevelInternal(r))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(r){this.manualLevelIndex=r,this._startLevel===void 0&&(this._startLevel=r),r!==-1&&(this.level=r)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(r){this._firstLevel=r}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var r=this.hls.config.startLevel;return r!==void 0?r:this._firstLevel}else return this._startLevel},set:function(r){this._startLevel=r}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(r){this.level=r,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=r)}}]),h}(y),Q_=a("./src/demux/id3.js");function kD(w,h){var f;try{f=new Event("addtrack")}catch{f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=w,h.dispatchEvent(f)}function Js(w){if(w&&w.cues)for(;w.cues.length>0;)w.removeCue(w.cues[0])}function fE(w,h){if(hw[w.length-1].endTime)return w[w.length-1];for(var f=0,v=w.length-1;f<=v;){var r=Math.floor((v+f)/2);if(hw[r].endTime)f=r+1;else return w[r]}return w[f].endTime-hH&&(s.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),H=x+.25);for(var U=0;U=this.minWeight_},h.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},h.destroy=function(){},w}(),hE=mE;function qD(w,h){for(var f=0;f500*_.duration/H){var U=r.levels,X=Math.max(1,F.bw?F.bw/8:F.loaded*1e3/x),ye=U[_.level],qe=ye.realBitrate?Math.max(ye.realBitrate,ye.bitrate):ye.bitrate,vn=F.total?F.total:Math.max(F.loaded,Math.round(_.duration*qe/8)),fa=c.currentTime,Zn=(vn-F.loaded)/X,la=(j.bufferInfo(c,fa,r.config.maxBufferHole).end-fa)/H;if(la<2*_.duration/H&&Zn>la){var Ra,Oa;for(Oa=_.level-1;Oa>C;Oa--){var Su=U[Oa].realBitrate?Math.max(U[Oa].realBitrate,U[Oa].bitrate):U[Oa].bitrate,jo=_.duration*Su/(8*.8*X);if(jo=g;X--){var ye=U[X];if(!!ye){var qe=ye.details,vn=qe?qe.totalduration/qe.fragments.length:c,fa=qe?qe.live:!1,Zn=void 0;X<=r?Zn=x*_:Zn=H*_;var la=U[X].realBitrate?Math.max(U[X].realBitrate,U[X].bitrate):U[X].bitrate,Ra=la*vn/Zn;if(s.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+X+"/"+Math.round(Zn)+"/"+la+"/"+vn+"/"+F+"/"+Ra),Zn>la&&(!Ra||fa&&!this.bitrateTestDelay||Ra=0)return vn;s.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var fa=H?Math.min(H,g.maxStarvationDelay):g.maxStarvationDelay,Zn=g.abrBandWidthFactor,la=g.abrBandWidthUpFactor;if(qe===0){var Ra=this.bitrateTestDelay;if(Ra){var Oa=H?Math.min(H,g.maxLoadingDelay):g.maxLoadingDelay;fa=Oa-Ra,s.logger.trace("bitrate test took "+Math.round(1e3*Ra)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*fa)+" ms"),Zn=la=1}}return vn=this._findBestLevel(x,H,ye,C,c,qe+fa,Zn,la,_),Math.max(vn,0)}}]),h}(y),wE=yE;function bE(w,h){w.prototype=Object.create(h.prototype),w.prototype.constructor=w,w.__proto__=h}var WD=J(),EE=function(w){bE(h,w);function h(v){var r;return r=w.call(this,v,l.default.MEDIA_ATTACHING,l.default.MEDIA_DETACHING,l.default.MANIFEST_PARSED,l.default.BUFFER_RESET,l.default.BUFFER_APPENDING,l.default.BUFFER_CODECS,l.default.BUFFER_EOS,l.default.BUFFER_FLUSHING,l.default.LEVEL_PTS_UPDATED,l.default.LEVEL_UPDATED)||this,r._msDuration=null,r._levelDuration=null,r._levelTargetDuration=10,r._live=null,r._objectUrl=null,r._needsFlush=!1,r._needsEos=!1,r.config=void 0,r.audioTimestampOffset=void 0,r.bufferCodecEventsExpected=0,r._bufferCodecEventsTotal=0,r.media=null,r.mediaSource=null,r.segments=[],r.parent=void 0,r.appending=!1,r.appended=0,r.appendError=0,r.flushBufferCounter=0,r.tracks={},r.pendingTracks={},r.sourceBuffer={},r.flushRange=[],r._onMediaSourceOpen=function(){s.logger.log("media source opened"),r.hls.trigger(l.default.MEDIA_ATTACHED,{media:r.media});var c=r.mediaSource;c&&c.removeEventListener("sourceopen",r._onMediaSourceOpen),r.checkPendingTracks()},r._onMediaSourceClose=function(){s.logger.log("media source closed")},r._onMediaSourceEnded=function(){s.logger.log("media source ended")},r._onSBUpdateEnd=function(){if(r.audioTimestampOffset&&r.sourceBuffer.audio){var c=r.sourceBuffer.audio;s.logger.warn("change mpeg audio timestamp offset from "+c.timestampOffset+" to "+r.audioTimestampOffset),c.timestampOffset=r.audioTimestampOffset,delete r.audioTimestampOffset}r._needsFlush&&r.doFlush(),r._needsEos&&r.checkEos(),r.appending=!1;var _=r.parent,g=r.segments.reduce(function(U,X){return X.parent===_?U+1:U},0),C={},F=r.sourceBuffer;for(var x in F){var H=F[x];if(!H)throw Error("handling source buffer update end error: source buffer for "+x+" uninitilized and unable to update buffered TimeRanges.");C[x]=H.buffered}r.hls.trigger(l.default.BUFFER_APPENDED,{parent:_,pending:g,timeRanges:C}),r._needsFlush||r.doAppending(),r.updateMediaElementDuration(),g===0&&r.flushLiveBackBuffer()},r._onSBUpdateError=function(c){s.logger.error("sourceBuffer error:",c),r.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},r.config=v.config,r}var f=h.prototype;return f.destroy=function(){y.prototype.destroy.call(this)},f.onLevelPtsUpdated=function(r){var c=r.type,_=this.tracks.audio;if(c==="audio"&&_&&_.container==="audio/mpeg"){var g=this.sourceBuffer.audio;if(!g)throw Error("Level PTS Updated and source buffer for audio uninitalized");var C=Math.abs(g.timestampOffset-r.start);if(C>.1){var F=g.updating;try{g.abort()}catch(x){s.logger.warn("can not abort audio buffer: "+x)}F?this.audioTimestampOffset=r.start:(s.logger.warn("change mpeg audio timestamp offset from "+g.timestampOffset+" to "+r.start),g.timestampOffset=r.start)}}},f.onManifestParsed=function(r){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r.altAudio?2:1,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(r){var c=this.media=r.media;if(c&&WD){var _=this.mediaSource=new WD;_.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 r=this.mediaSource;if(r){if(r.readyState==="open")try{r.endOfStream()}catch(c){s.logger.warn("onMediaDetaching:"+c.message+" while calling endOfStream")}r.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("sourceended",this._onMediaSourceEnded),r.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 r=this.bufferCodecEventsExpected,c=this.pendingTracks,_=Object.keys(c).length;(_&&!r||_===2)&&(this.createSourceBuffers(c),this.pendingTracks={},this.doAppending())},f.onBufferReset=function(){var r=this.sourceBuffer;for(var c in r){var _=r[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(r){var c=this;Object.keys(this.sourceBuffer).length||(Object.keys(r).forEach(function(_){c.pendingTracks[_]=r[_]}),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())},f.createSourceBuffers=function(r){var c=this.sourceBuffer,_=this.mediaSource;if(!_)throw Error("createSourceBuffers called when mediaSource was null");for(var g in r)if(!c[g]){var C=r[g];if(!C)throw Error("source buffer exists for track "+g+", however track does not");var F=C.levelCodec||C.codec,x=C.container+";codecs="+F;s.logger.log("creating sourceBuffer("+x+")");try{var H=c[g]=_.addSourceBuffer(x);H.addEventListener("updateend",this._onSBUpdateEnd),H.addEventListener("error",this._onSBUpdateError),this.tracks[g]={buffer:H,codec:F,id:C.id,container:C.container,levelCodec:C.levelCodec}}catch(U){s.logger.error("error while trying to add sourceBuffer:"+U.message),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:U,mimeType:x})}}this.hls.trigger(l.default.BUFFER_CREATED,{tracks:this.tracks})},f.onBufferAppending=function(r){this._needsFlush||(this.segments?this.segments.push(r):this.segments=[r],this.doAppending())},f.onBufferEos=function(r){for(var c in this.sourceBuffer)if(!r.type||r.type===c){var _=this.sourceBuffer[c];_&&!_.ended&&(_.ended=!0,s.logger.log(c+" sourceBuffer now EOS"))}this.checkEos()},f.checkEos=function(){var r=this.sourceBuffer,c=this.mediaSource;if(!c||c.readyState!=="open"){this._needsEos=!1;return}for(var _ in r){var g=r[_];if(!!g){if(!g.ended)return;if(g.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(r){r.type?this.flushRange.push({start:r.startOffset,end:r.endOffset,type:r.type}):(this.flushRange.push({start:r.startOffset,end:r.endOffset,type:"video"}),this.flushRange.push({start:r.startOffset,end:r.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},f.flushLiveBackBuffer=function(){if(!!this._live){var r=this.config.liveBackBufferLength;if(!(!isFinite(r)||r<0)){if(!this.media){s.logger.error("flushLiveBackBuffer called without attaching media");return}for(var c=this.media.currentTime,_=this.sourceBuffer,g=Object.keys(_),C=c-Math.max(r,this._levelTargetDuration),F=g.length-1;F>=0;F--){var x=g[F],H=_[x];if(H){var U=H.buffered;U.length>0&&C>U.start(0)&&this.removeBufferRange(x,H,0,C)&&this.hls.trigger(l.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:C})}}}}},f.onLevelUpdated=function(r){var c=r.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 r=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 g=this.sourceBuffer[_];if(g&&g.updating===!0)return}c=this.media.duration,this._msDuration===null&&(this._msDuration=this.mediaSource.duration),this._live===!0&&r.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 r=this.flushRange[0];if(this.flushBuffer(r.start,r.end,r.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 g in _){var C=_[g];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 r=this.config,c=this.hls,_=this.segments,g=this.sourceBuffer;if(!!Object.keys(g).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=g[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(H){s.logger.error("error while trying to append buffer:"+H.message),_.unshift(C);var x={type:u.ErrorTypes.MEDIA_ERROR,parent:C.parent,details:"",fatal:!1};H.code===22?(this.segments=[],x.details=u.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,x.details=u.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>r.appendErrorMaxRetry&&(s.logger.log("fail "+r.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],x.fatal=!0)),c.trigger(l.default.ERROR,x)}}}},f.flushBuffer=function(r,c,_){var g=this.sourceBuffer;if(!Object.keys(g).length)return!0;var C="null";if(this.media&&(C=this.media.currentTime.toFixed(3)),s.logger.log("flushBuffer,pos/start/end: "+C+"/"+r+"/"+c),this.flushBufferCounter>=this.appended)return s.logger.warn("abort flushing too many retries"),!0;var F=g[_];if(F){if(F.ended=!1,F.updating)return s.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(_,F,r,c))return this.flushBufferCounter++,!1}return s.logger.log("buffer flushed"),!0},f.removeBufferRange=function(r,c,_,g){try{for(var C=0;C.5){var X="null";return this.media&&(X=this.media.currentTime.toString()),s.logger.log("sb remove "+r+" ["+H+","+U+"], of ["+F+","+x+"], pos:"+X),c.remove(H,U),!0}}}catch(ye){s.logger.warn("removeBufferRange failed",ye)}return!1},h}(y),IE=EE;function $D(w,h){for(var f=0;fthis.autoLevelCapping&&c.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},f.getMaxLevel=function(r){var c=this;if(!this.levels)return-1;var _=this.levels.filter(function(g,C){return h.isLevelAllowed(C,c.restrictedLevels)&&C<=r});return h.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)},h.isLevelAllowed=function(r,c){return c===void 0&&(c=[]),c.indexOf(r)===-1},h.getMaxLevelByMediaSize=function(r,c,_){if(!r||r&&!r.length)return-1;for(var g=function(U,X){return X?U.width!==X.width||U.height!==X.height:!0},C=r.length-1,F=0;F=c||x.height>=_)&&g(x,r[F+1])){C=F;break}}return C},TE(h,[{key:"mediaWidth",get:function(){var r,c=this.media;return c&&(r=c.width||c.clientWidth||c.offsetWidth,r*=h.contentScaleFactor),r}},{key:"mediaHeight",get:function(){var r,c=this.media;return c&&(r=c.height||c.clientHeight||c.offsetHeight,r*=h.contentScaleFactor),r}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=window.devicePixelRatio}catch{}return r}}]),h}(y),zD=SE;function CE(w,h){w.prototype=Object.create(h.prototype),w.prototype.constructor=w,w.__proto__=h}var Oc=window,FE=Oc.performance,Dd=function(w){CE(h,w);function h(v){return w.call(this,v,l.default.MEDIA_ATTACHING)||this}var f=h.prototype;return f.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},f.onMediaAttaching=function(r){var c=this.hls.config;if(c.capLevelOnFPSDrop){var _=this.video=r.media instanceof window.HTMLVideoElement?r.media:null;typeof _.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},f.checkFPS=function(r,c,_){var g=FE.now();if(c){if(this.lastTime){var C=g-this.lastTime,F=_-this.lastDroppedFrames,x=c-this.lastDecodedFrames,H=1e3*F/C,U=this.hls;if(U.trigger(l.default.FPS_DROP,{currentDropped:F,currentDecoded:x,totalDroppedFrames:_}),H>0&&F>U.config.fpsDroppedMonitoringThreshold*x){var X=U.currentLevel;s.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+X),X>0&&(U.autoLevelCapping===-1||U.autoLevelCapping>=X)&&(X=X-1,U.trigger(l.default.FPS_DROP_LEVEL_CAPPING,{level:X,droppedLevel:U.currentLevel}),U.autoLevelCapping=X,U.streamController.nextLevelSwitch())}}this.lastTime=g,this.lastDroppedFrames=_,this.lastDecodedFrames=c}},f.checkFPSInterval=function(){var r=this.video;if(r)if(this.isVideoPlaybackQualityAvailable){var c=r.getVideoPlaybackQuality();this.checkFPS(r,c.totalVideoFrames,c.droppedVideoFrames)}else this.checkFPS(r,r.webkitDecodedFrameCount,r.webkitDroppedFrameCount)},h}(y),GE=Dd,VD=window,gd=VD.performance,ME=VD.XMLHttpRequest,AE=function(){function w(f){f&&f.xhrSetup&&(this.xhrSetup=f.xhrSetup)}var h=w.prototype;return h.destroy=function(){this.abort(),this.loader=null},h.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},h.load=function(v,r,c){this.context=v,this.config=r,this.callbacks=c,this.stats={trequest:gd.now(),retry:0},this.retryDelay=r.retryDelay,this.loadInternal()},h.loadInternal=function(){var v,r=this.context;v=this.loader=new ME;var c=this.stats;c.tfirst=0,c.loaded=0;var _=this.xhrSetup;try{if(_)try{_(v,r.url)}catch{v.open("GET",r.url,!0),_(v,r.url)}v.readyState||v.open("GET",r.url,!0)}catch(g){this.callbacks.onError({code:v.status,text:g.message},r,v);return}r.rangeEnd&&v.setRequestHeader("Range","bytes="+r.rangeStart+"-"+(r.rangeEnd-1)),v.onreadystatechange=this.readystatechange.bind(this),v.onprogress=this.loadprogress.bind(this),v.responseType=r.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),v.send()},h.readystatechange=function(v){var r=v.currentTarget,c=r.readyState,_=this.stats,g=this.context,C=this.config;if(!_.aborted&&c>=2)if(window.clearTimeout(this.requestTimeout),_.tfirst===0&&(_.tfirst=Math.max(gd.now(),_.trequest)),c===4){var F=r.status;if(F>=200&&F<300){_.tload=Math.max(_.tfirst,gd.now());var x,H;g.responseType==="arraybuffer"?(x=r.response,H=x.byteLength):(x=r.responseText,H=x.length),_.loaded=_.total=H;var U={url:r.responseURL,data:x};this.callbacks.onSuccess(U,_,g,r)}else _.retry>=C.maxRetry||F>=400&&F<499?(s.logger.error(F+" while loading "+g.url),this.callbacks.onError({code:F,text:r.statusText},g,r)):(s.logger.warn(F+" while loading "+g.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)},h.loadtimeout=function(){s.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},h.loadprogress=function(v){var r=v.currentTarget,c=this.stats;c.loaded=v.loaded,v.lengthComputable&&(c.total=v.total);var _=this.callbacks.onProgress;_&&_(c,this.context,null,r)},w}(),Rd=AE;function QD(w,h){for(var f=0;f=this.tracks.length){s.logger.warn("Invalid audio track id:",r.id);return}if(s.logger.log("audioTrack "+r.id+" loaded"),this.tracks[r.id].details=r.details,r.details.live&&!this.hasInterval()){var c=r.details.targetduration*1e3;this.setInterval(c)}!r.details.live&&this.hasInterval()&&this.clearInterval()},f.onAudioTrackSwitched=function(r){var c=this.tracks[r.id].groupId;c&&this.audioGroupId!==c&&(this.audioGroupId=c)},f.onLevelLoaded=function(r){this._selectAudioGroup(r.level)},f.onError=function(r){r.type===u.ErrorTypes.NETWORK_ERROR&&(r.fatal&&this.clearInterval(),r.details===u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(s.logger.warn("Network failure on audio-track id:",r.context.id),this._handleLoadError()))},f._setAudioTrack=function(r){if(this._trackId===r&&this.tracks[this._trackId].details){s.logger.debug("Same id as current audio-track passed, and track details available -> no-op");return}if(r<0||r>=this.tracks.length){s.logger.warn("Invalid id passed to audio-track controller");return}var c=this.tracks[r];s.logger.log("Now switching to audio-track index "+r),this.clearInterval(),this._trackId=r;var _=c.url,g=c.type,C=c.id;this.hls.trigger(l.default.AUDIO_TRACK_SWITCHING,{id:C,type:g,url:_}),this._loadTrackDetailsIfNeeded(c)},f.doTick=function(){this._updateTrack(this._trackId)},f._selectAudioGroup=function(r){var c=this.hls.levels[r];if(!(!c||!c.audioGroupIds)){var _=c.audioGroupIds[c.urlId];this.audioGroupId!==_&&(this.audioGroupId=_,this._selectInitialAudioTrack())}},f._selectInitialAudioTrack=function(){var r=this,c=this.tracks;if(!!c.length){var _=this.tracks[this._trackId],g=null;if(_&&(g=_.name),this._selectDefaultTrack){var C=c.filter(function(H){return H.default});C.length?c=C:s.logger.warn("No default audio tracks defined")}var F=!1,x=function(){c.forEach(function(U){F||(!r.audioGroupId||U.groupId===r.audioGroupId)&&(!g||g===U.name)&&(r._setAudioTrack(U.id),F=!0)})};x(),F||(g=null,x()),F||(s.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},f._needsTrackLoading=function(r){var c=r.details,_=r.url;return!c||c.live?!!_:!1},f._loadTrackDetailsIfNeeded=function(r){if(this._needsTrackLoading(r)){var c=r.url,_=r.id;s.logger.log("loading audio-track playlist for id: "+_),this.hls.trigger(l.default.AUDIO_TRACK_LOADING,{url:c,id:_})}},f._updateTrack=function(r){if(!(r<0||r>=this.tracks.length)){this.clearInterval(),this._trackId=r,s.logger.log("trying to update audio-track "+r);var c=this.tracks[r];this._loadTrackDetailsIfNeeded(c)}},f._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var r=this._trackId,c=this.tracks[r],_=c.name,g=c.language,C=c.groupId;s.logger.warn("Loading failed on audio track id: "+r+", group-id: "+C+', name/language: "'+_+'" / "'+g+'"');for(var F=r,x=0;x0&&r===-1?(s.logger.log("audio:override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=se.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:r,this.state=se.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=r,this.state=se.STOPPED},f.doTick=function(){var r,c,_,g=this.hls,C=g.config;switch(this.state){case se.ERROR:case se.PAUSED:case se.BUFFER_FLUSHING:break;case se.STARTING:this.state=se.WAITING_TRACK,this.loadedmetadata=!1;break;case se.IDLE:var F=this.tracks;if(!F||!this.media&&(this.startFragRequested||!C.startFragPrefetch))break;if(this.loadedmetadata)r=this.media.currentTime;else if(r=this.nextLoadPosition,r===void 0)break;var x=this.mediaBuffer?this.mediaBuffer:this.media,H=this.videoBuffer?this.videoBuffer:this.media,U=j.bufferInfo(x,r,C.maxBufferHole),X=j.bufferInfo(H,r,C.maxBufferHole),ye=U.len,qe=U.end,vn=this.fragPrevious,fa=Math.min(C.maxBufferLength,C.maxMaxBufferLength),Zn=Math.max(fa,X.len),la=this.audioSwitch,Ra=this.trackId;if((yejo||U.nextStart)s.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=jo+.05;else return}if(_.initSegment&&!_.initSegment.data)ct=_.initSegment;else if(qe<=jo){if(ct=Oa[0],this.videoTrackCC!==null&&ct.cc!==this.videoTrackCC&&(ct=Ot(Oa,this.videoTrackCC)),_.live&&ct.loadIdx&&ct.loadIdx===this.fragLoadIdx){var dt=U.nextStart?U.nextStart:jo;s.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(dt+.05)),this.media.currentTime=dt+.05;return}}else{var xa,Eo=C.maxFragLookUpTolerance,e0=vn?Oa[vn.sn-Oa[0].sn+1]:void 0,n0=function(Cd){var FL=Math.min(Eo,Cd.duration);return Cd.start+Cd.duration-FL<=qe?1:Cd.start-FL>qe&&Cd.start?-1:0};qeOi-Eo&&(Eo=0),e0&&!n0(e0)?xa=e0:xa=K.search(Oa,n0)):xa=Oa[Su-1],xa&&(ct=xa,jo=xa.start,vn&&ct.level===vn.level&&ct.sn===vn.sn&&(ct.sn<_.endSN?(ct=Oa[ct.sn+1-_.startSN],s.logger.log("SN just loaded, load next one: "+ct.sn)):ct=null))}ct&&(ct.encrypted?(s.logger.log("Loading key for "+ct.sn+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra),this.state=se.KEY_LOADING,g.trigger(l.default.KEY_LOADING,{frag:ct})):(s.logger.log("Loading "+ct.sn+", cc: "+ct.cc+" of ["+_.startSN+" ,"+_.endSN+"],track "+Ra+", currentTime:"+r+",bufferEnd:"+qe.toFixed(3)),this.fragCurrent=ct,(la||this.fragmentTracker.getState(ct)===Da.NOT_LOADED)&&(ct.sn!=="initSegment"&&(this.startFragRequested=!0),Object(i.isFiniteNumber)(ct.sn)&&(this.nextLoadPosition=ct.start+ct.duration),g.trigger(l.default.FRAG_LOADING,{frag:ct}),this.state=se.FRAG_LOADING)))}break;case se.WAITING_TRACK:c=this.tracks[this.trackId],c&&c.details&&(this.state=se.IDLE);break;case se.FRAG_LOADING_WAITING_RETRY:var fI=El.now(),TL=this.retryDate;x=this.media;var YK=x&&x.seeking;(!TL||fI>=TL||YK)&&(s.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=se.IDLE);break;case se.WAITING_INIT_PTS:var _I=this.videoTrackCC;if(this.initPTS[_I]===void 0)break;var SL=this.waitingFragment;if(SL){var CL=SL.frag.cc;_I!==CL?(c=this.tracks[this.trackId],c.details&&c.details.live&&(s.logger.warn("Waiting fragment CC ("+CL+") does not match video track CC ("+_I+")"),this.waitingFragment=null,this.state=se.IDLE)):(this.state=se.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=se.IDLE;break;case se.STOPPED:case se.FRAG_LOADING:case se.PARSING:case se.PARSED:case se.ENDED:break;default:break}},f.onMediaAttached=function(r){var c=this.media=this.mediaBuffer=r.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 r=this.media;r&&r.ended&&(s.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),r&&(r.removeEventListener("seeking",this.onvseeking),r.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(r){s.logger.log("audio tracks updated"),this.tracks=r.audioTracks},f.onAudioTrackSwitching=function(r){var c=!!r.url;this.trackId=r.id,this.fragCurrent=null,this.state=se.PAUSED,this.waitingFragment=null,c?this.setInterval(XD):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),c&&(this.audioSwitch=!0,this.state=se.IDLE),this.tick()},f.onAudioTrackLoaded=function(r){var c=r.details,_=r.id,g=this.tracks[_],C=c.totalduration,F=0;if(s.logger.log("track "+_+" loaded ["+c.startSN+","+c.endSN+"],duration:"+C),c.live){var x=g.details;x&&c.fragments.length>0?(Rn(x,c),F=c.fragments[0].start,c.PTSKnown?s.logger.log("live audio playlist sliding:"+F.toFixed(3)):s.logger.log("live audio playlist - outdated PTS, unknown sliding")):(c.PTSKnown=!1,s.logger.log("live audio playlist - first load, unknown sliding"))}else c.PTSKnown=!1;if(g.details=c,!this.startFragRequested){if(this.startPosition===-1){var H=c.startTimeOffset;Object(i.isFiniteNumber)(H)?(s.logger.log("start time offset found in playlist, adjust startPosition to "+H),this.startPosition=H):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===se.WAITING_TRACK&&(this.state=se.IDLE),this.tick()},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE,this.tick())},f.onFragLoaded=function(r){var c=this.fragCurrent,_=r.frag;if(this.state===se.FRAG_LOADING&&c&&_.type==="audio"&&_.level===c.level&&_.sn===c.sn){var g=this.tracks[this.trackId],C=g.details,F=C.totalduration,x=c.level,H=c.sn,U=c.cc,X=this.config.defaultAudioCodec||g.audioCodec||"mp4a.40.2",ye=this.stats=r.stats;if(H==="initSegment")this.state=se.IDLE,ye.tparsed=ye.tbuffered=El.now(),C.initSegment.data=r.payload,this.hls.trigger(l.default.FRAG_BUFFERED,{stats:ye,frag:c,id:"audio"}),this.tick();else{this.state=se.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new Ge(this.hls,"audio"));var qe=this.initPTS[U],vn=C.initSegment?C.initSegment.data:[];if(C.initSegment||qe!==void 0){this.pendingBuffering=!0,s.logger.log("Demuxing "+H+" of ["+C.startSN+" ,"+C.endSN+"],track "+x);var fa=!1;this.demuxer.push(r.payload,vn,X,null,c,F,fa,qe)}else s.logger.log("unknown video PTS for continuity counter "+U+", waiting for video PTS before demuxing audio frag "+H+" of ["+C.startSN+" ,"+C.endSN+"],track "+x),this.waitingFragment=r,this.state=se.WAITING_INIT_PTS}}this.fragLoadError=0},f.onFragParsingInitSegment=function(r){var c=this.fragCurrent,_=r.frag;if(c&&r.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING){var g=r.tracks,C;if(g.video&&delete g.video,C=g.audio,C){C.levelCodec=C.codec,C.id=r.id,this.hls.trigger(l.default.BUFFER_CODECS,g),s.logger.log("audio track:audio,container:"+C.container+",codecs[level/parsed]=["+C.levelCodec+"/"+C.codec+"]");var F=C.initSegment;if(F){var x={type:"audio",data:F,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[x]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(l.default.BUFFER_APPENDING,x))}this.tick()}}},f.onFragParsingData=function(r){var c=this,_=this.fragCurrent,g=r.frag;if(_&&r.id==="audio"&&r.type==="audio"&&g.sn===_.sn&&g.level===_.level&&this.state===se.PARSING){var C=this.trackId,F=this.tracks[C],x=this.hls;Object(i.isFiniteNumber)(r.endPTS)||(r.endPTS=r.startPTS+_.duration,r.endDTS=r.startDTS+_.duration),_.addElementaryStream(oe.AUDIO),s.logger.log("parsed "+r.type+",PTS:["+r.startPTS.toFixed(3)+","+r.endPTS.toFixed(3)+"],DTS:["+r.startDTS.toFixed(3)+"/"+r.endDTS.toFixed(3)+"],nb:"+r.nb),Pe(F.details,_,r.startPTS,r.endPTS);var H=this.audioSwitch,U=this.media,X=!1;if(H)if(U&&U.readyState){var ye=U.currentTime;s.logger.log("switching audio track : currentTime:"+ye),ye>=r.startPTS&&(s.logger.log("switching audio track : flushing all audio"),this.state=se.BUFFER_FLUSHING,x.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),X=!0,this.audioSwitch=!1,x.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C}))}else this.audioSwitch=!1,x.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:C});var qe=this.pendingData;if(!qe){s.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),x.trigger(l.default.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});return}this.audioSwitch||([r.data1,r.data2].forEach(function(vn){vn&&vn.length&&qe.push({type:r.type,data:vn,parent:"audio",content:"data"})}),!X&&qe.length&&(qe.forEach(function(vn){c.state===se.PARSING&&(c.pendingBuffering=!0,c.hls.trigger(l.default.BUFFER_APPENDING,vn))}),this.pendingData=[],this.appended=!0)),this.tick()}},f.onFragParsed=function(r){var c=this.fragCurrent,_=r.frag;c&&r.id==="audio"&&_.sn===c.sn&&_.level===c.level&&this.state===se.PARSING&&(this.stats.tparsed=El.now(),this.state=se.PARSED,this._checkAppendedParsed())},f.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},f.onBufferCreated=function(r){var c=r.tracks.audio;c&&(this.mediaBuffer=c.buffer,this.loadedmetadata=!0),r.tracks.video&&(this.videoBuffer=r.tracks.video.buffer)},f.onBufferAppended=function(r){if(r.parent==="audio"){var c=this.state;(c===se.PARSING||c===se.PARSED)&&(this.pendingBuffering=r.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(this.state===se.PARSED&&(!this.appended||!this.pendingBuffering)){var r=this.fragCurrent,c=this.stats,_=this.hls;if(r){this.fragPrevious=r,c.tbuffered=El.now(),_.trigger(l.default.FRAG_BUFFERED,{stats:c,frag:r,id:"audio"});var g=this.mediaBuffer?this.mediaBuffer:this.media;g&&s.logger.log("audio buffered : "+pt.toString(g.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,_.trigger(l.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=se.IDLE}this.tick()}},f.onError=function(r){var c=r.frag;if(!(c&&c.type!=="audio"))switch(r.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:var _=r.frag;if(_&&_.type!=="audio")break;if(!r.fatal){var g=this.fragLoadError;g?g++:g=1;var C=this.config;if(g<=C.fragLoadingMaxRetry){this.fragLoadError=g;var F=Math.min(Math.pow(2,g-1)*C.fragLoadingRetryDelay,C.fragLoadingMaxRetryTimeout);s.logger.warn("AudioStreamController: frag loading failed, retry in "+F+" ms"),this.retryDate=El.now()+F,this.state=se.FRAG_LOADING_WAITING_RETRY}else s.logger.error("AudioStreamController: "+r.details+" reaches max retry, redispatch as fatal ..."),r.fatal=!0,this.state=se.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!==se.ERROR&&(this.state=r.fatal?se.ERROR:se.IDLE,s.logger.warn("AudioStreamController: "+r.details+" while loading frag, now switching to "+this.state+" state ..."));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(r.parent==="audio"&&(this.state===se.PARSING||this.state===se.PARSED)){var x=this.mediaBuffer,H=this.media.currentTime,U=x&&j.isBuffered(x,H)&&j.isBuffered(x,H+.5);if(U){var X=this.config;X.maxMaxBufferLength>=X.maxBufferLength&&(X.maxMaxBufferLength/=2,s.logger.warn("AudioStreamController: reduce max buffer length to "+X.maxMaxBufferLength+"s")),this.state=se.IDLE}else s.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=se.BUFFER_FLUSHING,this.hls.trigger(l.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}break;default:break}},f.onBufferFlushed=function(){var r=this,c=this.pendingData;c&&c.length?(s.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),c.forEach(function(_){r.hls.trigger(l.default.BUFFER_APPENDING,_)}),this.appended=!0,this.pendingData=[],this.state=se.PARSED):(this.state=se.IDLE,this.fragPrevious=null,this.tick())},nf(h,[{key:"state",set:function(r){if(this.state!==r){var c=this.state;this._state=r,s.logger.log("audio stream:"+c+"->"+r)}},get:function(){return this._state}}]),h}(yl),OE=jE,ZD=function(){if(typeof window!="undefined"&&window.VTTCue)return window.VTTCue;var w="auto",h={"":!0,lr:!0,rl:!0},f={start:!0,middle:!0,end:!0,left:!0,right:!0};function v(g){if(typeof g!="string")return!1;var C=h[g.toLowerCase()];return C?g.toLowerCase():!1}function r(g){if(typeof g!="string")return!1;var C=f[g.toLowerCase()];return C?g.toLowerCase():!1}function c(g){for(var C=1;C100)throw new Error("Position must be between 0 and 100.");Su=xa,this.hasBeenReset=!0}})),Object.defineProperty(x,"positionAlign",c({},H,{get:function(){return jo},set:function(xa){var Eo=r(xa);if(!Eo)throw new SyntaxError("An invalid or illegal string was specified.");jo=Eo,this.hasBeenReset=!0}})),Object.defineProperty(x,"size",c({},H,{get:function(){return Oi},set:function(xa){if(xa<0||xa>100)throw new Error("Size must be between 0 and 100.");Oi=xa,this.hasBeenReset=!0}})),Object.defineProperty(x,"align",c({},H,{get:function(){return ct},set:function(xa){var Eo=r(xa);if(!Eo)throw new SyntaxError("An invalid or illegal string was specified.");ct=Eo,this.hasBeenReset=!0}})),x.displayState=void 0}return _.prototype.getCueAsHTML=function(){var g=window.WebVTT;return g.convertCueToDOMTree(window,this.text)},_}(),UE=function(){return{decode:function(f){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))}}};function eg(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new UE,this.regionList=[]}function kE(w){function h(v,r,c,_){return(v|0)*3600+(r|0)*60+(c|0)+(_|0)/1e3}var f=w.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return f?f[3]?h(f[1],f[2],f[3].replace(":",""),f[4]):f[1]>59?h(f[1],f[2],0,f[4]):h(0,f[1],f[2],f[4]):null}function ng(){this.values=Object.create(null)}ng.prototype={set:function(h,f){!this.get(h)&&f!==""&&(this.values[h]=f)},get:function(h,f,v){return v?this.has(h)?this.values[h]:f[v]:this.has(h)?this.values[h]:f},has:function(h){return h in this.values},alt:function(h,f,v){for(var r=0;r=0&&f<=100)?(this.set(h,f),!0):!1}};function ag(w,h,f,v){var r=v?w.split(v):[w];for(var c in r)if(typeof r[c]=="string"){var _=r[c].split(f);if(_.length===2){var g=_[0],C=_[1];h(g,C)}}}var af=new ZD(0,0,0),ji=af.align==="middle"?"middle":"center";function BE(w,h,f){var v=w;function r(){var g=kE(w);if(g===null)throw new Error("Malformed timestamp: "+v);return w=w.replace(/^[^\sa-zA-Z-]+/,""),g}function c(g,C){var F=new ng;ag(g,function(U,X){switch(U){case"region":for(var ye=f.length-1;ye>=0;ye--)if(f[ye].id===X){F.set(U,f[ye].region);break}break;case"vertical":F.alt(U,X,["rl","lr"]);break;case"line":var qe=X.split(","),vn=qe[0];F.integer(U,vn),F.percent(U,vn)&&F.set("snapToLines",!1),F.alt(U,vn,["auto"]),qe.length===2&&F.alt("lineAlign",qe[1],["start",ji,"end"]);break;case"position":qe=X.split(","),F.percent(U,qe[0]),qe.length===2&&F.alt("positionAlign",qe[1],["start",ji,"end","line-left","line-right","auto"]);break;case"size":F.percent(U,X);break;case"align":F.alt(U,X,["start",ji,"end","left","right"]);break}},/:/,/\s/),C.region=F.get("region",null),C.vertical=F.get("vertical","");var x=F.get("line","auto");x==="auto"&&af.line===-1&&(x=-1),C.line=x,C.lineAlign=F.get("lineAlign","start"),C.snapToLines=F.get("snapToLines",!0),C.size=F.get("size",100),C.align=F.get("align",ji);var H=F.get("position","auto");H==="auto"&&af.position===50&&(H=C.align==="start"||C.align==="left"?0:C.align==="end"||C.align==="right"?100:50),C.position=H}function _(){w=w.replace(/^\s+/,"")}if(_(),h.startTime=r(),_(),w.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+v);w=w.substr(3),_(),h.endTime=r(),_(),c(w,h)}function tg(w){return w.replace(//gi,` `)}eg.prototype={parse:function(h){var f=this;h&&(f.buffer+=f.decoder.decode(h,{stream:!0}));function v(){var F=f.buffer,x=0;for(F=tg(F);x")===-1){f.cue.id=c;continue}case"CUE":try{BE(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&&(g=!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 h=this;try{if(h.buffer+=h.decoder.decode(),(h.cue||h.state==="HEADER")&&(h.buffer+=` `,h.parse()),h.state==="INITIAL")throw new Error("Malformed WebVTT signature.")}catch(f){throw f}return h.onflush&&h.onflush(),this}};var HE=eg;function qE(w,h,f,v){for(var r,c,_,g,C,F=window.VTTCue||TextTrackCue,x=0;x=16?g--:g++,navigator.userAgent.match(/Firefox\//)?c.line=x+1:c.line=x>7?x-2:x+1,c.align="left",c.position=Math.max(0,Math.min(100,100*(g/32))),w.addCue(c)}}var yd={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},rg=function(h){var f=h;return yd.hasOwnProperty(h)&&(f=yd[h]),String.fromCharCode(f)},Tu=15,Il=100,JE={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},WE={17:2,18:4,21:6,22:8,23:10,19:13,20:15},$E={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},zE={25:2,26:4,29:6,30:8,31:10,27:13,28:15},VE=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],og;(function(w){w[w.ERROR=0]="ERROR",w[w.TEXT=1]="TEXT",w[w.WARNING=2]="WARNING",w[w.INFO=2]="INFO",w[w.DEBUG=3]="DEBUG",w[w.DATA=3]="DATA"})(og||(og={}));var Ha={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(h){this.time=h},log:function(h,f){var v=this.verboseFilter[h];this.verboseLevel>=v}},Uc=function(h){for(var f=[],v=0;vIl&&(Ha.log("ERROR","Too large cursor position "+this.pos),this.pos=Il)},h.moveCursor=function(v){var r=this.pos+v;if(v>1)for(var c=this.pos+1;c=144&&this.backSpace();var r=rg(v);if(this.pos>=Il){Ha.log("ERROR","Cannot insert "+v.toString(16)+" ("+r+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(r,this.currPenState),this.moveCursor(1)},h.clearFromPos=function(v){var r;for(r=v;r0&&(v?c="["+r.join(" | ")+"]":c=r.join(` `)),c},h.getTextAndFormat=function(){return this.rows},w}(),Y_=function(){function w(f,v){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.lastCueEndTime=void 0,this.chNr=f,this.outputFilter=v,this.mode=null,this.verbose=0,this.displayedMemory=new qa,this.nonDisplayedMemory=new qa,this.lastOutputScreen=new qa,this.currRollUpRow=this.displayedMemory.rows[Tu-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var h=w.prototype;return h.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[Tu-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},h.getHandler=function(){return this.outputFilter},h.setHandler=function(v){this.outputFilter=v},h.setPAC=function(v){this.writeScreen.setPAC(v)},h.setBkgData=function(v){this.writeScreen.setBkgData(v)},h.setMode=function(v){v!==this.mode&&(this.mode=v,Ha.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)},h.insertChars=function(v){for(var r=0;r=46,r.italics)r.foreground="white";else{var c=Math.floor(v/2)-16,_=["white","green","blue","cyan","red","yellow","magenta"];r.foreground=_[c]}Ha.log("INFO","MIDROW: "+JSON.stringify(r)),this.writeScreen.setPen(r)},h.outputDataUpdate=function(v){v===void 0&&(v=!1);var r=Ha.time;r!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=r:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,r,this.lastOutputScreen),v&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:r),this.lastOutputScreen.copy(this.displayedMemory))},h.cueSplitAtTime=function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))},w}(),X_=function(){function w(f,v,r){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,r],this.channels=[new Y_(1,v),new Y_(2,r)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}var h=w.prototype;return h.getHandler=function(v){return this.channels[v].getHandler()},h.setHandler=function(v,r){this.channels[v].setHandler(r)},h.addData=function(v,r){var c,_,g,C=!1;this.lastTime=v,Ha.setTime(v);for(var F=0;F ("+Uc([_,g])+")");if(c=this.parseCmd(_,g),c||(c=this.parseMidrow(_,g)),c||(c=this.parsePAC(_,g)),c||(c=this.parseBackgroundAttributes(_,g)),!c&&(C=this.parseChars(_,g),C))if(this.currChNr&&this.currChNr>=0){var x=this.channels[this.currChNr-1];x.insertChars(C)}else Ha.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:C?this.dataCounters.char+=2:(this.dataCounters.other+=2,Ha.log("WARNING","Couldn't parse cleaned data "+Uc([_,g])+" orig: "+Uc([r[F],r[F+1]])))}},h.parseCmd=function(v,r){var c=null,_=(v===20||v===28)&&r>=32&&r<=47,g=(v===23||v===31)&&r>=33&&r<=35;if(!(_||g))return!1;if(v===this.lastCmdA&&r===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Ha.log("DEBUG","Repeated command ("+Uc([v,r])+") is dropped"),!0;v===20||v===23?c=1:c=2;var C=this.channels[c-1];return v===20||v===28?r===32?C.ccRCL():r===33?C.ccBS():r===34?C.ccAOF():r===35?C.ccAON():r===36?C.ccDER():r===37?C.ccRU(2):r===38?C.ccRU(3):r===39?C.ccRU(4):r===40?C.ccFON():r===41?C.ccRDC():r===42?C.ccTR():r===43?C.ccRTD():r===44?C.ccEDM():r===45?C.ccCR():r===46?C.ccENM():r===47&&C.ccEOC():C.ccTO(r-32),this.lastCmdA=v,this.lastCmdB=r,this.currChNr=c,!0},h.parseMidrow=function(v,r){var c=null;if((v===17||v===25)&&r>=32&&r<=47){if(v===17?c=1:c=2,c!==this.currChNr)return Ha.log("ERROR","Mismatch channel in midrow parsing"),!1;var _=this.channels[c-1];return _.ccMIDROW(r),Ha.log("DEBUG","MIDROW ("+Uc([v,r])+")"),!0}return!1},h.parsePAC=function(v,r){var c=null,_=null,g=(v>=17&&v<=23||v>=25&&v<=31)&&r>=64&&r<=127,C=(v===16||v===24)&&r>=64&&r<=95;if(!(g||C))return!1;if(v===this.lastCmdA&&r===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;c=v<=23?1:2,r>=64&&r<=95?_=c===1?JE[v]:$E[v]:_=c===1?WE[v]:zE[v];var F=this.interpretPAC(_,r),x=this.channels[c-1];return x.setPAC(F),this.lastCmdA=v,this.lastCmdB=r,this.currChNr=c,!0},h.interpretPAC=function(v,r){var c=r,_={color:null,italics:!1,indent:null,underline:!1,row:v};return r>95?c=r-96:c=r-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,_},h.parseChars=function(v,r){var c=null,_=null,g=null;if(v>=25?(c=2,g=v-8):(c=1,g=v),g>=17&&g<=19){var C=r;g===17?C=r+80:g===18?C=r+112:C=r+144,Ha.log("INFO","Special char '"+rg(C)+"' in channel "+c),_=[C]}else v>=32&&v<=127&&(_=r===0?[v]:[v,r]);if(_){var F=Uc(_);Ha.log("DEBUG","Char codes = "+F.join(",")),this.lastCmdA=null,this.lastCmdB=null}return _},h.parseBackgroundAttributes=function(v,r){var c,_,g,C,F=(v===16||v===24)&&r>=32&&r<=47,x=(v===23||v===31)&&r>=45&&r<=47;return F||x?(c={},v===16||v===24?(_=Math.floor((r-32)/2),c.background=VE[_],r%2==1&&(c.background=c.background+"_semi")):r===45?c.background="transparent":(c.foreground="black",r===47&&(c.underline=!0)),g=v<24?1:2,C=this.channels[g-1],C.setBkgData(c),this.lastCmdA=null,this.lastCmdB=null,!0):!1},h.reset=function(){for(var v=0;vv)&&(this.startTime=v),this.endTime=r,this.screen=c,this.timelineController.createCaptionsTrack(this.trackName)},w}(),bd=function(h,f,v){return h.substr(v||0,f.length)===f},XE=function(h){var f=parseInt(h.substr(-3)),v=parseInt(h.substr(-6,2)),r=parseInt(h.substr(-9,2)),c=h.length>9?parseInt(h.substr(0,h.indexOf(":"))):0;if(!Object(i.isFiniteNumber)(f)||!Object(i.isFiniteNumber)(v)||!Object(i.isFiniteNumber)(r)||!Object(i.isFiniteNumber)(c))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+h);return f+=1e3*v,f+=60*1e3*r,f+=60*60*1e3*c,f},Z_=function(h){for(var f=5381,v=h.length;v;)f=f*33^h.charCodeAt(--v);return(f>>>0).toString()},ZE=function(h,f,v){var r=h[f],c=h[r.prevCC];if(!c||!c.new&&r.new){h.ccOffset=h.presentationOffset=r.start,r.new=!1;return}for(;c&&c.new;)h.ccOffset+=r.start-c.start,r.new=!1,r=c,c=h[r.prevCC];h.presentationOffset=v},eI={parse:function(h,f,v,r,c,_){var g=/\r\n|\n\r|\n|\r/g,C=Object(Q_.utf8ArrayToStr)(new Uint8Array(h)).trim().replace(g,` `).split(` `),F="00:00.000",x=0,H=0,U=0,X=[],ye,qe=!0,vn=!1,fa=new HE;fa.oncue=function(Zn){var la=v[r],Ra=v.ccOffset;la&&la.new&&(H!==void 0?Ra=v.ccOffset=la.start:ZE(v,r,U)),U&&(Ra=U-v.presentationOffset),vn&&(Zn.startTime+=Ra-H,Zn.endTime+=Ra-H),Zn.id=Z_(Zn.startTime.toString())+Z_(Zn.endTime.toString())+Z_(Zn.text),Zn.text=decodeURIComponent(encodeURIComponent(Zn.text)),Zn.endTime>0&&X.push(Zn)},fa.onparsingerror=function(Zn){ye=Zn},fa.onflush=function(){if(ye&&_){_(ye);return}c(X)},C.forEach(function(Zn){if(qe)if(bd(Zn,"X-TIMESTAMP-MAP=")){qe=!1,vn=!0,Zn.substr(16).split(",").forEach(function(la){bd(la,"LOCAL:")?F=la.substr(6):bd(la,"MPEGTS:")&&(x=parseInt(la.substr(7)))});try{f+(v[r].start*9e4||0)<0&&(f+=8589934592),x-=f,H=XE(F)/1e3,U=x/9e4}catch(la){vn=!1,ye=la}return}else Zn===""&&(qe=!1);fa.parse(Zn+` `)}),fa.flush()}},nI=eI;function ig(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function aI(w,h){w.prototype=Object.create(h.prototype),w.prototype.constructor=w,w.__proto__=h}var tI=function(w){aI(h,w);function h(v){var r;if(r=w.call(this,v,l.default.MEDIA_ATTACHING,l.default.MEDIA_DETACHING,l.default.FRAG_PARSING_USERDATA,l.default.FRAG_DECRYPTED,l.default.MANIFEST_LOADING,l.default.MANIFEST_LOADED,l.default.FRAG_LOADED,l.default.INIT_PTS_FOUND)||this,r.media=null,r.config=void 0,r.enabled=!0,r.Cues=void 0,r.textTracks=[],r.tracks=[],r.initPTS=[],r.unparsedVttFrags=[],r.cueRanges=[],r.captionsTracks={},r.captionsProperties=void 0,r.cea608Parser=void 0,r.lastSn=-1,r.prevCC=-1,r.vttCCs=null,r.hls=v,r.config=v.config,r.Cues=v.config.cueHandler,r.captionsProperties={textTrack1:{label:r.config.captionsTextTrack1Label,languageCode:r.config.captionsTextTrack1LanguageCode},textTrack2:{label:r.config.captionsTextTrack2Label,languageCode:r.config.captionsTextTrack2LanguageCode}},r.config.enableCEA708Captions){var c=new ug(ig(r),"textTrack1"),_=new ug(ig(r),"textTrack2");r.cea608Parser=new YE(0,c,_)}return r}var f=h.prototype;return f.addCues=function(r,c,_,g){for(var C=this.cueRanges,F=!1,x=C.length;x--;){var H=C[x],U=rI(H[0],H[1],c,_);if(U>=0&&(H[0]=Math.min(H[0],c),H[1]=Math.max(H[1],_),F=!0,U/(_-c)>.5))return}F||C.push([c,_]),this.Cues.newCue(this.captionsTracks[r],c,_,g)},f.onInitPtsFound=function(r){var c=this,_=r.frag,g=r.id,C=r.initPTS,F=this.unparsedVttFrags;g==="main"&&(this.initPTS[_.cc]=C),F.length&&(this.unparsedVttFrags=[],F.forEach(function(x){c.onFragLoaded(x)}))},f.getExistingTrack=function(r){var c=this.media;if(c)for(var _=0;_=F.length||_!==C||!x||this.stopped){this._clearReloadTimer();return}if(s.logger.log("subtitle track "+_+" loaded"),g.live){var H=Lt(x.details,g,r.stats.trequest);s.logger.log("Reloading live subtitle playlist in "+H+"ms"),this.timer=setTimeout(function(){c._loadCurrentTrack()},H)}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 r=this.trackId,c=this.tracks,_=this.hls,g=c[r];r<0||!g||g.details&&!g.details.live||(s.logger.log("Loading subtitle track "+r),_.trigger(l.default.SUBTITLE_TRACK_LOADING,{url:g.url,id:r}))},f._toggleTrackModes=function(r){var c=this.media,_=this.subtitleDisplay,g=this.trackId;if(!!c){var C=p(c.textTracks);if(r===-1)[].slice.call(C).forEach(function(H){H.mode="disabled"});else{var F=C[g];F&&(F.mode="disabled")}var x=C[r];x&&(x.mode=_?"showing":"hidden")}},f._setSubtitleTrackInternal=function(r){var c=this.hls,_=this.tracks;!Object(i.isFiniteNumber)(r)||r<-1||r>=_.length||(this.trackId=r,s.logger.log("Switching to subtitle track "+r),c.trigger(l.default.SUBTITLE_TRACK_SWITCH,{id:r}),this._loadCurrentTrack())},f._onTextTracksChanged=function(){if(!!this.media){for(var r=-1,c=p(this.media.textTracks),_=0;_=g[x].start&&F<=g[x].end){C=g[x];break}var H=c.start+c.duration;C?C.end=H:(C={start:F,end:H},g.push(C))}}},f.onMediaAttached=function(r){var c=r.media;this.media=c,c.addEventListener("seeking",this._onMediaSeeking),this.state=se.IDLE},f.onMediaDetaching=function(){var r=this;!this.media||(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach(function(c){r.tracksBuffered[c.id]=[]}),this.media=null,this.state=se.STOPPED)},f.onError=function(r){var c=r.frag;!c||c.type!=="subtitle"||(this.state=se.IDLE)},f.onSubtitleTracksUpdated=function(r){var c=this;s.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=r.subtitleTracks,this.tracks.forEach(function(_){c.tracksBuffered[_.id]=[]})},f.onSubtitleTrackSwitch=function(r){if(this.currentTrackId=r.id,!this.tracks||!this.tracks.length||this.currentTrackId===-1){this.clearInterval();return}var c=this.tracks[this.currentTrackId];c&&c.details&&this.setInterval(ha)},f.onSubtitleTrackLoaded=function(r){var c=r.id,_=r.details,g=this.currentTrackId,C=this.tracks,F=C[g];c>=C.length||c!==g||!F||(_.live&&Vn(F.details,_,this.lastAVStart),F.details=_,this.setInterval(ha))},f.onKeyLoaded=function(){this.state===se.KEY_LOADING&&(this.state=se.IDLE)},f.onFragLoaded=function(r){var c=this.fragCurrent,_=r.frag.decryptdata,g=r.frag,C=this.hls;if(this.state===se.FRAG_LOADING&&c&&r.frag.type==="subtitle"&&c.sn===r.frag.sn&&r.payload.byteLength>0&&_&&_.key&&_.method==="AES-128"){var F=_n.now();this.decrypter.decrypt(r.payload,_.key.buffer,_.iv.buffer,function(x){var H=_n.now();C.trigger(l.default.FRAG_DECRYPTED,{frag:g,payload:x,stats:{tstart:F,tdecrypt:H}})})}},f.onLevelUpdated=function(r){var c=r.details,_=c.fragments;this.lastAVStart=_.length?_[0].start:0},f.doTick=function(){if(!this.media){this.state=se.IDLE;return}switch(this.state){case se.IDLE:{var r=this.config,c=this.currentTrackId,_=this.fragmentTracker,g=this.media,C=this.tracks;if(!C||!C[c]||!C[c].details)break;var F=r.maxBufferHole,x=r.maxFragLookUpTolerance,H=Math.min(r.maxBufferLength,r.maxMaxBufferLength),U=j.bufferedInfo(this._getBuffered(),g.currentTime,F),X=U.end,ye=U.len,qe=C[c].details,vn=qe.fragments,fa=vn.length,Zn=vn[fa-1].start+vn[fa-1].duration;if(ye>H)return;var la,Ra=this.fragPrevious;Xsg){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=sg-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(_,g)}break}},f._generateLicenseRequestChallenge=function(r,c){switch(r.mediaKeySystemDomain){case zt.WIDEVINE:return c}throw new Error("unsupported key-system: "+r.mediaKeySystemDomain)},f._requestLicense=function(r,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 g=this.getLicenseServerUrl(_.mediaKeySystemDomain),C=this._createLicenseXhr(g,r,c);s.logger.log("Sending license request to URL: "+g);var F=this._generateLicenseRequestChallenge(_,r);C.send(F)}catch(x){s.logger.error("Failure requesting DRM license: "+x),this.hls.trigger(l.default.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},f.onMediaAttached=function(r){if(!!this._emeEnabled){var c=r.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(r){if(!!this._emeEnabled){var c=r.levels.map(function(g){return g.audioCodec}),_=r.levels.map(function(g){return g.videoCodec});this._attemptKeySystemAccess(zt.WIDEVINE,c,_)}},iI(h,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),h}(y),cI=fg;function sI(w){for(var h=1;hc)return g}return 0}},{key:"maxAutoLevel",get:function(){var r=this.levels,c=this.autoLevelCapping,_;return c===-1&&r&&r.length?_=r.length-1:_=c,_}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(r){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,r)}},{key:"audioTracks",get:function(){var r=this.audioTrackController;return r?r.audioTracks:[]}},{key:"audioTrack",get:function(){var r=this.audioTrackController;return r?r.audioTrack:-1},set:function(r){var c=this.audioTrackController;c&&(c.audioTrack=r)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var r=this.subtitleTrackController;return r?r.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var r=this.subtitleTrackController;return r?r.subtitleTrack:-1},set:function(r){var c=this.subtitleTrackController;c&&(c.subtitleTrack=r)}},{key:"subtitleDisplay",get:function(){var r=this.subtitleTrackController;return r?r.subtitleDisplay:!1},set:function(r){var c=this.subtitleTrackController;c&&(c.subtitleDisplay=r)}}]),h}(re);Dg.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(o){return typeof o=="number"&&isFinite(o)}},"./src/utils/get-self-scope.js":function(e,n,a){"use strict";a.r(n),a.d(n,"getSelfScope",function(){return t});function t(){return typeof window=="undefined"?self:window}},"./src/utils/logger.js":function(e,n,a){"use strict";a.r(n),a.d(n,"enableLogs",function(){return y}),a.d(n,"logger",function(){return I});var t=a("./src/utils/get-self-scope.js");function o(){}var u={trace:o,debug:o,log:o,warn:o,info:o,error:o},i=u;function l(b,S){return S="["+b+"] > "+S,S}var s=Object(t.getSelfScope)();function R(b){var S=s.console[b];return S?function(){for(var L=arguments.length,O=new Array(L),$=0;$1?S-1:0),O=1;O{"use strict";Object.defineProperty(hD,"__esModule",{value:!0});hD.Direction=void 0;var R1e;(function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"})(R1e=hD.Direction||(hD.Direction={}))});var gA=je(Aa=>{"use strict";var DD=Aa&&Aa.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,o=n.length,u;te)return s;if(R&&Rt)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,")"))}Aa.checkBoundaries=T1e;function S1e(e,n,a){return ea?a:e}Aa.checkValuesAgainstBoundaries=S1e;function C1e(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}"))}Aa.checkInitialOverlap=C1e;function F1e(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)}}Aa.getMargin=F1e;function G1e(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)}}Aa.getPaddingAndBorder=G1e;function M1e(e,n,a){var t=a?-1:1;e.forEach(function(o,u){return Iz(o,t*n[u].x,n[u].y)})}Aa.translateThumbs=M1e;function A1e(e,n,a,t){for(var o=0,u=Sz(e[0],n,a,t),i=1;ii?s:i},e.getBoundingClientRect().width));return u},O1e=function(e,n,a,t,o,u,i){i===void 0&&(i=function(R){return R});var l=[],s=function(R){var d=Tz(a[R],t[R],o,u,i),y=n[R].x;n.forEach(function(I,b){var S=I.x,L=Tz(a[b],t[b],o,u,i);R!==b&&(y>=S&&y<=S+L||y+d>=S&&y+d<=S+L)&&(l.includes(b)||(l.push(R),l.push(b),l=DD(DD([],l,!0),[R,b],!1),s(b)))})};return s(e),Array.from(new Set(l.sort()))},U1e=function(e,n,a,t,o,u){t===void 0&&(t=.1),o===void 0&&(o=" - "),u===void 0&&(u=function(b){return b});var i=(0,Aa.getStepDecimals)(t),l=(0,DA.useState)({}),s=l[0],R=l[1],d=(0,DA.useState)(u(n[a].toFixed(i))),y=d[0],I=d[1];return(0,DA.useEffect)(function(){if(e){var b=e.getThumbs();if(b.length<1)return;var S={},L=e.getOffsets(),O=O1e(a,L,b,n,o,i,u),$=u(n[a].toFixed(i));if(O.length){var z=O.reduce(function(Re,nn,cn,ce){return Re.length?DD(DD([],Re,!0),[L[ce[cn]].x],!1):[L[ce[cn]].x]},[]);if(Math.min.apply(Math,z)===L[a].x){var ee=[];O.forEach(function(Re){ee.push(n[Re].toFixed(i))}),$=Array.from(new Set(ee.sort(function(Re,nn){return parseFloat(Re)-parseFloat(nn)}))).map(u).join(o);var oe=Math.min.apply(Math,z),te=Math.max.apply(Math,z),ve=b[O[z.indexOf(te)]].getBoundingClientRect().width;S.left="".concat(Math.abs(oe-(te+ve))/2,"px"),S.transform="translate(-50%, 0)"}else S.visibility="hidden"}I($),R(S)}},[e,n]),[y,s]};Aa.useThumbOverlap=U1e;function Sz(e,n,a,t){var o=e.getBoundingClientRect(),u=o.left,i=o.top,l=o.width,s=o.height;return Ez(t)?Math.abs(a-(i+s/2)):Math.abs(n-(u+l/2))}});var Fz=je(Fi=>{"use strict";var k1e=Fi&&Fi.__extends||function(){var e=function(n,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(t[u]=o[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)}}(),B1e=Fi&&Fi.__createBinding||(Object.create?function(e,n,a,t){t===void 0&&(t=a);var o=Object.getOwnPropertyDescriptor(n,a);(!o||("get"in o?!n.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return n[a]}}),Object.defineProperty(e,t,o)}:function(e,n,a,t){t===void 0&&(t=a),e[t]=n[a]}),H1e=Fi&&Fi.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),q1e=Fi&&Fi.__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)&&B1e(n,e,a);return H1e(n,e),n},Cz=Fi&&Fi.__spreadArray||function(e,n,a){if(a||arguments.length===2)for(var t=0,o=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(o.target)}))return;t.setState({draggedTrackPos:[o.clientX,o.clientY]},function(){return t.onMove(o.clientX,o.clientY)})}else{var i=(0,Dt.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),o.clientX,o.clientY,t.props.direction);(u=t.thumbRefs[i].current)===null||u===void 0||u.focus(),t.setState({draggedThumbIndex:i},function(){return t.onMove(o.clientX,o.clientY)})}},t.onResize=function(){(0,Dt.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(o){var u;if(o.persist(),t.addTouchEvents(o.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(o.target)}))return;t.setState({draggedTrackPos:[o.touches[0].clientX,o.touches[0].clientY]},function(){return t.onMove(o.touches[0].clientX,o.touches[0].clientY)})}else{var i=(0,Dt.getClosestThumbIndex)(t.thumbRefs.map(function(l){return l.current}),o.touches[0].clientX,o.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(o.touches[0].clientX,o.touches[0].clientY)})}},t.onMouseOrTouchStart=function(o){if(!t.props.disabled){var u=(0,Dt.isTouchEvent)(o);if(!(!u&&o.button!==0)){var i=t.getTargetIndex(o);i!==-1&&(u?t.addTouchEvents(o):t.addMouseEvents(o),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(o){o.preventDefault(),t.onMove(o.clientX,o.clientY)},t.onTouchMove=function(o){o.preventDefault(),t.onMove(o.touches[0].clientX,o.touches[0].clientY)},t.onKeyDown=function(o){var u=t.props,i=u.values,l=u.onChange,s=u.step,R=u.rtl,d=u.direction,y=t.state.isChanged,I=t.getTargetIndex(o.nativeEvent),b=R||d===no.Direction.Left||d===no.Direction.Down?-1:1;I!==-1&&(J1e.includes(o.key)?(o.preventDefault(),t.setState({draggedThumbIndex:I,isChanged:!0}),l((0,Dt.replaceAt)(i,I,t.normalizeValue(i[I]+b*(o.key==="PageUp"?s*10:s),I)))):W1e.includes(o.key)?(o.preventDefault(),t.setState({draggedThumbIndex:I,isChanged:!0}),l((0,Dt.replaceAt)(i,I,t.normalizeValue(i[I]-b*(o.key==="PageDown"?s*10:s),I)))):o.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){y&&t.fireOnFinalChange()}):y&&t.fireOnFinalChange())},t.onKeyUp=function(o){var u=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){u&&t.fireOnFinalChange()})},t.onMove=function(o,u){var i=t.state,l=i.draggedThumbIndex,s=i.draggedTrackPos,R=t.props,d=R.direction,y=R.min,I=R.max,b=R.onChange,S=R.values,L=R.step,O=R.rtl;if(l===-1&&s[0]===-1&&s[1]===-1)return null;var $=t.trackRef.current;if(!$)return null;var z=$.getBoundingClientRect(),ee=(0,Dt.isVertical)(d)?z.height:z.width;if(s[0]!==-1&&s[1]!==-1){var oe=o-s[0],te=u-s[1],ve=0;switch(d){case no.Direction.Right:case no.Direction.Left:ve=oe/ee*(I-y);break;case no.Direction.Down:case no.Direction.Up:ve=te/ee*(I-y);break;default:(0,Dt.assertUnreachable)(d)}if(O&&(ve*=-1),Math.abs(ve)>=L/2){for(var Re=0;ReI?ve=I-S[Re]:nn=L/2&&b((0,Dt.replaceAt)(S,l,t.normalizeValue(ce,l)))}},t.normalizeValue=function(o,u){var i=t.props,l=i.min,s=i.max,R=i.step,d=i.allowOverlap,y=i.values;return(0,Dt.normalizeValue)(o,u,l,s,R,d,y)},t.onEnd=function(o){if(o.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 o=t.props,u=o.onFinalChange,i=o.values;u&&u(i)},t.updateMarkRefs=function(o){if(!o.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(o.max-o.min)/t.props.step,t.markRefs=[];for(var u=0;u-1?"grabbing":this.props.draggableTrack?(0,Dt.isVertical)(this.props.direction)?"ns-resize":"ew-resize":s.length===1&&!I?"pointer":"inherit"},onMouseDown:I?Dt.voidFn:this.onMouseDownTrack,onTouchStart:I?Dt.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:I,children:Cz(Cz([],O.map(function($,z,ee){return l({props:{style:a.props.direction===no.Direction.Left||a.props.direction===no.Direction.Right?{position:"absolute",left:"".concat($[0],"px"),marginTop:"".concat($[1],"px")}:{position:"absolute",top:"".concat($[0],"px"),marginLeft:"".concat($[1],"px")},key:"mark".concat(z),ref:a.markRefs[z]},index:z})}),!0),s.map(function($,z){var ee=a.state.draggedThumbIndex===z;return u({index:z,value:$,isDragged:ee,props:{style:{position:"absolute",zIndex:L[z],cursor:I?"inherit":ee?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:z,tabIndex:I?void 0:0,"aria-valuemax":y?d:s[z+1]||d,"aria-valuemin":y?R:s[z-1]||R,"aria-valuenow":$,draggable:!1,ref:a.thumbRefs[z],role:"slider",onKeyDown:I?Dt.voidFn:a.onKeyDown,onKeyUp:I?Dt.voidFn:a.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:no.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(b1.Component);Fi.default=$1e});var Gz=je(eu=>{"use strict";var z1e=eu&&eu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(eu,"__esModule",{value:!0});eu.checkValuesAgainstBoundaries=eu.relativeValue=eu.useThumbOverlap=eu.Direction=eu.getTrackBackground=eu.Range=void 0;var V1e=z1e(Fz());eu.Range=V1e.default;var E1=gA();Object.defineProperty(eu,"getTrackBackground",{enumerable:!0,get:function(){return E1.getTrackBackground}});Object.defineProperty(eu,"useThumbOverlap",{enumerable:!0,get:function(){return E1.useThumbOverlap}});Object.defineProperty(eu,"relativeValue",{enumerable:!0,get:function(){return E1.relativeValue}});Object.defineProperty(eu,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return E1.checkValuesAgainstBoundaries}});var Q1e=w1();Object.defineProperty(eu,"Direction",{enumerable:!0,get:function(){return Q1e.Direction}})});var ACe={};ML(ACe,{boot:()=>MCe});var AL=function(e){return function(n){for(var a=e.length,t=n.length,o=new Array(a*t),u=0,i=0;i=a.length?n:e(a[t])};var UL=function(e,n,a,t){for(var o=0,u=t.length;o=t.length)return n;var o=t.slice();return o.splice(a,1),e(o)};var Ad=function(e){return e.slice().reverse()};var BL=function(e,n){return n.filter(e)};var HL=function(){function e(n,a,t,o,u,i){var l,s,R,d,y,I,b;for(l=u+(i-u>>1),l-u>1&&e(n,a,o,t,u,l),i-l>1&&e(n,a,o,t,l,i),s=u,R=l,d=u;s0?(t[d++]=I,++R):(t[d++]=y,++s);for(;s="0"&&e[o]<="9"?"\\&":"";return"\\"+a.charCodeAt(0).toString(10)+u})+'"'};var Vt={show:y2};var w2=function(e){return e.showRecordFields},lf=function(){return function(){return function(e){var n=w2(e);return{show:function(a){return"{"+(n(et.value)(a)+"}")}}}}};var cf={show:g2},Ze={show:D2},Od={show:R2},Gg={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])}},ne=function(e){return e.show};var sf=function(e){var n=nr(e);return function(a){var t=w2(a);return function(o){var u=ne(o);return{showRecordFields:function(i){return function(l){var s=t(et.value)(l),R=n(et.value),d=Gu(R)(l);return" "+(R+(": "+(u(d)+(","+s))))}}}}}},vf=function(e){var n=nr(e);return function(a){var t=ne(a);return{showRecordFields:function(o){return function(u){var i=n(et.value),l=Gu(i)(u);return" "+(i+(": "+(t(l)+" ")))}}}}};var ge=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ie=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var xe=function(){function e(){}return e.value=new e,e}(),Ud=function(e){return e};var i0=function(e){return e.to};var l0=function(e){return e.from};var hY=pn(dn),M=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 b2=function(e){var n=an(e);return{append:function(a){return function(t){if(a instanceof M)return t;if(t instanceof M)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 bn=function(e){return function(n){return function(a){if(a instanceof M)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])}}},Tt=bn(!0)(hn(!1)),Ct=bn(!1)(hn(!0));var ae={map:function(e){return function(n){return n instanceof T?new T(e(n.value0)):M.value}}},DY=k(ae);var ke=function(e){return bn(e)(hY)},St=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 Qt=function(e){var n=we(e);return{eq:function(a){return function(t){return a instanceof M&&t instanceof M?!0:a instanceof T&&t instanceof T?n(a.value0)(t.value0):!1}}}},ru=function(e){var n=Qe(e),a=Qt(e.Eq0());return{compare:function(t){return function(o){if(t instanceof M&&o instanceof M)return Ue.value;if(t instanceof M)return De.value;if(o instanceof M)return de.value;if(t instanceof T&&o instanceof T)return n(t.value0)(o.value0);throw new Error("Failed pattern match at Data.Maybe (line 0, column 0 - line 0, column 0): "+[t.constructor.name,o.constructor.name])}},Eq0:function(){return a}}};var hr={apply:function(e){return function(n){if(e instanceof T)return DY(e.value0)(n);if(e instanceof M)return M.value;throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 69, column 30): "+[e.constructor.name,n.constructor.name])}},Functor0:function(){return ae}};var en={bind:function(e){return function(n){if(e instanceof T)return n(e.value0);if(e instanceof M)return M.value;throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): "+[e.constructor.name,n.constructor.name])}},Apply0:function(){return hr}};var aa=function(){return{pure:T.create,Apply0:function(){return hr}}}();var $r={alt:function(e){return function(n){return e instanceof M?n:e}},Functor0:function(){return ae}},gY=function(){return{empty:M.value,Alt0:function(){return $r}}}(),Br={Applicative0:function(){return aa},Plus1:function(){return gY}};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 s0=function(e){return bn(new Me(e))(Le.create)};var Dr={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])}}},RY=k(Dr);var Ut=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])}}},ff=function(){return Ut(hn(M.value))(T.create)}();var Mg={apply:function(e){return function(n){if(e instanceof Me)return new Me(e.value0);if(e instanceof Le)return RY(e.value0)(n);throw new Error("Failed pattern match at Data.Either (line 70, column 1 - line 72, column 30): "+[e.constructor.name,n.constructor.name])}},Functor0:function(){return Dr}};var Mu={bind:Ut(function(e){return function(n){return new Me(e)}})(function(e){return function(n){return n(e)}}),Apply0:function(){return Mg}};var qc=function(){return{pure:Le.create,Apply0:function(){return Mg}}}(),Ag={Applicative0:function(){return qc},Bind1:function(){return Mu}};var li=function(e){return e};var Jc={map:function(e){return function(n){return e(n)}}};var E2={apply:function(e){return function(n){return e(n)}},Functor0:function(){return Jc}},yY={bind:function(e){return function(n){return n(e)}},Apply0:function(){return E2}},I2={pure:li,Apply0:function(){return E2}},cr={Applicative0:function(){return I2},Bind1:function(){return yY}};var T2=function(e){return Math.min(Math.abs(e),2147483647)},S2=function(e){return function(n){return n===0?0:n>0?Math.floor(e/n):-Math.floor(e/-n)}},C2=function(e){return function(n){if(n===0)return 0;var a=Math.abs(n);return(e%a+a)%a}};var DI={Ring0:function(){return Yl}};var Io=function(e){return e.mod};var ar={degree:T2,div:S2,mod:C2,CommutativeRing0:function(){return DI}},io=function(e){return e.div};var yt={mempty:"",Semigroup0:function(){return of}};var Xa=function(e){return e.mempty};var G2=function(e){return function(){return e}},M2=function(e){return function(n){return function(){return n(e())()}}};var gI=function(e){return function(n){return function(){for(var a=0,t=e.length;a>1),l-u>1&&e(n,a,o,t,u,l),i-l>1&&e(n,a,o,t,l,i),s=u,R=l,d=u;s0?(t[d++]=I,++R):(t[d++]=y,++s);for(;s=0;u--)t=e(a[u])(t);return t}}},t3=function(e){return function(n){return function(a){for(var t=n,o=a.length,u=0;u":e===void 0?"":e instanceof Date?e.toString():typeof Blob!="undefined"&&e instanceof Blob?"file["+e.name+"]":JSON.stringify(e)}var $X=Kt(fn),G3=tv(R0),zX=Bt(fn);var Xd=function(e){return e.foldrWithIndex};var Zd=function(e){return e.foldlWithIndex};var VX=function(e){var n=Xd(e);return function(a){var t=an(a.Semigroup0()),o=Xa(a);return function(u){return n(function(i){return function(l){return function(s){return t(u(i)(l))(s)}}})(o)}}},em={foldrWithIndex:function(e){return function(n){var a=$X(function(o){return function(u){return e(o.value0)(o.value1)(u)}})(n),t=G3(Dn.create);return function(o){return a(t(o))}}},foldlWithIndex:function(e){return function(n){var a=zX(function(o){return function(u){return e(u.value0)(o)(u.value1)}})(n),t=G3(Dn.create);return function(o){return a(t(o))}}},foldMapWithIndex:function(e){return VX(em)(e)},Foldable0:function(){return fn}};var M3=function(e){var n=Zd(e);return function(a){var t=function(o){return function(u){return function(i){return u instanceof M?a(o)(i):u}}};return n(t)(M.value)}};var A3=function(e){return function(n){return function(a){return(a|0)===a?e(a):n}}},Ft=function(e){return e},L3=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 o=new RegExp("^[\\+\\-]?"+t+"+$","i");return function(u){if(o.test(u)){var i=parseInt(u,a);return(i|0)===i?e(i):n}else return n}}}};var qg=isFinite;var Jg=Math.abs;var T0=Math.floor,$I=Math.log;var Wg=function(e){return function(n){return Math.pow(e,n)}};var Ef=Math.round;var P3=2.302585092994046;var x3=qt(jd),N3=tt(jd);var eZ=function(){return L3(T.create)(M.value)}(),Vc=eZ(10),If=function(){return A3(T.create)(M.value)}(),j3=function(e){if(!qg(e))return 0;if(e>=Ft(x3))return x3;if(e<=Ft(N3))return N3;if($e)return ke(0)(If(e));throw new Error("Failed pattern match at Data.Int (line 72, column 1 - line 72, column 29): "+[e.constructor.name])},$g=function(e){return j3(Ef(e))};var co=function(e){return j3(T0(e))};function zg(e){return Object.prototype.toString.call(e).slice(8,-1)}function nm(e){return e===null}function Tf(e){return e===void 0}var Vg=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function O3(e){return e.stack||e.toString()}function cu(e){return new Error(e)}function S0(e){return e.message}function Qg(e){return function(){throw e}}var k3=function(e){return Qg(cu(e))};var B3={show:O3};var Pr=function(e){return e.throwError};var xt=function(e){return e.catchError};var Sf=function(e){var n=xt(e),a=e.MonadThrow0().Monad0(),t=k(a.Bind1().Apply0().Functor0()),o=W(a.Applicative0());return function(u){return n(t(Le.create)(u))(function(i){return o(Me.create(i))})}};var gr={liftEffect:pn(dn),Monad0:function(){return Zl}},Bn=function(e){return e.liftEffect};var nZ=k(Dr);var VI=function(e){return e};var Xg=function(e){return e};var Zg=function(e){return function(n){return e(n)}},eR=function(e){var n=k(e);return{map:function(a){return Zg(n(nZ(a)))}}};var QI=function(e){return{Applicative0:function(){return Qc(e)},Bind1:function(){return Ff(e)}}},Ff=function(e){var n=Z(e.Bind1()),a=W(e.Applicative0());return{bind:function(t){return function(o){return n(t)(Ut(function(u){return a(Me.create(u))})(function(u){var i=o(u);return i}))}},Apply0:function(){return q3(e)}}},q3=function(e){var n=eR(e.Bind1().Apply0().Functor0());return{apply:Ui(QI(e)),Functor0:function(){return n}}},Qc=function(e){return{pure:function(){var n=W(e.Applicative0());return function(a){return VI(n(Le.create(a)))}}(),Apply0:function(){return q3(e)}}};var J3=function(e){var n=QI(e);return{throwError:function(){var a=W(e.Applicative0());return function(t){return VI(a(Me.create(t)))}}(),Monad0:function(){return n}}};var nR=function(e){var n=an(e);return function(a){var t=a.Bind1(),o=Z(t),u=W(a.Applicative0()),i=eR(t.Apply0().Functor0());return{alt:function(l){return function(s){return o(l)(function(R){if(R instanceof Le)return u(new Le(R.value0));if(R instanceof Me)return o(s)(function(d){if(d instanceof Le)return u(new Le(d.value0));if(d instanceof Me)return u(new Me(n(R.value0)(d.value0)));throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 86, column 9 - line 88, column 49): "+[d.constructor.name])});throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 82, column 5 - line 88, column 49): "+[R.constructor.name])})}},Functor0:function(){return i}}}};var Nu=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 rR=function(e){var n=ou(e);return function(a){return new Nu(a,n)}};var KI=function(e){var n=k(e);return{map:function(a){return function(t){return new Nu(a(t.value0),n(a)(t.value1))}}}};var YI=function(e){var n=Lr(e),a=Bt(e),t=Kt(e);return{foldMap:function(o){var u=an(o.Semigroup0()),i=n(o);return function(l){return function(s){return u(l(s.value0))(i(l)(s.value1))}}},foldl:function(o){return function(u){return function(i){return a(o)(o(u)(i.value0))(i.value1)}}},foldr:function(o){return function(u){return function(i){return o(i.value0)(t(o)(u)(i.value1))}}}}};var Wt=function(){function e(){}return e.value=new e,e}(),at=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}(),oR=function(e){return e},sZ=function(e){return new at(e.value0,e.value1)};var vZ=function(e){var n=function(a){return function(t){var o=a,u=!1,i;function l(s,R){if(R instanceof at&&R.value1 instanceof at&&R.value1.value1 instanceof at){o=new at(R,s),t=R.value1.value1.value1;return}var d=function(I){return I instanceof at&&I.value1 instanceof at&&I.value1.value1 instanceof Wt?new at(e(I.value0),new at(e(I.value1.value0),Wt.value)):I instanceof at&&I.value1 instanceof Wt?new at(e(I.value0),Wt.value):Wt.value},y=function(I){return function(b){var S=I,L=!1,O;function $(z,ee){if(z instanceof at&&z.value0 instanceof at&&z.value0.value1 instanceof at&&z.value0.value1.value1 instanceof at){S=z.value1,b=new at(e(z.value0.value0),new at(e(z.value0.value1.value0),new at(e(z.value0.value1.value1.value0),ee)));return}return L=!0,ee}for(;!L;)O=$(S,b);return O}};return u=!0,y(s)(d(R))}for(;!u;)i=l(o,t);return i}};return n(Wt.value)},V3={map:vZ};var XI=KI(V3),Co={foldr:function(e){return function(n){var a=function(){var o=function(u){return function(i){var l=u,s=!1,R;function d(y,I){if(I instanceof Wt)return s=!0,y;if(I instanceof at){l=new at(I.value0,y),i=I.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 107, column 7 - line 107, column 23): "+[y.constructor.name,I.constructor.name])}for(;!s;)R=d(l,i);return R}};return o(Wt.value)}(),t=Bt(Co)(za(e))(n);return function(o){return t(a(o))}}},foldl:function(e){var n=function(a){return function(t){var o=a,u=!1,i;function l(s,R){if(R instanceof Wt)return u=!0,s;if(R instanceof at){o=e(s)(R.value0),t=R.value1;return}throw new Error("Failed pattern match at Data.List.Types (line 111, column 12 - line 113, column 30): "+[R.constructor.name])}for(;!u;)i=l(o,t);return i}};return n},foldMap:function(e){var n=an(e.Semigroup0()),a=Xa(e);return function(t){return Bt(Co)(function(o){var u=n(o);return function(i){return u(t(i))}})(a)}}};var fZ=Kt(Co);var uR=YI(Co);var ZI={append:function(e){return function(n){return fZ(at.create)(n)(e)}}},Q3=an(ZI);var iR={append:function(e){return function(n){return new Nu(e.value0,Q3(e.value1)(sZ(n)))}}};var _Z={alt:Q3,Functor0:function(){return V3}},K3=function(){return{empty:Wt.value,Alt0:function(){return _Z}}}();var yZ=it(O2);var eP=function(e){return new at(e,Wt.value)};var eT=function(){var e=function(n){return function(a){var t=n,o=!1,u;function i(l,s){if(s instanceof Wt)return o=!0,l;if(s instanceof at){t=new at(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(;!o;)u=i(t,a);return u}};return e(Wt.value)}();var nT=function(e){var n=Z(e.Monad0().Bind1()),a=To(e);return function(t){var o=t.Plus1().Alt0(),u=ma(o),i=k(o.Functor0()),l=W(t.Applicative0());return function(s){var R=function(d){return n(u(i(Jt.create)(s))(l(new kt(Ee))))(function(y){return l(yZ(function(I){return new at(I,d)})(function(I){return eT(d)})(y))})};return a(R)(Wt.value)}}};var Wo=function(e){return Kt(e)(at.create)(Wt.value)};var nP=function(e){return e()};var aP=function(e){throw new Error(e)};var tP=function(){return aP};var wZ=tP(),bZ=nP,tc=function(e){return bZ(function(){return wZ(e)})};var cR=function(){var e=rR(K3);return function(n){return oR(e(n))}}();var oP=function(e){return e.value0};var G0=function(e){return e.join("")},tm=function(e){return e.split("")},ju=function(e){return e},uP=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 wP(e,n){var a=oT(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond),t=oT(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return a-t}function bP(e){return function(n){return function(a){return function(t){var o=oT(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond),u=new Date(o+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 EP=function(e,n,a){var t=new Date(Date.UTC(e,n,a));return e>=0&&e<100&&t.setUTCFullYear(e),t};function IP(e,n,a,t){var o=EP(n,a-1,t);return e(o.getUTCFullYear())(o.getUTCMonth()+1)(o.getUTCDate())}function TP(e,n,a){return EP(e,n-1,a).getUTCDay()}function lv(e){return e.charCodeAt(0)}function SP(e){return String.fromCharCode(e)}var yr=function(e){var n=W(e.Applicative0()),a=ou(e.Plus1());return function(t){if(t)return n(Ee);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 CP=tt(Xs),FP=qt(Xs);var oa=function(e){return e.toEnum};var Jn=function(e){return e.fromEnum},uT=function(e){var n=oa(e),a=Jn(e),t=tt(e.Bounded0());return function(o){return function(u){return function(i){var l=n(i);if(l instanceof T)return l.value0;if(l instanceof M){var s=i=lv(CP)&&e<=lv(FP)?new T(SP(e)):M.value},JZ={succ:xf(iT)(lv),pred:Nf(iT)(lv),Ord0:function(){return Fg}};var jf=function(){return{cardinality:lv(FP)-lv(CP)|0,toEnum:iT,fromEnum:lv,Bounded0:function(){return Xs},Enum1:function(){return JZ}}}();var pR=function(e,n,a){var t=0,o;return function(u){if(t===2)return o;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,o=a(),t=2,o}},GP=ne(Ze);var _i=function(){function e(){}return e.value=new e,e}(),zi=function(){function e(){}return e.value=new e,e}(),Vi=function(){function e(){}return e.value=new e,e}(),Qi=function(){function e(){}return e.value=new e,e}(),Ki=function(){function e(){}return e.value=new e,e}(),Yi=function(){function e(){}return e.value=new e,e}(),Al=function(){function e(){}return e.value=new e,e}(),su=function(){function e(){}return e.value=new e,e}(),Uu=function(){function e(){}return e.value=new e,e}(),vu=function(){function e(){}return e.value=new e,e}(),ku=function(){function e(){}return e.value=new e,e}(),Bu=function(){function e(){}return e.value=new e,e}(),fu=function(){function e(){}return e.value=new e,e}(),_u=function(){function e(){}return e.value=new e,e}(),Hu=function(){function e(){}return e.value=new e,e}(),qu=function(){function e(){}return e.value=new e,e}(),Ju=function(){function e(){}return e.value=new e,e}(),Wu=function(){function e(){}return e.value=new e,e}(),pi=function(){function e(){}return e.value=new e,e}();var MP={show:function(e){return"(Year "+(GP(e)+")")}},AP={show:function(e){if(e instanceof _i)return"Monday";if(e instanceof zi)return"Tuesday";if(e instanceof Vi)return"Wednesday";if(e instanceof Qi)return"Thursday";if(e instanceof Ki)return"Friday";if(e instanceof Yi)return"Saturday";if(e instanceof Al)return"Sunday";throw new Error("Failed pattern match at Data.Date.Component (line 184, column 1 - line 191, column 25): "+[e.constructor.name])}},dR={show:function(e){if(e instanceof su)return"January";if(e instanceof Uu)return"February";if(e instanceof vu)return"March";if(e instanceof ku)return"April";if(e instanceof Bu)return"May";if(e instanceof fu)return"June";if(e instanceof _u)return"July";if(e instanceof Hu)return"August";if(e instanceof qu)return"September";if(e instanceof Ju)return"October";if(e instanceof Wu)return"November";if(e instanceof pi)return"December";throw new Error("Failed pattern match at Data.Date.Component (line 101, column 1 - line 113, column 29): "+[e.constructor.name])}},LP={show:function(e){return"(Day "+(GP(e)+")")}},mR=na,hR=na,PP=nt,WZ={eq:function(e){return function(n){return e instanceof _i&&n instanceof _i||e instanceof zi&&n instanceof zi||e instanceof Vi&&n instanceof Vi||e instanceof Qi&&n instanceof Qi||e instanceof Ki&&n instanceof Ki||e instanceof Yi&&n instanceof Yi||e instanceof Al&&n instanceof Al}}},xP={compare:function(e){return function(n){if(e instanceof _i&&n instanceof _i)return Ue.value;if(e instanceof _i)return De.value;if(n instanceof _i)return de.value;if(e instanceof zi&&n instanceof zi)return Ue.value;if(e instanceof zi)return De.value;if(n instanceof zi)return de.value;if(e instanceof Vi&&n instanceof Vi)return Ue.value;if(e instanceof Vi)return De.value;if(n instanceof Vi)return de.value;if(e instanceof Qi&&n instanceof Qi)return Ue.value;if(e instanceof Qi)return De.value;if(n instanceof Qi)return de.value;if(e instanceof Ki&&n instanceof Ki)return Ue.value;if(e instanceof Ki)return De.value;if(n instanceof Ki)return de.value;if(e instanceof Yi&&n instanceof Yi)return Ue.value;if(e instanceof Yi)return De.value;if(n instanceof Yi)return de.value;if(e instanceof Al&&n instanceof Al)return Ue.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 WZ}},lT={eq:function(e){return function(n){return e instanceof su&&n instanceof su||e instanceof Uu&&n instanceof Uu||e instanceof vu&&n instanceof vu||e instanceof ku&&n instanceof ku||e instanceof Bu&&n instanceof Bu||e instanceof fu&&n instanceof fu||e instanceof _u&&n instanceof _u||e instanceof Hu&&n instanceof Hu||e instanceof qu&&n instanceof qu||e instanceof Ju&&n instanceof Ju||e instanceof Wu&&n instanceof Wu||e instanceof pi&&n instanceof pi}}},x0={compare:function(e){return function(n){if(e instanceof su&&n instanceof su)return Ue.value;if(e instanceof su)return De.value;if(n instanceof su)return de.value;if(e instanceof Uu&&n instanceof Uu)return Ue.value;if(e instanceof Uu)return De.value;if(n instanceof Uu)return de.value;if(e instanceof vu&&n instanceof vu)return Ue.value;if(e instanceof vu)return De.value;if(n instanceof vu)return de.value;if(e instanceof ku&&n instanceof ku)return Ue.value;if(e instanceof ku)return De.value;if(n instanceof ku)return de.value;if(e instanceof Bu&&n instanceof Bu)return Ue.value;if(e instanceof Bu)return De.value;if(n instanceof Bu)return de.value;if(e instanceof fu&&n instanceof fu)return Ue.value;if(e instanceof fu)return De.value;if(n instanceof fu)return de.value;if(e instanceof _u&&n instanceof _u)return Ue.value;if(e instanceof _u)return De.value;if(n instanceof _u)return de.value;if(e instanceof Hu&&n instanceof Hu)return Ue.value;if(e instanceof Hu)return De.value;if(n instanceof Hu)return de.value;if(e instanceof qu&&n instanceof qu)return Ue.value;if(e instanceof qu)return De.value;if(n instanceof qu)return de.value;if(e instanceof Ju&&n instanceof Ju)return Ue.value;if(e instanceof Ju)return De.value;if(n instanceof Ju)return de.value;if(e instanceof Wu&&n instanceof Wu)return Ue.value;if(e instanceof Wu)return De.value;if(n instanceof Wu)return de.value;if(e instanceof pi&&n instanceof pi)return Ue.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 lT}},NP=nt,DR=function(){return{bottom:-271820|0,top:275759,Ord0:function(){return mR}}}(),$Z=function(){return{bottom:_i.value,top:Al.value,Ord0:function(){return xP}}}(),gR=function(){return{bottom:su.value,top:pi.value,Ord0:function(){return x0}}}(),xr={cardinality:547580,toEnum:function(e){if(e>=(-271820|0)&&e<=275759)return new T(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Date.Component (line 35, column 1 - line 40, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return DR},Enum1:function(){return zZ(0)}},zZ=pR("enumYear","Data.Date.Component",function(){return{succ:function(){var e=oa(xr),n=Jn(xr);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(xr),n=Jn(xr);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return mR}}});var cv={cardinality:7,toEnum:function(e){return e===1?new T(_i.value):e===2?new T(zi.value):e===3?new T(Vi.value):e===4?new T(Qi.value):e===5?new T(Ki.value):e===6?new T(Yi.value):e===7?new T(Al.value):M.value},fromEnum:function(e){if(e instanceof _i)return 1;if(e instanceof zi)return 2;if(e instanceof Vi)return 3;if(e instanceof Qi)return 4;if(e instanceof Ki)return 5;if(e instanceof Yi)return 6;if(e instanceof Al)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 $Z},Enum1:function(){return VZ(0)}},VZ=pR("enumWeekday","Data.Date.Component",function(){return{succ:function(){var e=oa(cv),n=Jn(cv);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(cv),n=Jn(cv);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return xP}}});var rr={cardinality:12,toEnum:function(e){return e===1?new T(su.value):e===2?new T(Uu.value):e===3?new T(vu.value):e===4?new T(ku.value):e===5?new T(Bu.value):e===6?new T(fu.value):e===7?new T(_u.value):e===8?new T(Hu.value):e===9?new T(qu.value):e===10?new T(Ju.value):e===11?new T(Wu.value):e===12?new T(pi.value):M.value},fromEnum:function(e){if(e instanceof su)return 1;if(e instanceof Uu)return 2;if(e instanceof vu)return 3;if(e instanceof ku)return 4;if(e instanceof Bu)return 5;if(e instanceof fu)return 6;if(e instanceof _u)return 7;if(e instanceof Hu)return 8;if(e instanceof qu)return 9;if(e instanceof Ju)return 10;if(e instanceof Wu)return 11;if(e instanceof pi)return 12;throw new Error("Failed pattern match at Data.Date.Component (line 87, column 14 - line 99, column 19): "+[e.constructor.name])},Bounded0:function(){return gR},Enum1:function(){return QZ(0)}},QZ=pR("enumMonth","Data.Date.Component",function(){return{succ:function(){var e=oa(rr),n=Jn(rr);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(rr),n=Jn(rr);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return x0}}});var fm={bottom:1,top:31,Ord0:function(){return hR}},pu={cardinality:31,toEnum:function(e){if(e>=1&&e<=31)return new T(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Date.Component (line 133, column 1 - line 138, column 23): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return fm},Enum1:function(){return KZ(0)}},KZ=pR("enumDay","Data.Date.Component",function(){return{succ:function(){var e=oa(pu),n=Jn(pu);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(pu),n=Jn(pu);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return hR}}});var N0=GI()();var jP=pn(dn),cT=function(e){return e},YZ=function(e){return e},_m=function(e){return e};var XZ=function(e){return e},j0=function(e){return e.toDuration};var OP={append:function(e){return function(n){return e+n}}};var RR={append:function(e){return function(n){return e+n}}};var UP=Bc;var kP=Bc;var yR=function(e){return e.fromDuration};var es={fromDuration:N0(cT)(function(e){return e*1e3}),toDuration:N0(_m)(function(e){return e/1e3})},sv={fromDuration:N0(YZ)(function(e){return e*6e4}),toDuration:N0(_m)(function(e){return e/6e4})},O0={fromDuration:jP,toDuration:jP};var sT={fromDuration:N0(XZ)(function(e){return e*864e5}),toDuration:N0(_m)(function(e){return e/864e5})};var qP=Jn(rr),vT=St(),JP=oa(cv),eee=ne(MP),nee=ne(dR),aee=ne(LP);var tee=we(PP),ree=we(lT),oee=we(NP),uee=Qe(mR),iee=Qe(x0),lee=Qe(hR);var cee=oa(rr);var wR=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}(),$u=function(e){return e.value0},pm=function(e){var n=TP(e.value0,qP(e.value1),e.value2),a=n===0;return vT(JP(a?7:n))},WP={show:function(e){return"(Date "+(eee(e.value0)+(" "+(nee(e.value1)+(" "+(aee(e.value2)+")")))))}},zu=function(e){return e.value1};var bR={eq:function(e){return function(n){return tee(e.value0)(n.value0)&&ree(e.value1)(n.value1)&&oee(e.value2)(n.value2)}}},see=we(bR),fT={compare:function(e){return function(n){var a=uee(e.value0)(n.value0);if(a instanceof De)return De.value;if(a instanceof de)return de.value;var t=iee(e.value1)(n.value1);return t instanceof De?De.value:t instanceof de?de.value:lee(e.value2)(n.value2)}},Eq0:function(){return bR}};var uc=function(e){return e.value2},vv=function(e){return function(n){return function(a){var t=function(o){return function(u){return function(i){return new wR(o,vT(cee(u)),i)}}};return IP(t,e,qP(n),a)}}},ER=function(e){return function(n){return function(a){var t=new wR(e,n,a),o=see(vv(e)(n)(a))(t);return o?new T(t):M.value}}},_T=function(){return{bottom:new wR(tt(DR),tt(gR),tt(fm)),top:new wR(qt(DR),qt(gR),qt(fm)),Ord0:function(){return fT}}}();var IR=function(e,n,a){var t=0,o;return function(u){if(t===2)return o;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,o=a(),t=2,o}},TR=ne(Ze);var $P={show:function(e){return"(Second "+(TR(e)+")")}},zP={show:function(e){return"(Minute "+(TR(e)+")")}},VP={show:function(e){return"(Millisecond "+(TR(e)+")")}},QP={show:function(e){return"(Hour "+(TR(e)+")")}},SR=na,CR=na,FR=na,GR=na,KP=nt,YP=nt,XP=nt,ZP=nt,dm={bottom:0,top:59,Ord0:function(){return SR}},mm={bottom:0,top:59,Ord0:function(){return CR}},hm={bottom:0,top:999,Ord0:function(){return FR}},Dm={bottom:0,top:23,Ord0:function(){return GR}},di={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Time.Component (line 90, column 1 - line 95, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return dm},Enum1:function(){return vee(0)}},vee=IR("enumSecond","Data.Time.Component",function(){return{succ:function(){var e=oa(di),n=Jn(di);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(di),n=Jn(di);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return SR}}});var mi={cardinality:60,toEnum:function(e){if(e>=0&&e<=59)return new T(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Time.Component (line 61, column 1 - line 66, column 26): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return mm},Enum1:function(){return fee(0)}},fee=IR("enumMinute","Data.Time.Component",function(){return{succ:function(){var e=oa(mi),n=Jn(mi);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(mi),n=Jn(mi);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return CR}}});var du={cardinality:1e3,toEnum:function(e){if(e>=0&&e<=999)return new T(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Time.Component (line 120, column 1 - line 125, column 31): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return hm},Enum1:function(){return _ee(0)}},_ee=IR("enumMillisecond","Data.Time.Component",function(){return{succ:function(){var e=oa(du),n=Jn(du);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(du),n=Jn(du);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return FR}}});var hi={cardinality:24,toEnum:function(e){if(e>=0&&e<=23)return new T(e);if($e)return M.value;throw new Error("Failed pattern match at Data.Time.Component (line 32, column 1 - line 37, column 24): "+[e.constructor.name])},fromEnum:function(e){return e},Bounded0:function(){return Dm},Enum1:function(){return pee(0)}},pee=IR("enumHour","Data.Time.Component",function(){return{succ:function(){var e=oa(hi),n=Jn(hi);return function(a){return e(function(t){return t+1|0}(n(a)))}}(),pred:function(){var e=oa(hi),n=Jn(hi);return function(a){return e(function(t){return t-1|0}(n(a)))}}(),Ord0:function(){return GR}}});var hee=ne(QP),Dee=ne(zP),gee=ne($P),Ree=ne(VP);var yee=we(ZP),wee=we(YP),bee=we(KP),Eee=we(XP),Iee=Qe(GR),Tee=Qe(CR),See=Qe(SR),Cee=Qe(FR);var ic=function(){function e(n,a,t,o){this.value0=n,this.value1=a,this.value2=t,this.value3=o}return e.create=function(n){return function(a){return function(t){return function(o){return new e(n,a,t,o)}}}},e}(),ex={show:function(e){return"(Time "+(hee(e.value0)+(" "+(Dee(e.value1)+(" "+(gee(e.value2)+(" "+(Ree(e.value3)+")")))))))}};var ns=function(e){return e.value2},as=function(e){return e.value1},Xi=function(e){return e.value3};var lc=function(e){return e.value0};var pT={eq:function(e){return function(n){return yee(e.value0)(n.value0)&&wee(e.value1)(n.value1)&&bee(e.value2)(n.value2)&&Eee(e.value3)(n.value3)}}},dT={compare:function(e){return function(n){var a=Iee(e.value0)(n.value0);if(a instanceof De)return De.value;if(a instanceof de)return de.value;var t=Tee(e.value1)(n.value1);if(t instanceof De)return De.value;if(t instanceof de)return de.value;var o=See(e.value2)(n.value2);return o instanceof De?De.value:o instanceof de?de.value:Cee(e.value3)(n.value3)}},Eq0:function(){return pT}};var gm=function(){return{bottom:new ic(tt(Dm),tt(mm),tt(dm),tt(hm)),top:new ic(qt(Dm),qt(mm),qt(dm),qt(hm)),Ord0:function(){return dT}}}();var Fee=Jn(xr),Gee=Jn(rr),Mee=Jn(pu),Aee=Jn(hi),Lee=Jn(mi),Pee=Jn(di),xee=Jn(du),Nee=ne(WP),jee=ne(ex),Oee=we(bR),Uee=we(pT),kee=Qe(fT),Bee=Qe(dT),Hee=Z(en),U0=Yn(hr),mT=k(ae),qee=Tl(en),Jee=oa(xr),Wee=oa(rr),$ee=oa(pu),zee=oa(hi),Vee=oa(mi),Qee=oa(di),Kee=oa(du),cc=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}(),hT=function(e){return{year:Fee($u(e.value0)),month:Gee(zu(e.value0)),day:Mee(uc(e.value0)),hour:Aee(lc(e.value1)),minute:Lee(as(e.value1)),second:Pee(ns(e.value1)),millisecond:xee(Xi(e.value1))}},DT=function(e){return e.value1},nx={show:function(e){return"(DateTime "+(Nee(e.value0)+(" "+(jee(e.value1)+")")))}};var Yee={eq:function(e){return function(n){return Oee(e.value0)(n.value0)&&Uee(e.value1)(n.value1)}}},Vu={compare:function(e){return function(n){var a=kee(e.value0)(n.value0);return a instanceof De?De.value:a instanceof de?de.value:Bee(e.value1)(n.value1)}},Eq0:function(){return Yee}},Qu=function(e){var n=j0(e);return function(a){return function(t){return n(wP(hT(a),hT(t)))}}},Of=function(e){return e.value0},k0=function(){return{bottom:new cc(tt(_T),tt(gm)),top:new cc(qt(_T),qt(gm)),Ord0:function(){return Vu}}}(),sc=function(e){var n=yR(e);return function(a){return function(t){return Hee(bP(T.create)(M.value)(n(a))(hT(t)))(function(o){return U0(mT(cc.create)(qee(U0(U0(mT(ER)(Jee(o.year)))(Wee(o.month)))($ee(o.day)))))(U0(U0(U0(mT(ic.create)(zee(o.hour)))(Vee(o.minute)))(Qee(o.second)))(Kee(o.millisecond)))})}}};var $o=function(){var e={},n="Pure",a="Throw",t="Catch",o="Sync",u="Async",i="Bind",l="Bracket",s="Fork",R="Sequential",d="Map",y="Apply",I="Alt",b="Cons",S="Resume",L="Release",O="Finalizer",$="Finalized",z="Forked",ee="Fiber",oe="Thunk";function te(Oe,ua,Ta,En){this.tag=Oe,this._1=ua,this._2=Ta,this._3=En}function ve(Oe){var ua=function(Ta,En,gn){return new te(Oe,Ta,En,gn)};return ua.tag=Oe,ua}function Re(Oe){return new te(n,void 0)}function nn(Oe){try{Oe()}catch(ua){setTimeout(function(){throw ua},0)}}function cn(Oe,ua,Ta){try{return ua(Ta())}catch(En){return Oe(En)}}function ce(Oe,ua,Ta){try{return ua(Ta)()}catch(En){return Ta(Oe(En))(),Re}}var le=function(){var Oe=1024,ua=0,Ta=0,En=new Array(Oe),gn=!1;function He(){var ea;for(gn=!0;ua!==0;)ua--,ea=En[Ta],En[Ta]=void 0,Ta=(Ta+1)%Oe,ea();gn=!1}return{isDraining:function(){return gn},enqueue:function(ea){var va,La;ua===Oe&&(La=gn,He(),gn=La),En[(Ta+ua)%Oe]=ea,ua++,gn||He()}}}();function Ne(Oe){var ua={},Ta=0,En=0;return{register:function(gn){var He=Ta++;gn.onComplete({rethrow:!0,handler:function(ea){return function(){En--,delete ua[He]}}})(),ua[He]=gn,En++},isEmpty:function(){return En===0},killAll:function(gn,He){return function(){if(En===0)return He();var ea=0,va={};function La(sn){va[sn]=ua[sn].kill(gn,function(ia){return function(){delete va[sn],ea--,Oe.isLeft(ia)&&Oe.fromLeft(ia)&&setTimeout(function(){throw Oe.fromLeft(ia)},0),ea===0&&He()}})()}for(var _t in ua)ua.hasOwnProperty(_t)&&(ea++,La(_t));return ua={},Ta=0,En=0,function(sn){return new te(o,function(){for(var ia in va)va.hasOwnProperty(ia)&&va[ia]()})}}}}}var Ce=0,Be=1,Xe=2,Sn=3,ra=4,kn=5,Hn=6;function Kn(Oe,ua,Ta){var En=0,gn=Ce,He=Ta,ea=null,va=null,La=null,_t=null,sn=null,ia=0,bt=0,Da=null,ut=!0;function q(P){for(var N,J,V;;)switch(N=null,J=null,V=null,gn){case Xe:gn=Be;try{He=La(He),_t===null?La=null:(La=_t._1,_t=_t._2)}catch(re){gn=kn,ea=Oe.left(re),He=null}break;case Sn:Oe.isLeft(He)?(gn=kn,ea=He,He=null):La===null?gn=kn:(gn=Xe,He=Oe.fromRight(He));break;case Be:switch(He.tag){case i:La&&(_t=new te(b,La,_t)),La=He._2,gn=Be,He=He._1;break;case n:La===null?(gn=kn,He=Oe.right(He._1)):(gn=Xe,He=He._1);break;case o:gn=Sn,He=cn(Oe.left,Oe.right,He._1);break;case u:gn=ra,He=ce(Oe.left,He._1,function(re){return function(){En===P&&(En++,le.enqueue(function(){En===P+1&&(gn=Sn,He=re,q(En))}))}});return;case a:gn=kn,ea=Oe.left(He._1),He=null;break;case t:La===null?sn=new te(b,He,sn,va):sn=new te(b,He,new te(b,new te(S,La,_t),sn,va),va),La=null,_t=null,gn=Be,He=He._1;break;case l:ia++,La===null?sn=new te(b,He,sn,va):sn=new te(b,He,new te(b,new te(S,La,_t),sn,va),va),La=null,_t=null,gn=Be,He=He._1;break;case s:gn=Sn,N=Kn(Oe,ua,He._2),ua&&ua.register(N),He._1&&N.run(),He=Oe.right(N);break;case R:gn=Be,He=ft(Oe,ua,He._1);break}break;case kn:if(La=null,_t=null,sn===null)gn=Hn,He=va||ea||He;else switch(N=sn._3,V=sn._1,sn=sn._2,V.tag){case t:va&&va!==N&&ia===0?gn=kn:ea&&(gn=Be,He=V._2(Oe.fromLeft(ea)),ea=null);break;case S:va&&va!==N&&ia===0||ea?gn=kn:(La=V._1,_t=V._2,gn=Xe,He=Oe.fromRight(He));break;case l:ia--,ea===null&&(J=Oe.fromRight(He),sn=new te(b,new te(L,V._2,J),sn,N),(va===N||ia>0)&&(gn=Be,He=V._3(J)));break;case L:sn=new te(b,new te($,He,ea),sn,va),gn=Be,va&&va!==N&&ia===0?He=V._1.killed(Oe.fromLeft(va))(V._2):ea?He=V._1.failed(Oe.fromLeft(ea))(V._2):He=V._1.completed(Oe.fromRight(He))(V._2),ea=null,ia++;break;case O:ia++,sn=new te(b,new te($,He,ea),sn,va),gn=Be,He=V._1;break;case $:ia--,gn=kn,He=V._1,ea=V._2;break}break;case Hn:for(var ue in Da)Da.hasOwnProperty(ue)&&(ut=ut&&Da[ue].rethrow,nn(Da[ue].handler(He)));Da=null,va&&ea?setTimeout(function(){throw Oe.fromLeft(ea)},0):Oe.isLeft(He)&&ut&&setTimeout(function(){if(ut)throw Oe.fromLeft(He)},0);return;case Ce:gn=Be;break;case ra:return}}function K(P){return function(){if(gn===Hn)return ut=ut&&P.rethrow,P.handler(He)(),function(){};var N=bt++;return Da=Da||{},Da[N]=P,function(){Da!==null&&delete Da[N]}}}function j(P,N){return function(){if(gn===Hn)return N(Oe.right(void 0))(),function(){};var J=K({rethrow:!1,handler:function(){return N(Oe.right(void 0))}})();switch(gn){case Ce:va=Oe.left(P),gn=Hn,He=va,q(En);break;case ra:va===null&&(va=Oe.left(P)),ia===0&&(gn===ra&&(sn=new te(b,new te(O,He(P)),sn,va)),gn=kn,He=null,ea=null,q(++En));break;default:va===null&&(va=Oe.left(P)),ia===0&&(gn=kn,He=null,ea=null)}return J}}function E(P){return function(){var N=K({rethrow:!1,handler:P})();return gn===Ce&&q(En),N}}return{kill:j,join:E,onComplete:K,isSuspended:function(){return gn===Ce},run:function(){gn===Ce&&(le.isDraining()?q(En):le.enqueue(function(){q(En)}))}}}function qn(Oe,ua,Ta,En){var gn=0,He={},ea=0,va={},La=new Error("[ParAff] Early exit"),_t=null,sn=e;function ia(K,j,E){var P=j,N=null,J=null,V=0,ue={},re,he;e:for(;;)switch(re=null,P.tag){case z:if(P._3===e&&(re=He[P._1],ue[V++]=re.kill(K,function(Ie){return function(){V--,V===0&&E(Ie)()}})),N===null)break e;P=N._2,J===null?N=null:(N=J._1,J=J._2);break;case d:P=P._2;break;case y:case I:N&&(J=new te(b,N,J)),N=P,P=P._1;break}if(V===0)E(Oe.right(void 0))();else for(he=0,re=V;he""),Qne=gi.unmountComponentAtNode;function RN(e,n,a){return ka.createElement.apply(null,[e,Kne(e,n)].concat(a))}function Kne(e,n){if(typeof e!="string"||n._data==null)return n;var a={_data:void 0};for(var t in n._data){var o=n._data[t];a["data-"+t]=o}return Object.assign({},n,a)}var yN=(e,n)=>n[e],wN=(e,n,a)=>a[e]=n;var Wf=function(n){return function(a){return n(a)()}};var z0=function(n){return function(a){return function(){return n(a)}}},dv=function(n){return function(a){return function(t){return function(){return n(a,t)}}}},V0=function(n){return function(a){return function(t){return function(o){return function(){return n(a,t,o)}}}}};function IN(e){return n=>e===n}var QT=function(e){return function(n){return function(a){var t=fe(a);if(e instanceof M&&t instanceof M)return Ee;if(e instanceof T&&t instanceof M)return Ee;if(e instanceof T&&t instanceof T){if(IN(e.value0)(t.value0))return Ee;if($e)return n(new T(t.value0))()}return n(t)()}}};var vae=pe(zn);var Y={asReactChildren:function(e){return[e]}},We={asReactChildren:function(e){return[e]}},me={asReactChildren:pn(dn)};var KT=V0(mN),TN=function(){return V0(wN)},SN=dv(DN),CN=dv(gN),FN=z0(dN),YT=function(e){var n=wt(e);return function(a){return function(t){return vae(function(){return yN(a,t)})(n)}}},GN=dv(hN),Am=function(e){return e.asReactChildren},is=function(){return function(e){var n=Am(e);return function(a){return function(t){return function(o){return RN(a,t,n(o))}}}}},fae=is()(me),mv=function(){return function(e){return function(n){return fae(e)(n)([])}}};var XT=k(zn),_ae=W(rt),MN=function(e){return{initialize:function(n){return GN(n)(e.initialState)},getState:function(n){return function(){var t=XT(fe)(FN(n))();return ke(e.initialState)(t)}},setState:KT}},AN=function(){var e=function(n){return function(a){return{initialize:function(t){return Wc(new T(a.initialState))(n)},getState:function(t){return XT(ke(a.initialState))(ec(n))},setState:function(t){return function(o){return function(u){return function(){return Wc(new T(o))(n)(),KT(t)(o)(_ae(Ee))(),u()}}}}}}};return XT(e)($c(M.value))}();var LN=pe(ze),PN=an(Rt);var dae=W(rt),xN=TN(),mae=YT(Ia),NN=k(zn),hae=YT(Ca(RP)),Dae=un(tn),gae=Ja(tr),Rae=LI(rt)(fn),yae=Dae(_a),jN=Bn(gr),wae=Eg(Zl),bae=an($s(yI(wg))),ON=function(e){return e},$f=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}(),Eae={map:function(e){return function(n){return new $f(e(n.value0),n.value1)}}},wr=function(e){return{bimap:function(n){return function(a){return function(t){return new $f(a(t.value0),LN(t.value1)(function(o){return function(u){return o({dispatch:function(i){return u.dispatch(n(i))},onStop:u.onStop})}}))}}}}},UN={apply:function(e){return function(n){return new $f(e.value0(n.value0),PN(e.value1)(n.value1))}},Functor0:function(){return Eae}},Qn={bind:function(e){return function(n){var a=n(e.value0);return new $f(a.value0,PN(e.value1)(a.value1))}},Apply0:function(){return UN}},yn={pure:function(e){return new $f(e,[])},Apply0:function(){return UN}};var Iae=function(e){var n=Z(e);return function(a){var t=Bn(a);return function(o){return function(u){return new $f(o,LN(u)(function(i){return function(l){return n(i)(function(s){return t(l.dispatch(s))})}}))}}}};var Lm=function(e){return new $f(Ee,[e])},Va=function(e){return Lm(hn(e))},Q0=function(e){var n=Z(e.Monad0().Bind1()),a=Bn(e);return function(t){return Lm(function(o){return n(t)(function(u){return a(bn(dae(Ee))(o.dispatch)(u))})})}},Ma=function(e){var n=Iae(e.Monad0().Bind1())(e);return function(a){return n(Ee)([a])}},kN=function(e){return function(n){return function(a){var t=a({initialState:n.init.value0}),o=xN("__unmounted"),u=xN("__subscriptions"),i=function(){var b=NN(ke(!1)),S=mae("__unmounted");return function(L){return b(S(L))}}(),l=function(){var b=NN(ke([])),S=hae("__subscriptions");return function(L){return b(S(L))}}(),s=function(b){return function(){return gae(Rae)(l(b))(),u([])(b)()}},R=function(b){return function(S){return function(){var O=l(b)();return u(qo(ym(S))(O))(b)()}}},d=function(b){return function(S){var L=function(O){return ym(yae(Yt(0))(function(){return O({dispatch:function(){var $=y(S);return function(z){return jN($(z))}}(),onStop:R(S)})}))};return gI(b)(L)}},y=function(b){return function(S){return wae(i(b))(function(){var O=t.getState(b)(),$=n.update(O)(S);return t.setState(b)($.value0)(d($.value1)(b))()})}},I=function(b){return function(){var L=t.getState(b)();return n.view(L)(y(b))}};return wx(e,{init:t.initialize,render:I,componentDidMount:d(n.init.value1),componentWillUnmount:bae(o(!0))(s)})}}},BN=function(e){return function(){var a=jN(AN)();return yx(function(t){return kN(t)(e)(a)})}},hv=function(e){return function(n){return Rx(e,function(a){return function(t){return kN(a)(n(t))(MN)}})}};var HN=W(rt),qN=uu(),JR=function(e){return{handleMaybe:function(n){return function(a){return Wf(function(){var t=bn(HN(Ee))(n);return function(o){return t(qN(a(o)))}}())}}}},Dv=function(e){return{handleMaybe:function(n){return function(a){return function(t){return bn(HN(Ee))(n)(qN(a))()}}}}},vo={handle:function(e){return function(n){return function(a){return e(n(a))()}}}},gv={handleEffect:function(e){return Wf(e)}},zo={handleEffect:function(e){return Wf(hn(e))}},ga={handle:function(e){return function(n){return function(a){return e(n)()}}}},nl=function(e){return e.handleMaybe},sr=function(e){return e.handleEffect},Xn=function(e){return e.handle};function WR(e,n){var a={};for(var t in n)({}).hasOwnProperty.call(n,t)&&(a[t]=n[t]);for(var o in e)({}).hasOwnProperty.call(e,o)&&(a[o]=e[o]);return a}var ls=function(){return function(){return function(e){return function(n){return WR(e,n)}}}};var $R=function(e){var n=nr(e);return function(){return function(){return function(a){return function(t){return dI(n(a))(t)}}}}};var ZT=mv(),JN=is(),WN=ls()();var Pm=Je,$N=function(e){return function(n){return ZT(Pm(e))(n)}};var Ri=function(e){var n=JN(e);return function(a){return function(t){return function(o){return n(Pm(a))(WN(o)({className:t}))}}}},xm=function(e){return function(n){return function(a){return ZT(Pm(e))(WN(a)({className:n}))}}},zN=function(e){return function(n){return ZT(Pm(e))({className:n})}},br=function(e){return function(n){var a=JN(n);return function(t){return function(o){return a(Pm(e))({className:t})(o)}}}};var ot=Je;var zR=function(e){var n=Ri(e);return function(){return function(){return n("video")}}},VN=function(e){return br("video")(e)};var QN=function(e){return br("ul")(e)};var zf=function(e){return br("tr")(e)};var K0=function(e){return br("thead")(e)};var Y0=function(e){return br("th")(e)};var VR=function(){return function(){return xm("textarea")}};var KN=function(e){var n=Ri(e);return function(){return function(){return n("td")}}},cs=function(e){return br("td")(e)};var X0=function(e){return br("tbody")(e)};var Z0=function(e){return br("table")(e)};var Vo=function(e){return br("strong")(e)},QR=function(e){var n=Ri(e);return function(){return function(){return n("span")}}},Ua=function(e){return br("span")(e)},YN=function(){return function(){return xm("source")}};var XN=function(e){var n=Ri(e);return function(){return function(){return n("select")}}};var KR=function(e){var n=Ri(e);return function(){return function(){return n("p")}}},$t=function(e){return br("p")(e)};var ZN=function(e){var n=Ri(e);return function(){return function(){return n("option")}}};var ej=function(e){return br("li")(e)};var ep=function(e){return br("label")(e)};var fo=function(){return function(){return xm("input")}};var al=function(){return function(){return xm("img")}};var Qa=function(e){return br("i")(e)};var ss=zN("hr");var Nm=function(e){return br("h6")(e)};var Ku=function(e){return br("h4")(e)},nj=function(e){var n=Ri(e);return function(){return function(){return n("h3")}}},Hr=function(e){return br("h3")(e)},Rv=function(e){var n=Ri(e);return function(){return function(){return n("h2")}}},Ht=function(e){return br("h2")(e)};var yv=function(e){return br("h1")(e)},np=function(e){var n=Ri(e);return function(){return function(){return n("form")}}};var or=function(e){var n=Ri(e);return function(){return function(){return n("div")}}},Te=function(e){return br("div")(e)};var Wn=function(e){var n=Ri(e);return function(){return function(){return n("button")}}},aj=function(e){return br("button")(e)};var Mt=function(e){var n=Ri(e);return function(){return function(){return n("a")}}};var tj=Cu(AT()),rj=tj.Fragment;var Ke=Je,Se=is()(me)(rj)({}),$n=!1;var oj=MR(Rm),Tae=W(rt);var uj={map:function(e){return function(n){return oj(oj(e))(n)}}},jm=function(e){var n=Z(e.Monad0().Bind1()),a=Bn(e);return function(t){return function(o){return Lm(function(u){return n(o(function(){var i=bn(Tae(Ee))(u.dispatch);return function(l){return i(t(l))}}()))(function(i){return a(u.onStop(i))})})}}},tl=function(e){var n=jm(e);return function(a){return n(function(t){return T.create(a(t))})}};var Cn=function(){return{"genericTop'":xe.value}}();var eS=function(e){return e["genericTop'"]},Fn=function(e){return{"genericTop'":eS(e)}};var Gn=function(){return{"genericBottom'":xe.value}}();var Om=function(e){return e["genericBottom'"]},Mn=function(e){return{"genericBottom'":Om(e)}};var An=function(e){return{"genericBottom'":new ge(Om(e))}},ij=function(e){var n=i0(e);return function(a){return n(Om(a))}};var wv=k(ae),YR=ba();var nS=function(e){return e["genericToEnum'"]};var XR=function(e){return e["genericSucc'"]},aS=function(e){var n=i0(e),a=l0(e);return function(t){var o=wv(n),u=XR(t);return function(i){return o(u(a(i)))}}},tS=function(e){return e["genericPred'"]};var rS=function(e){return e["genericFromEnum'"]};var Ln=function(e){var n=tS(e),a=XR(e);return function(t){var o=eS(t);return function(u){var i=tS(u),l=XR(u);return function(s){var R=Om(s);return{"genericPred'":function(d){if(d instanceof ge)return wv(ge.create)(n(d.value0));if(d instanceof ie){var y=i(d.value0);if(y instanceof M)return new T(new ge(o));if(y instanceof T)return new T(new ie(y.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 30, column 14 - line 32, column 31): "+[y.constructor.name])}throw new Error("Failed pattern match at Data.Enum.Generic (line 28, column 18 - line 32, column 31): "+[d.constructor.name])},"genericSucc'":function(d){if(d instanceof ge){var y=a(d.value0);if(y instanceof M)return new T(new ie(R));if(y instanceof T)return new T(new ge(y.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 34, column 14 - line 36, column 31): "+[y.constructor.name])}if(d instanceof ie)return wv(ie.create)(l(d.value0));throw new Error("Failed pattern match at Data.Enum.Generic (line 33, column 18 - line 37, column 36): "+[d.constructor.name])}}}}}};var Pn={"genericPred'":function(e){return M.value},"genericSucc'":function(e){return M.value}},xn=function(e){var n=tS(e),a=XR(e);return{"genericPred'":function(t){return wv(Ud)(n(t))},"genericSucc'":function(t){return wv(Ud)(a(t))}}};var oS=function(e){return e["genericCardinality'"]};var Nn=function(e){var n=oS(e),a=nS(e),t=rS(e);return function(o){var u=nS(o),i=rS(o);return{"genericCardinality'":YR(n)+YR(oS(o))|0,"genericToEnum'":function(l){var s=function(R){if(l>=0&&lt.value0;return o?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 686, column 5 - line 690, column 68): "+[t.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 678, column 32 - line 690, column 68): "+[a.constructor.name])};var cS=function(e){return function(n){return new Ao(1,1,e,n,rl.value,rl.value)}},fj=function(){var e=function(t){if(t instanceof rl)return 0;if(t instanceof Ao)return t.value0;throw new Error("Failed pattern match at Data.Map.Internal (line 735, column 12 - line 737, column 26): "+[t.constructor.name])},n=function(t,o,u,i,l,s,R){return s instanceof Ao&&s.value0>e(R)?ol(s.value2,s.value3,ol(t,o,u,s.value4),ol(i,l,s.value5,R)):ol(i,l,ol(t,o,u,s),R)},a=function(t,o,u,i,l,s,R){return s instanceof Ao&&e(l)<=s.value0?ol(s.value2,s.value3,ol(u,i,l,s.value4),ol(t,o,s.value5,R)):ol(u,i,l,ol(t,o,s,R))};return function(t,o,u,i){if(u instanceof rl)return i instanceof rl?cS(t)(o):i instanceof Ao&&i.value0>1?n(t,o,u,i.value2,i.value3,i.value4,i.value5):ol(t,o,u,i);if(u instanceof Ao){if(i instanceof Ao){if(i.value0>(u.value0+1|0))return n(t,o,u,i.value2,i.value3,i.value4,i.value5);if(u.value0>(i.value0+1|0))return a(t,o,u.value2,u.value3,u.value4,u.value5,i)}return i instanceof rl&&u.value0>1?a(t,o,u.value2,u.value3,u.value4,u.value5,i):ol(t,o,u,i)}throw new Error("Failed pattern match at Data.Map.Internal (line 695, column 40 - line 716, column 34): "+[u.constructor.name])}}();var vs=function(e){var n=Qe(e);return function(a){var t=function(o){var u=!1,i;function l(s){if(s instanceof rl)return u=!0,M.value;if(s instanceof Ao){var R=n(a)(s.value2);if(R instanceof De){o=s.value4;return}if(R instanceof de){o=s.value5;return}if(R instanceof Ue)return u=!0,new T(s.value3);throw new Error("Failed pattern match at Data.Map.Internal (line 281, column 7 - line 284, column 22): "+[R.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 278, column 8 - line 284, column 22): "+[s.constructor.name])}for(;!u;)i=l(o);return i};return t}};var _j=function(e){var n=Qe(e);return function(a){return function(t){var o=function(u){if(u instanceof rl)return cS(a)(t);if(u instanceof Ao){var i=n(a)(u.value2);if(i instanceof De)return fj(u.value2,u.value3,o(u.value4),u.value5);if(i instanceof de)return fj(u.value2,u.value3,u.value4,o(u.value5));if(i instanceof Ue)return new Ao(u.value0,u.value1,a,t,u.value4,u.value5);throw new Error("Failed pattern match at Data.Map.Internal (line 469, column 7 - line 472, column 35): "+[i.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 466, column 8 - line 472, column 35): "+[u.constructor.name])};return o}}};var fs=function(){return rl.value}(),ul=function(e){var n=_j(e);return function(a){return Bt(a)(function(t){return function(o){return n(o.value0)(o.value1)(t)}})(fs)}};var Uae=typeof Array.from=="function",mj=typeof Symbol!="undefined"&&Symbol!=null&&typeof Symbol.iterator!="undefined"&&typeof String.prototype[Symbol.iterator]=="function",kae=typeof String.prototype.fromCodePoint=="function",Bae=typeof String.prototype.codePointAt=="function",hj=function(e){return Bae?function(n){return n.codePointAt(0)}:e},Dj=function(e){return function(n){return function(a){return function(t){return function(o){return function(u){var i=u.length;if(o<0||o>=i)return a;if(mj)for(var l=u[Symbol.iterator](),s=o;;--s){var R=l.next();if(R.done)return a;if(s===0)return n(t(R.value))}return e(o)(u)}}}}}};var gj=function(e){return kae?String.fromCodePoint:e},Rj=function(e){return function(n){return mj?function(a){for(var t="",o=a[Symbol.iterator](),u=0;u1;if(a){var t=km(Kc(1)(e)),o=Ij(t);return o?Ej(n)(t):n}return n},vS=hj(Xae),ey=yj(Yae)(vS),Ko=function(e){return uo(ey(e))};var Sj=function(e){return function(n){return bj(function(a){return Ko(Gf(a)(n))})(vR(e)(n))}},fS=function(){var e=uT(jf)(tt(Xs))(qt(Xs));return function(n){return ju(e(n))}}(),Zae=function(e){if(e<=65535)return fS(e);var n=zae(e-65536|0)(1024)+55296|0,a=Vae(e-65536|0)(1024)+56320|0;return fS(n)+fS(a)};var _S=gj(Zae),Cj=function(e){return function(n){if(e<1)return"";var a=Qf(n);return a instanceof T?_S(a.value0.head)+Cj(e-1|0)(a.value0.tail):n}},xl=Rj(Cj);var ny={eq:function(e){return function(n){return e===n}}},ay={compare:function(e){return function(n){return Qae(e)(n)}},Eq0:function(){return ny}},Bm=function(e){return function(n){return rc(Gl(xl(e)(n)))(n)}};var ete=function(e){return function(n){var a=e,t=!1,o;function u(i,l){var s=Qf(l);if(s instanceof T){var R=i===0;if(R)return t=!0,new T(s.value0.head);a=i-1|0,n=s.value0.tail;return}return t=!0,M.value}for(;!t;)o=u(a,n);return o}},pS=function(e){return function(n){return e<0?M.value:e===0&&n===""?M.value:e===0?new T(vS(n)):Dj(ete)(T.create)(M.value)(vS)(e)(n)}},nte={bottom:0,top:1114111,Ord0:function(){return ay}},fc=function(){return{cardinality:1114111+1|0,fromEnum:function(e){return e},toEnum:function(e){if(e>=0&&e<=1114111)return new T(e);if($e)return M.value;throw new Error("Failed pattern match at Data.String.CodePoints (line 63, column 1 - line 68, column 26): "+[e.constructor.name])},Bounded0:function(){return nte},Enum1:function(){return ate(0)}}}(),ate=Wae("enumCodePoint","Data.String.CodePoints",function(){return{succ:xf(oa(fc))(Jn(fc)),pred:Nf(oa(fc))(Jn(fc)),Ord0:function(){return ay}}});var pte=ba();var xj={show:pte};var Nj=_e;var dte=uv(fn),mte=pe(ze),hte=gf(uS),In=function(e){return function(n){var a=dte(mte(n)(function(t){return new Dn(e(t),t)}));return function(t){return oc(t)(a)}}},Dte=function(e){var n=aS(e),a=ij(e);return function(t){var o=n(t);return function(u){return function(i){return hte(function(l){return new Dn(l,o(l))})(a(i))}}}},Un=function(e){var n=Dte(e);return function(a){var t=n(a);return function(o){var u=t(o);return function(i){return ap(u(i))}}}};var gte={info:"info",warning:"warn",error:"error"},Nl=e=>n=>a=>t=>{let o=gte[e];if(typeof console!="undefined"&&console[o]&&console[o](n,a),typeof window!="undefined"){let u=new Error(n);typeof window.Sentry!="undefined"&&window.Sentry.captureException(u,{extra:a})}return t()},jj=(e,n)=>(n.__sentryFingerprint=e,n);var Oj=function(e){return qi(jj)(e)};var _c="error";var ry={parseOrPanic:function(e){return function(n){var a=e.parse(n);if(a instanceof Le)return a.value0;if(a instanceof Me)return Nl(_c)("Failed to parse "+e.diagnosticName)({error:a.value0,value:n})(function(t){return e.default});throw new Error("Failed pattern match at Utils.Parse (line 49, column 5 - line 57, column 24): "+[a.constructor.name])}}},ta=function(e){return e.parseOrPanic},Rte=ta(ry),Na=function(e){var n=ta(e);return function(a){var t=k(a);return function(o){return n({parse:function(u){return t(T.create)(o.parse(u))},default:M.value,diagnosticName:o.diagnosticName})}}},yte=Na(ry)(Dr),_s=function(e){var n=Pf(e);return function(a){return yte({parse:n,diagnosticName:a})}},Ye={parseOrPanic:function(e){return Rte({default:e.default,diagnosticName:e.diagnosticName,parse:function(){var n=bn(new Me(""))(Le.create);return function(a){return n(e.parse(a))}}()})}};var Uj=xn(Pn),kj=Mn(Gn),Bj=On(jn),ps=function(){function e(){}return e.value=new e,e}(),ds=function(){function e(){}return e.value=new e,e}(),wte={to:function(e){if(e instanceof ge)return ps.value;if(e instanceof ie)return ds.value;throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 20, column 1 - line 20, column 32): "+[e.constructor.name])},from:function(e){if(e instanceof ps)return new ge(xe.value);if(e instanceof ds)return new ie(xe.value);throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 20, column 1 - line 20, column 32): "+[e.constructor.name])}};var bte=function(e){if(e instanceof ps)return"school";if(e instanceof ds)return"vine";throw new Error("Failed pattern match at Sem.Connections.Types.Actor (line 32, column 1 - line 32, column 29): "+[e.constructor.name])},oy=function(){return ta(Ye)({parse:In(bte)(Un(wte)(Ln(Uj)(Fn(Cn))(Uj)(kj))(Nn(Bj)(Bj))(An(kj))),default:ps.value,diagnosticName:"Sem.Connections.Types.Actor"})}();var Hj=xn(Pn),qj=Ln(Hj)(Fn(Cn)),Jj=Mn(Gn),Wj=An(Jj),$j=On(jn),zj=Nn($j),Ete=ma($r),jl=function(){function e(){}return e.value=new e,e}(),Ev=function(){function e(){}return e.value=new e,e}(),ms=function(){function e(){}return e.value=new e,e}(),Ite={to:function(e){if(e instanceof ge)return jl.value;if(e instanceof ie&&e.value0 instanceof ge)return Ev.value;if(e instanceof ie&&e.value0 instanceof ie)return ms.value;throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 24, column 1 - line 24, column 33): "+[e.constructor.name])},from:function(e){if(e instanceof jl)return new ge(xe.value);if(e instanceof Ev)return new ie(new ge(xe.value));if(e instanceof ms)return new ie(new ie(xe.value));throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 24, column 1 - line 24, column 33): "+[e.constructor.name])}};var Tte=function(e){if(e instanceof jl)return"pending";if(e instanceof Ev)return"connected";if(e instanceof ms)return"ignored";throw new Error("Failed pattern match at Sem.Connections.Types.Status (line 40, column 1 - line 40, column 30): "+[e.constructor.name])},mS=function(){var e=In(Tte)(Un(Ite)(qj(qj(Hj)(Jj))(Wj))(zj(zj($j)))(Wj)),n=function(a){return a==="cold"?new T(ms.value):M.value};return ta(Ye)({parse:function(a){return Ete(e(a))(n(a))},default:jl.value,diagnosticName:"Sem.Connections.Types.Status"})}();var Ste=R3(yt),Vj=ne(Ze),Cte=vi(yt),Fte=Ua(Y);var Qj=function(e){return{initiator:oy(e.initiator),status:mS(e.status),introMessage:ke("")(fe(e.introMessage))}},Kj=25,hS=function(e){return Ko(e)>=Kj},Yj=function(e){var n=Ko(e),a=n>0,t=Ste(" ")([function(){return a?Vj(n)+" characters":""}(),Cte(["(",Vj(Kj),function(){return a?"":" character"}()," minimum)"])]),o=function(){var u=hS(e);return u?"text-success":""}();return Fte(o)(t)};var uy=function(){function e(){}return e.value=new e,e}(),Xj=function(){function e(){}return e.value=new e,e}();var Zj=function(){var e=ta(Ye)({parse:function(n){return n instanceof T&&n.value0==="paid"?new T(Xj.value):n instanceof T&&n.value0==="free"?new T(uy.value):n instanceof T&&n.value0==="churned"?new T(uy.value):n instanceof M?new T(uy.value):M.value},default:uy.value,diagnosticName:"Sem.Types.PartnerStatus"});return function(n){return e(fe(n))}}();var e4=function(e){return{allowedToContact:e.allowedToContact,id:e.id,name:e.name,imageUrl:fe(e.imageUrl),partnerStatus:Zj(e.partnerStatus)}};var Gte=Z(en),DS=Sa(),Hm=Wa(_e),n4=B({reflectSymbol:function(){return"id"}}),Mte=un(tn)(en),Ate=yr(Br),Lte=k(ae);var Pte=function(){function e(){}return e.value=new e,e}(),xte=function(){function e(){}return e.value=new e,e}(),Nte=function(){function e(){}return e.value=new e,e}(),gS=function(){function e(){}return e.value=new e,e}(),jte=function(){function e(){}return e.value=new e,e}(),iy=function(){function e(){}return e.value=new e,e}(),qm=function(){function e(){}return e.value=new e,e}(),RS=function(){function e(){}return e.value=new e,e}(),yS=function(){function e(){}return e.value=new e,e}();var a4={show:ba()};var Ote=_e,Ute=_s(DS(B({reflectSymbol:function(){return"avatarUrl"}})(Hm)(B({reflectSymbol:function(){return"bio"}})(Hm)(B({reflectSymbol:function(){return"connection"}})(Wa(DS(B({reflectSymbol:function(){return"initiator"}})(_e)(B({reflectSymbol:function(){return"introMessage"}})(Hm)(B({reflectSymbol:function(){return"status"}})(_e)(rn))))))(B({reflectSymbol:function(){return"firstName"}})(_e)(n4(Ote)(B({reflectSymbol:function(){return"lastName"}})(_e)(B({reflectSymbol:function(){return"school"}})(DS(B({reflectSymbol:function(){return"allowedToContact"}})(Ia)(n4(Nj)(B({reflectSymbol:function(){return"imageUrl"}})(Hm)(B({reflectSymbol:function(){return"name"}})(_e)(B({reflectSymbol:function(){return"partnerStatus"}})(Hm)(rn)))))))(B({reflectSymbol:function(){return"title"}})(_e)(B({reflectSymbol:function(){return"type"}})(_e)(B({reflectSymbol:function(){return"unreadMessageCountFromSemUser"}})(on)(rn))))))))))));var t4=function(e){if(e instanceof Pte)return"sheet-view";if(e instanceof xte)return"school-details";if(e instanceof Nte)return"network-gallery";if(e instanceof gS)return"livestream-details";if(e instanceof jte)return"card-view";throw new Error("Failed pattern match at Sem.Types.User (line 105, column 25 - line 110, column 26): "+[e.constructor.name])},r4=function(e){return Gte(Ute("SemUser")(e))(function(n){return Mte(Ate(n.type==="Sem::User"))(function(){return new T({school:e4(n.school),firstName:n.firstName,lastName:n.lastName,avatarUrl:fe(n.avatarUrl),title:n.title,bio:fe(n.bio),connection:Lte(Qj)(fe(n.connection)),unreadMessageCountFromSemUser:n.unreadMessageCountFromSemUser,id:n.id})})})};var hs=function(e){var n=null;return function(){return e===void 0||(n=e(),e=void 0),n}},Ds=function(e){return e()};var _4=function(){function e(){}return e.value=new e,e}(),p4=function(){function e(){}return e.value=new e,e}(),d4=function(){function e(){}return e.value=new e,e}();var nre=function(e){if(e instanceof _4)return"disabled";if(e instanceof p4)return"free-consultation";if(e instanceof d4)return"more-information";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types.InquiryMode (line 31, column 13 - line 34, column 40): "+[e.constructor.name])};var are=function(){return[_4.value,p4.value,d4.value]}(),m4=Na(Ye)(ae)({parse:In(nre)(are),diagnosticName:"InquiryMode"});var tre=function(e,n,a,t,o,u,i){var l=new Date(Date.UTC(e,n,a,t,o,u,i));return e>=0&&e<100&&l.setUTCFullYear(e),l};function h4(e,n,a,t,o,u,i){return tre(e,n-1,a,t,o,u,i).getTime()}function D4(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 rre=St(),ore=oa(rr);var ure=Jn(rr);var g4=function(e){return e},sy=function(){var e=function(n){return function(a){return function(t){return function(o){return function(u){return function(i){return function(l){return new cc(vv(n)(rre(ore(a)))(t),new ic(o,u,i,l))}}}}}}};return D4(e)}();var R4=function(e){return h4($u(e.value0),ure(zu(e.value0)),uc(e.value0),lc(e.value1),as(e.value1),ns(e.value1),Xi(e.value1))};var y4=function(e){var n=an(e.Semigroup0()),a=function(t){return function(o){return function(u){var i=t,l=o,s=!1,R;function d(y,I,b){if(b<1)return s=!0,y;i=n(y)(I),l=I,u=b-1|0}for(;!s;)R=d(i,l,u);return R}}};return a(Xa(e))};var ire=ba();var Kf=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}(),Jm=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 w4=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),b4=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),TS=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 rp={defer:function(e){var n=hs(e);return function(a,t,o,u,i){var l=Ds(n);return l(a,t,o,u,i)}}};var pc={map:function(e){return function(n){return function(a,t,o,u,i){return t(function(l){return n(a,t,o,u,function(s,R){return t(function(d){return i(s,e(R))})})})}}}};var dc={apply:function(e){return function(n){return function(a,t,o,u,i){return t(function(l){return e(a,t,o,u,function(s,R){return t(function(d){return n(s,t,o,u,function(y,I){return t(function(b){return i(y,R(I))})})})})})}}},Functor0:function(){return pc}};var mc={bind:function(e){return function(n){return function(a,t,o,u,i){return t(function(l){return e(a,t,o,u,function(s,R){return t(function(d){var y=n(R);return y(s,t,o,u,i)})})})}}},Apply0:function(){return dc}},lre=Ja(mc);var il={pure:function(e){return function(n,a,t,o,u){return u(n,e)}},Apply0:function(){return dc}};var cre={Applicative0:function(){return il},Bind1:function(){return mc}};var E4={throwError:function(e){return function(n,a,t,o,u){return o(n,e)}},Monad0:function(){return cre}},sre=Pr(E4);var Yf={alt:function(e){return function(n){return function(a,t,o,u,i){return t(function(l){return e(new Kf(a.value0,a.value1,!1),t,o,function(s,R){return t(function(d){return s.value2?u(s,R):n(a,t,o,u,i)})},i)})}}},Functor0:function(){return pc}},vre=function(e){return function(n,a,t,o,u){var i=e(n);return u(i.value1,i.value0)}};var fre=function(e){var n=e.Monad0(),a=k(n.Bind1().Apply0().Functor0()),t=W(n.Applicative0()),o=To(e);return function(u){return function(i){var l=function(s){var R=!1,d;function y(I){var b=I(Ee);if(b instanceof w4){s=b.value0;return}if(b instanceof b4)return R=!0,a(Jt.create)(b.value0);if(b instanceof TS)return R=!0,t(new kt(new Dn(b.value1,b.value0)));throw new Error("Failed pattern match at Parsing (line 152, column 13 - line 158, column 32): "+[b.constructor.name])}for(;!R;)d=y(s);return d};return o(l)(function(s){return i(u,w4.create,b4.create,function(R,d){return new TS(R,new Me(d))},function(R,d){return new TS(R,new Le(d))})})}}};var I4=vre(function(e){return new Dn(e.value1,e)}),SS=function(e){return e.value1},CS=function(e){return e.value0};var _re={index:0,line:1,column:1},T4=function(e){var n=k(e.Monad0().Bind1().Apply0().Functor0()),a=fre(e);return function(t){return function(o){var u=new Kf(t,_re,!1);return n(So)(a(u)(o))}}},pre=T4(kd),S4=function(e){var n=pre(e);return function(a){return ire(n(a))}};var dre=function(e){return function(n){return sre(new Jm(e,n))}},op=function(e){return lre(dre(e))(I4)};var C4={empty:op("No alternative"),Alt0:function(){return Yf}},Xf={Applicative0:function(){return il},Plus1:function(){return C4}};var Ere=ma(Yf);var Ire=W(il);var Tre=k(pc);var hc=function(e){return function(n,a,t,o,u){return e(n,a,t,function(i,l){return o(new Kf(i.value0,i.value1,n.value2),l)},u)}};var vy=function(e){return function(n){return Ere(n)(Ire(e))}},Zf=function(e){return vy(M.value)(Tre(T.create)(e))};var G4=function(e){return function(n){return function(a){return function(t){try{return n(new RegExp(a,t))}catch(o){return e(o.message)}}}}};var Wm=function(e){return function(n){return function(a){return a.replace(e,n)}}};var GS={append:function(e){return function(n){return{global:e.global||n.global,ignoreCase:e.ignoreCase||n.ignoreCase,multiline:e.multiline||n.multiline,dotAll:e.dotAll||n.dotAll,sticky:e.sticky||n.sticky,unicode:e.unicode||n.unicode}}}};var fy={global:!1,ignoreCase:!0,multiline:!1,dotAll:!1,sticky:!1,unicode:!1},up={global:!0,ignoreCase:!1,multiline:!1,dotAll:!1,sticky:!1,unicode:!1};var Sre=function(e){return function(){return e.global?"g":""}()+(function(){return e.ignoreCase?"i":""}()+(function(){return e.multiline?"m":""}()+(function(){return e.dotAll?"s":""}()+(function(){return e.sticky?"y":""}()+function(){return e.unicode?"u":""}()))))},gs=function(e){return function(n){return G4(Me.create)(Le.create)(e)(Sre(n))}};var P4=Jn(fc),Fre=Io(ar);var Gre=ne(Vt);var x4=function(e){return function(n){return function(a){var t=P4(n);if(t===10)return{index:e.index+1|0,line:e.line+1|0,column:1};if(t===13){var o=pS(0)(a);return o instanceof T&&P4(o.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)-Fre(e.column-1|0)(8)|0}:{index:e.index+1|0,line:e.line,column:e.column+1|0}}}},Mre=function(e){return function(n){return function(a){var t=e,o=n,u=!1,i;function l(s,R,d){var y=Qf(R);if(y instanceof M)return u=!0,s;if(y instanceof T){var I=function(){if(yi(y.value0.tail))return x4(s)(y.value0.head)(d);if($e)return x4(s)(y.value0.head)(y.value0.tail);throw new Error("Failed pattern match at Parsing.String (line 165, column 7 - line 167, column 52): "+[])}();t=I,o=y.value0.tail,a=d;return}throw new Error("Failed pattern match at Parsing.String (line 161, column 36 - line 168, column 38): "+[y.constructor.name])}for(;!u;)i=l(t,o,a);return i}}};var AS=jg(function(e){return function(n){return function(a){return function(t){return function(o){var u=yi(e.value0);return u?o(new Kf(e.value0,e.value1,!0),Ee):t(e,new Jm("Expected EOF",e.value1))}}}}}),N4=function(e){return jg(function(n){return function(a){return function(t){return function(o){return function(u){var i=e(n.value0);if(i instanceof Me)return o(n,new Jm(i.value0,n.value1));if(i instanceof Le)return u(new Kf(i.value0.remainder,Mre(n.value1)(i.value0.consumed)(i.value0.remainder),!yi(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 Dc=function(e){return N4(function(n){var a=fi(e)(n);return a instanceof T?new Le({value:e,consumed:e,remainder:a.value0}):new Me("Expected "+Gre(e))})};var j4=ne(Ze),Lre=fr(Au),Pre=t0(dc);var xre=function(e){return"(line "+(j4(e.line)+(", col "+(j4(e.column)+")")))},Nre=function(e){return CS(e)+(" "+xre(SS(e)))},LS=function(e){return function(n){return Lre(Nre)(S4(n)(Pre(e)(AS)))}};var _y=oa(jf);var Lo=ne(Ze);var Vre=Lr(Co),Qre=Vre(yt);var Kre=hI(na)(Yl);var PS=Jn(xr),Yre=ne(dR),Xre=Jn(rr),H4=Jn(pu),Zre=ba(),eoe=Jn(cv),q4=ne(AP),xS=Jn(hi),noe=Io(ar),J4=Jn(mi),W4=Jn(di),NS=Jn(du),$4=io(ar);var ip=function(){function e(){}return e.value=new e,e}(),z4=function(){function e(){}return e.value=new e,e}(),aoe=function(){function e(){}return e.value=new e,e}(),Ol=function(){function e(){}return e.value=new e,e}(),jS=function(){function e(){}return e.value=new e,e}(),V4=function(){function e(){}return e.value=new e,e}(),Q4=function(){function e(){}return e.value=new e,e}(),Ul=function(){function e(){}return e.value=new e,e}(),toe=function(){function e(){}return e.value=new e,e}(),roe=function(){function e(){}return e.value=new e,e}(),kl=function(){function e(){}return e.value=new e,e}(),ooe=function(){function e(){}return e.value=new e,e}(),OS=function(){function e(){}return e.value=new e,e}(),Bl=function(){function e(){}return e.value=new e,e}(),Hl=function(){function e(){}return e.value=new e,e}(),uoe=function(){function e(){}return e.value=new e,e}(),wi=function(){function e(){}return e.value=new e,e}(),ioe=function(){function e(){}return e.value=new e,e}(),US=function(){function e(){}return e.value=new e,e}(),loe=function(){function e(){}return e.value=new e,e}(),coe=function(){function e(){}return e.value=new e,e}(),soe=function(){function e(){}return e.value=new e,e}(),ht=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var voe=function(e){if(e instanceof su)return"Jan";if(e instanceof Uu)return"Feb";if(e instanceof vu)return"Mar";if(e instanceof ku)return"Apr";if(e instanceof Bu)return"May";if(e instanceof fu)return"Jun";if(e instanceof _u)return"Jul";if(e instanceof Hu)return"Aug";if(e instanceof qu)return"Sep";if(e instanceof Ju)return"Oct";if(e instanceof Wu)return"Nov";if(e instanceof pi)return"Dec";throw new Error("Failed pattern match at Data.Formatter.DateTime (line 489, column 19 - line 501, column 22): "+[e.constructor.name])};var Tv=function(e){if(e<0)return"-"+Tv(-e|0);if(e<10)return"0"+Lo(e);if($e)return Lo(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 194, column 1 - line 194, column 32): "+[e.constructor.name])},K4=function(e){if(e<0)return"-"+K4(-e|0);if(e<10)return"000"+Lo(e);if(e<100)return"00"+Lo(e);if(e<1e3)return"0"+Lo(e);if($e)return Lo(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 207, column 1 - line 207, column 35): "+[e.constructor.name])},Y4=function(e){if(e<0)return"-"+Y4(-e|0);if(e<10)return"00"+Lo(e);if(e<100)return"0"+Lo(e);if($e)return Lo(e);throw new Error("Failed pattern match at Data.Formatter.DateTime (line 200, column 1 - line 200, column 32): "+[e.constructor.name])};var foe=function(e){var n=Lo(Kre(e)),a=Ko(n);return a===1?"0"+n:a===2?n:Bm(a-2|0)(n)};var _oe=function(e){var n=e===0;return n?12:e},poe=function(e){return function(n){if(n instanceof ip)return K4(PS($u(e.value0)));if(n instanceof z4)return foe(PS($u(e.value0)));if(n instanceof aoe)return Lo(PS($u(e.value0)));if(n instanceof Ol)return Yre(zu(e.value0));if(n instanceof jS)return voe(zu(e.value0));if(n instanceof V4)return Tv(Xre(zu(e.value0)));if(n instanceof Q4)return Tv(H4(uc(e.value0)));if(n instanceof Ul)return Lo(H4(uc(e.value0)));if(n instanceof toe)return Lo(co(function(t){return t/1e3}(Zre(g4(R4(e))))));if(n instanceof roe)return Lo(eoe(pm(e.value0)));if(n instanceof kl)return q4(pm(e.value0));if(n instanceof ooe)return xl(3)(q4(pm(e.value0)));if(n instanceof OS)return Tv(xS(lc(e.value1)));if(n instanceof Bl)return Tv(_oe(noe(xS(lc(e.value1)))(12)));if(n instanceof Hl){var a=xS(lc(e.value1))>=12;return a?"PM":"AM"}if(n instanceof uoe)return Lo(J4(as(e.value1)));if(n instanceof wi)return Tv(J4(as(e.value1)));if(n instanceof ioe)return Lo(W4(ns(e.value1)));if(n instanceof US)return Tv(W4(ns(e.value1)));if(n instanceof loe)return Y4(NS(Xi(e.value1)));if(n instanceof coe)return Lo(function(t){return $4(t)(100)}(NS(Xi(e.value1))));if(n instanceof soe)return Tv(function(t){return $4(t)(10)}(NS(Xi(e.value1))));if(n instanceof ht)return n.value0;throw new Error("Failed pattern match at Data.Formatter.DateTime (line 169, column 38 - line 192, column 21): "+[n.constructor.name])}},Po=function(e){return function(n){return Qre(poe(n))(e)}};function py(e){return Math.round(e).toString()}var lp=Z(mc);var doe=W(il),moe=I0(Xf)(rp);var hoe=qI(Xf)(rp),dy=y4(yt),Doe=y0(il)(Vd),goe=k(ae);var X4=Hc(na),Roe=io(ar),yoe=ne(Ze),woe=pe(Dr),boe=ne(cf),Eoe=pn(dn);var Ioe=lp(Zf(hc(Dc("+"))))(function(e){return lp(moe(Dc("0")))(function(n){return lp(Zf(hc(Dc(",0"))))(function(a){return lp(Zf(hc(Dc("."))))(function(t){return lp(Doe(t)(function(o){return hc(hoe(Dc("0")))}))(function(o){return lp(Zf(hc(Dc("a"))))(function(u){return doe({sign:Ct(e),before:uo(n),comma:Ct(a),after:ke(0)(goe(uo)(o)),abbreviations:Ct(u)})})})})})})}),Toe=LS(Ioe);var Z4=function(e){return function(n){var a=Jg(n),t=function(){if(a>0)return X4(co($I(a)/P3))(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 o=Roe(t)(3),u=function(){var $=o<1;return $?n:n/Wg(1e3)(Ft(o))}(),i=function(){if(o===0)return"";if(o===1)return"K";if(o===2)return"M";if(o===3)return"G";if(o===4)return"T";if(o===5)return"P";if(o===6)return"E";if(o===7)return"Z";if(o===8)return"Y";if($e)return"10e+"+yoe(o*3|0);throw new Error("Failed pattern match at Data.Formatter.Number (line 107, column 7 - line 117, column 53): "+[])}();return Z4({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=Wg(10)(Ft(X4(0)(e.after))),R=Ef(a*s)/s,d=T0(R),y=R-d,I=Ef(y*s),b=function(){var $=py(I),z=Ko($),ee=dy("0")(e.after-z|0);return ee+$}(),S=function(){var $=e.after<1;return $?"":"."+(function(){var z=I===0;return z?dy("0")(e.after):""}()+function(){var z=I>0;return z?b:""}())}(),L=function($){return function(z){return function(ee){var oe=$,te=z,ve=!1,Re;function nn(cn,ce,le){var Ne=Qd(le);if(Ne instanceof M)return ve=!0,G0(cn);if(Ne instanceof T&&ce<3){oe=qo(Ne.value0.head)(cn),te=ce+1|0,ee=Ne.value0.tail;return}oe=qo(",")(cn),te=0,ee=le}for(;!ve;)Re=nn(oe,te,ee);return Re}}},O=function(){return e.comma?L([])(0)(Ad(tm(dy("0")(l)+py(d)))):dy("0")(l)+py(d)}();return function(){var $=n<0;if($)return"-";var z=n>0&&e.sign;return z?"+":""}()+(O+S)}},Soe=function(e){return function(n){return woe(Toe(e))(za(Z4)(n))}},e_=function(e){return function(n){return Ut(hn(boe(n)))(Eoe)(Soe(e)(n))}};var Foe=Je;var e8=function(e){return Tf(e)};var ll=function(e){var n=e8(e);return n?M.value:new T(Foe(e))};var Ka=function(e){return function(n){var a=e8(e);return a?n:e}};var Vr=function(){return Je};var $m=ne(Ze),Goe=Jn(xr),Moe=Jn(rr),Aoe=Vr(),Loe=uu(),Poe=Qu(sv),kS=io(ar),xoe=Wo(fn);var Noe=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 $m(n.minutes)+(" minutes"+e.suffix);if(n.hours<=1)return"an hour"+e.suffix;if(n.hours<24)return $m(n.hours)+(" hours"+e.suffix);if(n.days<=1)return"a day"+e.suffix;if(n.days<30)return $m(n.days)+(" days"+e.suffix);if(n.months<=1)return"a month"+e.suffix;if(n.months<12)return $m(n.months)+(" months"+e.suffix);if(n.years<=1)return"a year"+e.suffix;if($e)return $m(n.years)+(" years"+e.suffix);throw new Error("Failed pattern match at Utils.Format (line 150, column 1 - line 150, column 81): "+[e.constructor.name,n.constructor.name])}},my=function(e){return Noe({suffix:" "+e,justNow:"just now"})},n8=function(){return function(e){var n=function(R){return(Goe($u(Of(R)))*12|0)+Moe(zu(Of(R)))|0},a=Aoe(e),t=Ka(a.format)(my("ago")),o=$g(Loe(Poe(a.to)(a.from))),u=kS(o+30|0)(60),i=kS(u+12|0)(24),l=n(a.to)-n(a.from)|0,s=kS(l+6|0)(12);return t({minutes:o,hours:u,days:i,months:l,years:s})}};var joe=function(e){return function(n){return function(a){var t=e===1;return t?n:a}}},cl=function(e){return function(n){return function(a){return e_("0,0")(Ft(e))+(" "+joe(e)(n)(a))}}};var a8=e_("0,0");var t8=function(){return Po(xoe([kl.value,new ht(", "),Ol.value,new ht(" "),Ul.value,new ht(" at "),Bl.value,new ht(":"),wi.value,new ht(" "),Hl.value]))}();var BS=()=>document.visibilityState=="visible",r8=(e,n)=>document.elementFromPoint(e,n);var o8=function(){return function(){return $N("br")}};function u8(e){return function(n){return function(){return n.getElementById(e)}}}var Ooe=k(zn),hy=function(e){var n=Ooe(fe),a=u8(e);return function(t){return n(a(t))}};var Dy=function(e){return function(n){return function(){return n[e]}}},Uoe=Dy("children"),koe=Dy("firstElementChild"),Boe=Dy("lastElementChild"),Hoe=Dy("childElementCount");var Yu=function(){return window};function i8(e,n,a,t){if(typeof window!="undefined"){var o=window[a];if(o!=null&&t instanceof o)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 Tn=function(e){return function(n){return i8(M.value,T.create,e,n)}};var l8=Je;var gy=Je;function c8(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 HS=Je;var s8=function(e){return c8(M.value,T.create,e)};function qS(e){return function(){return e.seeking}}function zm(e){return function(){return e.currentTime}}function JS(e){return function(){return e.volume}}function WS(e){return function(n){return function(){n.volume=e}}}function $S(e){return function(){return e.muted}}function n_(e){return function(n){return function(){n.muted=e}}}var v8=Tn("HTMLMediaElement");var f8=Tn("HTMLMediaElement");function zS(e){return function(){return e.hash}}function VS(e){return function(n){return function(){n.hash=e}}}function QS(e){return function(n){return function(){n.href=e}}}function KS(e){return function(){return e.platform}}function cp(e){return function(){return e.document}}function YS(e){return function(){return e.navigator}}function sp(e){return function(){return e.location}}var Zoe=k(ze);var eue=o8()(),nue=y0(rt)(Vd),_8=Z(tr),p8=pe(zn),aue=Z(en);var d8=Ke("\xA0");var da=za(bn($n));var tue=function(e){return function(n){if(e)return $n;if($e)return n(Ee);throw new Error("Failed pattern match at Utils.HTML (line 107, column 1 - line 107, column 65): "+[e.constructor.name,n.constructor.name])}},m8=function(e){return function(n){return tue(e)(hn(n))}};var h8=function(e){return function(n){if(e)return n(Ee);if($e)return $n;throw new Error("Failed pattern match at Utils.HTML (line 94, column 1 - line 94, column 61): "+[e.constructor.name,n.constructor.name])}},ya=function(e){return function(n){return h8(e)(hn(n))}};var Vm=function(e){return Se(BI(eue({}))(Zoe(Ke)(Qo(` `)(e))))},Ry=function(e){return nue(f8(e.target))(zm)};var D8=function(e){return function(){return r8(e.x,e.y)}},g8=function(e){return _8(p8(_8(Yu)(cp))(gy))(hy(e))},yy=function(e){return p8(g8(e))(function(n){return aue(n)(s8)})};var fp=on;var R8=({just:e,nothing:n})=>a=>{try{let t=new Date(a);return isNaN(t.getTime())?n:e(t)}catch{return n}},XS=e=>({year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),y8=()=>new Date,w8=(()=>{let e=new Date;return typeof window!="undefined"?()=>e:()=>{let n=new Date;return n-e>1e3&&(e=n),e}})();var a_=(()=>{let e=new Date().toString(),n=(e.match(/\(([\w\s]+)\)$/)||[])[1];return n?/\s/.test(n)?(n.match(/\b(\w)/g)||[]).join(""):n:(n=(e.match(/(\w{3,4})\s\d{4}$/)||[])[1],n||(n=(e.match(/(UTC[\+\-]\d+)/)||[])[1],n)||(n=(e.match(/(GMT[\+\-]\d+)/)||[])[1],n)?n:"")})();function ZS(){return Date.now()}var iue=k(zn);var Xu=iue(sy)(ZS);var b8={liftAff:pn(dn),MonadEffect0:function(){return Ve}};var i7n=function(){function e(){this.head=null,this.last=null,this.size=0}function n(d,y){this.queue=d,this.value=y,this.next=null,this.prev=null}function a(d){this.draining=!1,this.error=null,this.value=d,this.takes=new e,this.reads=new e,this.puts=new e}var t={};function o(d){try{d()}catch(y){setTimeout(function(){throw y},0)}}function u(d,y){var I=new n(d,y);switch(d.size){case 0:d.head=I;break;case 1:I.prev=d.head,d.head.next=I,d.last=I;break;default:I.prev=d.last,d.last.next=I,d.last=I}return d.size++,I}function i(d){var y;switch(d.size){case 0:return null;case 1:y=d.head,d.head=null;break;case 2:y=d.last,d.head.next=null,d.last=null;break;default:y=d.last,d.last=y.prev,d.last.next=null}return y.prev=null,y.queue=null,d.size--,y.value}function l(d){var y;switch(d.size){case 0:return null;case 1:y=d.head,d.head=null;break;case 2:y=d.head,d.last.prev=null,d.head=d.last,d.last=null;break;default:y=d.head,d.head=y.next,d.head.prev=null}return y.next=null,y.queue=null,d.size--,y.value}function s(d){if(d.queue!==null){if(d.queue.last===d){i(d.queue);return}if(d.queue.head===d){l(d.queue);return}d.prev&&(d.prev.next=d.next),d.next&&(d.next.prev=d.prev),d.queue.size--,d.queue=null,d.value=null,d.next=null,d.prev=null}}function R(d,y){if(!y.draining){var I=y.puts,b=y.takes,S=y.reads,L,O,$,z,ee;for(y.draining=!0;;){if(L=null,O=null,$=null,z=y.value,ee=S.size,y.error!==null){for(z=d.left(y.error);L=l(I);)o(L.cb(z));for(;O=l(S);)o(O(z));for(;$=l(b);)o($(z));break}if(z===t&&(L=l(I))&&(y.value=z=L.value),z!==t){for($=l(b);ee--&&(O=l(S));)o(O(d.right(z)));$!==null&&(y.value=t,o($(d.right(z))))}if(L!==null&&o(L.cb(d.right(void 0))),y.value===t&&I.size===0||y.value!==t&&b.size===0)break}y.draining=!1}}return a.EMPTY=t,a.putLast=u,a.takeLast=i,a.takeHead=l,a.deleteCell=s,a.drainVar=R,a}();var mue=Z(tr);var Sv=Z(en),hue=oa(xr),Due=oa(rr),gue=oa(pu),Rue=oa(hi),yue=oa(mi),wue=oa(di),bue=oa(du),Eue=W(aa),I8=W(rt),T8=Ja(tr),Iue=pe(ae);var Tue=function(){return ts($c(M.value))}();var S8=function(e){return Sv(hue(e.year))(function(n){return Sv(Due(e.month+1|0))(function(a){return Sv(gue(e.day))(function(t){return Sv(Rue(e.hour))(function(o){return Sv(yue(e.minute))(function(u){return Sv(wue(e.second))(function(i){return Sv(bue(e.millisecond))(function(l){return Eue(new cc(vv(n)(a)(t),new ic(o,u,i,l)))})})})})})})})},C8=function(e){var n=k3("Failed to obtain current time. This should never happen.");return bn(n)(I8)(S8(XS(e)))},t_=T8(C8)(y8),nC=function(e){return ts(mue(ec(Tue))(bn(T8(C8)(w8))(I8)))},hu=function(e){return Sv(Iue(R8({just:T.create,nothing:M.value})(e))(XS))(S8)};var aC=W(aa),Fue=k(ae),F8=Z(en);var G8=xn(Pn),M8=Ln(G8)(Fn(Cn)),A8=Mn(Gn),L8=An(A8),P8=On(jn),x8=Nn(P8);var tC=function(){function e(){}return e.value=new e,e}(),rC=function(){function e(){}return e.value=new e,e}(),oC=function(){function e(){}return e.value=new e,e}();var Gue={to:function(e){if(e instanceof ge)return tC.value;if(e instanceof ie&&e.value0 instanceof ge)return rC.value;if(e instanceof ie&&e.value0 instanceof ie)return oC.value;throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 183, column 1 - line 183, column 41): "+[e.constructor.name])},from:function(e){if(e instanceof tC)return new ge(xe.value);if(e instanceof rC)return new ie(new ge(xe.value));if(e instanceof oC)return new ie(new ie(xe.value));throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 183, column 1 - line 183, column 41): "+[e.constructor.name])}};var Mue=function(e){if(e instanceof tC)return"stuffed";if(e instanceof rC)return"satisfied";if(e instanceof oC)return"hungry";throw new Error("Failed pattern match at ServiceProviders.Retail.Advising.Types (line 242, column 27 - line 245, column 35): "+[e.constructor.name])};var Aue=Na(Ye)(ae)({parse:In(Mue)(Un(Gue)(M8(M8(G8)(A8))(L8))(x8(x8(P8)))(L8)),diagnosticName:"ClientAppetite"}),N8=function(e){return F8(bn(aC(M.value))(function(){var n=Fue(aC);return function(a){return n(Aue(a))}}())(fe(e.clientAppetite)))(function(n){return F8(m4(e.inquiryMode))(function(a){return aC({packages:e.packages,pricePerHourCents:e.pricePerHourCents,singleSessionDurationMinutes:e.singleSessionDurationMinutes,singleSessionRefundPeriodLengthDays:e.singleSessionRefundPeriodLengthDays,themes:e.themes,freeConsultationDurationMinutes:fe(e.freeConsultationDurationMinutes),canSubmitConsultInquiry:fe(e.canSubmitConsultInquiry),clientAppetite:n,inquiryMode:a})})})};var j8=Z(en),_p=Sa(),uC=Wa(_e),O8=B({reflectSymbol:function(){return"description"}})(_e),by=B({reflectSymbol:function(){return"id"}})(on),iC=B({reflectSymbol:function(){return"name"}})(_e),U8=_p(by(iC(B({reflectSymbol:function(){return"slug"}})(_e)(rn)))),k8=Ca(U8),Lue=_s(_p(B({reflectSymbol:function(){return"advisingConfig"}})(Wa(_p(B({reflectSymbol:function(){return"canSubmitConsultInquiry"}})(Wa(Ia))(B({reflectSymbol:function(){return"clientAppetite"}})(uC)(B({reflectSymbol:function(){return"freeConsultationDurationMinutes"}})(Wa(on))(B({reflectSymbol:function(){return"inquiryMode"}})(_e)(B({reflectSymbol:function(){return"packages"}})(Ca(_p(B({reflectSymbol:function(){return"activeForSale"}})(Ia)(O8(by(iC(B({reflectSymbol:function(){return"numMinutes"}})(on)(B({reflectSymbol:function(){return"packageCategories"}})(k8)(B({reflectSymbol:function(){return"refundPeriodLengthDays"}})(on)(B({reflectSymbol:function(){return"totalPriceCents"}})(fp)(rn)))))))))))(B({reflectSymbol:function(){return"pricePerHourCents"}})(fp)(B({reflectSymbol:function(){return"singleSessionDurationMinutes"}})(on)(B({reflectSymbol:function(){return"singleSessionRefundPeriodLengthDays"}})(on)(B({reflectSymbol:function(){return"themes"}})(Ca(_p(B({reflectSymbol:function(){return"active"}})(Ia)(B({reflectSymbol:function(){return"category"}})(U8)(O8(B({reflectSymbol:function(){return"durationMinutes"}})(on)(by(B({reflectSymbol:function(){return"priceCents"}})(fp)(B({reflectSymbol:function(){return"title"}})(_e)(rn))))))))))(rn))))))))))))(B({reflectSymbol:function(){return"entity"}})(_p(B({reflectSymbol:function(){return"bio"}})(_e)(by(B({reflectSymbol:function(){return"imageUrl"}})(uC)(iC(B({reflectSymbol:function(){return"organizationId"}})(on)(B({reflectSymbol:function(){return"organizationName"}})(_e)(B({reflectSymbol:function(){return"shortEducation"}})(uC)(B({reflectSymbol:function(){return"tags"}})(k8)(rn))))))))))(rn)))),lC=W(aa),cC=k(ae),r_=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}(),Pue=function(e){return j8(Lue("ServiceProviderPresenter")(e))(function(n){return j8(bn(lC(M.value))(function(){var a=cC(lC);return function(t){return a(N8(t))}}())(fe(n.advisingConfig)))(function(a){return lC({entity:n.entity,advisingConfig:a})})})},B8=Na(Ye)(ae)({parse:function(e){return e.type==="Sem::User"?cC(r_.create)(r4(e.presenter)):e.type==="ServiceProviders::Individual"?cC(Rs.create)(Pue(e.presenter)):M.value},diagnosticName:"Livestream Guest Presenter"});var H8=xn(Pn),q8=Ln(H8)(Fn(Cn)),J8=Mn(Gn),W8=An(J8),$8=On(jn),z8=Nn($8),ys=function(){function e(){}return e.value=new e,e}(),gc=function(){function e(){}return e.value=new e,e}(),ws=function(){function e(){}return e.value=new e,e}(),xue={to:function(e){if(e instanceof ge)return ys.value;if(e instanceof ie&&e.value0 instanceof ge)return gc.value;if(e instanceof ie&&e.value0 instanceof ie)return ws.value;throw new Error("Failed pattern match at Livestream.Types.Poll (line 41, column 1 - line 41, column 37): "+[e.constructor.name])},from:function(e){if(e instanceof ys)return new ge(xe.value);if(e instanceof gc)return new ie(new ge(xe.value));if(e instanceof ws)return new ie(new ie(xe.value));throw new Error("Failed pattern match at Livestream.Types.Poll (line 41, column 1 - line 41, column 37): "+[e.constructor.name])}},V8={eq:function(e){return function(n){return e instanceof ys&&n instanceof ys||e instanceof gc&&n instanceof gc||e instanceof ws&&n instanceof ws}}},Ey=function(e){if(e instanceof ys)return"ready";if(e instanceof gc)return"live";if(e instanceof ws)return"closed";throw new Error("Failed pattern match at Livestream.Types.Poll (line 64, column 23 - line 67, column 21): "+[e.constructor.name])};var Qm=function(){return ta(Ye)({parse:In(Ey)(Un(xue)(q8(q8(H8)(J8))(W8))(z8(z8($8)))(W8)),default:ys.value,diagnosticName:"livestream poll status"})}(),sC=function(e){return{id:e.id,question:e.question,multiSelect:e.multiSelect,options:e.options,autoDisplayMinutesFromStart:fe(e.autoDisplayMinutesFromStart)}};var Q8=function(e){return{fullName:e.fullName,firstName:e.firstName,totalStreams:e.totalStreams,undergrad:{college:fe(e.undergrad.college),major:fe(e.undergrad.major),year:fe(e.undergrad.year)},gradCollege:fe(e.gradCollege),workExperience:fe(e.workExperience),admissionsStory:fe(e.admissionsStory),pictureUrl:fe(e.pictureUrl),allStreamsUrl:fe(e.allStreamsUrl)}};var Nue=Qe(na),jue=Ou(),K8=pe(ae),Y8=xn(Pn),X8=Ln(Y8)(Fn(Cn)),Z8=Mn(Gn),e7=An(Z8),n7=On(jn),a7=Nn(n7),t7=ta(Ye),r7=df(),o7=Ja(en),Oue=pe(ze),Uue=k(ae),kue=Z(en),Du=function(){function e(){}return e.value=new e,e}(),qr=function(){function e(){}return e.value=new e,e}(),Er=function(){function e(){}return e.value=new e,e}();var Zu=Ze,Bue=ne(Zu);var Hue={to:function(e){if(e instanceof ge)return Du.value;if(e instanceof ie&&e.value0 instanceof ge)return qr.value;if(e instanceof ie&&e.value0 instanceof ie)return Er.value;throw new Error("Failed pattern match at Livestream.Types.Conference (line 175, column 1 - line 175, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof Du)return new ge(xe.value);if(e instanceof qr)return new ie(new ge(xe.value));if(e instanceof Er)return new ie(new ie(xe.value));throw new Error("Failed pattern match at Livestream.Types.Conference (line 175, column 1 - line 175, column 39): "+[e.constructor.name])}},Cv={eq:function(e){return function(n){return e instanceof Du&&n instanceof Du||e instanceof qr&&n instanceof qr||e instanceof Er&&n instanceof Er}}},Km={eq:function(e){return function(n){return e===n}}},u7={compare:function(e){return function(n){return Nue(e)(n)}},Eq0:function(){return Km}};var Fv=function(e){return jue({livestream_conference_id:Bue(e.id),livestream_conference_presenter_name:ke("")(K8(e.presenter)(function(n){return n.fullName})),livestream_conference_uid:e.uid,livestream_conference_title:e.title,livestream_conference_partner_type:ke("")(e.partnerType)})},i7=function(){var e=function(n){if(n instanceof Du)return"waiting_room";if(n instanceof qr)return"on_air";if(n instanceof Er)return"complete";throw new Error("Failed pattern match at Livestream.Types.Conference (line 188, column 17 - line 191, column 35): "+[n.constructor.name])};return In(e)(Un(Hue)(X8(X8(Y8)(Z8))(e7))(a7(a7(n7)))(e7))}(),l7=function(){return t7({parse:i7,default:Du.value,diagnosticName:"livestream status"})}(),que=t7({parse:hu,default:tt(k0),diagnosticName:"livestream scheduled start time"}),Ym=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:K8(fe(e.school))(function(n){return{cityState:n.cityState,name:n.name,id:r7(n.id),slug:r7(n.slug)}}),scheduledStartTime:que(e.scheduledStartTime),onAirTime:o7(hu)(fe(e.onAirTime)),streamStatus:l7(e.streamStatus),watchUrl:fe(e.watchUrl),streamingStartTime:o7(hu)(fe(e.streamingStartTime)),polls:Oue(e.polls)(function(n){return{poll:sC(n.poll),status:Qm(n.status)}}),presenter:Uue(Q8)(fe(e.presenter)),partnerType:fe(e.partnerType),guestPresenter:kue(fe(e.guestPresenter))(B8),zoomJoinUrl:fe(e.zoomJoinUrl),zoomStartUrl:fe(e.zoomStartUrl)}};var c7=xn(Pn),s7=Mn(Gn),v7=On(jn),bi=function(){function e(){}return e.value=new e,e}(),pp=function(){function e(){}return e.value=new e,e}(),Jue={to:function(e){if(e instanceof ge)return bi.value;if(e instanceof ie)return pp.value;throw new Error("Failed pattern match at Profile.PublishScope (line 24, column 1 - line 24, column 39): "+[e.constructor.name])},from:function(e){if(e instanceof bi)return new ge(xe.value);if(e instanceof pp)return new ie(xe.value);throw new Error("Failed pattern match at Profile.PublishScope (line 24, column 1 - line 24, column 39): "+[e.constructor.name])}},Iy={eq:function(e){return function(n){return e instanceof bi&&n instanceof bi||e instanceof pp&&n instanceof pp}}};var Xm=function(e){if(e instanceof pp)return"anonymous-all-schools";if(e instanceof bi)return"all-schools";throw new Error("Failed pattern match at Profile.PublishScope (line 34, column 13 - line 36, column 30): "+[e.constructor.name])},Ty=function(){return ta(Ye)({parse:In(Xm)(Un(Jue)(Ln(c7)(Fn(Cn))(c7)(s7))(Nn(v7)(v7))(An(s7))),diagnosticName:"Profile.PublishScope",default:pp.value})}();var sl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fl=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_l=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var vC=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:fe(e.description)}},o_=function(e){return{author:e.author,text:e.text,isFromHQ:e.isFromHQ,isPublic:e.isPublic,id:e.id,time:hu(e.time)}},f7=function(e){return{autoRequestFromLivestreams:e.autoRequestFromLivestreams,fullName:fe(e.fullName),publishScope:Ty(e.publishScope)}},fC=function(e){return{id:e.id,title:e.title,url:e.url,buttonText:e.buttonText,autoDisplayMinutesFromStart:fe(e.autoDisplayMinutesFromStart)}},Ei="overlay-visibility-test";var _7=xn(Pn),Sy=Ln(_7)(Fn(Cn)),p7=Mn(Gn),Cy=An(p7),d7=On(jn),Fy=Nn(d7),bs=function(){function e(){}return e.value=new e,e}(),Gv=function(){function e(){}return e.value=new e,e}(),u_=function(){function e(){}return e.value=new e,e}(),Mv=function(){function e(){}return e.value=new e,e}(),Av=function(){function e(){}return e.value=new e,e}(),Wue={to:function(e){if(e instanceof ge)return bs.value;if(e instanceof ie&&e.value0 instanceof ge)return Gv.value;if(e instanceof ie&&e.value0 instanceof ie&&e.value0.value0 instanceof ge)return u_.value;if(e instanceof ie&&e.value0 instanceof ie&&e.value0.value0 instanceof ie&&e.value0.value0.value0 instanceof ge)return Mv.value;if(e instanceof ie&&e.value0 instanceof ie&&e.value0.value0 instanceof ie&&e.value0.value0.value0 instanceof ie)return Av.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 bs)return new ge(xe.value);if(e instanceof Gv)return new ie(new ge(xe.value));if(e instanceof u_)return new ie(new ie(new ge(xe.value)));if(e instanceof Mv)return new ie(new ie(new ie(new ge(xe.value))));if(e instanceof Av)return new ie(new ie(new ie(new ie(xe.value))));throw new Error("Failed pattern match at Livestream.Types.Reaction (line 20, column 1 - line 20, column 39): "+[e.constructor.name])}},m7=function(e){if(e instanceof bs)return"love-this";if(e instanceof Gv)return"helpful";if(e instanceof u_)return"not-helpful";if(e instanceof Mv)return"writing-down";if(e instanceof Av)return"funny";throw new Error("Failed pattern match at Livestream.Types.Reaction (line 51, column 17 - line 56, column 19): "+[e.constructor.name])},h7=function(e){return{authorTag:e.authorTag,kind:m7(e.kind)}},$ue=function(){return ta(Ye)({parse:In(m7)(Un(Wue)(Sy(Sy(Sy(Sy(_7)(p7))(Cy))(Cy))(Cy))(Fy(Fy(Fy(Fy(d7)))))(Cy)),default:bs.value,diagnosticName:"Livestream Reaction Kind"})}(),D7=function(e){return{authorTag:e.authorTag,kind:$ue(e.kind)}};var g7=typeof CV!="undefined"&&CV.pathInfo||typeof global!="undefined"&&global.CV&&global.CV.pathInfo||(e=>null);function R7(e,n){let a=typeof CV!="undefined"&&CV.apiEndpoint||typeof global!="undefined"&&global.CV&&global.CV.apiEndpoint;return a||console.error("Missing `CV.apiEndpoint` function"),a&&a(e,n)}function y7(e,n,a,t,o){return function(u,i){var l=e.newXHR(),s=e.fixupUrl(o.url,l);if(l.open(o.method||"GET",s,!0,o.username,o.password),o.headers)try{for(var R=0,d;(d=o.headers[R])!=null;R++)l.setRequestHeader(d.field,d.value)}catch(I){u(I)}var y=function(I){return function(){u(new Error(I))}};return l.onerror=y(a),l.ontimeout=y(n),l.onload=function(){i({status:l.status,statusText:l.statusText,headers:l.getAllResponseHeaders().split(`\r `).filter(function(I){return I.length>0}).map(function(I){var b=I.indexOf(":");return t(I.substring(0,b))(I.substring(b+2))}),body:l.response})},l.responseType=o.responseType,l.withCredentials=o.withCredentials,l.timeout=o.timeout,l.send(o.content),function(I,b,S){try{l.abort()}catch(L){return b(L)}return S()}}}var Gy="application/json",w7="application/x-www-form-urlencoded";var b7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),E7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),I7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),T7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),S7=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_C=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),My=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),C7=function(e){return e instanceof _C?new T(w7):e instanceof My?new T(Gy):M.value};var F7=function(){return My.create}();var G7=ba();var Ay=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ly=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dp=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}(),M7=function(e){if(e instanceof Ay||e instanceof Ly)return G7(e.value0);if(e instanceof dp)return e.value1;throw new Error("Failed pattern match at Affjax.RequestHeader (line 26, column 1 - line 26, column 33): "+[e.constructor.name])};var pC=function(e){if(e instanceof Ay)return"Accept";if(e instanceof Ly)return"Content-Type";if(e instanceof dp)return e.value0;throw new Error("Failed pattern match at Affjax.RequestHeader (line 21, column 1 - line 21, column 32): "+[e.constructor.name])};var A7=pn(dn),dC=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mC=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),hC=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Py=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ny=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),L7=function(e){if(e instanceof dC)return"arraybuffer";if(e instanceof mC)return"blob";if(e instanceof hC)return"document";if(e instanceof Py||e instanceof xy)return"text";if(e instanceof Ny)return"";throw new Error("Failed pattern match at Affjax.ResponseFormat (line 44, column 3 - line 50, column 19): "+[e.constructor.name])},P7=function(e){return e instanceof Py?new T(Gy):M.value},x7=function(){return new xy(A7)}();var N7=function(){return new Ny(A7)}();var j7=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 Vue=ba();var Zm=function(e){return Vue(Xg(e))};function O7(e,n,a){try{return n(JSON.parse(a))}catch(t){return e(t.message)}}var jy=function(e){return O7(Me.create,Le.create,e)};function U7(e){return e.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})}function k7(e,n,a){try{return n(U7(encodeURIComponent(a)))}catch(t){return e(t)}}function B7(e,n,a){try{return n(U7(encodeURIComponent(a)).replace(/%20/g,"+"))}catch(t){return e(t)}}var Oy=function(){return av(k7)(hn(M.value))(T.create)}();var Uy=function(){return av(B7)(hn(M.value))(T.create)}();var Que=Yn(hr),H7=k(ae),Kue=lo(xu)(aa);var Yue=function(e){return e};var q7=function(){var e=function(t){if(t.value1 instanceof M)return Uy(t.value0);if(t.value1 instanceof T)return Que(H7(function(o){return function(u){return o+("="+u)}})(Uy(t.value0)))(Uy(t.value1.value0));throw new Error("Failed pattern match at Data.FormURLEncoded (line 37, column 16 - line 39, column 114): "+[t.constructor.name])},n=H7(vr("&")),a=Kue(e);return function(t){return n(a(Yue(t)))}}();var DC=function(){function e(){}return e.value=new e,e}(),i_=function(){function e(){}return e.value=new e,e}(),gC=function(){function e(){}return e.value=new e,e}(),l_=function(){function e(){}return e.value=new e,e}(),ky=function(){function e(){}return e.value=new e,e}(),eh=function(){function e(){}return e.value=new e,e}(),RC=function(){function e(){}return e.value=new e,e}(),yC=function(){function e(){}return e.value=new e,e}(),wC=function(){function e(){}return e.value=new e,e}(),bC=function(){function e(){}return e.value=new e,e}(),EC=function(){function e(){}return e.value=new e,e}(),IC=function(){function e(){}return e.value=new e,e}(),TC=function(){function e(){}return e.value=new e,e}(),SC=function(){function e(){}return e.value=new e,e}(),CC=function(){function e(){}return e.value=new e,e}(),By=function(){function e(){}return e.value=new e,e}();var Xue=function(e){return e},Zue={show:function(e){if(e instanceof DC)return"OPTIONS";if(e instanceof i_)return"GET";if(e instanceof gC)return"HEAD";if(e instanceof l_)return"POST";if(e instanceof ky)return"PUT";if(e instanceof eh)return"DELETE";if(e instanceof RC)return"TRACE";if(e instanceof yC)return"CONNECT";if(e instanceof wC)return"PROPFIND";if(e instanceof bC)return"PROPPATCH";if(e instanceof EC)return"MKCOL";if(e instanceof IC)return"COPY";if(e instanceof TC)return"MOVE";if(e instanceof SC)return"LOCK";if(e instanceof CC)return"UNLOCK";if(e instanceof By)return"PATCH";throw new Error("Failed pattern match at Data.HTTP.Method (line 43, column 1 - line 59, column 23): "+[e.constructor.name])}};var J7=Ut(ne(Zue))(Xue);var W7={eq:function(e){return function(n){return e instanceof DC&&n instanceof DC||e instanceof i_&&n instanceof i_||e instanceof gC&&n instanceof gC||e instanceof l_&&n instanceof l_||e instanceof ky&&n instanceof ky||e instanceof eh&&n instanceof eh||e instanceof RC&&n instanceof RC||e instanceof yC&&n instanceof yC||e instanceof wC&&n instanceof wC||e instanceof bC&&n instanceof bC||e instanceof EC&&n instanceof EC||e instanceof IC&&n instanceof IC||e instanceof TC&&n instanceof TC||e instanceof SC&&n instanceof SC||e instanceof CC&&n instanceof CC||e instanceof By&&n instanceof By}}};var $7=function(e){return fv(function(n){return function(){var t=e(function(o){return n(Me.create(o))()},function(o){return n(Le.create(o))()});return function(o){return fv(function(u){return function(){return t(o,function(l){return u(Me.create(l))()},function(l){return u(Le.create(l))()}),RT}})}}})};var FC=W(Qc(cr)),eie=A0(cr),c_=Xc(cr),z7=ma(nR(iR)(cr)),nie=tf(Ff(cr)),Hy=k(ae),aie=ci(fn)(st),tie=we(Pt),rie=Ja(en),oie=k(ze),uie=pe(Ga),iie=Sf(Nr),lie=W(ca);var qy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Jy=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}(),Wy=function(){function e(){}return e.value=new e,e}(),$y=function(){function e(){}return e.value=new e,e}(),zy=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),V7=function(e){return function(n){var a=function(d){return d===""?FC(cj):Ut(function(y){return eie(um.create(y))})(FC)(jy(d))},t=function(){if(n.responseFormat instanceof dC)return c_("ArrayBuffer");if(n.responseFormat instanceof mC)return c_("Blob");if(n.responseFormat instanceof hC)return function(d){return z7(c_("Document")(d))(z7(c_("XMLDocument")(d))(c_("HTMLDocument")(d)))};if(n.responseFormat instanceof Py)return nie(function(d){return n.responseFormat.value0(a(d))})(c_("String"));if(n.responseFormat instanceof xy)return c_("String");if(n.responseFormat instanceof Ny)return hn(n.responseFormat.value0(FC(Ee)));throw new Error("Failed pattern match at Affjax (line 274, column 18 - line 283, column 57): "+[n.responseFormat.constructor.name])}(),o=function(d){if(d instanceof b7)return new Le(d.value0(so));if(d instanceof E7)return new Le(so(d.value0));if(d instanceof I7)return new Le(so(d.value0));if(d instanceof T7)return new Le(so(d.value0));if(d instanceof S7)return new Le(so(d.value0));if(d instanceof _C)return s0("Body contains values that cannot be encoded as application/x-www-form-urlencoded")(Hy(so)(q7(d.value0)));if(d instanceof My)return new Le(so(ZR(d.value0)));throw new Error("Failed pattern match at Affjax (line 235, column 20 - line 250, column 69): "+[d.constructor.name])},u=function(d){return function(y){return d instanceof T&&!aie(a0(tie)(pC)(d.value0))(y)?w0(y)(d.value0):y}},i=function(d){return u(Hy(Ly.create)(rie(C7)(d)))(u(Hy(Ay.create)(P7(n.responseFormat)))(n.headers))},l=function(d){return{method:J7(n.method),url:n.url,headers:oie(function(y){return{field:pC(y),value:M7(y)}})(i(n.content)),content:d,responseType:L7(n.responseFormat),username:Fa(n.username),password:Fa(n.password),withCredentials:n.withCredentials,timeout:ke(0)(Hy(function(y){return y})(n.timeout))}},s=function(d){return uie(iie($7(y7(e,"AffjaxTimeoutErrorMessageIdent","AffjaxRequestFailedMessageIdent",j7.create,l(d)))))(function(y){if(y instanceof Le){var I=Zm(t(y.value0.body));if(I instanceof Me)return new Me(new Jy(oP(I.value0),y.value0));if(I instanceof Le)return new Le({headers:y.value0.headers,status:y.value0.status,statusText:y.value0.statusText,body:I.value0});throw new Error("Failed pattern match at Affjax (line 209, column 9 - line 211, column 52): "+[I.constructor.name])}if(y instanceof Me)return new Me(function(){var b=S0(y.value0),S=b==="AffjaxTimeoutErrorMessageIdent";if(S)return Wy.value;var L=b==="AffjaxRequestFailedMessageIdent";return L?$y.value:new zy(y.value0)}());throw new Error("Failed pattern match at Affjax (line 207, column 144 - line 219, column 28): "+[y.constructor.name])})};if(n.content instanceof M)return s(Fa(M.value));if(n.content instanceof T){var R=o(n.content.value0);if(R instanceof Le)return s(Fa(new T(R.value0)));if(R instanceof Me)return lie(new Me(new qy(R.value0)));throw new Error("Failed pattern match at Affjax (line 199, column 7 - line 203, column 48): "+[R.constructor.name])}throw new Error("Failed pattern match at Affjax (line 195, column 3 - line 203, column 48): "+[n.content.constructor.name])}};var mp=function(){return{method:new Me(i_.value),url:"/",headers:[],content:M.value,username:M.value,password:M.value,withCredentials:!1,responseFormat:N7,timeout:M.value}}();var Q7={eq:function(e){return function(n){return e===n}}};var GC={newXHR:function(){return new XMLHttpRequest},fixupUrl:function(e){return e||"/"}};var K7=V7(GC);function Y7(e){return Buffer.from(e).toString("base64")}function X7(e,n,a){let t;try{t=n(btoa(a))}catch(o){t=e(o)}return t}var MC=typeof btoa=="function";function Z7(e){let n=32768,a=[];for(let t=0;t{let e=null,n=0,a=()=>{if(!bc||!bc.key)return bc||console.error("Pusher config is missing in global context"),new Gie;let t={auth:{headers:{"X-CSRF-Token":bc.authToken}},authEndpoint:bc.authPath,cluster:bc.cluster};return bc.dev&&Object.assign(t,{wsHost:bc.dev.wsHost,wsPort:bc.dev.wsPort,enabledTransports:["ws"],forceTLS:!1,disableStats:!0}),new dO.default(bc.key,t)};return{acquireConnection:()=>(e||(e=a(),n=0),n++,e),releaseConnection:()=>{--n<=0&&(e.disconnect(),e=null)}}})(),mO=e=>{let n=Cie().subscribe(e.channel);return n.bind(e.event,e.handler),()=>{n.unbind(e.event,e.handler),Fie()}};function Gie(){typeof document!="undefined"&&(document.mockPusher=this),this.localObject={},this.channels=[],this.disconnect=function(){document.mockPusher=null},this.subscribe=function(e){let n=this.channels.find(t=>t.name===e);if(n)return n;let a=new Mie(e);return this.channels.push(a),a},this.channelNames=function(){return this.channels.map(e=>e.name)}}function Mie(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 Aie=vi(yt),Lie=ko(rt)(Pu),Pie=pe(uj);var xie={show:function(e){return e}},Nie=ne(xie),Ky=_e,jie=function(e){var n=_s(e);return function(a){return function(t){return function(o){var u=Aie(["Pusher event ",t," over channel ",Nie(a)]),i=function(l){return Lie(n(u)(l))(o)()};return function(){return mO({channel:a,event:t,handler:i})}}}}},Ii=function(e){var n=jie(e);return function(a){var t=a.Monad0(),o=Z(t.Bind1()),u=Bn(a),i=W(t.Applicative0());return function(l){return function(s){return function(R){return o(u(n(l)(s)(R)))(function(d){return i(u(d))})}}}}},Oie=Ii(Lf),Yy=function(e){var n=Oie(e);return function(a){return function(t){return Pie(n(a)(t))(hn(Ee))}}};var hO=wc(Rc),gu=ql(hO),Ir=Z(_a),ah=ql(wc(hO)),DO=W(ca),Uie=pe(ae),th=Sa(),gO=B({reflectSymbol:function(){return"pollId"}})(on),kie=B({reflectSymbol:function(){return"status"}})(_e)(rn),Bie=wt(Ca(th(gO(kie)))),RO=k(ze),yO=k(Ga),Hie=B({reflectSymbol:function(){return"id"}}),qie=Hie(on),wO=th(B({reflectSymbol:function(){return"author"}})(th(B({reflectSymbol:function(){return"cvid"}})(_e)(B({reflectSymbol:function(){return"username"}})(_e)(rn))))(qie(B({reflectSymbol:function(){return"isFromHQ"}})(Ia)(B({reflectSymbol:function(){return"isPublic"}})(Ia)(B({reflectSymbol:function(){return"text"}})(_e)(B({reflectSymbol:function(){return"time"}})(_e)(rn))))))),Jie=Dp(wO);var Wie=Wa(_e);var $ie=Dp(Ca(th(gO(B({reflectSymbol:function(){return"responses"}})(th(B({reflectSymbol:function(){return"answered"}})(on)(B({reflectSymbol:function(){return"optionCounts"}})(Ca(on))(B({reflectSymbol:function(){return"seen"}})(on)(B({reflectSymbol:function(){return"skipped"}})(on)(rn))))))(rn))))),zie=Dp(Wie),Vie=Dp(Ca(wO));var PC=ah("livestreams_polls_status_path")(function(e){return function(n){return function(a){return Ir(e({id:n.id,status:Ey(a)}))(yc(function(t){return DO(ke([])(Uie(Bie(t))(RO(function(o){return{pollId:o.pollId,status:Qm(o.status)}}))))}))}}});var xC=ah("livestreams_polls_answer_path")(function(e){return function(n){return function(a){return Ir(e({id:n.id,options:a}))(Zt)}}}),bO=gu("livestreams_conferences_status_on_air_path")(function(e){return function(n){return Ir(e({conference_id:n}))(Zt)}}),EO=gu("livestreams_conferences_status_complete_path")(function(e){return function(n){return Ir(e({conference_id:n}))(Zt)}}),IO=gu("livestreams_cta_save_referral_path")(function(e){return function(n){return Ir(e(n))(Zt)}}),TO=gu("livestreams_polls_report_shown_path")(function(e){return function(n){return Ir(e({id:n.id}))(Zt)}}),SO=ah("livestreams_client_window_visibility_path")(function(e){return function(n){return function(a){return Ir(e({stream_id:n,visible:a.visible}))(Zt)}}}),CO=ah("livestreams_recording_watch_event_path")(function(e){return function(n){return function(a){return Ir(e({conference_id:n,current_time_minutes:a}))(Zt)}}}),FO=gu("livestreams_questions_visibility_path")(function(e){return function(n){return Ir(e({question_id:n.questionId,is_public:n.isPublic}))(Zt)}}),GO=gu("livestreams_questions_post_path")(function(e){return function(n){return Ir(e({conference_id:n.conferenceId,question_text:n.text,hq_broadcast:n.hqBroadcast}))(yc(function(a){return yO(o_)(Jie("Livestream question")(a))}))}}),MO=gu("livestreams_cta_open_path")(function(e){return function(n){return Ir(e({is_referral:!0,from_conference_id:n.fromConference,id:n.ctaId}))(Zt)}}),AO=gu("livestreams_cta_open_path")(function(e){return function(n){return Ir(e({is_general:!0,from_conference_id:n.fromConference,id:n.ctaId}))(Zt)}}),LO=gu("livestreams_cta_open_path")(function(e){return function(n){return Ir(e({is_featured_service_providers:!0,from_conference_id:n.fromConference,id:n.ctaId}))(Zt)}}),PO=gu("livestreams_cta_open_path")(function(e){return function(n){return Ir(e({is_event:!0,from_conference_id:n.fromConference,cta_conference_id:n.cta}))(Zt)}}),Xy=gu("livestreams_register_path")(function(e){return function(n){return Ir(e({from_conference_id:Fa(n.fromConference),register_for_conference_id:n.registerForConference,utm_cv_source:n.utmSource}))(Zt)}});var xO=ah("livestreams_reactions_launch_path")(function(e){return function(n){return function(a){return Ir(e({conference_id:n,reaction:h7(a)}))(Zt)}}}),NO=gu("livestreams_polls_responses_path")(function(e){return function(n){return Ir(e({conference_id:n}))(yc($ie("livestream poll responses")))}}),jO=gu("livestreams_conferences_download_url_path")(function(e){return function(n){return Ir(e({conference_id:n}))(yc(function(a){return yO(fe)(zie("Livestream download URL")(a))}))}}),Zy=ql(Rc)("livestreams_dismiss_network_settings_modal_path")(function(e){return Ir(e({}))(Zt)});var OO=gu("livestreams_conferences_ban_user_path")(function(e){return function(n){return Ir(e({conference_id:n.conferenceId,user_cvid:n.userCvid}))(Zt)}}),ew=gu("livestreams_questions_all_path")(function(e){return function(n){return Ir(e({conference_id:n}))(yc(function(a){return Ir(Vie("Livestream questions")(a))(function(t){return DO(RO(o_)(t))})}))}});var jC=function(){function e(){}return e.value=new e,e}(),OC=function(){function e(){}return e.value=new e,e}(),UC=function(){function e(){}return e.value=new e,e}(),kC=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}(),qC=function(){function e(){}return e.value=new e,e}(),JC=function(){function e(){}return e.value=new e,e}(),WC=function(){function e(){}return e.value=new e,e}(),$C=function(){function e(){}return e.value=new e,e}(),zC=function(){function e(){}return e.value=new e,e}(),VC=function(){function e(){}return e.value=new e,e}(),QC=function(){function e(){}return e.value=new e,e}(),KC=function(){function e(){}return e.value=new e,e}(),Nt=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),YC=function(){function e(){}return e.value=new e,e}();var aw=function(e){if(e instanceof Nt&&e.value0 instanceof jC)return"architecture";if(e instanceof Nt&&e.value0 instanceof UC)return"chemistry";if(e instanceof Nt&&e.value0 instanceof OC)return"business";if(e instanceof Nt&&e.value0 instanceof kC)return"computer-science";if(e instanceof Nt&&e.value0 instanceof BC)return"criminal-justice-and-corrections";if(e instanceof Nt&&e.value0 instanceof HC)return"economics";if(e instanceof Nt&&e.value0 instanceof qC)return"engineering";if(e instanceof Nt&&e.value0 instanceof JC)return"english";if(e instanceof Nt&&e.value0 instanceof WC)return"film";if(e instanceof Nt&&e.value0 instanceof $C)return"finance";if(e instanceof Nt&&e.value0 instanceof zC)return"history";if(e instanceof Nt&&e.value0 instanceof VC)return"political-science";if(e instanceof Nt&&e.value0 instanceof QC)return"pre-med";if(e instanceof Nt&&e.value0 instanceof KC)return"psychology";if(e instanceof YC)return"overall";throw new Error("Failed pattern match at Hub.Ranking (line 98, column 8 - line 113, column 23): "+[e.constructor.name])};var tw=function(){function e(){}return e.value=new e,e}(),Zie=function(){function e(){}return e.value=new e,e}(),ele=function(){function e(){}return e.value=new e,e}();var UO=function(e){if(e instanceof tw)return M.value;if(e instanceof ele)return new T("open");if(e instanceof Zie)return new T("on");throw new Error("Failed pattern match at Hub.Types.WhatificatorPhase (line 26, column 13 - line 29, column 22): "+[e.constructor.name])};var qO=St();var v_=function(e){return function(n){var a=function(){var u=Yc("?")(n);return u?"&":"?"}(),t=qO(Oy(e.value)),o=qO(Oy(e.key));return n+(a+(o+("="+t)))}};var ble=function(){function e(){}return e.value=new e,e}(),Ele=function(){function e(){}return e.value=new e,e}(),Ile=function(){function e(){}return e.value=new e,e}(),Tle=function(){function e(){}return e.value=new e,e}(),Sle=function(){function e(){}return e.value=new e,e}(),Cle=function(){function e(){}return e.value=new e,e}(),Fle=function(){function e(){}return e.value=new e,e}(),Gle=function(){function e(){}return e.value=new e,e}(),Mle=function(){function e(){}return e.value=new e,e}(),Ale=function(){function e(){}return e.value=new e,e}(),Lle=function(){function e(){}return e.value=new e,e}(),Ple=function(){function e(){}return e.value=new e,e}(),xle=function(){function e(){}return e.value=new e,e}(),Nle=function(){function e(){}return e.value=new e,e}(),jle=function(){function e(){}return e.value=new e,e}(),Ole=function(){function e(){}return e.value=new e,e}(),Ule=function(){function e(){}return e.value=new e,e}(),kle=function(){function e(){}return e.value=new e,e}(),Ble=function(){function e(){}return e.value=new e,e}(),Hle=function(){function e(){}return e.value=new e,e}(),qle=function(){function e(){}return e.value=new e,e}(),Jle=function(){function e(){}return e.value=new e,e}(),Wle=function(){function e(){}return e.value=new e,e}(),$le=function(){function e(){}return e.value=new e,e}(),zle=function(){function e(){}return e.value=new e,e}(),Vle=function(){function e(){}return e.value=new e,e}(),Qle=function(){function e(){}return e.value=new e,e}(),Kle=function(){function e(){}return e.value=new e,e}(),Yle=function(){function e(){}return e.value=new e,e}(),Xle=function(){function e(){}return e.value=new e,e}(),Zle=function(){function e(){}return e.value=new e,e}(),ece=function(){function e(){}return e.value=new e,e}(),nce=function(){function e(){}return e.value=new e,e}(),ace=function(){function e(){}return e.value=new e,e}(),tce=function(){function e(){}return e.value=new e,e}(),rce=function(){function e(){}return e.value=new e,e}(),oce=function(){function e(){}return e.value=new e,e}(),uce=function(){function e(){}return e.value=new e,e}(),ice=function(){function e(){}return e.value=new e,e}(),lce=function(){function e(){}return e.value=new e,e}(),cce=function(){function e(){}return e.value=new e,e}(),sce=function(){function e(){}return e.value=new e,e}(),vce=function(){function e(){}return e.value=new e,e}(),fce=function(){function e(){}return e.value=new e,e}(),_ce=function(){function e(){}return e.value=new e,e}(),pce=function(){function e(){}return e.value=new e,e}(),dce=function(){function e(){}return e.value=new e,e}(),mce=function(){function e(){}return e.value=new e,e}(),hce=function(){function e(){}return e.value=new e,e}(),Dce=function(){function e(){}return e.value=new e,e}(),gce=function(){function e(){}return e.value=new e,e}(),Rce=function(){function e(){}return e.value=new e,e}(),yce=function(){function e(){}return e.value=new e,e}(),wce=function(){function e(){}return e.value=new e,e}(),bce=function(){function e(){}return e.value=new e,e}(),Ece=function(){function e(){}return e.value=new e,e}();var sa=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ru=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var JO=function(e){if(e instanceof sa&&e.value0 instanceof ble)return"AcceptanceRate";if(e instanceof sa&&e.value0 instanceof Ele)return"AcceptanceRateMen";if(e instanceof sa&&e.value0 instanceof Ile)return"AcceptanceRateWomen";if(e instanceof sa&&e.value0 instanceof Tle)return"Address";if(e instanceof sa&&e.value0 instanceof Sle)return"AdmissionChances";if(e instanceof sa&&e.value0 instanceof Cle)return"AdmissionDifficulty";if(e instanceof sa&&e.value0 instanceof Fle)return"AdmissionsNotificationDate";if(e instanceof sa&&e.value0 instanceof Gle)return"AdmissionsWebsite";if(e instanceof sa&&e.value0 instanceof Mle)return"AppDeadlineIsRolling";if(e instanceof sa&&e.value0 instanceof Ale)return"ApplicationEffort";if(e instanceof sa&&e.value0 instanceof Lle)return"ApplicationRound";if(e instanceof sa&&e.value0 instanceof Ple)return"BasketballConference";if(e instanceof sa&&e.value0 instanceof xle)return"CampusSetting";if(e instanceof sa&&e.value0 instanceof Nle)return"City";if(e instanceof sa&&e.value0 instanceof jle)return"ClassRank";if(e instanceof sa&&e.value0 instanceof Ole)return"CoEdSingleSex";if(e instanceof sa&&e.value0 instanceof Ule)return"CollegeType";if(e instanceof sa&&e.value0 instanceof kle)return"CommuterCollege";if(e instanceof sa&&e.value0 instanceof Ble)return"Diversity";if(e instanceof sa&&e.value0 instanceof Hle)return"DropoutRate";if(e instanceof sa&&e.value0 instanceof Jle)return"FinancialAidWebsite";if(e instanceof sa&&e.value0 instanceof Wle)return"FirstYearEnrollment";if(e instanceof sa&&e.value0 instanceof $le)return"FootballConference";if(e instanceof sa&&e.value0 instanceof zle)return"FourYearGraduationRate";if(e instanceof sa&&e.value0 instanceof Vle)return"HasDivisionOneBasketball";if(e instanceof sa&&e.value0 instanceof Qle)return"HasDivisionOneFootball";if(e instanceof sa&&e.value0 instanceof Kle)return"HasMedicalSchool";if(e instanceof sa&&e.value0 instanceof Yle)return"HasStudyAbroad";if(e instanceof sa&&e.value0 instanceof Xle)return"HBCU";if(e instanceof sa&&e.value0 instanceof Zle)return"InListStatus";if(e instanceof sa&&e.value0 instanceof ece)return"MainWebsite";if(e instanceof sa&&e.value0 instanceof qle)return"Majors";if(e instanceof sa&&e.value0 instanceof nce)return"Name";if(e instanceof sa&&e.value0 instanceof ace)return"NetCostEstimate";if(e instanceof sa&&e.value0 instanceof tce)return"Notes";if(e instanceof sa&&e.value0 instanceof rce)return"PercentInternationalStudents";if(e instanceof sa&&e.value0 instanceof oce)return"Phone";if(e instanceof sa&&e.value0 instanceof uce)return"Photo";if(e instanceof sa&&e.value0 instanceof ice)return"Prestige";if(e instanceof sa&&e.value0 instanceof lce)return"ProgramLength";if(e instanceof sa&&e.value0 instanceof cce)return"PublicPrivate";if(e instanceof sa&&e.value0 instanceof sce)return"RecommendationLetters";if(e instanceof sa&&e.value0 instanceof vce)return"Region";if(e instanceof sa&&e.value0 instanceof fce)return"ReligiousAffiliation";if(e instanceof sa&&e.value0 instanceof _ce)return"SatActDeadline";if(e instanceof sa&&e.value0 instanceof pce)return"SatActTestPolicy";if(e instanceof sa&&e.value0 instanceof dce)return"SatSubjectTestDeadline";if(e instanceof sa&&e.value0 instanceof mce)return"SixYearGraduationRate";if(e instanceof sa&&e.value0 instanceof hce)return"State";if(e instanceof sa&&e.value0 instanceof Dce)return"StudentFacultyRatio";if(e instanceof sa&&e.value0 instanceof gce)return"SubmissionDeadline";if(e instanceof sa&&e.value0 instanceof Rce)return"TOEFLPolicy";if(e instanceof sa&&e.value0 instanceof yce)return"TotalUndergrads";if(e instanceof sa&&e.value0 instanceof wce)return"TuitionInState";if(e instanceof sa&&e.value0 instanceof bce)return"TuitionOutOfState";if(e instanceof sa&&e.value0 instanceof Ece)return"YieldRate";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof jC)return"RankingArchitecture";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof OC)return"RankingBusiness";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof UC)return"RankingChemistry";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof kC)return"RankingComputerScience";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof BC)return"RankingCriminalJusticeAndCorrections";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof HC)return"RankingEconomics";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof qC)return"RankingEngineering";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof JC)return"RankingEnglish";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof WC)return"RankingFilm";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof $C)return"RankingFinance";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof zC)return"RankingHistory";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof VC)return"RankingPoliticalScience";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof QC)return"RankingPreMed";if(e instanceof Ru&&e.value0 instanceof Nt&&e.value0.value0 instanceof KC)return"RankingPsychology";if(e instanceof Ru&&e.value0 instanceof YC)return"OverallRanking";throw new Error("Failed pattern match at Hub.Facet (line 309, column 6 - line 380, column 43): "+[e.constructor.name])};var Ice=function(){function e(){}return e.value=new e,e}(),Tce=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Sce=function(){function e(){}return e.value=new e,e}();var WO=function(e){if(e instanceof Ice)return"filters";if(e instanceof Tce)return"filter:"+JO(e.value0);if(e instanceof Sce)return"rankings";throw new Error("Failed pattern match at Hub.Visuals.MobileOverlay (line 40, column 26 - line 43, column 39): "+[e.constructor.name])};function $O(e,n){typeof CV!="undefined"&&CV.tracking&&CV.tracking.event(e,n)}var Cce=Ou();var Es=function(e){var n=Bn(e);return function(a){return function(t){return n(function(){return $O(a,t)})}}},Is=function(e){var n=Es(e);return function(){return function(a){return function(t){return n(a)(Cce(t))}}}};var rh=function(){function e(){}return e.value=new e,e}(),Lv=function(){function e(){}return e.value=new e,e}(),oh=function(){function e(){}return e.value=new e,e}(),tse=function(){function e(){}return e.value=new e,e}(),QO=function(e){if(e instanceof rh)return"modal-sm";if(e instanceof Lv)return"";if(e instanceof oh)return"modal-lg";if(e instanceof tse)return"modal-xl";throw new Error("Failed pattern match at Bootstrap.Modal.Size (line 14, column 13 - line 18, column 27): "+[e.constructor.name])};$a();var rse=["selectionchange","visibilitychange","keyup","keydown"],ose=["resize","mouseup","mousemove","hashchange","popstate","message"],ZC=class extends ka.Component{constructor(){super();let n=a=>{let t={};return a.forEach(o=>{t[o]=u=>{let i=this.props[o];i&&i(u)}}),t};this.handleWindow=n(ose),this.handleDocument=n(rse)}componentDidMount(){let n=(a,t)=>Object.keys(t).forEach(o=>a.addEventListener(o,t[o]));n(window,this.handleWindow),n(document,this.handleDocument)}componentWillUnmount(){let n=(a,t)=>Object.keys(t).forEach(o=>a.removeEventListener(o,t[o]));n(window,this.handleWindow),n(document,this.handleDocument)}render(){return null}};var use=mv(),Ts=function(){return function(){return use(ZC)}};var ow=function(){return Je};var Rp=Te(We),eF=Vr(),ise=or(We)()(),lse=or(me)()(),cse=Te(me),sse=Wn(Y)()(),vse=sr(zo),fse=lr(rt),KO=ow(),_se=Ts()(),pse=sr(gv),Jl=function(){return function(e){var n=Rp("modal-backdrop fade show")($n),a=eF(e),t=ll(a.footer),o=ll(a.header),u=Ka(a.size)(Lv.value),i=vr(" ")([function(){var s=Ka(a.scrollable)(!0);return s?"modal-dialog-scrollable":""}(),function(){var s=Ka(a.centered)(!0);return s?"modal-dialog-centered":""}(),QO(u),Ka(a.dialogClass)("")]),l=Rp("modal fade show d-block")(ise("modal-dialog "+i)({style:Ka(a.dialogStyle)(ot({}))})(lse("modal-content "+Ka(a.contentClass)(""))({style:Ka(a.contentStyle)(ot({}))})([da(o)(Rp("modal-header "+Ka(a.headerClass)(""))),Rp("modal-body "+Ka(a.bodyClass)(""))(a.body),da(t)(Rp("modal-footer "+Ka(a.footerClass)("")))])));return Se([l,n])}},nF=Jl(),Wl=function(){return function(e){var n=eF(e),a=cse("d-flex w-100 justify-content-between align-items-center")([Rp("mr-4")(Ka(n.title)($n)),sse("btn btn-link large mr-n3 py-0 fe fe-x t--close "+Ka(n.dismissButtonClass)("text-body"))({type:"button",onClick:vse(n.onDismiss)})("")]),t=function(o){return fse(o.key==="Escape")(n.onDismiss)};return Se([function(){var o=Ka(n.bodyScrollable)(!1);return nF(o?function(){var u=eF(KO(n));return{body:u.body,bodyClass:u.bodyClass,centered:u.centered,contentClass:u.contentClass,contentStyle:u.contentStyle,dialogClass:u.dialogClass,dialogStyle:u.dialogStyle,footer:u.footer,footerClass:u.footerClass,headerClass:u.headerClass,scrollable:u.scrollable,size:u.size,header:a}}():KO({bodyClass:n.bodyClass,bodyScrollable:n.bodyScrollable,centered:n.centered,contentClass:n.contentClass,contentStyle:n.contentStyle,dialogClass:n.dialogClass,dialogStyle:n.dialogStyle,dismissButtonClass:n.dismissButtonClass,footer:n.footer,footerClass:n.footerClass,headerClass:n.headerClass,onDismiss:n.onDismiss,scrollable:n.scrollable,size:n.size,title:n.title,body:Se([a,n.body])}))}(),_se({keyup:pse(t)})])}},yp=function(e){var n=Am(e);return function(a){return function(t){return nF({bodyClass:a,body:Se(n(t))})}}};var uh="";function YO(e){var n=e.split(` `);return n.reduce(function(a,t){var o=hse(t)||gse(t)||wse(t)||Tse(t)||Ese(t);return o&&a.push(o),a},[])}var dse=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,mse=/\((\S*)(?::(\d+))(?::(\d+))\)/;function hse(e){var n=dse.exec(e);if(!n)return null;var a=n[2]&&n[2].indexOf("native")===0,t=n[2]&&n[2].indexOf("eval")===0,o=mse.exec(n[2]);return t&&o!=null&&(n[2]=o[1],n[3]=o[2],n[4]=o[3]),{file:a?null:n[2],methodName:n[1]||uh,arguments:a?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var Dse=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function gse(e){var n=Dse.exec(e);return n?{file:n[2],methodName:n[1]||uh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}var Rse=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,yse=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function wse(e){var n=Rse.exec(e);if(!n)return null;var a=n[3]&&n[3].indexOf(" > eval")>-1,t=yse.exec(n[3]);return a&&t!=null&&(n[3]=t[1],n[4]=t[2],n[5]=null),{file:n[3],methodName:n[1]||uh,arguments:n[2]?n[2].split(","):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var bse=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Ese(e){var n=bse.exec(e);return n?{file:n[3],methodName:n[1]||uh,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}:null}var Ise=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Tse(e){var n=Ise.exec(e);return n?{file:n[2],methodName:n[1]||uh,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null}function XO({skipFrames:e,prefix:n}){let a=new Error().stack,o=YO(a)[e],u=ZO(o.file.replace(/^(http(s?):\/\/)?[^\/]+/,"")),i=ZO(o.methodName);return`${n}_${u}_${i}_${o.lineNumber}_${o.column}`}var ZO=e=>e.replace(/[^\d\w]+/g,"_").replace(/(^_|_$)/g,"");var Sse=W(yn),Cse=pn(dn),aF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var Fse=function(e){return ON(XO(e))},f_=function(e){return new aF(function(n){return n(e)})},uw=function(e){return function(n){return new aF(function(a){return hv(e)(n)(a)})}},Gse=function(e){return function(n){return hv(e)(function(a){return{init:Sse(Ee),update:hn(o0),view:hn(hn(n.value0(Cse)))}})(Ee)}};var iw=function(e){var n=Fse({skipFrames:3,prefix:"HooksComponent"});return Gse(n)(e)},Pv=function(){return function(e){return function(n){return new aF(function(a){return e.value0(function(t){var o=n(t);return o.value0(a)})})}}},Mse=Pv(),tF=function(e){return function(){return Mse}};var eU=W(yn),Lse=pn(dn);var Pse=function(e){return function(n){return function(a){return uw(e)(function(t){return n({init:eU(a),update:function(o){return function(u){return eU(u)}},view:d0(t)})})}}},Ss=function(e){return Pse("UseState")(Lse)(e)};var xse=Vr(),Nse=pn(dn),jse=np(me)()(),Ose=Wn(We)()(),Use=fo()();var lw="login",rF=function(){return function(e){var n=xse(e),a=function(){var u=Ka(n.auth0ActiveTab)(lw);return u}(),t=ke({path:"",token:""})(Vy("login_path")),o=function(u){return function(i){return bn(Nse)(function(l){return v_(function(s){return{key:u,value:s}}(l))})(ll(i))}};return jse("d-inline")({method:"post",action:o("origin")(n.origin)(o("login_hint")(n.auth0LoginHint)(v_({key:"screen_hint",value:a})(t.path))),target:function(){var u=Ka(n.openInNewTab)(!1);return u?"_blank":""}()})([Ose(Ka(n.className)("btn btn-primary px-4"))({type:"submit",disabled:Ka(n.disabled)(!1)})(Ka(n.content)(Ke(Ka(n.text)("Log in")))),Use("")({type:"hidden",name:"authenticity_token",value:t.token})])}};var oF=typeof CV!="undefined"&&CV.assetsRoot||typeof global!="undefined"&&global.CV&&global.CV.assetsRoot||"/";var uF=zc(Uo(st)),kse=pn(dn),Bse=al()(),cw=function(e){var n=fi(e);return function(a){return Ct(n(a))}},Hse=function(e){if(uF(cw("http://"))(uF(cw("https://"))(uF(cw("//"))(cw("blob:"))))(e))return e;if($e)return oF+ke(e)(fi("/")(e));throw new Error("Failed pattern match at Utils.AppAssets (line 47, column 1 - line 47, column 30): "+[e.constructor.name])},yu=function(){return function(){return function(e){return function(n){var a=function(o){return kse},t=a(n)(P0("src")(Hse(n.src))(n));return Bse(e)(t)}}}};var __=function(e){return function(n){return function(){return n[e]}}},qse=__("URL"),Jse=__("documentURI"),Wse=__("origin"),$se=__("compatMode"),zse=__("characterSet"),Vse=__("contentType");var Qse=__("documentElement");var sw=function(e){return function(n){return n[e]}},Yse=sw("namespaceURI"),Xse=sw("prefix"),Zse=sw("localName"),eve=sw("tagName");function iF(e){return function(){return e.id}}function lF(e){return function(){return e.classList}}function cF(e){return function(){var n=e.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height,x:n.x,y:n.y}}}var sF=Je;var aU=Tn("Element");var $l=function(e){return function(n){return function(){return n[e]}}};var ave=$l("baseURI"),tve=$l("ownerDocument"),tU=$l("parentNode"),rve=$l("parentElement");var ove=$l("childNodes"),uve=$l("firstChild"),ive=$l("lastChild"),lve=$l("previousSibling"),cve=$l("nextSibling"),sve=$l("nodeValue");var vve=$l("textContent");function vF(e){return function(n){return function(){return e.isEqualNode(n)}}}var pve=k(zn);var rU=function(){var e=pve(fe);return function(n){return e(tU(n))}}();var dve=JSON.stringify;var d_=function(){function e(){}return e.value=new e,e}(),oU=function(){function e(){}return e.value=new e,e}(),uU=function(){function e(){}return e.value=new e,e}(),ih=function(){function e(){}return e.value=new e,e}(),iU=function(){function e(){}return e.value=new e,e}(),lU=function(){function e(){}return e.value=new e,e}(),cU=function(){function e(){}return e.value=new e,e}();var vw=function(e){if(e instanceof d_)return M.value;if(e instanceof oU)return new T("for-you");if(e instanceof uU)return new T("chancing");if(e instanceof ih)return new T("finances");if(e instanceof iU)return new T("majors");if(e instanceof lU)return new T("admission-requirements");if(e instanceof cU)return new T("essay-prompts");throw new Error("Failed pattern match at SchoolDetails.Types (line 96, column 14 - line 103, column 39): "+[e.constructor.name])};var sU=Ja(tr);var vU=function(e){return sU(QS(e))(sU(sp)(Yu))};var fF=pe(ae);var _F=Lu(fn)(yt),gve=ba(),Rve=ui(ae),pF=function(e){return"/schools/"+e.slug},dF="/schools/hub";var fU=function(e){return function(n){var a=fF(UO(n.whatificator))(function(l){return"simulator="+l}),t=fF(n.mobileOverlay)(function(l){return"overlay="+WO(l)}),o=vr("&")(Jo([t,a])),u=fF(n.focusedSchool)(function(l){return _F("/")(Jo([new T(gve(l.slug)),vw(l.tab)]))}),i=function(){return e.knownSeoState instanceof T&&n.seoView?_F("/")(Jo([new T(pF({slug:e.knownSeoState.value0.slug})),u])):_F("/")(Jo([new T(dF),new T(bn(e.basePath)(aw)(n.ranking)),Rve(u)("d"),u]))}();return i+(function(){var l=o==="";return l?"":"?"}()+o)}};var _U="/profile";var wve=ba();var mF=function(e){return function(n){return vr("/")(Jo([new T("/schools"),new T(wve(n)),vw(e)]))}},pU=_U,dU="/livestreams/upcoming";var bve=function(e){return fU({basePath:"all",knownSeoState:M.value})({ranking:M.value,focusedSchool:e,mobileOverlay:M.value,seoView:!1,whatificator:tw.value})};var fw=function(e){return function(n){return bve(new T({tab:e,slug:n}))}};var mU=function(){function e(){}return e.value=new e,e}(),hU=function(){function e(){}return e.value=new e,e}(),_w=function(){function e(){}return e.value=new e,e}(),pw=function(){function e(){}return e.value=new e,e}(),DU=function(){function e(){}return e.value=new e,e}(),gU=function(){function e(){}return e.value=new e,e}(),RU=function(){function e(){}return e.value=new e,e}(),yU=function(e){if(e instanceof mU)return"avatar-xxs";if(e instanceof hU)return"avatar-xs";if(e instanceof _w)return"avatar-sm";if(e instanceof pw)return"";if(e instanceof DU)return"avatar-lg";if(e instanceof gU)return"avatar-xl";if(e instanceof RU)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 wU={show:ba()};var Eve=Number.MAX_SAFE_INTEGER;var DF=function(e){if(e.first==="")return e.last;if(e.last==="")return e.first;if($e)return e.first+(" "+e.last);throw new Error("Failed pattern match at Profile.Types.Name (line 11, column 1 - line 11, column 27): "+[e.constructor.name])};var Bve=we(Iy);var EU={show:function(e){return e}};var IU=function(e){return Bve(e.publishScope)(bi.value)};var wp=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),gF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),EF=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var IF=ne(wU);var Hve=ne(a4),TU=ne(xj),qve=ne(EU),Jve="/messages";var TF=function(e){return Jve+("/"+function(){if(e instanceof wp)return"admission-officer/"+Hve(e.value0);if(e instanceof gF)return"school/"+TU(e.value0);if(e instanceof RF)return"student/"+qve(e.value0);if(e instanceof yF)return"high-school/"+IF(e.value0);if(e instanceof wF)return"service-provider/"+IF(e.value0);if(e instanceof bF)return"parent/"+IF(e.value0);if(e instanceof EF)return"recruiter/"+TU(e.value0);throw new Error("Failed pattern match at DirectMessages.Urls (line 28, column 48 - line 35, column 63): "+[e.constructor.name])}())};var Wve=ql(wc(Rc)),$ve=Z(_a),SU=pe(ae),CU=ba(),zve=It(Ga);var FU=Wve("network_connections_invite_school_path")(function(e){return function(n){return $ve(e({school_id:n.schoolId,message:Fa(n.introMessage),sem_user_id:Fa(SU(n.semUserId)(CU)),livestream_id:Fa(SU(n.livestreamId)(CU))}))(Zt)}}),GU=function(e){return function(n){return zve(FU({schoolId:e,introMessage:M.value,semUserId:M.value,livestreamId:new T(n)}))}};var MU=function(e){return function(n){return function(a){return FU({schoolId:e,introMessage:new T(a.introMessage),semUserId:new T(n),livestreamId:M.value})}}};$a();function ho(){return ho=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&(a[o]=e[o]);return a}function xv(e,n){if(e==null)return{};var a=SF(e,n),t,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(a[t]=e[t]))}return a}$a();$a();function m_(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function LU(e,n){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:1;NU+=1;var a=NU;function t(o){if(o===0)jU(a),e();else{var u=PU(function(){t(o-1)});GF.set(a,u)}}return t(n),a}Ti.cancel=function(e){var n=GF.get(e);return jU(n),xU(n)};function R_(e,n){return e?e.contains(n):!1}function sh(e){return e instanceof HTMLElement?e:gi.findDOMNode(e)}var HU=Cu(BU());$a();function PF(e,n){typeof e=="function"?e(n):eo(e)==="object"&&e&&"current"in e&&(e.current=n)}function Iw(){for(var e=arguments.length,n=new Array(e),a=0;ae.length)&&(n=e.length);for(var a=0,t=new Array(n);a1&&arguments[1]!==void 0?arguments[1]:2;n();var u=Ti(function(){o<=1?t({isCanceled:function(){return u!==e.current}}):a(t,o-1)});e.current=u}return Gt(function(){return function(){n()}},[]),[a,n]};$a();var tfe=Ec()?Em:Gt,Aw=tfe;var e6=[pl,Cs,Ov,Mw],qF=!1,n6=!0;function Lw(e){return e===Ov||e===Mw}var a6=function(e,n){var a=Fs(HF),t=At(a,2),o=t[0],u=t[1],i=ZU(),l=At(i,2),s=l[0],R=l[1];function d(){u(pl,!0)}return Aw(function(){if(o!==HF&&o!==Mw){var y=e6.indexOf(o),I=e6[y+1],b=n(o);b===qF?u(I,!0):s(function(S){function L(){S.isCanceled()||u(I,!0)}b===!0?L():Promise.resolve(b).then(L)})}},[e,o]),Gt(function(){return function(){R()}},[]),[d,o]};$a();$a();var t6=function(e){var n=lt(),a=lt(e);a.current=e;var t=bm(function(i){a.current(i)},[]);function o(i){i&&(i.removeEventListener(kF,t),i.removeEventListener(UF,t))}function u(i){n.current&&n.current!==i&&o(n.current),i&&i!==n.current&&(i.addEventListener(kF,t),i.addEventListener(UF,t),n.current=i)}return Gt(function(){return function(){o(n.current)}},[]),[u,o]};function JF(e,n,a,t){var o=t.motionEnter,u=o===void 0?!0:o,i=t.motionAppear,l=i===void 0?!0:i,s=t.motionLeave,R=s===void 0?!0:s,d=t.motionDeadline,y=t.motionLeaveImmediately,I=t.onAppearPrepare,b=t.onEnterPrepare,S=t.onLeavePrepare,L=t.onAppearStart,O=t.onEnterStart,$=t.onLeaveStart,z=t.onAppearActive,ee=t.onEnterActive,oe=t.onLeaveActive,te=t.onAppearEnd,ve=t.onEnterEnd,Re=t.onLeaveEnd,nn=t.onVisibleChanged,cn=Fs(),ce=At(cn,2),le=ce[0],Ne=ce[1],Ce=Fs(jv),Be=At(Ce,2),Xe=Be[0],Sn=Be[1],ra=Fs(null),kn=At(ra,2),Hn=kn[0],Kn=kn[1],qn=lt(!1),ft=lt(null);function Oe(){return a()}var ua=lt(!1);function Ta(ut){var q=Oe();if(!(ut&&!ut.deadline&&ut.target!==q)){var K=ua.current,j;Xe===vh&&K?j=te==null?void 0:te(q,ut):Xe===fh&&K?j=ve==null?void 0:ve(q,ut):Xe===_h&&K&&(j=Re==null?void 0:Re(q,ut)),Xe!==jv&&K&&j!==!1&&(Sn(jv,!0),Kn(null,!0))}}var En=t6(Ta),gn=At(En,1),He=gn[0],ea=Im(function(){var ut,q,K;switch(Xe){case vh:return ut={},Yo(ut,pl,I),Yo(ut,Cs,L),Yo(ut,Ov,z),ut;case fh:return q={},Yo(q,pl,b),Yo(q,Cs,O),Yo(q,Ov,ee),q;case _h:return K={},Yo(K,pl,S),Yo(K,Cs,$),Yo(K,Ov,oe),K;default:return{}}},[Xe]),va=a6(Xe,function(ut){if(ut===pl){var q=ea[pl];return q?q(Oe()):qF}if(sn in ea){var K;Kn(((K=ea[sn])===null||K===void 0?void 0:K.call(ea,Oe(),null))||null)}return sn===Ov&&(He(Oe()),d>0&&(clearTimeout(ft.current),ft.current=setTimeout(function(){Ta({deadline:!0})},d))),n6}),La=At(va,2),_t=La[0],sn=La[1],ia=Lw(sn);ua.current=ia,Aw(function(){Ne(n);var ut=qn.current;if(qn.current=!0,!!e){var q;!ut&&n&&l&&(q=vh),ut&&n&&u&&(q=fh),(ut&&!n&&R||!ut&&y&&!n&&R)&&(q=_h),q&&(Sn(q),_t())}},[n]),Gt(function(){(Xe===vh&&!l||Xe===fh&&!u||Xe===_h&&!R)&&Sn(jv)},[l,u,R]),Gt(function(){return function(){qn.current=!1,clearTimeout(ft.current)}},[]);var bt=lt(!1);Gt(function(){le&&(bt.current=!0),le!==void 0&&Xe===jv&&((bt.current||le)&&(nn==null||nn(le)),bt.current=!0)},[le,Xe]);var Da=Hn;return ea[pl]&&sn===Cs&&(Da=Ea({transition:"none"},Da)),[Xe,sn,Da,le!=null?le:n]}$a();var rfe=function(e){D_(a,e);var n=g_(a);function a(){return m_(this,a),n.apply(this,arguments)}return h_(a,[{key:"render",value:function(){return this.props.children}}]),a}(Bf),r6=rfe;function ofe(e){var n=e;eo(e)==="object"&&(n=e.transitionSupport);function a(o){return!!(o.motionName&&n)}var t=Di(function(o,u){var i=o.visible,l=i===void 0?!0:i,s=o.removeOnLeave,R=s===void 0?!0:s,d=o.forceRender,y=o.children,I=o.motionName,b=o.leavedClassName,S=o.eventProps,L=a(o),O=lt(),$=lt();function z(){try{return O.current instanceof HTMLElement?O.current:sh($.current)}catch{return null}}var ee=JF(L,l,z,o),oe=At(ee,4),te=oe[0],ve=oe[1],Re=oe[2],nn=oe[3],cn=lt(nn);nn&&(cn.current=!0);var ce=bm(function(ra){O.current=ra,PF(u,ra)},[u]),le,Ne=Ea(Ea({},S),{},{visible:l});if(!y)le=null;else if(te===jv||!a(o))nn?le=y(Ea({},Ne),ce):!R&&cn.current?le=y(Ea(Ea({},Ne),{},{className:b}),ce):d?le=y(Ea(Ea({},Ne),{},{style:{display:"none"}}),ce):le=null;else{var Ce,Be;ve===pl?Be="prepare":Lw(ve)?Be="active":ve===Cs&&(Be="start"),le=y(Ea(Ea({},Ne),{},{className:(0,o6.default)(BF(I,te),(Ce={},Yo(Ce,BF(I,"".concat(te,"-").concat(Be)),Be),Yo(Ce,I,typeof I=="string"),Ce)),style:Re}),ce)}if(bT(le)&&Tw(le)){var Xe=le,Sn=Xe.ref;Sn||(le=wm(le,{ref:ce}))}return vt(r6,{ref:$},le)});return t.displayName="CSSMotion",t}var Pw=ofe(Gw);$a();var xw="add",Nw="keep",jw="remove",Ow="removed";function ufe(e){var n;return e&&eo(e)==="object"&&"key"in e?n=e:n={key:e},Ea(Ea({},n),{},{key:String(n.key)})}function Uw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(ufe)}function u6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=[],t=0,o=n.length,u=Uw(e),i=Uw(n);u.forEach(function(R){for(var d=!1,y=t;y1});return s.forEach(function(R){a=a.filter(function(d){var y=d.key,I=d.status;return y!==R||I!==jw}),a.forEach(function(d){d.key===R&&(d.status=Nw)})}),a}var ife=["component","children","onVisibleChanged","onAllRemoved"],lfe=["status"],cfe=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function sfe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pw,a=function(t){D_(u,t);var o=g_(u);function u(){var i;m_(this,u);for(var l=arguments.length,s=new Array(l),R=0;R=0&&a.left>=0&&a.bottom>a.top&&a.right>a.left?a:null}function Pfe(e,n,a,t){var o=ja.clone(e),u={width:n.width,height:n.height};return t.adjustX&&o.left=a.left&&o.left+u.width>a.right&&(u.width-=o.left+u.width-a.right),t.adjustX&&o.left+u.width>a.right&&(o.left=Math.max(a.right-u.width,a.left)),t.adjustY&&o.top=a.top&&o.top+u.height>a.bottom&&(u.height-=o.top+u.height-a.bottom),t.adjustY&&o.top+u.height>a.bottom&&(o.top=Math.max(a.bottom-u.height,a.top)),ja.mix(o,u)}function aG(e){var n,a,t;if(!ja.isWindow(e)&&e.nodeType!==9)n=ja.offset(e),a=ja.outerWidth(e),t=ja.outerHeight(e);else{var o=ja.getWindow(e);n={left:ja.getWindowScrollLeft(o),top:ja.getWindowScrollTop(o)},a=ja.viewportWidth(o),t=ja.viewportHeight(o)}return n.width=a,n.height=t,n}function I6(e,n){var a=n.charAt(0),t=n.charAt(1),o=e.width,u=e.height,i=e.left,l=e.top;return a==="c"?l+=u/2:a==="b"&&(l+=u),t==="c"?i+=o/2:t==="r"&&(i+=o),{left:i,top:l}}function Ww(e,n,a,t,o){var u=I6(n,a[1]),i=I6(e,a[0]),l=[i.left-u.left,i.top-u.top];return{left:Math.round(e.left-l[0]+t[0]-o[0]),top:Math.round(e.top-l[1]+t[1]-o[1])}}function T6(e,n,a){return e.lefta.right}function S6(e,n,a){return e.topa.bottom}function xfe(e,n,a){return e.left>a.right||e.left+n.widtha.bottom||e.top+n.height=a.right||t.top>=a.bottom}function Vw(e,n,a){var t=a.target||n,o=aG(t),u=!jfe(t,a.overflow&&a.overflow.alwaysByViewport);return G6(e,o,a,u)}Vw.__getOffsetParent=eG;Vw.__getVisibleRectForElement=nG;function M6(e,n,a){var t,o,u=ja.getDocument(e),i=u.defaultView||u.parentWindow,l=ja.getWindowScrollLeft(i),s=ja.getWindowScrollTop(i),R=ja.viewportWidth(i),d=ja.viewportHeight(i);"pageX"in n?t=n.pageX:t=l+n.clientX,"pageY"in n?o=n.pageY:o=s+n.clientY;var y={left:t,top:o,width:0,height:0},I=t>=0&&t<=l+R&&o>=0&&o<=s+d,b=[a.points[0],"cc"];return G6(e,y,s6(s6({},a),{},{points:b}),I)}var dB=Cu(rB());var oB=function(){if(typeof Map!="undefined")return Map;function e(n,a){var t=-1;return n.some(function(o,u){return o[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),o=this.__entries__[t];return o&&o[1]},n.prototype.set=function(a,t){var o=e(this.__entries__,a);~o?this.__entries__[o][1]=t:this.__entries__.push([a,t])},n.prototype.delete=function(a){var t=this.__entries__,o=e(t,a);~o&&t.splice(o,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 o=0,u=this.__entries__;o0},e.prototype.connect_=function(){!wG||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),she?(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(){!wG||!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,o=che.some(function(u){return!!~t.indexOf(u)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),uB=function(e,n){for(var a=0,t=Object.keys(n);a0},e}(),cB=typeof WeakMap!="undefined"?new WeakMap:new oB,sB=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=vhe.getInstance(),t=new yhe(n,a,this);cB.set(this,t)}return e}();["observe","unobserve","disconnect"].forEach(function(e){sB.prototype[e]=function(){var n;return(n=cB.get(this))[e].apply(n,arguments)}});var whe=function(){return typeof eb.ResizeObserver!="undefined"?eb.ResizeObserver:sB}(),vB=whe;function fB(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 _B(e,n){e!==document.activeElement&&R_(n,e)&&typeof e.focus=="function"&&e.focus()}function bG(e,n){var a=null,t=null;function o(i){var l=At(i,1),s=l[0].target;if(!!document.documentElement.contains(s)){var R=s.getBoundingClientRect(),d=R.width,y=R.height,I=Math.floor(d),b=Math.floor(y);(a!==I||t!==b)&&Promise.resolve().then(function(){n({width:I,height:b})}),a=I,t=b}}var u=new vB(o);return e&&u.observe(e),function(){u.disconnect()}}$a();var pB=function(e,n){var a=ka.useRef(!1),t=ka.useRef(null);function o(){window.clearTimeout(t.current)}function u(i){if(o(),!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,o()}]};function mB(e){return typeof e!="function"?null:e()}function hB(e){return eo(e)!=="object"||!e?null:e}var bhe=function(n,a){var t=n.children,o=n.disabled,u=n.target,i=n.align,l=n.onAlign,s=n.monitorWindowResize,R=n.monitorBufferTime,d=R===void 0?0:R,y=ka.useRef({}),I=ka.useRef(),b=ka.Children.only(t),S=ka.useRef({});S.current.disabled=o,S.current.target=u,S.current.align=i,S.current.onAlign=l;var L=pB(function(){var ve=S.current,Re=ve.disabled,nn=ve.target,cn=ve.align,ce=ve.onAlign;if(!Re&&nn){var le=I.current,Ne,Ce=mB(nn),Be=hB(nn);y.current.element=Ce,y.current.point=Be,y.current.align=cn;var Xe=document,Sn=Xe.activeElement;return Ce&&l6(Ce)?Ne=Vw(le,Ce,cn):Be&&(Ne=M6(le,Be,cn)),_B(Sn,le),ce&&Ne&&ce(le,Ne),!0}return!1},d),O=At(L,2),$=O[0],z=O[1],ee=ka.useRef({cancel:function(){}}),oe=ka.useRef({cancel:function(){}});ka.useEffect(function(){var ve=mB(u),Re=hB(u);I.current!==oe.current.element&&(oe.current.cancel(),oe.current.element=I.current,oe.current.cancel=bG(I.current,$)),(y.current.element!==ve||!fB(y.current.point,Re)||!(0,dB.default)(y.current.align,i))&&($(),ee.current.element!==ve&&(ee.current.cancel(),ee.current.element=ve,ee.current.cancel=bG(ve,$)))}),ka.useEffect(function(){o?z():$()},[o]);var te=ka.useRef(null);return ka.useEffect(function(){s?te.current||(te.current=Nv(window,"resize",$)):te.current&&(te.current.remove(),te.current=null)},[s]),ka.useEffect(function(){return function(){ee.current.cancel(),oe.current.cancel(),te.current&&te.current.remove(),z()}},[]),ka.useImperativeHandle(a,function(){return{forceAlign:function(){return $(!0)}}}),ka.isValidElement(b)&&(b=ka.cloneElement(b,{ref:Iw(b.ref,I)})),b},DB=ka.forwardRef(bhe);DB.displayName="Align";var gB=DB;var RB=gB;$a();var Ehe=Ec()?Em:Gt,EG=Ehe;var IB=Cu(y_());function Ch(){"use strict";Ch=function(){return e};var e={},n=Object.prototype,a=n.hasOwnProperty,t=typeof Symbol=="function"?Symbol:{},o=t.iterator||"@@iterator",u=t.asyncIterator||"@@asyncIterator",i=t.toStringTag||"@@toStringTag";function l(ce,le,Ne){return Object.defineProperty(ce,le,{value:Ne,enumerable:!0,configurable:!0,writable:!0}),ce[le]}try{l({},"")}catch{l=function(Ne,Ce,Be){return Ne[Ce]=Be}}function s(ce,le,Ne,Ce){var Be=le&&le.prototype instanceof y?le:y,Xe=Object.create(Be.prototype),Sn=new Re(Ce||[]);return Xe._invoke=function(ra,kn,Hn){var Kn="suspendedStart";return function(qn,ft){if(Kn==="executing")throw new Error("Generator is already running");if(Kn==="completed"){if(qn==="throw")throw ft;return cn()}for(Hn.method=qn,Hn.arg=ft;;){var Oe=Hn.delegate;if(Oe){var ua=oe(Oe,Hn);if(ua){if(ua===d)continue;return ua}}if(Hn.method==="next")Hn.sent=Hn._sent=Hn.arg;else if(Hn.method==="throw"){if(Kn==="suspendedStart")throw Kn="completed",Hn.arg;Hn.dispatchException(Hn.arg)}else Hn.method==="return"&&Hn.abrupt("return",Hn.arg);Kn="executing";var Ta=R(ra,kn,Hn);if(Ta.type==="normal"){if(Kn=Hn.done?"completed":"suspendedYield",Ta.arg===d)continue;return{value:Ta.arg,done:Hn.done}}Ta.type==="throw"&&(Kn="completed",Hn.method="throw",Hn.arg=Ta.arg)}}}(ce,Ne,Sn),Xe}function R(ce,le,Ne){try{return{type:"normal",arg:ce.call(le,Ne)}}catch(Ce){return{type:"throw",arg:Ce}}}e.wrap=s;var d={};function y(){}function I(){}function b(){}var S={};l(S,o,function(){return this});var L=Object.getPrototypeOf,O=L&&L(L(nn([])));O&&O!==n&&a.call(O,o)&&(S=O);var $=b.prototype=y.prototype=Object.create(S);function z(ce){["next","throw","return"].forEach(function(le){l(ce,le,function(Ne){return this._invoke(le,Ne)})})}function ee(ce,le){function Ne(Be,Xe,Sn,ra){var kn=R(ce[Be],ce,Xe);if(kn.type!=="throw"){var Hn=kn.arg,Kn=Hn.value;return Kn&&eo(Kn)=="object"&&a.call(Kn,"__await")?le.resolve(Kn.__await).then(function(qn){Ne("next",qn,Sn,ra)},function(qn){Ne("throw",qn,Sn,ra)}):le.resolve(Kn).then(function(qn){Hn.value=qn,Sn(Hn)},function(qn){return Ne("throw",qn,Sn,ra)})}ra(kn.arg)}var Ce;this._invoke=function(Be,Xe){function Sn(){return new le(function(ra,kn){Ne(Be,Xe,ra,kn)})}return Ce=Ce?Ce.then(Sn,Sn):Sn()}}function oe(ce,le){var Ne=ce.iterator[le.method];if(Ne===void 0){if(le.delegate=null,le.method==="throw"){if(ce.iterator.return&&(le.method="return",le.arg=void 0,oe(ce,le),le.method==="throw"))return d;le.method="throw",le.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var Ce=R(Ne,ce.iterator,le.arg);if(Ce.type==="throw")return le.method="throw",le.arg=Ce.arg,le.delegate=null,d;var Be=Ce.arg;return Be?Be.done?(le[ce.resultName]=Be.value,le.next=ce.nextLoc,le.method!=="return"&&(le.method="next",le.arg=void 0),le.delegate=null,d):Be:(le.method="throw",le.arg=new TypeError("iterator result is not an object"),le.delegate=null,d)}function te(ce){var le={tryLoc:ce[0]};1 in ce&&(le.catchLoc=ce[1]),2 in ce&&(le.finallyLoc=ce[2],le.afterLoc=ce[3]),this.tryEntries.push(le)}function ve(ce){var le=ce.completion||{};le.type="normal",delete le.arg,ce.completion=le}function Re(ce){this.tryEntries=[{tryLoc:"root"}],ce.forEach(te,this),this.reset(!0)}function nn(ce){if(ce){var le=ce[o];if(le)return le.call(ce);if(typeof ce.next=="function")return ce;if(!isNaN(ce.length)){var Ne=-1,Ce=function Be(){for(;++Ne=0;--Be){var Xe=this.tryEntries[Be],Sn=Xe.completion;if(Xe.tryLoc==="root")return Ce("end");if(Xe.tryLoc<=this.prev){var ra=a.call(Xe,"catchLoc"),kn=a.call(Xe,"finallyLoc");if(ra&&kn){if(this.prev=0;--Ce){var Be=this.tryEntries[Ce];if(Be.tryLoc<=this.prev&&a.call(Be,"finallyLoc")&&this.prev=0;--Ne){var Ce=this.tryEntries[Ne];if(Ce.finallyLoc===le)return this.complete(Ce.completion,Ce.afterLoc),ve(Ce),d}},catch:function(le){for(var Ne=this.tryEntries.length-1;Ne>=0;--Ne){var Ce=this.tryEntries[Ne];if(Ce.tryLoc===le){var Be=Ce.completion;if(Be.type==="throw"){var Xe=Be.arg;ve(Ce)}return Xe}}throw new Error("illegal catch attempt")},delegateYield:function(le,Ne,Ce){return this.delegate={iterator:nn(le),resultName:Ne,nextLoc:Ce},this.method==="next"&&(this.arg=void 0),d}},e}function yB(e,n,a,t,o,u,i){try{var l=e[u](i),s=l.value}catch(R){a(R);return}l.done?n(s):Promise.resolve(s).then(t,o)}function IG(e){return function(){var n=this,a=arguments;return new Promise(function(t,o){var u=e.apply(n,a);function i(s){yB(u,t,o,i,l,"next",s)}function l(s){yB(u,t,o,i,l,"throw",s)}i(void 0)})}}$a();var wB=["measure","alignPre","align",null,"motion"],bB=function(e,n){var a=Fs(null),t=At(a,2),o=t[0],u=t[1],i=lt();function l(d){u(d,!0)}function s(){Ti.cancel(i.current)}function R(d){s(),i.current=Ti(function(){l(function(y){switch(o){case"align":return"motion";case"motion":return"stable";default:}return y}),d==null||d()})}return Gt(function(){l("measure")},[e]),Gt(function(){switch(o){case"measure":n();break;default:}o&&(i.current=Ti(IG(Ch().mark(function d(){var y,I;return Ch().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:y=wB.indexOf(o),I=wB[y+1],I&&y!==-1&&l(I);case 3:case"end":return S.stop()}},d)}))))},[o]),Gt(function(){return function(){s()}},[]),[o,R]};$a();var EB=function(e){var n=Ll({width:0,height:0}),a=At(n,2),t=a[0],o=a[1];function u(l){o({width:l.offsetWidth,height:l.offsetHeight})}var i=Im(function(){var l={};if(e){var s=t.width,R=t.height;e.indexOf("height")!==-1&&R?l.height=R:e.indexOf("minHeight")!==-1&&R&&(l.minHeight=R),e.indexOf("width")!==-1&&s?l.width=s:e.indexOf("minWidth")!==-1&&s&&(l.minWidth=s)}return l},[e,t]);return[i,u]};var TB=Di(function(e,n){var a=e.visible,t=e.prefixCls,o=e.className,u=e.style,i=e.children,l=e.zIndex,s=e.stretch,R=e.destroyPopupOnHide,d=e.forceRender,y=e.align,I=e.point,b=e.getRootDomNode,S=e.getClassNameFromAlign,L=e.onAlign,O=e.onMouseEnter,$=e.onMouseLeave,z=e.onMouseDown,ee=e.onTouchStart,oe=e.onClick,te=lt(),ve=lt(),Re=Ll(),nn=At(Re,2),cn=nn[0],ce=nn[1],le=EB(s),Ne=At(le,2),Ce=Ne[0],Be=Ne[1];function Xe(){s&&Be(b())}var Sn=bB(a,Xe),ra=At(Sn,2),kn=ra[0],Hn=ra[1],Kn=Ll(0),qn=At(Kn,2),ft=qn[0],Oe=qn[1],ua=lt();EG(function(){kn==="alignPre"&&Oe(0)},[kn]);function Ta(){return I||b}function En(){var sn;(sn=te.current)===null||sn===void 0||sn.forceAlign()}function gn(sn,ia){var bt=S(ia);cn!==bt&&ce(bt),Oe(function(Da){return Da+1}),kn==="align"&&(L==null||L(sn,ia))}EG(function(){kn==="align"&&(ft<2?En():Hn(function(){var sn;(sn=ua.current)===null||sn===void 0||sn.call(ua)}))},[ft]);var He=Ea({},kw(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(sn){var ia=He[sn];He[sn]=function(bt,Da){return Hn(),ia==null?void 0:ia(bt,Da)}});function ea(){return new Promise(function(sn){ua.current=sn})}Gt(function(){!He.motionName&&kn==="motion"&&Hn()},[He.motionName,kn]),rs(n,function(){return{forceAlign:En,getElement:function(){return ve.current}}});var va=Ea(Ea({},Ce),{},{zIndex:l,opacity:kn==="motion"||kn==="stable"||!a?void 0:0,pointerEvents:!a&&kn!=="stable"?"none":void 0},u),La=!0;(y==null?void 0:y.points)&&(kn==="align"||kn==="stable")&&(La=!1);var _t=i;return kf.count(i)>1&&(_t=vt("div",{className:"".concat(t,"-content")},i)),vt(Ep,ho({visible:a,ref:ve,leavedClassName:"".concat(t,"-hidden")},He,{onAppearPrepare:ea,onEnterPrepare:ea,removeOnLeave:R,forceRender:d}),function(sn,ia){var bt=sn.className,Da=sn.style,ut=(0,IB.default)(t,o,cn,bt);return vt(RB,{target:Ta(),key:"popup",ref:te,monitorWindowResize:!0,disabled:La,align:y,onAlign:gn},vt("div",{ref:ia,className:ut,onMouseEnter:O,onMouseLeave:$,onMouseDownCapture:z,onTouchStartCapture:ee,onClick:oe,style:Ea(Ea({},Da),va)},_t))})});TB.displayName="PopupInner";var SB=TB;$a();var CB=Cu(y_()),FB=Di(function(e,n){var a=e.prefixCls,t=e.visible,o=e.zIndex,u=e.children,i=e.mobile;i=i===void 0?{}:i;var l=i.popupClassName,s=i.popupStyle,R=i.popupMotion,d=R===void 0?{}:R,y=i.popupRender,I=e.onClick,b=lt();rs(n,function(){return{forceAlign:function(){},getElement:function(){return b.current}}});var S=Ea({zIndex:o},s),L=u;return kf.count(u)>1&&(L=vt("div",{className:"".concat(a,"-content")},u)),y&&(L=y(L)),vt(Ep,ho({visible:t,ref:b,removeOnLeave:!0},d),function(O,$){var z=O.className,ee=O.style,oe=(0,CB.default)(a,l,z);return vt("div",{ref:$,className:oe,onClick:I,style:Ea(Ea({},ee),S)},L)})});FB.displayName="MobilePopupInner";var GB=FB;var Ihe=["visible","mobile"],MB=Di(function(e,n){var a=e.visible,t=e.mobile,o=xv(e,Ihe),u=Ll(a),i=At(u,2),l=i[0],s=i[1],R=Ll(!1),d=At(R,2),y=d[0],I=d[1],b=Ea(Ea({},o),{},{visible:l});Gt(function(){s(a),a&&t&&I($U())},[a,t]);var S=y?vt(GB,ho({},b,{mobile:t,ref:n})):vt(SB,ho({},b,{ref:n}));return vt("div",null,vt(WF,b),S)});MB.displayName="Popup";var AB=MB;$a();var The=yT(null),TG=The;function SG(){}function She(){return""}function Che(e){return e?e.ownerDocument:window.document}var Fhe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ghe(e){var n=function(a){D_(o,a);var t=g_(o);function o(u){var i;m_(this,o),i=t.call(this,u),i.popupRef=PR(),i.triggerRef=PR(),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 R=i.props.mouseEnterDelay;i.fireEvents("onMouseEnter",s),i.delaySetPopupVisible(!0,R,R?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 R;s.relatedTarget&&!s.relatedTarget.setTimeout&&R_((R=i.popupRef.current)===null||R===void 0?void 0:R.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 R;if(i.preClickTime&&i.preTouchTime?R=Math.min(i.preClickTime,i.preTouchTime):i.preClickTime?R=i.preClickTime:i.preTouchTime&&(R=i.preTouchTime),Math.abs(R-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 d=!i.state.popupVisible;(i.isClickToHide()&&!d||d&&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 R=s.target,d=i.getRootDomNode(),y=i.getPopupDomNode();(!R_(d,R)||i.isContextMenuOnly())&&!R_(y,R)&&!i.hasPopupMouseDown&&i.close()}},i.getRootDomNode=function(){var s=i.props.getTriggerDOMNode;if(s)return s(i.triggerRef.current);try{var R=sh(i.triggerRef.current);if(R)return R}catch{}return gi.findDOMNode(lh(i))},i.getPopupClassNameFromAlign=function(s){var R=[],d=i.props,y=d.popupPlacement,I=d.builtinPlacements,b=d.prefixCls,S=d.alignPoint,L=d.getPopupClassNameFromAlign;return y&&I&&R.push(WU(I,b,s,S)),L&&R.push(L(s)),R.join(" ")},i.getComponent=function(){var s=i.props,R=s.prefixCls,d=s.destroyPopupOnHide,y=s.popupClassName,I=s.onPopupAlign,b=s.popupMotion,S=s.popupAnimation,L=s.popupTransitionName,O=s.popupStyle,$=s.mask,z=s.maskAnimation,ee=s.maskTransitionName,oe=s.maskMotion,te=s.zIndex,ve=s.popup,Re=s.stretch,nn=s.alignPoint,cn=s.mobile,ce=s.forceRender,le=s.onPopupClick,Ne=i.state,Ce=Ne.popupVisible,Be=Ne.point,Xe=i.getPopupAlign(),Sn={};return i.isMouseEnterToShow()&&(Sn.onMouseEnter=i.onPopupMouseEnter),i.isMouseLeaveToHide()&&(Sn.onMouseLeave=i.onPopupMouseLeave),Sn.onMouseDown=i.onPopupMouseDown,Sn.onTouchStart=i.onPopupMouseDown,vt(AB,ho({prefixCls:R,destroyPopupOnHide:d,visible:Ce,point:nn&&Be,className:y,align:Xe,onAlign:I,animation:S,getClassNameFromAlign:i.getPopupClassNameFromAlign},Sn,{stretch:Re,getRootDomNode:i.getRootDomNode,style:O,mask:$,zIndex:te,transitionName:L,maskAnimation:z,maskTransitionName:ee,maskMotion:oe,ref:i.popupRef,motion:b,mobile:cn,forceRender:ce,onClick:le}),typeof ve=="function"?ve():ve)},i.attachParent=function(s){Ti.cancel(i.attachId);var R=i.props,d=R.getPopupContainer,y=R.getDocument,I=i.getRootDomNode(),b;d?(I||d.length===0)&&(b=d(I)):b=y(i.getRootDomNode()).body,b?b.appendChild(s):i.attachId=Ti(function(){i.attachParent(s)})},i.getContainer=function(){if(!i.portalContainer){var s=i.props.getDocument,R=s(i.getRootDomNode()).createElement("div");R.style.position="absolute",R.style.top="0",R.style.left="0",R.style.width="100%",i.portalContainer=R}return i.attachParent(i.portalContainer),i.portalContainer},i.setPoint=function(s){var R=i.props.alignPoint;!R||!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},Fhe.forEach(function(s){i["fire".concat(s)]=function(R){i.fireEvents(s,R)}}),i}return h_(o,[{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=Nv(s,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(s=s||i.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Nv(s,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(s=s||i.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Nv(s,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Nv(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Ti.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var i;return((i=this.popupRef.current)===null||i===void 0?void 0:i.getElement())||null}},{key:"getPopupAlign",value:function(){var i=this.props,l=i.popupPlacement,s=i.popupAlign,R=i.builtinPlacements;return l&&R?JU(R,l,s):s}},{key:"setPopupVisible",value:function(i,l){var s=this.props.alignPoint,R=this.state.popupVisible;this.clearDelayTimer(),R!==i&&("popupVisible"in this.props||this.setState({popupVisible:i,prevPopupVisible:R}),this.props.onPopupVisibleChange(i)),s&&l&&i&&this.setPoint(l)}},{key:"delaySetPopupVisible",value:function(i,l,s){var R=this,d=l*1e3;if(this.clearDelayTimer(),d){var y=s?{pageX:s.pageX,pageY:s.pageY}:null;this.delayTimer=window.setTimeout(function(){R.setPopupVisible(i,y),R.clearDelayTimer()},d)}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 R=this.props[i];R&&R(l)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var i=this.state.popupVisible,l=this.props,s=l.children,R=l.forceRender,d=l.alignPoint,y=l.className,I=l.autoDestroy,b=kf.only(s),S={key:"trigger"};this.isContextMenuToShow()?S.onContextMenu=this.onContextMenu:S.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(S.onClick=this.onClick,S.onMouseDown=this.onMouseDown,S.onTouchStart=this.onTouchStart):(S.onClick=this.createTwoChains("onClick"),S.onMouseDown=this.createTwoChains("onMouseDown"),S.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(S.onMouseEnter=this.onMouseEnter,d&&(S.onMouseMove=this.onMouseMove)):S.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?S.onMouseLeave=this.onMouseLeave:S.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(S.onFocus=this.onFocus,S.onBlur=this.onBlur):(S.onFocus=this.createTwoChains("onFocus"),S.onBlur=this.createTwoChains("onBlur"));var L=(0,LB.default)(b&&b.props&&b.props.className,y);L&&(S.className=L);var O=Ea({},S);Tw(b)&&(O.ref=Iw(this.triggerRef,b.ref));var $=wm(b,O),z;return(i||this.popupRef.current||R)&&(z=vt(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!i&&I&&(z=null),vt(TG.Provider,{value:this.triggerContextValue},$,z)}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.popupVisible,R={};return s!==void 0&&l.popupVisible!==s&&(R.popupVisible=s,R.prevPopupVisible=l.popupVisible),R}}]),o}(Bf);return n.contextType=TG,n.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:She,getDocument:Che,onPopupVisibleChange:SG,afterPopupVisibleChange:SG,onPopupAlign:SG,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 PB=Ghe(qU);var dl={adjustX:1,adjustY:1},ml=[0,0],xB={left:{points:["cr","cl"],overflow:dl,offset:[-4,0],targetOffset:ml},right:{points:["cl","cr"],overflow:dl,offset:[4,0],targetOffset:ml},top:{points:["bc","tc"],overflow:dl,offset:[0,-4],targetOffset:ml},bottom:{points:["tc","bc"],overflow:dl,offset:[0,4],targetOffset:ml},topLeft:{points:["bl","tl"],overflow:dl,offset:[0,-4],targetOffset:ml},leftTop:{points:["tr","tl"],overflow:dl,offset:[-4,0],targetOffset:ml},topRight:{points:["br","tr"],overflow:dl,offset:[0,-4],targetOffset:ml},rightTop:{points:["tl","tr"],overflow:dl,offset:[4,0],targetOffset:ml},bottomRight:{points:["tr","br"],overflow:dl,offset:[0,4],targetOffset:ml},rightBottom:{points:["bl","br"],overflow:dl,offset:[4,0],targetOffset:ml},bottomLeft:{points:["tl","bl"],overflow:dl,offset:[0,4],targetOffset:ml},leftBottom:{points:["br","bl"],overflow:dl,offset:[-4,0],targetOffset:ml}};$a();var NB=Cu(y_());function tb(e){var n=e.showArrow,a=e.arrowContent,t=e.children,o=e.prefixCls,u=e.id,i=e.overlayInnerStyle,l=e.className,s=e.style;return vt("div",{className:(0,NB.default)("".concat(o,"-content"),l),style:s},n!==!1&&vt("div",{className:"".concat(o,"-arrow"),key:"arrow"},a),vt("div",{className:"".concat(o,"-inner"),id:u,role:"tooltip",style:i},typeof t=="function"?t():t))}var Mhe=function(n,a){var t=n.overlayClassName,o=n.trigger,u=o===void 0?["hover"]:o,i=n.mouseEnterDelay,l=i===void 0?0:i,s=n.mouseLeaveDelay,R=s===void 0?.1:s,d=n.overlayStyle,y=n.prefixCls,I=y===void 0?"rc-tooltip":y,b=n.children,S=n.onVisibleChange,L=n.afterVisibleChange,O=n.transitionName,$=n.animation,z=n.motion,ee=n.placement,oe=ee===void 0?"right":ee,te=n.align,ve=te===void 0?{}:te,Re=n.destroyTooltipOnHide,nn=Re===void 0?!1:Re,cn=n.defaultVisible,ce=n.getTooltipContainer,le=n.overlayInnerStyle,Ne=n.arrowContent,Ce=n.overlay,Be=n.id,Xe=n.showArrow,Sn=xv(n,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),ra=lt(null);rs(a,function(){return ra.current});var kn=Ea({},Sn);"visible"in n&&(kn.popupVisible=n.visible);var Hn=function(){return vt(tb,{showArrow:Xe,arrowContent:Ne,key:"content",prefixCls:I,id:Be,overlayInnerStyle:le},Ce)},Kn=!1,qn=!1;if(typeof nn=="boolean")Kn=nn;else if(nn&&eo(nn)==="object"){var ft=nn.keepParent;Kn=ft===!0,qn=ft===!1}return vt(PB,ho({popupClassName:t,prefixCls:I,popup:Hn,action:u,builtinPlacements:xB,popupPlacement:oe,ref:ra,popupAlign:ve,getPopupContainer:ce,onPopupVisibleChange:S,afterPopupVisibleChange:L,popupTransitionName:O,popupAnimation:$,popupMotion:z,defaultPopupVisible:cn,destroyPopupOnHide:Kn,autoDestroy:qn,mouseLeaveDelay:R,popupStyle:d,mouseEnterDelay:l},kn),b)},jB=Di(Mhe);var OB=jB;var kB=e=>ka.createElement(OB,Object.assign({},e,{overlayClassName:`cv-tooltip ${e.overlayClassName}`,getTooltipContainer:e.tooltipContainerSelector?()=>document.querySelector(e.tooltipContainerSelector)||document.body:void 0}));if(typeof window!="undefined"&&typeof global=="undefined")try{Promise.resolve().then(()=>Cu(UB())).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)}$a();var BB=class extends ka.Component{componentDidUpdate(n){this.props.componentDidUpdate(n.deps)}render(){return this.props.children}},HB=BB;var Lhe=St();var qB=function(e){return"ref:"+nr(e)(et.value)},JB=function(e){var n=qB(e);return function(a){return Lhe(oc(n)(a))}},WB=function(e){var n=qB(e);return function(a){return _R(n)(a)}};var Phe=is(),$B=un(tn)(Qn),zB=W(yn),xhe=nl(JR(Zi)),VB={reflectSymbol:function(){return"deps"}},Nhe=JB(VB),jhe=WB(VB),Ohe=pn(dn);var Uhe=function(e){var n=Phe(e);return function(){return function(){return n(HB)}}},khe=Uhe(We)()(),Bhe=function(e){var n=Oo(e);return function(a){return function(t){return function(o){return function(u){return uw(a)(function(i){return t({init:$B(Va(u(o)))(function(){return zB(o)}),update:function(l){return function(s){return $B(Va(u(s)))(function(){return zB(s)})}},view:function(l){return function(s){return khe({componentDidUpdate:xhe(s)(function(R){var d=n(Nhe(R))(o);return d?new T(o):M.value}),deps:jhe(o)})(i(Ee))}}})})}}}}};var QB=function(e){var n=Bhe(e);return function(a){return function(t){return n("UseEffectPrime")(Ohe)(a)(t)}}};var qhe=is();var KB="click";var rb="top",Pp=function(e){var n=qhe(e);return function(){return function(){return n(kB)}}};var YB="right";var XB=e=>()=>e.preventDefault&&e.preventDefault();var CG=function(){return XB};var Jhe=Sa();var FG=Z(en),GG=wt(Jhe(B({reflectSymbol:function(){return"value"}})(_e)(rn))),MG=W(aa);var ob=function(e){return ke("")(FG(GG(so(e.target)))(function(n){return MG(n.value)}))},AG=function(e){return ke("")(FG(GG(so(e.target)))(function(n){return MG(n.value)}))},Gs=function(e){return ke("")(FG(GG(so(e.target)))(function(n){return MG(n.value)}))};var ZB="/network/connections";var eH=15;var Whe=Pp(We)()(),$he=Ua(me),zhe=function(){return"You\u2019ve hit the "+(ne(Ze)(eH)+`-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. `)}(),Vhe=Vo(We)("text-decoration-underline")(Mt(Y)()()("text-dark")({href:ZB})("Manage my connections")),nH=function(e){return function(n){return Whe({placement:e,trigger:KB,overlay:$he("")([Ke(zhe),Vhe]),overlayStyle:ot({width:"15rem"}),overlayClassName:"t--connection-limit-tooltip"})(n)}};var aH=Z(en),xp=function(e){var n=aH(e.guestPresenter)(function(a){if(a instanceof r_)return new T(a.value0);if(a instanceof Rs)return M.value;throw new Error("Failed pattern match at Livestream.Utils (line 21, column 31 - line 23, column 40): "+[a.constructor.name])});return aH(n)(function(a){return new T({name:a.school.name,id:a.school.id})})};var Qhe=function(){function e(){}return e.value=new e,e}(),Khe=function(){function e(){}return e.value=new e,e}(),LG=function(){function e(){}return e.value=new e,e}(),Yhe=function(){function e(){}return e.value=new e,e}(),Xhe=function(){function e(){}return e.value=new e,e}(),Zhe=function(){function e(){}return e.value=new e,e}(),tH=function(e){if(e instanceof Qhe)return"account_settings_page";if(e instanceof Khe)return"preference_survey";if(e instanceof LG)return"livestream_registration";if(e instanceof Yhe)return"chancing_wizard_network_step";if(e instanceof Xhe)return"main_profile_page";if(e instanceof Zhe)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 tDe=wc(Rc),PG=ql(tDe),xG=Z(_a);var rDe=Vr(),rH=pe(ae);var oH=PG("profile_visibility_path")(function(e){return function(n){return xG(e({visibility:{publish_scope:Xm(n)}}))(Zt)}}),uH=function(){return PG("profile_network_settings_path")(function(e){return function(n){return function(a){return xG(e({network_settings:{publish_scope:Xm(a.publishScope),publish_context:tH(a.publishContext),automatic_accept_requests_for_school_list:a.autoAcceptForSchoolList,automatic_connection_requests_from_livestreams:a.autoRequestFromLivestreams,livestream:Fa(rH(ll(a.livestreamConference))(function(t){return{school_name:Fa(rH(xp(t))(function(o){return o.name})),title:t.title,id:t.id}}))}}))(Zt)}(rDe(n))}})},iH=PG("profile_name_path")(function(e){return function(n){return xG(e({name:n}))(Zt)}});var Ae=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wn=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var oDe=Wl(),uDe=Hr(Y),iDe=Ht(Y),NG=$t(Y),jG=Ku(Y),Uv=Te(me),Np=Wn(Y)()(),OG=sr(zo),lDe=un(tn),UG=Xn(ga),I_=Te(We),lH=yu()(),cDe=yv(Y),sDe=vi(yt),cH=fo()(),kG=Xn(vo),vDe=VR()(),sH=Te(Y),fDe=QN(me),BG=ej(Y),_De=Ua(Y),pDe=Pp(We)()(),dDe=$t(me),mDe=Mt(Y)()(),hDe=Qa(Y),T_=W(yn),vH=lDe(Qn),DDe=ow(),Fh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fH=function(){function e(){}return e.value=new e,e}(),_H=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pH=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dH=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),mH=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Gh=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}(),hH=function(e){return function(n){var a=function(R){return oDe({body:R,title:uDe("my-0")(function(){return e.stage instanceof iy?"Join the CollegeVine network":"Connect with "+e.schoolName}()),headerClass:"pb-0",onDismiss:n(new wn(Gh.value)),size:oh.value})},t=t4(e.context),o=Se([iDe("mt-3")("Review your message before you send it"),NG("mt-2")(` Because this is your first message to the counselor, we want to make sure you\u2019re ready to send. `),jG("mt-4")("Your message"),Vm(e.message),Uv("d-flex mt-4 justify-content-start")([Np("btn btn-primary btn-lg t--sem-user-connection-modal-confirm-message-"+t)({onClick:OG(function(){return n(new wn(new HG({introMessage:e.message})))(),n(new Ae(new Fh(yS.value)))()})})("Send"),Np("btn btn-lg btn-outline-primary ml-3 text-nowrap")({onClick:UG(n)(new Ae(new Fh(qm.value)))})("No, I need to edit something")])]),u=Se([Uv("text-center")([I_("")(lH("mt-4")({src:"/img/checkmate-icon.png",height:"80",width:"80"})),cDe("mt-4")("Connection request sent!"),NG("mx-md-4")(sDe(["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."])),Np("btn btn-lg btn-outline-secondary mt-4")({onClick:UG(n)(new wn(Gh.value))})("Close")])]),i=Np("btn btn-outline-secondary ml-3 t--sem-user-connection-modal-close-"+t)({onClick:UG(n)(new wn(Gh.value))})("Cancel"),l=function(){var R=hS(e.message)&&function(){if(e.profile.fullName instanceof T)return!0;if(e.profile.fullName instanceof M)return!yi(e.firstName)&&!yi(e.lastName);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 240, column 15 - line 244, column 88): "+[e.profile.fullName.constructor.name])}(),d=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 M)return!1;throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 233, column 13 - line 236, column 31): "+[e.vineBelowConnectionLimit.constructor.name])}();return Se([ya(Tt(e.profile.fullName))(Se([jG("mt-md-4")("Your preferred name"),Uv("form-row mx-1")([cH("col form-control mr-2 t--sem-user-connection-modal-first-name-"+t)({type:"text",value:e.firstName,onChange:kG(n)(function(y){return Ae.create(dH.create(Gs(y)))}),placeholder:"First name"}),cH("col form-control ml-2 t--sem-user-connection-modal-last-name-"+t)({type:"text",value:e.lastName,onChange:kG(n)(function(y){return Ae.create(mH.create(Gs(y)))}),placeholder:"Last name"})])])),jG("mt-md-4")("Your message"),vDe("form-control t--sem-user-connection-modal-text-area-"+t)({rows:7,value:e.message,onChange:kG(n)(function(y){return Ae.create(pH.create(ob(y)))}),placeholder:`Sample introductory message: Hi Jane, My name is Sam and I\u2019m a senior at Oak Ridge High School in Oak Ridge, MD. I\u2019m really excited to apply for CV University this fall, and I\u2019m hoping to study history there. Are there any upcoming virtual events I can register for? I\u2019m excited to stay in touch and learn more about your school. Thanks! `}),I_("mt-2")(Yj(e.message)),sH("mt-3 mt-md-4 small")("The ideal connection message should include:"),fDe("small")([BG("")("Your name, where you\u2019re from, and a bit about who you are"),BG("")("What you\u2019re interested in studying along with one or two insightful questions"),BG("")("That you\u2019re eager to connect with an admissions counselor and would love to stay in touch")]),Uv("d-flex mt-4 justify-content-start")([nH(rb)(I_("")(Np("btn btn-primary btn-lg t--sem-user-connection-modal-connect-"+t)({onClick:OG(function(){return function(){if(e.profile.fullName instanceof T)return Ee;if(e.profile.fullName instanceof M)return n(new Ae(new _H({first:e.firstName,last:e.lastName})))();throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 216, column 23 - line 220, column 113): "+[e.profile.fullName.constructor.name])}(),n(new Ae(new Fh(RS.value)))()}),disabled:!R||d,style:ot({pointerEvents:function(){return d?"none":"auto"}()})})("Connect"))),i])])}(),s=Uv("mx-md-7")([I_("border border-success rounded p-4 my-4")(Uv("row align-items-center")([I_("col-12 col-md-auto text-center text-md-left")(lH("img-fluid")({src:"/img/network/publish-profile-icon.png",height:"67",width:"143"})),I_("col text-center text-md-left")(_De("fw-bold font-weight-bold text-gray-800")("Network with verified admissions counselors on CollegeVine"))])),Uv("d-flex flex-nowrap align-items-center")([sH("mr-4")("Publish your profile to join the CollegeVine Network"),pDe({placement:YB,overlay:dDe("")([Ke(` 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 `),mDe("")({href:pU})("your profile"),Ke(".")]),overlayStyle:ot({width:"15rem"})})(hDe("cursor-default text-secondary fe fe-info large")(""))]),NG("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."),Uv("d-flex mt-4 justify-content-start justify-content-md-center")([Np("btn btn-primary t--sem-user-connection-modal-publish-profile-"+t)({onClick:OG(function(){return n(new Ae(fH.value))(),n(new Ae(new Fh(qm.value)))()})})("Publish profile"),i])]);return I_("t--network-sem-user-modal")(function(){if(e.stage instanceof iy)return a(s);if(e.stage instanceof qm)return a(l);if(e.stage instanceof RS)return a(o);if(e.stage instanceof yS)return a(u);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 98, column 5 - line 102, column 38): "+[e.stage.constructor.name])}())}},DH=function(e){return function(n){if(n instanceof Ae){if(n.value0 instanceof Fh)return T_({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 fH)return vH(Va(oH(bi.value)))(function(){return T_({context:e.context,firstName:e.firstName,lastName:e.lastName,message:e.message,schoolName:e.schoolName,stage:e.stage,vineBelowConnectionLimit:e.vineBelowConnectionLimit,profile:{fullName:e.profile.fullName,publishScope:bi.value}})});if(n.value0 instanceof _H)return vH(Va(iH(n.value0.value0)))(function(){return T_({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(DF(n.value0.value0))}})});if(n.value0 instanceof pH)return T_({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 dH)return T_({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 mH)return T_({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 81, column 31 - line 91, column 61): "+[n.value0.constructor.name])}if(n instanceof wn)return T_(e);throw new Error("Failed pattern match at Network.SemVine.InviteSchoolModal (line 80, column 1 - line 80, column 55): "+[e.constructor.name,n.constructor.name])}},gDe=function(e){var n=IU(e);return n?qm.value:iy.value},gH=function(e){return{firstName:"",lastName:"",message:"",profile:DDe(e.profile),stage:gDe(e.profile),schoolName:e.schoolName,context:e.context,vineBelowConnectionLimit:e.vineBelowConnectionLimit}};var ub=we(Qt(Pt)),RDe=Vr(),qG=Te(We),yDe=yu()(),JG=Ua(Y),wDe=Qa(Y),bDe=Pv(),EDe=tF(tn)(),IDe=Bn(Ve),TDe=or(We)()(),SDe=Wn(me)()(),CDe=sr(gv),FDe=CG(),GDe=Ja(tr),jp=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Mh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),WG=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}(),RH=function(){function e(){}return e.value=new e,e}(),MDe=function(){function e(){}return e.value=new e,e}(),ADe={eq:function(e){return function(n){return e instanceof jp&&n instanceof jp?e.value0.url===n.value0.url:e instanceof Mh&&n instanceof Mh?ub(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.initials===n.value0.initials&&ub(e.value0.textColorClass)(n.value0.textColorClass):e instanceof WG&&n instanceof WG?ub(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.iconClass===n.value0.iconClass:e instanceof $G&&n instanceof $G?ub(e.value0.backgroundColorClass)(n.value0.backgroundColorClass)&&e.value0.name===n.value0.name:!1}}},LDe=QB(ADe),yH=function(){return function(e){var n=RDe(e),a=function(){var o=Ka(n.shape)(RH.value);if(o instanceof RH)return"rounded-circle";if(o instanceof MDe)return"rounded";throw new Error("Failed pattern match at Dashkit.Avatar (line 122, column 9 - line 124, column 37): "+[o.constructor.name])}(),t=function(o){return qG("avatar "+(yU(Ka(n.size)(pw.value))+(" "+Ka(n.className)(""))))(function(){if(o instanceof jp)return yDe("avatar-img img-fluid "+(a+(" "+Ka(n.borderClassName)(""))))({src:o.value0.url});if(o instanceof Mh)return JG("avatar-title font-weight-bold fw-bold "+(a+(" "+(ke("")(o.value0.backgroundColorClass)+(" "+(ke("")(o.value0.textColorClass)+(" "+Ka(n.borderClassName)(""))))))))(o.value0.initials);if(o instanceof WG)return qG("avatar-title "+(a+(" "+(ke("")(o.value0.backgroundColorClass)+(" "+Ka(n.borderClassName)(""))))))(wDe(o.value0.iconClass)(""));if(o instanceof $G)return qG("avatar-title "+(a+(" "+(ke("")(o.value0.backgroundColorClass)+(" "+Ka(n.borderClassName)(""))))))(JG("material-symbol")(o.value0.name));throw new Error("Failed pattern match at Dashkit.Avatar (line 83, column 11 - line 119, column 46): "+[o.constructor.name])}())};return iw(bDe(Ss(n.source))(function(o){return EDe(LDe(n.source)(function(u){return IDe(o.value1(u))}))(function(){return f_(Se([t(o.value0),function(){return o.value0 instanceof jp?da(ll(n.hideAvatar))(function(u){return TDe("hq-only-menu-item")({style:ot({marginTop:"-50px",marginLeft:"200px"})})(SDe("btn btn-sm btn-warning mb-4 t--hide-avatar")({onClick:CDe(function(i){return function(){return FDe(i)(),GDe(o.value1)(u)()}})})([JG("badge badge-info bg-info text-dark mr-2")("HQ"),Ke("Hide")]))}):$n}()]))})}))}};var PDe=yH();var wH=function(e){return function(n){return PDe({source:function(){if(e.avatarUrl instanceof T)return new jp({url:e.avatarUrl.value0});if(e.avatarUrl instanceof M)return new Mh({initials:e.initials,backgroundColorClass:M.value,textColorClass:M.value});throw new Error("Failed pattern match at Sem.Utils (line 18, column 15 - line 26, column 14): "+[e.avatarUrl.constructor.name])}(),size:n})}};var zG=k(ae),xDe=an(b2(of));var bH=function(e){var n=function(a){return ke("")(zG(ju)(om(0)(a)))};return bv(function(){var a=Qo(" ")(e);return a.length===2?n(a[0])+n(a[1]):a.length===1?n(a[0]):a.length===0?"":ke("?")(xDe(zG(n)(E0(a)))(zG(n)(Kd(a))))}())},EH=function(e){return e.firstName+(" "+e.lastName)};var VG=Hr(Y),NDe=Mt(Y)()(),jDe=Mt(me)()(),IH=Qa(Y),ODe=Wn(me)()(),UDe=nl(Dv(Zi)),kDe=pe(ae),BDe=Z(en),QG=Te(Y),ib=Te(me),TH=Te(We),HDe=Nm(Y),SH=ls()(),qDe=Ku(Y),JDe=$t(Y),Op=W(yn),CH=un(tn),WDe=CH(Qn),$De=Ma(Ve),zDe=CH(_a),VDe=W(ca),QDe=it(wr(Ga)),FH=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ah=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),GH=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),MH=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AH=function(){var e=function(a){return function(t){return function(o){var u=VG("text-primary")(t.semUser.firstName+(" from "+(t.semUser.school.name+" sent you a connection request!"))),i=VG("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question or introduce yourself!")),l=[u,NDe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-view-pending-invitation-from-sem-user")({href:TF(new wp(t.semUser.id))})("View Message")],s=EH(t.semUser),R=bH(s),d=VG("text-primary")("Reach out to "+(t.semUser.firstName+" to ask a question!")),y=[d,jDe("btn btn-primary d-flex align-items-center w-50 justify-content-center t--livestream-details-messages-link")({href:TF(new wp(t.semUser.id))})([IH("fe fe-message-square mr-2 large")(""),Ke("Send a message to "+t.semUser.firstName)])],I=function(L){return ODe("btn btn-primary d-flex align-items-center justify-content-center t--livestream-details-connect-with-sem-user")({onClick:UDe(o)(kDe(BDe(a.currentUser)(function(O){return O.profile}))(GH.create)),disabled:L.isDisabled})([IH("fe fe-message-square mr-2 large")(""),Ke("Connect with "+t.semUser.firstName)])},b=[i,I({isDisabled:!1})],S=[i,I({isDisabled:!0}),QG("mt-4 text-secondary small")("Invitation pending")];return ib("t--livestream-details-guest-presenter-sem-user mb-4")([da(a.currentUser)(function(L){return ya(L.hasAccessToNetwork&&t.semUser.school.allowedToContact)(TH("card")(ib("card-body")(function(){if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof Ev)return y;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof jl&&t.semUser.connection.value0.initiator instanceof ds||t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof ms&&t.semUser.connection.value0.initiator instanceof ds)return S;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof jl&&t.semUser.connection.value0.initiator instanceof ps)return l;if(t.semUser.connection instanceof T&&t.semUser.connection.value0.status instanceof ms&&t.semUser.connection.value0.initiator instanceof ps||t.semUser.connection instanceof M)return b;throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 97, column 17 - line 103, column 53): "+[t.semUser.connection.constructor.name])}())))}),HDe("text-uppercase text-secondary")("Your guest presenter"),ib("row align-items-center mt-4")([TH("col-auto")(wH(SH(t.semUser)({initials:R}))(_w.value)),ib("col")([qDe("mb-1")(s),QG("text-secondary small")(t.semUser.school.name),QG("text-secondary small")(t.semUser.title)]),da(t.semUser.bio)(function(L){return JDe("mt-4 mb-2 ml-2")(L)})]),da(t.modal)(function(L){return hH(L.value0)(function(O){return o(Ah.create(O))})})])}}},n=function(a){return function(t){return function(o){if(o instanceof Ah&&o.value0 instanceof wn){if(o.value0.value0 instanceof Gh)return Op({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:M.value});if(o.value0.value0 instanceof HG)return WDe($De(zDe(MU(t.semUser.school.id)(t.semUser.id)({introMessage:o.value0.value0.value0.introMessage}))(function(){return VDe(new MH({introMessage:o.value0.value0.value0.introMessage}))})))(function(){return Op(t)});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 53, column 55 - line 59, column 19): "+[o.value0.value0.constructor.name])}if(t.modal instanceof T&&o instanceof Ah&&o.value0 instanceof Ae)return QDe(Ah.create)(function(u){return{currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new FH(u))}})(DH(t.modal.value0.value0)(new Ae(o.value0.value0)));if(o instanceof Ah&&o.value0 instanceof Ae)return Op(t);if(o instanceof GH)return Op({currentUser:t.currentUser,semUser:t.semUser,vineBelowConnectionLimit:t.vineBelowConnectionLimit,modal:new T(new FH(gH({schoolName:a.semUser.school.name,context:gS.value,profile:o.value0,vineBelowConnectionLimit:a.vineBelowConnectionLimit})))});if(o instanceof MH)return Op({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:ds.value,introMessage:o.value0.introMessage,status:jl.value})}});throw new Error("Failed pattern match at Livestream.GuestPresenter.SemUser (line 52, column 5 - line 52, column 67): "+[a.constructor.name,t.constructor.name,o.constructor.name])}}};return hv("Livestream Guest Presenter SEM user")(function(a){return{init:Op(SH(a)({modal:M.value})),view:e(a),update:n(a)}})}();var lb=function(){function e(){}return e.value=new e,e}(),LH=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),PH=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xH=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}();var KDe=St(),YDe=an(GS),KG=function(e){var n=function(u){return KDe(ff(u))},a=n(gs("[^a-z0-9\\-_]+")(YDe(up)(fy))),t=n(gs("^-|-$")(up)),o=n(gs("-{2,}")(up));return Wm(t)("")(Wm(o)("-")(Wm(a)("-")(Vf(Um(e)))))};var ege=k(ze),nge=pe(ze),Lh=ne(Ze),YG=ba(),age=an(Rt),Ph=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),tge=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rge=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oge=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xh=function(){function e(){}return e.value=new e,e}(),uge=function(){function e(){}return e.value=new e,e}();var NH=function(e){var n=function(t){return t.key+("="+t.value)},a=function(t){return t.length===0?"":"?"+vr("&")(t)};return a(ege(n)(e))};var jH=function(e){return nge(e)(function(n){if(n instanceof Ph)return{key:"utm_cv_source",value:n.value0};if(n instanceof tge)return{key:"utm_source",value:n.value0};if(n instanceof rge)return{key:"utm_campaign",value:n.value0};if(n instanceof oge)return{key:"utm_content",value:n.value0};throw new Error("Failed pattern match at ServiceProviders.Retail.Urls (line 198, column 3 - line 206, column 36): "+[n.constructor.name])})};var cb=function(e){return function(n){return function(a){var t=function(){if(e instanceof xh)return"i";if(e instanceof uge)return"o";throw new Error("Failed pattern match at ServiceProviders.Retail.Urls (line 114, column 12 - line 116, column 24): "+[e.constructor.name])}();return"/experts/profile/"+(t+("/"+(Lh(n.id)+("-"+(KG(n.name)+NH(jH(a)))))))}}};var OH=function(e){return function(n){return function(a){var t=function(){if(n instanceof lb)return[];if(n instanceof LH)return[{key:"theme",value:Lh(YG(n.value0))}];if(n instanceof PH)return[{key:"package",value:Lh(YG(n.value0))}];if(n instanceof xH)return[{key:"packageOffer",value:Lh(YG(n.value0))}];throw new Error("Failed pattern match at ServiceProviders.Retail.Urls (line 148, column 5 - line 156, column 71): "+[n.constructor.name])}(),o=age(t)(jH(a));return"/experts/advising/book/"+(Lh(e.id)+("-"+(KG(e.name)+NH(o))))}}};var ige=ne(Ze),lge=ba(),cge=Ua(me),XG=Qa(Y),Ms=Te(me),UH=Nm(Y),sge=k(ze),vge=Mt(We)()(),sb=Te(We),fge=al()(),_ge=Hr(Y),kH=Mt(me)()(),vb=Mt(Y)()(),BH=function(e){return function(n){var a=new Ph("sp-guest-presenter-card-from-conference-"+ige(lge(e))),t=function(d){return cge("badge badge-light bg-light text-dark mr-3")([XG("fe fe-tag mr-2")(""),Ke(d.name)])},o=cb(xh.value)(n.entity)([a]),u=function(d){return function(y){return Ms("mb-3")([UH("text-secondary text-uppercase mb-2")(d),y])}},i=Ms("mt-4")([da(fe(n.entity.shortEducation))(function(d){return u("Education")(Ke(d))}),u("Bio")(Vm(n.entity.bio)),m8(si(n.entity.tags))(u("Specialties")(Se(sge(t)(n.entity.tags))))]),l=Ms("row")([da(fe(n.entity.imageUrl))(function(d){return vge("btn btn-link text-body p-0 m-0")({href:o,target:"_blank"})(sb("col-auto my-auto")(sb("avatar avatar-md")(fge("avatar-img rounded-circle")({src:d}))))}),Ms("col-auto my-auto")([UH("text-uppercase text-secondary mb-2")("Advisor"),_ge("m-0")(n.entity.name)]),Ms("col text-center text-md-right my-auto")([sb("d-none d-md-block")(kH("btn btn-sm btn-outline-primary t--open-message-modal")({href:o,target:"_blank"})([XG("fe fe-message-square mr-2")(""),Ke("Message")])),sb("d-block d-md-none")(kH("btn btn-sm btn-outline-primary t--open-message-modal")({href:o,target:"_blank"})([XG("fe fe-message-square mr-2")(""),Ke("Message")]))])]),s=OH(n.entity)(lb.value)([a]),R=da(n.advisingConfig)(function(d){return Ms("mt-4")([Ms("d-none d-md-block")([da(d.freeConsultationDurationMinutes)(function(y){return vb("btn btn-primary px-3 mr-3")({href:o,target:"_blank"})("Book a free consultation")}),vb("btn btn-outline-primary px-3 mr-3")({href:s,target:"_blank"})("Book a session")]),Ms("d-block d-md-none text-center")([da(d.freeConsultationDurationMinutes)(function(y){return vb("btn btn-primary mr-3")({href:o,target:"_blank"})("Book a free consultation")}),vb("btn btn-outline-primary")({href:s,target:"_blank"})("Book a session")])])});return Ms("mt-4 mt-md-0 t--service-provider-guest-presenter")([l,i,R])}};var Nh=function(e){return function(n){return function(a){return function(t){if(n instanceof r_)return AH({semUser:n.value0,currentUser:a,vineBelowConnectionLimit:t.vineBelowConnectionLimit});if(n instanceof Rs)return BH(e)(n.value0);throw new Error("Failed pattern match at Livestream.GuestPresenter.GuestPresenter (line 16, column 1 - line 16, column 78): "+[e.constructor.name,n.constructor.name,a.constructor.name,t.constructor.name])}}}};var HH="/experts/essay-review";var pge=Mt(me)()(),dge=Qa(Y),Up=Te(Y),wu=Te(We),Xo=Te(me),qH=Hr(Y),JH=al()(),WH=pe(ze),mge=Ua(Y),$H=pe(ae),hge=$t(me),zH=Vo(Y),ZG=Mt(Y)()(),Dge=ne(Ze),jh=k(ae),gge=KR(me)()(),Rge=ne(Zu),Oh=function(e){var n=function(a){return function(t){return pge("mr-3")({href:t,target:"_blank"})([Ke(a),dge("fe fe-external-link ml-1")("")])}};return Se([Up("text-uppercase text-muted small mb-2")("School information"),wu("card shadow-none")(Xo("card-body")([qH("mb-1")(e.name),Up("text-uppercase small text-secondary")(e.cityState),Xo("mt-3 d-none d-md-block")([n("Stats")(fw(d_.value)(e.slug)),n("Cost")(fw(ih.value)(e.slug)),n("Map")(fw(d_.value)(e.slug))]),Xo("mt-3 d-md-none")([n("Stats")(mF(d_.value)(e.slug)),n("Cost")(mF(ih.value)(e.slug))])]))])},yge=function(e){var n=function(i){return JH("avatar-img rounded-circle")({src:i})},a=vr(" ")(WH(Qo(" ")(e.fullName))(xl(1))),t=mge("avatar-title rounded-circle text-uppercase")(a),o=function(i){return ke("")($H(i)(function(l){return" '"+l}))},u=function(i){return function(l){return hge("")([zH("")(i+": "),Ke(l)])}};return Se([Up("text-uppercase text-muted small mb-2")("Your host"),Xo("row align-items-center mb-4 pr-4")([wu("col-auto")(wu("avatar")(bn(t)(n)(e.pictureUrl))),wu("col")(Xo("row align-items-center justify-content-between")([Up("col-12 col-md-auto x-large")(e.fullName),wu("col-12 col-md-auto")(da(e.allStreamsUrl)(function(i){return ZG("t--host-streams")({href:i})("See all "+(Dge(e.totalStreams)+(" streams by "+e.firstName)))}))]))]),Se(Jo([jh(u("Undergrad College"))($H(e.undergrad.college)(function(i){return i+o(e.undergrad.year)})),jh(u("Major"))(e.undergrad.major),jh(u("Graduate College"))(e.gradCollege),jh(u("Work Experience"))(e.workExperience),jh(u("My Admissions Story"))(e.admissionsStory)]))])},wge=Xo("rounded bg-tan mb-3 overflow-hidden")([Xo("row")([wu("col-12 col-md")(Xo("m-4")([Ku(Y)("")("Get your essay reviewed by an expert"),$t(Y)("small")(` CollegeVine\u2019s network of admissions experts have helped students write essays that stand out to admissions officers. Work with an expert today to craft the perfect essay. `),ZG("btn btn-dark px-4")({href:v_({key:"utm_cv_source",value:"essay-livestream-cta"})(HH)})("Submit my essay for review")])),wu("d-none d-md-block col-12 col-md-auto")(yu()()("h-100")({src:"/img/livestreams/mkt-239-livestreams-advisors-essays-cta.svg"}))])]),bge=function(e){return Se([Up("text-uppercase text-muted small mb-2")("Description"),Xo("")([wu("col-6 col-md-4 float-right")(JH("img-fluid rounded")({src:e.imageUrl})),Xo("")(WH(Qo(` `)(e.description))(function(n){return gge("")({dangerouslySetInnerHTML:{__html:n}})([])}))])])},Ege=function(e){var n=e.paths.collegeFair+("?utm_cv_source=banner-livestream-watch-"+Rge(e.conference.id));return wu("card mt-3")(wu("card-body py-3")(Xo("row align-items-center")([wu("col-12 col-md-auto mb-3 mb-md-0")(Up("bg-warning rounded px-3 py-1 small mt-2 mt-md-0")("SPECIAL EVENT")),Xo("col-12 col-md mb-3 mb-md-0")([Ke("This livestream was part of the "),zH("")("\u{1F3AA} Student panel college fair"),Ke(". Recordings for all 100+ Q&A panels are available.")]),wu("col-12 col-md-auto")(ZG("btn btn-sm btn-outline-primary px-3")({href:n})("See all recordings"))])))},fb=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 M||e.conference.presenter instanceof M&&e.conference.guestPresenter instanceof T)return"col-12 col-md-6";if(e.conference.presenter instanceof M&&e.conference.guestPresenter instanceof M)return"col-12";throw new Error("Failed pattern match at Livestream.AboutLivestream (line 68, column 16 - line 72, column 35): "+[e.conference.presenter.constructor.name,e.conference.guestPresenter.constructor.name])}();return Se([ya(e.conference.collegeFair)(Ege(e)),function(){return e.featureFlags.mkt293LivestreamsEssayReviewCtaForAdvisorStreams&&e.conference.guestPresenter instanceof T&&e.conference.guestPresenter.value0 instanceof Rs?wge:$n}(),wu("card")(Xo("card-body")([qH("text-center mb-4")("About this livestream"),Xo("row")([Xo(n)([da(e.conference.school)(function(a){return wu("d-md-none")(Oh(a))}),bge(e.conference)]),Xo(n)([da(e.conference.guestPresenter)(function(a){return Nh(e.conference.id)(a)(e.user)({vineBelowConnectionLimit:e.vineBelowConnectionLimit})}),da(e.conference.school)(function(a){return wu("d-none d-md-block")(Oh(a))}),da(e.conference.presenter)(yge)])])]))])};var VH=un(tn),Ige=VH(Qn),Tge=Ma(Ve),Sge=xt(Nr),QH=W(ca),_b=W(yn),Cge=VH(_a),pb=W(aa),KH=Te(Y),db=Ku(Y),mb=Z0(me),hb=K0(me),kv=zf(me),hl=Y0(Y),Db=X0(me),gb=pe(ze),Bv=cs(Y),Rb=cs(We),yb=Wn(Y)()(),wb=Xn(ga),Fge=Hi(Ya),Gge=k(ze),Mge=an($s($s(Tg))),Age=Hi(Vu),Lge=Hi(u7),Pge=ne(Zu),xge=Ht(Y),Nge=Te(me),bb=function(){function e(){}return e.value=new e,e}(),YH=function(){function e(){}return e.value=new e,e}(),Uh=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),XH=function(){function e(){}return e.value=new e,e}(),ZH=function(){function e(){}return e.value=new e,e}(),eq=function(e){return function(n){return function(a){var t=function(u){return Ige(Tge(Sge(u)(function(i){return QH(ZH.value)})))(function(){return _b({ctas:n.ctas,stage:YH.value,error:M.value})})},o=function(u){if(u instanceof sl)return PO({fromConference:e.conference.id,cta:u.value0.conferenceId});if(u instanceof vl)return AO({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof fl)return LO({fromConference:e.conference.id,ctaId:u.value0.id});if(u instanceof _l)return MO({fromConference:e.conference.id,ctaId:u.value0.id});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 228, column 15 - line 236, column 83): "+[u.constructor.name])};if(a instanceof Uh)return t(Cge(o(a.value0))(function(){return QH(XH.value)}));if(a instanceof XH)return _b({ctas:n.ctas,error:n.error,stage:bb.value});if(a instanceof ZH)return _b({ctas:n.ctas,stage:bb.value,error:new T("That didn't work for some reason, try again")});throw new Error("Failed pattern match at Livestream.Ctas.LaunchCtas (line 211, column 24 - line 221, column 92): "+[a.constructor.name])}}},nq=function(e){return _b({stage:bb.value,error:M.value,ctas:e})},jge=function(){return Po(Wo(fn)([Ol.value,new ht(" "),Ul.value,new ht(", "),Bl.value,new ht(":"),wi.value,new ht(" "),Hl.value]))}(),aq=function(e){return function(n){if(e.ctas.length===0)return $n;var a=function(L){return L instanceof _l?pb(L.value0):M.value},t=function(L){return L instanceof vl?pb(L.value0):M.value},o=function(L){return L instanceof fl?pb(L.value0):M.value},u=function(L){return L instanceof sl?pb(L.value0):M.value},i=function(){if(e.stage instanceof bb)return $n;if(e.stage instanceof YH)return KH("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 190, column 24 - line 195, column 23): "+[e.stage.constructor.name])}(),l=function(L){return L.length===0?$n:Se([db("")("Referrals"),mb("table table-sm mb-0")([hb("")([kv("")([hl("")("Title"),hl("")("Actions")])]),Db("")(gb(L)(function(O){return kv("t--cta t--cta-referral")([Bv("pt-3")(O.title),Rb("text-nowrap")(yb("btn btn-white btn-sm px-4 t--open")({onClick:wb(n)(new Uh(new _l(O)))})("Launch CTA"))])}))])])},s=function(L){return L.length===0?$n:Se([db("")("General"),mb("table table-sm mb-0")([hb("")([kv("")([hl("")("Title"),hl("")("URL"),hl("")("Link Text"),hl("")("Actions")])]),Db("")(gb(Rf(Fge(function(O){return O.title}))(L))(function(O){return kv("t--cta t--cta-general")([Bv("pt-3")(function(){var $=Ct(O.autoDisplayMinutesFromStart);return $?"\u23F0 ":""}()+O.title),Bv("pt-3")(O.url),Bv("pt-3")(O.buttonText),Rb("text-nowrap")(yb("btn btn-white btn-sm px-4 t--open")({onClick:wb(n)(new Uh(new vl(O)))})("Launch CTA"))])}))])])},R=function(L){return L.length===0?$n:Se([db("")("Featured Service Providers"),mb("table table-sm mb-0")([hb("")([kv("")([hl("")("Advisors"),hl("")("Link Text"),hl("")("Actions")])]),Db("")(gb(L)(function(O){return kv("t--cta t--cta-featured-sp")([Bv("pt-3")(vr(", ")(Gge(function($){return $.name})(O.providers))),Bv("pt-3")(O.linkText),Rb("text-nowrap")(yb("btn btn-white btn-sm px-4 t--open")({onClick:wb(n)(new Uh(new fl(O)))})("Launch CTA"))])}))])])},d=function(L){return L.length===0?$n:Se([db("")("Upcoming events"),mb("table table-sm mb-0")([hb("")([kv("")([hl("")("Livestream"),hl("")("Date & Time"),hl("")("Actions")])]),Db("")(gb(Rf(Mge(Age(function(O){return O.startTime}))(Lge(function(O){return O.conferenceId})))(L))(function(O){return kv("t--cta t--cta-stream-"+Pge(O.conferenceId))([Bv("pt-3")(O.title),Bv("pt-3")(jge(O.startTime)+(" "+a_)),Rb("text-nowrap")(yb("btn btn-white btn-sm px-4 t--open")({onClick:wb(n)(new Uh(new sl(O)))})("Launch CTA"))])}))])])},y=zr(a)(e.ctas),I=zr(t)(e.ctas),b=zr(o)(e.ctas),S=zr(u)(e.ctas);return Se([xge("")("Calls to action"),Nge("t--ctas position-relative")([da(e.error)(function(L){return KH("alert alert-danger")(L)}),d(S),s(I),R(b),l(y),i])])}};var tq=ql(wc(Rc)),rq=Z(_a),Oge=AC(_e),kp=function(){function e(){}return e.value=new e,e}(),kh=function(){function e(){}return e.value=new e,e}(),Bh=function(){function e(){}return e.value=new e,e}(),oq={eq:function(e){return function(n){return e instanceof kp&&n instanceof kp||e instanceof kh&&n instanceof kh||e instanceof Bh&&n instanceof Bh}}},uq=tq("profile_validate_username_path")(function(e){return function(n){return rq(e({username:n}))(yc(function(a){return Oge("username validation result")(a)(function(t){return t==="available"?new T(kp.value):t==="taken"?new T(kh.value):t==="invalid"?new T(Bh.value):M.value})}))}}),iq=tq("profile_set_username_path")(function(e){return function(n){return rq(e({username:n}))(Zt)}});var Uge=we(Qt(Cl()(ki(ki(Sl)()({reflectSymbol:function(){return"username"}})(Pt))()({reflectSymbol:function(){return"result"}})(oq)))),eM=Te(me),lq=Te(We),kge=$t(Y),Bge=yu()(),Hh=Te(Y),Hge=fo()(),qge=Xn(vo),cq=Wn(Y)()(),Jge=Xn(ga),Wge=nl(Dv(Zi)),nM=un(tn)(Qn),$ge=lr(yn),aM=Ma(Ve),zge=ui(Ga),S_=W(yn),Vge=k(Ga),Qge=Z(_a),Kge=Sf(Nr),sq=W(ca),vq=function(){function e(){}return e.value=new e,e}(),fq=function(){function e(){}return e.value=new e,e}(),_q=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),pq=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dq=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}(),mq=function(){function e(){}return e.value=new e,e}(),hq=function(){function e(){}return e.value=new e,e}(),tM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rM=function(){function e(){}return e.value=new e,e}(),Dq=function(e){return function(n){var a=e.username!==""&&Tt(e.updating)&&Uge(e.validated)(new T({username:e.username,result:kp.value}));return Se([eM("row")([lq("col col-md-6")(kge("")("This username will keep your identity private in CollegeVine communities, livestreams, and on peer essay review leaderboards.")),lq("col-6 d-none d-md-block")(Bge("img-fluid")({src:"/img/illustrations/clipboards.svg"}))]),Hh("")("Your username:"),eM("input-group")([Hge("form-control")({autoFocus:!0,type:"text",value:e.username,onChange:qge(n)(function(t){return Ae.create(_q.create(Gs(t)))})})]),eM("d-flex mt-3")([cq("btn btn-light mr-3")({onClick:Jge(n)(new wn(rM.value))})("Cancel"),cq("btn btn-primary t--submit-username")({type:"button",disabled:!a,onClick:Wge(n)(function(){return a?new T(new Ae(mq.value)):M.value}())})("Save")]),da(e.validated)(function(t){if(t.result instanceof kp)return $n;if(t.result instanceof kh)return Hh("small text-danger")("Sorry, this username is already taken");if(t.result instanceof Bh)return Hh("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 80, column 37 - line 86, column 121): "+[t.result.constructor.name])}),da(e.updating)(function(t){if(t instanceof vq)return Hh("text-success")("Updating your username...");if(t instanceof fq)return Hh("small text-danger")("There was an error saving your username. Please try again.");throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 87, column 30 - line 91, column 95): "+[t.constructor.name])})])}},gq=function(e){return function(n){if(n instanceof Ae){if(n.value0 instanceof _q)return nM($ge(n.value0.value0!=="")(aM(zge(Yt(100))(new Ae(new pq(n.value0.value0))))))(function(){return S_({updating:e.updating,validated:e.validated,username:n.value0.value0})});if(n.value0 instanceof pq){if(n.value0.value0===e.username)return nM(aM(Vge(function(){var a=dq.create(n.value0.value0);return function(t){return Ae.create(a(t))}}())(uq(n.value0.value0))))(function(){return S_({username:e.username,validated:M.value,updating:M.value})});if($e)return S_(e)}if(n.value0 instanceof dq)return S_({updating:e.updating,username:e.username,validated:new T({username:n.value0.value0,result:n.value0.value1})});if(n.value0 instanceof mq)return nM(aM(Qge(Kge(iq(e.username)))(function(a){if(a instanceof Le)return sq(new wn(new tM(e.username)));if(a instanceof Me)return sq(new Ae(hq.value));throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 119, column 7 - line 123, column 48): "+[a.constructor.name])})))(function(){return S_({username:e.username,validated:M.value,updating:new T(vq.value)})});if(n.value0 instanceof hq)return S_({username:e.username,validated:e.validated,updating:new T(fq.value)});throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 100, column 31 - line 127, column 48): "+[n.value0.constructor.name])}if(n instanceof wn)return S_(e);throw new Error("Failed pattern match at Community.Profile.UsernameForm (line 99, column 1 - line 99, column 55): "+[e.constructor.name,n.constructor.name])}},Rq=function(e){return{username:e,validated:M.value,updating:M.value}};var Yge=Vr(),Xge=Pp(We)()(),Zge=Ua(me),eRe=Qa(Y),nRe=function(e){var n=Am(e);return function(){return function(a){return function(t){var o=Yge(a);return Xge({placement:rb,overlay:Se(n(t)),overlayStyle:Ka(o.overlayStyle)(ot({width:"15rem"}))})(Zge("d-inline-flex align-items-center text-secondary "+o.className)([eRe("d-inline-block fe fe-help-circle "+function(){var u=yi(o.anchorText);return u?"":"mr-2"}())(""),Ke(o.anchorText)]))}}}},Eb=function(e){var n=nRe(e)();return function(a){return n({className:a,anchorText:""})}};var oM=function(e){return e};var aRe=function(e){return e},yq=function(e){var n=Qe(e),a=aRe(e.Eq0());return{compare:function(t){return function(o){return c2(n(t)(o))}},Eq0:function(){return a}}};var wq=xn(Pn),qh=Ln(wq)(Fn(Cn)),bq=Mn(Gn),Jh=An(bq),Eq=On(jn),Wh=Nn(Eq),tRe=k(ae),Bp=function(){function e(){}return e.value=new e,e}(),Hp=function(){function e(){}return e.value=new e,e}(),qp=function(){function e(){}return e.value=new e,e}(),Jp=function(){function e(){}return e.value=new e,e}(),Wp=function(){function e(){}return e.value=new e,e}(),C_=function(){function e(){}return e.value=new e,e}(),rRe={to:function(e){if(e instanceof ge)return Bp.value;if(e instanceof ie&&e.value0 instanceof ge)return Hp.value;if(e instanceof ie&&e.value0 instanceof ie&&e.value0.value0 instanceof ge)return qp.value;if(e instanceof ie&&e.value0 instanceof ie&&e.value0.value0 instanceof ie&&e.value0.value0.value0 instanceof ge)return Jp.value;if(e instanceof ie&&e.value0 instanceof ie&&e.value0.value0 instanceof ie&&e.value0.value0.value0 instanceof ie&&e.value0.value0.value0.value0 instanceof ge)return Wp.value;if(e instanceof ie&&e.value0 instanceof ie&&e.value0.value0 instanceof ie&&e.value0.value0.value0 instanceof ie&&e.value0.value0.value0.value0 instanceof ie)return C_.value;throw new Error("Failed pattern match at Common.Persona (line 25, column 1 - line 25, column 34): "+[e.constructor.name])},from:function(e){if(e instanceof Bp)return new ge(xe.value);if(e instanceof Hp)return new ie(new ge(xe.value));if(e instanceof qp)return new ie(new ie(new ge(xe.value)));if(e instanceof Jp)return new ie(new ie(new ie(new ge(xe.value))));if(e instanceof Wp)return new ie(new ie(new ie(new ie(new ge(xe.value)))));if(e instanceof C_)return new ie(new ie(new ie(new ie(new ie(xe.value)))));throw new Error("Failed pattern match at Common.Persona (line 25, column 1 - line 25, column 34): "+[e.constructor.name])}},Iq=Un(rRe)(qh(qh(qh(qh(qh(wq)(bq))(Jh))(Jh))(Jh))(Jh))(Wh(Wh(Wh(Wh(Wh(Eq))))))(Jh);var oRe={eq:function(e){return function(n){return e instanceof Bp&&n instanceof Bp||e instanceof Hp&&n instanceof Hp||e instanceof qp&&n instanceof qp||e instanceof Jp&&n instanceof Jp||e instanceof Wp&&n instanceof Wp||e instanceof C_&&n instanceof C_}}},Ib=function(e){if(e instanceof Bp)return"student";if(e instanceof Hp)return"transfer_student";if(e instanceof qp)return"counselor";if(e instanceof Jp)return"iec";if(e instanceof Wp)return"parent";if(e instanceof C_)return"sem_user";throw new Error("Failed pattern match at Common.Persona (line 43, column 13 - line 49, column 24): "+[e.constructor.name])},Tq=function(){var e=In(Ib)(Iq);return ta(Ye)({parse:function(n){return n==="unknown"?new T(M.value):tRe(T.create)(e(n))},default:M.value,diagnosticName:"User Persona"})}(),Sq=function(e){if(e instanceof Bp)return"Student";if(e instanceof Hp)return"Transfer Student";if(e instanceof qp)return"High School Counselor";if(e instanceof Jp)return"Independent Educational Counselor (IEC)";if(e instanceof Wp)return"Parent";if(e instanceof C_)return"SEM User";throw new Error("Failed pattern match at Common.Persona (line 33, column 11 - line 39, column 24): "+[e.constructor.name])},Cq=function(){return bf(oRe)(C_.value)(Iq)}();function Fq(){typeof fbq!="undefined"&&fbq("trackCustom","LivestreamRegistrationComplete")}var uRe=W(rt),iRe=ts($c(!1));var Tb=function(e){if(ts(ec(iRe)))return uRe(Ee);if($e)return Fq;throw new Error("Failed pattern match at Livestream.Upcoming.Register.Tracking (line 18, column 1 - line 18, column 53): "+[e.constructor.name])};var uM=k(Dr);var iM=Z(Mu),lRe=W(qc),cRe=To(j2);var Gq=function(e){return e},Mq=function(e){return function(n){return uM(function(a){return a.result})(e({substring:n,position:0}))}};var Sc={map:function(e){return function(n){var a=uM(function(t){return{result:e(t.result),suffix:t.suffix}});return function(t){return a(n(t))}}}},F_=function(e){return function(n){return new Me({pos:n.position,error:e})}},G_={apply:function(e){return function(n){return function(a){return iM(e(a))(function(t){return iM(n(t.suffix))(function(o){return lRe({result:t.result(o.result),suffix:o.suffix})})})}}},Functor0:function(){return Sc}};var As={bind:function(e){return function(n){return function(a){return iM(e(a))(function(t){return Gq(n(t.result))(t.suffix)})}}},Apply0:function(){return G_}};var Ls={pure:function(e){return function(n){return new Le({result:e,suffix:n})}},Apply0:function(){return G_}};var sRe={Applicative0:function(){return Ls},Bind1:function(){return As}},Aq={tailRecM:function(e){return function(n){var a=function(t){if(t.result instanceof Jt)return new Jt({state:t.result.value0,str:t.suffix});if(t.result instanceof kt)return new kt({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 cRe(function(o){return uM(a)(Gq(e(o.state))(o.str))})({state:n,str:t})}}},Monad0:function(){return sRe}};var M_={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 Sc}},vRe={empty:F_("No alternative"),Alt0:function(){return M_}},Lq={Applicative0:function(){return Ls},Plus1:function(){return vRe}};var Pq=ma(M_),lM=Z(As),cM=W(Ls),fRe=k(Sc);var _Re=oo(G_),pRe=Yn(G_);var sM=function(e){return function(n){return Pq(e)(F_(n))}},vM=function(e){return function(n){var a=e(n);return a instanceof Me?new Me({pos:n.position,error:a.value0.error}):a}},Cc=function(e){return Pq(lM(e)(function(n){return cM(Ee)}))(cM(Ee))};var xq=function(e){return function(n){return new Nu(e,n)}};var dRe=function(e){return function(n){var a=e(n);if(a instanceof Le){var t=n.position65535;return t?e(n):Uq(a.value0)}if(a instanceof M)return e(n);throw new Error("Failed pattern match at StringParser.CodePoints (line 57, column 3 - line 65, column 27): "+[a.constructor.name])})}(),Hv=function(e){return vM(Oq(gRe)(function(n){var a=e(n);return a?Uq(n):F_("Character "+(kq(n)+" did not satisfy predicate"))}))},Ci=function(e){return sM(Hv(function(n){return n===e}))("Could not match character "+kq(e))};var RRe=function(e,n,a){var t=0,o;return function(u){if(t===2)return o;if(t===1)throw new ReferenceError(e+" was needed before it finished initializing (module "+n+", line "+u+")",n,u);return t=1,o=a(),t=2,o}},yRe=St(),fM=k(Sc),wRe=Fl(uR)(yt),bRe=k(XI),go=un(tn)(As),Zo=It(Sc),Ps=W(Ls),ei=ma(M_);var $p=oo(G_),qv=Z(As),Hq=Fl(Co)(yt);var Tr=function(e){return yRe(_y(e))},_M=function(e){return fM(function(){var n=bRe(ju);return function(a){return wRe(n(a))}}())(Nq(Hv(e)))},qq=function(e){return go(Zo(e))(function(){return go(Zo(Sb(e)))(function(){return Ps(Ee)})})},Sb=function(e){return ei(qq(e))(Ps(Ee))},Jq=function(e){return go(Zo(Hv(e)))(function(){return go(Zo(Sb(Hv(e))))(function(){return Ps(Ee)})})},ERe=Ci(Tr(0));var Wq=Ci(` `),$q=function(e){return e===" "||e===" "},IRe=Hv($q),pM=Jq($q),TRe=function(e){var n=e>="0"&&e<="9",a=e>="a"&&e<="z"||e>="A"&&e<="Z";return n||a},Fc=function(e){return function(n){return function(a){return a>=e&&a<=n}}},SRe=Fc(Tr(33))(Tr(126)),CRe=Hv(SRe),dM=function(e){return function(n){return Yc(ju(n))(e)}},Cb=function(e){return Fc(Tr(1))(Tr(8))(e)||Fc(Tr(14))(Tr(31))(e)||dM("\v\f\x7F")(e)},FRe=function(e){return Fc(Tr(33))(Tr(39))(e)||Fc(Tr(42))(Tr(91))(e)||Fc(Tr(93))(Tr(126))(e)||Cb(e)},GRe=function(e){return Fc(Tr(33))(Tr(90))(e)||Fc(Tr(94))(Tr(126))(e)||Cb(e)},MRe=Hv(Cb),ARe=function(e){return dM(ju(Tr(33)))(e)||Fc(Tr(35))(Tr(91))(e)||Fc(Tr(93))(Tr(126))(e)||Cb(e)};var zq=Ci("\r"),Vq=Zo($p(zq)(Wq)),zp=function(){var e=qq($p(Vq)(pM)),n=$p(pM)(Cc($p(Vq)(pM)));return ei(n)(e)}(),Qq=function(){var e=go(Zo(Ci("\\")))(function(){return ei(CRe)(ei(IRe)(ei(Wq)(ei(zq)(ei(MRe)(ERe)))))});return qv(e)(function(n){return Ps("\\"+ju(n))})}(),LRe=ei(_M(ARe))(Qq),PRe=function(){var e=go(Zo(Ci('"')))(function(){return qv(A_($p(Cc(zp))(LRe)))(function(n){return go(Zo(Cc(zp)))(function(){return go(Zo(Ci('"')))(function(){return Ps(n)})})})});return fM(function(n){return'"'+(Hq(n)+'"')})(e)}(),Kq=RRe("comment","Text.Email.Parser",function(){return go(Zo(Ci("(")))(function(){return go(Sb(ei(Jq(FRe))(ei(Zo(Qq))(ei(Kq(155))(zp)))))(function(){return go(Zo(Ci(")")))(function(){return Ps(Ee)})})})}),xRe=Kq(152),Fb=Sb(ei(xRe)(zp)),NRe=go(Cc(Fb))(function(){return go(Zo(Ci("[")))(function(){return qv(A_($p(Cc(zp))(_M(GRe))))(function(e){return go(Cc(zp))(function(){return go(Zo(Ci("]")))(function(){return go(Cc(Fb))(function(){return Ps("["+(Hq(e)+"]"))})})})})})}),jRe=function(){var e=function(n){return TRe(n)||dM("!#$%&'*+/=?^_`{|}~-")(n)};return _M(e)}(),Yq=function(){var e=go(Zo(Cc(Fb)))(function(){return qv(ei(jRe)(PRe))(function(a){return go(Zo(Cc(Fb)))(function(){return Ps(a)})})}),n=jq(e)(Ci("."));return fM(Lu(uR)(yt)("."))(n)}(),ORe=ei(Yq)(NRe),URe=Yq,mM=qv(URe)(function(e){return qv(Ci("@"))(function(){return qv(ORe)(function(n){return qv(Bq)(function(){return Ps({localPart:e,domainPart:n})})})})});var BRe=function(e){return Mq(mM)(e)},HRe=function(){var e=fr(Au)(ne(lf()()(sf({reflectSymbol:function(){return"error"}})(vf({reflectSymbol:function(){return"pos"}})(Ze))(Vt))));return function(n){return e(BRe(n))}}(),$h=function(e){var n=HRe(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 hM=Vo(Y),Gb=fo()(),qRe=Xn(vo),Xq=XN(me)()(),Zq=pe(ae),eJ=nl(JR(Zi)),nJ=k(ae),Mb=ZN(Y)()(),aJ=pe(ze),zh=Te(me),JRe=rF(),DM=ne(Ze),WRe=PI(fn)(st),$Re=np(me)()(),L_=Te(We),tJ=Wn(Y)()(),zRe=Xn(ga),VRe=sr(zo),QRe=ne(Zu),Vh=W(yn),rJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),iJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Vp=function(e){return function(n){return function(a){return function(t){var o=function(d){return function(y){return function(I){return function(b){return function(S){return function(L){return Se([hM("")(y),Gb("form-control")({type:"text",name:"livestream_public_registration_form["+(d+"]"),value:b,placeholder:I,autoFocus:L.autoFocus,onChange:qRe(t)(function(O){return S(Gs(O))})})])}}}}}},u=[hM("")("I'm a..."),Xq("form-control")({name:"livestream_public_registration_form[i_am_a]",value:ke("")(Zq(a.persona)(Ib)),onChange:eJ(t)(function(d){return nJ(lJ.create)(Tq(AG(d)))})})([ya(Tt(a.persona))(Mb("")({value:""})("Select one...")),Se(aJ(Cq)(function(d){return Mb("")({value:Ib(d)})(Sq(d))}))])],i=zh("d-flex align-items-center")([Ke("Already have an account? "),JRe({text:"Log in",className:"btn btn-link px-2",auth0ActiveTab:lw,openInNewTab:!1})]),l=[hM("")("Graduation year"),Xq("form-control")({name:"livestream_public_registration_form[high_school_graduation_year]",value:ke("")(Zq(a.gradYear)(DM)),onChange:eJ(t)(function(d){return nJ(iJ.create)(Vc(AG(d)))})})([ya(Tt(a.gradYear))(Mb("")({value:""})("Select one...")),Se(aJ(n.allowedGradYears)(function(d){return Mb("")({value:DM(d)})(DM(d))}))])],s=ke({path:"",token:""})(Vy("livestreams_register_path")),R=WRe([$h(a.email),a.firstName!=="",a.lastName!=="",Ct(a.gradYear),Ct(a.persona)]);return Se([i,$Re("")({action:s.path,method:"POST"})([L_("row")(L_("col")(o("email")("Email")("Your email")(a.email)(rJ.create)({autoFocus:e.autoFocus}))),L_("row mt-3")(L_("col")(o("first_name")("First name")("Your first name")(a.firstName)(oJ.create)({autoFocus:!1}))),L_("row mt-3")(L_("col")(o("last_name")("Last name")("Your last name")(a.lastName)(uJ.create)({autoFocus:!1}))),zh("row mt-3")([zh("col-6")(l),zh("col-6")(u)]),L_("row mt-3")(zh("col-12")([tJ("btn btn-primary w-100 mt-3 t--register")({type:"submit",disabled:!R,onClick:zRe(Tb)(Ee)})("Register"),da(e.cancelButton)(function(d){return tJ("btn btn-outline-primary w-100 mt-3 t--cancel-registration")({type:"button",onClick:VRe(d.click)})(d.text)})])),Gb("")({type:"hidden",name:"authenticity_token",value:s.token}),Gb("")({type:"hidden",name:"register_for_conference_id",value:QRe(n.conference.id)}),Gb("")({type:"hidden",name:"utm_cv_source",value:n.paths.utmSource})])])}}}},Qp=function(e){return function(n){if(n instanceof rJ)return Vh({firstName:e.firstName,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,email:n.value0});if(n instanceof oJ)return Vh({email:e.email,gradYear:e.gradYear,lastName:e.lastName,persona:e.persona,firstName:n.value0});if(n instanceof uJ)return Vh({email:e.email,firstName:e.firstName,gradYear:e.gradYear,persona:e.persona,lastName:n.value0});if(n instanceof iJ)return Vh({email:e.email,firstName:e.firstName,lastName:e.lastName,persona:e.persona,gradYear:new T(n.value0)});if(n instanceof lJ)return Vh({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 176, column 16 - line 186, column 36): "+[n.constructor.name])}},Kp=function(){return{email:"",firstName:"",lastName:"",gradYear:M.value,persona:M.value}}();var cJ=Te(me),KRe=Eb(Y),YRe=Mt(Y)()(),Yp=function(e){return Se([cJ("")([Ke(` For college information sessions, we may tell the college that you attended. You can opt out anytime in your profile. `),KRe("")(` 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. `)]),cJ("")([Ke(` By completing this registration form you agree to CollegeVine\u2019s Website Terms and Conditions, which can be found `),YRe("")({href:e.paths.termsAndConditions})("here"),Ke(".")])])};var gM={eq:function(e){return function(n){return e===n}}};var xs=un(tn)(Qn),XRe=tl(Ve),sJ=Sa(),ZRe=Ii(sJ(B({reflectSymbol:function(){return"author"}})(sJ(B({reflectSymbol:function(){return"cvid"}})(_e)(B({reflectSymbol:function(){return"username"}})(_e)(rn))))(B({reflectSymbol:function(){return"id"}})(on)(B({reflectSymbol:function(){return"isFromHQ"}})(Ia)(B({reflectSymbol:function(){return"isPublic"}})(Ia)(B({reflectSymbol:function(){return"text"}})(_e)(B({reflectSymbol:function(){return"time"}})(_e)(rn))))))))(Ve),Xp=Ma(Ve),Ab=W(ca),Sr=W(yn),RM=Wl(),eye=$t(me),yM=Ua(Y),wM=Vo(Y),nye=Qa(Y),P_=Te(me),Zp=Te(We),Lb=Wn(Y)()(),ed=Xn(ga),Qh=Te(Y),vJ=Ht(Y),fJ=pe(ze),aye=or(me)()(),tye=Ua(me),_J=Z(en),rye=VR()(),oye=Xn(vo),uye=nl(Dv(Zi)),iye=ep(me),lye=fo()(),cye=Eb(Y),sye=we(Qt(Pt)),vye=pe(ae),pJ=Ho(yq(ru(Vu))),fye=Oo(gM),dJ=k(Ga),_ye=an(Rt),pye=Hg(gM),mJ=it(wr(Ga)),hJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),DJ=function(){function e(){}return e.value=new e,e}(),gJ=function(){function e(){}return e.value=new e,e}(),x_=function(){function e(){}return e.value=new e,e}(),Pb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),xb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Nb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),RJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),yJ=function(){function e(){}return e.value=new e,e}(),bM=function(){function e(){}return e.value=new e,e}(),EM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),wJ=function(){function e(){}return e.value=new e,e}(),bJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),IM=function(){function e(){}return e.value=new e,e}(),jb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Ob=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),EJ=function(){function e(){}return e.value=new e,e}(),nd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Kh=function(){function e(){}return e.value=new e,e}();var IJ=function(e){return xs(XRe(function(n){return Ae.create(EM.create(o_(n)))})(ZRe(e.pusher.dataChannel)("question")))(function(){return xs(Xp(Ab(new Ae(wJ.value))))(function(){return Sr({newQuestionText:"",newQuestionBroadcast:!1,questions:[],modal:x_.value})})})},TJ=function(e){if(e.user instanceof M)return new T(new Ae(IM.value));if(e.user instanceof T&&e.user.value0.username instanceof M)return new T(new Ae(EJ.value));if(e.user instanceof T&&e.user.value0.username instanceof T)return M.value;throw new Error("Failed pattern match at Livestream.Live.Questions (line 363, column 3 - line 369, column 14): "+[e.user.constructor.name])},dye=function(){return Po(Wo(fn)([Bl.value,new ht(":"),wi.value,new ht(" "),Hl.value]))}(),SJ=function(e){return function(n){return function(a){var t=function(s){return a(Ae.create(s))},o=function(s){return RM({onDismiss:t(Kh.value),body:Se([eye("")([yM("")("By: "),wM("")("@"+s.author.username)]),nye("")(s.text),ss(""),P_("row align-items-center mb-3")([Zp("col-4")(Lb("btn w-100 btn-"+function(){return s.isPublic?"secondary":"success"}())({onClick:ed(t)(new Ob(DJ.value))})(function(){return s.isPublic?"Hide from audience":"Show to audience"}())),Qh("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."}())]),P_("row align-items-center")([Zp("col-4")(Lb("btn w-100 btn-danger")({onClick:ed(t)(new Ob(gJ.value))})("Ban this user")),P_("col")([Ke("This user will not be able to ask any more questions "),wM("")("in this livestream. "),yM("text-danger")("There is no way to un-ban a user!")])])]),bodyClass:"t--question-modal",footer:Se([Lb("btn btn-outline-primary px-4")({onClick:ed(t)(Kh.value)})("Never mind, close this dialog")])})},u=function(s){return RM({onDismiss:t(Kh.value),title:vJ("")("Please introduce yourself to participate:"),bodyClass:"t--questions-registration-form",body:Se([Vp({cancelButton:M.value,autoFocus:!0})(e)(s)(function(R){return t(jb.create(R))}),Zp("small mt-3")(Yp(e))])})},i=function(s){return RM({onDismiss:t(Kh.value),title:vJ("")("Please select a user name"),body:Dq(s)(function(R){return t(nd.create(R))}),bodyClass:"t--username-modal"})},l=function(s){var R=function(y){return function(I){return function(b){return Se([Qh("ml-2 badge badge-"+I)(y),da(b)(function(S){return Qh("ml-2 text-secondary")(dye(S))})])}}},d=s.isFromHQ&&s.isPublic;return d?R("CollegeVine")("success")(s.time):s.isPublic?R("Question")("warning")(M.value):$n};return Se([Zp("position-relative h-100")(Zp("d-flex flex-column position-absolute-fullsize")(P_("d-flex flex-column flex-grow-1 min-height-0")([P_("flex-grow-1 min-height-0 overflow-y-auto bg-white border rounded mb-2 p-2 t--questions-list")(fJ(n.questions)(function(s){return aye("p-1 t--question"+function(){return e.isPrivilegedUser?" cursor-pointer":""}())({onClick:ed(t)(new Ob(new hJ(s)))})([tye("small d-inline-flex align-items-center")([wM("")("@"+s.author.username),l(s),Ke(":")]),yM("ml-1")(s.text)])})),P_("")([da(_J(e.user)(function(s){return s.username}))(function(s){return Qh("small text-secondary mt-2")("@"+s)}),rye("form-control t--question-text")({onChange:oye(t)(function(s){return RJ.create(ob(s))}),onClick:uye(a)(TJ(e)),placeholder:"Ask a question...",rows:1,value:n.newQuestionText}),ya(e.isPrivilegedUser)(Zp("form-check my-2")(iye("form-check-label d-flex align-items-center t--broadcast-checkbox")([lye("form-check-input mr-2 mt-0")({type:"checkbox",checked:n.newQuestionBroadcast,onChange:ed(t)(yJ.value)}),Qh("badge badge-info bg-info text-dark mr-2")("HQ"),Ke("Send to all viewers")]))),P_("d-flex justify-content-end align-items-center")([cye("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. `),Lb("mt-2 px-5 btn-sm btn btn-primary t--submit-question")({onClick:ed(t)(bM.value),disabled:n.newQuestionText===""})(function(){return n.newQuestionBroadcast?"Send to all":"Send to host"}())])])]))),function(){if(n.modal instanceof x_)return $n;if(n.modal instanceof xb)return u(n.modal.value0);if(n.modal instanceof Pb)return o(n.modal.value0);if(n.modal instanceof Nb)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])}()])}}},mye=function(e){return function(n){return sye(vye(e.user)(function(a){return a.cvid}))(new T(n.author.cvid))||n.isPublic||e.isPrivilegedUser}},CJ=function(e){return function(n){return function(a){if(a instanceof wn)return Sr(n);if(a instanceof Ae){if(a.value0 instanceof RJ){var t=TJ(e);if(t instanceof T)return xs(Xp(Ab(t.value0)))(function(){return Sr(n)});if(t instanceof M)return Sr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,questions:n.questions,newQuestionText:a.value0.value0});throw new Error("Failed pattern match at Livestream.Live.Questions (line 250, column 5 - line 255, column 46): "+[t.constructor.name])}if(a.value0 instanceof yJ)return Sr({modal:n.modal,newQuestionText:n.newQuestionText,questions:n.questions,newQuestionBroadcast:!n.newQuestionBroadcast});var t=function(o){if(a.value0 instanceof bM)return xs(Xp(Ab(new Ae(IM.value))))(function(){return Sr(n)});if(a.value0 instanceof EM)return Sr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:pJ(function(l){return oM(function(s){return s.time}(l))})(iu(mye(e))(qo(a.value0.value0)(iu(function(){var l=fye(a.value0.value0.id);return function(s){return l(function(R){return R.id}(s))}}())(n.questions))))});if(a.value0 instanceof wJ)return xs(Xp(dJ(function(l){return Ae.create(bJ.create(l))})(ew(e.conference.id))))(function(){return Sr(n)});if(a.value0 instanceof bJ){var u=fJ(a.value0.value0)(function(l){return l.id});return Sr({modal:n.modal,newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:pJ(function(l){return oM(function(s){return s.time}(l))})(_ye(a.value0.value0)(iu(function(l){return pye(l.id)(u)})(n.questions)))})}if(a.value0 instanceof IM)return Sr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new xb(Kp)});var i=function(l){if(a.value0 instanceof jb)return Sr(n);if(a.value0 instanceof EJ)return Sr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new Nb(Rq(ke("")(_J(e.user)(function(R){return R.username}))))});if(a.value0 instanceof nd&&a.value0.value0 instanceof wn&&a.value0.value0.value0 instanceof tM)return xs(Xp(Ab(new wn(a.value0.value0.value0.value0))))(function(){return Sr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:x_.value})});if(a.value0 instanceof nd&&a.value0.value0 instanceof wn&&a.value0.value0.value0 instanceof rM)return Sr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:x_.value});var s=function(R){if(a.value0 instanceof nd&&$e)return Sr(n);if(a.value0 instanceof Kh)return Sr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:x_.value});if(a.value0 instanceof Ob){if(e.isPrivilegedUser){if(a.value0.value0 instanceof hJ)return Sr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new Pb(a.value0.value0.value0)});var d=function(y){var I=function(b){return Sr(n)};return a.value0.value0 instanceof gJ&&n.modal instanceof Pb?xs(Va(OO({conferenceId:e.conference.id,userCvid:n.modal.value0.author.cvid})))(function(){return Sr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:x_.value})}):I(!0)};return a.value0.value0 instanceof DJ&&n.modal instanceof Pb?xs(Va(FO({questionId:n.modal.value0.id,isPublic:!n.modal.value0.isPublic})))(function(){return Sr({newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:x_.value})}):d(!0)}if($e)return Sr(n)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 246, column 1 - line 246, column 76): "+[a.value0.constructor.name])};return a.value0 instanceof nd&&n.modal instanceof Nb?mJ(function(R){return Ae.create(nd.create(R))})(function(R){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new Nb(R)}})(gq(n.modal.value0)(a.value0.value0)):s(!0)};return a.value0 instanceof jb&&n.modal instanceof xb?mJ(function(l){return Ae.create(jb.create(l))})(function(l){return{newQuestionBroadcast:n.newQuestionBroadcast,newQuestionText:n.newQuestionText,questions:n.questions,modal:new xb(l)}})(Qp(n.modal.value0)(a.value0.value0)):i(!0)};return a.value0 instanceof bM&&e.user instanceof T?xs(Xp(dJ(function(o){return Ae.create(EM.create(o))})(GO({conferenceId:e.conference.id,text:n.newQuestionText,hqBroadcast:n.newQuestionBroadcast}))))(function(){return Sr({modal:n.modal,questions:n.questions,newQuestionText:"",newQuestionBroadcast:!1})}):t(!0)}throw new Error("Failed pattern match at Livestream.Live.Questions (line 246, column 1 - line 246, column 76): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}};var Ub,hye=new Uint8Array(16);function TM(){if(!Ub&&(Ub=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Ub))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ub(hye)}var FJ=/^(?:[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 Dye(e){return typeof e=="string"&&FJ.test(e)}var SM=Dye;var xo=[];for(kb=0;kb<256;++kb)xo.push((kb+256).toString(16).substr(1));var kb;function gye(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(xo[e[n+0]]+xo[e[n+1]]+xo[e[n+2]]+xo[e[n+3]]+"-"+xo[e[n+4]]+xo[e[n+5]]+"-"+xo[e[n+6]]+xo[e[n+7]]+"-"+xo[e[n+8]]+xo[e[n+9]]+"-"+xo[e[n+10]]+xo[e[n+11]]+xo[e[n+12]]+xo[e[n+13]]+xo[e[n+14]]+xo[e[n+15]]).toLowerCase();if(!SM(a))throw TypeError("Stringified UUID is invalid");return a}var GJ=gye;function Rye(e,n,a){e=e||{};var t=e.random||(e.rng||TM)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){a=a||0;for(var o=0;o<16;++o)n[a+o]=t[o];return n}return GJ(t)}var CM=Rye;var MJ=CM;var yye=function(e){return e},FM=function(e){return e};var GM=Z(tr)(MJ)(function(){var e=W(rt);return function(n){return e(yye(n))}}());var ad=Ma(Ve),AJ=un(tn),wye=AJ(_a),bye=an(RR),Eye=k(Ga),Yh=Bn(Ve),Iye=Qa(Y),Tye=yu()(),LJ=or(We)()(),PJ=Nd(Vu),Sye=Io(ar),Cye=Jn(du),Fye=ne(nx),xJ=ne(cf),Gye=k(ze),Gc=AJ(Qn),Mye=tl(Ve),Aye=Ii(Sa()(B({reflectSymbol:function(){return"authorTag"}})(_e)(B({reflectSymbol:function(){return"kind"}})(_e)(rn))))(Ve),Bb=k(zn),Jv=W(yn),NJ=tt(k0),jJ=xd(Vu),Lye=W(ca),MM=sc(O0),Pye=Te(me),xye=pe(ze),Nye=Wn(me)()(),jye=Xn(ga),Oye=Ua(Y),Hb=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}(),Xh=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}(),OJ=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),LM=function(e){return ad(wye(Yt(bye(e)(10)))(function(){return Eye(AM.create)(Yh(Xu))}))},UJ=50,kJ=function(e){var n=function(o){return Iye("text-white fe fe-"+o)("")},a=function(){if(e instanceof bs)return n("heart");if(e instanceof Gv)return n("thumbs-up");if(e instanceof u_)return n("thumbs-down");if(e instanceof Mv)return n("file-text");if(e instanceof Av)return Tye("")({src:"/img/icons/smile-white.svg",style:ot({width:"1em"})});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 158, column 12 - line 163, column 108): "+[e.constructor.name])}(),t=function(){if(e instanceof bs)return"#F0747B";if(e instanceof Gv)return"#008CFD";if(e instanceof u_)return"#6E84A3";if(e instanceof Mv)return"#18A668";if(e instanceof Av)return"#F6C343";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 165, column 23 - line 170, column 34): "+[e.constructor.name])}();return LJ("d-flex justify-content-center align-items-center rounded-circle")({style:ot({backgroundColor:t,height:"1.5rem",width:"1.5rem"})})(a)},BJ=6,HJ=function(){return BJ*1e3}(),qJ=function(e){return function(n){var a=function(t){if(PJ(t.removeAt)(e.currentTime))return $n;var o=Ft(Sye(Cye(Xi(DT(t.startDecayAt))))(10)),u=function(){var d=o<=3;if(d)return"linear";var y=o<=7;return y?"ease-in":"ease"}(),i=t.reaction.authorTag===e.authorTag,l=1+(o-5)/4,s=PJ(t.startDecayAt)(e.currentTime),R=BJ+(o-5)/10;return LJ("position-absolute mb-4 mt-2")({key:Fye(t.startDecayAt),style:ot({right:xJ(l)+"rem",top:function(){return s?"0":"90%"}(),opacity:function(){return s?0:i?1:.6}(),transitionProperty:"top opacity",transitionDuration:xJ(R)+"s",transitionTimingFunction:u})})(kJ(t.reaction.kind))};return Se(Gye(a)(e.reactions))}},JJ=function(e){return Gc(Mye(function(n){return new Xh(D7(n),M.value)})(Aye(e.pusher.dataChannel)("reaction")))(function(){return Gc(ad(Yh(Bb(function(n){return OJ.create(FM(n))})(GM))))(function(){return Gc(ad(Yh(Bb(AM.create)(Xu))))(function(){return Jv({authorTag:"",currentTime:NJ,coolDownUntil:NJ,reactions:[]})})})})},WJ=800,$J=function(e){return function(n){return function(a){if(a instanceof Hb&&a.value1 instanceof M)return Gc(ad(Yh(Bb(function(){var t=Hb.create(a.value0);return function(o){return t(T.create(o))}}())(Xu))))(function(){return Jv(n)});if(a instanceof Hb&&a.value1 instanceof T){if(jJ(n.coolDownUntil)(a.value1.value0))return Gc(ad(Lye(new Xh({kind:a.value0,authorTag:n.authorTag},new T(a.value1.value0)))))(function(){return Jv(n)});if($e)return Gc(Va(xO(e.conference.id)({authorTag:n.authorTag,kind:a.value0})))(function(){return Gc(LM(WJ))(function(){return Jv({authorTag:n.authorTag,currentTime:n.currentTime,reactions:n.reactions,coolDownUntil:ke(a.value1.value0)(MM(WJ)(a.value1.value0))})})})}if(a instanceof Xh&&a.value1 instanceof M)return Gc(ad(Yh(Bb(function(){var t=Xh.create(a.value0);return function(o){return t(T.create(o))}}())(Xu))))(function(){return Jv(n)});if(a instanceof Xh&&a.value1 instanceof T)return Gc(LM(UJ))(function(){return Gc(LM(HJ))(function(){var t={reaction:a.value0,startDecayAt:ke(a.value1.value0)(MM(UJ)(a.value1.value0)),removeAt:ke(a.value1.value0)(MM(HJ)(a.value1.value0))};return Jv({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:w0(n.reactions)(t),currentTime:a.value1.value0})})});if(a instanceof OJ)return Jv({coolDownUntil:n.coolDownUntil,currentTime:n.currentTime,reactions:n.reactions,authorTag:a.value0});if(a instanceof AM)return Jv({authorTag:n.authorTag,coolDownUntil:n.coolDownUntil,reactions:iu(function(t){return jJ(t.removeAt)(a.value0)})(n.reactions),currentTime:a.value0});throw new Error("Failed pattern match at Livestream.Live.Reactions (line 176, column 22 - line 219, column 8): "+[a.constructor.name])}}},zJ=function(e){return function(n){var a=function(t){if(t instanceof bs)return"love this";if(t instanceof Gv)return"helpful";if(t instanceof u_)return"not helpful";if(t instanceof Mv)return"taking notes";if(t instanceof Av)return"LOL";throw new Error("Failed pattern match at Livestream.Live.Reactions (line 144, column 13 - line 149, column 30): "+[t.constructor.name])};return Pye("d-flex justify-content-end my-2")(xye([bs.value,Av.value,Gv.value,Mv.value])(function(t){return Nye("btn bg-light d-flex align-items-center p-0 ml-3")({onClick:jye(n)(new Hb(t,M.value)),style:ot({borderRadius:"1em"})})([kJ(t),Oye("d-none d-md-inline text-secondary small ml-2 mr-3")(a(t))])}))}};var VJ=un(tn),Uye=Z(_a),PM=Bn(Ve),qb=W(ca),Jb=$t(Y),Wb=ne(Ze),Zh=VJ(Qn),eD=Ma(Ve),Dl=W(yn),QJ=xt(Nr),KJ=oo(LR),YJ=k(Ga),kye=ko(yn)(Pu),Bye=Qu(es),XJ=Te(Y),Hye=Jl(),qye=Ht(Y),ZJ=Wn(Y)()(),xM=Xn(ga),eW=Te(We),Jye=Wn(me)()(),Wye=Qa(Y),$ye=Te(me),nW=function(){function e(){}return e.value=new e,e}(),aW=function(){function e(){}return e.value=new e,e}(),tW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rW=function(){function e(){}return e.value=new e,e}(),oW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uW=function(){function e(){}return e.value=new e,e}(),iW=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),NM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lW=function(){function e(){}return e.value=new e,e}(),cW=function(){function e(){}return e.value=new e,e}(),jM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),OM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),$b=function(){function e(){}return e.value=new e,e}(),sW=VJ(_a)(Yt(1e3))(function(){return Uye(PM(Xu))(function(e){return qb(new jM(e))})}),zye=function(e){return{header:"Go on-air?",body:Se([Jb("")("Are you sure you want to go on-air?"),Jb("mb-0 font-weight-bold fw-bold")(` Watchers will start seeing your stream in `+(Wb(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:rW.value}},vW=function(e){return function(n){return function(a){return function(t){return Zh(eD(sW))(function(){return Dl({confirmation:n.confirmation,network:nW.value,streamStatus:t,transition:new T({since:a,secondsLeft:e.videoLagSeconds})})})}}}},fW=function(e){return function(n){return function(a){if(a instanceof rW)return Zh(eD(QJ(KJ(bO(e.conference.id))(YJ(oW.create)(PM(Xu))))(function(l){return qb(new OM("Error opening the stream. Please try again."))})))(function(){return Dl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:aW.value})});if(a instanceof oW)return vW(e)(n)(a.value0)(qr.value);if(a instanceof uW)return Zh(eD(QJ(KJ(EO(e.conference.id))(YJ(iW.create)(PM(Xu))))(function(l){return qb(new OM("Error closing the stream. Please try again."))})))(function(){return Dl(n)});if(a instanceof iW)return vW(e)(n)(a.value0)(Er.value);if(a instanceof NM)return Dl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:new T(a.value0)});if(a instanceof lW)return Zh(kye(n.confirmation)(function(l){return eD(qb(l.confirmMsg))}))(function(){return Dl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:M.value})});if(a instanceof cW)return Dl({network:n.network,streamStatus:n.streamStatus,transition:n.transition,confirmation:M.value});if(a instanceof OM)return Dl({confirmation:n.confirmation,streamStatus:n.streamStatus,transition:n.transition,network:new tW(a.value0)});var t=function(l){if(a instanceof jM||a instanceof $b)return Dl(n);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 185, column 1 - line 185, column 76): "+[a.constructor.name])};if(a instanceof jM){if(n.transition instanceof T){var o=Bye(a.value0)(n.transition.value0.since),u=e.videoLagSeconds-co(o)|0,i=u>0;return i?Zh(eD(sW))(function(){return Dl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:new T({since:n.transition.value0.since,secondsLeft:u})})}):Dl({confirmation:n.confirmation,network:n.network,streamStatus:n.streamStatus,transition:M.value})}return t(!0)}return t(!0)}}},_W=function(e){return Dl({streamStatus:e.streamStatus,transition:M.value,network:nW.value,confirmation:M.value})},Vye=function(){return{header:"End the stream?",body:Se([Jb("")("Are you sure you want to end the stream?"),Jb("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:uW.value}}(),pW=function(e){return function(n){return function(a){var t=function(){return n.network instanceof aW?XJ("position-absolute-fullsize d-flex align-items-center justify-content-center bg-semi-transparent-white")("Switching..."):$n}(),o=function(R){return Hye({header:qye("my-0")(R.header),bodyClass:"p-5",body:R.body,footerClass:"p-4",footer:Se([ZJ("btn btn-primary px-4")({onClick:xM(a)(lW.value)})(R.confirmText),ZJ("btn btn-outline-primary px-4")({onClick:xM(a)(cW.value)})(R.cancelText)])})},u=function(R){return function(d){return function(y){return function(I){return function(b){return eW("col-auto pr-0")(Jye("btn btn-"+(R+(" px-5 d-flex align-items-center font-size-lg btn-"+I)))({onClick:xM(a)(b)})([Wye("fe mr-2 fe-"+d)(""),Ke(y)]))}}}}},i=function(){if(n.streamStatus instanceof Du)return u("lg")("power")("GO ON-AIR")("outline-secondary")(new NM(zye(e)));var R=function(d){if(n.streamStatus instanceof qr)return Se([u("lg")("radio")("ON AIR")("success")($b.value),u("sm")("x-circle")("End stream")("outline-danger")(new NM(Vye))]);if(n.streamStatus instanceof Er)return u("lg")("slash")("STREAM IS OVER")("outline-secondary")($b.value);throw new Error("Failed pattern match at Livestream.Live.StreamControls (line 78, column 1 - line 78, column 71): "+[n.streamStatus.constructor.name])};return n.streamStatus instanceof qr&&n.transition instanceof T?u("lg")("radio")("ON AIR")("success")($b.value):R(!0)}(),l=function(R){return XJ("alert small m-0 flex-grow-1 alert-"+R)},s=function(){if(n.network instanceof tW)return l("danger")(n.network.value0);if(n.streamStatus instanceof Du)return l("warning")("The stream has not been started yet. To start, click the big 'GO ON-AIR' button on the left.");var R=function(d){if(n.streamStatus instanceof qr)return l("light")(` We're live. The audience should see your video with a `+(Wb(e.videoLagSeconds)+`-second delay. If you don't see your face above (give it a few seconds), it means you're not streaming. `));var y=function(I){if(n.streamStatus instanceof Er)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 78, column 1 - line 78, column 71): "+[n.streamStatus.constructor.name,n.network.constructor.name])};return n.streamStatus instanceof Er&&n.transition instanceof T?l("info")("You may stop presenting now. The audience will keep seeing the tail of the stream for another "+(Wb(n.transition.value0.secondsLeft)+" seconds.")):y(!0)};return n.streamStatus instanceof qr&&n.transition instanceof T?l("info")("Start presenting now. The audience will see the stream in "+(Wb(n.transition.value0.secondsLeft)+" seconds...")):R(!0)}();return $ye("position-relative row align-items-center t--stream-controls")([i,eW("col")(s),t,da(n.confirmation)(o)])}}};var Qye=sc(sv),dW=Qu(sv),mW=n8(),Kye=Wl(),Yye=Ht(Y),Xye=Te(Y),hW=$t(Y),Zye=Wn(Y)()(),ewe=Xn(ga),DW=Ma(Ve),gW=un(tn),RW=k(Ga),yW=Bn(Ve),wW=gW(Qn),nwe=Ji(nt),UM=W(yn),kM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),BM=function(){function e(){}return e.value=new e,e}(),awe=[30,15,5,0],bW=function(e){return ke(e.conference.scheduledStartTime)(Qye(Ft(e.conference.duration))(e.conference.scheduledStartTime))},EW=function(e){return function(n){return function(a){if(!n.modal)return $n;if(n.now instanceof M)return $n;if(n.now instanceof T){var t=bW(e),o=dW(t)(n.now.value0),u=function(){if(o<1)return" ended "+mW({from:t,to:n.now.value0,format:my("ago")});if($e)return" ends "+mW({from:n.now.value0,to:t,format:my("from now")});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 75, column 7 - line 77, column 105): "+[])}();return Kye({onDismiss:a(BM.value),body:Se([Yye("mb-0")("Host-only warning"),Xye("text-secondary mb-4")("You see this because you're the host. The audience doesn't see this."),hW("font-weight-bold fw-bold")("\u23F0 Scheduled stream time "+u),hW("")(` You have `+(cl(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. `)),Zye("btn btn-primary px-4")({onClick:ewe(a)(BM.value)})("Got it")])})}throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 51, column 1 - line 51, column 71): "+[e.constructor.name,n.constructor.name,a.constructor.name])}}},twe=DW(gW(_a)(Yt(60100))(function(){return RW(kM.create)(yW(t_))})),IW=function(e){return function(n){return function(a){if(a instanceof kM)return wW(twe)(function(){var t=dW(bW(e))(a.value0),o=nwe(co(t))(awe);return UM({now:new T(a.value0),modal:n.modal||o})});if(a instanceof BM)return UM({now:n.now,modal:!1});throw new Error("Failed pattern match at Livestream.Live.StreamEndWarning (line 80, column 22 - line 91, column 33): "+[a.constructor.name])}}},TW=function(){return wW(DW(RW(kM.create)(yW(t_))))(function(){return UM({modal:!1,now:M.value})})}();var SW=un(tn),rwe=SW(_a),CW=W(ca),owe=SW(Qn),uwe=Ma(Ve),iwe=xt(Nr),zb=W(yn),lwe=we(Km),FW=Wo(fn),HM=Te(me),Vb=Qa(Y),cwe=Wn(Y)()(),GW=Xn(ga),swe=Mt(Y)()(),vwe=Wn(We)()(),fwe=Jl(),MW=Te(We),_we=Vo(Y),pwe=Rv(Y)()(),dwe=Ua(Y),AW=function(){function e(){}return e.value=new e,e}(),LW=function(){function e(){}return e.value=new e,e}(),qM=function(){function e(){}return e.value=new e,e}(),PW=function(){function e(){}return e.value=new e,e}(),xW=function(){function e(){}return e.value=new e,e}(),NW=function(){function e(){}return e.value=new e,e}(),jW=function(){function e(){}return e.value=new e,e}(),mwe=function(){function e(){}return e.value=new e,e}(),OW=function(e){return function(n){return function(a){var t=rwe(Xy({fromConference:new T(e.conference.id),registerForConference:n.cta.conferenceId,utmSource:e.paths.utmSource}))(function(){return CW(new Ae(NW.value))});if(a instanceof xW)return owe(uwe(iwe(t)(function(o){return CW(new Ae(jW.value))})))(function(){return zb({cta:n.cta,stage:LW.value})});if(a instanceof NW)return zb({cta:n.cta,stage:PW.value});if(a instanceof jW)return zb({cta:n.cta,stage:qM.value});throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 138, column 24 - line 148, column 44): "+[a.constructor.name])}}},UW=function(e){return function(n){return lwe(e.cta.conferenceId)(n.conferenceId)}},kW=function(e){return zb({cta:e,stage:AW.value})},hwe=function(){return Po(FW([kl.value,new ht(", "),Ol.value,new ht(" "),Ul.value,new ht(" at "),Bl.value,new ht(":"),wi.value,new ht(" "),Hl.value]))}(),Dwe=function(){return Po(FW([kl.value]))}(),BW=function(e){return function(n){return function(a){var t=function(){return n.stage instanceof qM?HM("text-danger small mt-2")([Vb("fe fe-x-circle mr-2")(""),Ke("Something went wrong. Please try again.")]):$n}(),o=function(R){return a(Ae.create(R))},u=function(){if(e.user instanceof T)return cwe("btn btn-primary px-4 t--register-one-click")({onClick:GW(o)(xW.value)})("Register (one-click)");if(e.user instanceof M)return swe("btn btn-primary px-4 t--register-new-tab")({href:n.cta.registrationPath,target:"_blank",rel:"noopener"})("Register now");throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 92, column 22 - line 100, column 25): "+[e.user.constructor.name])}(),i=function(){if(n.stage instanceof AW||n.stage instanceof qM)return u;if(n.stage instanceof LW)return HM("text-secondary")([Vb("fe fe-refresh-cw mr-2")(""),Ke("Hold on tight...")]);if(n.stage instanceof PW)return HM("text-success")([Vb("fe fe-check-circle mr-2")(""),Ke("You\u2019ve registered \u2013\xA0see you "+(Dwe(n.cta.startTime)+"!"))]);throw new Error("Failed pattern match at Livestream.Ctas.Display.Event (line 76, column 36 - line 90, column 10): "+[n.stage.constructor.name])}(),l=function(R){return a(wn.create(R))},s=vwe("btn btn-sm btn-outline-primary d-flex py-1 px-2")({onClick:GW(l)(mwe.value)})(Vb("fe fe-x")(""));return fwe({body:Se([MW("row justify-content-end mt-n3")(s),_we("")("Join us for our upcoming livestream:"),pwe("mt-3")({id:Ei})(n.cta.title),dwe("small")(hwe(n.cta.startTime)+(" "+a_)),MW("row mt-6 ml-0")(i),t]),bodyClass:"t--cta-active",size:rh.value})}}};var gwe=Jl(),Qb=Te(me),Rwe=nj(Y)()(),Kb=Te(We),ywe=Wn(We)()(),HW=Xn(ga),wwe=Qa(Y),bwe=pe(ze),Ewe=al()(),Iwe=Hr(Y),Twe=$t(Y),Swe=Mt(Y)()(),Cwe=un(tn),Fwe=Cwe(Qn),Gwe=Ma(Ve),Mwe=Bn(Ve),Awe=Is(gr)(),Lwe=ne(Ze),qW=W(yn),Pwe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),JW=function(){function e(){}return e.value=new e,e}(),WW=function(e){return function(n){var a=function(){var i=uo(e.cta.providers);return i===1?Lv.value:i===2?Lv.value:oh.value}(),t=function(i){return n(Ae.create(i))},o=function(i){return n(wn.create(i))},u=function(){var i=uo(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 gwe({bodyClass:"bg-gray-900 text-white t--cta-active",body:Se([Qb("row no-gutters g-0 mb-4")([Qb("col text-center")([Rwe("mb-2")({id:Ei})("The admissions process is hard - advisors are here to help!"),Ke("Schedule a free consulation to get your questions answered")]),Kb("col-auto text-right")(ywe("btn btn-link p-0 m-0 text-white")({onClick:HW(o)(JW.value)})(wwe("fe fe-x")("")))]),Qb("row text-center")(bwe(e.cta.providers)(function(i){return Qb(u)([Kb("row mb-3")(Kb("col-auto mx-auto")(Kb("avatar avatar-xl")(Ewe("avatar-img rounded-circle img-fluid")({src:i.avatarUrl})))),Iwe("mb-2")(i.name),Twe("mb-3")(i.location),Swe("btn btn-primary btn-sm px-3 py-1")({target:"_blank",href:i.linkUrl,onClick:HW(t)(new Pwe(i.avatarUrl))})(e.cta.linkText)])}))]),size:a})}},$W=function(e){return function(n){return Fwe(Gwe(Mwe(function(){return Awe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:Lwe(e.cta.id),livestream_cta_url:n.value0})(),new wn(JW.value)})))(function(){return qW(e)})}},zW=function(e){return function(n){return e.cta.id===n.id}},VW=function(e){return qW({cta:e})};var xwe=Mt(Y)()(),QW=Xn(ga),Nwe=Wn(We)()(),jwe=Qa(Y),Owe=Jl(),KW=Te(We),Uwe=Rv(Y)()(),kwe=un(tn),Bwe=kwe(Qn),Hwe=Ma(Ve),qwe=Bn(Ve),Jwe=Is(gr)(),Wwe=ne(Ze),YW=W(yn),$we=function(){function e(){}return e.value=new e,e}(),XW=function(){function e(){}return e.value=new e,e}(),ZW=function(e){return function(n){var a=function(i){return n(Ae.create(i))},t=xwe("btn btn-primary px-4 t--register-new-tab")({href:e.cta.url,target:"_blank",rel:"noopener",onClick:QW(a)($we.value)})(e.cta.buttonText),o=function(i){return n(wn.create(i))},u=Nwe("btn btn-sm btn-outline-primary d-flex py-1 px-2")({onClick:QW(o)(XW.value)})(jwe("fe fe-x")(""));return Owe({body:Se([KW("row justify-content-end mt-n3")(u),Uwe("mt-3")({id:Ei})(e.cta.title),KW("row mt-6 ml-0")(t)]),bodyClass:"t--cta-active",size:rh.value})}},e$=function(e){return function(n){return Bwe(Hwe(qwe(function(){return Jwe("Livestream: CTA Popup Link Clicked")({livestream_cta_id:Wwe(e.cta.id),livestream_cta_title:e.cta.title,livestream_cta_url:e.cta.url})(),new wn(XW.value)})))(function(){return YW(e)})}},n$=function(e){return function(n){return e.cta.id===n.id}},a$=function(e){return YW({cta:e})};var JM=un(tn),ni=JM(en),ai=yr(Br),td=W(aa),t$=Mr(Uo(st)),nD=ma($r),Ns=W(yn),zwe=JM(Qn),Vwe=Ma(Ve),Qwe=JM(_a),Kwe=W(ca),WM=Te(me),Ywe=ep(Y),Xwe=fo()(),Zwe=Xn(vo),ebe=Wn(We)()(),r$=Xn(ga),nbe=Qa(Y),abe=Jl(),$M=Te(We),tbe=Rv(Y)()(),rbe=$t(Y),obe=Wn(Y)()(),o$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),u$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),i$=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}(),c$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),s$=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),v$=function(){function e(){}return e.value=new e,e}(),f$=function(){function e(){}return e.value=new e,e}(),_$=function(e){return function(n){return e.cta.id===n.id}},p$=function(e){return function(n){var a=ni(ai(n.cta.requireReferredUserLastName))(function(){return ni(ai(n.referredUserLastName===""))(function(){return td("Please enter the other person\u2019s last name")})}),t=ni(ai(n.cta.requireReferredUserFirstName))(function(){return ni(ai(n.referredUserFirstName===""))(function(){return td("Please enter the other person\u2019s first name")})}),o=ni(ai(t$($h)(n.referredUserEmail)))(function(){return td("Please enter a valid email address")}),u=ni(ai(Tt(e.user)))(function(){return ni(ai(n.cta.requireAnonymousUserLastName))(function(){return ni(ai(n.anonymousUserLastName===""))(function(){return td("Please enter your last name")})})}),i=ni(ai(Tt(e.user)))(function(){return ni(ai(n.cta.requireAnonymousUserFirstName))(function(){return ni(ai(n.anonymousUserFirstName===""))(function(){return td("Please enter your first name")})})}),l=ni(ai(Tt(e.user)))(function(){return ni(ai(n.cta.requireAnonymousUserEmail))(function(){return ni(ai(t$($h)(n.anonymousUserEmail)))(function(){return td("Please enter a valid email address")})})});return nD(i)(nD(u)(nD(l)(nD(t)(nD(a)(o)))))}},d$=function(e){return function(n){return function(a){if(a instanceof o$)return Ns({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 u$)return Ns({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 i$)return Ns({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 l$)return Ns({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 c$)return Ns({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 s$)return Ns({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 v$){var t=Tt(p$(e)(n));return t?zwe(Vwe(Qwe(IO({ctaId:n.cta.id,anonymousUserFirstName:n.anonymousUserFirstName,anonymousUserLastName:n.anonymousUserLastName,anonymousUserEmail:n.anonymousUserEmail,referredUserFirstName:n.referredUserFirstName,referredUserLastName:n.referredUserLastName,referredUserEmail:n.referredUserEmail}))(function(){return Kwe(new wn(f$.value))})))(function(){return Ns(n)}):Ns({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 146, column 24 - line 175, column 45): "+[a.constructor.name])}}},m$=function(e){return function(n){return function(a){var t=p$(e)(n),o=function(I){return function(b){return function(S){return function(L){return function(O){return WM(I)([Ywe("mb-2")(S),Xwe("form-control "+b)({type:"text",value:L,onChange:Zwe(a)(function($){return Ae.create(O(Gs($)))})})])}}}}},u=ya(Tt(e.user)&&n.cta.requireAnonymousUserEmail)(o("col-12 mb-3")("t--anon-email")("Your email")(n.anonymousUserEmail)(i$.create)),i=ya(Tt(e.user))(Se([ya(n.cta.requireAnonymousUserFirstName)(o("col-12 col-md-6 mb-3")("t--anon-first-name")("Your first name")(n.anonymousUserFirstName)(o$.create)),ya(n.cta.requireAnonymousUserLastName)(o("col-12 col-md-6 mb-3")("t--anon-last-name")("Your last name")(n.anonymousUserLastName)(u$.create))])),l=o("col-12 mb-3")("t--referred-email")("Other person\u2019s email")(n.referredUserEmail)(s$.create),s=Se([ya(n.cta.requireReferredUserFirstName)(o("col-12 col-md-6 mb-3")("t--referred-first-name")("Other person\u2019s first name")(n.referredUserFirstName)(l$.create)),ya(n.cta.requireReferredUserLastName)(o("col-12 col-md-6 mb-3")("t--referred-last-name")("Other person\u2019s last name")(n.referredUserLastName)(c$.create))]),R=function(I){return a(Ae.create(I))},d=function(I){return a(wn.create(I))},y=ebe("btn btn-sm btn-outline-primary d-flex py-1 px-2 t--close")({onClick:r$(d)(f$.value)})(nbe("fe fe-x")(""));return abe({body:Se([$M("row justify-content-end mt-n3")(y),tbe("mt-3")({id:Ei})(n.cta.title),da(n.cta.description)(rbe("")),WM("row")([i,u,s,l]),WM("row")([$M("col-auto my-auto")(obe("btn btn-primary t--save")({onClick:r$(R)(v$.value)})("Save")),$M("col my-auto text-danger")(ya(n.validationActive)(da(t)(Ke)))])]),bodyClass:"t--cta-active",size:Lv.value})}}},h$=function(e){return Ns({cta:e,anonymousUserFirstName:"",anonymousUserLastName:"",anonymousUserEmail:"",referredUserFirstName:"",referredUserLastName:"",referredUserEmail:"",validationActive:!1})};var ube=Ma(Ve),ibe=W(ca),Wv=it(wr(Ga)),Yb=un(tn)(Qn),aD=W(yn),tD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),rD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),oD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),uD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Xb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Zb=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),e1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),n1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lbe=function(){function e(){}return e.value=new e,e}(),D$=function(e){return function(n){return function(a){var t=function(o){return a(Ae.create(o))};if(n instanceof tD)return BW(e)(n.value0)(function(o){return t(Xb.create(o))});if(n instanceof rD)return WW(n.value0)(function(o){return t(Zb.create(o))});if(n instanceof oD)return ZW(n.value0)(function(o){return t(e1.create(o))});if(n instanceof uD)return m$(e)(n.value0)(function(o){return t(n1.create(o))});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 61, column 29 - line 69, column 61): "+[n.constructor.name])}}},g$=function(e){return function(n){return function(a){var t=ube(ibe(new wn(lbe.value)));if(n instanceof tD&&a instanceof Xb){if(a.value0 instanceof Ae)return Wv(function(o){return Ae.create(Xb.create(o))})(tD.create)(OW(e)(n.value0)(a.value0.value0));if(a.value0 instanceof wn)return Yb(t)(function(){return aD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 76, column 5 - line 81, column 19): "+[a.value0.constructor.name])}if(n instanceof rD&&a instanceof Zb){if(a.value0 instanceof Ae)return Wv(function(o){return Ae.create(Zb.create(o))})(rD.create)($W(n.value0)(a.value0.value0));if(a.value0 instanceof wn)return Yb(t)(function(){return aD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 84, column 5 - line 90, column 19): "+[a.value0.constructor.name])}if(n instanceof oD&&a instanceof e1){if(a.value0 instanceof Ae)return Wv(function(o){return Ae.create(e1.create(o))})(oD.create)(e$(n.value0)(a.value0.value0));if(a.value0 instanceof wn)return Yb(t)(function(){return aD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 93, column 5 - line 98, column 19): "+[a.value0.constructor.name])}if(n instanceof uD&&a instanceof n1){if(a.value0 instanceof Ae)return Wv(function(o){return Ae.create(n1.create(o))})(uD.create)(d$(e)(n.value0)(a.value0.value0));if(a.value0 instanceof wn)return Yb(t)(function(){return aD(n)});throw new Error("Failed pattern match at Livestream.Ctas.Display (line 101, column 5 - line 107, column 19): "+[a.value0.constructor.name])}return aD(n)}}},R$=function(e){return function(n){return e instanceof tD&&n instanceof sl?UW(e.value0)(n.value0):e instanceof oD&&n instanceof vl?n$(e.value0)(n.value0):e instanceof rD&&n instanceof fl?zW(e.value0)(n.value0):e instanceof uD&&n instanceof _l?_$(e.value0)(n.value0):!1}},y$=function(e){if(e instanceof sl)return Wv(function(n){return Ae.create(Xb.create(n))})(tD.create)(kW(e.value0));if(e instanceof fl)return Wv(function(n){return Ae.create(Zb.create(n))})(rD.create)(VW(e.value0));if(e instanceof vl)return Wv(function(n){return Ae.create(e1.create(n))})(oD.create)(a$(e.value0));if(e instanceof _l)return Wv(function(n){return Ae.create(n1.create(n))})(uD.create)(h$(e.value0));throw new Error("Failed pattern match at Livestream.Ctas.Display (line 49, column 8 - line 58, column 66): "+[e.constructor.name])};var w$=Ht(Y),a1=Te(me),cbe=Vo(Y),sbe=Rv(Y)()(),vbe=ep(me),fbe=fo()(),zM=Ji(nt),_be=Xn(vo),b$=Wn(Y)()(),E$=Xn(ga),pbe=yp(We),dbe=Bn(Ve),mbe=Es(gr),hbe=Ou(),Dbe=ne(Ze),N_=W(yn),gbe=bf(nt),j_=un(tn)(Qn),Rbe=xt(Nr),VM=W(ca),ybe=ko(ca)(fn),wbe=lr(ca),I$=Ma(Ve),bbe=it(wr(Ga)),rd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),QM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),KM=function(){function e(){}return e.value=new e,e}(),T$=function(){function e(){}return e.value=new e,e}(),YM=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),S$=function(e){return function(n){return function(a){var t=Se([w$("text-center")("The host just asked a poll question!"),w$("text-center")("To participate in live polls, please introduce yourself:"),Vp({cancelButton:new T({text:"Not now",click:a(new rd({keepShowingPolls:!1}))}),autoFocus:!0})(e)(n.registration)(function(i){return a(YM.create(i))}),a1("small mt-3")([Yp(e),a1("mt-2")([Ke("After submitting, you\u2019ll be able to answer all "),cbe("")("future"),Ke(" poll questions in this stream!")])])]),o=Se([sbe("font-weight-bold fw-bold")({id:Ei})(n.poll.question),a1("d-flex flex-column ml-4")(b0(function(i){return function(l){return vbe("form-check-label mb-2")([fbe("form-check-input mt-2 t--option")({checked:zM(i)(n.selected),onChange:_be(a)(function(s){return new QM(i)}),type:function(){return n.poll.multiSelect?"checkbox":"radio"}()}),Ke(l)])}})(n.poll.options)),a1("d-flex justify-content-start mt-6")([b$("btn btn-primary px-4 mr-3 t--submit")({onClick:E$(a)(KM.value),disabled:si(n.selected)})("Submit answer"),b$("btn btn-outline-primary px-4 d-flex align-items-center t--skip")({onClick:E$(a)(T$.value)})("Do it later")])]),u=function(){if(e.user instanceof T)return"t--poll-active";if(e.user instanceof M)return"t--poll-registration-form";throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 62, column 18 - line 64, column 45): "+[e.user.constructor.name])}();return pbe(u)(function(){if(e.user instanceof T)return o;if(e.user instanceof M)return t;throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 58, column 5 - line 60, column 34): "+[e.user.constructor.name])}())}}},C$=function(e){return function(n){return function(a){var t=function(o){return dbe(mbe("Livestream: Poll Response")(Zc(Fv(e.conference))(hbe({livestream_poll_id:Dbe(n.poll.id),livestream_poll_question:n.poll.question,livestream_poll_skipped:function(){return o.skipped?"true":""}(),livestream_poll_multiselect:function(){return n.poll.multiSelect?"true":"false"}(),livestream_poll_response:o.option}))))};if(a instanceof rd)return N_(n);if(a instanceof QM&&n.poll.multiSelect)return N_({poll:n.poll,registration:n.registration,selected:function(){var o=zM(a.value0)(n.selected);return o?gbe(a.value0)(n.selected):qo(a.value0)(n.selected)}()});if(a instanceof QM)return N_({poll:n.poll,registration:n.registration,selected:[a.value0]});if(a instanceof KM&&si(n.selected))return N_(n);if(a instanceof KM)return j_(Va(Rbe(xC(n.poll)(n.selected))(function(o){return Nl(_c)("Error answering a Livestream poll")({poll_id:n.poll.id})(function(u){return VM(Ee)})})))(function(){return j_(Va(ybe(b0(function(o){return function(u){return{idx:o,opt:u}}})(n.poll.options))(function(o){return wbe(zM(o.idx)(n.selected))(t({skipped:!1,option:o.opt}))})))(function(){return j_(I$(VM(new rd({keepShowingPolls:!0}))))(function(){return N_(n)})})});if(a instanceof T$)return j_(Va(xC(n.poll)([])))(function(){return j_(Va(t({skipped:!0,option:""})))(function(){return j_(I$(VM(new rd({keepShowingPolls:!0}))))(function(){return N_(n)})})});if(a instanceof YM)return bbe(YM.create)(function(o){return{poll:n.poll,selected:n.selected,registration:o}})(Qp(n.registration)(a.value0));throw new Error("Failed pattern match at Livestream.Polls.DisplayPoll (line 114, column 24 - line 161, column 55): "+[a.constructor.name])}}},F$=function(e){return j_(Va(TO(e)))(function(){return N_({poll:e,selected:[],registration:Kp})})};var G$=un(tn),Ebe=G$(_a),Ibe=Z(_a),M$=Bn(Ve),Tbe=ko(ca)(Pu),Sbe=Es(gr),A$=Ou(),Cbe=ne(Gg),Fbe=ne(Zu),t1=ne(Ze),gl=W(yn),L$=wr(Ga),P$=it(L$),x$=Z(Qn),N$=fr(L$),$v=G$(Qn),Gbe=we(nt),zv=W(aa),iD=jm(Ve),lD=k(ae),Mbe=k(Fu),cD=D0(fn),XM=Sa(),j$=Ii(XM(B({reflectSymbol:function(){return"poll_id"}})(on)(rn)))(Ve),Abe=tl(Ve),Lbe=we(Qt(Km)),Pbe=Ii(XM(B({reflectSymbol:function(){return"conference_id"}})(on)(rn)))(Ve),ZM=we(Qt(nt)),eA=Ii(XM(B({reflectSymbol:function(){return"id"}})(on)(rn)))(Ve),sD=function(){function e(){}return e.value=new e,e}(),od=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),vD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),ud=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),r1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),o1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),nA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),id=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),O$=function(e){return function(n){return function(a){if(n.stage instanceof sD)return $n;if(n.stage instanceof od)return S$(e)(n.stage.value0)(function(t){return a(ud.create(t))});if(n.stage instanceof vD)return D$(e)(n.stage.value0)(function(t){return a(r1.create(t))});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 96, column 3 - line 102, column 59): "+[n.stage.constructor.name])}}},xbe=function(e){return function(n){return e instanceof vD?R$(e.value0)(n):!1}},Nbe=function(){return function(e){return function(n){return function(a){return Ebe(Yt(100))(function(){return Ibe(M$(yy(Ei)))(function(t){return Tbe(t)(function(o){return M$(function(){var i=cF(HS(o))(),l=D8({x:i.left+1,y:i.top+1})(),s=iF(HS(l))();return Sbe(n)(Zc(A$(a))(Zc(Fv(e.conference))(A$({livestream_popup_visible:Cbe(s===Ei)}))))()})})})})}}}},U$=Nbe(),jbe=function(e){var n=function(){return U$(e)("Livestream: CTA Popup Shown")},a=n();return function(t){if(t instanceof sl)return a({livestream_cta_target_conference_id:Fbe(t.value0.conferenceId)});if(t instanceof fl)return a({livestream_cta_id:t1(t.value0.id)});if(t instanceof vl)return a({livestream_cta_id:t1(t.value0.id),livestream_cta_title:t.value0.title,livestream_cta_url:t.value0.url});if(t instanceof _l)return a({livestream_cta_id:t1(t.value0.id),livestream_cta_title:t.value0.title});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 156, column 29 - line 173, column 8): "+[t.constructor.name])}},k$=function(e){return function(n){return function(a){if(a instanceof ud&&a.value0 instanceof rd)return gl({stage:sD.value,showPolls:a.value0.value0.keepShowingPolls});var t=function(o){if(a instanceof ud)return gl(n);if(a instanceof r1){if(a.value0 instanceof wn)return gl({showPolls:n.showPolls,stage:sD.value});var u=function(s){return gl(n)};return a.value0 instanceof Ae&&n.stage instanceof vD?P$(r1.create)(function(s){return{showPolls:n.showPolls,stage:new vD(s)}})(g$(e)(n.stage.value0)(a.value0.value0)):u(!0)}var u=function(l){if(a instanceof o1&&n.showPolls)return x$(N$(ud.create)(F$(a.value0)))(function(d){return $v(Va(U$(e)("Livestream: Poll Popup Shown")({livestream_poll_id:t1(a.value0.id)})))(function(){return gl({showPolls:n.showPolls,stage:new od(d)})})});if(a instanceof o1)return gl(n);var s=function(d){if(a instanceof nA||a instanceof id&&xbe(n.stage)(a.value0))return gl(n);if(a instanceof id)return $v(Va(jbe(e)(a.value0)))(function(){return x$(N$(r1.create)(y$(a.value0)))(function(y){return gl({showPolls:n.showPolls,stage:new vD(y)})})});throw new Error("Failed pattern match at Livestream.Live.VideoOverlay (line 104, column 1 - line 104, column 76): "+[a.constructor.name])};if(a instanceof nA){if(n.stage instanceof od){var R=n.stage.value0.poll.id===a.value0.pollId;return R?gl({showPolls:n.showPolls,stage:sD.value}):s(!0)}return s(!0)}return s(!0)};if(a instanceof o1){if(n.stage instanceof od){var i=n.stage.value0.poll.id===a.value0.id;return i?gl(n):u(!0)}return u(!0)}return u(!0)};return a instanceof ud&&n.stage instanceof od?P$(ud.create)(function(o){return{showPolls:n.showPolls,stage:new od(o)}})(C$(e)(n.stage.value0)(a.value0)):t(!0)}}},B$=function(e){var n=function(u){return u instanceof _l?zv(u.value0.id):M.value},a=function(u){return u instanceof fl?zv(u.value0.id):M.value},t=function(u){return u instanceof vl?zv(u.value0.id):M.value},o=function(u){return u instanceof sl?zv(u.value0.conferenceId):M.value};return $v(iD(function(u){return lD(Mbe(o1.create)(function(i){return i.poll}))(cD(function(){var i=Gbe(u.poll_id);return function(l){return i(function(s){return s.poll.id}(l))}}())(e.conference.polls))})(j$(e.pusher.dataChannel)("show-poll")))(function(){return $v(Abe(function(u){return new nA({pollId:u.poll_id})})(j$(e.pusher.dataChannel)("hide-poll")))(function(){return $v(iD(function(u){return lD(id.create)(cD(function(){var i=Lbe(zv(u.conference_id));return function(l){return i(o(l))}}())(e.ctas))})(Pbe(e.pusher.dataChannel)("show-event-cta")))(function(){return $v(iD(function(u){return lD(id.create)(cD(function(){var i=ZM(zv(u.id));return function(l){return i(t(l))}}())(e.ctas))})(eA(e.pusher.dataChannel)("show-general-cta")))(function(){return $v(iD(function(u){return lD(id.create)(cD(function(){var i=ZM(zv(u.id));return function(l){return i(a(l))}}())(e.ctas))})(eA(e.pusher.dataChannel)("show-featured-sps-cta")))(function(){return $v(iD(function(u){return lD(id.create)(cD(function(){var i=ZM(zv(u.id));return function(l){return i(n(l))}}())(e.ctas))})(eA(e.pusher.dataChannel)("show-referral-cta")))(function(){return gl({stage:sD.value,showPolls:!0})})})})})})})};var Obe=Wl(),aA=Te(me),Ube=Ht(We),kbe=Ua(me),Bbe=Qa(Y),H$=yu()(),q$=Ht(Y),Hbe=$t(Y),u1=Wn(Y)()(),qbe=sr(zo),Jbe=un(tn),tA=Xn(ga),J$=Jbe(Qn),Wbe=uH(),rA=W(yn),W$=Z(en),$be=Ys(kP),zbe=Qu(sT),Vbe=we(Iy),Qbe=we(Vs),Kbe=ls()(),$$=function(){function e(){}return e.value=new e,e}(),oA=function(){function e(){}return e.value=new e,e}(),z$=function(){function e(){}return e.value=new e,e}(),uA=function(){function e(){}return e.value=new e,e}(),iA=function(){function e(){}return e.value=new e,e}(),i1=function(e){return function(n){return Obe({onDismiss:n(new wn(iA.value)),bodyClass:"t--livestreams-update-network-settings-modal",body:function(){if(e.modalView instanceof $$)return aA("text-center")([ya(e.confirmConferenceRegistration)(Ube("mb-4")(kbe("badge badge-soft-primary bg-primary-soft")([Bbe("fe fe-check mr-1")(""),Ke("You\u2019re registered!")]))),H$("my-4")({src:"/img/network/counselor.svg",height:"76",width:"91"}),q$("")("Connect with colleges when you attend or register for their livestreams?"),Hbe("text-secondary")("Connecting with colleges puts you on their radar and introduces you to admissions officers and current students"),aA("mx-md-6 mt-4")([u1("btn btn-primary w-100 t--livestream-opt-into-auto-connect")({onClick:qbe(function(){return n(new Ae(z$.value))(),n(new Ae(uA.value))()})})("Yes, always connect"),u1("btn btn-outline-primary w-100 mt-3 t--livestream-connect-with-school")({onClick:tA(n)(new Ae(uA.value))})("Only connect with "+e.school.name),u1("btn btn-link mt-3")({onClick:tA(n)(new wn(iA.value))})("Close")])]);if(e.modalView instanceof oA)return aA("text-center")([H$("mt-4")({src:"/img/livestreams/network-settings-modal/connection-sent.png",height:"42",width:"42"}),q$("")("Connection request sent!"),u1("mt-4 btn btn-primary t--livestream-network-settings-modal-close")({onClick:tA(n)(new wn(iA.value))})("Close")]);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 81, column 13 - line 112, column 12): "+[e.modalView.constructor.name])}()})}},l1=function(e){return function(n){if(n instanceof Ae){if(n.value0 instanceof z$)return J$(Va(Wbe({publishScope:bi.value,publishContext:LG.value,autoRequestFromLivestreams:!0,livestreamConference:e.conference})))(function(){return rA({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:oA.value})});if(n.value0 instanceof uA)return J$(Va(GU(e.school.id)(e.conference.id)))(function(){return rA({conference:e.conference,confirmConferenceRegistration:e.confirmConferenceRegistration,school:e.school,modalView:oA.value})});throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 59, column 31 - line 71, column 44): "+[n.value0.constructor.name])}if(n instanceof wn)return rA(e);throw new Error("Failed pattern match at Livestream.NetworkSettingsModal (line 58, column 1 - line 58, column 55): "+[e.constructor.name,n.constructor.name])}},c1=function(e){return function(n){var a=ke(!1)(W$(e.dismissedNetworkSettingsModalAt)(function(o){return new T($be(zbe(nC(Ee))(o))(30))})),t=function(o){return[n.rcr834NetworkSettingsModal,Vbe(o.publishScope)(bi.value),!o.autoRequestFromLivestreams,e.hasAccessToNetwork,!a]};return ke(!1)(W$(e.profile)(function(o){return new T(JI(Qbe(!0))(t(o)))}))}},s1=function(e){return Kbe(e)({modalView:$$.value})};var fD=function(){function e(){}return e.value=new e,e}(),ld=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_D=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),v1=function(){function e(){}return e.value=new e,e}();var V$=un(tn),Q$=V$(Qn),lA=Ma(Ve),Ybe=V$(_a),cA=W(ca),f1=W(yn),K$=function(e){return function(n){return function(a){return function(t){return a.throttleState instanceof fD&&t instanceof _D?Q$(lA(Ybe(Yt(a.delay))(function(){return cA(e(v1.value))})))(function(){return f1(n({delay:a.delay,throttleState:new ld(t.value0)}))}):a.throttleState instanceof ld&&t instanceof _D?f1(n({delay:a.delay,throttleState:new ld(t.value0)})):a.throttleState instanceof ld&&t instanceof v1?Q$(lA(cA(a.throttleState.value0)))(function(){return f1(n({delay:a.delay,throttleState:fD.value}))}):f1(n(a))}}}},Y$=function(e){return function(n){return lA(cA(e(new _D(n))))}},X$=function(e){return{throttleState:fD.value,delay:e}};var _1=Te(Y),p1=Te(me),Xbe=Ht(Y),js=ne(Ze),Zbe=io(ar),Z$=Te(We),e1e=or(Y)()(),n1e=Vo(Y),a1e=Ua(Y),t1e=zf(We),r1e=KN(me)()(),ez=vs(na),d1=Wn(Y)()(),sA=Xn(ga),nz=Ji(nt),az=zf(me),m1=cs(Y),o1e=cs(We),u1e=cs(me),i1e=Z0(me),l1e=K0(me),cd=Y0(Y),c1e=X0(me),h1=pe(ze),s1e=Ho(na),pD=un(tn)(Qn),vA=Ma(Ve),v1e=xt(Nr),tz=W(ca),Vv=W(yn),fA=k(Ga),f1e=we(V8),rz=ul(na)(fn),_1e=kg(na),p1e=an(Rt),d1e=bf(nt),m1e=tl(Ve),h1e=Yy(Ve),D1=function(){function e(){}return e.value=new e,e}(),oz=function(){function e(){}return e.value=new e,e}(),uz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),iz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_A=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),lz=function(){function e(){}return e.value=new e,e}(),cz=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}(),pA=function(){function e(){}return e.value=new e,e}(),vz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),dA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),fz=function(e){return function(n){return function(a){if(e.conference.polls.length===0)return $n;var t=function(){if(n.stage instanceof D1)return $n;if(n.stage instanceof oz)return _1("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 185, column 24 - line 190, column 25): "+[n.stage.constructor.name])}(),o=p1("d-flex flex-nowrap align-items-baseline")([Xbe("")("Polls"),_1("text-muted ml-3 small")("Polls will be shown to viewers "+(js(e.videoLagSeconds)+" seconds after you launch them, to account for the audio/video delay"))]),u=function(s){return function(R){return function(d){var y=function(I){return function(b){var S=function(){if(R===0)return"0%";if($e)return js(Zbe(100*b|0)(R))+"%";throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 181, column 13 - line 183, column 69): "+[])}();return p1("row align-items-center bg-light-grey mb-1 py-2 t--poll-response-option")([_1("col-7 d-flex justify-content-end")(I),Z$("col-4")(Z$("progress")(e1e("progress-bar")({style:ot({width:S})})(""))),p1("col-1")([n1e("")(js(b)),a1e("text-secondary text-nowrap")(" ("+(S+")"))])])}};return t1e("t--poll-responses-"+js(s.id))(r1e("py-0")({colSpan:6})(UI(y)(s.options)(d.optionCounts)))}}},i=function(s){var R=ke(s.status)(ez(s.poll.id)(n.statuses)),d=d1("btn btn-white btn-sm px-4 t--open")({onClick:sA(a)(new uz(s.poll))})("Launch poll");if(R instanceof ys)return d;if(R instanceof gc)return Se([d1("btn btn-success btn-sm px-4 mr-3")({disabled:!0})("Poll LIVE"),d1("btn btn-danger btn-sm px-4 t--close")({onClick:sA(a)(new iz(s.poll))})("Close poll")]);if(R instanceof ws)return d;throw new Error("Failed pattern match at Livestream.Polls.LaunchPolls (line 143, column 17 - line 155, column 21): "+[R.constructor.name])},l=function(s){var R=nz(s.poll.id)(n.expandedResponses),d=ez(s.poll.id)(n.responses),y=bn(0)(function(S){return S.answered})(d),I=bn(0)(function(S){return S.seen})(d),b=bn(0)(function(S){return S.skipped})(d);return Se([az("t--poll t--poll-"+js(s.poll.id))([m1("pt-3")(function(){var S=Ct(s.poll.autoDisplayMinutesFromStart);return S?"\u23F0 ":""}()+s.poll.question),o1e("text-nowrap")(i(s)),m1("t--shown")(js(I)),u1e("t--answers")([Ke(js(y)),d1("btn btn-sm btn-white ml-2 py-0 px-1 "+("fe fe-chevron-"+function(){return R?"up":"down t--expand-responses"}()))({onClick:sA(a)(new cz(s.poll.id))})("")]),m1("t--skipped")(js(b)),m1("t--pending")(js((I-y|0)-b|0))]),ya(R)(da(d)(u(s.poll)(y)))])};return Se([o,p1("t--polls position-relative")([da(n.error)(function(s){return _1("alert alert-danger")(s)}),i1e("table table-sm mb-0")([l1e("")([az("")([cd("")("Question"),cd("")("Actions"),cd("")("# saw poll"),cd("")("# answered"),cd("")("# skipped"),cd("")("# not responded")])]),c1e("")(h1(s1e(function(s){return-function(R){return R.poll.id}(s)|0})(e.conference.polls))(l))]),t])])}}},_z=function(e){return function(n){var a=function(t){return pD(vA(v1e(t)(function(o){return tz(lz.value)})))(function(){return Vv({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:oz.value,error:M.value})})};return function(t){if(t instanceof uz)return a(fA(_A.create)(PC(t.value0)(gc.value)));if(t instanceof iz)return a(fA(_A.create)(PC(t.value0)(ws.value)));if(t instanceof _A){var o=h1(iu(function(){var u=f1e(gc.value);return function(i){return u(function(l){return l.status}(i))}}())(t.value0))(function(u){return u.pollId});return Vv({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,statuses:rz(h1(t.value0)(function(u){return new Dn(u.pollId,u.status)})),expandedResponses:_1e(p1e(n.expandedResponses)(o)),stage:D1.value})}if(t instanceof lz)return Vv({expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,responses:n.responses,statuses:n.statuses,stage:D1.value,error:new T("That didn't work for some reason, try again")});if(t instanceof cz)return Vv({error:n.error,responseThrottle:n.responseThrottle,responses:n.responses,stage:n.stage,statuses:n.statuses,expandedResponses:function(){var u=nz(t.value0)(n.expandedResponses);return u?d1e(t.value0)(n.expandedResponses):qo(t.value0)(n.expandedResponses)}()});if(t instanceof sz)return pD(Y$(dA.create)(pA.value))(function(){return Vv(n)});if(t instanceof pA)return pD(vA(fA(vz.create)(NO(e.conference.id))))(function(){return Vv(n)});if(t instanceof vz)return Vv({error:n.error,expandedResponses:n.expandedResponses,responseThrottle:n.responseThrottle,stage:n.stage,statuses:n.statuses,responses:rz(h1(t.value0)(function(u){return new Dn(u.pollId,u.responses)}))});if(t instanceof dA)return K$(dA.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 202, column 22 - line 248, column 98): "+[t.constructor.name])}}},pz=function(e){return pD(m1e(hn(sz.value))(h1e(e.pusher.dataChannel)("poll-responses-changed")))(function(){return pD(vA(tz(pA.value)))(function(){return Vv({statuses:fs,responses:fs,expandedResponses:[],responseThrottle:X$(500),stage:D1.value,error:M.value})})})};var dz=yu()(),mz=Te(me),hz=Ht(Y),Dz=Hr(Y),gz=dz("img-fluid mb-6")({src:"/img/logo-white.svg",style:ot({width:"5em"})}),g1=function(e){return mz(e+` t--splashscreen position-absolute-fullsize d-flex flex-column align-items-center justify-content-around bg-dark text-white `)},dD=function(e){return g1("")([hz("text-center")(e)])},mA=g1("t--splashscreen-intro")([Te(We)("text-center mt-7")(Dz("")("The recording will load in a moment.")),gz]),R1=g1("px-4 px-md-6 t--splashscreen-intro")([dz("img-fluid")({src:"/img/illustrations/livestreams/2022-02-intro.svg"})]),Rz=g1("t--splashscreen-complete")([mz("text-center mt-7")([Dz("")("The event is now over."),hz("")("Thank you for attending!"),Ku(Y)("")("A recording will be available to watch shortly.")]),gz]);var y1=e=>e.play();var Qv=Cu(yz());$a();var wz=e=>{let[n,a]=ka.useState(),[t,o]=ka.useState(),u=ka.useRef();return u.current=e,Gt(()=>{if(!t)return Qv.default.isSupported()?a(D1e(e.videoStreamUrl,e.videoElementId,u)):e.onNotSupported(),o(!0),()=>{n&&n.destroy()}}),null},D1e=(e,n,a)=>{let t=document.getElementById(n);return t?(hls=new Qv.default,a.current.onInstanceCreated&&a.current.onInstanceCreated(hls),hls.on(Qv.default.Events.ERROR,function(o,u){if(a.current.onError&&a.current.onError("HLS error: "+u.type,u),u.fatal)switch(u.type){case Qv.default.ErrorTypes.MEDIA_ERROR:hls.recoverMediaError();break;default:hls.destroy(),a.current.onCriticalFail&&a.current.onCriticalFail(u.type);break}}),hls.on(Qv.default.Events.MEDIA_ATTACHED,()=>hls.loadSource(e)),hls.on(Qv.default.Events.MANIFEST_PARSED,()=>a.current.onReady&&a.current.onReady()),hls.on(Qv.default.Events.INIT_PTS_FOUND,(o,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 g1e=mv();var bz=function(){return function(){return g1e(wz)}};$a();var zl={PRIMARY:"#008CFD",SECONDARY:"#6E84A3",WHITE:"#FFF",GRAY_300:"#E3EBF6"};var gD=Cu(Gz()),Mz=4,K1e=({trackColor:e,background:n})=>({props:a,children:t})=>ka.createElement("div",Object.assign({},a,{style:Object.assign({},a.style,{height:`${Mz}px`,borderRadius:`${Mz*2}px`,background:n||e})}),...t),Y1e=({horizontal:e})=>({props:n,isDragged:a})=>ka.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18"}),ka.createElement("circle",{cx:"9",cy:"9",r:"8.5",fill:a?zl.SECONDARY:zl.WHITE,stroke:zl.SECONDARY}),ka.createElement("path",{stroke:a?zl.WHITE:zl.SECONDARY,d:e?"M7.5 6L7.5 12":"M6 7.5L12 7.5"}),ka.createElement("path",{stroke:a?zl.WHITE:zl.SECONDARY,d:e?"M10.5 6L10.5 12":"M6 10.5L12 10.5"})),Az=e=>ka.createElement(gD.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:K1e({trackColor:e.trackColor||zl.GRAY_300,background:e.fillBefore?(0,gD.getTrackBackground)({values:[e.value],colors:[zl.PRIMARY,zl.GRAY_300],min:e.min,max:e.max}):void 0}),renderThumb:Y1e({horizontal:!0})});var X1e=mv(),Lz={CanPassToJavaScript0:function(){},CanReceiveFromJavaScript1:function(){return iv}};var Pz=function(e){return function(){return function(){return X1e(Az)}}};var Z1e=or(We)()(),eEe=Pz(Lz)()(),nEe=Xn(vo),aEe=Wn(We)()(),tEe=Xn(ga),xz=Te(me),rEe=Ua(Y),I1=Ma(Ve),RA=W(ca),Nz=un(tn),oEe=tt(k0),Mc=W(yn),uEe=Q0(Ve),yA=Bn(Ve),iEe=k(ae),lEe=sc(O0),cEe=Nz(_a),Kv=Nz(Qn),sEe=lr(yn),vEe=Z(_a),fEe=Xl(Vu),_Ee=lr(rt),wA=function(){function e(){}return e.value=new e,e}(),bA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),EA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),jz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),IA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Oz=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),Uz=function(){function e(){}return e.value=new e,e}(),pEe=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),kz=function(e){return function(n){if(e.videoState instanceof M)return $n;if(e.videoState instanceof T){var a=Z1e("")({style:ot({minWidth:"6rem",width:"6rem"})})(eEe({value:function(){return e.videoState.value0.muted?0:e.videoState.value0.volume}(),min:0,max:1,step:.05,onChange:nEe(n)(function(i){return Ae.create(bA.create(i))})})),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 128, column 5 - line 130, column 34): "+[])}(),o=aEe("btn large px-3 py-1 mr-3 text-white fe "+t)({onClick:tEe(n)(new Ae(wA.value))})($n),u=xz("d-flex align-items-center text-white px-3")([Ke("LIVE"),rEe("text-danger x-large ml-2 mt-n1")("\u25CF")]);return xz("mb-2 w-100 d-flex align-items-center bg-semi-transparent-black "+function(){return e.visible?"":"hidden"}())([ya(e.config.liveIndicator)(u),ya(e.config.mute)(o),ya(e.config.volume)(a)])}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 105, column 1 - line 105, column 50): "+[e.constructor.name,n.constructor.name])}},Bz=function(e){return Ae.create(EA.create(e))},Hz=function(e){return I1(RA(new wn(new pEe(function(n){return function(){return e(n)(),new Ae(new EA(n))}}))))},T1=function(){return new Ae(new IA(!0))}(),qz=function(e){return{config:e,videoState:M.value,visible:!1,visibilityExpiration:oEe}},Jz=2e3,Wz=function(e){return function(n){if(n instanceof wn)return Mc(e);if(n instanceof Ae){var a=uEe(yA(function(){var i=Xu();return iEe(function(l){return Ae.create(Oz.create(l))})(lEe(Jz)(i))})),t=cEe(Yt(Jz))(function(){return RA(new Ae(Uz.value))}),o=function(u){if(n.value0 instanceof wA)return Mc(e);var i=function(l){if(n.value0 instanceof bA)return Mc(e);if(n.value0 instanceof EA)return Kv(I1(yA(function(){var R=$S(n.value0.value0)(),d=JS(n.value0.value0)();return new Ae(new jz({muted:R,volume:d}))})))(function(){return Mc(e)});if(n.value0 instanceof jz)return Mc({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T(n.value0.value0)});if(n.value0 instanceof IA)return Kv(sEe(n.value0.value0)(a))(function(){return Kv(I1(t))(function(){return Mc({config:e.config,videoState:e.videoState,visibilityExpiration:e.visibilityExpiration,visible:n.value0.value0})})});if(n.value0 instanceof Oz)return Mc({config:e.config,videoState:e.videoState,visible:e.visible,visibilityExpiration:n.value0.value0});if(n.value0 instanceof Uz)return Kv(I1(vEe(yA(Xu))(function(s){var R=fEe(s)(e.visibilityExpiration);return R?RA(new Ae(new IA(!1))):t})))(function(){return Mc(e)});throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 143, column 1 - line 143, column 55): "+[n.value0.constructor.name])};return n.value0 instanceof bA&&e.videoState instanceof T?Kv(a)(function(){return Kv(Hz(function(l){return function(){return _Ee(n.value0.value0>0)(n_(!1)(l))(),WS(n.value0.value0)(l)()}}))(function(){return Mc({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 wA&&e.videoState instanceof T?Kv(a)(function(){return Kv(Hz(n_(!e.videoState.value0.muted)))(function(){return Mc({config:e.config,visibilityExpiration:e.visibilityExpiration,visible:e.visible,videoState:new T({volume:e.videoState.value0.volume,muted:!e.videoState.value0.muted})})})}):o(!0)}throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 143, column 1 - line 143, column 55): "+[e.constructor.name,n.constructor.name])}},$z=function(e){if(e instanceof T)return!1;if(e instanceof M)return!0;throw new Error("Failed pattern match at Livestream.VideoPlayer.CustomControls (line 212, column 1 - line 212, column 37): "+[e.constructor.name])};var zz=e=>n=>a=>()=>e.then(a,n),Vz=e=>e instanceof Error,Qz=e=>e===null?"null":typeof e=="undefined"?"undefined":e.toString();var dEe=W(Qc(cr)),mEe=A0(cr),hEe=pn(dn),Kz=ma(nR(iR)(cr)),DEe=Xc(cr),gEe=k(eR(Jc)),REe=lm(cr),yEe=Rg(zn),wEe=Xa(gx);var bEe=function(e){var n=function(a){if(Vz(a))return dEe(a);if($e)return mEe(new um(""));throw new Error("Failed pattern match at Utils.Promise (line 53, column 5 - line 55, column 43): "+[a.constructor.name])};return Ut(function(a){return cu("Promise failed: "+Qz(e))})(hEe)(Zm(Kz(n(e))(Kz(DEe("Error")(e))(gEe(cu)(REe(e))))))},S1=function(e){return fv(function(n){return yEe(wEe)(zz(e)(function(a){return n(Me.create(bEe(a)))()})(function(a){return n(Le.create(a))()}))})};var EEe=Z(en),IEe=Te(We),TA=sr(gv),RD=Z(tr),SA=ev(rt)(Pu),C1=Xn(ga),Yz=zR(Y)()(),TEe=bz()(),SEe=W(rt),yD=Xn(vo),Xz=or(We)()(),CEe=Wn(me)()(),FEe=Qa(Y),GEe=Te(me),Zz=un(tn),MEe=Is(Ve)(),AEe=ci(fn)(st),LEe=we(Qt(nt)),sd=Zz(_a),PEe=Ws(ca),xEe=Pr(q0),ao=W(ca),eV=Bn(Ve),nV=xt(Nr),aV=pI(_a),Jr=W(yn),to=Zz(Qn),bu=Ma(Ve),tV=k(Ga),rV=Q0(Ve),oV=k(zn),NEe=it(wr(Ga)),jEe=k(ae),OEe=pe(ae),uV=an(OP),iV=function(){function e(){}return e.value=new e,e}(),lV=function(){function e(){}return e.value=new e,e}(),wD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),cV=function(){function e(){}return e.value=new e,e}(),vd=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),sV=function(){function e(){}return e.value=new e,e}(),vV=function(){function e(){}return e.value=new e,e}(),fV=function(){function e(){}return e.value=new e,e}(),CA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),FA=function(){function e(){}return e.value=new e,e}(),F1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),G1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),M1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),_V=function(){function e(){}return e.value=new e,e}(),GA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),MA=function(){function e(){}return e.value=new e,e}(),pV=function(){function e(){}return e.value=new e,e}(),dV=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),U_=function(){function e(){}return e.value=new e,e}(),Ac=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),A1=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),AA=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),bD=function(){function e(n){this.value0=n}return e.create=function(n){return new e(n)},e}(),LA=function(e){var n=e.Monad0(),a=Z(n.Bind1()),t=Bn(e),o=W(n.Applicative0());return function(u){return function(i){return function(l){return a(t(yy(u.videoId)))(function(s){return bn(o(i.whenNotFound))(l)(EEe(s)(v8))})}}}},mV=LA(gr),PA=LA(Ve),hV=function(e){var n=LA(e);return function(a){return n(a)({whenNotFound:Ee})}},UEe=hV(gr),kEe=hV(Ve),L1=function(e){return function(n){return function(a){var t=function(){var S=IEe("position-absolute-fullsize py-6 d-flex align-items-center justify-content-around");if(n.stage instanceof cV)return S(e.errorScreen("It appears that video playback is not supported in your browser."));if(n.stage instanceof sV)return S(e.errorScreen("The video didn't load correctly, try refreshing the page."));if(n.stage instanceof wD)return S(e.introScreen);if(n.stage instanceof vd)return $n;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 253, column 20 - line 264, column 16): "+[n.stage.constructor.name])}(),o=function(){return n.stage instanceof wD?n.stage.value0.reset:!1}(),u=TA(function(S){return RD(Ry(S))(SA(function(L){return a(new Ae(new AA({time:L})))}))}),i=TA(function(S){return RD(Ry(S))(SA(function(L){return a(new Ae(new A1({playing:!0,time:L})))}))}),l=function(S){return a(wn.create(S))},s=TA(function(S){return RD(Ry(S))(SA(function(L){return l(new GA(L))}))}),R=C1(l)(_V.value),d=Se([Yz("w-100 t--real-video")({id:n.videoId,controls:Tt(n.customControls),onVolumeChange:R,onTimeUpdate:u,onPlay:i,onPause:s})(""),ya(!o)(TEe({videoStreamUrl:e.watchUrl,videoElementId:n.videoId,onNotSupported:l(vV.value),onError:function(S,L){return Ee},onCriticalFail:yD(l)(function(S){var L=S==="networkError";return L?FA.value:new F1("HLS player crashed")}),onReady:l(new G1({autoPlay:e.autoPlay})),onInitialPts:yD(l)(function(S){return new dV(S.initPTS)})}))]),y=function(){return n.stage instanceof vd&&n.stage.value0.unmuteOverlay?Xz("position-absolute-fullsize d-flex align-items-center justify-content-center t--unmute-overlay")({style:ot({pointerEvents:"none"})})(CEe("btn btn-sm btn-light border-dark px-4 d-flex align-items-center")({onClick:C1(l)(pV.value),style:ot({pointerEvents:"all"})})([Ke("click for sound"),FEe("fe fe-volume-2 ml-2")("")])):$n}(),I=function(S){return Xz("position-absolute-fullsize d-flex align-items-end t--controls-overlay")({onMouseMove:yD(l)(function(L){return new Ac(T1)}),onMouseDown:yD(l)(function(L){return new Ac(T1)}),onTouchStart:yD(l)(function(L){return new Ac(T1)})})(kz(S)(function(L){return l(Ac.create(L))}))},b=Yz("w-100 t--real-video")({id:n.videoId,controls:Tt(n.customControls),playsInline:!0,onVolumeChange:R,onTimeUpdate:u,onPlay:i,onPause:s,onLoadedMetadata:C1(l)(new G1({autoPlay:e.autoPlay})),onError:C1(l)(FA.value),src:function(){return o?"":e.watchUrl}()})("");return GEe("position-relative w-100")([function(){if(n.support instanceof iV)return d;if(n.support instanceof lV)return b;throw new Error("Failed pattern match at Livestream.VideoPlayer (line 175, column 7 - line 177, column 40): "+[n.support.constructor.name])}(),da(n.customControls)(I),ya(n.allowSound)(y),t])}}},BEe=function(e){var n=Bn(e.MonadEffect0());return function(a){return n(function(){return UEe(a)(n_(!1))(),MA.value})}},HEe=BEe(b8),xA=function(e){return MEe("Livestream: Error")({livestream_error_message:e})},DV=function(e){return mV(e)({whenNotFound:!1})(qS)},qEe=function(e){return Bn(e)(function(){var a=RD(RD(Yu)(YS))(KS)();return AEe(function(t){return LEe(Sj(t)(a))(new T(0))})(["iPad","iPod","iPhone"])})},gV=qEe(Ve),JEe=function(e){var n=function(t){return sd(PEe(e.allowSound)(xEe(cu("Skipping attempt to play unmuted because sound was programmatically disallowed"))))(function(){return sd(S1(y1(t)))(function(){return ao(new M1({unmuteOverlay:!1}))})})},a=function(t){return sd(eV(n_(!0)(t)))(function(){return sd(S1(y1(t)))(function(){return ao(new M1({unmuteOverlay:!0}))})})};return PA(e)({whenNotFound:new F1("