PageSourceSearch

https://oleo-official.com/_nuxt/1271.1e0e0ede42d4edd5c3ca.js

js oleo-official.com collected 2026-10-02 23:00:59 UTC 1,903,972 bytes, 2 lines download raw bytes

1/*! For license information please see LICENSES */
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e364b58a-c723-49bc-a92f-77d87fb28049",e._sentryDebugIdIdentifier="sentry-dbid-e364b58a-c723-49bc-a92f-77d87fb28049")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"74b21cb3507cbecf8142f0bef35255182e8aabc7"},(window.webpackJsonp=window.webpackJsonp||[]).push([[1271],{0:function(e,t,n){"use strict";n.d(t,"b",(function(){return K}));var r=n(48),o=n(150);function c(source,e,t){return new o.a("Syntax Error: ".concat(t),void 0,source,[e])}var l=n(20),d=n(50),h=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),f=n(103),v=n(37),m=n(45),y=n(122);function E(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var _=function(){function e(body){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof body||Object(m.a)(0,"Body must be a string. Received: ".concat(Object(v.a)(body),".")),this.body=body,this.name=e,this.locationOffset=t,this.locationOffset.line>0||Object(m.a)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Object(m.a)(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n,r;return t=e,(n=[{key:f.a,get:function(){return"Source"}}])&&E(t.prototype,n),r&&E(t,r),e}();var k=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"}),T=n(254),w=function(){function e(source){var e=new d.b(h.SOF,0,0,0,0,null);this.source=source,this.lastToken=e,this.token=e,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==h.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=A(this,e)}while(e.kind===h.COMMENT);return e},e}();function S(code){return isNaN(code)?h.EOF:code<127?JSON.stringify(String.fromCharCode(code)):'"\\u'.concat(("00"+code.toString(16).toUpperCase()).slice(-4),'"')}function A(e,t){for(var source=e.source,body=source.body,n=body.length,r=t.end;r<n;){var code=body.charCodeAt(r),o=e.line,l=1+r-e.lineStart;switch(code){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:10===body.charCodeAt(r+1)?r+=2:++r,++e.line,e.lineStart=r;continue;case 33:return new d.b(h.BANG,r,r+1,o,l,t);case 35:return R(source,r,o,l,t);case 36:return new d.b(h.DOLLAR,r,r+1,o,l,t);case 38:return new d.b(h.AMP,r,r+1,o,l,t);case 40:return new d.b(h.PAREN_L,r,r+1,o,l,t);case 41:return new d.b(h.PAREN_R,r,r+1,o,l,t);case 46:if(46===body.charCodeAt(r+1)&&46===body.charCodeAt(r+2))return new d.b(h.SPREAD,r,r+3,o,l,t);break;case 58:return new d.b(h.COLON,r,r+1,o,l,t);case 61:return new d.b(h.EQUALS,r,r+1,o,l,t);case 64:return new d.b(h.AT,r,r+1,o,l,t);case 91:return new d.b(h.BRACKET_L,r,r+1,o,l,t);case 93:return new d.b(h.BRACKET_R,r,r+1,o,l,t);case 123:return new d.b(h.BRACE_L,r,r+1,o,l,t);case 124:return new d.b(h.PIPE,r,r+1,o,l,t);case 125:return new d.b(h.BRACE_R,r,r+1,o,l,t);case 34:return 34===body.charCodeAt(r+1)&&34===body.charCodeAt(r+2)?x(source,r,o,l,t,e):D(source,r,o,l,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return O(source,r,code,o,l,t);
vendor: 4,231 bytes, line 2
2case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return M(source,r,o,l,t)}throw c(source,r,I(code))}var line=e.line,col=1+r-e.lineStart;return new d.b(h.EOF,n,n,line,col,t)}function I(code){return code<32&&9!==code&&10!==code&&13!==code?"Cannot contain the invalid character ".concat(S(code),"."):39===code?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(S(code),".")}function R(source,e,line,col,t){var code,body=source.body,n=e;do{code=body.charCodeAt(++n)}while(!isNaN(code)&&(code>31||9===code));return new d.b(h.COMMENT,e,n,line,col,t,body.slice(e+1,n))}function O(source,e,t,line,col,n){var body=source.body,code=t,r=e,o=!1;if(45===code&&(code=body.charCodeAt(++r)),48===code){if((code=body.charCodeAt(++r))>=48&&code<=57)throw c(source,r,"Invalid number, unexpected digit after 0: ".concat(S(code),"."))}else r=L(source,r,code),code=body.charCodeAt(r);if(46===code&&(o=!0,code=body.charCodeAt(++r),r=L(source,r,code),code=body.charCodeAt(r)),69!==code&&101!==code||(o=!0,43!==(code=body.charCodeAt(++r))&&45!==code||(code=body.charCodeAt(++r)),r=L(source,r,code),code=body.charCodeAt(r)),46===code||function(code){return 95===code||code>=65&&code<=90||code>=97&&code<=122}(code))throw c(source,r,"Invalid number, expected digit but got: ".concat(S(code),"."));return new d.b(o?h.FLOAT:h.INT,e,r,line,col,n,body.slice(e,r))}function L(source,e,t){var body=source.body,n=e,code=t;if(code>=48&&code<=57){do{code=body.charCodeAt(++n)}while(code>=48&&code<=57);return n}throw c(source,n,"Invalid number, expected digit but got: ".concat(S(code),"."))}function D(source,e,line,col,t){for(var a,b,n,r,body=source.body,o=e+1,l=o,code=0,f="";o<body.length&&!isNaN(code=body.charCodeAt(o))&&10!==code&&13!==code;){if(34===code)return f+=body.slice(l,o),new d.b(h.STRING,e,o+1,line,col,t,f);if(code<32&&9!==code)throw c(source,o,"Invalid character within String: ".concat(S(code),"."));if(++o,92===code){switch(f+=body.slice(l,o-1),code=body.charCodeAt(o)){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+="\n";break;case 114:f+="\r";break;case 116:f+="\t";break;case 117:var v=(a=body.charCodeAt(o+1),b=body.charCodeAt(o+2),n=body.charCodeAt(o+3),r=body.charCodeAt(o+4),C(a)<<12|C(b)<<8|C(n)<<4|C(r));if(v<0){var m=body.slice(o+1,o+5);throw c(source,o,"Invalid character escape sequence: \\u".concat(m,"."))}f+=String.fromCharCode(v),o+=4;break;default:throw c(source,o,"Invalid character escape sequence: \\".concat(String.fromCharCode(code),"."))}l=++o}}throw c(source,o,"Unterminated string.")}function x(source,e,line,col,t,n){for(var body=source.body,r=e+3,o=r,code=0,l="";r<body.length&&!isNaN(code=body.charCodeAt(r));){if(34===code&&34===body.charCodeAt(r+1)&&34===body.charCodeAt(r+2))return l+=body.slice(o,r),new d.b(h.BLOCK_STRING,e,r+3,line,col,t,Object(T.a)(l));if(code<32&&9!==code&&10!==code&&13!==code)throw c(source,r,"Invalid character within String: ".concat(S(code),"."));10===code?(++r,++n.line,n.lineStart=r):13===code?(10===body.charCodeAt(r+1)?r+=2:++r,++n.line,n.lineStart=r):92===code&&34===body.charCodeAt(r+1)&&34===body.charCodeAt(r+2)&&34===body.charCodeAt(r+3)?(l+=body.slice(o,r)+'"""',o=r+=4):++r}throw c(source,r,"Unterminated string.")}function C(a){return a>=48&&a<=57?a-48:a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:-1}function M(source,e,line,col,t){for(var body=source.body,n=body.length,r=e+1,code=0;r!==n&&!isNaN(code=body.charCodeAt(r))&&(95===code||code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122);)++r;return new d.b(h.NAME,e,r,line,col,t,body.slice(e,r))}var P=function(){function e(source,e){var t=function(source){return Object(y.a)(source,_)}(source)?source:new _(source);this._lexer=new w(t),this._options=e}var t=e.prototype;
vendor: 14,882 bytes, line 2
2return t.parseName=function(){var e=this.expectToken(h.NAME);return{kind:l.a.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:l.a.DOCUMENT,definitions:this.many(h.SOF,this.parseDefinition,h.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(h.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(h.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(h.BRACE_L))return{kind:l.a.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(h.NAME)&&(t=this.parseName()),{kind:l.a.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(h.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(h.PAREN_L,this.parseVariableDefinition,h.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:l.a.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(h.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(h.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(h.DOLLAR),{kind:l.a.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:l.a.SELECTION_SET,selections:this.many(h.BRACE_L,this.parseSelection,h.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(h.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(h.COLON)?(e=r,t=this.parseName()):t=r,{kind:l.a.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(h.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(h.PAREN_L,t,h.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(h.COLON),{kind:l.a.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:l.a.ARGUMENT,name:this.parseName(),value:(this.expectToken(h.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(h.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(h.NAME)?{kind:l.a.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:l.a.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:l.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:l.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case h.BRACKET_L:return this.parseList(e);case h.BRACE_L:return this.parseObject(e);case h.INT:return this._lexer.advance(),{kind:l.a.INT,value:t.value,loc:this.loc(t)};case h.FLOAT:return this._lexer.advance(),{kind:l.a.FLOAT,value:t.value,loc:this.loc(t)};case h.STRING:case h.BLOCK_STRING:return this.parseStringLiteral();case h.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:l.a.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:l.a.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:l.a.NULL,loc:this.loc(t)};default:return{kind:l.a.ENUM,value:t.value,loc:this.loc(t)}}case h.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:l.a.STRING,value:e.value,block:e.kind===h.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:l.a.LIST,values:this.any(h.BRACKET_L,(function(){return t.parseValueLiteral(e)}),h.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:l.a.OBJECT,fields:this.any(h.BRACE_L,(function(){return t.parseObjectField(e)}),h.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(h.COLON),{kind:l.a.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(h.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(h.AT),{kind:l.a.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(h.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(h.BRACKET_R),e={kind:l.a.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(h.BANG)?{kind:l.a.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:l.a.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===h.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(h.STRING)||this.peek(h.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(h.BRACE_L,this.parseOperationTypeDefinition,h.BRACE_R);return{kind:l.a.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(h.COLON);var n=this.parseNamedType();return{kind:l.a.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:l.a.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),c=this.parseFieldsDefinition();return{kind:l.a.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:c,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(h.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(h.AMP)||this.peek(h.NAME));return t}return this.delimitedMany(h.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(h.BRACE_L)&&this._lexer.lookahead().kind===h.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(h.BRACE_L,this.parseFieldDefinition,h.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(h.COLON);var o=this.parseTypeReference(),c=this.parseDirectives(!0);return{kind:l.a.FIELD_DEFINITION,description:t,name:n,arguments:r,type:o,directives:c,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(h.PAREN_L,this.parseInputValueDef,h.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(h.COLON);var r,o=this.parseTypeReference();this.expectOptionalToken(h.EQUALS)&&(r=this.parseValueLiteral(!0));var c=this.parseDirectives(!0);return{kind:l.a.INPUT_VALUE_DEFINITION,description:t,name:n,type:o,defaultValue:r,directives:c,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),c=this.parseFieldsDefinition();return{kind:l.a.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:c,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),o=this.parseUnionMemberTypes();return{kind:l.a.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:o,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(h.EQUALS)?this.delimitedMany(h.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();return{kind:l.a.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:o,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(h.BRACE_L,this.parseEnumValueDefinition,h.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:l.a.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();return{kind:l.a.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:o,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(h.BRACE_L,this.parseInputValueDef,h.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===h.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(h.BRACE_L,this.parseOperationTypeDefinition,h.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:l.a.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:l.a.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return{kind:l.a.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return{kind:l.a.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:l.a.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:l.a.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:l.a.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();
2this.expectKeyword("directive"),this.expectToken(h.AT);var n=this.parseName(),r=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var c=this.parseDirectiveLocations();return{kind:l.a.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:o,locations:c,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(h.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==k[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new d.a(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw c(this._lexer.source,t.start,"Expected ".concat(U(e),", found ").concat(N(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==h.NAME||t.value!==e)throw c(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(N(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===h.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return c(this._lexer.source,t.start,"Unexpected ".concat(N(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function N(e){var t=e.value;return U(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function U(e){return function(e){return e===h.BANG||e===h.DOLLAR||e===h.AMP||e===h.PAREN_L||e===h.PAREN_R||e===h.SPREAD||e===h.COLON||e===h.EQUALS||e===h.AT||e===h.BRACKET_L||e===h.BRACKET_R||e===h.BRACE_L||e===h.PIPE||e===h.BRACE_R}(e)?'"'.concat(e,'"'):e}var F=new Map,B=new Map,j=!0,V=!1;function H(e){return e.replace(/[\s,]+/g," ").trim()}function W(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,o=H((l=e.loc).source.body.substring(l.start,l.end)),c=B.get(r);c&&!c.has(o)?j&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):c||B.set(r,c=new Set),c.add(o),t.has(o)||(t.add(o),n.push(e))}else n.push(e);var l})),Object(r.a)(Object(r.a)({},e),{definitions:n})}function G(source){var e=H(source);if(!F.has(e)){var t=function(source,e){return new P(source,e).parseDocument()}(source,{experimentalFragmentVariables:V,allowLegacyFragmentVariables:V});if(!t||"Document"!==t.kind)throw new Error("Not a valid GraphQL document.");F.set(e,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(W(t)))}return F.get(e)}function K(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,i){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[i+1]})),G(r)}var Y,$=K,Q=function(){F.clear(),B.clear()},z=function(){j=!1},X=function(){V=!0},J=function(){V=!1};(Y=K||(K={})).gql=$,Y.resetCaches=Q,Y.disableFragmentWarnings=z,Y.enableExperimentalFragmentVariables=X,Y.disableExperimentalFragmentVariables=J,K.default=K;t.a=K},102:function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return d}));var r=n(165),o=n(139),c=n(65);function l(e){const t=Object(r.b)(),n={sid:Object(o.f)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Object(c.c)({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&d(n,e),n}function d(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object(r.b)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Object(o.f)()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function h(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),d(e,n)}},103:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var r="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},11:function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"addTypenameToDocument",(function(){return ae})),n.d(t,"argumentsObjectFromField",(function(){return k})),n.d(t,"assign",(function(){return B})),n.d(t,"buildQueryFromSelectionSet",(function(){return pe})),n.d(t,"canUseWeakMap",(function(){return me})),n.d(t,"checkDocument",(function(){return V})),n.d(t,"cloneDeep",(function(){return ye})),n.d(t,"createFragmentMap",(function(){return z})),n.d(t,"getDefaultValues",(function(){return X})),n.d(t,"getDirectiveInfoFromField",(function(){return D})),n.d(t,"getDirectiveNames",(function(){return C})),n.d(t,"getDirectivesFromDocument",(function(){return le})),n.d(t,"getEnv",(function(){return Ee})),n.d(t,"getFragmentDefinition",(function(){return $})),n.d(t,"getFragmentDefinitions",(function(){return K})),n.d(t,"getFragmentQueryDocument",(function(){return F})),n.d(t,"getInclusionDirectives",(function(){return U})),n.d(t,"getMainDefinition",(function(){return Q})),n.d(t,"getMutationDefinition",(function(){return j})),n.d(t,"getOperationDefinition",(function(){return H})),n.d(t,"getOperationDefinitionOrDie",(function(){return W})),n.d(t,"getOperationName",(function(){return G})),n.d(t,"getQueryDefinition",(function(){return Y})),n.d(t,"getStoreKeyName",(function(){return _})),n.d(t,"graphQLResultHasError",(function(){return Ae})),n.d(t,"hasClientExports",(function(){return P})),n.d(t,"hasDirectives",(function(){return M})),n.d(t,"isDevelopment",(function(){return Te})),n.d(t,"isEnv",(function(){return _e}
2)),n.d(t,"isField",(function(){return w})),n.d(t,"isIdValue",(function(){return A})),n.d(t,"isInlineFragment",(function(){return S})),n.d(t,"isJsonValue",(function(){return R})),n.d(t,"isNumberValue",(function(){return v})),n.d(t,"isProduction",(function(){return ke})),n.d(t,"isScalarValue",(function(){return f})),n.d(t,"isTest",(function(){return we})),n.d(t,"maybeDeepFreeze",(function(){return Re})),n.d(t,"mergeDeep",(function(){return Le})),n.d(t,"mergeDeepArray",(function(){return De})),n.d(t,"removeArgumentsFromDocument",(function(){return de})),n.d(t,"removeClientSetsFromDocument",(function(){return ve})),n.d(t,"removeConnectionDirectiveFromDocument",(function(){return se})),n.d(t,"removeDirectivesFromDocument",(function(){return ie})),n.d(t,"removeFragmentSpreadFromDocument",(function(){return he})),n.d(t,"resultKeyNameFromField",(function(){return T})),n.d(t,"shouldInclude",(function(){return x})),n.d(t,"storeKeyNameFromField",(function(){return y})),n.d(t,"stripSymbols",(function(){return Ue})),n.d(t,"toIdValue",(function(){return I})),n.d(t,"tryFunctionOrLogError",(function(){return Se})),n.d(t,"valueFromNode",(function(){return L})),n.d(t,"valueToObjectRepresentation",(function(){return m})),n.d(t,"variablesInOperation",(function(){return J})),n.d(t,"warnOnceInDevelopment",(function(){return Ne}));var r=n(99),o=n(23),c=n(85),l=n(469),d=n.n(l),h=n(433);function f(e){return["StringValue","BooleanValue","EnumValue"].indexOf(e.kind)>-1}function v(e){return["IntValue","FloatValue"].indexOf(e.kind)>-1}function m(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var c={};n.fields.map((function(e){return m(c,e.name,e.value,r)})),e[t.value]=c}else if(function(e){return"Variable"===e.kind}(n)){var l=(r||{})[n.name.value];e[t.value]=l}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return m(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw new o.a(17);e[t.value]=null}}function y(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var o=r.name,c=r.value;return m(n[e.name.value],o,c,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,o=e.value;return m(r,n,o,t)}))),_(e.name.value,r,n)}n.d(t,"isEqual",(function(){return h.a}));var E=["connection","include","skip","client","rest","export"];function _(e,t,n){if(n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var o=t,c={};return r.forEach((function(e){c[e]=o[e]})),n.connection.key+"("+JSON.stringify(c)+")"}return n.connection.key}var l=e;if(t){var h=d()(t);l+="("+h+")"}return n&&Object.keys(n).forEach((function(e){-1===E.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?l+="@"+e+"("+JSON.stringify(n[e])+")":l+="@"+e)})),l}function k(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,o=e.value;return m(n,r,o,t)})),n}return null}function T(e){return e.alias?e.alias.value:e.name.value}function w(e){return"Field"===e.kind}function S(e){return"InlineFragment"===e.kind}function A(e){return e&&"id"===e.type&&"boolean"==typeof e.generated}function I(e,t){return void 0===t&&(t=!1),Object(c.a)({type:"id",generated:t},"string"==typeof e?{id:e,typename:void 0}:e)}function R(e){return null!=e&&"object"==typeof e&&"json"===e.type}function O(e){throw new o.a(18)}function L(e,t){switch(void 0===t&&(t=O),e.kind){case"Variable":return t(e);case"NullValue":return null;case"IntValue":return parseInt(e.value,10);case"FloatValue":return parseFloat(e.value);case"ListValue":return e.values.map((function(e){return L(e,t)}));case"ObjectValue":for(var n={},r=0,o=e.fields;r<o.length;r++){var c=o[r];n[c.name.value]=L(c.value,t)}return n;default:return e.value}}function D(e,t){if(e.directives&&e.directives.length){var n={};
2return e.directives.forEach((function(e){n[e.name.value]=k(e,t)})),n}return null}function x(e,t){return void 0===t&&(t={}),U(e.directives).every((function(e){var n=e.directive,r=e.ifArgument,c=!1;return"Variable"===r.value.kind?(c=t[r.value.name.value],Object(o.b)(void 0!==c,13)):c=r.value.value,"skip"===n.name.value?!c:c}))}function C(e){var t=[];return Object(r.b)(e,{Directive:function(e){t.push(e.name.value)}}),t}function M(e,t){return C(t).some((function(t){return e.indexOf(t)>-1}))}function P(e){return e&&M(["client"],e)&&M(["export"],e)}function N(e){var t=e.name.value;return"skip"===t||"include"===t}function U(e){return e?e.filter(N).map((function(e){var t=e.arguments;e.name.value;Object(o.b)(t&&1===t.length,14);var n=t[0];Object(o.b)(n.name&&"if"===n.name.value,15);var r=n.value;return Object(o.b)(r&&("Variable"===r.kind||"BooleanValue"===r.kind),16),{directive:e,ifArgument:n}})):[]}function F(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new o.a(11);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(Object(o.b)(1===r.length,12),n=r[0].name.value),Object(c.a)(Object(c.a)({},e),{definitions:Object(c.b)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions)})}function B(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(source){null!=source&&Object.keys(source).forEach((function(t){e[t]=source[t]}))})),e}function j(e){V(e);var t=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))[0];return Object(o.b)(t,1),t}function V(e){Object(o.b)(e&&"Document"===e.kind,2);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw new o.a(3);return e}));return Object(o.b)(t.length<=1,4),e}function H(e){return V(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function W(e){var t=H(e);return Object(o.b)(t,5),t}function G(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function K(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function Y(e){var t=H(e);return Object(o.b)(t&&"query"===t.operation,6),t}function $(e){Object(o.b)("Document"===e.kind,7),Object(o.b)(e.definitions.length<=1,8);var t=e.definitions[0];return Object(o.b)("FragmentDefinition"===t.kind,9),t}function Q(e){var t;V(e);for(var n=0,r=e.definitions;n<r.length;n++){var c=r[n];if("OperationDefinition"===c.kind){var l=c.operation;if("query"===l||"mutation"===l||"subscription"===l)return c}"FragmentDefinition"!==c.kind||t||(t=c)}if(t)return t;throw new o.a(10)}function z(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function X(e){if(e&&e.variableDefinitions&&e.variableDefinitions.length){var t=e.variableDefinitions.filter((function(e){return e.defaultValue})).map((function(e){var t=e.variable,n=e.defaultValue,r={};return m(r,t.name,n),r}));return B.apply(void 0,Object(c.b)([{}],t))}return{}}function J(e){var t=new Set;if(e.variableDefinitions)for(var n=0,r=e.variableDefinitions;n<r.length;n++){var o=r[n];t.add(o.variable.name.value)}return t}function Z(e,t,n){var r=0;return e.forEach((function(n,i){t.call(this,n,i,e)&&(e[r++]=n)}),n),e.length=r,e}var ee={kind:"Field",name:{kind:"Name",value:"__typename"}};function te(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&te(t[e.name.value],t)}))}function ne(e){return te(H(e)||$(e),z(K(e)))?null:e}function re(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function ie(e,t){var n=Object.create(null),o=[],c=Object.create(null),l=[],d=ne(Object(r.b)(t,{Variable:{enter:function(e,t,r){"VariableDefinition"!==r.kind&&(n[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&(e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(re(e))))return t.arguments&&t.arguments.forEac
2h((function(e){"Variable"===e.value.kind&&o.push({name:e.value.name.value})})),t.selectionSet&&fe(t.selectionSet).forEach((function(e){l.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){c[e.name.value]=!0}},Directive:{enter:function(t){if(re(e)(t))return null}}}));return d&&Z(o,(function(e){return!n[e.name]})).length&&(d=de(o,d)),d&&Z(l,(function(e){return!c[e.name]})).length&&(d=he(l,d)),d}function ae(e){return Object(r.b)(V(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(r)if(!r.some((function(e){return w(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=n;if(!(w(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return Object(c.a)(Object(c.a)({},e),{selections:Object(c.b)(r,[ee])})}}}}})}var oe={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||e.arguments.some((function(e){return"key"===e.name.value}))),t}};function se(e){return ie([oe],V(e))}function ue(e,t,n){return void 0===n&&(n=!0),t&&t.selections&&t.selections.some((function(t){return ce(e,t,n)}))}function ce(e,t,n){return void 0===n&&(n=!0),!w(t)||!!t.directives&&(t.directives.some(re(e))||n&&ue(e,t.selectionSet,n))}function le(e,t){var n;return V(t),ne(Object(r.b)(t,{SelectionSet:{enter:function(t,r,o,path){var l=path.join("-");if(!n||l===n||!l.startsWith(n)){if(t.selections){var d=t.selections.filter((function(t){return ce(e,t)}));return ue(e,t,!1)&&(n=l),Object(c.a)(Object(c.a)({},t),{selections:d})}return null}}}}))}function de(e,t){var n=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return ne(Object(r.b)(t,{OperationDefinition:{enter:function(t){return Object(c.a)(Object(c.a)({},t),{variableDefinitions:t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))}))})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var r=0;if(t.arguments.forEach((function(e){n(e)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(e){if(n(e))return null}}}))}function he(e,t){function n(t){if(e.some((function(e){return e.name===t.name.value})))return null}return ne(Object(r.b)(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}function fe(e){var t=[];return e.selections.forEach((function(e){(w(e)||S(e))&&e.selectionSet?fe(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function pe(e){return"query"===Q(e).operation?e:Object(r.b)(e,{OperationDefinition:{enter:function(e){return Object(c.a)(Object(c.a)({},e),{operation:"query"})}}})}function ve(e){V(e);var t=ie([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=Object(r.b)(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return w(e)&&"__typename"===e.name.value})))return null}}})),t}var me="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),ge=Object.prototype.toString;function ye(e){return be(e,new Map)}function be(e,t){switch(ge.call(e)){case"[object Array]":if(t.has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,i){n[i]=be(e,t)})),n;case"[object Object]":if(t.has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach((function(n){r[n]=be(e[n],t)})),r;default:return e}}function Ee(){return void 0!==e?"production":"development"}function _e(e){return Ee()===e}function ke(){return!0===_e("production")}function Te(){return!0===_e("development")}function we(){return!0===_e("test")}function Se(e){try{return e()}catch(e){console.error&&console.error(e)}}function Ae(e){return e.errors&&e.errors.length}function Ie(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){null===e[t]||"object"!=typeof e[t]&&"function"!=typeof e[t]||Object.isFrozen(e[t])||Ie(e[t])})),e}function Re(e){if((Te()||we())&&!("function"==typeof Symbol&&"string"==typeof Symbol("")))return Ie(e);return e}var Oe=Object.prototype.hasOwnProperty;function Le(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return De(e)}function De(e){var t=e[0]||{},n=e.length;if(n>1){var r=[];t=Me(t,r);for(var i=1;i<n;++i)t=Ce(t,e[i],r)}return t}function xe(e){return null!==e&&"object"==typeof e}function Ce(e,source,t){return xe(source)&&xe(e)?(Object.isExtensible&&!Object.isExtensible(e)&&(e=Me(e,t)),Object.keys(source).forEach((function(n){var r=source[n];if(Oe.call(e,n)){var o=e[n];r!==o&&(e[n]=Ce(Me(o,t),r,t))}else e[n]=r})),e):source}function Me(e,t){return null!==e&&"object"==typeof e&&t.indexOf(e)<0&&(e=Array.isArray(e)?e.slice(0):Object(c.a)({__proto__:Object.getPrototypeOf(e)},e),t.push(e)),e}var Pe=Object.create({});function Ne(e,t){void 0===t&&(t="warn"),ke()||Pe[e]||(we()||(Pe[e]=!0),"error"===t?console.error(e):console.warn(e))}function Ue(data){return JSON.parse(JSON.stringify(data))}}.call(this,n(153))},112:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(252),o=n(216);function c(e){var t=e.prototype.toJSON;"function"==typeof t||Object(r.a)(0),e.prototype.inspect=t,o.a&&(e.prototype[o.a]=t)}},118:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return m}));var r=n(49),o=n(165),c=n(190),l=n(139),d=n(57),h=n(102);class f{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){const t=new f;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata={...e._sdkProcessingMetadata}),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Object(h.c)(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(span){return this._span=span,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const span=this.getSpan();return span&&span.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof f?t:this}return e instanceof f?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Object(r.i)(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Object(o.a)(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction;if(t){e.sdkProcessingMetadata={dynamicSamplingContext:t.getDynamicSamplingContext(),...e.sdkProcessingMetadata};const n=t.name;n&&(e.tags={transaction:n,...e.tags})}}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...v(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,o=0){return new c.a(((c,l)=>{const d=e[o];if(null===t||"function"!=typeof d)c(t);else{const h=d({...t},n);Object(r.n)(h)?h.then((t=>this._notifyEventProcessors(e,t,n,o+1).then(c))).then(null,l):this._notifyEventProcessors(e,h,n,o+1).then(c).then(null,l)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
2h((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Object(l.c)(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function v(){return Object(d.c)("globalEventProcessors",(()=>[]))}function m(e){v().push(e)}},119:function(e,t,n){"use strict";n.d(t,"a",(function(){return ge})),n.d(t,"b",(function(){return te}));var r=function(e,b){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)b.hasOwnProperty(p)&&(e[p]=b[p])})(e,b)};function o(e,b){function t(){this.constructor=e}r(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}var c=function(){return(c=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};var l=n(11);function d(e){return{kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:h(e)}]}}function h(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e||null==e)return null;if(Array.isArray(e))return h(e[0]);var t=[];return Object.keys(e).forEach((function(n){var r={kind:"Field",name:{kind:"Name",value:n},selectionSet:h(e[n])||void 0};t.push(r)})),{kind:"SelectionSet",selections:t}}var f,v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:null,name:{kind:"Name",value:"__typename"},arguments:[],directives:[],selectionSet:null}]}}]},m=function(){function e(){}return e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.read({query:e.query,variables:e.variables,optimistic:t})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.read({query:Object(l.getFragmentQueryDocument)(e.fragment,e.fragmentName),variables:e.variables,rootId:e.id,optimistic:t})},e.prototype.writeQuery=function(e){this.write({dataId:"ROOT_QUERY",result:e.data,query:e.query,variables:e.variables})},e.prototype.writeFragment=function(e){this.write({dataId:e.id,result:e.data,variables:e.variables,query:Object(l.getFragmentQueryDocument)(e.fragment,e.fragmentName)})},e.prototype.writeData=function(e){var t,n,r=e.id,data=e.data;if(void 0!==r){var o=null;try{o=this.read({rootId:r,optimistic:!1,query:v})}catch(e){}var c=o&&o.__typename||"__ClientData",l=Object.assign({__typename:c},data);this.writeFragment({id:r,fragment:(t=l,n=c,{kind:"Document",definitions:[{kind:"FragmentDefinition",typeCondition:{kind:"NamedType",name:{kind:"Name",value:n||"__FakeType"}},name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:h(t)}]}),data:l})}else this.writeQuery({query:d(data),data:data})},e}();f||(f={});var y=n(433),E=null,_={},k=1,T="@wry/context:Slot",w=Array,S=w[T]||function(){var e=function(){function e(){this.id=["slot",k++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=E;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===_)break;return e!==E&&(E.slots[this.id]=t),!0}return E&&(E.slots[this.id]=_),!1},e.prototype.getValue=function(){if(this.hasValue())return E.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var o,c=((o={__proto__:null})[this.id]=e,o),l=E;E={parent:l,slots:c};try{return t.apply(r,n)}finally{E=l}},e.bind=function(e){var t=E;return function(){var n=E;try{return E=t,e.apply(this,arguments)}finally{E=n}}},e.noContext=function(e,t,n){if(!E)return e.apply(n,t);var r=E;try{return E=null,e.apply(n,t)}finally{E=r}},e}();try{Object.defineProperty(w,T,{value:w[T]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();S.bind,S.noContext;function A(){}var I=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=A),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getEntry(e);return t&&t.value},e.prototype.getEntry=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getEntry(e);
vendor: 4,112 bytes, line 2
2return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),R=new S,O=[],L=[];function D(e,t){if(!e)throw new Error(t||"assertion failure")}function x(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var C=function(){function e(t,n){this.fn=t,this.args=n,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],++e.count}return e.prototype.recompute=function(){if(D(!this.recomputing,"already recomputing"),function(e){var t=R.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),P(e)?F(t,e):B(t,e),t}(this)||!V(this))return P(this)?function(e){var t=H(e);R.withValue(e,M,[e]),function(e){if("function"==typeof e.subscribe)try{G(e),e.unsubscribe=e.subscribe.apply(null,e.args)}catch(t){return e.setDirty(),!1}return!0}(e)&&function(e){if(e.dirty=!1,P(e))return;U(e)}(e);return t.forEach(V),x(e.value)}(this):x(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,N(this),G(this))},e.prototype.dispose=function(){var e=this;H(this).forEach(V),G(this),this.parents.forEach((function(t){t.setDirty(),W(t,e)}))},e.count=0,e}();function M(e){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,e.args)}catch(t){e.value[1]=t}e.recomputing=!1}function P(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function N(e){e.parents.forEach((function(t){return F(t,e)}))}function U(e){e.parents.forEach((function(t){return B(t,e)}))}function F(e,t){if(D(e.childValues.has(t)),D(P(t)),e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=L.pop()||new Set;e.dirtyChildren.add(t),N(e)}function B(e,t){D(e.childValues.has(t)),D(!P(t));var a,b,n,r=e.childValues.get(t);0===r.length?e.childValues.set(t,t.value.slice(0)):(a=r,b=t.value,(n=a.length)>0&&n===b.length&&a[n-1]===b[n-1]||e.setDirty()),j(e,t),P(e)||U(e)}function j(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(L.length<100&&L.push(n),e.dirtyChildren=null))}function V(e){return 0===e.parents.size&&"function"==typeof e.reportOrphan&&!0===e.reportOrphan()}function H(e){var t=O;return e.childValues.size>0&&(t=[],e.childValues.forEach((function(n,r){W(e,r),t.push(r)}))),D(null===e.dirtyChildren),t}function W(e,t){t.parents.delete(e),e.childValues.delete(t),j(e,t)}function G(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var K=function(){function e(e){this.weakness=e}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return e.forEach((function(e){return t=t.getChildTrie(e)})),t.data||(t.data=Object.create(null))},e.prototype.getChildTrie=function(t){var map=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=map.get(t);return n||map.set(t,n=new e(this.weakness)),n},e}();var Y=new K("function"==typeof WeakMap);function $(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Y.lookupArray(e)}var Q=new Set;function z(e,t){void 0===t&&(t=Object.create(null));var n=new I(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=!!t.disposable,o=t.makeCacheKey||$;function c(){if(!r||R.hasValue()){var c=o.apply(null,arguments);if(void 0===c)return e.apply(null,arguments);var l=Array.prototype.slice.call(arguments),d=n.get(c);d?d.args=l:(d=new C(e,l),n.set(c,d),d.subscribe=t.subscribe,r&&(d.reportOrphan=function(){return n.delete(c)}));var h=d.recompute();
2return n.set(c,d),Q.add(n),R.hasValue()||(Q.forEach((function(e){return e.clean()})),Q.clear()),r?void 0:h}}return c.dirty=function(){var e=o.apply(null,arguments),t=void 0!==e&&n.get(e);t&&t.setDirty()},c}var X=n(23),J=!1;function Z(){var e=!J;return Object(l.isTest)()||(J=!0),e}var ee=function(){function e(){}return e.prototype.ensureReady=function(){return Promise.resolve()},e.prototype.canBypassInit=function(){return!0},e.prototype.match=function(e,t,n){var r=n.store.get(e.id),o="ROOT_QUERY"===e.id;if(!r)return o;var c=r.__typename,l=void 0===c?o&&"Query":c;return l&&l===t||(Z(),"heuristic")},e}(),te=function(){function e(e){e&&e.introspectionQueryResultData?(this.possibleTypesMap=this.parseIntrospectionResult(e.introspectionQueryResultData),this.isReady=!0):this.isReady=!1,this.match=this.match.bind(this)}return e.prototype.match=function(e,t,n){Object(X.b)(this.isReady,1);var r=n.store.get(e.id),o="ROOT_QUERY"===e.id;if(!r)return o;var c=r.__typename,l=void 0===c?o&&"Query":c;if(Object(X.b)(l,2),l===t)return!0;var d=this.possibleTypesMap[t];return!!(l&&d&&d.indexOf(l)>-1)},e.prototype.parseIntrospectionResult=function(e){var t={};return e.__schema.types.forEach((function(e){"UNION"!==e.kind&&"INTERFACE"!==e.kind||(t[e.name]=e.possibleTypes.map((function(e){return e.name})))})),t},e}(),ne=Object.prototype.hasOwnProperty,re=function(){function e(data){var e=this;void 0===data&&(data=Object.create(null)),this.data=data,this.depend=z((function(t){return e.data[t]}),{disposable:!0,makeCacheKey:function(e){return e}})}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.depend(e),this.data[e]},e.prototype.set=function(e,t){t!==this.data[e]&&(this.data[e]=t,this.depend.dirty(e))},e.prototype.delete=function(e){ne.call(this.data,e)&&(delete this.data[e],this.depend.dirty(e))},e.prototype.clear=function(){this.replace(null)},e.prototype.replace=function(e){var t=this;e?(Object.keys(e).forEach((function(n){t.set(n,e[n])})),Object.keys(this.data).forEach((function(n){ne.call(e,n)||t.delete(n)}))):Object.keys(this.data).forEach((function(e){t.delete(e)}))},e}();function ie(e){return new re(e)}var ae=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.cacheKeyRoot,o=void 0===r?new K(l.canUseWeakMap):r,c=n.freezeResults,d=void 0!==c&&c,h=this,f=h.executeStoreQuery,v=h.executeSelectionSet,m=h.executeSubSelectedArray;this.freezeResults=d,this.executeStoreQuery=z((function(e){return f.call(t,e)}),{makeCacheKey:function(e){var t=e.query,n=e.rootValue,r=e.contextValue,c=e.variableValues,l=e.fragmentMatcher;if(r.store instanceof re)return o.lookup(r.store,t,l,JSON.stringify(c),n.id)}}),this.executeSelectionSet=z((function(e){return v.call(t,e)}),{makeCacheKey:function(e){var t=e.selectionSet,n=e.rootValue,r=e.execContext;if(r.contextValue.store instanceof re)return o.lookup(r.contextValue.store,t,r.fragmentMatcher,JSON.stringify(r.variableValues),n.id)}}),this.executeSubSelectedArray=z((function(e){return m.call(t,e)}),{makeCacheKey:function(e){var t=e.field,n=e.array,r=e.execContext;if(r.contextValue.store instanceof re)return o.lookup(r.contextValue.store,t,n,JSON.stringify(r.variableValues))}})}return e.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore(c(c({},e),{returnPartialData:!1})).result},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.variables,o=e.previousResult,c=e.returnPartialData,d=void 0===c||c,h=e.rootId,f=void 0===h?"ROOT_QUERY":h,v=e.fragmentMatcherFunction,m=e.config,E=Object(l.getQueryDefinition)(n);r=Object(l.assign)({},Object(l.getDefaultValues)(E),r);var _={store:t,dataIdFromObject:m&&m.dataIdFromObject,cacheRedirects:m&&m.cacheRedirects||{}},k=this.executeStoreQuery({query:n,rootValue:{type:"id",id:f,generated:!0,typename:"Query"},contextValue:_,variableValues:r,fragmentMatcher:v}),T=k.missing&&k.missing.length>0;return T&&!d&&k.missing.forEach((function(e){if(!e.tolerable)throw new X.a(8)})),o&&Object(y.a)(o,k.result)&&(k.result=o),{result:k.result,complete:!T}},e.prototype.executeStoreQuery=function(e){var t=e.query,n=e.rootValue,r=e.contextValue,o=e.variableValues,c=e.fragmentMatcher,d=void 0===c?se:c,h=Object(l.getMainDefinition)(t),f=Object(l.getFragmentDefinitions)(t),v={query:t,fragmentMap:Object(l.createFragmentMap)(f),contextValue:r,variableValues:o,fragmentMatcher:d};return this.executeSelectionSet({selectionSet:h.selectionSet,rootValue:n,execContext:v})},e.prototype.executeSelectionSet=function(e){var t=this,n=e.selectionSet,r=e.rootValue,o=e.execContext,d=o.fragmentMap,h=o.contextValue,f=o.variableValues,v={result:null},m=[],object=h.store.get(r.id),y=object&&object.__typename||"ROOT_QUERY"===r.i
2d&&"Query"||void 0;function E(e){var t;return e.missing&&(v.missing=v.missing||[],(t=v.missing).push.apply(t,e.missing)),e.result}return n.selections.forEach((function(e){var n;if(Object(l.shouldInclude)(e,f))if(Object(l.isField)(e)){var v=E(t.executeField(object,y,e,o));void 0!==v&&m.push(((n={})[Object(l.resultKeyNameFromField)(e)]=v,n))}else{var _=void 0;if(Object(l.isInlineFragment)(e))_=e;else if(!(_=d[e.name.value]))throw new X.a(9);var k=_.typeCondition&&_.typeCondition.name.value,T=!k||o.fragmentMatcher(r,k,h);if(T){var w=t.executeSelectionSet({selectionSet:_.selectionSet,rootValue:r,execContext:o});"heuristic"===T&&w.missing&&(w=c(c({},w),{missing:w.missing.map((function(e){return c(c({},e),{tolerable:!0})}))})),m.push(E(w))}}})),v.result=Object(l.mergeDeepArray)(m),this.freezeResults,v},e.prototype.executeField=function(object,e,t,n){var r=n.variableValues,o=n.contextValue,c=function(object,e,t,n,r,o){o.resultKey;var c=o.directives,d=t;(n||c)&&(d=Object(l.getStoreKeyName)(d,n,c));var h=void 0;if(object&&void 0===(h=object[d])&&r.cacheRedirects&&"string"==typeof e){var f=r.cacheRedirects[e];if(f){var v=f[t];v&&(h=v(object,n,{getCacheKey:function(e){var t=r.dataIdFromObject(e);return t&&Object(l.toIdValue)({id:t,typename:e.__typename})}}))}}if(void 0===h)return{result:h,missing:[{object:object,fieldName:d,tolerable:!1}]};Object(l.isJsonValue)(h)&&(h=h.json);return{result:h}}(object,e,t.name.value,Object(l.argumentsObjectFromField)(t,r),o,{resultKey:Object(l.resultKeyNameFromField)(t),directives:Object(l.getDirectiveInfoFromField)(t,r)});return Array.isArray(c.result)?this.combineExecResults(c,this.executeSubSelectedArray({field:t,array:c.result,execContext:n})):t.selectionSet?null==c.result?c:this.combineExecResults(c,this.executeSelectionSet({selectionSet:t.selectionSet,rootValue:c.result,execContext:n})):(oe(t,c.result),this.freezeResults,c)},e.prototype.combineExecResults=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){t.missing&&(e=e||[]).push.apply(e,t.missing)})),{result:t.pop().result,missing:e}},e.prototype.executeSubSelectedArray=function(e){var t,n=this,r=e.field,o=e.array,c=e.execContext;function l(e){return e.missing&&(t=t||[]).push.apply(t,e.missing),e.result}return o=o.map((function(e){return null===e?null:Array.isArray(e)?l(n.executeSubSelectedArray({field:r,array:e,execContext:c})):r.selectionSet?l(n.executeSelectionSet({selectionSet:r.selectionSet,rootValue:e,execContext:c})):(oe(r,e),e)})),this.freezeResults,{result:o,missing:t}},e}();function oe(e,t){if(!e.selectionSet&&Object(l.isIdValue)(t))throw new X.a(10)}function se(){return!0}var ue=function(){function e(data){void 0===data&&(data=Object.create(null)),this.data=data}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){this.data[e]=t},e.prototype.delete=function(e){this.data[e]=void 0},e.prototype.clear=function(){this.data=Object.create(null)},e.prototype.replace=function(e){this.data=e||Object.create(null)},e}();var ce=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="WriteError",t}return o(t,e),t}(Error);var le=function(){function e(){}return e.prototype.writeQueryToStore=function(e){var t=e.query,n=e.result,r=e.store,o=void 0===r?ie():r,c=e.variables,l=e.dataIdFromObject,d=e.fragmentMatcherFunction;return this.writeResultToStore({dataId:"ROOT_QUERY",result:n,document:t,store:o,variables:c,dataIdFromObject:l,fragmentMatcherFunction:d})},e.prototype.writeResultToStore=function(e){var t=e.dataId,n=e.result,r=e.document,o=e.store,c=void 0===o?ie():o,d=e.variables,h=e.dataIdFromObject,f=e.fragmentMatcherFunction,v=Object(l.getOperationDefinition)(r);try{return this.writeSelectionSetToStore({result:n,dataId:t,selectionSet:v.selectionSet,context:{store:c,processedData:{},variables:Object(l.assign)({},Object(l.getDefaultValues)(v),d),dataIdFromObject:h,fragmentMap:Object(l.createFragmentMap)(Object(l.getFragmentDefinitions)(r)),fragmentMatcherFunction:f}})}catch(e){throw function(e,t){var n=new ce("Error writing result to store for query:\n "+JSON.stringify(t));return n.message+="\n"+e.message,n.stack=e.stack,n}(e,r)}},e.prototype.writeSelectionSetToStore=function(e){var t=this,n=e.result,r=e.dataId,o=e.selectionSet,c=e.context,d=c.variables,h=c.store,f=c.fragmentMap;return o.selections.forEach((function(e){var o;if(Object(l.shouldInclude)(e,d))if(Object(l.isField)(e)){var h=Object(l.resultKeyNameFromField)(e),v=n[h];if(void 0!==v)t.writeFieldToStore({dataId:r,value:v,field:e,context:c});else{var m=!1,y=!1;e.directives&&e.directives.length&&(m=e.directives.some((function(e){return e.name&&"defer"===e.name.value})),y=e.directives.some((function(e){return e.name&&"client"===e.name.value}))),!m&&!y&&c.fragmentMatcherFunction}}else{var E=void 0;Object(l.isInlineFragment)(e)?E=e:(E=(f||{})[e.name.value],Object(X.b)(E,3));var _=!0;if(c.fragmentMatcherFunction&&E.typeCondition){var k=r||"self",T=Object(l.toIdValue)({id:k,typename:void 0}),w={store:new ue((o={},o[k]=n,o)),cacheRedirects:{}},S=c.fragmentMatcherFunction(T,E.typeCondition.name.value,w);Object(l.isProduction)(),_=!!S}_&&t.writeSelectionSetToStore({result:n,selectionSet:E.selectionSet,dataId:r,context:c})}})),h},e.prototype.writeFieldToStore=function(e){var t,n,r,o=e.field,d=e.value,h=e.dataId,f=e.context,v=f.variables,m=f.dataIdFromObject,E=f.store,_=Object(l.storeKeyNameFromField)(o,v);if(o.selectionSet&&null!==d)if(Array.isArray(d)){var k=h+"."+_;n=this.processArrayValue(d,k,o.selectionSet,f)}else{var T=h+"."+_,w=!0;if(de(T)||(T="$"+T),m){var S=m(d);Object(X.b)(!S||!de(S),4),(S||"number"==typeof S&&0===S)&&(T=S,w=!1)}fe(T,o,f.processedData)||this.writeSelectionSetToStore({dataId:T,result:d,selectionSet:o.selectionSet,context:f});var A=d.__typename;n=Object(l.toIdValue)({id:T,typename:A},w);var I=(r=E.get(h))&&r[_];
vendor: 4,866 bytes, line 2
2if(I!==n&&Object(l.isIdValue)(I)){var R=void 0!==I.typename,O=void 0!==A,L=R&&O&&I.typename!==A;Object(X.b)(!w||I.generated||L,5),Object(X.b)(!R||O,6),I.generated&&(L?w||E.delete(I.id):he(I.id,n.id,E))}}else n=null!=d&&"object"==typeof d?{type:"json",json:d}:d;(r=E.get(h))&&Object(y.a)(n,r[_])||E.set(h,c(c({},r),((t={})[_]=n,t)))},e.prototype.processArrayValue=function(e,t,n,r){var o=this;return e.map((function(e,c){if(null===e)return null;var d=t+"."+c;if(Array.isArray(e))return o.processArrayValue(e,d,n,r);var h=!0;if(r.dataIdFromObject){var f=r.dataIdFromObject(e);f&&(d=f,h=!1)}return fe(d,n,r.processedData)||o.writeSelectionSetToStore({dataId:d,result:e,selectionSet:n,context:r}),Object(l.toIdValue)({id:d,typename:e.__typename},h)}))},e}();function de(e){return"$"===e[0]}function he(e,t,n){if(e===t)return!1;var r=n.get(e),o=n.get(t),d=!1;Object.keys(r).forEach((function(e){var t=r[e],c=o[e];Object(l.isIdValue)(t)&&de(t.id)&&Object(l.isIdValue)(c)&&!Object(y.a)(t,c)&&he(t.id,c.id,n)&&(d=!0)})),n.delete(e);var h=c(c({},r),o);return Object(y.a)(h,o)?d:(n.set(t,h),!0)}function fe(e,t,n){if(!n)return!1;if(n[e]){if(n[e].indexOf(t)>=0)return!0;n[e].push(t)}else n[e]=[t];return!1}var pe={fragmentMatcher:new ee,dataIdFromObject:function(e){if(e.__typename){if(void 0!==e.id)return e.__typename+":"+e.id;if(void 0!==e._id)return e.__typename+":"+e._id}return null},addTypename:!0,resultCaching:!0,freezeResults:!1};var ve=Object.prototype.hasOwnProperty,me=function(e){function t(t,n,r){var o=e.call(this,Object.create(null))||this;return o.optimisticId=t,o.parent=n,o.transaction=r,o}return o(t,e),t.prototype.toObject=function(){return c(c({},this.parent.toObject()),this.data)},t.prototype.get=function(e){return ve.call(this.data,e)?this.data[e]:this.parent.get(e)},t}(ue),ge=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;n.watches=new Set,n.typenameDocumentCache=new Map,n.cacheKeyRoot=new K(l.canUseWeakMap),n.silenceBroadcast=!1,n.config=c(c({},pe),t),n.config.customResolvers&&(n.config.cacheRedirects=n.config.customResolvers),n.config.cacheResolvers&&(n.config.cacheRedirects=n.config.cacheResolvers),n.addTypename=!!n.config.addTypename,n.data=n.config.resultCaching?new re:new ue,n.optimisticData=n.data,n.storeWriter=new le,n.storeReader=new ae({cacheKeyRoot:n.cacheKeyRoot,freezeResults:t.freezeResults});var r=n,o=r.maybeBroadcastWatch;return n.maybeBroadcastWatch=z((function(e){return o.call(n,e)}),{makeCacheKey:function(e){if(!e.optimistic&&!e.previousResult)return r.data instanceof re?r.cacheKeyRoot.lookup(e.query,JSON.stringify(e.variables)):void 0}}),n}return o(t,e),t.prototype.restore=function(data){return data&&this.data.replace(data),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).toObject()},t.prototype.read=function(e){if("string"==typeof e.rootId&&void 0===this.data.get(e.rootId))return null;var t=this.config.fragmentMatcher,n=t&&t.match;return this.storeReader.readQueryFromStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,rootId:e.rootId,fragmentMatcherFunction:n,previousResult:e.previousResult,config:this.config})||null},t.prototype.write=function(e){var t=this.config.fragmentMatcher,n=t&&t.match;this.storeWriter.writeResultToStore({dataId:e.dataId,result:e.result,variables:e.variables,document:this.transformDocument(e.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:n}),this.broadcastWatches()},t.prototype.diff=function(e){var t=this.config.fragmentMatcher,n=t&&t.match;return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,returnPartialData:e.returnPartialData,previousResult:e.previousResult,fragmentMatcherFunction:n,config:this.config})},t.prototype.watch=function(e){var t=this;return this.watches.add(e),function(){t.watches.delete(e)}},t.prototype.evict=function(e){throw new X.a(7)},t.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){for(var t=[],n=0,r=this.optimisticData;r instanceof me;)r.optimisticId===e?++n:t.push(r),r=r.parent;if(n>0){for(this.optimisticData=r;t.length>0;){var o=t.pop();this.performTransaction(o.transaction,o.optimisticId)}this.broadcastWatches()}},t.prototype.performTransaction=function(e,t){var data=this.data,n=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof t&&(this.data=this.optimisticData=new me(t,this.optimisticData,e));try{e(this)}finally{this.silenceBroadcast=n,this.data=data}this.broadcastWatches()},t.prototype.recordOptimisticTransaction=function(e,t){return this.performTransaction(e,t)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.t
vendor: 4,598 bytes, line 2
2ypenameDocumentCache.get(e);return t||(t=Object(l.addTypenameToDocument)(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(){var e=this;this.silenceBroadcast||this.watches.forEach((function(t){return e.maybeBroadcastWatch(t)}))},t.prototype.maybeBroadcastWatch=function(e){e.callback(this.diff({query:e.query,variables:e.variables,previousResult:e.previousResult&&e.previousResult(),optimistic:e.optimistic}))},t}(m)},121:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return d}));var r=n(7);class o{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const c="[DEFAULT]";class l{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new r.a;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}}getComponent(){return this.component}setComponent(component){if(component.name!==this.name)throw Error(`Mismatching Component ${component.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=component,this.shouldAutoInitialize()){if(function(component){return"EAGER"===component.instantiationMode}(component))try{this.getOrInitializeService({instanceIdentifier:c})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e="[DEFAULT]"){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e="[DEFAULT]"){return this.instances.has(e)}getOptions(e="[DEFAULT]"){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(e)&&t.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),o=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;o.add(e),this.onInitCallbacks.set(r,o);const c=this.instances.get(r);return c&&e(c,r),()=>{o.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const r of n)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e,r===c?void 0:r),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}var r;return n||null}normalizeInstanceIdentifier(e="[DEFAULT]"){return this.component?this.component.multipleInstances?e:c:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class d{constructor(e){this.name=e,this.providers=new Map}addComponent(component){const e=this.getProvider(component.name);
2if(e.isComponentSet())throw new Error(`Component ${component.name} has already been registered with ${this.name}`);e.setComponent(component)}addOrOverwriteComponent(component){this.getProvider(component.name).isComponentSet()&&this.providers.delete(component.name),this.addComponent(component)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new l(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}},122:function(e,t,n){"use strict";t.a=function(e,t){return e instanceof t}},124:function(e,t,n){"use strict";function r(e){try{return e()}catch(e){}}n.d(t,"a",(function(){return r}))},128:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return o}));var r=n(49);function o(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function c(line,e){let t=line;const n=t.length;if(n<=150)return t;e>n&&(e=n);let r=Math.max(e-60,0);r<5&&(r=0);let o=Math.min(r+140,n);return o>n-5&&(o=n),o===n&&(r=Math.max(o-140,0)),t=t.slice(r,o),r>0&&(t=`'{snip} ${t}`),o<n&&(t+=" {snip}"),t}function l(input,e){if(!Array.isArray(input))return"";const output=[];for(let i=0;i<input.length;i++){const e=input[i];try{output.push(String(e))}catch(e){output.push("[value cannot be serialized]")}}return output.join(e)}function d(e,t=[],n=!1){return t.some((pattern=>function(e,pattern,t=!1){return!!Object(r.l)(e)&&(Object(r.k)(pattern)?pattern.test(e):!!Object(r.l)(pattern)&&(t?e===pattern:e.includes(pattern)))}(e,pattern,n)))}},134:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(57);const o=["debug","info","warn","error","log","assert","trace"];function c(e){if(!("console"in r.a))return e();const t=r.a.console,n={};o.forEach((e=>{const r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)}));try{return e()}finally{Object.keys(n).forEach((e=>{t[e]=n[e]}))}}let l;l=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return o.forEach((e=>{t[e]=()=>{}})),t}()},135:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return m}));const r=[];var o;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(o||(o={}));const c={debug:o.DEBUG,verbose:o.VERBOSE,info:o.INFO,warn:o.WARN,error:o.ERROR,silent:o.SILENT},l=o.INFO,d={[o.DEBUG]:"log",[o.VERBOSE]:"log",[o.INFO]:"info",[o.WARN]:"warn",[o.ERROR]:"error"},h=(e,t,...n)=>{if(t<e.logLevel)return;const r=(new Date).toISOString(),o=d[t];if(!o)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[o](`[${r}]  ${e.name}:`,...n)};class f{constructor(e){this.name=e,this._logLevel=l,this._logHandler=h,this._userLogHandler=null,r.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in o))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?c[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,o.DEBUG,...e),this._logHandler(this,o.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,o.VERBOSE,...e),this._logHandler(this,o.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,o.INFO,...e),this._logHandler(this,o.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,o.WARN,...e),this._logHandler(this,o.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,o.ERROR,...e),this._logHandler(this,o.ERROR,...e)}}function v(e){r.forEach((t=>{t.setLogLevel(e)}))}function m(e,t){for(const n of r){let r=null;
2t&&t.level&&(r=c[t.level]),n.userLogHandler=null===e?null:(t,n,...c)=>{const l=c.map((e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}})).filter((e=>e)).join(" ");n>=(null!=r?r:t.logLevel)&&e({level:o[n].toLowerCase(),message:l,args:c,type:t.name})}}}},137:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(49),o=n(463),c=n(65),l=n(310);function d(input,e=100,t=1/0){try{return f("",input,e,t)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function h(object,e=3,t=102400){const n=d(object,e);return r=n,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(r))>t?h(object,e-1,t):n;var r}function f(t,n,d=1/0,h=1/0,v=Object(o.a)()){const[m,y]=v;if(null==n||["number","boolean","string"].includes(typeof n)&&!Object(r.h)(n))return n;const E=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if(void 0!==e&&n===e)return"[Global]";if("undefined"!=typeof window&&n===window)return"[Window]";if("undefined"!=typeof document&&n===document)return"[Document]";if(Object(r.m)(n))return"[SyntheticEvent]";if("number"==typeof n&&n!=n)return"[NaN]";if("function"==typeof n)return`[Function: ${Object(l.b)(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const o=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(o)?`[HTMLElement: ${o}]`:`[object ${o}]`}catch(e){return`**non-serializable** (${e})`}}(t,n);if(!E.startsWith("[object "))return E;if(n.__sentry_skip_normalization__)return n;const _="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:d;if(0===_)return E.replace("object ","");if(m(n))return"[Circular ~]";const k=n;if(k&&"function"==typeof k.toJSON)try{return f("",k.toJSON(),_-1,h,v)}catch(e){}const T=Array.isArray(n)?[]:{};let w=0;const S=Object(c.b)(n);for(const e in S){if(!Object.prototype.hasOwnProperty.call(S,e))continue;if(w>=h){T[e]="[MaxProperties ~]";break}const t=S[e];T[e]=f(e,t,_-1,h,v),w++}return y(n),T}}).call(this,n(70))},139:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return c}));var r=n(65),o=(n(128),n(57));function c(){const e=o.a,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function l(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function d(e){const{message:t,event_id:n}=e;if(t)return t;const r=l(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function h(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],c=o[0]=o[0]||{};c.value||(c.value=t||""),c.type||(c.type=n||"Error")}function f(e,t){const n=l(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function v(e){if(e&&e.__sentry_captured__)return!0;try{Object(r.a)(e,"__sentry_captured__",!0)}catch(e){}return!1}function m(e){return Array.isArray(e)?e:[e]}},146:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="production"},147:function(e,t,n){"use strict";n.r(t),n.d(t,"print",(function(){return c}));var r=n(99),o=n(254);function c(e){return Object(r.b)(e,{leave:l})}var l={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return h(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=v("(",h(e.variableDefinitions,", "),")"),o=h(e.directives," "),c=e.selectionSet;return n||o||r||"query"!==t?h([t,h([n,r]),o,c]," "):c},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,o=e.directives;return t+": "+n+v(" = ",r)+v(" ",h(o," "))},SelectionSet:function(e){return f(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,o=e.directives,c=e.selectionSet,l=v("",t,": ")+n,d=l+v("(",h(r,", "),")");return d.length>80&&(d=l+v("(\n",m(h(r,"\n")),"\n)")),h([d,h(o," "),c]," ")},Argument:function(e){return e.name+": "+e.value}
vendor: 10,043 bytes, line 2
2,FragmentSpread:function(e){return"..."+e.name+v(" ",h(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return h(["...",v("on ",t),h(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,o=e.directives,c=e.selectionSet;return"fragment ".concat(t).concat(v("(",h(r,", "),")")," ")+"on ".concat(n," ").concat(v("",h(o," ")," "))+c},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?Object(o.b)(n,"description"===t?"":"  "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+h(e.values,", ")+"]"},ObjectValue:function(e){return"{"+h(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+v("(",h(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:d((function(e){var t=e.directives,n=e.operationTypes;return h(["schema",h(t," "),f(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:d((function(e){return h(["scalar",e.name,h(e.directives," ")]," ")})),ObjectTypeDefinition:d((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return h(["type",t,v("implements ",h(n," & ")),h(r," "),f(o)]," ")})),FieldDefinition:d((function(e){var t=e.name,n=e.arguments,r=e.type,o=e.directives;return t+(E(n)?v("(\n",m(h(n,"\n")),"\n)"):v("(",h(n,", "),")"))+": "+r+v(" ",h(o," "))})),InputValueDefinition:d((function(e){var t=e.name,n=e.type,r=e.defaultValue,o=e.directives;return h([t+": "+n,v("= ",r),h(o," ")]," ")})),InterfaceTypeDefinition:d((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return h(["interface",t,v("implements ",h(n," & ")),h(r," "),f(o)]," ")})),UnionTypeDefinition:d((function(e){var t=e.name,n=e.directives,r=e.types;return h(["union",t,h(n," "),r&&0!==r.length?"= "+h(r," | "):""]," ")})),EnumTypeDefinition:d((function(e){var t=e.name,n=e.directives,r=e.values;return h(["enum",t,h(n," "),f(r)]," ")})),EnumValueDefinition:d((function(e){return h([e.name,h(e.directives," ")]," ")})),InputObjectTypeDefinition:d((function(e){var t=e.name,n=e.directives,r=e.fields;return h(["input",t,h(n," "),f(r)]," ")})),DirectiveDefinition:d((function(e){var t=e.name,n=e.arguments,r=e.repeatable,o=e.locations;return"directive @"+t+(E(n)?v("(\n",m(h(n,"\n")),"\n)"):v("(",h(n,", "),")"))+(r?" repeatable":"")+" on "+h(o," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return h(["extend schema",h(t," "),f(n)]," ")},ScalarTypeExtension:function(e){return h(["extend scalar",e.name,h(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return h(["extend type",t,v("implements ",h(n," & ")),h(r," "),f(o)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return h(["extend interface",t,v("implements ",h(n," & ")),h(r," "),f(o)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return h(["extend union",t,h(n," "),r&&0!==r.length?"= "+h(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return h(["extend enum",t,h(n," "),f(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return h(["extend input",t,h(n," "),f(r)]," ")}};function d(e){return function(t){return h([t.description,e(t)],"\n")}}function h(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function f(e){return v("{\n",m(h(e,"\n")),"\n}")}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function m(e){return v("  ",e.replace(/\n/g,"\n  "))}function y(e){return-1!==e.indexOf("\n")}function E(e){return null!=e&&e.some(y)}},150:function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(253),o=n(103);function c(source,e){for(var t,n=/\r\n|[\n\r]/g,line=1,r=e+1;(t=n.exec(source.body))&&t.index<e;)line+=1,r=e+1-(t.index+t[0].length);return{line:line,column:r}}function l(e){return d(e.source,c(e.source,e.start))}function d(source,e){var t=source.locationOffset.column-1,body=f(t)+source.body,n=e.line-1,r=source.locationOffset.line-1,o=e.line+r,c=1===e.line?t:0,l=e.column+c,d="".concat(source.name,":").concat(o,":").concat(l,"\n"),v=body.split(/\r\n|[\n\r]/g),m=v[n];if(m.length>120){for(var y=Math.floor(l/80),E=l%80,_=[],i=0;i<m.length;i+=80)_.push(m.slice(i,i+80));return d+h([["".concat(o),_[0]]].concat(_.slice(1,y+1).map((function(e){return["",e]})),[[" ",f(E-1)+"^"],["",_[y+1]]]))}return d+h([["".concat(o-1),v[n-1]],["".concat(o),m],["",f(l-1)+"^"],["".concat(o+1),v[n+1]]])}function h(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),n=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,r=e[0],line=e[1];return f(n-(t=r).length)+t+(line?" | "+line:" |")})).join("\n")}function f(e){return Array(e+1).join(" ")}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?E(e):t}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){var t="function"==typeof Map?new Map:void 0;return(_=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return k(e,arguments,S(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),w(r,e)})(e)}function k(e,t,n){return(k=T()?Reflect.construct:function(e,t,n){var a=[null];a.push.apply(a,t);var r=new(Function.bind.apply(e,a));return n&&w(r,n.prototype),r}).apply(null,arguments)}function T(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function w(e,p){return(w=Object.setPrototypeOf||function(e,p){return e.__proto__=p,e})(e,p)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(k,e);var t,n,h,f,v,_=(t=k,n=T(),function(){var e,r=S(t);if(n){var o=S(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return y(this,e)});function k(e,t,source,n,path,o,l){var d,h,f,v,m;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),m=_.call(this,e);var T,w=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,S=source;!S&&w&&(S=null===(T=w[0].loc)||void 0===T?void 0:T.source);var A,I=n;!I&&w&&(I=w.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),I&&0===I.length&&(I=void 0),n&&source?A=n.map((function(e){return c(source,e)})):w&&(A=w.reduce((function(e,t){return t.loc&&e.push(c(t.loc.source,t.loc.start)),e}),[]));var R=l;if(null==R&&null!=o){var O=o.extensions;Object(r.a)(O)&&(R=O)}return Object.defineProperties(E(m),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(d=A)&&void 0!==d?d:void 0,enumerable:null!=A},path:{value:null!=path?path:void 0,enumerable:null!=path},nodes:{value:null!=w?w:void 0},source:{value:null!==(h=S)&&void 0!==h?h:void 0},positions:{value:null!==(f=I)&&void 0!==f?f:void 0},originalError:{value:o},extensions:{value:null!==(v=R)&&void 0!==v?v:void 0,enumerable:null!=R}}),null!=o&&o.stack?(Object.defineProperty(E(m),"stack",{value:o.stack,writable:!0,configurable:!0}),y(m)):(Error.captureStackTrace?Error.captureStackTrace(E(m),k):Object.defineProperty(E(m),"stack",{value:Error().stack,writable:!0,configurable:!0}),m)}return h=k,(f=[{key:"toString",value:function(){return function(e){var output=e.message;if(e.nodes)for(var t=0,n=e.nodes;t<n.length;t++){var r=n[t];r.loc&&(output+="\n\n"+l(r.loc))}else if(e.source&&e.locations)for(var o=0,c=e.locations;o<c.length;o++){var h=c[o];output+="\n\n"+d(e.source,h)}return output}(this)}},{key:o.a,get:function(){return"Object"}}])&&m(h.prototype,f),v&&m(h,v),k}(_(Error))},162:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n(65),o=n(261);function c(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function l(e,t={}){const n="string"==typeof t?t:t.tunnel,o="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${c(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return Object(r.h)({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}(e,o)}`}function d(e,t){const n=Object(o.c)(e);if(!n)return"";const r=`${c(n)}embed/error-page/`;let l=`dsn=${Object(o.b)(n)}`;for(const e in t)if("dsn"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(l+=`&name=${encodeURIComponent(e.name)}
2`),e.email&&(l+=`&email=${encodeURIComponent(e.email)}`)}else l+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${l}`}},165:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return v}));var r=n(314),o=n(57);const c=Object(o.b)(),l={nowSeconds:()=>Date.now()/1e3};const d=Object(r.b)()?function(){try{return Object(r.a)(e,"perf_hooks").performance}catch(e){return}}():function(){const{performance:e}=c;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),h=void 0===d?l:{nowSeconds:()=>(d.timeOrigin+d.now())/1e3},f=l.nowSeconds.bind(l),v=h.nowSeconds.bind(h);let m;(()=>{const{performance:e}=c;if(!e||!e.now)return void(m="none");const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,l=o<t,d=e.timing&&e.timing.navigationStart,h="number"==typeof d?Math.abs(d+n-r):t;l||h<t?o<=h?(m="timeOrigin",e.timeOrigin):m="navigationStart":m="dateNow"})()}).call(this,n(295)(e))},171:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(48);n(36);function o(e){return Array.isArray(e)&&e.length>0}function c(e){return e.hasOwnProperty("graphQLErrors")}!function(e){function t(n){var r,c,l=n.graphQLErrors,d=n.clientErrors,h=n.networkError,f=n.errorMessage,v=n.extraInfo,m=e.call(this,f)||this;return m.graphQLErrors=l||[],m.clientErrors=d||[],m.networkError=h||null,m.message=f||(c="",(o((r=m).graphQLErrors)||o(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";c+=t+"\n"})),r.networkError&&(c+=r.networkError.message+"\n"),c=c.replace(/\n$/,"")),m.extraInfo=v,m.__proto__=t.prototype,m}Object(r.b)(t,e)}(Error)},175:function(e,t,n){var r;!function(o,c){"use strict";var l="function",d="undefined",h="object",f="string",v="model",m="name",y="type",E="vendor",_="version",k="architecture",T="console",w="mobile",S="tablet",A="smarttv",I="wearable",R="embedded",O={extend:function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n},has:function(e,t){return typeof e===f&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===f?e.replace(/[^\d\.]/g,"").split(".")[0]:c},trim:function(e,t){return e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof t===d?e:e.substring(0,255)}},L={rgx:function(e,t){for(var n,r,p,q,o,d,i=0;i<t.length&&!o;){var f=t[i],v=t[i+1];for(n=r=0;n<f.length&&!o;)if(o=f[n++].exec(e))for(p=0;p<v.length;p++)d=o[++r],typeof(q=v[p])===h&&q.length>0?2==q.length?typeof q[1]==l?this[q[0]]=q[1].call(this,d):this[q[0]]=q[1]:3==q.length?typeof q[1]!==l||q[1].exec&&q[1].test?this[q[0]]=d?d.replace(q[1],q[2]):c:this[q[0]]=d?q[1].call(this,d,q[2]):c:4==q.length&&(this[q[0]]=d?q[3].call(this,d.replace(q[1],q[2])):c):this[q]=d||c;i+=2}},str:function(e,map){for(var i in map)if(typeof map[i]===h&&map[i].length>0){for(var t=0;t<map[i].length;t++)if(O.has(map[i][t],e))return"?"===i?c:i}else if(O.has(map[i],e))return"?"===i?c:i;return e}},D={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},x={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[_,[m,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[_,[m,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[m,_],[/opios[\/\s]+([\w\.]+)/i],[_,[m,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[_,[m,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[m,_],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[_,[m,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[_,[m,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[_,[m,"WeChat"]],[/konqueror\/([\w\.]+)/i],[_,[m,"K
2onqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[_,[m,"IE"]],[/yabrowser\/([\w\.]+)/i],[_,[m,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+)/,"$1 Secure Browser"],_],[/focus\/([\w\.]+)/i],[_,[m,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[_,[m,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[_,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[_,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[_,[m,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[_,[m,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[_,[m,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[m,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1 Browser"],_],[/(comodo_dragon)\/([\w\.]+)/i],[[m,/_/g," "],_],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[m,_],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[m],[/;fbav\/([\w\.]+);/i],[_,[m,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[m,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[m,_],[/\bgsa\/([\w\.]+)\s.*safari\//i],[_,[m,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[_,[m,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[m,"Chrome WebView"],_],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[_,[m,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[m,_],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[_,[m,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[_,m],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[m,[_,L.str,D.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[m,_],[/(navigator|netscape)\/([\w\.-]+)/i],[[m,"Netscape"],_],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[_,[m,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[m,_]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[k,"amd64"]],[/(ia32(?=;))/i],[[k,O.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[k,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[k,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[k,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[k,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[k,/ower/,"",O.lowerize]],[/(sun4\w)[;\)]/i],[[k,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[k,O.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[v,[E,"Samsung"],[y,S]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[v,[E,"Samsung"],[y,w]],[/\((ip(?:hone|od)[\s\w]*);/i],[v,[E,"Apple"],[y,w]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[v,[E,"Apple"],[y,S]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[v,[E,"Huawei"],[y,S]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[v,[E,"Huawei"],[y,w]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[v,/_/g," "],[E,"Xiaomi"],[y,w]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[v,/_/g," "],[E,"Xiaomi"],[y,S]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[v,[E,"OPPO"],[y,w]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[v,[E,"Vivo"],[y,w]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[v,[E,"Realme"],[y,w]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[v,[E,"Motorola"],[y,w]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[v,[E,"Motorola"],[y,S]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4}
vendor: 5,157 bytes, line 2
2)/i],[v,[E,"LG"],[y,S]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[v,[E,"LG"],[y,w]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[v,[E,"Lenovo"],[y,S]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[v,/_/g," "],[E,"Nokia"],[y,w]],[/droid.+;\s(pixel\sc)[\s)]/i],[v,[E,"Google"],[y,S]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[v,[E,"Google"],[y,w]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[v,[E,"Sony"],[y,w]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[v,"Xperia Tablet"],[E,"Sony"],[y,S]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[v,[E,"OnePlus"],[y,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[v,[E,"Amazon"],[y,S]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[v,"Fire Phone"],[E,"Amazon"],[y,w]],[/\((playbook);[\w\s\),;-]+(rim)/i],[v,E,[y,S]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[v,[E,"BlackBerry"],[y,w]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[v,[E,"ASUS"],[y,S]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[v,[E,"ASUS"],[y,w]],[/(nexus\s9)/i],[v,[E,"HTC"],[y,S]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[E,[v,/_/g," "],[y,w]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[v,[E,"Acer"],[y,S]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[v,[E,"Meizu"],[y,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[E,v,[y,w]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[E,v,[y,S]],[/\s(surface\sduo)\s/i],[v,[E,"Microsoft"],[y,S]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[v,[E,"Fairphone"],[y,w]],[/\s(u304aa)\sbuild/i],[v,[E,"AT&T"],[y,w]],[/sie-(\w*)/i],[v,[E,"Siemens"],[y,w]],[/[;\/]\s?(rct\w+)\sbuild/i],[v,[E,"RCA"],[y,S]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[v,[E,"Dell"],[y,S]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[v,[E,"Verizon"],[y,S]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[v,[E,"Barnes & Noble"],[y,S]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[v,[E,"NuVision"],[y,S]],[/;\s(k88)\sbuild/i],[v,[E,"ZTE"],[y,S]],[/;\s(nx\d{3}j)\sbuild/i],[v,[E,"ZTE"],[y,w]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[v,[E,"Swiss"],[y,w]],[/[;\/]\s?(zur\d{3})\sbuild/i],[v,[E,"Swiss"],[y,S]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[v,[E,"Zeki"],[y,S]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[E,"Dragon Touch"],v,[y,S]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[v,[E,"Insignia"],[y,S]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[v,[E,"NextBook"],[y,S]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[E,"Voice"],v,[y,w]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[E,"LvTel"],v,[y,w]],[/;\s(ph-1)\s/i],[v,[E,"Essential"],[y,w]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[v,[E,"Envizen"],[y,S]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[v,[E,"MachSpeed"],[y,S]],[/[;\/]\s?tu_(1491)\sbuild/i],[v,[E,"Rotor"],[y,S]],[/(shield[\w\s]+)\sbuild/i],[v,[E,"Nvidia"],[y,S]],[/(sprint)\s(\w+)/i],[E,v,[y,w]],[/(kin\.[onetw]{3})/i],[[v,/\./g," "],[E,"Microsoft"],[y,w]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[v,[E,"Zebra"],[y,S]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[v,[E,"Zebra"],[y,w]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[E,v,[y,T]],[/droid.+;\s(shield)\sbuild/i],[v,[E,"Nvidia"],[y,T]],[/(playstation\s[345portablevi]+)/i],[v,[E,"Sony"],[y,T]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[v,[E,"Microsoft"],[y,T]],[/smart-tv.+(samsung)/i],[E,[y,A]],[/hbbtv.+maple;(\d+)/i],[[v,/^/,"SmartTV"],[E,"Samsung"],[y,A]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[E,"LG"],[y,A]],[/(apple)\s?tv/i],[E,[v,"Apple TV"],[y,A]],[/crkey/i],[[v,"Chromecast"],[E,"Google"],[y,A]],[/droid.+aft([\w])(\sbuild\/|\))/i],[v,[E,"Amazon"],[y,A]],[/\(dtv[\);].+(aquos)/i],[v,[E,"Sharp"],[y,A]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[E,O.trim],[v,O.trim],[y,A]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[y,A]],[/((pebble))app\/[\d\.]+\s/i],[E,v,[y,I]],[/droid.+;\s(glass)\s\d/i],[v,[E,"Google"],[y,I]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[v,[E,"Zebra"],[y,I]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[E,[y,R]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[v,[y,w]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[v,[y,S]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;
2\/]|\ssafari)/i],[[y,O.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[v,[E,"Generic"]],[/(phone)/i],[[y,w]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[_,[m,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[_,[m,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[m,_],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[_,m]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[m,_],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[m,[_,L.str,D.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[m,"Windows"],[_,L.str,D.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[_,/_/g,"."],[m,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[m,"Mac OS"],[_,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[m,_],[/\(bb(10);/i],[_,[m,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[_,[m,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[m,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[_,[m,"webOS"]],[/crkey\/([\d\.]+)/i],[_,[m,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[m,"Chromium OS"],_],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[m,_],[/(sunos)\s?([\w\.\d]*)/i],[[m,"Solaris"],_],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[m,_]]},C=function(e,t){if("object"==typeof e&&(t=e,e=c),!(this instanceof C))return new C(e,t).getResult();var n=e||(void 0!==o&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),r=t?O.extend(x,t):x;return this.getBrowser=function(){var e={name:c,version:c};return L.rgx.call(e,n,r.browser),e.major=O.major(e.version),e},this.getCPU=function(){var e={architecture:c};return L.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:c,model:c,type:c};return L.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:c,version:c};return L.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:c,version:c};return L.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===f&&e.length>255?O.trim(e,255):e,this},this.setUA(n),this};C.VERSION="0.7.28",C.BROWSER={NAME:m,MAJOR:"major",VERSION:_},C.CPU={ARCHITECTURE:k},C.DEVICE={MODEL:v,VENDOR:E,TYPE:y,CONSOLE:T,MOBILE:w,SMARTTV:A,TABLET:S,WEARABLE:I,EMBEDDED:R},C.ENGINE={NAME:m,VERSION:_},C.OS={NAME:m,VERSION:_},typeof t!==d?(typeof e!==d&&e.exports&&(t=e.exports=C),t.UAParser=C):(r=function(){return C}.call(t,n,t,e))===c||(e.exports=r);var M=void 0!==o&&(o.jQuery||o.Zepto);if(M&&!M.ua){var P=new C;M.ua=P.getResult(),M.ua.get=function(){return P.getUA()},M.ua.set=function(e){P.setUA(e);var t=P.getResult();for(var n in t)M.ua[n]=t[n]}}}("object"==typeof window?window:this)},189:function(e,t,n){"use strict";var r={name:"NoSsr",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,o=t.props,c=r(),l=c.default;void 0===l&&(l=[]);var d=c.placeholder;return n._isMounted?l:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),o.placeholderTag&&(o.placeholder||d)?e(o.placeholderTag,{class:["no-ssr-placeholder"]},o.placeholder||d):l.length>0?l.map((function(){return e(!1)})):e(!1))}};e.exports=r},190:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c}));var r,o=n(49);function c(e){return new d((t=>{t(e)}))}function l(e){return new d(((t,n)=>{n(e)}))}
2!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(r||(r={}));class d{__init(){this._state=r.PENDING}__init2(){this._handlers=[]}constructor(e){d.prototype.__init.call(this),d.prototype.__init2.call(this),d.prototype.__init3.call(this),d.prototype.__init4.call(this),d.prototype.__init5.call(this),d.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new d(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new d(((t,n)=>{let r,o;return this.then((t=>{o=!1,r=t,e&&e()}),(t=>{o=!0,r=t,e&&e()})).then((()=>{o?n(r):t(r)}))}))}__init3(){this._resolve=e=>{this._setResult(r.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(r.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===r.PENDING&&(Object(o.n)(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===r.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===r.RESOLVED&&e[1](this._value),this._state===r.REJECTED&&e[2](this._value),e[0]=!0)}))}}}},20:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},21:function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var content=e(t);return t[2]?"@media ".concat(t[2]," {").concat(content,"}"):content})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(o[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);r&&o[d[0]]||(n&&(d[2]?d[2]="".concat(n," and ").concat(d[2]):d[2]=n),t.push(d))}},t}},211:function(e,t,n){"use strict";(function(e){var r=n(124);t.a=Object(r.a)((function(){return globalThis}))||Object(r.a)((function(){return window}))||Object(r.a)((function(){return self}))||Object(r.a)((function(){return e}))||Object(r.a)((function(){return Function("return this")()}))}).call(this,n(70))},213:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h}));var r=n(139),o=n(30),c=n(118);const l=[];function d(e){const t=e.defaultIntegrations||[],n=e.integrations;let o;t.forEach((e=>{e.isDefaultInstance=!0})),o=Array.isArray(n)?[...t,...n]:"function"==typeof n?Object(r.c)(n(t)):t;const c=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.keys(t).map((e=>t[e]))}(o),l=function(e,t){for(let i=0;i<e.length;i++)if(!0===t(e[i]))return i;return-1}(c,(e=>"Debug"===e.name));if(-1!==l){const[e]=c.splice(l,1);c.push(e)}return c}function h(e){const t={};return e.forEach((e=>{e&&f(e,t)})),t}function f(e,t){t[e.name]=e,-1===l.indexOf(e.name)&&(e.setupOnce(c.b,o.c),l.push(e.name))}},216:function(e,t,n){"use strict";var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.a=r},218:function(e,t,n){"use strict";(function(e){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Prom
vendor: 10,084 bytes, line 2
2ise))((function(o,c){function l(e){try{h(r.next(e))}catch(e){c(e)}}function d(e){try{h(r.throw(e))}catch(e){c(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,d)}h((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,body){var t,n,r,g,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return g={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function c(c){return function(l){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(6===c[0]&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=body.call(e,o)}catch(e){c=[6,e],n=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}},l=this&&this.__spreadArrays||function(){for(var s=0,i=0,e=arguments.length;i<e;i++)s+=arguments[i].length;var t=Array(s),n=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,o=a.length;r<o;r++,n++)t[n]=a[r];return t};Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionClient=void 0;var d=void 0!==e?e:"undefined"!=typeof window?window:{},h=d.WebSocket||d.MozWebSocket,f=n(706),v=n(707),m=n(708),y=n(709),E=n(147),_=n(710),k=n(307),T=n(711),w=n(712),S=n(308),A=function(){function e(e,t,n,r){var o=t||{},c=o.connectionCallback,l=void 0===c?void 0:c,d=o.connectionParams,m=void 0===d?{}:d,y=o.minTimeout,E=void 0===y?w.MIN_WS_TIMEOUT:y,_=o.timeout,k=void 0===_?w.WS_TIMEOUT:_,S=o.reconnect,A=void 0!==S&&S,I=o.reconnectionAttempts,R=void 0===I?1/0:I,O=o.lazy,L=void 0!==O&&O,D=o.inactivityTimeout,x=void 0===D?0:D,C=o.wsOptionArguments,M=void 0===C?[]:C;if(this.wsImpl=n||h,!this.wsImpl)throw new Error("Unable to find native implementation, or alternative implementation for WebSocket!");this.wsProtocols=r||T.GRAPHQL_WS,this.connectionCallback=l,this.url=e,this.operations={},this.nextOperationId=0,this.minWsTimeout=E,this.wsTimeout=k,this.unsentMessagesQueue=[],this.reconnect=A,this.reconnecting=!1,this.reconnectionAttempts=R,this.lazy=!!L,this.inactivityTimeout=x,this.closedByUser=!1,this.backoff=new f({jitter:.5}),this.eventEmitter=new v.EventEmitter,this.middlewares=[],this.client=null,this.maxConnectTimeGenerator=this.createMaxConnectTimeGenerator(),this.connectionParams=this.getConnectionParams(m),this.wsOptionArguments=M,this.lazy||this.connect()}return Object.defineProperty(e.prototype,"status",{get:function(){return null===this.client?this.wsImpl.CLOSED:this.client.readyState},enumerable:!1,configurable:!0}),e.prototype.close=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),this.clearInactivityTimeout(),null!==this.client&&(this.closedByUser=t,e&&(this.clearCheckConnectionInterval(),this.clearMaxConnectTimeout(),this.clearTryReconnectTimeout(),this.unsubscribeAll(),this.sendMessage(void 0,S.default.GQL_CONNECTION_TERMINATE,null)),this.client.close(),this.client.onopen=null,this.client.onclose=null,this.client.onerror=null,this.client.onmessage=null,this.client=null,this.eventEmitter.emit("disconnected"),e||this.tryReconnect())},e.prototype.request=function(e){var t,n,r=this.getObserver.bind(this),o=this.executeOperation.bind(this),c=this.unsubscribe.bind(this);return this.clearInactivityTimeout(),(t={})[k.default]=function(){return this},t.subscribe=function(t,l,d){var h=r(t,l,d);return n=o(e,(function(e,t){null===e&&null===t?h.complete&&h.complete():e?h.error&&h.error(e[0]):h.next&&h.next(t)})),{unsubscribe:function(){n&&(c(n),n=null)}}},t},e.prototype.on=function(e,t,n){var r=this.eventEmitter.on(e,t,n);return function(){r.off(e,t,n)}},e.prototype.onConnected=function(e,t){return this.on("connected",e,t)},e.prototype.onConnecting=function(e,t){return this.on("connecting",e,t)},e.prototype.onDisconnected=function(e,t){return this.on("disconnected",e,t)},e.prototype.onReconnected=function(e,t){return this.on("reconnected",e,t)},e.prototype.onReconnecting=function(e,t){return this.on("reconnecting",e,t)},e.prototype.onError=function(e,t){return this.on("error",e,t)},e.prototype.unsubscribeAll=function(){var e=this;Object.keys(this.operations).forEach((function(t){e.unsubscribe(t)}))},e.prototype.applyMiddlewares=function(e){var t=this;return new Promise((function(n,r){var o,c,d;o=l(t.middlewares),c=t,(d=function(t){if(t)r(t);else if(o.length>0){var l=o.shift();l&&l.applyMiddleware.apply(c,[e,d])}else n(e)})()}))},e.prototype.use=function(e){var t=this;return e.map((function(e){if("function"!=typeof e.applyMiddleware)throw new Error("Middleware must implement the applyMiddleware function.");t.middlewares.push(e)})),this},e.prototype.getConnectionParams=function(e){return function(){return new Promise((function(t,n){if("function"==typeof e)try{return t(e.call(null))}catch(e){return n(e)}t(e)}))}},e.prototype.executeOperation=function(e,t){var n=this;null===this.client&&this.connect();var r=this.generateOperationId();return this.operations[r]={options:e,handler:t},this.applyMiddlewares(e).then((function(e){n.checkOperationOptions(e,t),n.operations[r]&&(n.operations[r]={options:e,handler:t},n.sendMessage(r,S.default.GQL_START,e))})).catch((function(e){n.unsubscribe(r),t(n.formatErrors(e))})),r},e.prototype.getObserver=function(e,t,n){return"function"==typeof e?{next:function(t){return e(t)},error:function(e){return t&&t(e)},complete:function(){return n&&n()}}:e},e.prototype.createMaxConnectTimeGenerator=function(){var e=this.minWsTimeout,t=this.wsTimeout;return new f({min:e,max:t,factor:1.2})},e.prototype.clearCheckConnectionInterval=function(){this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnectionIntervalId=null)},e.prototype.clearMaxConnectTimeout=function(){this.maxConnectTimeoutId&&(clearTimeout(this.maxConnectTimeoutId),this.maxConnectTimeoutId=null)},e.prototype.clearTryReconnectTimeout=function(){this.tryReconnectTimeoutId&&(clearTimeout(this.tryReconnectTimeoutId),this.tryReconnectTimeoutId=null)},e.prototype.clearInactivityTimeout=function(){this.inactivityTimeoutId&&(clearTimeout(this.inactivityTimeoutId),this.inactivityTimeoutId=null)},e.prototype.setInactivityTimeout=function(){var e=this;this.inactivityTimeout>0&&0===Object.keys(this.operations).length&&(this.inactivityTimeoutId=setTimeout((function(){0===Object.keys(e.operations).length&&e.close()}),this.inactivityTimeout))},e.prototype.checkOperationOptions=function(e,t){var n=e.query,r=e.variables,o=e.operationName;if(!n)throw new Error("Must provide a query.");if(!t)throw new Error("Must provide an handler.");if(!m.default(n)&&!_.getOperationAST(n,o)||o&&!m.default(o)||r&&!y.default(r))throw new Error("Incorrect option types. query must be a string or a document,`operationName` must be a string, and `variables` must be an object.")},e.prototype.buildMessage=function(e,t,n){return{id:e,type:t,payload:n&&n.query?r(r({},n),{query:"string"==typeof n.query?n.query:E.print(n.query)}):n}},e.prototype.formatErrors=function(e){return Array.isArray(e)?e:e&&e.errors?this.formatErrors(e.errors):e&&e.message?[e]:[{name:"FormatedError",message:"Unknown error",originalError:e}]},e.prototype.sendMessage=function(e,t,n){this.sendMessageRaw(this.buildMessage(e,t,n))},e.prototype.sendMessageRaw=function(e){switch(this.status){case this.wsImpl.OPEN:var t=JSON.stringify(e);try{JSON.parse(t)}catch(t){this.eventEmitter.emit("error",new Error("Message must be JSON-serializable. Got: "+e))}this.client.send(t);break;case this.wsImpl.CONNECTING:this.unsentMessagesQueue.push(e);break;default:this.reconnecting||this.eventEmitter.emit("error",new Error("A message was not sent because socket is not connected, is closing or is already closed. Message was: "+JSON.stringify(e)))}},e.prototype.generateOperationId=function(){return String(++this.nextOperationId)},e.prototype.tryReconnect=function(){var e=this;if(this.reconnect&&!(this.backoff.attempts>=this.reconnectionAttempts)){this.reconnecting||(Object.keys(this.operations).forEach((function(t){e.unsentMessagesQueue.push(e.buildMessage(t,S.default.GQL_START,e.operations[t].options))})),this.reconnecting=!0),this.clearTryReconnectTimeout();var t=this.backoff.duration();this.tryReconnectTimeoutId=setTimeout((function(){e.connect()}),t)}},e.prototype.flushUnsentMessagesQueue=function(){var e=this;this.unsentMessagesQueue.forEach((function(t){e.sendMessageRaw(t)})),this.unsentMessagesQueue=[]},e.prototype.checkConnection=function(){this.wasKeepAliveReceived?this.wasKeepAliveReceived=!1:this.reconnecting||this.close(!1,!0)},e.prototype.checkMaxConnectTimeout=function(){var e=this;this.clearMaxConnectTimeout(),this.maxConnectTimeoutId=setTimeout((function(){e.status!==e.wsImpl.OPEN&&(e.reconnecting=!0,e.close(!1,!0))}),this.maxConnectTimeGenerator.duration())},e.prototype.connect=function(){var e,t=this;this.client=new((e=this.wsImpl).bind.apply(e,l([void 0,this.url,this.wsProtocols],this.wsOptionArguments))),this.checkMaxConnectTimeout(),this.client.onopen=function(){return o(t,void 0,void 0,(function(){var e,t;return c(this,(function(n){switch(n.label){case 0:if(this.status!==this.wsImpl.OPEN)return[3,4];this.clearMaxConnectTimeout(),this.closedByUser=!1,this.eventEmitter.emit(this.reconnecting?"reconnecting":"connecting"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.connectionParams()];case 2:return e=n.sent(),this.sendMessage(void 0,S.default.GQL_CONNECTION_INIT,e),this.flushUnsentMessagesQueue(),[3,4];case 3:return t=n.sent(),this.sendMessage(void 0,S.default.GQL_CONNECTION_ERROR,t),this.flushUnsentMessagesQueue(),[3,4];case 4:return[2]}}
2))}))},this.client.onclose=function(){t.closedByUser||t.close(!1,!1)},this.client.onerror=function(e){t.eventEmitter.emit("error",e)},this.client.onmessage=function(e){var data=e.data;t.processReceivedData(data)}},e.prototype.processReceivedData=function(e){var t,n;try{n=(t=JSON.parse(e)).id}catch(t){throw new Error("Message must be JSON-parseable. Got: "+e)}if(-1===[S.default.GQL_DATA,S.default.GQL_COMPLETE,S.default.GQL_ERROR].indexOf(t.type)||this.operations[n])switch(t.type){case S.default.GQL_CONNECTION_ERROR:this.connectionCallback&&this.connectionCallback(t.payload);break;case S.default.GQL_CONNECTION_ACK:this.eventEmitter.emit(this.reconnecting?"reconnected":"connected",t.payload),this.reconnecting=!1,this.backoff.reset(),this.maxConnectTimeGenerator.reset(),this.connectionCallback&&this.connectionCallback();break;case S.default.GQL_COMPLETE:var o=this.operations[n].handler;delete this.operations[n],o.call(this,null,null);break;case S.default.GQL_ERROR:this.operations[n].handler(this.formatErrors(t.payload),null),delete this.operations[n];break;case S.default.GQL_DATA:var c=t.payload.errors?r(r({},t.payload),{errors:this.formatErrors(t.payload.errors)}):t.payload;this.operations[n].handler(null,c);break;case S.default.GQL_CONNECTION_KEEP_ALIVE:var l=void 0===this.wasKeepAliveReceived;this.wasKeepAliveReceived=!0,l&&this.checkConnection(),this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnection()),this.checkConnectionIntervalId=setInterval(this.checkConnection.bind(this),this.wsTimeout);break;default:throw new Error("Invalid message type!")}else this.unsubscribe(n)},e.prototype.unsubscribe=function(e){this.operations[e]&&(delete this.operations[e],this.setInactivityTimeout(),this.sendMessage(e,S.default.GQL_STOP,void 0))},e}();t.SubscriptionClient=A}).call(this,n(70))},219:function(e,t,n){"use strict";n.d(t,"a",(function(){return le})),n.d(t,"b",(function(){return de}));var r=function(e,b){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)b.hasOwnProperty(p)&&(e[p]=b[p])})(e,b)};function o(e,b){function t(){this.constructor=e}r(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}var c=function(){return(c=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};function l(e,t,n,r){return new(n||(n=Promise))((function(o,c){function l(e){try{h(r.next(e))}catch(e){c(e)}}function d(e){try{h(r.throw(e))}catch(e){c(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,d)}h((r=r.apply(e,t||[])).next())}))}function d(e,body){var t,n,r,g,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return g={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function c(c){return function(l){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(6===c[0]&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=body.call(e,o)}catch(e){c=[6,e],n=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}}var h,f=n(11),v=n(433),m=n(84),y=n(72),E=n(307),_=n(23),k=n(99);function T(e){return e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(h||(h={}));var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype[E.default]=function(){return this},t.prototype["@@observable"]=function(){return this},t}(m.a);function S(e){return Array.isArray(e)&&e.length>0}var A,I=function(e){function t(n){var r,o,c=n.graphQLErrors,l=n.networkError,d=n.errorMessage,h=n.extraInfo,f=e.call(this,d)||this;return f.graphQLErrors=c||[],f.networkError=l||null,f.message=d||(o="",S((r=f).graphQLErrors)&&r.graphQLErrors.forEac
vendor: 8,121 bytes, line 2
2h((function(e){var t=e?e.message:"Error message not found.";o+="GraphQL error: "+t+"\n"})),r.networkError&&(o+="Network error: "+r.networkError.message+"\n"),o=o.replace(/\n$/,"")),f.extraInfo=h,f.__proto__=t.prototype,f}return o(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(A||(A={}));var R=function(e){function t(t){var n=t.queryManager,r=t.options,o=t.shouldSubscribe,c=void 0===o||o,l=e.call(this,(function(e){return l.onSubscribe(e)}))||this;l.observers=new Set,l.subscriptions=new Set,l.isTornDown=!1,l.options=r,l.variables=r.variables||{},l.queryId=n.generateQueryId(),l.shouldSubscribe=c;var d=Object(f.getOperationDefinition)(r.query);return l.queryName=d&&d.name&&d.name.value,l.queryManager=n,l}return o(t,e),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){o.unsubscribe()}),0)},error:n},o=e.subscribe(r)}))},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown){var e=this.lastResult;return{data:!this.lastError&&e&&e.data||void 0,error:this.lastError,loading:!1,networkStatus:h.error}}var t,n,r,o=this.queryManager.getCurrentQueryResult(this),data=o.data,l=o.partial,d=this.queryManager.queryStore.get(this.queryId),f=this.options.fetchPolicy,v="network-only"===f||"no-cache"===f;if(d){var m=d.networkStatus;if(n=d,void 0===(r=this.options.errorPolicy)&&(r="none"),n&&(n.networkError||"none"===r&&S(n.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:m,error:new I({graphQLErrors:d.graphQLErrors,networkError:d.networkError})};d.variables&&(this.options.variables=c(c({},this.options.variables),d.variables),this.variables=this.options.variables),t={data:data,loading:T(m),networkStatus:m},d.graphQLErrors&&"all"===this.options.errorPolicy&&(t.errors=d.graphQLErrors)}else{var y=v||l&&"cache-only"!==f;t={data:data,loading:y,networkStatus:y?h.loading:h.ready}}return l||this.updateLastResult(c(c({},t),{stale:!1})),c(c({},t),{partial:l})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&Object(v.a)(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){var e=this.queryManager.queryStore.get(this.queryId);e&&(e.networkError=null,e.graphQLErrors=[])},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;return"cache-only"===t?Promise.reject(new _.a(1)):("no-cache"!==t&&"cache-and-network"!==t&&(t="network-only"),Object(v.a)(this.variables,e)||(this.variables=c(c({},this.variables),e)),Object(v.a)(this.options.variables,this.variables)||(this.options.variables=c(c({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,c(c({},this.options),{fetchPolicy:t}),A.refetch))},t.prototype.fetchMore=function(e){var t=this;Object(_.b)(e.updateQuery,2);var n=c(c({},e.query?e:c(c(c({},this.options),e),{variables:c(c({},this.variables),e.variables)})),{fetchPolicy:"network-only"}),r=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(r,n,A.normal,this.queryId).then((function(o){return t.updateQuery((function(t){return e.updateQuery(t,{fetchMoreResult:o.data,variables:n.variables})})),t.queryManager.stopQuery(r),o}),(function(e){throw t.queryManager.stopQuery(r),e}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var o=t.variables;return r(e,{subscriptionData:n,variables:o})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){var t=this.options.fetchPolicy;this.options=c(c({},this.options),e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var n=e.fetchPolicy;return this.setVariables(this.options.variables,t!==n&&("cache-only"===t||"standby"===t||"network-only"===n),e.fetchResults)},t.prototype.setVariables=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=!0),this.isTornDown=!1,e=e||this.variables,!t&&Object(v.a)(e,this.variables)?this.observers.size&&n?this.result():Promise.resolve():(this.variables=this.options.variables=e,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=t.getQueryWithPreviousResult(this.queryId),r=n.previousResult,o=n.variables,c=n.document,l=Object(f.tryFunctionOrLogError)((function(){return e(r,{variables:o})}));l&&(t.dataStore.markUpdateQueryResult(c,o,l),t.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){D(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:Object(f.cloneDeep)(e),t},t.prototype.onSubscribe=function(e){var t=this;try{var n=e._subscription._observer;n&&!n.error&&(n.error=O)}catch(e){}var r=!this.observers.size;return this.observers.add(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),r&&this.setUpQuery(),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this,t=this.queryManager,n=this.queryId;this.shouldSubscribe&&t.addObservableQuery(n,this),this.options.pollInterval&&(D(this),t.startPollingQuery(this.options,n));var r=function(t){e.updateLastResult(c(c({},e.lastResult),{errors:t.graphQLErrors,networkStatus:h.error,loading:!1})),L(e.observers,"error",e.lastError=t)};t.observeQuery(n,this.options,{next:function(n){if(e.lastError||e.isDifferentFromLastResult(n)){var r=e.updateLastResult(n),o=e.options,c=o.query,l=o.variables,d=o.fetchPolicy;t.transform(c).hasClientExports?t.getLocalState().addExportedVariables(c,l).then((function(o){var l=e.variables;e.variables=e.options.variables=o,!n.loading&&r&&"cache-only"!==d&&t.transform(c).serverQuery&&!Object(v.a)(l,o)?e.refetch():L(e.observers,"next",n)})):L(e.observers,"next",n)}},error:r}).catch(r)},t.prototype.tearDownQuery=function(){var e=this.queryManager;this.isTornDown=!0,e.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(sub){return sub.unsubscribe()})),this.subscriptions.clear(),e.removeObservableQuery(this.queryId),e.stopQuery(this.queryId),this.observers.clear()},t}(w);function O(e){}function L(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function D(e){var t=e.options.fetchPolicy;Object(_.b)("cache-first"!==t&&"cache-only"!==t,3)}var x=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,n){this.store[e]={mutation:t,variables:n||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var n=this.store[e];n&&(n.loading=!1,n.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),C=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];Object(_.b)(!t||t.document===e.document||Object(v.a)(t.document,e.document),19);var n,r=!1,o=null;
2e.storePreviousVariables&&t&&t.networkStatus!==h.loading&&(Object(v.a)(t.variables,e.variables)||(r=!0,o=t.variables)),n=r?h.setVariables:e.isPoll?h.poll:e.isRefetch?h.refetch:h.loading;var c=[];t&&t.graphQLErrors&&(c=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:o,networkError:null,graphQLErrors:c,networkStatus:n,metadata:e.metadata},"string"==typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=h.fetchMore)},e.prototype.markQueryResult=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=S(t.errors)?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=h.ready,"string"==typeof n&&this.store[n]&&(this.store[n].networkStatus=h.ready))},e.prototype.markQueryError=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=h.error,"string"==typeof n&&this.markQueryResultClient(n,!0))},e.prototype.markQueryResultClient=function(e,t){var n=this.store&&this.store[e];n&&(n.networkError=null,n.previousVariables=null,t&&(n.networkStatus=h.ready))},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;Object.keys(this.store).forEach((function(n){e.indexOf(n)<0?t.stopQuery(n):t.store[n].networkStatus=h.loading}))},e}();var M=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,o=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),o&&this.setFragmentMatcher(o)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Object(f.mergeDeep)(t.resolvers,e)})):this.resolvers=Object(f.mergeDeep)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,o=e.variables,h=e.onlyRunForcedResolvers,f=void 0!==h&&h;return l(this,void 0,void 0,(function(){return d(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,o,this.fragmentMatcher,f).then((function(e){return c(c({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return Object(f.hasDirectives)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?Object(f.removeClientSetsFromDocument)(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return c(c({},e),{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);Object(_.b)(!1,6)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),l(this,void 0,void 0,(function(){return d(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(data){return c(c({},t),data.exportedVariables)}))]:[2,c({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Object(k.b)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return k.a}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Object(f.buildQueryFromSelectionSet)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,o,h){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o=function(){return!0}),void 0===h&&(h=!1),l(this,void 0,void 0,(function(){var l,v,m,y,E,_,k,T,w;return d(this,(function(d){var S;return l=Object(f.getMainDefinition)(e),v=Object(f.getFragmentDefinitions)(e),m=Object(f.createFragmentMap)(v),y=l.operation,E=y?(S=y).charAt(0).toUpperCase()+S.slice(1):"Query",k=(_=this).cache,T=_.client,w={fragmentMap:m,context:c(c({}
2,n),{cache:k,client:T}),variables:r,fragmentMatcher:o,defaultOperationType:E,exportedVariables:{},onlyRunForcedResolvers:h},[2,this.resolveSelectionSet(l.selectionSet,t,w).then((function(e){return{result:e,exportedVariables:w.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return l(this,void 0,void 0,(function(){var r,o,c,h,v,m=this;return d(this,(function(y){return r=n.fragmentMap,o=n.context,c=n.variables,h=[t],v=function(e){return l(m,void 0,void 0,(function(){var l,v;return d(this,(function(d){return Object(f.shouldInclude)(e,c)?Object(f.isField)(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&h.push(((n={})[Object(f.resultKeyNameFromField)(e)]=t,n))}))]:(Object(f.isInlineFragment)(e)?l=e:(l=r[e.name.value],Object(_.b)(l,7)),l&&l.typeCondition&&(v=l.typeCondition.name.value,n.fragmentMatcher(t,v,o))?[2,this.resolveSelectionSet(l.selectionSet,t,n).then((function(e){h.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(v)).then((function(){return Object(f.mergeDeepArray)(h)}))]}))}))},e.prototype.resolveField=function(e,t,n){return l(this,void 0,void 0,(function(){var r,o,c,l,h,v,m,y,E,_=this;return d(this,(function(d){return r=n.variables,o=e.name.value,c=Object(f.resultKeyNameFromField)(e),l=o!==c,h=t[c]||t[o],v=Promise.resolve(h),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(m=t.__typename||n.defaultOperationType,(y=this.resolvers&&this.resolvers[m])&&(E=y[l?o:c])&&(v=Promise.resolve(E(t,Object(f.argumentsObjectFromField)(e,r),n.context,{field:e,fragmentMap:n.fragmentMap})))),[2,v.then((function(t){return void 0===t&&(t=h),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?_.resolveSubSelectedArray(e,t,n):e.selectionSet?_.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}();function P(e){var t=new Set,sub=null;return new w((function(n){return t.add(n),sub=sub||e.subscribe({next:function(e){t.forEach((function(t){return t.next&&t.next(e)}))},error:function(e){t.forEach((function(t){return t.error&&t.error(e)}))},complete:function(){t.forEach((function(e){return e.complete&&e.complete()}))}}),function(){t.delete(n)&&!t.size&&sub&&(sub.unsubscribe(),sub=null)}}))}var N=Object.prototype.hasOwnProperty,U=function(){function e(e){var link=e.link,t=e.queryDeduplication,n=void 0!==t&&t,r=e.store,o=e.onBroadcast,c=void 0===o?function(){}:o,l=e.ssrMode,d=void 0!==l&&l,h=e.clientAwareness,v=void 0===h?{}:h,m=e.localState,y=e.assumeImmutableResults;this.mutationStore=new x,this.queryStore=new C,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(f.canUseWeakMap?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=link,this.queryDeduplication=n,this.dataStore=r,this.onBroadcast=c,this.clientAwareness=v,this.localState=m||new M({cache:r.getCache()}),this.ssrMode=d,this.assumeImmutableResults=!!y}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.fetchQueryRejectFns.forEach((function(e){e(new _.a(8))}))},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,o=e.updateQueries,h=e.refetchQueries,v=void 0===h?[]:h,m=e.awaitRefetchQueries,y=void 0!==m&&m,E=e.update,k=e.errorPolicy,T=void 0===k?"none":k,w=e.fetchPolicy,A=e.context,R=void 0===A?{}:A;return l(this,void 0,void 0,(function(){var e,l,h,m=this;return d(this,(function(d){switch(d.label){case 0:return Object(_.b)(t,9),Object(_.b)(!w||"no-cache"===w,10),e=this.generateQueryId(),t=this.transform(t).document,this.setQuery(e,(function(){return{document:t}}
vendor: 4,085 bytes, line 2
2)),n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,R)]:[3,2];case 1:n=d.sent(),d.label=2;case 2:return l=function(){var e={};return o&&m.queries.forEach((function(t,n){var r=t.observableQuery;if(r){var c=r.queryName;c&&N.call(o,c)&&(e[n]={updater:o[c],query:m.queryStore.get(n)})}})),e},this.mutationStore.initMutation(e,t,n),this.dataStore.markMutationInit({mutationId:e,document:t,variables:n,updateQueries:l(),update:E,optimisticResponse:r}),this.broadcastQueries(),h=this,[2,new Promise((function(o,d){var m,_;h.getObservableFromLink(t,c(c({},R),{optimisticResponse:r}),n,!1).subscribe({next:function(r){Object(f.graphQLResultHasError)(r)&&"none"===T?_=new I({graphQLErrors:r.errors}):(h.mutationStore.markMutationResult(e),"no-cache"!==w&&h.dataStore.markMutationResult({mutationId:e,result:r,document:t,variables:n,updateQueries:l(),update:E}),m=r)},error:function(t){h.mutationStore.markMutationError(e,t),h.dataStore.markMutationComplete({mutationId:e,optimisticResponse:r}),h.broadcastQueries(),h.setQuery(e,(function(){return{document:null}})),d(new I({networkError:t}))},complete:function(){if(_&&h.mutationStore.markMutationError(e,_),h.dataStore.markMutationComplete({mutationId:e,optimisticResponse:r}),h.broadcastQueries(),_)d(_);else{"function"==typeof v&&(v=v(m));var t=[];S(v)&&v.forEach((function(e){if("string"==typeof e)h.queries.forEach((function(n){var r=n.observableQuery;r&&r.queryName===e&&t.push(r.refetch())}));else{var n={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(n.context=e.context),t.push(h.query(n))}})),Promise.all(y?t:[]).then((function(){h.setQuery(e,(function(){return{document:null}})),"ignore"===T&&m&&Object(f.graphQLResultHasError)(m)&&delete m.errors,o(m)}))}}})}))]}}))}))},e.prototype.fetchQuery=function(e,t,n,r){return l(this,void 0,void 0,(function(){var o,l,h,v,m,y,E,_,k,T,w,S,R,O,L,D,x,C,M=this;return d(this,(function(d){switch(d.label){case 0:return o=t.metadata,l=void 0===o?null:o,h=t.fetchPolicy,v=void 0===h?"cache-first":h,m=t.context,y=void 0===m?{}:m,E=this.transform(t.query).document,_=this.getVariables(E,t.variables),this.transform(E).hasClientExports?[4,this.localState.addExportedVariables(E,_,y)]:[3,2];case 1:_=d.sent(),d.label=2;case 2:if(t=c(c({},t),{variables:_}),w=T="network-only"===v||"no-cache"===v,T||(S=this.dataStore.getCache().diff({query:E,variables:_,returnPartialData:!0,optimistic:!1}),R=S.complete,O=S.result,w=!R||"cache-and-network"===v,k=O),L=w&&"cache-only"!==v&&"standby"!==v,Object(f.hasDirectives)(["live"],E)&&(L=!0),D=this.idCounter++,x="no-cache"!==v?this.updateQueryWatch(e,E,t):void 0,this.setQuery(e,(function(){return{document:E,lastRequestId:D,invalidated:!0,cancel:x}})),this.invalidate(r),this.queryStore.initQuery({queryId:e,document:E,storePreviousVariables:L,variables:_,isPoll:n===A.poll,isRefetch:n===A.refetch,metadata:l,fetchMoreForQueryId:r}),this.broadcastQueries(),L){if(C=this.fetchRequest({requestId:D,queryId:e,document:E,options:t,fetchMoreForQueryId:r}).catch((function(t){throw t.hasOwnProperty("graphQLErrors")?t:(D>=M.getQuery(e).lastRequestId&&(M.queryStore.markQueryError(e,t,r),M.invalidate(e),M.invalidate(r),M.broadcastQueries()),new I({networkError:t}))})),"cache-and-network"!==v)return[2,C];C.catch((function(){}))}return this.queryStore.markQueryResultClient(e,!L),this.invalidate(e),this.invalidate(r),this.transform(E).hasForcedResolvers?[2,this.localState.runResolvers({document:E,remoteResult:{data:k},context:y,variables:_,onlyRunForcedResolvers:!0}).then((function(n){return M.markQueryResult(e,n,t,r),M.broadcastQueries(),n}))]:(this.broadcastQueries(),[2,{data:k}])}}))}))},e.prototype.markQueryResult=function(e,t,n,r){var o=n.fetchPolicy,c=n.variables,l=n.errorPolicy;"no-cache"===o?this.setQuery(e,(function(){return{newData:{result:t.data,complete:!0}}})):this.dataStore.markQueryResult(t,this.getQuery(e).document,c,r,"ignore"===l||"all"===l)},e.prototype.queryListenerForObserver=function(e,t,n){var r=this;function o(e,t){if(n[e])try{n[e](t)}catch(e){}}
2return function(n,c){if(r.invalidate(e,!1),n){var l=r.getQuery(e),d=l.observableQuery,h=l.document,f=d?d.options.fetchPolicy:t.fetchPolicy;if("standby"!==f){var v=T(n.networkStatus),m=d&&d.getLastResult(),y=!(!m||m.networkStatus===n.networkStatus),E=t.returnPartialData||!c&&n.previousVariables||y&&t.notifyOnNetworkStatusChange||"cache-only"===f||"cache-and-network"===f;if(!v||E){var _=S(n.graphQLErrors),k=d&&d.options.errorPolicy||t.errorPolicy||"none";if("none"===k&&_||n.networkError)return o("error",new I({graphQLErrors:n.graphQLErrors,networkError:n.networkError}));try{var data=void 0,w=void 0;if(c)"no-cache"!==f&&"network-only"!==f&&r.setQuery(e,(function(){return{newData:null}})),data=c.result,w=!c.complete;else{var A=d&&d.getLastError(),R="none"!==k&&(A&&A.graphQLErrors)!==n.graphQLErrors;if(m&&m.data&&!R)data=m.data,w=!1;else{var O=r.dataStore.getCache().diff({query:h,variables:n.previousVariables||n.variables,returnPartialData:!0,optimistic:!0});data=O.result,w=!O.complete}}var L=w&&!(t.returnPartialData||"cache-only"===f),D={data:L?m&&m.data:data,loading:v,networkStatus:n.networkStatus,stale:L};"all"===k&&_&&(D.errors=n.graphQLErrors),o("next",D)}catch(e){o("error",new I({networkError:e}))}}}}}},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.dataStore.getCache(),r=n.transformDocument(e),o=Object(f.removeConnectionDirectiveFromDocument)(n.transformForLink(r)),c=this.localState.clientQuery(r),l=this.localState.serverQuery(o),d={document:r,hasClientExports:Object(f.hasClientExports)(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:c,serverQuery:l,defaultVars:Object(f.getDefaultValues)(Object(f.getOperationDefinition)(r))},h=function(e){e&&!t.has(e)&&t.set(e,d)};h(e),h(r),h(c),h(l)}return t.get(e)},e.prototype.getVariables=function(e,t){return c(c({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),Object(_.b)("standby"!==e.fetchPolicy,11),e.variables=this.getVariables(e.query,e.variables),void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var n=c({},e);return new R({queryManager:this,options:n,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return Object(_.b)(e.query,12),Object(_.b)("Document"===e.query.kind,13),Object(_.b)(!e.returnPartialData,14),Object(_.b)(!e.pollInterval,15),new Promise((function(n,r){var o=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+o.queryId,r),o.result().then(n,r).then((function(){return t.fetchQueryRejectFns.delete("query:"+o.queryId)}))}))},e.prototype.generateQueryId=function(){return String(this.idCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,(function(e){return e.listeners.add(t),{invalidated:!1}}))},e.prototype.updateQueryWatch=function(e,t,n){var r=this,o=this.getQuery(e).cancel;o&&o();return this.dataStore.getCache().watch({query:t,variables:n.variables,optimistic:!0,previousResult:function(){var t=null,n=r.getQuery(e).observableQuery;if(n){var o=n.getLastResult();o&&(t=o.data)}return t},callback:function(t){r.setQuery(e,(function(){return{invalidated:!0,newData:t}}))}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,(function(){return{observableQuery:t}}))},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e).cancel;this.setQuery(e,(function(){return{observableQuery:null}})),t&&t()},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach((function(e){e(new _.a(16))}));var e=[];return this.queries.forEach((function(t,n){t.observableQuery&&e.push(n)})),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];
vendor: 9,394 bytes, line 2
2return this.queries.forEach((function(r,o){var c=r.observableQuery;if(c){var l=c.options.fetchPolicy;c.resetLastResults(),"cache-only"===l||!e&&"standby"===l||n.push(c.refetch()),t.setQuery(o,(function(){return{newData:null}})),t.invalidate(o)}})),this.broadcastQueries(),Promise.all(n)},e.prototype.observeQuery=function(e,t,n){return this.addQueryListener(e,this.queryListenerForObserver(e,t,n)),this.fetchQuery(e,t)},e.prototype.startQuery=function(e,t,n){return this.addQueryListener(e,n),this.fetchQuery(e,t).catch((function(){})),e},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,o=e.variables;n=this.transform(n).document,o=this.getVariables(n,o);var c=function(e){return t.getObservableFromLink(n,{},e,!1).map((function(o){if(r&&"no-cache"===r||(t.dataStore.markSubscriptionResult(o,n,e),t.broadcastQueries()),Object(f.graphQLResultHasError)(o))throw new I({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var l=this.localState.addExportedVariables(n,o).then(c);return new w((function(e){var sub=null;return l.then((function(t){return sub=t.subscribe(e)}),e.error),function(){return sub&&sub.unsubscribe()}}))}return c(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),this.getQuery(e).subscriptions.forEach((function(e){return e.unsubscribe()})),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var n=e.options,r=n.variables,o=n.query,c=n.fetchPolicy,l=n.returnPartialData,d=e.getLastResult(),h=this.getQuery(e.queryId).newData;if(h&&h.complete)return{data:h.result,partial:!1};if("no-cache"===c||"network-only"===c)return{data:void 0,partial:!1};var f=this.dataStore.getCache().diff({query:o,variables:r,previousResult:d?d.data:void 0,returnPartialData:!0,optimistic:t}),v=f.result,m=f.complete;return{data:m||l?v:void 0,partial:!m}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var n=this.getQuery(e).observableQuery;Object(_.b)(n,17),t=n}else t=e;var r=t.options,o=r.variables,c=r.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:o,document:c}},e.prototype.broadcastQueries=function(){var e=this;this.onBroadcast(),this.queries.forEach((function(t,n){t.invalidated&&t.listeners.forEach((function(r){r&&r(e.queryStore.get(n),t.newData)}))}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var o,l=this;void 0===r&&(r=this.queryDeduplication);var d=this.transform(e).serverQuery;if(d){var h=this.inFlightLinkObservables,link=this.link,v={query:d,variables:n,operationName:Object(f.getOperationName)(d)||void 0,context:this.prepareContext(c(c({},t),{forceFetch:!r}))};if(t=v.context,r){var m=h.get(d)||new Map;h.set(d,m);var E=JSON.stringify(n);if(!(o=m.get(E))){m.set(E,o=P(Object(y.execute)(link,v)));var _=function(){m.delete(E),m.size||h.delete(d),k.unsubscribe()},k=o.subscribe({next:_,error:_,complete:_})}}else o=P(Object(y.execute)(link,v))}else o=w.of({data:{}}),t=this.prepareContext(t);var T=this.transform(e).clientQuery;return T&&(o=function(e,t){return new w((function(n){var r=n.next,o=n.error,c=n.complete,l=0,d=!1,h={next:function(e){++l,new Promise((function(n){n(t(e))})).then((function(e){--l,r&&r.call(n,e),d&&h.complete()}),(function(e){--l,o&&o.call(n,e)}))},error:function(e){o&&o.call(n,e)},complete:function(){d=!0,l||c&&c.call(n)}},sub=e.subscribe(h);return function(){return sub.unsubscribe()}}))}(o,(function(e){return l.localState.runResolvers({document:T,remoteResult:e,context:t,variables:n})}))),o},e.prototype.fetchRequest=function(e){var t,n,r=this,o=e.requestId,c=e.queryId,l=e.document,d=e.options,f=e.fetchMoreForQueryId,v=d.variables,m=d.errorPolicy,y=void 0===m?"none":m,E=d.fetchPolicy;return new Promise((function(e,m){var _=r.getObservableFromLink(l,d.context,v),k="fetchRequest:"+c;r.fetchQueryRejectFns.set(k,m);var T=function(){r.fetchQueryRejectFns.delete(k),r.setQuery(c,(function(e){e.subscriptions.delete(w)}))},w=_.map((function(e){if(o>=r.getQuery(c).lastRequestId&&(r.markQueryResult(c,e,d,f),r.queryStore.markQueryResult(c,e,f),r.invalidate(c),r.invalidate(f),r.broadcastQueries()),"none"===y&&S(e.errors))return m(new I({graphQLErrors:e.errors}));if("all"===y&&(n=e.errors),f||"no-cache"===E)t=e.data;else{var h=r.dataStore.getCache().diff({variables:v,query:l,optimistic:!1,returnPartialData:!0}),_=h.result;(h.complete||d.returnPartialData)&&(t=_)}})).subscribe({error:function(e){T(),m(e)},complete:function(){T(),e({data:t,errors:n,loading:!1,networkStatus:h.ready,stale:!1})}});r.setQuery(c,(function(e){e.subscriptions.add(w)}))}))},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},e.prototype.setQuery=function(e,t){var n=this.getQuery(e),r=c(c({},n),t(n));this.queries.set(e,r)},e.prototype.invalidate=function(e,t){void 0===t&&(t=!0),e&&this.setQuery(e,(function(){return{invalidated:t}}))},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return c(c({},t),{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==h.ready&&t.networkStatus!==h.error},e.prototype.startPollingQuery=function(e,t,n){var r=this,o=e.pollInterval;if(Object(_.b)(o,18),!this.ssrMode){var l=this.pollingInfoByQueryId.get(t);l||this.pollingInfoByQueryId.set(t,l={}),l.interval=o,l.options=c(c({},e),{fetchPolicy:"network-only"});var d=function(){var e=r.pollingInfoByQueryId.get(t);e&&(r.checkInFlight(t)?h():r.fetchQuery(t,e.options,A.poll).then(h,h))},h=function(){var e=r.pollingInfoByQueryId.get(t);e&&(clearTimeout(e.timeout),e.timeout=setTimeout(d,e.interval))};n&&this.addQueryListener(t,n),h()}return t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e}(),F=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,n,r,o){void 0===o&&(o=!1);var c=!Object(f.graphQLResultHasError)(e);o&&Object(f.graphQLResultHasError)(e)&&e.data&&(c=!0),!r&&c&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:n})},e.prototype.markSubscriptionResult=function(e,t,n){Object(f.graphQLResultHasError)(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:n})},e.prototype.markMutationInit=function(e){var t,n=this;e.optimisticResponse&&(t="function"==typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse,this.cache.recordOptimisticTransaction((function(r){var o=n.cache;n.cache=r;try{n.markMutationResult({mutationId:e.mutationId,result:{data:t},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{n.cache=o}}),e.mutationId))},e.prototype.markMutationResult=function(e){var t=this;if(!Object(f.graphQLResultHasError)(e.result)){var n=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],r=e.updateQueries;r&&Object.keys(r).forEach((function(o){var c=r[o],l=c.query,d=c.updater,h=t.cache.diff({query:l.document,variables:l.variables,returnPartialData:!0,optimistic:!1}),v=h.result;if(h.complete){var m=Object(f.tryFunctionOrLogError)((function(){return d(v,{mutationResult:e.result,queryName:Object(f.getOperationName)(l.document)||void 0,queryVariables:l.variables})}));m&&n.push({result:m,dataId:"ROOT_QUERY",query:l.document,variables:l.variables})}})),this.cache.performTransaction((function(t){n.forEach((function(e){return t.write(e)}));var r=e.update;r&&Object(f.tryFunctionOrLogError)((function(){return r(t,e.result)}))}))}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,n){this.cache.write({result:n,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),B=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.cache,r=e.ssrMode,o=void 0!==r&&r,c=e.ssrForceFetchDelay,l=void 0===c?0:c,d=e.connectToDevTools,h=e.queryDeduplication,f=void 0===h||h,v=e.defaultOptions,m=e.assumeImmutableResults,E=void 0!==m&&m,k=e.resolvers,T=e.typeDefs,w=e.fragmentMatcher,S=e.name,A=e.version,link=e.link;if(!link&&k&&(link=y.ApolloLink.empty()),!link||!n)throw new _.a(4);this.link=link,this.cache=n,this.store=new F(n),this.disableNetworkFetches=o||l>0,this.queryDeduplication=f,this.defaultOptions=v||{},this.typeDefs=T,l&&setTimeout((function(){return t.disableNetworkFetches=!1}),l),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this);void 0!==d&&(d&&"undefined"!=typeof window)&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new M({cache:n,client:this,resolvers:k,fragmentMatcher:w}
2),this.queryManager=new U({link:this.link,store:this.store,queryDeduplication:f,ssrMode:o,clientAwareness:{name:S,version:A},localState:this.localState,assumeImmutableResults:E,onBroadcast:function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.cache.extract(!0)})}})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=c(c({},this.defaultOptions.watchQuery),e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=c(c({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=c(c({},this.defaultOptions.query),e)),Object(_.b)("cache-and-network"!==e.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=c(c({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=c(c({},this.defaultOptions.mutate),e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.cache.writeData(e);return this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Object(y.execute)(this.link,e)},e.prototype.initQueryManager=function(){return this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e}(),j=n(471),V=n(119),H=n(218),W=n(308),G=n.n(W),K=function(e,b){return(K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)b.hasOwnProperty(p)&&(e[p]=b[p])})(e,b)};var Y=function(e){function t(t){var n=e.call(this)||this;return t instanceof H.SubscriptionClient?n.subscriptionClient=t:n.subscriptionClient=new H.SubscriptionClient(t.uri,t.options,t.webSocketImpl),n}return function(e,b){function t(){this.constructor=e}K(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}(t,e),t.prototype.request=function(e){return this.subscriptionClient.request(e)},t}(y.ApolloLink),$=n(147),Q=n(713),z={generateHash:function(e){return Q().update(Object($.print)(e)).digest("hex")},disable:function(e){var t=e.graphQLErrors,n=e.operation;if(t&&t.some((function(e){return"PersistedQueryNotSupported"===e.message})))return!0;var r=n.getContext().response;return!(!r||!r.status||400!==r.status&&500!==r.status)},useGETForHashedQueries:!1};function X(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}var J=Object.prototype.hasOwnProperty,Z="__createPersistedQueryLink_hashes",ee="function"==typeof Symbol?Symbol.for(Z):Z,te=0,ne=function(e){void 0===e&&(e={});var t=Object.assign({},z,e),n=t.generateHash,r=t.disable,o=t.useGETForHashedQueries,c=!0,l="forLink"+te++;function d(e){if(!e||"object"!=typeof e)return n(e);J.call(e,ee)||Object.defineProperty(e,ee,{value:Object.create(null),enumerable:!1});var t=e[ee];return J.call(t,l)?t[l]:t[l]=n(e)}return new y.ApolloLink((function(e,t){if(!t)throw new Error("PersistedQueryLink cannot be the last link in the chain.");var n,l=e.query;if(c)try{e.extensions.persistedQuery={version:1,sha256Hash:d(l)}}catch(e){n=e}return new m.a((function(l){if(!n){var d,h,f=!1,v=!1,m=function(n,o){var l=n.response,m=n.networkError;if(!f&&(l&&l.errors||m)){f=!0;var E={response:l,networkError:m,operation:e,graphQLErrors:l?l.errors:void 0};if(c=!r(E),l&&l.errors&&l.errors.some((function(e){return"PersistedQueryNotFound"===e.message}))||!c)return d&&d.unsubscribe(),e.setContext({http:{includeQuery:!0,includeExtensions:c}}),v&&e.setContext({fetchOptions:h}),void(d=t(e).subscribe(y))}o()},y={next:function(e){m({response:e},(function(){return l.next(e)}))},error:function(e){m({networkError:e},(function(){return l.error(e)}))},complete:l.complete.bind(l)};return e.setContext({http:{includeQuery:!c,includeExtensions:c}}),o&&c&&function(e){return!e.query.definitions.some(X)}(e)&&(e.setContext((function(e){var t=e.fetchOptions,n=void 0===t?{}:t;return h=n,{fetchOptions:Object.assign({},n,{method:"GET"})}})),v=!0),d=t(e).subscribe(y),function(){d&&d.unsubscribe()}}l.error(n)}))}))};function re(e){return new y.ApolloLink((function(t,n){var r=function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]])}return t}(t,[]);return new m.a((function(o){var c;return Promise.resolve(r).then((function(n){return e(n,t.getContext())})).then(t.setContext).then((function(){c=n(t).subscribe({next:o.next.bind(o),error:o.error.bind(o),c
2omplete:o.complete.bind(o)})})).catch(o.error.bind(o)),function(){c&&c.unsubscribe()}}))}))}var ie=n(470),ae={test:function(e){return"client"===e.name.value},remove:!0},oe=new Map;var se=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)b.hasOwnProperty(p)&&(e[p]=b[p])};return function(t,b){function n(){this.constructor=t}e(t,b),t.prototype=null===b?Object.create(b):(n.prototype=b.prototype,new n)}}(),ue=ie.graphql,ce=function(e){void 0===e&&(e={resolvers:{},defaults:{}});var t=e.defaults,n=e.cache,r=e.typeDefs,o=e.fragmentMatcher;return n&&t&&n.writeData({data:t}),new(function(c){function l(){return null!==c&&c.apply(this,arguments)||this}return se(l,c),l.prototype.writeDefaults=function(){n&&t&&n.writeData({data:t})},l.prototype.request=function(n,c){if(void 0===c&&(c=function(){return m.a.of({data:{}})}),r){var l=function(e){return(Array.isArray(e)?e:[e]).map((function(e){return"string"==typeof e?e:Object($.print)(e)})).map((function(e){return e.trim()})).join("\n")}(r);n.setContext((function(e){var t=e.schemas;return{schemas:(void 0===t?[]:t).concat([{definition:l,directives:"directive @client on FIELD"}])}}))}if(!Object(f.hasDirectives)(["client"],n.query))return c(n);var d,h="function"==typeof e.resolvers?e.resolvers():e.resolvers,v=function(e){var t=oe.get(e);if(t)return t;Object(f.checkDocument)(e);var n=Object(f.removeDirectivesFromDocument)([ae],e);return oe.set(e,n),n}(n.query),y=n.query,E=(d=(Object(f.getMainDefinition)(y)||{}).operation).charAt(0).toUpperCase()+d.slice(1)||"Query",_=function(e,n,r,o,c){void 0===n&&(n={});var l=c.resultKey,d=n[l],f=n[e],v=l!==e;if(void 0!==d||void 0!==f)return d||f;var m=h[n.__typename||E];if(m){var y=m[e];if(y)return y(n,r,o,c)}return(v?d:f)||(t||{})[e]};v&&(n.query=v);var k=v&&c?c(n):m.a.of({data:{}});return new m.a((function(e){var t=!1,r=!1;k.subscribe({next:function(c){var data=c.data,l=c.errors,d=e.error.bind(e),h=n.getContext();r=!0,ue(_,y,data,h,n.variables,{fragmentMatcher:o}).then((function(n){e.next({data:n,errors:l}),t&&e.complete(),r=!1})).catch(d)},error:e.error.bind(e),complete:function(){r||e.complete(),t=!0}})}))},l}(y.ApolloLink))};function le({clientId:e="defaultClient",httpEndpoint:t,wsEndpoint:n=null,tokenName:r="apollo-token",persisting:o=!1,ssr:c=!1,websocketsOnly:l=!1,link:link=null,preAuthLinks:d=[],defaultHttpLink:h=!0,httpLinkOptions:v={},cache:m=null,inMemoryCacheOptions:E={},apollo:_={},clientState:k=null,getAuth:T=he,typeDefs:w,resolvers:S,onCacheInit:A}){let I,R,O;const L=l&&!c&&n;if(m||(m=new V.a(E)),!L){const e=Object(j.createUploadLink)({uri:t,...v});link?h&&(link=Object(y.from)([link,e])):link=e,R=re((async(e,{headers:t})=>{const n=await T(r);return{headers:{...t,...n?{Authorization:n}:{}}}})),link=R.concat(link),d.length&&(link=Object(y.from)(d).concat(R))}if(!c){if("undefined"!=typeof window){const t=window.__APOLLO_STATE__;t&&t[e]&&m.restore(t[e])}if(!L){let e={};"object"==typeof o&&null!=o&&(e=o,o=!0),!0===o&&(link=ne(e).concat(link))}if(n){I=new H.SubscriptionClient(n,{reconnect:!0,connectionParams:()=>{const e=T(r);return e?{Authorization:e,headers:{Authorization:e}}:{}}});const e=new Y(I);link=L?link?link.concat(e):e:Object(y.split)((({query:e})=>{const{kind:t,operation:n}=Object(f.getMainDefinition)(e);return"OperationDefinition"===t&&"subscription"===n}),e,link)}}k&&(console.warn("clientState is deprecated, see https://vue-cli-plugin-apollo.netlify.com/guide/client-state.html"),O=ce({cache:m,...k}),link=Object(y.from)([O,link]));const D=new B({link:link,cache:m,...c?{ssrMode:!0}:{ssrForceFetchDelay:100,connectToDevTools:!1},typeDefs:w,resolvers:S,..._});return O&&D.onResetStore(O.writeDefaults),A&&(A(m),D.onResetStore((()=>A(m)))),{apolloClient:D,wsClient:I,stateLink:O}}function de(e){const t=Object.assign({},e.operations);e.close(!0),e.connect(),Object.keys(t).forEach((n=>{e.sendMessage(n,G.a.GQL_START,t[n].options)}))}function he(e){if("undefined"!=typeof window){const t=window.localStorage.getItem(e);return t?`Bearer ${t}`:""}}},22:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],c=o[0],l={id:e+":"+i,css:o[1],media:o[2],sourceMap:o[3]};r[c]?r[c].parts.push(l):n.push(r[c]={id:c,parts:[l]})}return n}n.r(t),n.d(t,"default",(function(){return E}));var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var c={},head=o&&(document.head||document.getElementsByTagName("head")[0]),l=null,d=0,h=!1,f=function(){},v=null,m="data-vue-ssr-id",y="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function E(e,t,n,o){h=n,v=o||{};var l=r(e,t);return _(l),function(t){for(var n=[],i=0;i<l.length;i++){var o=l[i];(d=c[o.id]).refs--,n.push(d)}t?_(l=r(e,t)):l=[];for(i=0;i<n.length;i++){var d;if(0===(d=n[i]).refs){for(var h=0;h<d.parts.length;h++)d.parts[h]();delete c[d.id]}}}}function _(e){for(var i=0;i<e.length;i++){var t=e[i],n=c[t.id];if(n){n.refs++;for(var r=0;r<n.parts.length;r++)n.parts[r](t.parts[r]);for(;r<t.parts.length;r++)n.parts.push(T(t.parts[r]));n.parts.length>t.parts.length&&(n.parts.length=t.parts.length)}else{var o=[];for(r=0;r<t.parts.length;r++)o.push(T(t.parts[r]));c[t.id]={id:t.id,refs:1,parts:o}}}}function k(){var e=document.createElement("style");return e.type="text/css",head.appendChild(e),e}function T(e){var t,n,r=document.querySelector("style["+m+'~="'+e.id+'"]');if(r){if(h)return f;r.parentNode.removeChild(r)}if(y){var o=d++;r=l||(l=k()),t=A.bind(null,r,o,!1),n=A.bind(null,r,o,!0)}else r=k(),t=I.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}
2var w,S=(w=[],function(e,t){return w[e]=t,w.filter(Boolean).join("\n")});function A(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=S(t,o);else{var c=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(c,l[t]):e.appendChild(c)}}function I(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),v.ssrId&&e.setAttribute(m,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},23:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(468),o="Invariant Violation",c=Object.setPrototypeOf,l=void 0===c?function(e,t){return e.__proto__=t,e}:c,d=function(e){function t(n){void 0===n&&(n=o);var r=e.call(this,"number"==typeof n?o+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=o,l(r,t.prototype),r}return Object(r.a)(t,e),t}(Error);function h(e,t){if(!e)throw new d(t)}function f(e){return function(){return console[e].apply(console,arguments)}}!function(e){e.warn=f("warn"),e.error=f("error")}(h||(h={}));var v={env:{}};if("object"==typeof e)v=e;else try{Function("stub","process = stub")(v)}catch(e){}}).call(this,n(153))},248:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(30);function o(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=Object(r.c)().getClient(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}},249:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(139),o=n(165),c=n(190),l=n(128),d=n(57),h=n(137),f=n(146),v=n(118);function m(e,t,n,m){const{normalizeDepth:E=3,normalizeMaxBreadth:_=1e3}=e,k={...t,event_id:t.event_id||n.event_id||Object(r.f)(),timestamp:t.timestamp||Object(o.a)()},T=n.integrations||e.integrations.map((i=>i.name));!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:c=250}=t;"environment"in e||(e.environment="environment"in t?n:f.a);void 0===e.release&&void 0!==r&&(e.release=r);void 0===e.dist&&void 0!==o&&(e.dist=o);e.message&&(e.message=Object(l.d)(e.message,c));const d=e.exception&&e.exception.values&&e.exception.values[0];d&&d.value&&(d.value=Object(l.d)(d.value,c));const h=e.request;h&&h.url&&(h.url=Object(l.d)(h.url,c))}(k,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(k,T),void 0===t.type&&function(e,t){const n=d.a._sentryDebugIds;if(!n)return;let r;const o=y.get(t);o?r=o:(r=new Map,y.set(t,r));const c=Object.keys(n).reduce(((e,o)=>{let c;const l=r.get(o);l?c=l:(c=t(o),r.set(o,c));for(let i=c.length-1;i>=0;i--){const t=c[i];if(t.filename){e[t.filename]=n[o];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=c[e.filename])}))}))}catch(e){}}(k,e.stackParser);let w=m;n.captureContext&&(w=v.a.clone(w).update(n.captureContext));let S=Object(c.c)(k);if(w){if(w.getAttachments){const e=[...n.attachments||[],...w.getAttachments()];e.length&&(n.attachments=e)}S=w.applyToEvent(k,n)}return S.then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach((e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})}))}(e),"number"==typeof E&&E>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((b=>({...b,...b.data&&{data:Object(h.a)(b.data,t,n)}})))},...e.user&&{user:Object(h.a)(e.user,t,n)},...e.contexts&&{contexts:Object(h.a)(e.contexts,t,n)},...e.extra&&{extra:Object(h.a)(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Object(h.a)(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((span=>(span.data&&(span.data=Object(h.a)(span.data,t,n)),span))));return r}(e,E,_):e)))}const y=new WeakMap},250:function(e,t,n){"use strict";n.d(t,"a",(function(){return $e})),n.d(t,"b",(function(){return Ze})),n.d(t,"c",(function(){return Xe})),n.d(t,"d",(function(){return tt})),n.d(t,"e",(function(){return wt})),n.d(t,"f",(function(){return Qn})),n.d(t,"g",(function(){return mn})),n.d(t,"h",(function(){return on})),n.d(t,"i",(function(){return vn})),n.d(t,"j",(function(){return St})),n.d(t,"k",(function(){return vt})),n.d(t,"l",(function(){return gt})),n.d(t,"m",(function(){return an})),n.d(t,"n",(function(){return pn})),n.d(t,"o",(function(){return At})),n.d(t,"p",(function(){return ut}));var r=n(33),o=n(7),c=n(135),l=n(48),d=n(121);function h(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const f=h,v=new o.b("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),m=new c.b("@firebase/auth");function y(e,...t){m.logLevel<=c.a.ERROR&&m.error(`Auth (${r.a}): ${e}`,...t)}function E(e,...t){throw S(e,...t)}function _(e,...t){return S(e,...t)}function k(e,code,t){const n=Object.assign(Object.assign({},f()),{[code]:t});
2return new o.b("auth","Firebase",n).create(code,{appName:e.name})}function T(e){return k(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function w(e,object,t){if(!(object instanceof t))throw t.name!==object.constructor.name&&E(e,"argument-error"),k(e,"argument-error",`Type of ${object.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function S(e,...t){if("string"!=typeof e){const code=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=e.name),e._errorFactory.create(code,...n)}return v.create(e,...t)}function A(e,t,...n){if(!e)throw S(t,...n)}function I(e){const t="INTERNAL ASSERTION FAILED: "+e;throw y(t),new Error(t)}function R(e,t){e||I(t)}function O(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function L(){return"http:"===D()||"https:"===D()}function D(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}class x{constructor(e,t){this.shortDelay=e,this.longDelay=t,R(t>e,"Short delay should be less than long delay!"),this.isMobile=Object(o.s)()||Object(o.t)()}get(){return"undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(L()||Object(o.o)()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay}}function C(e,path){R(e.emulator,"Emulator should always be set here");const{url:t}=e.emulator;return path?`${t}${path.startsWith("/")?path.slice(1):path}`:t}class M{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:"undefined"!=typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!=typeof fetch?fetch:void I("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:"undefined"!=typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!=typeof Headers?Headers:void I("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:"undefined"!=typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!=typeof Response?Response:void I("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const P={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
2aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},N=new x(3e4,6e4);function U(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function F(e,t,path,n,r={}){return B(e,r,(async()=>{let body={},r={};n&&("GET"===t?r=n:body={body:JSON.stringify(n)});const c=Object(o.u)(Object.assign({key:e.config.apiKey},r)).slice(1),l=await e._getAdditionalHeaders();return l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode),M.fetch()(V(e,e.config.apiHost,path,c),Object.assign({method:t,headers:l,referrerPolicy:"no-referrer"},body))}))}async function B(e,t,n){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},P),t);try{const t=new W(e),o=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const c=await o.json();if("needConfirmation"in c)throw G(e,"account-exists-with-different-credential",c);if(o.ok&&!("errorMessage"in c))return c;{const t=o.ok?c.errorMessage:c.error.message,[n,l]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw G(e,"credential-already-in-use",c);if("EMAIL_EXISTS"===n)throw G(e,"email-already-in-use",c);if("USER_DISABLED"===n)throw G(e,"user-disabled",c);const d=r[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(l)throw k(e,d,l);E(e,d)}}catch(t){if(t instanceof o.c)throw t;E(e,"network-request-failed",{message:String(t)})}}async function j(e,t,path,n,r={}){const o=await F(e,t,path,n,r);return"mfaPendingCredential"in o&&E(e,"multi-factor-auth-required",{_serverResponse:o}),o}function V(e,t,path,n){const base=`${t}${path}?${n}`;return e.config.emulator?C(e.config,base):`${e.config.apiScheme}://${base}`}function H(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class W{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(_(this.auth,"network-request-failed"))),N.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function G(e,code,t){const n={appName:e.name};t.email&&(n.email=t.email),t.phoneNumber&&(n.phoneNumber=t.phoneNumber);const r=_(e,code,n);return r.customData._tokenResponse=t,r}function K(e){return void 0!==e&&void 0!==e.enterprise}class Y{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(const t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return H(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}async function $(e,t){return F(e,"GET","/v2/recaptchaConfig",U(e,t))}async function Q(e,t){return F(e,"POST","/v1/accounts:lookup",t)}function z(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}function X(e){return 1e3*Number(e)}function J(e){const[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return y("JWT malformed, contained fewer than 3 sections"),null;try{const e=Object(o.d)(n);return e?JSON.parse(e):(y("Failed to decode base64 JWT payload"),null)}catch(e){return y("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}function Z(e){const t=J(e);return A(t,"internal-error"),A(void 0!==t.exp,"internal-error"),A(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function ee(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof o.c&&function({code:code}){return"auth/user-disabled"===code||"auth/user-token-expired"===code}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class te{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){return void("auth/network-request-failed"===(null==e?void 0:e.code)&&this.schedule(!0))}this.schedule()}}class ne{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=z(this.lastLoginAt),this.creationTime=z(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function re(e){var t;const n=e.auth,r=await e.getIdToken(),o=await ee(e,Q(n,{idToken:r}));A(null==o?void 0:o.users.length,n,"internal-error");const c=o.users[0];e._notifyReloadListener(c);const l=(null===(t=c.providerUserInfo)||void 0===t?void 0:t.length)?ie(c.providerUserInfo):[],d=(h=e.providerData,f=l,[...h.filter((e=>!f.some((t=>t.providerId===e.providerId)))),...f]);var h,f;const v=e.isAnonymous,m=!(e.email&&c.passwordHash||(null==d?void 0:d.length)),y=!!v&&m,E={uid:c.localId,displayName:c.displayName||null,photoURL:c.photoUrl||null,email:c.email||null,emailVerified:c.emailVerified||!1,phoneNumber:c.phoneNumber||null,tenantId:c.tenantId||null,providerData:d,metadata:new ne(c.createdAt,c.lastLoginAt),isAnonymous:y};Object.assign(e,E)}function ie(e){return e.map((e=>{var{providerId:t}=e,n=Object(l.c)(e,["providerId"]);
vendor: 25,809 bytes, line 2
2return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}))}class ae{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){A(e.idToken,"internal-error"),A(void 0!==e.idToken,"internal-error"),A(void 0!==e.refreshToken,"internal-error");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):Z(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){A(0!==e.length,"internal-error");const t=Z(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return t||!this.accessToken||this.isExpired?(A(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null):this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:n,refreshToken:r,expiresIn:c}=await async function(e,t){const n=await B(e,{},(async()=>{const body=Object(o.u)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:n,apiKey:r}=e.config,c=V(e,n,"/v1/token",`key=${r}`),l=await e._getAdditionalHeaders();return l["Content-Type"]="application/x-www-form-urlencoded",M.fetch()(c,{method:"POST",headers:l,body:body})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,r,Number(c))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,object){const{refreshToken:t,accessToken:n,expirationTime:r}=object,o=new ae;return t&&(A("string"==typeof t,"internal-error",{appName:e}),o.refreshToken=t),n&&(A("string"==typeof n,"internal-error",{appName:e}),o.accessToken=n),r&&(A("number"==typeof r,"internal-error",{appName:e}),o.expirationTime=r),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new ae,this.toJSON())}_performRefresh(){return I("not implemented")}}function oe(e,t){A("string"==typeof e||void 0===e,"internal-error",{appName:t})}class se{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,o=Object(l.c)(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new te(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new ne(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(e){const t=await ee(this,this.stsTokenManager.getToken(this.auth,e));return A(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return async function(e,t=!1){const n=Object(o.l)(e),r=await n.getIdToken(t),c=J(r);A(c&&c.exp&&c.auth_time&&c.iat,n.auth,"internal-error");const l="object"==typeof c.firebase?c.firebase:void 0,d=null==l?void 0:l.sign_in_provider;return{claims:c,token:r,authTime:z(X(c.auth_time)),issuedAtTime:z(X(c.iat)),expirationTime:z(X(c.exp)),signInProvider:d||null,signInSecondFactor:(null==l?void 0:l.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=Object(o.l)(e);await re(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(A(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((e=>Object.assign({},e))),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new se(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){A(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await re(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(Object(r.c)(this.auth.app))return Promise.reject(T(this.auth));const e=await this.getIdToken();return await ee(this,async function(e,t){return F(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((e=>Object.assign({},e))),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,object){var t,n,r,o,c,l,d,h;const f=null!==(t=object.displayName)&&void 0!==t?t:void 0,v=null!==(n=object.email)&&void 0!==n?n:void 0,m=null!==(r=object.phoneNumber)&&void 0!==r?r:void 0,y=null!==(o=object.photoURL)&&void 0!==o?o:void 0,E=null!==(c=object.tenantId)&&void 0!==c?c:void 0,_=null!==(l=object._redirectEventId)&&void 0!==l?l:void 0,k=null!==(d=object.createdAt)&&void 0!==d?d:void 0,T=null!==(h=object.lastLoginAt)&&void 0!==h?h:void 0,{uid:w,emailVerified:S,isAnonymous:I,providerData:R,stsTokenManager:O}=object;A(w&&O,e,"internal-error");const L=ae.fromJSON(this.name,O);A("string"==typeof w,e,"internal-error"),oe(f,e.name),oe(v,e.name),A("boolean"==typeof S,e,"internal-error"),A("boolean"==typeof I,e,"internal-error"),oe(m,e.name),oe(y,e.name),oe(E,e.name),oe(_,e.name),oe(k,e.name),oe(T,e.name);const D=new se({uid:w,auth:e,email:v,emailVerified:S,displayName:f,isAnonymous:I,photoURL:y,phoneNumber:m,tenantId:E,stsTokenManager:L,createdAt:k,lastLoginAt:T});return R&&Array.isArray(R)&&(D.providerData=R.map((e=>Object.assign({},e)))),_&&(D._redirectEventId=_),D}static async _fromIdTokenResponse(e,t,n=!1){const r=new ae;r.updateFromServerResponse(t);const o=new se({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await re(o),o}static async _fromGetAccountInfoResponse(e,t,n){const r=t.users[0];A(void 0!==r.localId,"internal-error");const o=void 0!==r.providerUserInfo?ie(r.providerUserInfo):[],c=!(r.email&&r.passwordHash||(null==o?void 0:o.length)),l=new ae;l.updateFromIdToken(n);const d=new se({uid:r.localId,auth:e,stsTokenManager:l,isAnonymous:c}),h={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:o,metadata:new ne(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash||(null==o?void 0:o.length))};return Object.assign(d,h),d}}const ue=new Map;function ce(e){R(e instanceof Function,"Expected a class definition");let t=ue.get(e);return t?(R(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,ue.set(e,t),t)}class le{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}le.type="NONE";const de=le;function he(e,t,n){return`firebase:${e}:${t}:${n}`}class fe{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:o}=this.auth;this.fullUserKey=he(this.userKey,r.apiKey,o),this.fullPersistenceKey=he("persistence",r.apiKey,o),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?se._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new fe(ce(de),e,n);const r=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let o=r[0]||ce(de);const c=he(n,e.config.apiKey,e.name);let l=null;for(const n of t)try{const t=await n._get(c);if(t){const r=se._fromJSON(e,t);n!==o&&(l=r),o=n;break}}catch(e){}const d=r.filter((p=>p._shouldAllowMigration));return o._shouldAllowMigration&&d.length?(o=d[0],l&&await o._set(c,l.toJSON()),await Promise.all(t.map((async e=>{if(e!==o)try{await e._remove(c)}catch(e){}}))),new fe(o,e,n)):new fe(o,e,n)}}function pe(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(ye(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(ve(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Ee(t))return"Blackberry";if(_e(t))return"Webos";if(me(t))return"Safari";if((t.includes("chrome/")||ge(t))&&!t.includes("edge/"))return"Chrome";if(be(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null==n?void 0:n.length))return n[1]}return"Other"}function ve(e=Object(o.m)()){return/firefox\//i.test(e)}function me(e=Object(o.m)()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function ge(e=Object(o.m)()){return/crios\//i.test(e)}function ye(e=Object(o.m)()){return/iemobile/i.test(e)}function be(e=Object(o.m)()){return/android/i.test(e)}function Ee(e=Object(o.m)()){return/blackberry/i.test(e)}function _e(e=Object(o.m)()){return/webos/i.test(e)}function ke(e=Object(o.m)()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function Te(e=Object(o.m)()){return ke(e)||be(e)||_e(e)||Ee(e)||/windows phone/i.test(e)||ye(e)}function we(e,t=[]){let n;switch(e){case"Browser":n=pe(Object(o.m)());break;case"Worker":n=`${pe(Object(o.m)())}-${e}`;break;default:n=e}const c=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${r.a}/${c}`}class Se{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=t=>new Promise(((n,r)=>{try{n(e(t))}catch(e){r(e)}}));n.onAbort=t,this.queue.push(n);const r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){t.reverse();for(const e of t)try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}class Ae{constructor(e){var t,n,r,o;const c=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=c.minPasswordLength)&&void 0!==t?t:6,c.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=c.maxPasswordLength),void 0!==c.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=c.containsLowercaseCharacter),void 0!==c.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=c.containsUppercaseCharacter),void 0!==c.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=c.containsNumericCharacter),void 0!==c.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=c.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(r=null===(n=e.allowedNonAlphanumericCharacters)||void 0===n?void 0:n.join(""))&&void 0!==r?r:"",this.forceUpgradeOnSignin=null!==(o=e.forceUpgradeOnSignin)&&void 0!==o&&o,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,n,r,o,c,l;const d={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,d),this.validatePasswordCharacterOptions(e,d),d.isValid&&(d.isValid=null===(t=d.meetsMinPasswordLength)||void 0===t||t),d.isValid&&(d.isValid=null===(n=d.meetsMaxPasswordLength)||void 0===n||n),d.isValid&&(d.isValid=null===(r=d.containsLowercaseLetter)||void 0===r||r),d.isValid&&(d.isValid=null===(o=d.containsUppercaseLetter)||void 0===o||o),d.isValid&&(d.isValid=null===(c=d.containsNumericCharacter)||void 0===c||c),d.isValid&&(d.isValid=null===(l=d.containsNonAlphanumericCharacter)||void 0===l||l),d}validatePasswordLengthOptions(e,t){const n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){let n;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let i=0;i<e.length;i++)n=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(t,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,r,o){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=o))}}class Ie{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Oe(this),this.idTokenSubscription=new Oe(this),this.beforeStateQueue=new Se(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=v,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=ce(t)),this._initializationPromise=this.queue((async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await fe.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void await this.currentUser.getIdToken()):void await this._updateCurrentUser(e,!0):void 0}async initializeCurrentUserFromIdToken(e){try{const t=await Q(this,{idToken:e}),n=await se._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(n)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var t;if(Object(r.c)(this.app)){const e=this.app.settings.authIdToken;return e?new Promise((t=>{setTimeout((()=>this.initializeCurrentUserFromIdToken(e).then(t,t)))})):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let o=n,c=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,r=null==o?void 0:o._redirectEventId,l=await this.tryRedirectSignIn(e);n&&n!==r||!(null==l?void 0:l.user)||(o=l.user,c=!0)}if(!o)return this.directlySetCurrentUser(null);if(!o._redirectEventId){if(c)try{await this.beforeStateQueue.runMiddleware(o)}catch(e){o=n,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(e)))}return o?this.reloadAndSetCurrentUserOrClear(o):this.directlySetCurrentUser(null)}return A(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===o._redirectEventId?this.directlySetCurrentUser(o):this.reloadAndSetCurrentUserOrClear(o)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await re(e)}catch(e){if("auth/network-request-failed"!==(null==e?void 0:e.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(Object(r.c)(this.app))return Promise.reject(T(this));const t=e?Object(o.l)(e):null;return t&&A(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&A(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue((async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()}))}async signOut(){return Object(r.c)(this.app)?Promise.reject(T(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return Object(r.c)(this.app)?Promise.reject(T(this)):this.queue((async()=>{await this.assertedPersistence.setPersistence(ce(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e,t={}){return F(e,"GET","/v2/passwordPolicy",U(e,t))}(this),t=new Ae(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new o.b("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise(((e,t)=>{if(this.currentUser)e();else{const n=this.onAuthStateChanged((()=>{n(),e()}),t)}}))}async revokeAccessToken(e){if(this.currentUser){const t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await async function(e,t){return F(e,"POST","/v2/accounts:revokeToken",U(e,t))}(this,t)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){const n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&ce(e)||this._popupRedirectResolver;A(t,this,"argument-error"),this.redirectPersistenceManager=await fe.create(this,[ce(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue((async()=>this.directlySetCurrentUser(e)))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};const o="function"==typeof t?t:t.next.bind(t);let c=!1;const l=this._isInitialized?Promise.resolve():this._initializationPromise;if(A(l,this,"internal-error"),l.then((()=>{c||o(this.currentUser)})),"function"==typeof t){const o=e.addObserver(t,n,r);return()=>{c=!0,o()}}{const n=e.addObserver(t);return()=>{c=!0,n()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return A(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=we(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);const r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;const t=await(null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){m.logLevel<=c.a.WARN&&m.warn(`Auth (${r.a}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function Re(e){return Object(o.l)(e)}class Oe{constructor(e){this.auth=e,this.observer=null,this.addObserver=Object(o.f)((e=>this.observer=e))}get next(){return A(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let Le={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function De(e){return Le.loadJS(e)}function xe(e){return`__${e}${Math.floor(1e6*Math.random())}`}class Ce{constructor(e){this.type="recaptcha-enterprise",this.auth=Re(e)}async verify(e="verify",t=!1){function n(t,n,r){const o=window.grecaptcha;K(o)?o.enterprise.ready((()=>{o.enterprise.execute(t,{action:e}).then((e=>{n(e)})).catch((()=>{n("NO_RECAPTCHA")}))})):r(Error("No reCAPTCHA enterprise script loaded."))}return new Promise(((e,r)=>{(async function(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise((async(t,n)=>
2{$(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then((r=>{if(void 0!==r.recaptchaKey){const n=new Y(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}n(new Error("recaptcha Enterprise site key undefined"))})).catch((e=>{n(e)}))}))})(this.auth).then((o=>{if(!t&&K(window.grecaptcha))n(o,e,r);else{if("undefined"==typeof window)return void r(new Error("RecaptchaVerifier is only supported in browser"));let t=Le.recaptchaEnterpriseScript;0!==t.length&&(t+=o),De(t).then((()=>{n(o,e,r)})).catch((e=>{r(e)}))}})).catch((e=>{r(e)}))}))}}async function Me(e,t,n,r=!1){const o=new Ce(e);let c;try{c=await o.verify(n)}catch(e){c=await o.verify(n,!0)}const l=Object.assign({},t);return r?Object.assign(l,{captchaResp:c}):Object.assign(l,{captchaResponse:c}),Object.assign(l,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(l,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),l}async function Pe(e,t,n,r){var o;if(null===(o=e._getRecaptchaConfig())||void 0===o?void 0:o.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const o=await Me(e,t,n,"getOobCode"===n);return r(e,o)}return r(e,t).catch((async o=>{if("auth/missing-recaptcha-token"===o.code){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const o=await Me(e,t,n,"getOobCode"===n);return r(e,o)}return Promise.reject(o)}))}function Ne(e,t,n){const r=Re(e);A(r._canInitEmulator,r,"emulator-config-failed"),A(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const o=!!(null==n?void 0:n.disableWarnings),c=Ue(t),{host:l,port:d}=function(e){const t=Ue(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",o=/^(\[[^\]]+\])(:|$)/.exec(r);if(o){const e=o[1];return{host:e,port:Fe(r.substr(e.length+1))}}{const[e,t]=r.split(":");return{host:e,port:Fe(t)}}}(t),h=null===d?"":`:${d}`;r.config.emulator={url:`${c}//${l}${h}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:l,port:d,protocol:c.replace(":",""),options:Object.freeze({disableWarnings:o})}),o||function(){function e(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials.");"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function Ue(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function Fe(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class Be{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return I("not implemented")}_getIdTokenResponse(e){return I("not implemented")}_linkToIdToken(e,t){return I("not implemented")}_getReauthenticationResolver(e){return I("not implemented")}}async function je(e,t){return F(e,"POST","/v1/accounts:signUp",t)}async function Ve(e,t){return j(e,"POST","/v1/accounts:signInWithPassword",U(e,t))}class He extends Be{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new He(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new He(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return Pe(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",Ve);case"emailLink":return async function(e,t){return j(e,"POST","/v1/accounts:signInWithEmailLink",U(e,t))}(e,{email:this._email,oobCode:this._password});default:E(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return Pe(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",je);case"emailLink":return async function(e,t){return j(e,"POST","/v1/accounts:signInWithEmailLink",U(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:E(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function We(e,t){return j(e,"POST","/v1/accounts:signInWithIdp",U(e,t))}class qe extends Be{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new qe(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&
2(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):E("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,o=Object(l.c)(t,["providerId","signInMethod"]);if(!n||!r)return null;const c=new qe(n,r);return c.idToken=o.idToken||void 0,c.accessToken=o.accessToken||void 0,c.secret=o.secret,c.nonce=o.nonce,c.pendingToken=o.pendingToken||null,c}_getIdTokenResponse(e){return We(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,We(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,We(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=Object(o.u)(t)}return e}}const Ge={USER_NOT_FOUND:"user-not-found"};class Ke extends Be{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new Ke({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new Ke({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return j(e,"POST","/v1/accounts:signInWithPhoneNumber",U(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const n=await j(e,"POST","/v1/accounts:signInWithPhoneNumber",U(e,t));if(n.temporaryProof)throw G(e,"account-exists-with-different-credential",n);return n}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return j(e,"POST","/v1/accounts:signInWithPhoneNumber",U(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),Ge)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));const{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:o}=e;return n||t||r||o?new Ke({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:o}):null}}class Ye{constructor(e){var t,n,r,c,l,d;const h=Object(o.v)(Object(o.h)(e)),f=null!==(t=h.apiKey)&&void 0!==t?t:null,code=null!==(n=h.oobCode)&&void 0!==n?n:null,v=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=h.mode)&&void 0!==r?r:null);A(f&&code&&v,"argument-error"),this.apiKey=f,this.operation=v,this.code=code,this.continueUrl=null!==(c=h.continueUrl)&&void 0!==c?c:null,this.languageCode=null!==(l=h.languageCode)&&void 0!==l?l:null,this.tenantId=null!==(d=h.tenantId)&&void 0!==d?d:null}static parseLink(link){const e=function(e){const link=Object(o.v)(Object(o.h)(e)).link,t=link?Object(o.v)(Object(o.h)(link)).deep_link_id:null,n=Object(o.v)(Object(o.h)(e)).deep_link_id;return(n?Object(o.v)(Object(o.h)(n)).link:null)||n||t||link||e}(link);try{return new Ye(e)}catch(e){return null}}}
vendor: 6,507 bytes, line 2
2class $e{constructor(){this.providerId=$e.PROVIDER_ID}static credential(e,t){return He._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=Ye.parseLink(t);return A(n,"argument-error"),He._fromEmailAndCode(e,n.code,n.tenantId)}}$e.PROVIDER_ID="password",$e.EMAIL_PASSWORD_SIGN_IN_METHOD="password",$e.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class Qe{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class ze extends Qe{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class Xe extends ze{static credentialFromJSON(e){const t="string"==typeof e?JSON.parse(e):e;return A("providerId"in t&&"signInMethod"in t,"argument-error"),qe._fromParams(t)}credential(e){return this._credential(Object.assign(Object.assign({},e),{nonce:e.rawNonce}))}_credential(e){return A(e.idToken||e.accessToken,"argument-error"),qe._fromParams(Object.assign(Object.assign({},e),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(e){return Xe.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return Xe.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n,oauthTokenSecret:r,pendingToken:o,nonce:c,providerId:l}=e;if(!(n||r||t||o))return null;if(!l)return null;try{return new Xe(l)._credential({idToken:t,accessToken:n,nonce:c,pendingToken:o})}catch(e){return null}}}class Je extends ze{constructor(){super("facebook.com")}static credential(e){return qe._fromParams({providerId:Je.PROVIDER_ID,signInMethod:Je.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Je.credentialFromTaggedObject(e)}static credentialFromError(e){return Je.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Je.credential(e.oauthAccessToken)}catch(e){return null}}}Je.FACEBOOK_SIGN_IN_METHOD="facebook.com",Je.PROVIDER_ID="facebook.com";class Ze extends ze{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return qe._fromParams({providerId:Ze.PROVIDER_ID,signInMethod:Ze.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Ze.credentialFromTaggedObject(e)}static credentialFromError(e){return Ze.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return Ze.credential(t,n)}catch(e){return null}}}Ze.GOOGLE_SIGN_IN_METHOD="google.com",Ze.PROVIDER_ID="google.com";class et extends ze{constructor(){super("github.com")}static credential(e){return qe._fromParams({providerId:et.PROVIDER_ID,signInMethod:et.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return et.credentialFromTaggedObject(e)}static credentialFromError(e){return et.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return et.credential(e.oauthAccessToken)}catch(e){return null}}}et.GITHUB_SIGN_IN_METHOD="github.com",et.PROVIDER_ID="github.com";class tt extends ze{constructor(){super("twitter.com")}static credential(e,t){return qe._fromParams({providerId:tt.PROVIDER_ID,signInMethod:tt.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return tt.credentialFromTaggedObject(e)}static credentialFromError(e){return tt.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return tt.credential(t,n)}catch(e){return null}}}tt.TWITTER_SIGN_IN_METHOD="twitter.com",tt.PROVIDER_ID="twitter.com";class nt{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){const o=await se._fromIdTokenResponse(e,n,r),c=it(n);return new nt({user:o,providerId:c,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=it(n);return new nt({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function it(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class at extends o.c{constructor(e,t,n,r){var o;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,at.prototype),this.customData={appName:e.name,tenantId:null!==(o=e.tenantId)&&void 0!==o?o:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new at(e,t,n,r)}}function ot(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((n=>{if("auth/multi-factor-auth-required"===n.code)throw at._fromErrorAndOperation(e,n,t,r);throw n}))}function st(e){return new Set(e.map((({providerId:e})=>e)).filter((e=>!!e)))}async function ut(e,t){const n=Object(o.l)(e);await lt(!0,n,t);const{providerUserInfo:r}=await async function(e,t){return F(e,"POST","/v1/accounts:update",t)}(n.auth,{idToken:await n.getIdToken(),deleteProvider:[t]}),c=st(r||[]);return n.providerData=n.providerData.filter((e=>c.has(e.providerId))),c.has("phone")||(n.phoneNumber=null),await n.auth._persistUserIfCurrent(n),n}async function ct(e,t,n=!1){const r=await ee(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return nt._forOperation(e,"link",r)}async function lt(e,t,n){await re(t);const code=!1===e?"provider-already-linked":"no-such-provider";A(st(t.providerData).has(n)===e,t.auth,code)}async function ht(e,t,n=!1){const{auth:o}=e;if(Object(r.c)(o.app))return Promise.reject(T(o));const c="reauthenticate";try{const r=await ee(e,ot(o,c,t,e),n);A(r.idToken,o,"internal-error");const l=J(r.idToken);A(l,o,"internal-error");const{sub:d}=l;return A(e.uid===d,o,"user-mismatch"),nt._forOperation(e,c,r)}catch(e){throw"auth/user-not-found"===(null==e?void 0:e.code)&&E(o,"user-mismatch"),e}}async function ft(e,t,n=!1){if(Object(r.c)(e.app))return Promise.reject(T(e));
vendor: 7,556 bytes, line 2
2const o="signIn",c=await ot(e,o,t),l=await nt._fromIdTokenResponse(e,o,c);return n||await e._updateCurrentUser(l.user),l}async function pt(e,t){return ft(Re(e),t)}async function vt(e,t){if(Object(r.c)(e.app))return Promise.reject(T(e));const n=Re(e),o=await async function(e,t){return j(e,"POST","/v1/accounts:signInWithCustomToken",U(e,t))}(n,{token:t,returnSecureToken:!0}),c=await nt._fromIdTokenResponse(n,"signIn",o);return await n._updateCurrentUser(c.user),c}async function mt(e){const t=Re(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}function gt(e,t,n){return Object(r.c)(e.app)?Promise.reject(T(e)):pt(Object(o.l)(e),$e.credential(t,n)).catch((async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&mt(e),t}))}class yt{constructor(e,t,n={}){this.isNewUser=e,this.providerId=t,this.profile=n}}class bt extends yt{constructor(e,t,n,r){super(e,t,n),this.username=r}}class Et extends yt{constructor(e,t){super(e,"facebook.com",t)}}class _t extends bt{constructor(e,t){super(e,"github.com",t,"string"==typeof(null==t?void 0:t.login)?null==t?void 0:t.login:null)}}class kt extends yt{constructor(e,t){super(e,"google.com",t)}}class Tt extends bt{constructor(e,t,n){super(e,"twitter.com",t,n)}}function wt(e){const{user:t,_tokenResponse:n}=e;return t.isAnonymous&&!n?{providerId:null,isNewUser:!1,profile:null}:function(e){var t,n;if(!e)return null;const{providerId:r}=e,o=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},c=e.isNewUser||"identitytoolkit#SignupNewUserResponse"===e.kind;if(!r&&(null==e?void 0:e.idToken)){const r=null===(n=null===(t=J(e.idToken))||void 0===t?void 0:t.firebase)||void 0===n?void 0:n.sign_in_provider;if(r)return new yt(c,"anonymous"!==r&&"custom"!==r?r:null)}if(!r)return null;switch(r){case"facebook.com":return new Et(c,o);case"github.com":return new _t(c,o);case"google.com":return new kt(c,o);case"twitter.com":return new Tt(c,o,e.screenName||null);case"custom":case"anonymous":return new yt(c,null);default:return new yt(c,r,o)}}(n)}function St(e,t,n,r){return Object(o.l)(e).onAuthStateChanged(t,n,r)}function At(e){return Object(o.l)(e).signOut()}new WeakMap;const It="__sak";class Rt{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(It,"1"),this.storage.removeItem(It),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class Ot extends Rt{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){const e=Object(o.m)();return me(e)||ke(e)}()&&function(){try{return!(!window||window===window.top)}catch(e){return!1}}(),this.fallbackToPolling=Te(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,n)=>{this.notifyListeners(e,n)}));const n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const r=this.storage.getItem(n);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}const r=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},c=this.storage.getItem(n);Object(o.q)()&&10===document.documentMode&&c!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const e of Array.from(n))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}Ot.type="LOCAL";const Lt=Ot;class Dt extends Rt{constructor(){super((()=>window.sessionStorage),"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Dt.type="SESSION";const xt=Dt;class Ct{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find((t=>t.isListeningto(e)));if(t)return t;const n=new Ct(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:r,data:data}=t.data,o=this.handlersMap[r];if(!(null==o?void 0:o.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});const c=Array.from(o).map((async e=>e(t.origin,data))),l=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(e){return{fulfilled:!1,reason:e}}})))}(c);t.ports[0].postMessage({status:"done",eventId:n,eventType:r,response:l})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function Mt(e="",t=10){let n="";for(let i=0;i<t;i++)n+=Math.floor(10*Math.random());return e+n}Ct.receivers=[];class Pt{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,data,t=50){const n="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!n)throw new Error("connection_unavailable");let r,o;return new Promise(((c,l)=>{const d=Mt("",20);n.port1.start();const h=setTimeout((()=>{l(new Error("unsupported_event"))}),t);o={messageChannel:n,onMessage(e){const t=e;if(t.data.eventId===d)switch(t.data.status){case"ack":clearTimeout(h),r=setTimeout((()=>{l(new Error("timeout"))}),3e3);break;case"done":clearTimeout(r),c(t.data.response);break;default:clearTimeout(h),clearTimeout(r),l(new Error("invalid_response"))}}},this.handlers.add(o),n.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:d,data:data},[n.port2])})).finally((()=>{o&&this.removeMessageHandler(o)}))}}function Nt(){return window}
vendor: 4,941 bytes, line 2
2function Ut(){return void 0!==Nt().WorkerGlobalScope&&"function"==typeof Nt().importScripts}const Ft="firebaseLocalStorageDb",Bt="firebaseLocalStorage",jt="fbase_key";class Vt{constructor(e){this.request=e}toPromise(){return new Promise(((e,t)=>{this.request.addEventListener("success",(()=>{e(this.request.result)})),this.request.addEventListener("error",(()=>{t(this.request.error)}))}))}}function Ht(e,t){return e.transaction([Bt],t?"readwrite":"readonly").objectStore(Bt)}function Wt(){const e=indexedDB.open(Ft,1);return new Promise(((t,n)=>{e.addEventListener("error",(()=>{n(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(Bt,{keyPath:jt})}catch(e){n(e)}})),e.addEventListener("success",(async()=>{const n=e.result;n.objectStoreNames.contains(Bt)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(Ft);return new Vt(e).toPromise()}(),t(await Wt()))}))}))}async function qt(e,t,n){const r=Ht(e,!0).put({[jt]:t,value:n});return new Vt(r).toPromise()}function Gt(e,t){const n=Ht(e,!0).delete(t);return new Vt(n).toPromise()}class Kt{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then((()=>{}),(()=>{}))}async _openDb(){return this.db||(this.db=await Wt()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Ut()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Ct._getInstance(Ut()?self:null),this.receiver._subscribe("keyChanged",(async(e,data)=>({keyProcessed:(await this._poll()).includes(data.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new Pt(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Wt();return await qt(e,It,"1"),await Gt(e,It),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite((async()=>(await this._withRetries((n=>qt(n,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const n=Ht(e,!1).get(t),data=await new Vt(n).toPromise();return void 0===data?null:data.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>Gt(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=Ht(e,!1).getAll();return new Vt(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;if(0!==e.length)for(const{fbase_key:r,value:o}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(o)&&(this.notifyListeners(r,o),t.push(r));for(const e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((async()=>this._poll()),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}Kt.type="LOCAL";const Yt=Kt;xe("rcb"),new x(3e4,6e4);const $t="recaptcha";async function Qt(e,t,n){var r;const o=await n.verify();try{let c;if(A("string"==typeof o,e,"argument-error"),A(n.type===$t,e,"argument-error"),c="string"==typeof t?{phoneNumber:t}
vendor: 11,238 bytes, line 2
2:t,"session"in c){const t=c.session;if("phoneNumber"in c){A("enroll"===t.type,e,"internal-error");return(await function(e,t){return F(e,"POST","/v2/accounts/mfaEnrollment:start",U(e,t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:c.phoneNumber,recaptchaToken:o}})).phoneSessionInfo.sessionInfo}{A("signin"===t.type,e,"internal-error");const n=(null===(r=c.multiFactorHint)||void 0===r?void 0:r.uid)||c.multiFactorUid;A(n,e,"missing-multi-factor-info");return(await function(e,t){return F(e,"POST","/v2/accounts/mfaSignIn:start",U(e,t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:o}})).phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return F(e,"POST","/v1/accounts:sendVerificationCode",U(e,t))}(e,{phoneNumber:c.phoneNumber,recaptchaToken:o});return t}}finally{n._reset()}}class zt{constructor(e){this.providerId=zt.PROVIDER_ID,this.auth=Re(e)}verifyPhoneNumber(e,t){return Qt(this.auth,e,Object(o.l)(t))}static credential(e,t){return Ke._fromVerification(e,t)}static credentialFromResult(e){const t=e;return zt.credentialFromTaggedObject(t)}static credentialFromError(e){return zt.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:t,temporaryProof:n}=e;return t&&n?Ke._fromTokenResponse(t,n):null}}function Xt(e,t){return t?ce(t):(A(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}zt.PROVIDER_ID="phone",zt.PHONE_SIGN_IN_METHOD="phone";class Jt extends Be{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return We(e,this._buildIdpRequest())}_linkToIdToken(e,t){return We(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return We(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function Zt(e){return ft(e.auth,new Jt(e),e.bypassAuthState)}function en(e){const{auth:t,user:n}=e;return A(n,t,"internal-error"),ht(n,new Jt(e),e.bypassAuthState)}async function tn(e){const{auth:t,user:n}=e;return A(n,t,"internal-error"),ct(n,new Jt(e),e.bypassAuthState)}class nn{constructor(e,filter,t,n,r=!1){this.auth=e,this.resolver=t,this.user=n,this.bypassAuthState=r,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(filter)?filter:[filter]}execute(){return new Promise((async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:r,tenantId:o,error:c,type:l}=e;if(c)return void this.reject(c);const d={auth:this.auth,requestUri:t,sessionId:n,tenantId:o||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(l)(d))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Zt;case"linkViaPopup":case"linkViaRedirect":return tn;case"reauthViaPopup":case"reauthViaRedirect":return en;default:E(this.auth,"internal-error")}}resolve(e){R(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){R(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}const rn=new x(2e3,1e4);async function an(e,t,n){if(Object(r.c)(e.app))return Promise.reject(_(e,"operation-not-supported-in-this-environment"));const o=Re(e);w(e,t,Qe);const c=Xt(o,n);return new sn(o,"signInViaPopup",t,c).executeNotNull()}async function on(e,t,n){const r=Object(o.l)(e);w(r.auth,t,Qe);const c=Xt(r.auth,n);return new sn(r.auth,"linkViaPopup",t,c,r).executeNotNull()}class sn extends nn{constructor(e,filter,t,n,r){super(e,filter,n,r),this.provider=t,this.authWindow=null,this.pollId=null,sn.currentPopupAction&&sn.currentPopupAction.cancel(),sn.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return A(e,this.auth,"internal-error"),e}async onExecution(){R(1===this.filter.length,"Popup operations only handle one event");const e=Mt();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch((e=>{this.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(e=>{e||this.reject(_(this.auth,"web-storage-unsupported"))})),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(_(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,sn.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(_(this.auth,"popup-closed-by-user"))}),8e3):this.pollId=window.setTimeout(e,rn.get())};e()}}sn.currentPopupAction=null;const un=new Map;class cn extends nn{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=un.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=fn(t),r=hn(e);if(!await r._isAvailable())return!1;const o="true"===await r._get(n);return await r._remove(n),o}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}un.set(this.auth._key(),e)}return this.bypassAuthState||un.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}async function ln(e,t){return hn(e)._set(fn(t),"true")}function dn(e,t){un.set(e._key(),t)}function hn(e){return ce(e._redirectPersistence)}function fn(e){return he("pendingRedirect",e.config.apiKey,e.name)}function pn(e,t,n){return async function(e,t,n){if(Object(r.c)(e.app))return Promise.reject(T(e));const o=Re(e);w(e,t,Qe),await o._initializationPromise;const c=Xt(o,n);return await ln(c,o),c._openRedirect(o,t,"signInViaRedirect")}(e,t,n)}function vn(e,t,n){return async function(e,t,n){const r=Object(o.l)(e);w(r.auth,t,Qe),await r.auth._initializationPromise;const c=Xt(r.auth,n);await lt(!1,r,t.providerId),await ln(c,r.auth);const l=await yn(r);return c._openRedirect(r.auth,t,"linkViaRedirect",l)}(e,t,n)}async function mn(e,t){return await Re(e)._initializationPromise,gn(e,t,!1)}async function gn(e,t,n=!1){if(Object(r.c)(e.app))return Promise.reject(T(e));const o=Re(e),c=Xt(o,t),l=new cn(o,c,n),d=await l.execute();return d&&!n&&(delete d.user._redirectEventId,await o._persistUserIfCurrent(d.user),await o._setRedirectUser(null,t)),d}async function yn(e){const t=Mt(`${e.uid}:::`);return e._redirectEventId=t,await e.auth._setRedirectUser(e),await e.auth._persistUserIfCurrent(e),t}class bn{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach((n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return _n(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!_n(e)){const code=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(_(this.auth,code))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(En(e))}saveEventToCache(e){this.cachedEventUids.add(En(e)),this.lastProcessedEventTime=Date.now()}}function En(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function _n({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null==t?void 0:t.code)}const kn=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Tn=/^https?/;async function wn(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e,t={}){return F(e,"GET","/v1/projects",t)}(e);for(const e of t)try{if(Sn(e))return}catch(e){}E(e,"unauthorized-domain")}function Sn(e){const t=O(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const o=new URL(e);return""===o.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&o.hostname===r}if(!Tn.test(n))return!1;if(kn.test(e))return r===e;const o=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(r)}const An=new x(3e4,6e4);function In(){const e=Nt().___jsl;if(null==e?void 0:e.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let i=0;i<e.CP.length;i++)e.CP[i]=null}function Rn(e){return new Promise(((t,n)=>{var r,o,c;function l(){In(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{In(),n(_(e,"network-request-failed"))},timeout:An.get()})}if(null===(o=null===(r=Nt().gapi)||void 0===r?void 0:r.iframes)||void 0===o?void 0:o.Iframe)t(gapi.iframes.getContext());else{if(!(null===(c=Nt().gapi)||void 0===c?void 0:c.load)){const t=xe("iframefcb");return Nt()[t]=()=>{gapi.load?l():n(_(e,"network-request-failed"))},De(`${Le.gapiScript}?onload=${t}`).catch((e=>n(e)))}l()}})).catch((e=>{throw On=null,e}))}let On=null;const Ln=new x(5e3,15e3),Dn={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},xn=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Cn(e){const t=e.config;A(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?C(t,"emulator/auth/iframe"):`https://${e.config.authDomain}
2/__/auth/iframe`,c={apiKey:t.apiKey,appName:e.name,v:r.a},l=xn.get(e.config.apiHost);l&&(c.eid=l);const d=e._getFrameworks();return d.length&&(c.fw=d.join(",")),`${n}?${Object(o.u)(c).slice(1)}`}async function Mn(e){const t=await function(e){return On=On||Rn(e),On}(e),n=Nt().gapi;return A(n,e,"internal-error"),t.open({where:document.body,url:Cn(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Dn,dontclear:!0},(iframe=>new Promise((async(t,n)=>{await iframe.restyle({setHideOnLeave:!1});const r=_(e,"network-request-failed"),o=Nt().setTimeout((()=>{n(r)}),Ln.get());function c(){Nt().clearTimeout(o),t(iframe)}iframe.ping(c).then(c,(()=>{n(r)}))}))))}const Pn={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Nn{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}function Un(e,t,n,r=500,c=600){const l=Math.max((window.screen.availHeight-c)/2,0).toString(),d=Math.max((window.screen.availWidth-r)/2,0).toString();let h="";const f=Object.assign(Object.assign({},Pn),{width:r.toString(),height:c.toString(),top:l,left:d}),v=Object(o.m)().toLowerCase();n&&(h=ge(v)?"_blank":n),ve(v)&&(t=t||"http://localhost",f.scrollbars="yes");const m=Object.entries(f).reduce(((e,[t,n])=>`${e}${t}=${n},`),"");if(function(e=Object(o.m)()){var t;return ke(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(v)&&"_self"!==h)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",h),new Nn(null);const y=window.open(t||"",h,m);A(y,e,"popup-blocked");try{y.focus()}catch(e){}return new Nn(y)}const Fn="__/auth/handler",Bn="emulator/auth/handler",jn=encodeURIComponent("fac");async function Vn(e,t,n,c,l,d){A(e.config.authDomain,e,"auth-domain-config-required"),A(e.config.apiKey,e,"invalid-api-key");const h={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:c,v:r.a,eventId:l};if(t instanceof Qe){t.setDefaultLanguage(e.languageCode),h.providerId=t.providerId||"",Object(o.p)(t.getCustomParameters())||(h.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(d||{}))h[e]=t}if(t instanceof ze){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(h.scopes=e.join(","))}e.tenantId&&(h.tid=e.tenantId);const f=h;for(const e of Object.keys(f))void 0===f[e]&&delete f[e];const v=await e._getAppCheckToken(),m=v?`#${jn}=${encodeURIComponent(v)}`:"";return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${Fn}`;return C(e,Bn)}(e)}?${Object(o.u)(f).slice(1)}${m}`}const Hn="webStorageSupport";const Wn=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=xt,this._completeRedirectFn=gn,this._overrideRedirectResult=dn}async _openPopup(e,t,n,r){var o;R(null===(o=this.eventManagers[e._key()])||void 0===o?void 0:o.manager,"_initialize() not called before _openPopup()");return Un(e,await Vn(e,t,n,O(),r),Mt())}async _openRedirect(e,t,n,r){await this._originValidation(e);return function(e){Nt().location.href=e}(await Vn(e,t,n,O(),r)),new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(R(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch((()=>{delete this.eventManagers[t]})),n}async initAndGetManager(e){const iframe=await Mn(e),t=new bn(e);return iframe.register("authEvent",(n=>{A(null==n?void 0:n.authEvent,e,"invalid-auth-event");return{status:t.onEvent(n.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:t},this.iframes[e._key()]=iframe,t}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(Hn,{type:Hn},(n=>{var r;const o=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r.webStorageSupport;void 0!==o&&t(!!o),E(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=wn(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return Te()||me()||ke()}};var qn="@firebase/auth",Gn="1.7.2";class Kn{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged((t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){A(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}const Yn=Object(o.k)("authIdTokenMaxAge")||300;let $n=null;function Qn(e=Object(r.e)()){const t=Object(r.b)(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=Object(r.b)(e,"auth");if(n.isInitialized()){const e=n.getImmediate(),r=n.getOptions();if(Object(o.g)(r,null!=t?t:{}))return e;E(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Wn,persistence:[Yt,Lt,xt]}),c=Object(o.k)("authTokenSyncURL");if(c&&"boolean"==typeof isSecureContext&&isSecureContext){const e=new URL(c,location.origin);if(location.origin===e.origin){const t=(l=e.toString(),async e=>{const t=e&&await e.getIdTokenResult(),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>Yn)return;const r=null==t?void 0:t.token;$n!==r&&($n=r,await fetch(l,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});!function(e,t,n){Object(o.l)(e).beforeAuthStateChanged(t,n)}(n,t,(()=>t(n.currentUser))),function(e,t,n,r){Object(o.l)(e).onIdTokenChanged(t,n,r)}(n,(e=>t(e)))}}var l;const d=Object(o.j)("auth");return d&&Ne(n,`http://${d}`),n}var zn;Le={loadJS:e=>
2new Promise(((t,n)=>{const r=document.createElement("script");var o,c;r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=_("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",(null!==(c=null===(o=document.getElementsByTagName("head"))||void 0===o?void 0:o[0])&&void 0!==c?c:document).appendChild(r)})),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},zn="Browser",Object(r.d)(new d.a("auth",((e,{options:t})=>{const n=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:c,authDomain:l}=n.options;A(c&&!c.includes(":"),"invalid-api-key",{appName:n.name});const d={apiKey:c,authDomain:l,clientPlatform:zn,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:we(zn)},h=new Ie(n,r,o,d);return function(e,t){const n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(ce);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(h,t),h}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,n)=>{e.getProvider("auth-internal").initialize()}))),Object(r.d)(new d.a("auth-internal",(e=>(e=>new Kn(e))(Re(e.getProvider("auth").getImmediate()))),"PRIVATE").setInstantiationMode("EXPLICIT")),Object(r.g)(qn,Gn,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(zn)),Object(r.g)(qn,Gn,"esm2017")},252:function(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,"a",(function(){return r}))},253:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return"object"==r(e)&&null!==e}n.d(t,"a",(function(){return o}))},254:function(e,t,n){"use strict";function r(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,o=0,c=null,i=0;i<e.length;++i)switch(e.charCodeAt(i)){case 13:10===e.charCodeAt(i+1)&&++i;case 10:n=!1,r=!0,o=0;break;case 9:case 32:++o;break;default:r&&!n&&(null===c||o<c)&&(c=o),r=!1}return null!==(t=c)&&void 0!==t?t:0}(e);if(0!==n)for(var i=1;i<t.length;i++)t[i]=t[i].slice(n);for(var r=0;r<t.length&&o(t[r]);)++r;for(var c=t.length;c>r&&o(t[c-1]);)--c;return t.slice(r,c).join("\n")}function o(e){for(var i=0;i<e.length;++i)if(" "!==e[i]&&"\t"!==e[i])return!1;return!0}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),o=" "===e[0]||"\t"
2===e[0],c='"'===e[e.length-1],l="\\"===e[e.length-1],d=!r||c||l||n,h="";return!d||r&&o||(h+="\n"+t),h+=t?e.replace(/\n/g,"\n"+t):e,d&&(h+="\n"),'"""'+h.replace(/"""/g,'\\"""')+'"""'}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return c}))},260:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(48),o=n(263),c=n(480);function l(e){return new o.a((function(t,n){return new c.a((function(r){var sub,o,c;try{sub=n(t).subscribe({next:function(l){l.errors&&(c=e({graphQLErrors:l.errors,response:l,operation:t,forward:n}))?o=c.subscribe({next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r)}):r.next(l)},error:function(l){(c=e({operation:t,networkError:l,graphQLErrors:l&&l.result&&l.result.errors,forward:n}))?o=c.subscribe({next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r)}):r.error(l)},complete:function(){c||r.complete.bind(r)()}})}catch(o){e({networkError:o,operation:t,forward:n}),r.error(o)}return function(){sub&&sub.unsubscribe(),o&&sub.unsubscribe()}}))}))}!function(e){function t(t){var n=e.call(this)||this;return n.link=l(t),n}Object(r.b)(t,e),t.prototype.request=function(e,t){return this.link.request(e,t)}}(o.a)},261:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return d}));n(134);const r=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function o(e,t=!1){const{host:n,path:path,pass:r,port:o,projectId:c,protocol:l,publicKey:d}=e;return`${l}://${d}${t&&r?`:${r}`:""}@${n}${o?`:${o}`:""}/${path?`${path}/`:path}${c}`}function c(e){const t=r.exec(e);if(!t)return void console.error(`Invalid Sentry Dsn: ${e}`);const[n,o,c="",d,h="",f]=t.slice(1);let path="",v=f;const m=v.split("/");if(m.length>1&&(path=m.slice(0,-1).join("/"),v=m.pop()),v){const e=v.match(/^\d+/);e&&(v=e[0])}return l({host:d,pass:c,path:path,projectId:v,port:h,protocol:n,publicKey:o})}function l(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function d(e){const t="string"==typeof e?c(e):l(e);if(t)return t}},263:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(48),o=n(36),c=n(480);function l(e){return null!==e&&"object"==typeof e}var d=["connection","include","skip","client","rest","export"],h=(Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var o={};return r.forEach((function(e){o[e]=t[e]})),n.connection.key+"("+h(o)+")"}return n.connection.key}var c=e;if(t){var l=h(t);c+="("+l+")"}return n&&Object.keys(n).forEach((function(e){-1===d.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?c+="@"+e+"("+h(n[e])+")":c+="@"+e)})),c}),{setStringify:function(s){var e=h;return h=s,e}}),function(e){return JSON.stringify(e,f)});function f(e,t){return l(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function v(e,t){return t?t(e):c.a.of()}function m(e){return"function"==typeof e?new _(e):e}function y(link){return link.request.length<=1}var E=function(e){function t(t,link){var n=e.call(this,t)||this;return n.link=link,n}return Object(r.b)(t,e),t}(Error),_=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return c.a.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(m).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var o=m(n),l=m(r||new e(v));return y(o)&&y(l)?new e((function(e){return t(e)?o.request(e)||c.a.of():l.request(e)||c.a.of()})):new e((function(e,n){return t(e)?o.request(e,n)||c.a.of():l.request(e,n)||c.a.of()}))},e.execute=function(link,e){return link.request(function(e,t){var n=Object(r.a)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"==typeof e?Object(r.a)(Object(r.a)({},n),e(n)):Object(r.a)(Object(r.a)({},n),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return Object(r.a)({},n)}}),t}(e.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?t.query.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var c=r[n];if(t.indexOf(c)<0)throw __DEV__?new o.a("illegal argument: "+c):new o.a(26)}return e}(e))))||c.a.of()},e.concat=function(t,n){var r=m(t);if(y(r))return __DEV__&&o.b.warn(new E("You are calling concat on a terminating link, which will have no effect",r)),r;var l=m(n);return y(l)?new e((function(e){return r.request(e,(function(e){return l.request(e)||c.a.of()}))||c.a.of()})):new e((function(e,t){return r.request(e,(function(e){return l.request(e,t)||c.a.of()}))||c.a.of()}))},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(v)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new o.a("request is not implemented"):new o.a(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}()},297:function(e,t,n){"use strict";var r=n(298),o=n(714);function c(e,i){return 55296==(64512&e.charCodeAt(i))&&(!(i<0||i+1>=e.length)&&56320==(64512&e.charCodeAt(i+1)))}function l(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function d(e){return 1===e.length?"0"+e:e}function h(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var p=0,i=0;i<e.length;i++){var r=e.charCodeAt(i);r<128?n[p++]=r:r<2048?(n[p++]=r>>6|192,n[p++]=63&r|128):c(e,i)?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++i)),n[p++]=r>>18|240,n[p++]=r>>12&63|128,n[p++]=r>>6&63|128,n[p++]=63&r|128):(n[p++]=r>>12|224,n[p++]=r>>6&63|128,n[p++]=63&r|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",i=0;i<e.length;i++)t+=d(e[i].toString(16));return t},t.htonl=l,t.toHex32=function(e,t){for(var n="",i=0;i<e.length;i++){var r=e[i];"little"===t&&(r=l(r)),n+=h(r.toString(16))}return n},t.zero2=d,t.zero8=h,t.join32=function(e,t,n,o){var c=n-t;r(c%4==0);for(var l=new Array(c/4),i=0,d=t;i<l.length;i++,d+=4){var h;
2h="big"===o?e[d]<<24|e[d+1]<<16|e[d+2]<<8|e[d+3]:e[d+3]<<24|e[d+2]<<16|e[d+1]<<8|e[d],l[i]=h>>>0}return l},t.split32=function(e,t){for(var n=new Array(4*e.length),i=0,r=0;i<e.length;i++,r+=4){var o=e[i];"big"===t?(n[r]=o>>>24,n[r+1]=o>>>16&255,n[r+2]=o>>>8&255,n[r+3]=255&o):(n[r+3]=o>>>24,n[r+2]=o>>>16&255,n[r+1]=o>>>8&255,n[r]=255&o)}return n},t.rotr32=function(e,b){return e>>>b|e<<32-b},t.rotl32=function(e,b){return e<<b|e>>>32-b},t.sum32=function(a,b){return a+b>>>0},t.sum32_3=function(a,b,e){return a+b+e>>>0},t.sum32_4=function(a,b,e,t){return a+b+e+t>>>0},t.sum32_5=function(a,b,e,t,n){return a+b+e+t+n>>>0},t.sum64=function(e,t,n,r){var o=e[t],c=r+e[t+1]>>>0,l=(c<r?1:0)+n+o;e[t]=l>>>0,e[t+1]=c},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,c,l,dl){var d=0,h=t;return d+=(h=h+r>>>0)<t?1:0,d+=(h=h+c>>>0)<c?1:0,e+n+o+l+(d+=(h=h+dl>>>0)<dl?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,c,l,dl){return t+r+c+dl>>>0},t.sum64_5_hi=function(e,t,n,r,o,c,l,dl,d,h){var f=0,v=t;return f+=(v=v+r>>>0)<t?1:0,f+=(v=v+c>>>0)<c?1:0,f+=(v=v+dl>>>0)<dl?1:0,e+n+o+l+d+(f+=(v=v+h>>>0)<h?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,c,l,dl,d,h){return t+r+c+dl+h>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},298:function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},299:function(e,t,n){"use strict";e.exports=function(e){var t=e.uri,n=e.name,r=e.type;this.uri=t,this.name=n,this.type=r}},3:function(e,t,n){!function(e,t,n,r,o,c){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(t),h=l(n);h.default.registerHooks(["beforeRouteEnter","beforeRouteUpdate","beforeRouteLeave","asyncData","fetch","fetchOnServer","head","key","layout","loading","middleware","scrollToTop","transition","validate","watchQuery","meta"]);var f=/\B([A-Z])/g,v=function(e){return e.replace(f,"-$1").toLowerCase()};function m(e,t){return function(n,r,o){r=v(r);var c=o.value;o.value=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(!1!==c.apply(this,n))if(t){if("function"!=typeof this[t])throw new TypeError("must be a method name");this.$off(e||r,this[t])}else e?this.$off(e||r):this.$off()}}}function y(e){return n.createDecorator((function(t,n){var r=v(n);"function"!=typeof t.created&&(t.created=function(){});var o=t.created;t.created=function(){o(),void 0!==t.methods&&this.$on(e||r,t.methods[n])}}))}function E(e){return n.createDecorator((function(t,n){var r=v(n);"function"!=typeof t.created&&(t.created=function(){});var o=t.created;t.created=function(){o(),void 0!==t.methods&&this.$once(e||r,t.methods[n])}}))}function _(e){return function(t,n,r){var o=r.value;r.value=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!1!==o.apply(this,t)){if("function"!=typeof this[e])throw new TypeError("must be a method name");this.$nextTick(this[e])}}}}Object.defineProperty(e,"Vue",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"Component",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"mixins",{enumerable:!0,get:function(){return n.mi
2xins}}),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),Object.defineProperty(e,"MutationAction",{enumerable:!0,get:function(){return r.MutationAction}}),Object.defineProperty(e,"VuexAction",{enumerable:!0,get:function(){return r.Action}}),Object.defineProperty(e,"VuexModule",{enumerable:!0,get:function(){return r.VuexModule}}),Object.defineProperty(e,"VuexMutation",{enumerable:!0,get:function(){return r.Mutation}}),Object.defineProperty(e,"getModule",{enumerable:!0,get:function(){return r.getModule}}),Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"Getter",{enumerable:!0,get:function(){return o.Getter}}),Object.defineProperty(e,"Mutation",{enumerable:!0,get:function(){return o.Mutation}}),Object.defineProperty(e,"State",{enumerable:!0,get:function(){return o.State}}),Object.defineProperty(e,"namespace",{enumerable:!0,get:function(){return o.namespace}}),Object.defineProperty(e,"Emit",{enumerable:!0,get:function(){return c.Emit}}),Object.defineProperty(e,"Inject",{enumerable:!0,get:function(){return c.Inject}}),Object.defineProperty(e,"InjectReactive",{enumerable:!0,get:function(){return c.InjectReactive}}),Object.defineProperty(e,"Model",{enumerable:!0,get:function(){return c.Model}}),Object.defineProperty(e,"ModelSync",{enumerable:!0,get:function(){return c.ModelSync}}),Object.defineProperty(e,"Prop",{enumerable:!0,get:function(){return c.Prop}}),Object.defineProperty(e,"PropSync",{enumerable:!0,get:function(){return c.PropSync}}),Object.defineProperty(e,"Provide",{enumerable:!0,get:function(){return c.Provide}}),Object.defineProperty(e,"ProvideReactive",{enumerable:!0,get:function(){return c.ProvideReactive}}),Object.defineProperty(e,"Ref",{enumerable:!0,get:function(){return c.Ref}}),Object.defineProperty(e,"VModel",{enumerable:!0,get:function(){return c.VModel}}),Object.defineProperty(e,"Watch",{enumerable:!0,get:function(){return c.Watch}}),e.NextTick=_,e.Off=m,e.On=y,e.Once=E,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(9),n(46),n(78),n(809),n(481))},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return T})),n.d(t,"c",(function(){return _})),n.d(t,"d",(function(){return I})),n.d(t,"e",(function(){return y})),n.d(t,"f",(function(){return E})),n.d(t,"g",(function(){return S})),n.d(t,"h",(function(){return w})),n.d(t,"i",(function(){return R}));var r=n(139),o=n(165),c=n(134),l=n(57),d=n(146),h=n(118),f=n(102);const v=100;class m{constructor(e,t=new h.a,n=4){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=h.a.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:Object(r.f)(),o=new Error("Sentry syntheticException");return this._withClient(((r,c)=>{r.captureException(e,{originalException:e,syntheticException:o,...t,event_id:n},c)})),n}captureMessage(e,t,n){const o=this._lastEventId=n&&n.event_id?n.event_id:Object(r.f)(),c=new Error(e);return this._withClient(((r,l)=>{r.captureMessage(e,t,{originalException:e,syntheticException:c,...n,event_id:o},l)})),o}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Object(r.f)();return e.type||(this._lastEventId=n),this._withClient(((r,o)=>{r.captureEvent(e,{...t,event_id:n},o)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:l=null,maxBreadcrumbs:d=v}=r.getOptions&&r.getOptions()||{};if(d<=0)return;const h={timestamp:Object(o.a)(),...e},f=l?Object(c.b)((()=>l(h,t))):h;null!==f&&(r.emit&&r.emit("beforeAddBreadcrumb",f,t),n.addBreadcrumb(f,d))}
2setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=E(this);try{e(this)}finally{E(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(e){return null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&Object(f.a)(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:o=d.a}=n&&n.getOptions()||{},{userAgent:c}=l.a.navigator||{},h=Object(f.b)({release:r,environment:o,user:t.getUser(),...c&&{userAgent:c},...e}),v=t.getSession&&t.getSession();return v&&"ok"===v.status&&Object(f.c)(v,{status:"exited"}),this.endSession(),t.setSession(h),h}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=y().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t)}}function y(){return l.a.__SENTRY__=l.a.__SENTRY__||{extensions:{},hub:void 0},l.a}function E(e){const t=y(),n=I(t);return R(t,e),n}function _(){const e=y();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return k(e)}function k(e=y()){return A(e)&&!I(e).isOlderThan(4)||R(e,new m),I(e)}function T(e,t=k()){if(!A(e)||I(e).isOlderThan(4)){const n=t.getStackTop();R(e,new m(n.client,h.a.clone(n.scope)))}}function w(e){const t=y();t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.acs=e}function S(e,t={}){const n=y();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(e,t):e()}function A(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function I(e){return Object(l.c)("hub",(()=>new m),e)}function R(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}},300:function(e,t,n){"use strict";var r=n(299);e.exports=function(e){return"undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Blob&&e instanceof Blob||e instanceof r}},307:function(e,t,n){"use strict";n.r(t),function(e,r){var o,c=n(466);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var l=Object(c.a)(o);t.default=l}.call(this,n(70),n(295)(e))},308:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){throw new Error("Static Class")}return e.GQL_CONNECTION_INIT="connection_init",e.GQL_CONNECTION_ACK="connection_ack",e.GQL_CONNECTION_ERROR="connection_error",e.GQL_CONNECTION_KEEP_ALIVE="ka",e.GQL_CONNECTION_TERMINATE="connection_terminate",e.GQL_START="start",e.GQL_DATA="data",e.GQL_ERROR="error",e.GQL_COMPLETE="complete",e.GQL_STOP="stop",e.SUBSCRIPTION_START="subscription_start",e.SUBSCRIPTION_DATA="subscription_data",e.SUBSCRIPTION_SUCCESS="subscription_success",e.SUBSCRIPTION_FAIL="subscription_fail",e.SUBSCRIPTION_END="subscription_end",e.INIT="init",e.INIT_SUCCESS="init_success",e.INIT_FAIL="init_fail",e.KEEP_ALIVE="keepalive",e}();t.default=r},310:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return c}));const r=/\(error: (.*)\)/;function o(...e){const t=e.sort(((a,b)=>a[0]-b[0])).map((p=>p[1]));return(e,n=0)=>{const o=[],c=e.split("\n");for(let i=n;i<c.length;i++){const line=c[i];if(line.length>1024)continue;const e=r.test(line)?line.replace(r,"$1"):line;if(!e.match(/\S*Error: /)){for(const n of t){const t=n(e);if(t){o.push(t);break}}if(o.length>=50)break}}return function(e){if(!e.length)return[];const t=e.slice(0,50),n=t[t.length-1].function;n&&/sentryWrapped/.test(n)&&t.pop();t.reverse();const r=t[t.length-1].function;r&&/captureMessage|captureException/.test(r)&&t.pop();return t.map((e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"})))}(o)}}function c(e){return Array.isArray(e)?o(...e):e}const l="<anonymous>";function d(e){try{return e&&"function"==typeof e&&e.name||l}catch(e){return l}}},312:function(e,t,n){"use strict";var r={name:"ClientOnly",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,o=t.props,c=r(),l=c.default;void 0===l&&(l=[]);var d=c.placeholder;return n._isMounted?l:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),o.placeholderTag&&(o.placeholder||d)?e(o.placeholderTag,{class:["client-only-placeholder"]},o.placeholder||d):l.length>0?l.map((function(){return e(!1)})):e(!1))}};e.exports=r},314:function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var o=n(460);function c(){return!Object(o.b)()&&"[object process]"===Object.prototype.toString.call(void 0!==e?e:0)}function l(e,t){return e.require(t)}}).call(this,n(153),n(295)(e))},315:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return h}));var r=n(57);const o=Object(r.b)();function c(){if(!("fetch"in o))return!1;
2try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function l(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function d(){if(!c())return!1;if(l(o.fetch))return!0;let e=!1;const t=o.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=l(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){}return e}function h(){return"ReportingObserver"in o}},316:function(e,t,n){"use strict";(function(e){var r=n(0);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function v(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?f(Object(source),!0).forEach((function(t){h(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):f(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,p){return(E=Object.setPrototypeOf||function(e,p){return e.__proto__=p,e})(e,p)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_(e):t}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function w(e,t,n){return(w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var base=function(object,e){for(;!Object.prototype.hasOwnProperty.call(object,e)&&null!==(object=y(object)););return object}(e,t);if(base){var desc=Object.getOwnPropertyDescriptor(base,t);return desc.get?desc.get.call(n):desc.value}})(e,t,n||e)}function S(e,i){return function(e){if(Array.isArray(e))return e}(e)||function(e,i){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,r=!1,o=void 0;try{for(var c,l=e[Symbol.iterator]();!(n=(c=l.next()).done)&&(t.push(c.value),!i||t.length!==i);n=!0);}catch(e){r=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}return t}(e,i)||I(e,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e||"undefined"!=typeof self&&self;function O(e,t){return e(t={exports:{}},t.exports),t.exports}var L,D=O((function(e,t){!function(e){function t(e,t,n,r){var o,c=!1,l=0;function d(){o&&clearTimeout(o)}function h(){d(),c=!0}function f(){for(var h=arguments.length,f=new Array(h),v=0;v<h;v++)f[v]=arguments[v];var m=this,y=Date.now()-l;function E(){l=Date.now(),n.apply(m,f)}function _(){o=void 0}c||(r&&!o&&E(),d(),void 0===r&&y>e?E():!0!==t&&(o=setTimeout(r?_:E,void 0===r?e-y:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),f.cancel=h,f}function n(e,n,r){return void 0===r?t(e,n,!1):t(e,r,!1!==n)}
2e.debounce=n,e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)}));(L=D)&&L.__esModule&&Object.prototype.hasOwnProperty.call(L,"default")&&L.default;var x=O((function(e,t){var n=t.Globals={};function r(e){return function(t,time){return e(time,t)}}t.throttle=r(D.throttle),t.debounce=r(D.debounce),t.getMergedDefinition=function(e){return n.Vue.util.mergeOptions({},e)},t.reapply=function(e,t){for(;"function"==typeof e;)e=e.call(t);return e},t.omit=function(e,t){return Object.entries(e).filter((function(e){var n=S(e,1)[0];return!t.includes(n)})).reduce((function(e,t){var n=S(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})},t.addGqlError=function(e){e.graphQLErrors&&e.graphQLErrors.length&&(e.gqlError=e.graphQLErrors[0])},t.noop=function(){}})),C=x.Globals,M=x.throttle,P=x.debounce,N=(x.getMergedDefinition,x.reapply),U=x.omit,F=x.addGqlError,B=(x.noop,function(){function e(t,n,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];c(this,e),h(this,"type",null),h(this,"vueApolloSpecialKeys",[]),this.vm=t,this.key=n,this.initialOptions=r,this.options=Object.assign({},r),this._skip=!1,this._pollInterval=null,this._watchers=[],this._destroyed=!1,this.lastApolloOptions=null,o&&this.autostart()}return d(e,[{key:"autostart",value:function(){var e=this;"function"==typeof this.options.skip?this._skipWatcher=this.vm.$watch((function(){return e.options.skip.call(e.vm,e.vm,e.key)}),this.skipChanged.bind(this),{immediate:!0,deep:this.options.deep}):this.options.skip?this._skip=!0:this.start(),"function"==typeof this.options.pollInterval&&(this._pollWatcher=this.vm.$watch(this.options.pollInterval.bind(this.vm),this.pollIntervalChanged.bind(this),{immediate:!0}))}},{key:"pollIntervalChanged",value:function(e,t){e!==t&&(this.pollInterval=e,null==e?this.stopPolling():this.startPolling(e))}},{key:"skipChanged",value:function(e,t){e!==t&&(this.skip=e)}},{key:"pollInterval",get:function(){return this._pollInterval},set:function(e){this._pollInterval=e}},{key:"skip",get:function(){return this._skip},set:function(e){e?this.stop():this.start(),this._skip=e}},{key:"refresh",value:function(){this._skip||(this.stop(),this.start())}},{key:"start",value:function(){var e=this;this.starting=!0;for(var t=function(t,n){var r=n[t];if("function"==typeof e.initialOptions[r]){var o=e.initialOptions[r].bind(e.vm);e.options[r]=o();var c=function(t){e.options[r]=t,e.refresh()};e.vm.$isServer||(c=e.options.throttle?M(c,e.options.throttle):c,c=e.options.debounce?P(c,e.options.debounce):c),e._watchers.push(e.vm.$watch(o,c,{deep:e.options.deep}))}},n=0,r=["query","document","context"];n<r.length;n++)t(n,r);if("function"==typeof this.options.variables){var o=this.executeApollo.bind(this);this.vm.$isServer||(o=this.options.throttle?M(o,this.options.throttle):o,o=this.options.debounce?P(o,this.options.debounce):o),this._watchers.push(this.vm.$watch((function(){return e.options.variables.call(e.vm)}),o,{immediate:!0,deep:this.options.deep}))}else this.executeApollo(this.options.variables)}},{key:"stop",value:function(){for(var e=0,t=this._watchers;e<t.length;e++){(0,t[e])()}this.sub&&(this.sub.unsubscribe(),this.sub=null)}},{key:"generateApolloOptions",value:function(e){var t=U(this.options,this.vueApolloSpecialKeys);return t.variables=e,this.lastApolloOptions=t,t}},{key:"executeApollo",value:function(e){this.starting=!1}},{key:"nextResult",value:function(e){var t=e.error;t&&F(t)}},{key:"callHandlers",value:function(e){for(var t=!1,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(var c=0;c<e.length;c++){var l=e[c];if(l){t=!0;var d=l.apply(this.vm,r);if(void 0!==d&&!d)break}}return t}},{key:"errorHandler",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.callHandlers.apply(this,[[this.options.error,this.vm.$apollo.error,this.vm.$apollo.provider.errorHandler]].concat(t))}},{key:"catchError",value:function(e){if(F(e),!this.errorHandler(e,this.vm,this.key,this.type,this.lastApolloOptions))if(e.graphQLErrors&&0!==e.graphQLErrors.length){console.error("GraphQL execution errors for ".concat(this.t
vendor: 16,384 bytes, line 2
2ype," '").concat(this.key,"'"));for(var t=0,n=e.graphQLErrors;t<n.length;t++){var r=n[t];console.error(r)}}else if(e.networkError)console.error("Error sending the ".concat(this.type," '").concat(this.key,"'"),e.networkError);else{var o;if(console.error("[vue-apollo] An error has occurred for ".concat(this.type," '").concat(this.key,"'")),Array.isArray(e))(o=console).error.apply(o,A(e));else console.error(e)}}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.stop(),this._skipWatcher&&this._skipWatcher())}}]),e}()),j=["variables","watch","update","result","error","loadingKey","watchLoading","skip","throttle","debounce","subscribeToMore","prefetch","manual"],V=function(e){m(n,e);var t=T(n);function n(e,r,o){var l,d=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return c(this,n),e.$data.$apolloData&&!e.$data.$apolloData.queries[r]&&e.$set(e.$data.$apolloData.queries,r,{loading:!1}),h(_(l=t.call(this,e,r,o,!1)),"type","query"),h(_(l),"vueApolloSpecialKeys",j),h(_(l),"_loading",!1),h(_(l),"_linkedSubscriptions",[]),e.$isServer&&(l.firstRun=new Promise((function(e,t){l._firstRunResolve=e,l._firstRunReject=t}))),l.vm.$isServer&&(l.options.fetchPolicy="network-only"),o.manual||(l.hasDataField=Object.prototype.hasOwnProperty.call(l.vm.$data,r),l.hasDataField?Object.defineProperty(l.vm.$data.$apolloData.data,r,{get:function(){return l.vm.$data[r]},enumerable:!0,configurable:!0}):Object.defineProperty(l.vm.$data,r,{get:function(){return l.vm.$data.$apolloData.data[r]},enumerable:!0,configurable:!0})),d&&l.autostart(),l}return d(n,[{key:"client",get:function(){return this.vm.$apollo.getClient(this.options)}},{key:"loading",get:function(){return this.vm.$data.$apolloData&&this.vm.$data.$apolloData.queries[this.key]?this.vm.$data.$apolloData.queries[this.key].loading:this._loading},set:function(e){this._loading!==e&&(this._loading=e,this.vm.$data.$apolloData&&this.vm.$data.$apolloData.queries[this.key]&&(this.vm.$data.$apolloData.queries[this.key].loading=e,this.vm.$data.$apolloData.loading+=e?1:-1))}},{key:"stop",value:function(){w(y(n.prototype),"stop",this).call(this),this.loadingDone(),this.observer&&(this.observer.stopPolling(),this.observer=null)}},{key:"generateApolloOptions",value:function(e){var t=w(y(n.prototype),"generateApolloOptions",this).call(this,e);return this.vm.$isServer&&delete t.pollInterval,t}},{key:"executeApollo",value:function(e){var t=JSON.stringify(e);if(this.sub){if(t===this.previousVariablesJson)return;this.sub.unsubscribe();for(var r=0,o=this._linkedSubscriptions;r<o.length;r++){o[r].stop()}}if(this.previousVariablesJson=t,this.observer=this.vm.$apollo.watchQuery(this.generateApolloOptions(e)),this.startQuerySubscription(),"no-cache"!==this.options.fetchPolicy||this.options.notifyOnNetworkStatusChange){var c=this.retrieveCurrentResult();(this.options.notifyOnNetworkStatusChange||this.observer.getCurrentResult&&!c.loading)&&this.nextResult(c)}w(y(n.prototype),"executeApollo",this).call(this,e);for(var l=0,d=this._linkedSubscriptions;l<d.length;l++){d[l].start()}}},{key:"startQuerySubscription",value:function(){this.sub&&!this.sub.closed||(this.sub=this.observer.subscribe({next:this.nextResult.bind(this),error:this.catchError.bind(this)}))}},{key:"retrieveCurrentResult",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.observer.getCurrentResult?this.observer.getCurrentResult():this.observer.currentResult();return(e||t.loading)&&(this.loading||this.applyLoadingModifier(1),this.loading=!0),t}},{key:"nextResult",value:function(e){w(y(n.prototype),"nextResult",this).call(this,e);var data=e.data,t=e.loading,r=e.error,o=e.errors,c=o&&o.length;if((r||c)&&this.firstRunReject(r),t||this.loadingDone(),c){var l=new Error("GraphQL error: ".concat(o.map((function(e){return e.message})).join(" | ")));Object.assign(l,{graphQLErrors:o,networkError:null}),w(y(n.prototype),"catchError",this).call(this,l)}if("none"!==this.observer.options.errorPolicy||!r&&!c){var d="function"==typeof this.options.result;null==data||(this.options.manual?d||console.error("".concat(this.key," query must have a 'result' hook in manual mode")):"function"==typeof this.options.update?this.setData(this.options.update.call(this.vm,data)):void 0===data[this.key]&&Object.keys(data).length?console.error("Missing ".concat(this.key," attribute on result"),data):this.setData(data[this.key])),d&&this.options.result.call(this.vm,e,this.key)}}},{key:"setData",value:function(e){this.vm.$set(this.hasDataField?this.vm.$data:this.vm.$data.$apolloData.data,this.key,e)}},{key:"catchError",value:function(e){w(y(n.prototype),"catchError",this).call(this,e),this.firstRunReject(e),this.loadingDone(e),this.nextResult(this.observer.getCurrentResult?this.observer.getCurrentResult():this.observer.currentResult()),this.resubscribeToQuery()}},{key:"resubscribeToQuery",value:function(){var e=this.observer.getLastError(),t=this.observer.getLastResult();this.observer.resetLastResults(),this.startQuerySubscription(),Object.assign(this.observer,{lastError:e,lastResult:t})}},{key:"loadingKey",get:function(){return this.options.loadingKey||this.vm.$apollo.loadingKey}},{key:"watchLoading",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.callHandlers.apply(this,[[this.options.watchLoading,this.vm.$apollo.watchLoading,this.vm.$apollo.provider.watchLoading]].concat(t,[this]))}},{key:"applyLoadingModifier",value:function(e){var t=this.loadingKey;t&&"number"==typeof this.vm[t]&&(this.vm[t]+=e),this.watchLoading(1===e,e)}},{key:"loadingDone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.loading&&this.applyLoadingModifier(-1),this.loading=!1,e||this.firstRunResolve()}},{key:"fetchMore",value:function(){var e,t=this;if(this.observer)return this.retrieveCurrentResult(!0),(e=this.observer).fetchMore.apply(e,arguments).then((function(e){return e.loading||t.loadingDone(),e}))}},{key:"subscribeToMore",value:function(){var e;if(this.observer)return{unsubscribe:(e=this.observer).subscribeToMore.apply(e,arguments)}}},{key:"refetch",value:function(e){var t=this;if(e&&(this.options.variables=e),this.observer){var n=this.observer.refetch(e).then((function(e){return e.loading||t.loadingDone(),e}));return this.retrieveCurrentResult(),n}}},{key:"setVariables",value:function(e,t){if(this.options.variables=e,this.observer){var n=this.observer.setVariables(e,t);return this.retrieveCurrentResult(),n}}},{key:"setOptions",value:function(e){if(Object.assign(this.options,e),this.observer){var t=this.observer.setOptions(e);return this.retrieveCurrentResult(),t}}},{key:"startPolling",value:function(){var e;if(this.observer)return(e=this.observer).startPolling.apply(e,arguments)}},{key:"stopPolling",value:function(){var e;if(this.observer)return(e=this.observer).stopPolling.apply(e,arguments)}},{key:"firstRunResolve",value:function(){this._firstRunResolve&&(this._firstRunResolve(),this._firstRunResolve=null)}},{key:"firstRunReject",value:function(e){this._firstRunReject&&(this._firstRunReject(e),this._firstRunReject=null)}},{key:"destroy",value:function(){w(y(n.prototype),"destroy",this).call(this),this.loading&&this.watchLoading(!1,-1),this.loading=!1}}]),n}(B),H=function(e){m(n,e);var t=T(n);function n(){var e;c(this,n);for(var r=arguments.length,o=new Array(r),l=0;l<r;l++)o[l]=arguments[l];return h(_(e=t.call.apply(t,[this].concat(o))),"type","subscription"),h(_(e),"vueApolloSpecialKeys",["variables","result","error","throttle","debounce","linkedQuery"]),e}return d(n,[{key:"executeApollo",value:function(e){var t=JSON.stringify(e);if(this.sub){if(t===this.previousVariablesJson)return;this.sub.unsubscribe()}this.previousVariablesJson=t;var r=this.generateApolloOptions(e);if("function"==typeof r.updateQuery&&(r.updateQuery=r.updateQuery.bind(this.vm)),this.options.linkedQuery){if("function"==typeof this.options.result){var o=this.options.result.bind(this.vm),c=r.updateQuery&&r.updateQuery.bind(this.vm);r.updateQuery=function(){return o.apply(void 0,arguments),c&&c.apply(void 0,arguments)}}this.sub=this.options.linkedQuery.subscribeToMore(r)}else this.observer=this.vm.$apollo.subscribe(r),this.sub=this.observer.subscribe({next:this.nextResult.bind(this),error:this.catchError.bind(this)});w(y(n.prototype),"executeApollo",this).call(this,e)}},{key:"nextResult",value:function(data){w(y(n.prototype),"nextResult",this).call(this,data),"function"==typeof this.options.result&&this.options.result.call(this.vm,data,this.key)}}]),n}(B),W=function(){function e(t){c(this,e),this._apolloSubscriptions=[],this._watchers=[],this.vm=t,this.queries={},this.subscriptions={},this.client=void 0,this.loadingKey=void 0,this.error=void 0}return d(e,[{key:"provider",get:function(){return this.vm.$apolloProvider}},{key:"getClient",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e||!e.client){if("object"===o(this.client))return this.client;if(this.client){if(this.provider.clients){var t=this.provider.clients[this.client];if(!t)throw new Error("[vue-apollo] Missing client '".concat(this.client,"' in 'apolloProvider'"));return t}throw new Error("[vue-apollo] Missing 'clients' options in 'apolloProvider'")}return this.provider.defaultClient}var n=this.provider.clients[e.client];if(!n)throw new Error("[vue-apollo] Missing client '".concat(e.client,"' in 'apolloProvider'"));return n}},{key:"query",value:function(e){return this.getClient(e).query(e)}},{key:"watchQuery",value:function(e){var t=this,n=this.getClient(e).watchQuery(e),r=n.subscribe.bind(n);return n.subscribe=function(e){var sub=r(e);return t._apolloSubscriptions.push(sub),sub},n}},{key:"mutate",value:function(e){return this.getClient(e).mutate(e)}},{key:"subscribe",value:function(e){var t=this;if(!this.vm.$isServer){var n=this.getClient(e).subscribe(e),r=n.subscribe.bind(n);return n.subscribe=function(e){var sub=r(e);return t._apolloSubscriptions.push(sub),sub},n}}},{key:"loading",get:function(){return 0!==this.vm.$data.$apolloData.loading}},{key:"data",get:function(){return this.vm.$data.$apolloData.data}},{key:"addSmartQuery",value:function(e,t){var n=this,r=N(t,this.vm);r.query||(r={query:r});var o,c=this.vm.$options.apollo,l=this.provider.defaultOptions;if(l&&l.$query&&(o=l.$query),c&&c.$query&&(o=v(v({},o||{}),c.$query)),o)for(var d in o)void 0===r[d]&&(r[d]=o[d]);var h=this.queries[e]=new V(this.vm,e,r,!1);if(this.vm.$isServer&&!1===r.prefetch||h.autostart(),!this.vm.$isServer){var f=r.subscribeToMore;f&&(Array.isArray(f)?f.forEach((function(sub,t){n.addSmartSubscription("".concat(e).concat(t),v(v({},sub),{},{linkedQuery:h}))})):this.addSmartSubscription(e,v(v({},f),{},{linkedQuery:h})))}return h}},{key:"addSmartSubscription",value:function(e,t){if(!this.vm.$isServer){t=N(t,this.vm);var n=this.subscriptions[e]=new H(this.vm,e,t,!1);return n.autostart(),t.linkedQuery&&t.linkedQuery._linkedSubscriptions.push(n),n}}},{key:"defineReactiveSetter",value:function(e,t,n){var r=this;this._watchers.push(this.vm.$watch(t,(function(t){r[e]=t}),{immediate:!0,deep:n}))}},{key:"skipAllQueries",set:function(e){for(var t in this.queries)this.queries[t].skip=e}},{key:"skipAllSubscriptions",set:function(e){for(var t in this.subscriptions)this.subscriptions[t].skip=e}},{key:"skipAll",set:function(e){this.skipAllQueries=e,this.skipAllSubscriptions=e}},{key:"destroy",value:function(){for(var e=0,t=this._watchers;e<t.length;e++){(0,t[e])()}for(var n in this.queries)this.queries[n].destroy();for(var r in this.subscriptions)this.subscriptions[r].destroy();this._apolloSubscriptions.forEach((function(sub){sub.unsubscribe()}))}}]),e}(),G=function(){function e(t){if(c(this,e),!t)throw new Error("Options argument required");this.clients=t.clients||{},t.defaultClient&&(this.clients.defaultClient=this.defaultClient=t.defaultClient),this.defaultOptions=t.defaultOptions,this.watchLoading=t.watchLoading,this.errorHandler=t.errorHandler,this.prefetch=t.prefetch}return d(e,[{key:"provide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"$apolloProvider";return console.warn("<ApolloProvider>.provide() is deprecated. Use the 'apolloProvider' option instead with the provider object directly."),h({},e,this)}}]),e}();var K={name:"ApolloQuery",provide:function(){return{getDollarApollo:this.getDollarApollo,getApolloQuery:this.getApolloQuery}},props:{query:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},fetchPolicy:{type:String,default:void 0},pollInterval:{type:Number,default:void 0},notifyOnNetworkStatusChange:{type:Boolean,default:void 0},context:{type:Object,default:void 0},update:{type:Function,default:function(data){return data}},skip:{type:Boolean,default:!1},debounce:{type:Number,default:0},throttle:{type:Number,default:0},clientId:{type:String,default:void 0},deep:{type:Boolean,default:void 0},tag:{type:String,default:"div"},prefetch:{type:Boolean,default:!0},options:{type:Object,default:function(){return{}}}},data:function(){return{result:{data:null,loading:!1,networkStatus:7,error:null},times:0}},watch:{fetchPolicy:function(e){this.$apollo.queries.query.setOptions({fetchPolicy:e})},pollInterval:function(e){this.$apollo.queries.query.setOptions({pollInterval:e})},notifyOnNetworkStatusChange:function(e){this.$apollo.queries.query.setOptions({notifyOnNetworkStatusChange:e})},"$data.$apolloData.loading":function(e){this.$emit("loading",!!e)}},apollo:{$client:function(){return this.clientId},query:function(){return v(v({query:function(){return"function"==typeof this.query?this.query(r.a):this.query},variables:function(){return this.variables},fetchPolicy:this.fetchPolicy,pollInterval:this.pollInterval,debounce:this.debounce,throttle:this.throttle,notifyOnNetworkStatusChange:this.notifyOnNetworkStatusChange,context:function(){return this.context},skip:function(){return this.skip},deep:this.deep,prefetch:this.prefetch},this.options),{},{manual:!0,result:function(e){var t=e,n=t.errors,r=t.loading,o=t.networkStatus,c=e.error;e=Object.assign({},e),n&&n.length&&((c=new Error("Apollo errors occurred (".concat(n.length,")"))).graphQLErrors=n);var data={};r?Object.assign(data,this.$_previousData,e.data):c?Object.assign(data,this.$apollo.queries.query.observer.getLastResult()||{},e.data):(data=e.data,this.$_previousData=e.data);var l=function(data){return data&&Object.keys(data).length>0}(data);this.result={data:l?this.update(data):void 0,fullData:l?data:void 0,loading:r,error:c,networkStatus:o},this.times=++this.$_times,this.$emit("result",this.result)},error:function(e){this.result.loading=!1,this.result.error=e,this.$emit("error",e)}})}},created:function(){this.$_times=0},methods:{getDollarApollo:function(){return this.$apollo},getApolloQuery:function(){return this.$apollo.queries.query}},render:function(e){var t=this.$scopedSlots.default({result:this.result,times:this.times,query:this.$apollo.queries.query,isLoading:this.$apolloData.loading,gqlError:this.result&&this.result.error&&this.result.error.gqlError});return t=Array.isArray(t)?t.concat(this.$slots.default):[t].concat(this.$slots.default),this.tag?e(this.tag,t):t[0]}},Y=0,$={name:"ApolloSubscribeToMore",inject:["getDollarApollo","getApolloQuery"],props:{document:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},updateQuery:{type:Function,default:void 0}},watch:{document:"refresh",variables:"refresh"},created:function(){this.$_key="sub_component_".concat(Y++)},mounted:function(){this.refresh()},beforeDestroy:function(){this.destroy()},methods:{destroy:function(){this.$_sub&&this.$_sub.destroy()},refresh:function(){this.destroy();var e=this.document;"function"==typeof e&&(e=e(r.a)),this.$_sub=this.getDollarApollo().addSmartSubscription(this.$_key,{document:e,variables:this.variables,updateQuery:this.updateQuery,linkedQuery:this.getApolloQuery()})}},render:function(e){return null}},Q={props:{mutation:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},optimisticResponse:{type:Object,default:void 0},update:{type:Function,default:void 0},refetchQueries:{type:Function,default:void 0},clientId:{type:String,default:void 0},tag:{type:String,default:"div"},context:{type:Object,default:void 0}},data:function(){return{loading:!1,error:null}},watch:{loading:function(e){this.$emit("loading",e)}},methods:{mutate:function(
2e){var t=this;this.loading=!0,this.error=null;var n=this.mutation;return"function"==typeof n&&(n=n(r.a)),this.$apollo.mutate(v({mutation:n,client:this.clientId,variables:this.variables,optimisticResponse:this.optimisticResponse,update:this.update,refetchQueries:this.refetchQueries,context:this.context},e)).then((function(e){t.$emit("done",e),t.loading=!1})).catch((function(e){F(e),t.error=e,t.$emit("error",e),t.loading=!1}))}},render:function(e){var t=this.$scopedSlots.default({mutate:this.mutate,loading:this.loading,error:this.error,gqlError:this.error&&this.error.gqlError});return t=Array.isArray(t)?t.concat(this.$slots.default):[t].concat(this.$slots.default),this.tag?e(this.tag,t):t[0]}};function z(e,t){return void 0!==e&&Object.prototype.hasOwnProperty.call(e,t)}function X(){var e=this.$options,t=e.apolloProvider;if(t)this.$apolloProvider="function"==typeof t?t():t;else if(e.parent&&e.parent.$apolloProvider)this.$apolloProvider=e.parent.$apolloProvider;else if(e.provide){var n="function"==typeof e.provide?e.provide.call(this):e.provide;n&&n.$apolloProvider&&(this.$apolloProvider=n.$apolloProvider)}}function J(){var e=this;this.$_apolloInitData={};var t=this.$options.apollo;if(t){var n=function(n){"$"!==n.charAt(0)&&(t[n].manual||z(e.$options.props,n)||z(e.$options.computed,n)||z(e.$options.methods,n)||Object.defineProperty(e,n,{get:function(){return e.$data.$apolloData.data[n]},set:function(t){return e.$_apolloInitData[n]=t},enumerable:!0,configurable:!0}))};for(var r in t)n(r)}}function Z(){var e=this,t=this.$apolloProvider;if(!this._apolloLaunched&&t){this._apolloLaunched=!0;var n=this.$options.apollo;if(n){for(var r in this.$_apolloPromises=[],n.$init||(n.$init=!0,t.defaultOptions&&(n=this.$options.apollo=Object.assign({},t.defaultOptions,n))),ee(this.$apollo,"skipAll",n.$skipAll,n.$deep),ee(this.$apollo,"skipAllQueries",n.$skipAllQueries,n.$deep),ee(this.$apollo,"skipAllSubscriptions",n.$skipAllSubscriptions,n.$deep),ee(this.$apollo,"client",n.$client,n.$deep),ee(this.$apollo,"loadingKey",n.$loadingKey,n.$deep),ee(this.$apollo,"error",n.$error,n.$deep),ee(this.$apollo,"watchLoading",n.$watchLoading,n.$deep),Object.defineProperty(this,"$apolloData",{get:function(){return e.$data.$apolloData},enumerable:!0,configurable:!0}),n)if("$"!==r.charAt(0)){var o=n[r],c=this.$apollo.addSmartQuery(r,o);this.$isServer&&(o=N(o,this),!1===t.prefetch||!1===o.prefetch||!1===n.$prefetch||c.skip||this.$_apolloPromises.push(c.firstRun))}if(n.subscribe&&C.Vue.util.warn("vue-apollo -> `subscribe` option is deprecated. Use the `$subscribe` option instead."),n.$subscribe)for(var l in n.$subscribe)this.$apollo.addSmartSubscription(l,n.$subscribe[l])}}}function ee(e,t,n,r){void 0!==n&&("function"==typeof n?e.defineReactiveSetter(t,n,r):e[t]=n)}function te(){this.$_apollo&&this.$_apollo.destroy()}function ne(e,t){e.mixin(v(v(v({},"1"===t?{init:X}:{}),"2"===t?{data:function(){return{$apolloData:{queries:{},loading:0,data:this.$_apolloInitData}}},beforeCreate:function(){X.call(this),J.call(this)},serverPrefetch:function(){var e=this;if(this.$_apolloPromises)return Promise.all(this.$_apolloPromises).then((function(){te.call(e)})).catch((function(t){return te.call(e),Promise.reject(t)}))}}:{}),{},{created:Z,destroyed:te}))}var re=["$subscribe"];G.install=function e(t,n){if(!e.installed){e.installed=!0,C.Vue=t;var r=t.version.substr(0,t.version.indexOf(".")),o=t.config.optionMergeStrategies.methods;t.config.optionMergeStrategies.apollo=function(e,t,n){if(!e)return t;if(!t)return e;for(var r=Object.assign({},U(e,re),e.data),c=Object.assign({},U(t,re),t.data),map={},i=0;i<re.length;i++){var l=re[i];map[l]=o(e[l],t[l])}return Object.assign(map,o(r,c))},Object.prototype.hasOwnProperty.call(t,"$apollo")||Object.defineProperty(t.prototype,"$apollo",{get:function(){return this.$_apollo||(this.$_apollo=new W(this)),this.$_apollo}}),ne(t,r),"2"===r&&(t.component("ApolloQuery",K),t.component("ApolloQuery",K),t.component("ApolloSubscribeToMore",$),t.component("ApolloSubscribeToMore",$),t.component("ApolloMutation",Q),t.component("ApolloMutation",Q))}},G.version="3.0.7";var ie=null;"undefined"!=typeof window?ie=window.Vue:void 0!==e&&(ie=e.Vue),ie&&ie.use(G),t.a=G}).call(this,n(70))},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return K})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return V})),n.d(t,"d",(function(){return B})),n.d(t,"e",(function(){return $})),n.d(t,"f",(function(){return Y})),n.d(t,"g",(function(){return Q}));var r=n(121),o=n(135),c=n(7);let l,d;const h=new WeakMap,f=new WeakMap,v=new WeakMap,m=new WeakMap,y=new WeakMap;let E={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return f.get(e);if("objectStoreNames"===t)return e.objectStoreNames||v.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return T(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function _(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(d||(d=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(w(this),t),T(h.get(this))}:function(...t){return T(e.apply(w(this),t))}:function(t,...n){const r=e.call(w(this),t,...n);return v.set(r,t.sort?t.sort():[t]),T(r)}}function k(e){return"function"==typeof e?_(e):(e instanceof IDBTransaction&&function(e){if(f.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",c),e.removeEventListener("abort",c)},o=()=>{t(),r()},c=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",c),e.addEventListener("abort",c)}));f.set(e,t)}(e),object=e,(l||(l=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>object instanceof e))?new Proxy(e,E):e);var object}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",c)},o=()=>{t(T(e.result)),r()},c=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",c)}));return t.then((t=>{t instanceof IDBCursor&&h.set(t,e)}
vendor: 3,358 bytes, line 2
2)).catch((()=>{})),y.set(t,e),t}(e);if(m.has(e))return m.get(e);const t=k(e);return t!==e&&(m.set(e,t),y.set(t,e)),t}const w=e=>y.get(e);const S=["get","getKey","getAll","getAllKeys","count"],A=["put","add","delete","clear"],I=new Map;function R(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(I.get(t))return I.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=A.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!S.includes(n))return;const c=async function(e,...t){const c=this.transaction(e,o?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(t.shift())),(await Promise.all([l[n](...t),o&&c.done]))[0]};return I.set(t,c),c}E=(e=>({...e,get:(t,n,r)=>R(t,n)||e.get(t,n,r),has:(t,n)=>!!R(t,n)||e.has(t,n)}))(E);class O{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const component=e.getComponent();return"VERSION"===(null==component?void 0:component.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const L="@firebase/app",D="0.10.2",x=new o.b("@firebase/app"),C="[DEFAULT]",M={[L]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},P=new Map,N=new Map,U=new Map;function F(e,component){try{e.container.addComponent(component)}catch(t){x.debug(`Component ${component.name} failed to register with FirebaseApp ${e.name}`,t)}}function B(component){const e=component.name;if(U.has(e))return x.debug(`There were multiple attempts to register component ${e}.`),!1;U.set(e,component);for(const e of P.values())F(e,component);for(const e of N.values())F(e,component);return!0}function j(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function V(e){return void 0!==e.settings}const H={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
2d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},W=new c.b("app","Firebase",H);class G{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new r.a("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw W.create("app-deleted",{appName:this._name})}}const K="10.11.1";function Y(e,t={}){let n=e;if("object"!=typeof t){t={name:t}}const o=Object.assign({name:C,automaticDataCollectionEnabled:!1},t),l=o.name;if("string"!=typeof l||!l)throw W.create("bad-app-name",{appName:String(l)});if(n||(n=Object(c.i)()),!n)throw W.create("no-options");const d=P.get(l);if(d){if(Object(c.g)(n,d.options)&&Object(c.g)(o,d.config))return d;throw W.create("duplicate-app",{appName:l})}const h=new r.b(l);for(const component of U.values())h.addComponent(component);const f=new G(n,o,h);return P.set(l,f),f}function $(e="[DEFAULT]"){const t=P.get(e);if(!t&&e===C&&Object(c.i)())return Y();if(!t)throw W.create("no-app",{appName:e});return t}function Q(e,t,n){var o;let c=null!==(o=M[e])&&void 0!==o?o:e;n&&(c+=`-${n}`);const l=c.match(/\s|\//),d=t.match(/\s|\//);if(l||d){const e=[`Unable to register library "${c}" with version "${t}":`];return l&&e.push(`library name "${c}" contains illegal characters (whitespace or "/")`),l&&d&&e.push("and"),d&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void x.warn(e.join(" "))}B(new r.a(`${c}-version`,(()=>({library:c,version:t})),"VERSION"))}const z="firebase-heartbeat-store";let X=null;function J(){return X||(X=function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:c}={}){const l=indexedDB.open(e,t),d=T(l);return r&&l.addEventListener("upgradeneeded",(e=>{r(T(l.result),e.oldVersion,e.newVersion,T(l.transaction),e)})),n&&l.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),d.then((e=>{c&&e.addEventListener("close",(()=>c())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),d}("firebase-heartbeat-database",1,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(z)}catch(e){console.warn(e)}}}}).catch((e=>{throw W.create("idb-open",{originalErrorMessage:e.message})}))),X}async function Z(e,t){try{const n=(await J()).transaction(z,"readwrite"),r=n.objectStore(z);await r.put(t,ee(e)),await n.done}catch(e){if(e instanceof c.c)x.warn(e.message);else{const t=W.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});x.warn(t.message)}}}function ee(e){return`${e.name}!${e.options.appId}`}class te{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new re(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){var e,t;const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=ne();if((null!=(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||(this._heartbeatsCache=await this._heartbeatsCachePromise,null!=(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)))&&this._heartbeatsCache.lastSentHeartbeatDate!==r&&!this._heartbeatsCache.heartbeats.some((e=>e.date===r)))return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||0===this._heartbeatsCache.heartbeats.length)return"";const t=ne(),{heartbeatsToSend:n,unsentEntries:r}=function(e,t=1024){const n=[];let r=e.slice();for(const o of e){const e=n.find((e=>e.agent===o.agent));if(e){if(e.dates.push(o.date),ie(n)>t){e.dates.pop();break}}else if(n.push({agent:o.agent,dates:[o.date]}),ie(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),o=Object(c.e)(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o}}function ne(){return(new Date).toISOString().substring(0,10)}class re{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!Object(c.r)()&&Object(c.w)().then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await J()).transaction(z),n=await t.objectStore(z).get(ee(e));return await t.done,n}catch(e){if(e instanceof c.c)x.warn(e.message);else{const t=W.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});x.warn(t.message)}}}(this.app);return(null==e?void 0:e.heartbeats)?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return Z(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return Z(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function ie(e){return Object(c.e)(JSON.stringify({version:2,heartbeats:e})).length}var ae;ae="",B(new r.a("platform-logger",(e=>new O(e)),"PRIVATE")),B(new r.a("heartbeat",(e=>new te(e)),"PRIVATE")),Q(L,D,ae),Q(L,D,"esm2017"),Q("fire-js","")},36:function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return d}));
vendor: 7,522 bytes, line 2
2var r=n(48),o="Invariant Violation",c=Object.setPrototypeOf,l=void 0===c?function(e,t){return e.__proto__=t,e}:c,d=function(e){function t(n){void 0===n&&(n=o);var r=e.call(this,"number"==typeof n?o+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=o,l(r,t.prototype),r}return Object(r.b)(t,e),t}(Error);function h(e,t){if(!e)throw new d(t)}var f=["debug","log","warn","error","silent"],v=f.indexOf("log");function m(e){return function(){if(f.indexOf(e)>=v){var t=console[e]||console.log;return t.apply(console,arguments)}}}!function(e){e.debug=m("debug"),e.log=m("log"),e.warn=m("warn"),e.error=m("error")}(h||(h={}));var y=n(211),E=n(124),_="__",k=[_,_].join("DEV");!function(){try{Boolean(__DEV__)}catch(e){return Object.defineProperty(y.a,k,{value:"production"!==Object(E.a)((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),y.a[k]}}();var T=n(454),w=Object.entries||function(e){return Object.keys(e).map((function(t){return[t,e[t]]}))},S=n(103),A=n(37);function I(map,e){for(var t=Object.create(null),n=0,r=w(map);n<r.length;n++){var o=r[n],c=o[0],l=o[1];t[c]=e(l,c)}return t}function R(e){if(null===Object.getPrototypeOf(e))return e;for(var map=Object.create(null),t=0,n=w(e);t<n.length;t++){var r=n[t],o=r[0],c=r[1];map[o]=c}return map}var O=n(45);function L(e,t,n){return e.reduce((function(map,e){return map[t(e)]=n(e),map}),Object.create(null))}var D=n(122);var x=n(253);function C(e){return e}var M=n(112);var P=48;function N(code){return!isNaN(code)&&P<=code&&code<=57}function U(input,e){for(var t=Object.create(null),n=new F(input),r=Math.floor(.4*input.length)+1,o=0;o<e.length;o++){var option=e[o],c=n.measure(option,r);void 0!==c&&(t[option]=c)}return Object.keys(t).sort((function(a,b){var e=t[a]-t[b];return 0!==e?e:function(e,t){for(var n=0,r=0;n<e.length&&r<t.length;){var o=e.charCodeAt(n),c=t.charCodeAt(r);if(N(o)&&N(c)){var l=0;do{++n,l=10*l+o-P,o=e.charCodeAt(n)}while(N(o)&&l>0);var d=0;do{++r,d=10*d+c-P,c=t.charCodeAt(r)}while(N(c)&&d>0);if(l<d)return-1;if(l>d)return 1}else{if(o<c)return-1;if(o>c)return 1;++n,++r}}return e.length-t.length}(a,b)}))}var F=function(){function e(input){this._input=input,this._inputLowerCase=input.toLowerCase(),this._inputArray=B(this._inputLowerCase),this._rows=[new Array(input.length+1).fill(0),new Array(input.length+1).fill(0),new Array(input.length+1).fill(0)]}return e.prototype.measure=function(option,e){if(this._input===option)return 0;var t=option.toLowerCase();if(this._inputLowerCase===t)return 1;var a=B(t),b=this._inputArray;if(a.length<b.length){var n=a;a=b,b=n}var r=a.length,o=b.length;if(!(r-o>e)){for(var c=this._rows,l=0;l<=o;l++)c[0][l]=l;for(var i=1;i<=r;i++){for(var d=c[(i-1)%3],h=c[i%3],f=h[0]=i,v=1;v<=o;v++){var m=a[i-1]===b[v-1]?0:1,y=Math.min(d[v]+1,h[v-1]+1,d[v-1]+m);if(i>1&&v>1&&a[i-1]===b[v-2]&&a[i-2]===b[v-1]){var E=c[(i-2)%3][v-2];y=Math.min(y,E+1)}y<f&&(f=y),h[v]=y}if(f>e)return}var _=c[r%3][o];return _<=e?_:void 0}},e}();function B(e){for(var t=e.length,n=new Array(t),i=0;i<t;++i)n[i]=e.charCodeAt(i);return n}var j=n(150),V=n(20),H=n(147),W=n(252);function G(e,t){switch(e.kind){case V.a.NULL:return null;case V.a.INT:return parseInt(e.value,10);case V.a.FLOAT:return parseFloat(e.value);case V.a.STRING:case V.a.ENUM:case V.a.BOOLEAN:return e.value;case V.a.LIST:return e.values.map((function(e){return G(e,t)}));case V.a.OBJECT:return L(e.fields,(function(e){return e.name.value}),(function(e){return G(e.value,t)}));case V.a.VARIABLE:return null==t?void 0:t[e.name.value]}Object(W.a)(0,"Unexpected value node: "+Object(A.a)(e))}function K(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Y(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),e}function $(e){return Q(e)||z(e)||X(e)||J(e)||Z(e)||ee(e)||te(e)||ne(e)}function Q(e){return Object(D.a)(e,se)}function z(e){return Object(D.a)(e,ue)}function X(e){return Object(D.a)(e,fe)}function J(e){return Object(D.a)(e,pe)}function Z(e){return Object(D.a)(e,me)}function ee(e){return Object(D.a)(e,ye)}function te(e){return Object(D.a)(e,re)}function ne(e){return Object(D.a)(e,ie)}function re(e){if(!(this instanceof re))return new re(e);this.ofType=function(e){if(!$(e))throw new Error("Expected ".concat(Object(A.a)(e)," to be a GraphQL type."));return e}(e)}function ie(e){if(!(this instanceof ie))return new ie(e);this.ofType=function(e){if(!function(e){return $(e)&&!ne(e)}(e))throw new Error("Expected ".concat(Object(A.a)(e)," to be a GraphQL nullable type."));return e}(e)}function ae(e){return"function"==typeof e?e():e}function oe(e){return e&&e.length>0?e:void 0}re.prototype.toString=function(){return"["+String(this.ofType)+"]"},re.prototype.toJSON=function(){return this.toString()},Object.defineProperty(re.prototype,S.a,{get:function(){return"GraphQLList"}}),Object(M.a)(re),ie.prototype.toString=function(){return String(this.ofType)+"!"},ie.prototype.toJSON=function(){return this.toString()},Object.defineProperty(ie.prototype,S.a,{get:function(){return"GraphQLNonNull"}}),Object(M.a)(ie);var se=function(){function e(e){var t,n,r,o=null!==(t=e.parseValue)&&void 0!==t?t:C;this.name=e.name,this.description=e.description,this.specifiedByUrl=e.specifiedByUrl,this.serialize=null!==(n=e.serialize)&&void 0!==n?n:C,this.parseValue=o,this.parseLiteral=null!==(r=e.parseLiteral)&&void 0!==r?r:function(e,t){return o(G(e,t))},this.extensions=e.extensions&&R(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),"string"==typeof e.name||Object(O.a)(0,"Must provide name."),null==e.specifiedByUrl||"string"==typeof e.specifiedByUrl||Object(O.a)(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(Object(A.a)(e.specifiedByUrl),".")),null==e.serialize||"function"==typeof e.serialize||Object(O.a)(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||Object(O.a)(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var e;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},Y(e,[{key:S.a,get:function(){return"GraphQLScalarType"}}]),e}();Object(M.a)(se);var ue=function(){function e(e){this.name=e.name,this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=e.extensions&&R(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._fields=le.bind(void 0,e),this._interfaces=ce.bind(void 0,e),"string"==typeof e.name||Object(O.a)(0,"Must provide name."),null==e.isTypeOf||"function"==typeof e.isTypeOf||Object(O.a)(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(Object(A.a)(e.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&
vendor: 10,074 bytes, line 2
2(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:he(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},Y(e,[{key:S.a,get:function(){return"GraphQLObjectType"}}]),e}();function ce(e){var t,n=null!==(t=ae(e.interfaces))&&void 0!==t?t:[];return Array.isArray(n)||Object(O.a)(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),n}function le(e){var t=ae(e.fields);return de(t)||Object(O.a)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),I(t,(function(t,n){var r;de(t)||Object(O.a)(0,"".concat(e.name,".").concat(n," field config must be an object.")),!("isDeprecated"in t)||Object(O.a)(0,"".concat(e.name,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),null==t.resolve||"function"==typeof t.resolve||Object(O.a)(0,"".concat(e.name,".").concat(n," field resolver must be a function if ")+"provided, but got: ".concat(Object(A.a)(t.resolve),"."));var o=null!==(r=t.args)&&void 0!==r?r:{};de(o)||Object(O.a)(0,"".concat(e.name,".").concat(n," args must be an object with argument names as keys."));var c=w(o).map((function(e){var t=e[0],n=e[1];return{name:t,description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions&&R(n.extensions),astNode:n.astNode}}));return{name:n,description:t.description,type:t.type,args:c,resolve:t.resolve,subscribe:t.subscribe,isDeprecated:null!=t.deprecationReason,deprecationReason:t.deprecationReason,extensions:t.extensions&&R(t.extensions),astNode:t.astNode}}))}function de(e){return Object(x.a)(e)&&!Array.isArray(e)}function he(e){return I(e,(function(e){return{description:e.description,type:e.type,args:(t=e.args,L(t,(function(e){return e.name}),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}))),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode};var t}))}Object(M.a)(ue);var fe=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&R(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._fields=le.bind(void 0,e),this._interfaces=ce.bind(void 0,e),"string"==typeof e.name||Object(O.a)(0,"Must provide name."),null==e.resolveType||"function"==typeof e.resolveType||Object(O.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(A.a)(e.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var e;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:he(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},Y(e,[{key:S.a,get:function(){return"GraphQLInterfaceType"}}]),e}();Object(M.a)(fe);var pe=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&R(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._types=ve.bind(void 0,e),"string"==typeof e.name||Object(O.a)(0,"Must provide name."),null==e.resolveType||"function"==typeof e.resolveType||Object(O.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(A.a)(e.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return"function"==typeof this._types&&(this._types=this._types()),this._types},t.toConfig=function(){var e;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},Y(e,[{key:S.a,get:function(){return"GraphQLUnionType"}}]),e}();function ve(e){var t=ae(e.types);return Array.isArray(t)||Object(O.a)(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}Object(M.a)(pe);var me=function(){function e(e){var t,n,r,o;this.name=e.name,this.description=e.description,this.extensions=e.extensions&&R(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._values=(t=this.name,de(n=e.values)||Object(O.a)(0,"".concat(t," values must be an object with value names as keys.")),w(n).map((function(e){var n=e[0],r=e[1];return de(r)||Object(O.a)(0,"".concat(t,".").concat(n,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(Object(A.a)(r),".")),!("isDeprecated"in r)||Object(O.a)(0,"".concat(t,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),{name:n,description:r.description,value:void 0!==r.value?r.value:n,isDeprecated:null!=r.deprecationReason,deprecationReason:r.deprecationReason,extensions:r.extensions&&R(r.extensions),astNode:r.astNode}}))),this._valueLookup=new Map(this._values.map((function(e){return[e.value,e]}))),this._nameLookup=(r=this._values,o=function(e){return e.name},r.reduce((function(map,e){return map[o(e)]=e,map}),Object.create(null))),"string"==typeof e.name||Object(O.a)(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(e){return this._nameLookup[e]},t.serialize=function(e){var t=this._valueLookup.get(e);if(void 0===t)throw new j.a('Enum "'.concat(this.name,'" cannot represent value: ').concat(Object(A.a)(e)));return t.name},t.parseValue=function(e){if("string"!=typeof e){var t=Object(A.a)(e);throw new j.a('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(t,".")+ge(this,t))}var n=this.getValue(e);if(null==n)throw new j.a('Value "'.concat(e,'" does not exist in "').concat(this.name,'" enum.')+ge(this,e));return n.value},t.parseLiteral=function(e,t){if(e.kind!==V.a.ENUM){var n=Object(H.print)(e);throw new j.a('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(n,".")+ge(this,n),e)}var r=this.getValue(e.value);if(null==r){var o=Object(H.print)(e);throw new j.a('Value "'.concat(o,'" does not exist in "').concat(this.name,'" enum.')+ge(this,o),e)}return r.value},t.toConfig=function(){var e,t=L(this.getValues(),(function(e){return e.name}),(function(e){return{description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},Y(e,[{key:S.a,get:function(){return"GraphQLEnumType"}}]),e}();function ge(e,t){return function(e,t){var n="string"==typeof e?[e,t]:[void 0,e],r=n[0],o=" Did you mean ";r&&(o+=r+" ");var c=n[1].map((function(e){return'"'.concat(e,'"')}));switch(c.length){case 0:return"";case 1:return o+c[0]+"?";case 2:return o+c[0]+" or "+c[1]+"?"}var l=c.slice(0,5),d=l.pop();return o+l.join(", ")+", or "+d+"?"}("the enum value",U(t,e.getValues().map((function(e){return e.name}))))}Object(M.a)(me);var ye=function(){function e(e){this.name=e.name,this.description=e.description,this.extensions=e.extensions&&R(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._fields=be.bind(void 0,e),"string"==typeof e.name||Object(O.a)(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var e,t=I(this.getFields(),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},Y(e,[{key:S.a,get:function(){return"GraphQLInputObjectType"}}]),e}();function be(e){var t=ae(e.fields);return de(t)||Object(O.a)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),I(t,(function(t,n){return!("resolve"in t)||Object(O.a)(0,"".concat(e.name,".").concat(n," field has a resolve property, but Input Types cannot define resolvers.")),{name:n,description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions&&R(t.extensions),astNode:t.astNode}}))}Object(M.a)(ye),$(null),Object(T.a)()},37:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(216);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return l(e,[])}function l(e,t){switch(o(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";
vendor: 8,276 bytes, line 2
2var n=[].concat(t,[e]),o=function(object){var e=object[String(r.a)];if("function"==typeof e)return e;if("function"==typeof object.inspect)return object.inspect}(e);if(void 0!==o){var c=o.call(e);if(c!==e)return"string"==typeof c?c:l(c,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,o=[],i=0;i<n;++i)o.push(l(e[i],t));1===r?o.push("... 1 more item"):r>1&&o.push("... ".concat(r," more items"));return"["+o.join(", ")+"]"}(e,n);return function(object,e){var t=Object.keys(object);if(0===t.length)return"{}";if(e.length>2)return"["+function(object){var e=Object.prototype.toString.call(object).replace(/^\[object /,"").replace(/]$/,"");if("Object"===e&&"function"==typeof object.constructor){var t=object.constructor.name;if("string"==typeof t&&""!==t)return t}return e}(object)+"]";return"{ "+t.map((function(t){return t+": "+l(object[t],e)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},39:function(e,t,n){"use strict";n.d(t,"a",(function(){return pi}));var r=n(10);n(405),n(407),n(17),n(408),n(192),n(54),n(106),n(51),n(129),n(274),n(77),n(174),n(89),n(226),n(76),n(96),n(169),n(140),n(193),n(100),n(294),n(97),n(382);function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var l,d,h,f,v,m,y,E,_,k,T,w,S,A,I,R={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},O={duration:.5,overwrite:!1,delay:0},L=1e8,D=1e-8,x=2*Math.PI,C=x/4,M=0,P=Math.sqrt,N=Math.cos,U=Math.sin,F=function(e){return"string"==typeof e},B=function(e){return"function"==typeof e},j=function(e){return"number"==typeof e},V=function(e){return void 0===e},H=function(e){return"object"===Object(r.a)(e)},W=function(e){return!1!==e},G=function(){return"undefined"!=typeof window},K=function(e){return B(e)||F(e)},Y="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},$=Array.isArray,Q=/random\([^)]+\)/g,z=/,\s*/g,X=/(?:-?\.?\d|\.)+/gi,J=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Z=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ee=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,te=/[+-]=-?[.\d]+/,ne=/[^,'"\[\]\s]+/gi,re=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ie={},ae={},oe=function(e){return(ae=Ne(e,ie))&&Vn},se=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},ue=function(e,t){return!t&&console.warn(e)},ce=function(e,t){return e&&(ie[e]=t)&&ae&&(ae[e]=t)||ie},le=function(){return 0},de={suppressEvents:!0,isStart:!0,kill:!1},he={suppressEvents:!0,kill:!1},fe={suppressEvents:!0},pe={},ve=[],me={},ge={},ye={},be=30,Ee=[],_e="",ke=function(e){var t,i,n=e[0];if(H(n)||B(n)||(e=[e]),!(t=(n._gsap||{}).harness)){for(i=Ee.length;i--&&!Ee[i].targetTest(n););t=Ee[i]}for(i=e.length;i--;)e[i]&&(e[i]._gsap||(e[i]._gsap=new en(e[i],t)))||e.splice(i,1);return e},Te=function(e){return e._gsap||ke(gt(e))[0]._gsap},we=function(e,t,n){return(n=e[t])&&B(n)?e[t]():V(n)&&e.getAttribute&&e.getAttribute(t)||n},Se=function(e,t){return(e=e.split(",")).forEach(t)||e},Ae=function(e){return Math.round(1e5*e)/1e5||0},Ie=function(e){return Math.round(1e7*e)/1e7||0},Re=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),"+"===n?e+r:"-"===n?e-r:"*"===n?e*r:e/r},Oe=function(e,t){for(var n=t.length,i=0;e.indexOf(t[i])<0&&++i<n;);return i<n},Le=function(){var i,e,t=ve.length,a=ve.slice(0);for(me={},ve.length=0,i=0;i<t;i++)(e=a[i])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},De=function(e){return!!(e._initted||e._startAt||e.add)},xe=function(e,time,t,n){ve.length&&!d&&Le(),e.render(time,t,n||!!(d&&time<0&&De(e))),ve.length&&!d&&Le()},Ce=function(e){var t=parseFloat(e);return(t||0===t)&&(e+"").match(ne).length<2?t:F(e)?e.trim():e},Me=function(p){return p},Pe=function(e,t){for(var p in t)p in e||(e[p]=t[p]);return e},Ne=function(base,e){for(var p in e)base[p]=e[p];return base},Ue=function e(base,t){for(var p in t)"__proto__"!==p&&"constructor"!==p&&"prototype"!==p&&(base[p]=H(t[p])?e(base[p]||(base[p]={}),t[p]):t[p]);return base},Fe=function(e,t){var p,n={};for(p in e)p in t||(n[p]=e[p]);return n},Be=function(e){var t,n=e.parent||f,r=e.keyframes?(t=$(e.keyframes),function(e,n){for(var p in n)p in e||"duration"===p&&t||"ease"===p||(e[p]=n[p])}):Pe;if(W(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},je=function(e,t,n,r,o){void 0===n&&(n="_first"),void 0===r&&(r="_last");var c,l=e[r];if(o)for(c=t[o];l&&l[o]>c;)l=l._prev;return l?(t._next=l._next,l._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=l,t.parent=t._dp=e,t},Ve=function(e,t,n,r){void 0===n&&(n="_first"),void 0===r&&(r="_last");var o=t._prev,c=t._next;o?o._next=c:e[n]===t&&(e[n]=c),c?c._prev=o:e[r]===t&&(e[r]=o),t._next=t._prev=t.parent=null},He=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},We=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var a=e;a;)a._dirty=1,a=a.parent;return e},qe=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Ge=function(e,t,n,r){return e._startAt&&(d?e._startAt.revert(he):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},Ke=function e(t){return!t||t._ts&&e(t.parent)},Ye=function(e){return e._repeat?$e(e._tTime,e=e.duration()+e._rDelay)*e:0},$e=function(e,t){var n=Math.floor(e=Ie(e/t));return e&&n===e?n-1:n},Qe=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},ze=function(e){return e._end=Ie(e._start+(e._tDur/Math.abs(e._ts||e._rts||D)||0))},Xe=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=Ie(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),ze(e),n._dirty||We(n,e)),e},Je=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=Qe(e.rawTime(),t),(!t._dur||ht(0,t.totalDuration(),n)-t._tTime>D)&&t.render(n,!0)),We(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-1e-8}},Ze=function(e,t,n,r){return t.parent&&He(t),t._start=Ie((j(n)?n:n||e!==f?ut(e,n,t):e._time)+t._delay),t._end=Ie(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),je(e,t,"_first","_last",e._sort?"_start":0),it(t)||(e._recent=t),r||Je(e,t),e._ts<0&&Xe(e,e._tTime),e},et=function(e,t){return(ie.ScrollTrigger||se("scrollTrigger",t))&&ie.ScrollTrigger.create(t,e)},tt=function(e,time,t,n,r){return cn(e,time,r),e._initted?!t&&e._pt&&!d&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&_!==Vt.frame?(ve.push(e),e._lazy=[r,n],1):void 0:1},nt=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},it=function(e){var data=e.data;return"isFromStart"===data||"isStart"===data},at=function(e,t,n,r){var o=e._repeat,c=Ie(t)||0,l=e._tTime/e._tDur;return l&&!r&&(e._time*=c/e._dur),e._dur=c,e._tDur=o?o<0?1e10:Ie(c*(o+1)+e._rDelay*o):c,l>0&&!r&&Xe(e,e._tTime=e._tDur*l),e.parent&&ze(e),n||We(e.parent,e),e},ot=function(e){return e instanceof nn?We(e):at(e,e._dur)},st={_start:0,endTime:le,totalDuration:le},ut=function e(t,n,r){var i,o,c,l=t.labels,d=t._recent||st,h=t.duration()>=L?d.endTime(!1):t._dur;return F(n)&&(isNaN(n)||n in l)?(o=n.charAt(0),c="%"===n.substr(-1),i=n.indexOf("="),"<"===o||">"===o?(i>=0&&(n=n.replace(/=/,"")),("<"===o?d._start:d.endTime(d._repeat>=0))+(parseFloat(n.substr(1))||0)*(c?(i<0?d:r).totalDuration()/100:1)):i<0?(n in l||(l[n]=h),l[n]):(o=parseFloat(n.charAt(i-1)+n.substr(i+1)),c&&r&&(o=o/100*($(r)?r[0]:r).totalDuration()),i>1?e(t,n.substr(0,i-1),r)+o:h+o)):null==n?h:+n},ct=function(e,t,n){var r,o,c=j(t[1]),l=(c?2:1)+(e<2?0:1),d=t[l];if(c&&(d.duration=t[1]),d.parent=n,e){for(r=d,o=n;o&&!("immediateRender"in r);)r=o.vars.defaults||{},o=W(o.vars.inherit)&&o.parent;d.immediateRender=W(r.immediateRender),e<2?d.runBackwards=1:d.startAt=t[l-1]}return new pn(t[0],d,t[l+1])},lt=function(e,t){return e||0===e?t(e):t},ht=function(e,t,n){return n<e?e:n>t?t:n},ft=function(e,t){return F(e)&&(t=re.exec(e))?t[1]:""},pt=[].slice,vt=function(e,t){return e&&H(e)&&"length"in e&&(!t&&!e.length||e.length-1 
vendor: 19,363 bytes, line 2
2in e&&H(e[0]))&&!e.nodeType&&e!==v},mt=function(e,t,n){return void 0===n&&(n=[]),e.forEach((function(e){var r;return F(e)&&!t||vt(e,1)?(r=n).push.apply(r,gt(e)):n.push(e)}))||n},gt=function(e,t,n){return h&&!t&&h.selector?h.selector(e):!F(e)||n||!m&&Ht()?$(e)?mt(e,n):vt(e)?pt.call(e,0):e?[e]:[]:pt.call((t||y).querySelectorAll(e),0)},yt=function(e){return e=gt(e)[0]||ue("Invalid scope")||{},function(t){var n=e.current||e.nativeElement||e;return gt(t,n.querySelectorAll?n:n===e?ue("Invalid scope")||y.createElement("div"):e)}},bt=function(a){return a.sort((function(){return.5-Math.random()}))},Et=function(e){if(B(e))return e;var t=H(e)?e:{each:e},n=Qt(t.ease),r=t.from||0,base=parseFloat(t.base)||0,o={},c=r>0&&r<1,l=isNaN(r)||c,d=t.axis,h=r,f=r;return F(r)?h=f={center:.5,edges:.5,end:1}[r]||0:!c&&l&&(h=r[0],f=r[1]),function(i,e,a){var c,v,m,y,E,_,k,T,w,S=(a||t).length,A=o[S];if(!A){if(!(w="auto"===t.grid?0:(t.grid||[1,L])[1])){for(k=-L;k<(k=a[w++].getBoundingClientRect().left)&&w<S;);w<S&&w--}for(A=o[S]=[],c=l?Math.min(w,S)*h-.5:r%w,v=w===L?0:l?S*f/w-.5:r/w|0,k=0,T=L,_=0;_<S;_++)m=_%w-c,y=v-(_/w|0),A[_]=E=d?Math.abs("y"===d?y:m):P(m*m+y*y),E>k&&(k=E),E<T&&(T=E);"random"===r&&bt(A),A.max=k-T,A.min=T,A.v=S=(parseFloat(t.amount)||parseFloat(t.each)*(w>S?S-1:d?"y"===d?S/w:w:Math.max(w,S/w))||0)*("edges"===r?-1:1),A.b=S<0?base-S:base,A.u=ft(t.amount||t.each)||0,n=n&&S<0?Yt(n):n}return S=(A[i]-A.min)/A.max||0,Ie(A.b+(n?n(S):S)*A.v)+A.u}},_t=function(e){var p=Math.pow(10,((e+"").split(".")[1]||"").length);return function(t){var n=Ie(Math.round(parseFloat(t)/e)*e*p);return(n-n%1)/p+(j(t)?0:ft(t))}},kt=function(e,t){var n,r,o=$(e);return!o&&H(e)&&(n=o=e.radius||L,e.values?(e=gt(e.values),(r=!j(e[0]))&&(n*=n)):e=_t(e.increment)),lt(t,o?B(e)?function(t){return r=e(t),Math.abs(r-t)<=n?r:t}:function(t){for(var o,c,l=parseFloat(r?t.x:t),d=parseFloat(r?t.y:0),h=L,f=0,i=e.length;i--;)(o=r?(o=e[i].x-l)*o+(c=e[i].y-d)*c:Math.abs(e[i]-l))<h&&(h=o,f=i);return f=!n||h<=n?e[f]:t,r||f===t||j(t)?f:f+ft(t)}:_t(e))},Tt=function(e,t,n,r){return lt($(e)?!t:!0===n?!!(n=0):!r,(function(){return $(e)?e[~~(Math.random()*e.length)]:(n=n||1e-5)&&(r=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+.99*n))/n)*n*r)/r}))},wt=function(a,e,t){return lt(t,(function(t){return a[~~e(t)]}))},St=function(s){return s.replace(Q,(function(e){var t=e.indexOf("[")+1,n=e.substring(t||7,t?e.indexOf("]"):e.length-1).split(z);return Tt(t?n:+n[0],t?0:+n[1],+n[2]||1e-5)}))},At=function(e,t,n,r,o){var c=t-e,l=r-n;return lt(o,(function(t){return n+((t-e)/c*l||0)}))},It=function(e,t,n){var p,r,label,o=e.labels,c=L;for(p in o)(r=o[p]-t)<0==!!n&&r&&c>(r=Math.abs(r))&&(label=p,c=r);return label},Rt=function(e,t,n){var r,o,c,l=e.vars,d=l[t],f=h,v=e._ctx;if(d)return r=l[t+"Params"],o=l.callbackScope||e,n&&ve.length&&Le(),v&&(h=v),c=r?d.apply(o,r):d.call(o),h=f,c},Ot=function(e){return He(e),e.scrollTrigger&&e.scrollTrigger.kill(!!d),e.progress()<1&&Rt(e,"onInterrupt"),e},Lt=[],Dt=function(e){if(e)if(e=!e.name&&e.default||e,G()||e.headless){var t=e.name,n=B(e),r=t&&!n&&e.init?function(){this._props=[]}:e,o={init:le,render:Tn,add:sn,kill:Sn,modifier:wn,rawVars:0},c={targetTest:0,get:0,getSetter:bn,aliases:{},register:0};if(Ht(),e!==r){if(ge[t])return;Pe(r,Pe(Fe(e,o),c)),Ne(r.prototype,Ne(o,Fe(e,c))),ge[r.prop=t]=r,e.targetTest&&(Ee.push(r),pe[t]=1),t=("css"===t?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}ce(t,r),e.register&&e.register(Vn,r,Rn)}else Lt.push(e)},xt=255,Ct={aqua:[0,xt,xt],lime:[0,xt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,xt],navy:[0,0,128],white:[xt,xt,xt],olive:[128,128,0],yellow:[xt,xt,0],orange:[xt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[xt,0,0],pink:[xt,192,203],cyan:[0,xt,xt],transparent:[xt,xt,xt,0]},Mt=function(e,t,n){return(6*(e+=e<0?1:e>1?-1:0)<1?t+(n-t)*e*6:e<.5?n:3*e<2?t+(n-t)*(2/3-e)*6:t)*xt+.5|0},Pt=function(e,t,n){var r,g,b,o,s,c,l,d,h,f,a=e?j(e)?[e>>16,e>>8&xt,e&xt]:0:Ct.black;if(!a){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Ct[e])a=Ct[e];else if("#"===e.charAt(0)){if(e.length<6&&(r=e.charAt(1),g=e.charAt(2),b=e.charAt(3),e="#"+r+r+g+g+b+b+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(a=parseInt(e.substr(1,6),16))>>16,a>>8&xt,a&xt,parseInt(e.substr(7),16)/255];a=[(e=parseInt(e.substr(1),16))>>16,e>>8&xt,e&xt]}else if("hsl"===e.substr(0,3))if(a=f=e.match(X),t){if(~e.indexOf("="))return a=e.match(J),n&&a.length<4&&(a[3]=1),a}else o=+a[0]%360/360,s=+a[1]/100,r=2*(c=+a[2]/100)-(g=c<=.5?c*(s+1):c+s-c*s),a.length>3&&(a[3]*=1),a[0]=Mt(o+1/3,r,g),a[1]=Mt(o,r,g),a[2]=Mt(o-1/3,r,g);else a=e.match(X)||Ct.transparent;a=a.map(Number)}return t&&!f&&(r=a[0]/xt,g=a[1]/xt,b=a[2]/xt,c=((l=Math.max(r,g,b))+(d=Math.min(r,g,b)))/2,l===d?o=s=0:(h=l-d,s=c>.5?h/(2-l-d):h/(l+d),o=l===r?(g-b)/h+(g<b?6:0):l===g?(b-r)/h+2:(r-g)/h+4,o*=60),a[0]=~~(o+.5),a[1]=~~(100*s+.5),a[2]=~~(100*c+.5)),n&&a.length<4&&(a[3]=1),a},Nt=function(e){var t=[],n=[],i=-1;return e.split(Ft).forEach((function(e){var a=e.match(Z)||[];t.push.apply(t,a),n.push(i+=a.length+1)})),t.c=n,t},Ut=function(s,e,t){var n,r,o,c,l="",d=(s+l).match(Ft),h=e?"hsla(":"rgba(",i=0;if(!d)return s;if(d=d.map((function(t){return(t=Pt(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),t&&(o=Nt(s),(n=t.c).join(l)!==o.c.join(l)))for(c=(r=s.replace(Ft,"1").split(Z)).length-1;i<c;i++)l+=r[i]+(~n.indexOf(i)?d.shift()||h+"0,0,0,0)":(o.length?o:d.length?d:t).shift());if(!r)for(c=(r=s.split(Ft)).length-1;i<c;i++)l+=r[i]+d[i];return l+r[c]},Ft=function(){var p,s="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(p in Ct)s+="|"+p+"\\b";return new RegExp(s+")","gi")}(),Bt=/hsl[a]?\(/,jt=function(a){var e,t=a.join(" ");if(Ft.lastIndex=0,Ft.test(t))return e=Bt.test(t),a[1]=Ut(a[1],e),a[0]=Ut(a[0],e,Nt(a[1])),!0},Vt=function(){var e,t,n,r,o,c,l=Date.now,d=500,h=33,f=l(),_=f,k=1e3/240,w=k,S=[],A=function n(v){var m,y,time,E,T=l()-_,A=!0===v;if((T>d||T<0)&&(f+=T-h),((m=(time=(_+=T)-f)-w)>0||A)&&(E=++r.frame,o=time-1e3*r.time,r.time=time/=1e3,w+=m+(m>=k?4:k-m),y=1),A||(e=t(n)),y)for(c=0;c<S.length;c++)S[c](time,o,E,v)};return r={time:0,frame:0,tick:function(){A(!0)},deltaRatio:function(e){return o/(1e3/(e||60))},wake:function(){E&&(!m&&G()&&(v=m=window,y=v.document||{},ie.gsap=Vn,(v.gsapVersions||(v.gsapVersions=[])).push(Vn.version),oe(ae||v.GreenSockGlobals||!v.gsap&&v||{}),Lt.forEach(Dt)),n="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,e&&r.sleep(),t=n||function(e){return setTimeout(e,w-1e3*r.time+1|0)},T=1,A(2))},sleep:function(){(n?cancelAnimationFrame:clearTimeout)(e),T=0,t=le},lagSmoothing:function(e,t){d=e||1/0,h=Math.min(t||33,d)},fps:function(e){k=1e3/(e||240),w=1e3*r.time+k},add:function(e,t,n){var o=t?function(t,n,c,l){e(t,n,c,l),r.remove(o)}:e;return r.remove(e),S[n?"unshift":"push"](o),Ht(),o},remove:function(e,i){~(i=S.indexOf(e))&&S.splice(i,1)&&c>=i&&c--},_listeners:S}}(),Ht=function(){return!T&&Vt.wake()},Wt={},qt=/^[\d.\-M][\d.\-,\s]/,Gt=/["']/g,Kt=function(e){for(var t,n,r,o={},c=e.substr(1,e.length-3).split(":"),l=c[0],i=1,d=c.length;i<d;i++)n=c[i],t=i!==d-1?n.lastIndexOf(","):n.length,r=n.substr(0,t),o[l]=isNaN(r)?r.replace(Gt,"").trim():+r,l=n.substr(t+1).trim();return o},Yt=function(e){return function(p){return 1-e(1-p)}},$t=function e(t,n){for(var r,o=t._first;o;)o instanceof nn?e(o,n):!o.vars.yoyoEase||o._yoyo&&o._repeat||o._yoyo===n||(o.timeline?e(o.timeline,n):(r=o._ease,o._ease=o._yEase,o._yEase=r,o._yoyo=n)),o=o._next},Qt=function(e,t){return e&&(B(e)?e:Wt[e]||function(e){var t,n,r,o,c=(e+"").split("("),l=Wt[c[0]];return l&&c.length>1&&l.config?l.config.apply(null,~e.indexOf("{")?[Kt(c[1])]:(t=e,n=t.indexOf("(")+1,r=t.indexOf(")"),o=t.indexOf("(",n),t.substring(n,~o&&o<r?t.indexOf(")",r+1):r)).split(",").map(Ce)):Wt._CE&&qt.test(e)?Wt._CE("",e):l}(e))||t},zt=function(e,t,n,r){void 0===n&&(n=function(p){return 1-t(1-p)}),void 0===r&&(r=function(p){return p<.5?t(2*p)/2:1-t(2*(1-p))/2});var o,c={easeIn:t,easeOut:n,easeInOut:r};return Se(e,(function(e){for(var p in Wt[e]=ie[e]=c,Wt[o=e.toLowerCase()]=n,c)Wt[o+("easeIn"===p?".in":"easeOut"===p?".out":".inOut")]=Wt[e+"."+p]=c[p]})),c},Xt=function(e){return function(p){return p<.5?(1-e(1-2*p))/2:.5+e(2*(p-.5))/2}},Jt=function e(t,n,r){var o=n>=1?n:1,c=(r||(t?.3:.45))/(n<1?n:1),l=c/x*(Math.asin(1/o)||0),d=function(p){return 1===p?1:o*Math.pow(2,-10*p)*U((p-l)*c)+1},h="out"===t?d:"in"===t?function(p){return 1-d(1-p)}:Xt(d);return c=x/c,h.config=function(n,r){return e(t,n,r)},h},Zt=function e(t,n){void 0===n&&(n=1.70158);var r=function(p){return p?--p*p*((n+1)*p+n)+1:0},o="out"===t?r:"in"===t?function(p){return 1-r(1-p)}:Xt(r);return o.config=function(n){return e(t,n)},o};Se("Linear,Quad,Cubic,Quart,Quint,Strong",(function(e,i){var t=i<5?i+1:i;zt(e+",Power"+(t-1),i?function(p){return Math.pow(p,t)}:function(p){return p},(function(p){return 1-Math.pow(1-p,t)}),(function(p){return p<.5?Math.pow(2*p,t)/2:1-Math.pow(2*(1-p),t)/2}))})),Wt.Linear.easeNone=Wt.none=Wt.Linear.easeIn,zt("Elastic",Jt("in"),Jt("out"),Jt()),w=7.5625,A=1/(S=2.75),zt("Bounce",(function(p){return 1-I(1-p)}),I=function(p){return p<A?w*p*p:p<.7272727272727273?w*Math.pow(p-1.5/S,2)+.75:p<.9090909090909092?w*(p-=2.25/S)*p+.9375:w*Math.pow(p-2.625/S,2)+.984375}),zt("Expo",(function(p){return Math.pow(2,10*(p-1))*p+p*p*p*p*p*p*(1-p)})),zt("Circ",(function(p){return-(P(1-p*p)-1)})),zt("Sine",(function(p){return 1===p?1:1-N(p*C)})),zt("Back",Zt("in"),Zt("out"),Zt()),Wt.SteppedEase=Wt.steps=ie.SteppedEase={config:function(e,t){void 0===e&&(e=1);var n=1/e,r=e+(t?0:1),o=t?1:0;return function(p){return((r*ht(0,.99999999,p)|0)+o)*n}}},O.ease=Wt["quad.out"],Se("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(e){return _e+=e+","+e+"Params,"}));var en=function(e,t){this.id=M++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:we,this.set=t?t.getSetter:bn},tn=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,at(this,+e.duration,1,1),this.data=e.data,h&&(this._ctx=h,h.data.push(this)),T||Vt.wake()}var t=e.prototype;return t.delay=function(e){return e||0===e?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,at(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(Ht(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(Xe(this,e),!n._dp||n.parent||Je(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&Ze(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===D||!this._initted&&this._dur&&e||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),xe(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+Ye(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?e:1-e)+Ye(this),t):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(e,t){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,t):this._repeat?$e(this._tTime,n)+1:1},t.timeScale=function(e,t){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===e)return this;var n=this.parent&&this._ts?Qe(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||-1e-8===e?0:this._rts,this.totalTime(ht(-Math.abs(this._delay),this.totalDuration(),n),!1!==t),ze(this),qe(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ht(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==D&&(this._tTime-=D)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=Ie(e);var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&Ze(t,this,this._start-this._delay),this}return this._start},t.endTime=function(e){return this._start+(W(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Qe(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){void 0===e&&(e=fe);var t=d;return d=e,De(this)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),"nested"!==this.data&&!1!==e.kill&&this.kill(),d=t,this},t.globalTime=function(e){for(var t=this,time=arguments.length?e:t.rawTime();t;)time=t._start+time/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):time},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,ot(this)):-2===this._repeat?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var time=this._time;return this._rDelay=e,ot(this),time?this.time(time):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(ut(this,e),W(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,W(t)),this._dur||(this._zTime=-1e-8),this},t.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-1e-8:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},t.isActive=function(){var e,t=this.parent||this._dp,n=this._start;return!(t&&!(this._ts&&this._initted&&t.isActive()&&(e=t.rawTime(!0))>=n&&e<this.endTime(!0)-D))},t.eventCallback=function(e,t,n){var r=this.vars;return arguments.length>1?(t?(r[e]=t,n&&(r[e+"Params"]=n),"onUpdate"===e&&(this._onUpdate=t)):delete r[e],this):r[e]},t.then=function(e){var t=this,n=t._prom;return new Promise((function(r){var o=B(e)?e:Me,c=function(){var e=t.then;t.then=null,n&&n(),B(o)&&(o=o(t))&&(o.then||o===t)&&(t.then=e),r(o),t.then=e};t._initted&&1===t.totalProgress()&&t._ts>=0||!t._tTime&&t._ts<0?c():t._prom=c}))},t.kill=function(){Ot(this)},e}();Pe(tn.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var nn=function(e){function t(t,n){var r;return void 0===t&&(t={}),(r=e.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=W(t.sortChildren),f&&Ze(t.parent||f,o(r),n),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&et(o(r),t.scrollTrigger),r}c(t,e);var n=t.prototype;return n.to=function(e,t,n){return ct(0,arguments,this),this},n.from=function(e,t,n){return ct(1,arguments,this),this},n.fromTo=function(e,t,n,r){return ct(2,arguments,this),this},n.set=function(e,t,n){return t.duration=0,t.parent=this,Be(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new pn(e,t,ut(this,n),1),this},n.call=function(e,t,n){return Ze(this,pn.delayedCall(0,e,t),n)},n.staggerTo=function(e,t,n,r,o,c,l){return n.duration=t,n.stagger=n.stagger||r,n.onComplete=c,n.onCompleteParams=l,n.parent=this,new pn(e,n,ut(this,o)),this},n.staggerFrom=function(e,t,n,r,o,c,l){return n.runBackwards=1,Be(n).immediateRender=W(n.immediateRender),this.staggerTo(e,t,n,r,o,c,l)},n.staggerFromTo=function(e,t,n,r,o,c,l,d){return r.startAt=n,Be(r).immediateRender=W(r.immediateRender),this.staggerTo(e,t,r,o,c,l,d)},n.render=function(e,t,n){var time,r,o,c,l,h,v,m,y,E,_,k,T=this._time,w=this._dirty?this.totalDuration():this._tDur,S=this._dur,A=e<=0?0:Ie(e),I=this._zTime<0!=e<0&&(this._initted||!S);if(this!==f&&A>w&&e>=0&&(A=w),A!==this._tTime||n||I){if(T!==this._time&&S&&(A+=this._time-T,e+=this._time-T),time=A,y=this._start,h=!(m=this._ts),I&&(S||(T=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(_=this._yoyo,l=S+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(100*l+e,t,n);if(time=Ie(A%l),A===w?(c=this._repeat,time=S):((c=~~(E=Ie(A/l)))&&c===E&&(time=S,c--),time>S&&(time=S)),E=$e(this._tTime,l),!T&&this._tTime&&E!==c&&this._tTime-E*l-this._dur<=0&&(E=c),_&&1&c&&(time=S-time,k=1),c!==E&&!this._lock){var R=_&&1&E,O=R===(_&&1&c);if(c<E&&(R=!R),T=R?0:A%S?S:A,this._lock=1,this.render(T||(k?0:Ie(c*l)),t,!S)._lock=0,this._tTime=A,!t&&this.parent&&Rt(this,"onRepeat"),this.vars.repeatRefresh&&!k&&(this.invalidate()._lock=1,E=c),T&&T!==this._time||h!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(S=this._dur,w=this._tDur,O&&(this._lock=2,T=R?S:-1e-4,this.render(T,!0),this.vars.repeatRefresh&&!k&&this.invalidate()),this._lock=0,!this._ts&&!h)return this;$t(this,k)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(v=function(e,t,time){var n;if(time>t)for(n=e._first;n&&n._start<=time;){if("isPause"===n.data&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=time;){if("isPause"===n.data&&n._start<t)return n;n=n._prev}}(this,Ie(T),Ie(time)))&&(A-=time-(time=v._start)),this._tTime=A,this._time=time,this._act=!m,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,T=0),!T&&A&&S&&!t&&!E&&(Rt(this,"onStart"),this._tTime!==A))return this;if(time>=T&&e>=0)for(r=this._first;r;){if(o=r._next,(r._act||time>=r._start)&&r._ts&&v!==r){if(r.parent!==this)return this.render(e,t,n);if(r.render(r._ts>0?(time-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(time-r._start)*r._ts,t,n),time!==this._time||!this._ts&&!h){v=0,o&&(A+=this._zTime=-1e-8);break}}r=o}else{r=this._last;for(var L=e<0?e:time;r;){if(o=r._prev,(r._act||L<=r._end)&&r._ts&&v!==r){if(r.parent!==this)return this.render(e,t,n);if(r.render(r._ts>0?(L-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(L-r._start)*r._ts,t,n||d&&De(r)),time!==this._time||!this._ts&&!h){v=0,o&&(A+=this._zTime=L?-1e-8:D);break}}r=o}}if(v&&!t&&(this.pause(),v.render(time>=T?0:-1e-8)._zTime=time>=T?1:-1,this._ts))return this._start=y,ze(this),this.render(e,t,n);this._onUpdate&&!t&&Rt(this,"onUpdate",!0),(A===w&&this._tTime>=this.totalDuration()||!A&&T)&&(y!==this._start&&Math.abs(m)===Math.abs(this._ts
vendor: 4,274 bytes, line 2
2)||this._lock||((e||!S)&&(A===w&&this._ts>0||!A&&this._ts<0)&&He(this,1),t||e<0&&!T||!A&&!T&&w||(Rt(this,A===w&&e>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(A<w&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(e,t){var n=this;if(j(t)||(t=ut(this,t,e)),!(e instanceof tn)){if($(e))return e.forEach((function(e){return n.add(e,t)})),this;if(F(e))return this.addLabel(e,t);if(!B(e))return this;e=pn.delayedCall(0,e)}return this!==e?Ze(this,e,t):this},n.getChildren=function(e,t,n,r){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=-L);for(var a=[],o=this._first;o;)o._start>=r&&(o instanceof pn?t&&a.push(o):(n&&a.push(o),e&&a.push.apply(a,o.getChildren(!0,t,n)))),o=o._next;return a},n.getById=function(e){for(var t=this.getChildren(1,1,1),i=t.length;i--;)if(t[i].vars.id===e)return t[i]},n.remove=function(e){return F(e)?this.removeLabel(e):B(e)?this.killTweensOf(e):(e.parent===this&&Ve(this,e),e===this._recent&&(this._recent=this._last),We(this))},n.totalTime=function(t,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ie(Vt.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,n),this._forcing=0,this):this._tTime},n.addLabel=function(label,e){return this.labels[label]=ut(this,e),this},n.removeLabel=function(label){return delete this.labels[label],this},n.addPause=function(e,t,n){var r=pn.delayedCall(0,t||le,n);return r.data="isPause",this._hasPause=1,Ze(this,r,ut(this,e))},n.removePause=function(e){var t=this._first;for(e=ut(this,e);t;)t._start===e&&"isPause"===t.data&&He(t),t=t._next},n.killTweensOf=function(e,t,n){for(var r=this.getTweensOf(e,n),i=r.length;i--;)rn!==r[i]&&r[i].kill(e,t);return this},n.getTweensOf=function(e,t){for(var n,a=[],r=gt(e),o=this._first,c=j(t);o;)o instanceof pn?Oe(o._targets,r)&&(c?(!rn||o._initted&&o._ts)&&o.globalTime(0)<=t&&o.globalTime(o.totalDuration())>t:!t||o.isActive())&&a.push(o):(n=o.getTweensOf(r,t)).length&&a.push.apply(a,n),o=o._next;return a},n.tweenTo=function(e,t){t=t||{};var n,r=this,o=ut(r,e),c=t,l=c.startAt,d=c.onStart,h=c.onStartParams,f=c.immediateRender,v=pn.to(r,Pe({ease:t.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:t.duration||Math.abs((o-(l&&"time"in l?l.time:r._time))/r.timeScale())||D,onStart:function(){if(r.pause(),!n){var e=t.duration||Math.abs((o-(l&&"time"in l?l.time:r._time))/r.timeScale());v._dur!==e&&at(v,e,0,1).render(v._time,!0,!0),n=1}d&&d.apply(v,h||[])}},t));return f?v.render(0):v},n.tweenFromTo=function(e,t,n){return this.tweenTo(t,Pe({startAt:{time:ut(this,e)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(e){return void 0===e&&(e=this._time),It(this,ut(this,e))},n.previousLabel=function(e){return void 0===e&&(e=this._time),It(this,ut(this,e),1)},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+D)},n.shiftChildren=function(e,t,n){void 0===n&&(n=0);var p,r=this._first,o=this.labels;for(e=Ie(e);r;)r._start>=n&&(r._start+=e,r._end+=e),r=r._next;if(t)for(p in o)o[p]>=n&&(o[p]+=e);return We(this)},n.invalidate=function(t){var n=this._first;for(this._lock=0;n;)n.invalidate(t),n=n._next;return e.prototype.invalidate.call(this,t)},n.clear=function(e){void 0===e&&(e=!0);for(var t,n=this._first;n;)t=n._next,this.remove(n),n=t;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),We(this)},n.totalDuration=function(e){var t,n,r,o=0,c=this,l=c._last,d=L;if(arguments.length)return c.timeScale((c._repeat<0?c.duration():c.totalDuration())/(c.reversed()?-e:e));if(c._dirty){for(r=c.parent;l;)t=l._prev,l._dirty&&l.totalDuration(),(n=l._start)>d&&c._sort&&l._ts&&!c._lock?(c._lock=1,Ze(c,l,n-l._delay,1)._lock=0):d=n,n<0&&l._ts&&(o-=n,(!r&&!c._dp||r&&r.smoothChildTiming)&&(c._start+=Ie(n/c._ts),c._time-=n,c._tTime-=n),c.shiftChildren(-n,!1,-Infinity),d=0),l._end>o&&l._ts&&(o=l._end),l=t;at(c,c===f&&c._time>o?c._time:o,1,1),c._dirty=0}return c._tDur},t.updateRoot=function(time){if(f._ts&&(xe(f,Qe(time,f)),_=Vt.frame),Vt.frame>=be){be+=R.autoSleep||120;var e=f._first;if((!e||!e._ts)&&R.autoSleep&&Vt._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Vt.sleep()}}},t}(tn);Pe(nn.prototype,{_lock:0,_hasPause:0,_forcing:0});
vendor: 35,693 bytes, line 2
2var rn,an,on=function(e,t,n,r,o,c,l){var d,h,f,v,m,y,E,a,_=new Rn(this._pt,e,t,0,1,kn,null,o),k=0,T=0;for(_.b=n,_.e=r,n+="",(E=~(r+="").indexOf("random("))&&(r=St(r)),c&&(c(a=[n,r],e,t),n=a[0],r=a[1]),h=n.match(ee)||[];d=ee.exec(r);)v=d[0],m=r.substring(k,d.index),f?f=(f+1)%5:"rgba("===m.substr(-5)&&(f=1),v!==h[T++]&&(y=parseFloat(h[T-1])||0,_._pt={_next:_._pt,p:m||1===T?m:",",s:y,c:"="===v.charAt(1)?Re(y,v)-y:parseFloat(v)-y,m:f&&f<4?Math.round:0},k=ee.lastIndex);return _.c=k<r.length?r.substring(k,r.length):"",_.fp=l,(te.test(r)||E)&&(_.e=0),this._pt=_,_},sn=function(e,t,n,r,o,c,l,d,h,f){B(r)&&(r=r(o||0,e,c));var v,m=e[t],y="get"!==n?n:B(m)?h?e[t.indexOf("set")||!B(e["get"+t.substr(3)])?t:"get"+t.substr(3)](h):e[t]():m,E=B(m)?h?gn:mn:vn;if(F(r)&&(~r.indexOf("random(")&&(r=St(r)),"="===r.charAt(1)&&((v=Re(y,r)+(ft(y)||0))||0===v)&&(r=v)),!f||y!==r||an)return isNaN(y*r)||""===r?(!m&&!(t in e)&&se(t,r),on.call(this,e,t,y,r,E,d||R.stringFilter,h)):(v=new Rn(this._pt,e,t,+y||0,r-(y||0),"boolean"==typeof m?_n:En,0,E),h&&(v.fp=h),l&&v.modifier(l,this,e),this._pt=v)},un=function(e,t,n,r,o,c){var l,d,h,i;if(ge[e]&&!1!==(l=new ge[e]).init(o,l.rawVars?t[e]:function(e,t,n,r,o){if(B(e)&&(e=dn(e,o,t,n,r)),!H(e)||e.style&&e.nodeType||$(e)||Y(e))return F(e)?dn(e,o,t,n,r):e;var p,c={};for(p in e)c[p]=dn(e[p],o,t,n,r);return c}(t[e],r,o,c,n),n,r,c)&&(n._pt=d=new Rn(n._pt,o,e,0,1,l.render,l,0,l.priority),n!==k))for(h=n._ptLookup[n._targets.indexOf(o)],i=l._props.length;i--;)h[l._props[i]]=d;return l},cn=function e(t,time,n){var r,i,p,o,c,h,v,m,y,E,_,k,T,w=t.vars,S=w.ease,A=w.startAt,I=w.immediateRender,R=w.lazy,x=w.onUpdate,C=w.runBackwards,M=w.yoyoEase,P=w.keyframes,N=w.autoRevert,U=t._dur,F=t._startAt,B=t._targets,j=t.parent,V=j&&"nested"===j.data?j.vars.targets:B,H="auto"===t._overwrite&&!l,G=t.timeline;if(G&&(!P||!S)&&(S="none"),t._ease=Qt(S,O.ease),t._yEase=M?Yt(Qt(!0===M?S:M,O.ease)):0,M&&t._yoyo&&!t._repeat&&(M=t._yEase,t._yEase=t._ease,t._ease=M),t._from=!G&&!!w.runBackwards,!G||P&&!w.stagger){if(k=(m=B[0]?Te(B[0]).harness:0)&&w[m.prop],r=Fe(w,pe),F&&(F._zTime<0&&F.progress(1),time<0&&C&&I&&!N?F.render(-1,!0):F.revert(C&&U?he:de),F._lazy=0),A){if(He(t._startAt=pn.set(B,Pe({data:"isStart",overwrite:!1,parent:j,immediateRender:!0,lazy:!F&&W(R),startAt:null,delay:0,onUpdate:x&&function(){return Rt(t,"onUpdate")},stagger:0},A))),t._startAt._dp=0,t._startAt._sat=t,time<0&&(d||!I&&!N)&&t._startAt.revert(he),I&&U&&time<=0&&n<=0)return void(time&&(t._zTime=time))}else if(C&&U&&!F)if(time&&(I=!1),p=Pe({overwrite:!1,data:"isFromStart",lazy:I&&!F&&W(R),immediateRender:I,stagger:0,parent:j},r),k&&(p[m.prop]=k),He(t._startAt=pn.set(B,p)),t._startAt._dp=0,t._startAt._sat=t,time<0&&(d?t._startAt.revert(he):t._startAt.render(-1,!0)),t._zTime=time,I){if(!time)return}else e(t._startAt,D,D);for(t._pt=t._ptCache=0,R=U&&W(R)||R&&!U,i=0;i<B.length;i++){if(v=(c=B[i])._gsap||ke(B)[i]._gsap,t._ptLookup[i]=E={},me[v.id]&&ve.length&&Le(),_=V===B?i:V.indexOf(c),m&&!1!==(y=new m).init(c,k||r,t,_,V)&&(t._pt=o=new Rn(t._pt,c,y.name,0,1,y.render,y,0,y.priority),y._props.forEach((function(e){E[e]=o})),y.priority&&(h=1)),!m||k)for(p in r)ge[p]&&(y=un(p,r,t,_,c,V))?y.priority&&(h=1):E[p]=o=sn.call(t,c,p,"get",r[p],_,V,0,w.stringFilter);t._op&&t._op[i]&&t.kill(c,t._op[i]),H&&t._pt&&(rn=t,f.killTweensOf(c,E,t.globalTime(time)),T=!t.parent,rn=0),t._pt&&R&&(me[v.id]=1)}h&&In(t),t._onInit&&t._onInit(t)}t._onUpdate=x,t._initted=(!t._op||t._pt)&&!T,P&&time<=0&&G.render(L,!0,!0)},ln=function(e,t,n,r){var p,a,o=t.ease||r||"power1.inOut";if($(t))a=n[e]||(n[e]=[]),t.forEach((function(e,i){return a.push({t:i/(t.length-1)*100,v:e,e:o})}));else for(p in t)a=n[p]||(n[p]=[]),"ease"===p||a.push({t:parseFloat(e),v:t[p],e:o})},dn=function(e,t,i,n,r){return B(e)?e.call(t,i,n,r):F(e)&&~e.indexOf("random(")?St(e):e},hn=_e+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",fn={};Se(hn+",id,stagger,delay,duration,paused,scrollTrigger",(function(e){return fn[e]=1}));var pn=function(e){function t(t,n,r,c){var d;"number"==typeof n&&(r.duration=n,n=r,r=null);var h,i,v,m,p,y,E,_,k=(d=e.call(this,c?n:Be(n))||this).vars,T=k.duration,w=k.delay,S=k.immediateRender,A=k.stagger,I=k.overwrite,O=k.keyframes,L=k.defaults,D=k.scrollTrigger,x=k.yoyoEase,C=n.parent||f,M=($(t)||Y(t)?j(t[0]):"length"in n)?[t]:gt(t);if(d._targets=M.length?ke(M):ue("GSAP target "+t+" not found. https://gsap.com",!R.nullTargetWarn)||[],d._ptLookup=[],d._overwrite=I,O||A||K(T)||K(w)){if(n=d.vars,(h=d.timeline=new nn({data:"nested",defaults:L||{},targets:C&&"nested"===C.data?C.vars.targets:M})).kill(),h.parent=h._dp=o(d),h._start=0,A||K(T)||K(w)){if(m=M.length,E=A&&Et(A),H(A))for(p in A)~hn.indexOf(p)&&(_||(_={}),_[p]=A[p]);for(i=0;i<m;i++)(v=Fe(n,fn)).stagger=0,x&&(v.yoyoEase=x),_&&Ne(v,_),y=M[i],v.duration=+dn(T,o(d),i,y,M),v.delay=(+dn(w,o(d),i,y,M)||0)-d._delay,!A&&1===m&&v.delay&&(d._delay=w=v.delay,d._start+=w,v.delay=0),h.to(y,v,E?E(i,y,M):0),h._ease=Wt.none;h.duration()?T=w=0:d.timeline=0}else if(O){Be(Pe(h.vars.defaults,{ease:"none"})),h._ease=Qt(O.ease||n.ease||"none");var a,P,N,time=0;if($(O))O.forEach((function(e){return h.to(M,e,">")})),h.duration();else{for(p in v={},O)"ease"===p||"easeEach"===p||ln(p,O[p],v,O.easeEach);for(p in v)for(a=v[p].sort((function(a,b){return a.t-b.t})),time=0,i=0;i<a.length;i++)(N={ease:(P=a[i]).e,duration:(P.t-(i?a[i-1].t:0))/100*T})[p]=P.v,h.to(M,N,time),time+=N.duration;h.duration()<T&&h.to({},{duration:T-h.duration()})}}T||d.duration(T=h.duration())}else d.timeline=0;return!0!==I||l||(rn=o(d),f.killTweensOf(M),rn=0),Ze(C,o(d),r),n.reversed&&d.reverse(),n.paused&&d.paused(!0),(S||!T&&!O&&d._start===Ie(C._time)&&W(S)&&Ke(o(d))&&"nested"!==C.data)&&(d._tTime=-1e-8,d.render(Math.max(0,-w)||0)),D&&et(o(d),D),d}c(t,e);var n=t.prototype;return n.render=function(e,t,n){var time,r,o,c,l,h,f,v,m,y=this._time,E=this._tDur,_=this._dur,k=e<0,T=e>E-D&&!k?E:e<D?0:e;if(_){if(T!==this._tTime||!e||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==k||this._lazy){if(time=T,v=this.timeline,this._repeat){if(c=_+this._rDelay,this._repeat<-1&&k)return this.totalTime(100*c+e,t,n);if(time=Ie(T%c),T===E?(o=this._repeat,time=_):(o=~~(l=Ie(T/c)))&&o===l?(time=_,o--):time>_&&(time=_),(h=this._yoyo&&1&o)&&(m=this._yEase,time=_-time),l=$e(this._tTime,c),time===y&&!n&&this._initted&&o===l)return this._tTime=T,this;o!==l&&(v&&this._yEase&&$t(v,h),this.vars.repeatRefresh&&!h&&!this._lock&&time!==c&&this._initted&&(this._lock=n=1,this.render(Ie(c*o),!0).invalidate()._lock=0))}if(!this._initted){if(tt(this,k?e:time,n,t,T))return this._tTime=0,this;if(!(y===this._time||n&&this.vars.repeatRefresh&&o!==l))return this;if(_!==this._dur)return this.render(e,t,n)}if(this._tTime=T,this._time=time,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=f=(m||this._ease)(time/_),this._from&&(this.ratio=f=1-f),!y&&T&&!t&&!l&&(Rt(this,"onStart"),this._tTime!==T))return this;for(r=this._pt;r;)r.r(f,r.d),r=r._next;v&&v.render(e<0?e:v._dur*v._ease(time/this._dur),t,n)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(k&&Ge(this,e,0,n),Rt(this,"onUpdate")),this._repeat&&o!==l&&this.vars.onRepeat&&!t&&this.parent&&Rt(this,"onRepeat"),T!==this._tDur&&T||this._tTime!==T||(k&&!this._onUpdate&&Ge(this,e,0,!0),(e||!_)&&(T===this._tDur&&this._ts>0||!T&&this._ts<0)&&He(this,1),t||k&&!y||!(T||y||h)||(Rt(this,T===E?"onComplete":"onReverseComplete",!0),this._prom&&!(T<E&&this.timeScale()>0)&&this._prom()))}}else!function(e,t,n,r){var o,c,l,h=e.ratio,f=t<0||!t&&(!e._start&&nt(e)&&(e._initted||!it(e))||(e._ts<0||e._dp._ts<0)&&!it(e))?0:1,v=e._rDelay,m=0;if(v&&e._repeat&&(m=ht(0,e._tDur,t),c=$e(m,v),e._yoyo&&1&c&&(f=1-f),c!==$e(e._tTime,v)&&(h=1-f,e.vars.repeatRefresh&&e._initted&&e.invalidate())),f!==h||d||r||e._zTime===D||!t&&e._zTime){if(!e._initted&&tt(e,t,r,n,m))return;for(l=e._zTime,e._zTime=t||(n?D:0),n||(n=t&&!l),e.ratio=f,e._from&&(f=1-f),e._time=0,e._tTime=m,o=e._pt;o;)o.r(f,o.d),o=o._next;t<0&&Ge(e,t,0,!0),e._onUpdate&&!n&&Rt(e,"onUpdate"),m&&e._repeat&&!n&&e.parent&&Rt(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===f&&(f&&He(e,1),n||d||(Rt(e,f?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)}(this,e,t,n);return this},n.targets=function(){return this._targets},n.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},n.resetTo=function(e,t,n,r,o){T||Vt.wake(),this._ts||this.play();var time=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||cn(this,time),function(e,t,n,r,o,c,time,l){var d,h,f,i,v=(e._pt&&e._ptCache||(e._ptCache={}))[t];if(!v)for(v=e._ptCache[t]=[],f=e._ptLookup,i=e._targets.length;i--;){if((d=f[i][t])&&d.d&&d.d._pt)for(d=d.d._pt;d&&d.p!==t&&d.fp!==t;)d=d._next;if(!d)return an=1,e.vars[t]="+=0",cn(e,time),an=0,l?ue(t+" not eligible for reset"):1;v.push(d)}for(i=v.length;i--;)(d=(h=v[i])._pt||h).s=!r&&0!==r||o?d.s+(r||0)+c*d.c:r,d.c=n-d.s,h.e&&(h.e=Ae(n)+ft(h.e)),h.b&&(h.b=d.s+ft(h.b))}(this,e,t,n,r,this._ease(time/this._dur),time,o)?this.resetTo(e,t,n,r,1):(Xe(this,0),this.parent||je(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(e,t){if(void 0===t&&(t="all"),!(e||t&&"all"!==t))return this._lazy=this._pt=0,this.parent?Ot(this):this.scrollTrigger&&this.scrollTrigger.kill(!!d),this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,rn&&!0!==rn.vars.overwrite)._first||Ot(this),this.parent&&n!==this.timeline.totalDuration()&&at(this,this._dur*this.timeline._tDur/n,0,1),this}var r,o,c,l,p,h,i,f=this._targets,v=e?gt(e):f,m=this._ptLookup,y=this._pt;if((!t||"all"===t)&&function(e,t){for(var i=e.length,n=i===t.length;n&&i--&&e[i]===t[i];);return i<0}(f,v))return"all"===t&&(this._pt=0),Ot(this);for(r=this._op=this._op||[],"all"!==t&&(F(t)&&(p={},Se(t,(function(e){return p[e]=1})),t=p),t=function(e,t){var n,p,i,r,o=e[0]?Te(e[0]).harness:0,c=o&&o.aliases;if(!c)return t;for(p in n=Ne({},t),c)if(p in n)for(i=(r=c[p].split(",")).length;i--;)n[r[i]]=n[p];return n}(f,t)),i=f.length;i--;)if(~v.indexOf(f[i]))for(p in o=m[i],"all"===t?(r[i]=t,l=o,c={}):(c=r[i]=r[i]||{},l=t),l)(h=o&&o[p])&&("kill"in h.d&&!0!==h.d.kill(p)||Ve(this,h,"_pt"),delete o[p]),"all"!==c&&(c[p]=1);return this._initted&&!this._pt&&y&&Ot(this),this},t.to=function(e,n){return new t(e,n,arguments[2])},t.from=function(e,t){return ct(1,arguments)},t.delayedCall=function(e,n,r,o){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:o})},t.fromTo=function(e,t,n){return ct(2,arguments)},t.set=function(e,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(e,n)},t.killTweensOf=function(e,t,n){return f.killTweensOf(e,t,n)},t}(tn);Pe(pn.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Se("staggerTo,staggerFrom,staggerFromTo",(function(e){pn[e]=function(){var t=new nn,n=pt.call(arguments,0);return n.splice("staggerFromTo"===e?5:4,0,0),t[e].apply(t,n)}}));var vn=function(e,t,n){return e[t]=n},mn=function(e,t,n){return e[t](n)},gn=function(e,t,n,data){return e[t](data.fp,n)},yn=function(e,t,n){return e.setAttribute(t,n)},bn=function(e,t){return B(e[t])?mn:V(e[t])&&e.setAttribute?yn:vn},En=function(e,data){return data.set(data.t,data.p,Math.round(1e6*(data.s+data.c*e))/1e6,data)},_n=function(e,data){return data.set(data.t,data.p,!!(data.s+data.c*e),data)},kn=function(e,data){var t=data._pt,s="";if(!e&&data.b)s=data.b;else if(1===e&&data.e)s=data.e;else{for(;t;)s=t.p+(t.m?t.m(t.s+t.c*e):Math.round(1e4*(t.s+t.c*e))/1e4)+s,t=t._next;s+=data.c}data.set(data.t,data.p,s,data)},Tn=function(e,data){for(var t=data._pt;t;)t.r(e,t.d),t=t._next},wn=function(e,t,n,r){for(var o,c=this._pt;c;)o=c._next,c.p===r&&c.modifier(e,t,n),c=o},Sn=function(e){for(var t,n,r=this._pt;r;)n=r._next,r.p===e&&!r.op||r.op===e?Ve(this,r,"_pt"):r.dep||(t=1),r=n;return!t},An=function(e,t,n,data){data.mSet(e,t,data.m.call(data.tween,n,data.mt),data)},In=function(e){for(var t,n,r,o,c=e._pt;c;){for(t=c._next,n=r;n&&n.pr>c.pr;)n=n._next;(c._prev=n?n._prev:o)?c._prev._next=c:r=c,(c._next=n)?n._prev=c:o=c,c=t}e._pt=r},Rn=function(){function e(e,t,n,r,o,c,data,l,d){this.t=t,this.s=r,this.c=o,this.p=n,this.r=c||En,this.d=data||this,this.set=l||vn,this.pr=d||0,this._next=e,e&&(e._prev=this)}return e.prototype.modifier=function(e,t,n){this.mSet=this.mSet||this.set,this.set=An,this.m=e,this.mt=n,this.tween=t},e}();Se(_e+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(e){return pe[e]=1})),ie.TweenMax=ie.TweenLite=pn,ie.TimelineLite=ie.TimelineMax=nn,f=new nn({sortChildren:!1,defaults:O,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),R.stringFilter=jt;var On=[],Ln={},Dn=[],xn=0,Cn=0,Mn=function(e){return(Ln[e]||Dn).map((function(e){return e()}))},Pn=function(){var time=Date.now(),e=[];time-xn>2&&(Mn("matchMediaInit"),On.forEach((function(t){var n,p,r,o,c=t.queries,l=t.conditions;for(p in c)(n=v.matchMedia(c[p]).matches)&&(r=1),n!==l[p]&&(l[p]=n,o=1);o&&(t.revert(),r&&e.push(t))})),Mn("matchMediaRevert"),e.forEach((function(e){return e.onMatch(e,(function(t){return e.add(null,t)}))})),xn=time,Mn("matchMedia"))},Nn=function(){function e(e,t){this.selector=t&&yt(t),this.data=[],this._r=[],this.isReverted=!1,this.id=Cn++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,n){B(e)&&(n=t,t=e,e=B);var r=this,o=function(){var e,o=h,c=r.selector;return o&&o!==r&&o.data.push(r),n&&(r.selector=yt(n)),h=r,e=t.apply(r,arguments),B(e)&&r._r.push(e),h=o,r.selector=c,r.isReverted=!1,e};return r.last=o,e===B?o(r,(function(e){return r.add(null,e)})):e?r[e]=o:o},t.ignore=function(e){var t=h;h=null,e(this),h=t},t.getTweens=function(){var a=[];return this.data.forEach((function(t){return t instanceof e?a.push.apply(a,t.getTweens()):t instanceof pn&&!(t.parent&&"nested"===t.parent.data)&&a.push(t)})),a},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var n=this;if(e?function(){for(var t,r=n.getTweens(),i=n.data.length;i--;)"isFlip"===(t=n.data[i]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach((function(e){return r.splice(r.indexOf(e),1)})));for(r.map((function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}})).sort((function(a,b){return b.g-a.g||-1/0})).forEach((function(t){return t.t.revert(e)})),i=n.data.length;i--;)(t=n.data[i])instanceof nn?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):!(t instanceof pn)&&t.revert&&t.revert(e);n._r.forEach((function(t){return t(e,n)})),n.isReverted=!0}():this.data.forEach((function(e){return e.kill&&e.kill()})),this.clear(),t)for(var i=On.length;i--;)On[i].id===this.id&&On.splice(i,1)},t.revert=function(e){this.kill(e||{})},e}(),Un=function(){function e(e){this.contexts=[],this.scope=e,h&&h.data.push(this)}var t=e.prototype;return t.add=function(e,t,n){H(e)||(e={matches:e});var r,p,o,c=new Nn(0,n||this.scope),l=c.conditions={};for(p in h&&!c.selector&&(c.selector=h.selector),this.contexts.push(c),t=c.add("onMatch",t),c.queries=e,e)"all"===p?o=1:(r=v.matchMedia(e[p]))&&(On.indexOf(c)<0&&On.push(c),(l[p]=r.matches)&&(o=1),r.addListener?r.addListener(Pn):r.addEventListener("change",Pn));return o&&t(c,(function(e){return c.add(null,e)})),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach((function(t){return t.kill(e,!0)}))},e}(),Fn={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach((function(e){return Dt(e)}))},timeline:function(e){return new nn(e)},getTweensOf:function(e,t){return f.getTweensOf(e,t)},getProperty:function(e,t,n,r){F(e)&&(e=gt(e)[0]);var o=Te(e||{}).get,c=n?Me:Ce;return"native"===n&&(n=""),e?t?c((ge[t]&&ge[t].get||o)(e,t,n,r)):function(t,n,r){return c((ge[t]&&ge[t].get||o)(e,t,n,r))}:e},quickSetter:function(e,t,n){if((e=gt(e)).length>1){var r=e.map((function(e){return Vn.quickSetter(e,t,n)})),o=r.length;return function(e){for(var i=o;i--;)r[i](e)}}e=e[0]||{};var c=ge[t],l=Te(e),p=l.harness&&(l.harness.aliases||{})[t]||t,d=c?function(t){var p=new c;k._pt=0,p.init(e,n?t+n:t,k,0,[e]),p.render(1,p),k._pt&&Tn(1,k)}:l.set(e,p);return c?d:function(t){return d(e,p,n?t+n:t,l,1)}},quickTo:function(e,t,n){var r,o=Vn.to(e,Pe(((r={})[t]="+=0.1",r.paused=!0,r.stagger=0,r),n||{})),c=function(e,n,r){return o.resetTo(t,e,n,r)};return c.tween=o,c},isTweening:function(e){return f.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Qt(e.ease,O.ease)),Ue(O,e||{})},config:function(e){return Ue(R,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,o=e.defaults,c=e.extendTimeline;(r||"").split(",").forEach((function(e){return e&&!ge[e]&&!ie[e]&&ue(t+" effect requires "+e+" plugin.")})),ye[t]=function(e,t,r){return n(gt(e),Pe(t||{},o),r)},c&&(nn.prototype[t]=function(e,n,r){return this.add(ye[t](e,H(n)?n:(r=n)&&{},this),r)})},registerEase:function(e,t){Wt[e]=Qt(t)},parseEase:function(e,t){return arguments.length?Qt(e,t):Wt},getById:function(e){return f.getById(e)},exportRoot:function(e,t){void 0===e&&(e={});var n,r,o=new nn(e);for(o.smoothChildTiming=W(e.smoothChildTiming),f.remove(o),o._dp=0,o._time=o._tTime=f._time,n=f._first;n;)r=n._next,!t&&!n._dur&&n instanceof pn&&n.vars.onComplete===n._targets[0]||Ze(o,n,n._start-n._delay),n=r;return Ze(f,o,0),o},context:function(e,t){return e?new Nn(e,t):h},matchMedia:function(e){return new Un(e)},matchMediaRefresh:function(){return On.forEach((function(e){var t,p,n=e.conditions;for(p in n)n[p]&&(n[p]=!1,t=1);t&&e.revert()}))||Pn()},addEventListener:function(e,t){var a=Ln[e]||(Ln[e]=[]);~a.indexOf(t)||a.push(t)},removeEventListener:function(e,t){var a=Ln[e],i=a&&a.indexOf(t);i>=0&&a.splice(i,1)},utils:{wrap:function e(t,n,r){var o=n-t;return $(t)?wt(t,e(0,t.length),n):lt(r,(function(e){return(o+(e-t)%o)%o+t}))},wrapYoyo:function e(t,n,r){var o=n-t,c=2*o;return $(t)?wt(t,e(0,t.length-1),n):lt(r,(function(e){return t+((e=(c+(e-t)%c)%c||0)>o?c-e:e)}))},distribute:Et,random:Tt,snap:kt,normalize:function(e,t,n){return At(e,t,0,1,n)},getUnit:ft,clamp:function(e,t,n){return lt(n,(function(n){return ht(e,t,n)}))},splitColor:Pt,toArray:gt,selector:yt,mapRange:At,pipe:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(e,t){return t(e)}),e)}},unitize:function(e,t){return function(n){return e(parseFloat(n))+(t||ft(n))}},interpolate:function e(t,n,progress,r){var o=isNaN(t+n)?0:function(p){return(1-p)*t+p*n};if(!o){var p,i,c,l,d,h=F(t),f={};if(!0===progress&&(r=1)&&(progress=null),h)t={p:t},n={p:n};else if($(t)&&!$(n)){for(c=[],l=t.length,d=l-2,i=1;i<l;i++)c.push(e(t[i-1],t[i]));l--,o=function(p){p*=l;var i=Math.min(d,~~p);return c[i](p-i)},progress=n}else r||(t=Ne($(t)?[]:{},t));if(!c){for(p in n)sn.call(f,t,p,"get",n[p]);o=function(p){return Tn(p,f)||(h?t.p:t)}}}return lt(progress,o)},shuffle:bt},install:oe,effects:ye,ticker:Vt,updateRoot:nn.updateRoot,plugins:ge,globalTimeline:f,core:{PropTween:Rn,globals:ce,Tween:pn,Timeline:nn,Animation:tn,getCache:Te,_removeLinkedListItem:Ve,reverting:function(){return d},context:function(e){return e&&h&&(h.data.push(e),e._ctx=h),h},suppressOverwrites:function(e){return l=e}}};Se("to,from,fromTo,delayedCall,set,killTweensOf",(function(e){return Fn[e]=pn[e]})),Vt.add(nn.updateRoot),k=Fn.to({},{duration:0});var Bn=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},jn=function(e,t){return{name:e,headless:1,rawVars:1,init:function(e,n,r){r._onInit=function(e){var r,p;if(F(n)&&(r={},Se(n,(function(e){return r[e]=1})),n=r),t){for(p in r={},n)r[p]=t(n[p]);n=r}!function(e,t){var p,i,n,r=e._targets;for(p in t)for(i=r.length;i--;)(n=e._ptLookup[i][p])&&(n=n.d)&&(n._pt&&(n=Bn(n,p)),n&&n.modifier&&n.modifier(t[p],e,r[i],p))}(e,n)}}}},Vn=Fn.registerPlugin({name:"attr",init:function(e,t,n,r,o){var p,c,l;for(p in this.tween=n,t)l=e.getAttribute(p)||"",(c=this.add(e,"setAttribute",(l||0)+"",t[p],r,o,0,0,p)).op=p,c.b=l,this._props.push(p)},render:function(e,data){for(var t=data._pt;t;)d?t.set(t.t,t.p,t.b,t):t.r(e,t.d),t=t._next}},{name:"endArray",headless:1,init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},jn("roundProps",_t),jn("modifiers"),jn("snap",kt))||Fn;pn.version=nn.version=Vn.version="3.14.2",E=1,G()&&Ht();Wt.Power0,Wt.Power1,Wt.Power2,Wt.Power3,Wt.Power4,Wt.Linear,Wt.Quad,Wt.Cubic,Wt.Quart,Wt.Quint,Wt.Strong,Wt.Elastic,Wt.Back,Wt.SteppedEase,Wt.Bounce,Wt.Sine,Wt.Expo,Wt.Circ;var Hn,Wn,qn,Gn,Kn,Yn,$n,Qn,zn={},Xn=180/Math.PI,Jn=Math.PI/180,Zn=Math.atan2,er=/([A-Z])/g,nr=/(left|right|width|margin|padding|x)/i,rr=/[\s,\(]\S/,ir={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},ar=function(e,data){return data.set(data.t,data.p,Math.round(1e4*(data.s+data.c*e))/1e4+data.u,data)},or=function(e,data){return data.set(data.t,data.p,1===e?data.e:Math.round(1e4*(data.s+data.c*e))/1e4+data.u,data)},sr=function(e,data){return data.set(data.t,data.p,e?Math.round(1e4*(data.s+data.c*e))/1e4+data.u:data.b,data)},ur=function(e,data){return data.set(data.t,data.p,1===e?data.e:e?Math.round(1e4*(data.s+data.c*e))/1e4+data.u:data.b,data)},cr=function(e,data){var t=data.s+data.c*e;data.set(data.t,data.p,~~(t+(t<0?-.5:.5))+data.u,data)},lr=function(e,data){return data.set(data.t,data.p,e?data.e:data.b,data)},dr=function(e,data){return data.set(data.t,data.p,1!==e?data.b:data.e,data)},fr=function(e,t,n){return e.style[t]=n},pr=function(e,t,n){return e.style.setProperty(t,n)},vr=function(e,t,n){return e._gsap[t]=n},mr=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},gr=function(e,t,n,data,r){var o=e._gsap;o.scaleX=o.scaleY=n,o.renderTransform(r,o)},yr=function(e,t,n,data,r){var o=e._gsap;o[t]=n,o.renderTransform(r,o)},Er="transform",_r=Er+"Origin",kr=function e(t,n){var r=this,o=this.target,style=o.style,c=o._gsap;if(t in zn&&style){if(this.tfm=this.tfm||{},"transform"===t)return ir.transform.split(",").forEach((function(p){return e.call(r,p,n)}));if(~(t=ir[t]||t).indexOf(",")?t.split(",").forEach((function(a){return r.tfm[a]=jr(o,a)})):this.tfm[t]=c.x?c[t]:jr(o,t),t===_r&&(this.tfm.zOrigin=c.zOrigin),this.props.indexOf(Er)>=0)return;c.svg&&(this.svgo=o.getAttribute("data-svg-origin"),this.props.push(_r,n,"")),t=Er}(style||n)&&this.props.push(t,n,style[t])},Tr=function(style){style.translate&&(style.removeProperty("translate"),style.removeProperty("scale"),style.removeProperty("rotate"))},wr=function(){var i,p,e=this.props,t=this.target,style=t.style,n=t._gsap;for(i=0;i<e.length;i+=3)e[i+1]?2===e[i+1]?t[e[i]](e[i+2]):t[e[i]]=e[i+2]:e[i+2]?style[e[i]]=e[i+2]:style.removeProperty("--"===e[i].substr(0,2)?e[i]:e[i].replace(er,"-$1").toLowerCase());if(this.tfm){for(p in this.tfm)n[p]=this.tfm[p];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),(i=$n())&&i.isStart||style[Er]||(Tr(style),n.zOrigin&&style[_r]&&(style[_r]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},Sr=function(e,t){var n={target:e,props:[],revert:wr,save:kr};return e._gsap||Vn.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach((function(p){return n.save(p)})),n},Ar=function(e,t){var n=Wn.createElementNS?Wn.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Wn.createElement(e);return n&&n.style?n:Wn.createElement(e)},Ir=function e(t,n,r){var o=getComputedStyle(t);return o[n]||o.getPropertyValue(n.replace(er,"-$1").toLowerCase())||o.getPropertyValue(n)||!r&&e(t,Or(n)||n,1)||""},Rr="O,Moz,ms,Ms,Webkit".split(","),Or=function(e,element,t){var s=(element||Kn).style,i=5;if(e in s&&!t)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(Rr[i]+e in s););return i<0?null:(3===i?"ms":i>=0?Rr[i]:"")+e},Lr=function(){"undefined"!=typeof window&&window.document&&(Hn=window,Wn=Hn.document,qn=Wn.documentElement,Kn=Ar("div")||{style:{}},Ar("div"),Er=Or(Er),_r=Er+"Origin",Kn.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Qn=!!Or("perspective"),$n=Vn.core.reverting,Gn=1)},Dr=function(e){var t,n=e.ownerSVGElement,svg=Ar("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=e.cloneNode(!0);r.style.display="block",svg.appendChild(r),qn.appendChild(svg);try{t=r.getBBox()}catch(e){}return svg.removeChild(r),qn.removeChild(svg),t},xr=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},Cr=function(e){var t,n;try{t=e.getBBox()}catch(r){t=Dr(e),n=1}return t&&(t.width||t.height)||n||(t=Dr(e)),!t||t.width||t.x||t.y?t:{x:+xr(e,["x","cx","x1"])||0,y:+xr(e,["y","cy","y1"])||0,width:0,height:0}},Mr=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!Cr(e))},Pr=function(e,t){if(t){var n,style=e.style;t in zn&&t!==_r&&(t=Er),style.removeProperty?("ms"!==(n=t.substr(0,2))&&"webkit"!==t.substr(0,6)||(t="-"+t),style.removeProperty("--"===n?t:t.replace(er,"-$1").toLowerCase())):style.removeAttribute(t)}},Nr=function(e,t,n,r,o,c){var l=new Rn(e._pt,t,n,0,1,c?dr:lr);return e._pt=l,l.b=r,l.e=o,e._props.push(n),l},Ur={deg:1,rad:1,turn:1},Fr={grid:1,flex:1},Br=function e(t,n,r,o){var c,l,d,h,f=parseFloat(r)||0,v=(r+"").trim().substr((f+"").length)||"px",style=Kn.style,m=nr.test(n),y="svg"===t.tagName.toLowerCase(),E=(y?"client":"offset")+(m?"Width":"Height"),_=100,k="px"===o,T="%"===o;if(o===v||!f||Ur[o]||Ur[v])return f;if("px"!==v&&!k&&(f=e(t,n,r,"px")),h=t.getCTM&&Mr(t),(T||"%"===v)&&(zn[n]||~n.indexOf("adius")))return c=h?t.getBBox()[m?"width":"height"]:t[E],Ae(T?f/c*_:f/100*c);if(style[m?"width":"height"]=_+(k?v:o),l="rem"!==o&&~n.indexOf("adius")||"em"===o&&t.appendChild&&!y?t:t.parentNode,h&&(l=(t.ownerSVGElement||{}).parentNode),l&&l!==Wn&&l.appendChild||(l=Wn.body),(d=l._gsap)&&T&&d.width&&m&&d.time===Vt.time&&!d.uncache)return Ae(f/d.width*_);if(!T||"height"!==n&&"width"!==n)(T||"%"===v)&&!Fr[Ir(l,"display")]&&(style.position=Ir(t,"position")),l===t&&(style.position="static"),l.appendChild(Kn),c=Kn[E],l.removeChild(Kn),style.position="absolute";else{var w=t.style[n];t.style[n]=_+o,c=t[E],w?t.style[n]=w:Pr(t,n)}return m&&T&&((d=Te(l)).time=Vt.time,d.width=l[E]),Ae(k?c*f/_:c&&f?_/c*f:0)},jr=function(e,t,n,r){var o;return Gn||Lr(),t in ir&&"transform"!==t&&~(t=ir[t]).indexOf(",")&&(t=t.split(",")[0]),zn[t]&&"transform"!==t?(o=Xr(e,r),o="transformOrigin"!==t?o[t]:o.svg?o.origin:Jr(Ir(e,_r))+" "+o.zOrigin+"px"):(!(o=e.style[t])||"auto"===o||r||~(o+"").indexOf("calc("))&&(o=qr[t]&&qr[t](e,t,n)||Ir(e,t)||we(e,t)||("opacity"===t?1:0)),n&&!~(o+"").trim().indexOf(" ")?Br(e,t,o,n)+n:o},Vr=function(e,t,n,r){if(!n||"none"===n){var p=Or(t,e,1),s=p&&Ir(e,p,1);s&&s!==n?(t=p,n=s):"borderColor"===t&&(n=Ir(e,"borderTopColor"))}var a,o,c,l,d,h,f,v,m,y,E,_=new Rn(this._pt,e.style,t,0,1,kn),k=0,T=0;if(_.b=n,_.e=r,n+="","var(--"===(r+="").substring(0,6)&&(r=Ir(e,r.substring(4,r.indexOf(")")))),"auto"===r&&(h=e.style[t],e.style[t]=r,r=Ir(e,t)||r,h?e.style[t]=h:Pr(e,t)),jt(a=[n,r]),r=a[1],c=(n=a[0]).match(Z)||[],(r.match(Z)||[]).length){for(;o=Z.exec(r);)f=o[0],m=r.substring(k,o.index),d?d=(d+1)%5:"rgba("!==m.substr(-5)&&"hsla("!==m.substr(-5)||(d=1),f!==(h=c[T++]||"")&&(l=parseFloat(h)||0,E=h.substr((l+"").length),"="===f.charAt(1)&&(f=Re(l,f)+E),v=parseFloat(f),y=f.substr((v+"").length),k=Z.lastIndex-y.length,y||(y=y||R.units[t]||E,k===r.length&&(r+=y,_.e+=y)),E!==y&&(l=Br(e,t,h,y)||0),_._pt={_next:_._pt,p:m||1===T?m:",",s:l,c:v-l,m:d&&d<4||"zIndex"===t?Math.round:0});_.c=k<r.length?r.substring(k,r.length):""}else _.r="display"===t&&"none"===r?dr:lr;return te.test(r)&&(_.e=0),this._pt=_,_},Hr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Wr=function(e,data){if(data.tween&&data.tween._time===data.tween._dur){var t,n,i,r=data.t,style=r.style,o=data.u,c=r._gsap;if("all"===o||!0===o)style.cssText="",n=1;else for(i=(o=o.split(",")).length;--i>-1;)t=o[i],zn[t]&&(n=1,t="transformOrigin"===t?_r:Er),Pr(r,t);n&&(Pr(r,Er),c&&(c.svg&&r.removeAttribute("transform"),style.scale=style.rotate=style.translate="none",Xr(r,1),c.uncache=1,Tr(style)))}},qr={clearProps:function(e,t,n,r,o){if("isFromStart"!==o.data){var c=e._pt=new Rn(e._pt,t,n,0,0,Wr);return c.u=r,c.pr=-10,c.tween=o,e._props.push(n),1}}},Gr=[1,0,0,1,0,0],Kr={},Yr=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},$r=function(e){var t=Ir(e,Er);return Yr(t)?Gr:t.substr(7).match(J).map(Ae)},Qr=function(e,t){var n,r,o,c,l=e._gsap||Te(e),style=e.style,d=$r(e);return l.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(d=[(o=e.transform.baseVal.consolidate().matrix).a,o.b,o.c,o.d,o.e,o.f]).join(",")?Gr:d:(d!==Gr||e.offsetParent||e===qn||l.svg||(o=style.display,style.display="block",(n=e.parentNode)&&(e.offsetParent||e.getBoundingClientRect().width)||(c=1,r=e.nextElementSibling,qn.appendChild(e)),d=$r(e),o?style.display=o:Pr(e,"display"),c&&(r?n.insertBefore(e,r):n?n.appendChild(e):qn.removeChild(e))),t&&d.length>6?[d[0],d[1],d[4],d[5],d[12],d[13]]:d)},zr=function(e,t,n,r,o,c){var l,d,h,f=e._gsap,v=o||Qr(e,!0),m=f.xOrigin||0,y=f.yOrigin||0,E=f.xOffset||0,_=f.yOffset||0,a=v[0],b=v[1],k=v[2],T=v[3],w=v[4],S=v[5],A=t.split(" "),I=parseFloat(A[0])||0,R=parseFloat(A[1])||0;n?v!==Gr&&(d=a*T-b*k)&&(h=I*(-b/d)+R*(a/d)-(a*S-b*w)/d,I=I*(T/d)+R*(-k/d)+(k*S-T*w)/d,R=h):(I=(l=Cr(e)).x+(~A[0].indexOf("%")?I/100*l.width:I),R=l.y+(~(A[1]||A[0]).indexOf("%")?R/100*l.height:R)),r||!1!==r&&f.smooth?(w=I-m,S=R-y,f.xOffset=E+(w*a+S*k)-w,f.yOffset=_+(w*b+S*T)-S):f.xOffset=f.yOffset=0,f.xOrigin=I,f.yOrigin=R,f.smooth=!!r,f.origin=t,f.originIsAbsolute=!!n,e.style[_r]="0px 0px",c&&(Nr(c,f,"xOrigin",m,I),Nr(c,f,"yOrigin",y,R),Nr(c,f,"xOffset",E,f.xOffset),Nr(c,f,"yOffset",_,f.yOffset)),e.setAttribute("data-svg-origin",I+" "+R)},Xr=function(e,t){var n=e._gsap||new en(e);if("x"in n&&!t&&!n.uncache)return n;var r,o,c,l,d,h,f,v,m,y,E,_,k,T,w,S,A,a,b,I,O,L,D,x,C,M,P,N,U,F,B,j,style=e.style,V=n.scaleX<0,H="px",W="deg",G=getComputedStyle(e),K=Ir(e,_r)||"0";return r=o=c=h=f=v=m=y=E=0,l=d=1,n.svg=!(!e.getCTM||!Mr(e)),G.translate&&("none"===G.translate&&"none"===G.scale&&"none"===G.rotate||(style[Er]=("none"!==G.translate?"translate3d("+(G.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==G.rotate?"rotate("+G.rotate+") ":"")+("none"!==G.scale?"scale("+G.scale.split(" ").join(",")+") ":"")+("none"!==G[Er]?G[Er]:"")),style.scale=style.rotate=style.translate="none"),T=Qr(e,n.svg),n.svg&&(n.uncache?(C=e.getBBox(),K=n.xOrigin-C.x+"px "+(n.yOrigin-C.y)+"px",x=""):x=!t&&e.getAttribute("data-svg-origin"),zr(e,x||K,!!x||n.originIsAbsolute,!1!==n.smooth,T)),_=n.xOrigin||0,k=n.yOrigin||0,T!==Gr&&(a=T[0],b=T[1],I=T[2],O=T[3],r=L=T[4],o=D=T[5],6===T.length?(l=Math.sqrt(a*a+b*b),d=Math.sqrt(O*O+I*I),h=a||b?Zn(b,a)*Xn:0,(m=I||O?Zn(I,O)*Xn+h:0)&&(d*=Math.abs(Math.cos(m*Jn))),n.svg&&(r-=_-(_*a+k*I),o-=k-(_*b+k*O))):(j=T[6],F=T[7],P=T[8],N=T[9],U=T[10],B=T[11],r=T[12],o=T[13],c=T[14],f=(w=Zn(j,U))*Xn,w&&(x=L*(S=Math.cos(-w))+P*(A=Math.sin(-w)),C=D*S+N*A,M=j*S+U*A,P=L*-A+P*S,N=D*-A+N*S,U=j*-A+U*S,B=F*-A+B*S,L=x,D=C,j=M),v=(w=Zn(-I,U))*Xn,w&&(S=Math.cos(-w),B=O*(A=Math.sin(-w))+B*S,a=x=a*S-P*A,b=C=b*S-N*A,I=M=I*S-U*A),h=(w=Zn(b,a))*Xn,w&&(x=a*(S=Math.cos(w))+b*(A=Math.sin(w)),C=L*S+D*A,b=b*S-a*A,D=D*S-L*A,a=x,L=C),f&&Math.abs(f)+Math.abs(h)>359.9&&(f=h=0,v=180-v),l=Ae(Math.sqrt(a*a+b*b+I*I)),d=Ae(Math.sqrt(D*D+j*j)),w=Zn(L,D),m=Math.abs(w)>2e-4?w*Xn:0,E=B?1/(B<0?-B:B):0),n.svg&&(x=e.getAttribute("transform"),n.forceCSS=e.setAttribute("transform","")||!Yr(Ir(e,Er)),x&&e.setAttribute("transform",x))),Math.abs(m)>90&&Math.abs(m)<270&&(V?(l*=-1,m+=h<=0?180:-180,h+=h<=0?180:-180):(d*=-1,m+=m<=0?180:-180)),t=t||n.uncache,n.x=r-((n.xPercent=r&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-r)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+H,n.y=o-((n.yPercent=o&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-o)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+H,n.z=c+H,n.scaleX=Ae(l),n.scaleY=Ae(d),n.rotation=Ae(h)+W,n.rotationX=Ae(f)+W,n.rotationY=Ae(v)+W,n.skewX=m+W,n.skewY=y+W,n.transformPerspective=E+H,(n.zOrigin=parseFloat(K.split(" ")[2])||!t&&n.zOrigin||0)&&(style[_r]=Jr(K)),n.xOffset=n.yOffset=0,n.force3D=R.force3D,n.renderTransform=n.svg?ai:Qn?ii:ei,n.uncache=0,n},Jr=function(e){return(e=e.split(" "))[0]+" "+e[1]},Zr=function(e,t,n){var r=ft(t);return Ae(parseFloat(t)+parseFloat(Br(e,"x",n+"px",r)))+r},ei=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,ii(e,t)},ti="0deg",ni="0px",ri=") ",ii=function(e,t){var n=t||this,r=n.xPercent,o=n.yPercent,c=n.x,l=n.y,d=n.z,h=n.rotation,f=n.rotationY,v=n.rotationX,m=n.skewX,y=n.skewY,E=n.scaleX,_=n.scaleY,k=n.transformPerspective,T=n.force3D,w=n.target,S=n.zOrigin,A="",I="auto"===T&&e&&1!==e||!0===T;if(S&&(v!==ti||f!==ti)){var R,O=parseFloat(f)*Jn,L=Math.sin(O),D=Math.cos(O);O=parseFloat(v)*Jn,R=Math.cos(O),c=Zr(w,c,L*R*-S),l=Zr(w,l,-Math.sin(O)*-S),d=Zr(w,d,D*R*-S+S)}k!==ni&&(A+="perspective("+k+ri),(r||o)&&(A+="translate("+r+"%, "+o+"%) "),(I||c!==ni||l!==ni||d!==ni)&&(A+=d!==ni||I?"translate3d("+c+", "+l+", "+d+") ":"translate("+c+", "+l+ri),h!==ti&&(A+="rotate("+h+ri),f!==ti&&(A+="rotateY("+f+ri),v!==ti&&(A+="rotateX("+v+ri),m===ti&&y===ti||(A+="skew("+m+", "+y+ri),1===E&&1===_||(A+="scale("+E+", "+_+ri),w.style[Er]=A||"translate(0, 0)"},ai=function(e,t){var n,r,o,c,l,d=t||this,h=d.xPercent,f=d.yPercent,v=d.x,m=d.y,y=d.rotation,E=d.skewX,_=d.skewY,k=d.scaleX,T=d.scaleY,w=d.target,S=d.xOrigin,A=d.yOrigin,I=d.xOffset,R=d.yOffset,O=d.forceCSS,L=parseFloat(v),D=parseFloat(m);y=parseFloat(y),E=parseFloat(E),(_=parseFloat(_))&&(E+=_=parseFloat(_),y+=_),y||E?(y*=Jn,E*=Jn,n=Math.cos(y)*k,r=Math.sin(y)*k,o=Math.sin(y-E)*-T,c=Math.cos(y-E)*T,E&&(_*=Jn,l=Math.tan(E-_),o*=l=Math.sqrt(1+l*l),c*=l,_&&(l=Math.tan(_),n*=l=Math.sqrt(1+l*l),r*=l)),n=Ae(n),r=Ae(r),o=Ae(o),c=Ae(c)):(n=k,c=T,r=o=0),(L&&!~(v+"").indexOf("px")||D&&!~(m+"").indexOf("px"))&&(L=Br(w,"x",v,"px"),D=Br(w,"y",m,"px")),(S||A||I||R)&&(L=Ae(L+S-(S*n+A*o)+I),D=Ae(D+A-(S*r+A*c)+R)),(h||f)&&(l=w.getBBox(),L=Ae(L+h/100*l.width),D=Ae(D+f/100*l.height)),l="matrix("+n+","+r+","+o+","+c+","+L+","+D+")",w.setAttribute("transform",l),O&&(w.style[Er]=l)},oi=function(e,t,n,r,o){var c,l,d=360,h=F(o),f=parseFloat(o)*(h&&~o.indexOf("rad")?Xn:1)-r,v=r+f+"deg";return h&&("short"===(c=o.split("_")[1])&&(f%=d)!==f%180&&(f+=f<0?d:-360),"cw"===c&&f<0?f=(f+36e9)%d-~~(f/d)*d:"ccw"===c&&f>0&&(f=(f-36e9)%d-~~(f/d)*d)),e._pt=l=new Rn(e._pt,t,n,r,f,or),l.e=v,l.u="deg",e._props.push(n),l},si=function(e,source){for(var p in source)e[p]=source[p];return e},ui=function(e,t,n){var r,p,o,c,l,d,h,f=si({},n._gsap),style=n.style;for(p in f.svg?(o=n.getAttribute("transform"),n.setAttribute("transform",""),style[Er]=t,r=Xr(n,1),Pr(n,Er),n.setAttribute("transform",o)):(o=getComputedStyle(n)[Er],style[Er]=t,r=Xr(n,1),style[Er]=o),zn)(o=f[p])!==(c=r[p])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(p)<0&&(l=ft(o)!==(h=ft(c))?Br(n,p,o,h):parseFloat(o),d=parseFloat(c),e._pt=new Rn(e._pt,r,p,l,d-l,ar),e._pt.u=h||0,e._props.push(p));si(r,f)};Se("padding,margin,Width,Radius",(function(e,t){var n="Top",r="Right",b="Bottom",o="Left",c=(t<3?[n,r,b,o]:[n+o,n+r,b+r,b+o]).map((function(n){return t<2?e+n:"border"+n+e}));qr[t>1?"border"+e:e]=function(e,t,n,r,o){var a,l;if(arguments.length<4)return a=c.map((function(t){return jr(e,t,n)})),5===(l=a.join(" ")).split(a[0]).length?a[0]:l;a=(r+"").split(" "),l={}
vendor: 3,278 bytes, line 2
2,c.forEach((function(e,i){return l[e]=a[i]=a[i]||a[(i-1)/2|0]})),e.init(t,l,o)}}));var ci,di,hi,fi={name:"css",register:Lr,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,o,c){var l,d,h,f,v,m,p,y,E,_,k,T,w,S,A,I,O,L,D,x,C,M=this._props,style=e.style,P=n.vars.startAt;for(p in Gn||Lr(),this.styles=this.styles||Sr(e),I=this.styles.props,this.tween=n,t)if("autoRound"!==p&&(d=t[p],!ge[p]||!un(p,t,n,o,e,c)))if(v=Object(r.a)(d),m=qr[p],"function"===v&&(d=d.call(n,o,e,c),v=Object(r.a)(d)),"string"===v&&~d.indexOf("random(")&&(d=St(d)),m)m(this,e,p,d,n)&&(A=1);else if("--"===p.substr(0,2))l=(getComputedStyle(e).getPropertyValue(p)+"").trim(),d+="",Ft.lastIndex=0,Ft.test(l)||(y=ft(l),(E=ft(d))?y!==E&&(l=Br(e,p,l,E)+E):y&&(d+=y)),this.add(style,"setProperty",l,d,o,c,0,0,p),M.push(p),I.push(p,0,style[p]);else if("undefined"!==v){if(P&&p in P?(l="function"==typeof P[p]?P[p].call(n,o,e,c):P[p],F(l)&&~l.indexOf("random(")&&(l=St(l)),ft(l+"")||"auto"===l||(l+=R.units[p]||ft(jr(e,p))||""),"="===(l+"").charAt(1)&&(l=jr(e,p))):l=jr(e,p),f=parseFloat(l),(_="string"===v&&"="===d.charAt(1)&&d.substr(0,2))&&(d=d.substr(2)),h=parseFloat(d),p in ir&&("autoAlpha"===p&&(1===f&&"hidden"===jr(e,"visibility")&&h&&(f=0),I.push("visibility",0,style.visibility),Nr(this,style,"visibility",f?"inherit":"hidden",h?"inherit":"hidden",!h)),"scale"!==p&&"transform"!==p&&~(p=ir[p]).indexOf(",")&&(p=p.split(",")[0])),k=p in zn){if(this.styles.save(p),O=d,"string"===v&&"var(--"===d.substring(0,6)){if("calc("===(d=Ir(e,d.substring(4,d.indexOf(")")))).substring(0,5)){var N=e.style.perspective;e.style.perspective=d,d=Ir(e,"perspective"),N?e.style.perspective=N:Pr(e,"perspective")}h=parseFloat(d)}if(T||((w=e._gsap).renderTransform&&!t.parseTransform||Xr(e,t.parseTransform),S=!1!==t.smoothOrigin&&w.smooth,(T=this._pt=new Rn(this._pt,style,Er,0,1,w.renderTransform,w,0,-1)).dep=1),"scale"===p)this._pt=new Rn(this._pt,w,"scaleY",w.scaleY,(_?Re(w.scaleY,_+h):h)-w.scaleY||0,ar),this._pt.u=0,M.push("scaleY",p),p+="X";else{if("transformOrigin"===p){I.push(_r,0,style[_r]),D=void 0,x=void 0,C=void 0,D=(L=d).split(" "),x=D[0],C=D[1]||"50%","top"!==x&&"bottom"!==x&&"left"!==C&&"right"!==C||(L=x,x=C,C=L),D[0]=Hr[x]||x,D[1]=Hr[C]||C,d=D.join(" "),w.svg?zr(e,d,0,S,0,this):((E=parseFloat(d.split(" ")[2])||0)!==w.zOrigin&&Nr(this,w,"zOrigin",w.zOrigin,E),Nr(this,style,p,Jr(l),Jr(d)));continue}if("svgOrigin"===p){zr(e,d,1,S,0,this);continue}if(p in Kr){oi(this,w,p,f,_?Re(f,_+d):d);continue}if("smoothOrigin"===p){Nr(this,w,"smooth",w.smooth,d);continue}if("force3D"===p){w[p]=d;continue}if("transform"===p){ui(this,d,e);continue}}}else p in style||(p=Or(p)||p);if(k||(h||0===h)&&(f||0===f)&&!rr.test(d)&&p in style)h||(h=0),(y=(l+"").substr((f+"").length))!==(E=ft(d)||(p in R.units?R.units[p]:y))&&(f=Br(e,p,l,E)),this._pt=new Rn(this._pt,k?w:style,p,f,(_?Re(f,_+h):h)-f,k||"px"!==E&&"zIndex"!==p||!1===t.autoRound?ar:cr),this._pt.u=E||0,k&&O!==d?(this._pt.b=l,this._pt.e=O,this._pt.r=ur):y!==E&&"%"!==E&&(this._pt.b=l,this._pt.r=sr);else if(p in style)Vr.call(this,e,p,l,_?_+d:d);else if(p in e)this.add(e,p,l||e[p],_?_+d:d,o,c);else if("parseTransform"!==p){se(p,d);continue}k||(p in style?I.push(p,0,style[p]):"function"==typeof e[p]?I.push(p,2,e[p]()):I.push(p,1,l||e[p]
2)),M.push(p)}A&&In(this)},render:function(e,data){if(data.tween._time||!$n())for(var t=data._pt;t;)t.r(e,t.d),t=t._next;else data.styles.revert()},get:jr,aliases:ir,getSetter:function(e,t,n){var p=ir[t];return p&&p.indexOf(",")<0&&(t=p),t in zn&&t!==_r&&(e._gsap.x||jr(e,"x"))?n&&Yn===n?"scale"===t?mr:vr:(Yn=n||{})&&("scale"===t?gr:yr):e.style&&!V(e.style[t])?fr:~t.indexOf("-")?pr:bn(e,t)},core:{_removeProperty:Pr,_getMatrix:Qr}};Vn.utils.checkPrefix=Or,Vn.core.getStyleSaver=Sr,hi=Se((ci="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(di="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(e){zn[e]=1})),Se(di,(function(e){R.units[e]="deg",Kr[e]=1})),ir[hi[13]]=ci+","+di,Se("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(e){var t=e.split(":");ir[t[1]]=hi[t[0]]})),Se("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(e){R.units[e]="px"})),Vn.registerPlugin(fi);var pi=Vn.registerPlugin(fi)||Vn;pi.core.Tween},397:function(e,t,n){e.exports=function(){"use strict";var e="minute",i=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(s,n,r){var u=n.prototype;r.utc=function(e){return new n({date:e,utc:!0,args:arguments})},u.utc=function(i){var t=r(this.toDate(),{locale:this.$L,utc:!0});return i?t.add(this.utcOffset(),e):t},u.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var c=u.init;u.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var a=u.utcOffset;u.utcOffset=function(s,n){var r=this.$utils().u;if(r(s))return this.$u?0:r(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&null===(s=function(e){void 0===e&&(e="");var s=e.match(i);if(!s)return null;var n=(""+s[0]).match(t)||["-",0,0],r=n[0],u=60*+n[1]+ +n[2];return 0===u?0:"+"===r?u:-u}(s)))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(n)return o.$offset=u,o.$u=0===s,o;if(0!==s){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+c,e)).$offset=u,o.$x.$localOffset=c}else o=this.utc();return o};var l=u.format;u.format=function(e){var i=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,i)},u.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var d=u.toDate;u.toDate=function(e){return"s"===e&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=u.diff;u.diff=function(e,i,t){if(e&&this.$u===e.$u)return h.call(this,e,i,t);var s=this.local(),n=r(e).local();return h.call(s,n,i,t)}}}()},422:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="7.56.0"},423:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(30);function o(e,t){!0===t.debug&&console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");const n=Object(r.c)();n.getScope().update(t.initialScope);const o=new e(t);n.bindClient(o)}},433:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=Object.prototype,o=r.toString,c=r.hasOwnProperty,l=new Map;function d(a,b){try{return h(a,b)}finally{l.clear()}}function h(a,b){if(a===b)return!0;var e=o.call(a);if(e!==o.call(b))return!1;switch(e){case"[object Array]":if(a.length!==b.length)return!1;case"[object Object]":if(f(a,b))return!0;var t=Object.keys(a),n=Object.keys(b),r=t.length;if(r!==n.length)return!1;for(var l=0;l<r;++l)if(!c.call(b,t[l]))return!1;for(l=0;l<r;++l){var d=t[l];if(!h(a[d],b[d]))return!1}return!0;case"[object Error]":return a.name===b.name&&a.message===b.message;case"[object Number]":if(a!=a)return b!=b;case"[object Boolean]":case"[object Date]":return+a==+b;case"[object RegExp]":case"[object String]":return a==""+b;case"[object Map]":case"[object Set]":if(a.size!==b.size)return!1;if(f(a,b))return!0;for(var v=a.entries(),m="[object Map]"===e;;){var y=v.next();if(y.done)break;var E=y.value,_=E[0],k=E[1];if(!b.has(_))return!1;if(m&&!h(k,b.get(_)))return!1}return!0}return!1}function f(a,b){var e=l.get(a);if(e){if(e.has(b))return!0}else l.set(a,e=new Set);return e.add(b),!1}},434:function(e,t,n){"use strict";var r=n(300);e.exports=function e(t,path,n){var o;void 0===path&&(path=""),void 0===n&&(n=r);var c=new Map;function l(e,t){var n=c.get(t);n?n.push.apply(n,e):c.set(t,e)}if(n(t))o=null,l([path],t);else{var d=path?path+".":"";if("undefined"!=typeof FileList&&t instanceof FileList)o=Array.prototype.map.call(t,(function(e,i){return l([""+d+i],e),null}));else if(Array.isArray(t))o=t.map((function(t,i){var r=e(t,""+d+i,n);
2return r.files.forEach(l),r.clone}));else if(t&&t.constructor===Object)for(var i in o={},t){var h=e(t[i],""+d+i,n);h.files.forEach(l),o[i]=h.clone}else o=t}return{clone:o,files:c}}},448:function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(261),o=n(139),c=n(49),l=n(190),d=n(462),h=n(464),f=n(162);var v=n(213),m=n(102),y=n(249);class E{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(e){if(E.prototype.__init.call(this),E.prototype.__init2.call(this),E.prototype.__init3.call(this),E.prototype.__init4.call(this),E.prototype.__init5.call(this),this._options=e,e.dsn&&(this._dsn=Object(r.c)(e.dsn)),this._dsn){const t=Object(f.a)(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(Object(o.d)(e))return;let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{r=e}))),r}captureMessage(e,t,n,r){let o=n&&n.event_id;const l=Object(c.j)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(l.then((e=>this._captureEvent(e,n,r))).then((e=>{o=e}))),o}captureEvent(e,t,n){if(t&&t.originalException&&Object(o.d)(t.originalException))return;let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((e=>{r=e}))),r}captureSession(e){this._isEnabled()&&("string"!=typeof e.release||(this.sendSession(e),Object(m.c)(e,{init:!1})))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;
2return t?this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e)))):Object(l.c)(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,e)))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Object(v.c)(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(e){return null}}addIntegration(e){Object(v.b)(e,this._integrations)}sendEvent(e,t={}){if(this._dsn){let n=function(e,t,n,r){const o=Object(d.h)(n),c=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const l=Object(d.d)(e,o,r,t);delete e.sdkProcessingMetadata;const h=[{type:c},e];return Object(d.c)(l,[h])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Object(d.a)(n,Object(d.b)(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}}sendSession(e){if(this._dsn){const t=function(e,t,n,o){const c=Object(d.h)(n),l={sent_at:(new Date).toISOString(),...c&&{sdk:c},...!!o&&{dsn:Object(r.b)(t)}},h="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Object(d.c)(l,[h])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n=`${e}:${t}`;this._outcomes[n]=this._outcomes[n]+1||1}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach((e=>e(...t)))}_updateSessionFromEvent(e,t){let n=!1,r=!1;const o=t.exception&&t.exception.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const c="ok"===e.status;(c&&0===e.errors||c&&n)&&(Object(m.c)(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new l.a((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const r=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),Object(y.a)(r,e,t,n)}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{0}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r;if(!this._isEnabled())return Object(l.b)(new h.a("SDK not enabled, will not capture event.","log"));const d=k(e),f=_(e),v=e.type||"error",m=`before send for type \`${v}\``;if(f&&"number"==typeof o&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",e),Object(l.b)(new h.a(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const y="replay_event"===v?"replay":v;return this._prepareEvent(e,t,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",y,e),new h.a("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Object(c.n)(e))return e.then((e=>{if(!Object(c.i)(e)&&null!==e)throw new h.a(n);return e}),(e=>{throw new h.a(`${t} rejected with ${e}`)}));if(!Object(c.i)(e)&&null!==e)throw new h.a(n);return e}(function(e,t,n){const{beforeSend:r,beforeSendTransaction:o}=e;if(_(t)&&r)return r(t,n);if(k(t)&&o)return o(t,n);return t}(r,n,t),m)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",y,e),new h.a(`${m} returned \`null\`, will not send event.`,"log");const o=n&&n.getSession();!d&&o&&this._updateSessionFromEvent(o,r);const c=r.transaction_info;if(d&&c&&r.transaction!==e.transaction){const source="custom";r.transaction_info={...c,source:source}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof h.a)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new h.a(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}
2_sendEnvelope(e){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",e),this._transport.send(e).then(null,(e=>{}))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}}function _(e){return void 0===e.type}function k(e){return"transaction"===e.type}},449:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(464),o=n(190);function c(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(c){if(!(void 0===e||t.length<e))return Object(o.b)(new r.a("Not adding Promise because buffer limit was reached."));const l=c();return-1===t.indexOf(l)&&t.push(l),l.then((()=>n(l))).then(null,(()=>n(l).then(null,(()=>{})))),l},drain:function(e){return new o.a(((n,r)=>{let c=t.length;if(!c)return n(!0);const l=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{Object(o.c)(e).then((()=>{--c||(clearTimeout(l),n(!0))}),r)}))}))}}}var l=n(462),d=n(815);function h(e,t,n=c(e.bufferSize||30)){let h={};function v(c){const v=[];if(Object(l.g)(c,((t,n)=>{const r=Object(l.f)(n);if(Object(d.a)(h,r)){const o=f(t,n);e.recordDroppedEvent("ratelimit_backoff",r,o)}else v.push(t)})),0===v.length)return Object(o.c)();const m=Object(l.c)(c[0],v),y=t=>{Object(l.g)(m,((n,r)=>{const o=f(n,r);e.recordDroppedEvent(t,Object(l.f)(r),o)}))};return n.add((()=>t({body:Object(l.i)(m,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode),h=Object(d.c)(h,e),e)),(e=>{throw y("network_error"),e})))).then((e=>e),(e=>{if(e instanceof r.a)return y("queue_overflow"),Object(o.c)();throw e}))}return v.__sentry__baseTransport__=!0,{send:v,flush:e=>n.drain(e)}}function f(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}},45:function(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw new Error(t)}n.d(t,"a",(function(){return r}))},450:function(e,t,n){"use strict";function r(e,t){return t=t||{},new Promise((function(n,r){var s=new XMLHttpRequest,o=[],u={},a=function e(){return{ok:2==(s.status/100|0),statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:e,headers:{keys:function(){return o},entries:function(){return o.map((function(e){return[e,s.getResponseHeader(e)]}))},get:function(e){return s.getResponseHeader(e)},has:function(e){return null!=s.getResponseHeader(e)}}}};for(var i in s.open(t.method||"get",e,!0),s.onload=function(){s.getAllResponseHeaders().toLowerCase().replace(/^(.+?):/gm,(function(e,t){u[t]||o.push(u[t]=t)})),n(a())},s.onerror=r,s.withCredentials="include"==t.credentials,t.headers)s.setRequestHeader(i,t.headers[i]);s.send(t.body||null)}))}n.d(t,"a",(function(){return r}))},452:function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===o}(e)}(e)};var o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function c(e,t){return!1!==t.clone&&t.isMergeableObject(e)?v((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function l(e,source,t){return e.concat(source).map((function(element){return c(element,t)}))}function d(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(symbol){return e.propertyIsEnumerable(symbol)})):[]}(e))}function h(object,e){try{return e in object}catch(e){return!1}}function f(e,source,t){var n={};return t.isMergeableObject(e)&&d(e).forEach((function(r){n[r]=c(e[r],t)})),d(source).forEach((function(r){(function(e,t){return h(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(h(e,r)&&t.isMergeableObject(source[r])?n[r]=function(e,t){if(!t.customMerge)return v;var n=t.customMerge(e);return"function"==typeof n?n:v}(r,t)(e[r],source[r],t):n[r]=c(source[r],t))})),n}function v(e,source,t){(t=t||{}).arrayMerge=t.arrayMerge||l,t.isMergeableObject=t.isMergeableObject||r,t.cloneUnlessOtherwiseSpecified=c;var n=Array.isArray(source);return n===Array.isArray(e)?n?t.arrayMerge(e,source,t):f(e,source,t):c(source,t)}v.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return v(e,n,t)}),{})};var m=v;e.exports=m},454:function(e,t,n){"use strict";(function(e,r){function o(e){try{return e()}catch(e){}}n.d(t,"a",(function(){return d}));const c=o((function(){return globalThis}))||o((function(){return window}
2))||o((function(){return self}))||o((function(){return e}))||o((function(){return Function("return this")()}));let l=!1;function d(){l&&(delete c.process,l=!1)}!c||o((function(){return"production"}))||o((function(){return r}))||(Object.defineProperty(c,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),l=!0)}).call(this,n(70),n(153))},455:function(e,t,n){e.exports=function(){"use strict";var e,s,t=1e3,i=6e4,n=36e5,r=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,c=2592e6,a=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l={years:u,months:c,days:r,hours:n,minutes:i,seconds:t,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof p},h=function(e,s,t){return new p(e,t,s.$l)},f=function(e){return s.p(e)+"s"},v=function(e){return e<0},m=function(e){return v(e)?Math.ceil(e):Math.floor(e)},y=function(e){return Math.abs(e)},g=function(e,s){return e?v(e)?{negative:!0,format:""+y(e)+s}:{negative:!1,format:""+e+s}:{negative:!1,format:""}},p=function(){function v(e,s,t){var i=this;if(this.$d={},this.$l=t,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),s)return h(e*l[f(s)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(s){i.$d[f(s)]=e[s]})),this.calMilliseconds(),this;if("string"==typeof e){var n=e.match(a);if(n){var r=n.slice(2).map((function(e){return Number(e)}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=v.prototype;return y.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(s,t){return s+(e.$d[t]||0)*l[t]}),0)},y.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=m(e/u),e%=u,this.$d.months=m(e/c),e%=c,this.$d.days=m(e/r),e%=r,this.$d.hours=m(e/n),e%=n,this.$d.minutes=m(e/i),e%=i,this.$d.seconds=m(e/t),e%=t,this.$d.milliseconds=e},y.toISOString=function(){var e=g(this.$d.years,"Y"),s=g(this.$d.months,"M"),t=+this.$d.days||0;this.$d.weeks&&(t+=7*this.$d.weeks);var i=g(t,"D"),n=g(this.$d.hours,"H"),r=g(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=g(o,"S"),c=e.negative||s.negative||i.negative||n.negative||r.negative||u.negative,a=n.format||r.format||u.format?"T":"",l=(c?"-":"")+"P"+e.format+s.format+i.format+a+n.format+r.format+u.format;return"P"===l||"-P"===l?"P0D":l},y.toJSON=function(){return this.toISOString()},y.format=function(e){var t=e||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return t.replace(o,(function(e,s){return s||String(i[e])}))},y.as=function(e){return this.$ms/l[f(e)]},y.get=function(e){var s=this.$ms,t=f(e);return"milliseconds"===t?s%=1e3:s="weeks"===t?m(s/l[t]):this.$d[t],0===s?0:s},y.add=function(e,s,t){var i;return i=s?e*l[f(s)]:d(e)?e.$ms:h(e,this).$ms,h(this.$ms+i*(t?-1:1),this)},y.subtract=function(e,s){return this.add(e,s,!0)},y.locale=function(e){var s=this.clone();return s.$l=e,s},y.clone=function(){return h(this.$ms,this)},y.humanize=function(s){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},y.milliseconds=function(){return this.get("milliseconds")},y.asMilliseconds=function(){return this.as("milliseconds")},y.seconds=function(){return this.get("seconds")},y.asSeconds=function(){return this.as("seconds")},y.minutes=function(){return this.get("minutes")},y.asMinutes=function(){return this.as("minutes")},y.hours=function(){return this.get("hours")},y.asHours=function(){return this.as("hours")},y.days=function(){return this.get("days")},y.asDays=function(){return this.as("days")},y.weeks=function(){return this.get("weeks")},y.asWeeks=function(){return this.as("weeks")},y.months=function(){return this.get("months")},y.asMonths=function(){return this.as("months")},y.years=function(){return this.get("years")},y.asYears=function(){return this.as("years")},v}();return function(t,i,n){e=n,s=n().$utils(),n.duration=function(e,s){var t=n.locale();return h(e,{$l:t},s)},n.isDuration=d;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(e,s){return d(e)&&(e=e.asMilliseconds()),r.bind(this)(e,s)},i.prototype.subtract=function(e,s){return d(e)&&(e=e.asMilliseconds()),o.bind(this)(e,s)}}}()},456:function(e,t,n){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},457:function(e,t){},459:function(e,t,n){(function(e,n){var r="__lodash_hash_undefined__",o=9007199254740991,c="[object Arguments]",l="[object Function]",d="[object Object]",h=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,v={};
vendor: 5,206 bytes, line 2
2v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[c]=v["[object Array]"]=v["[object ArrayBuffer]"]=v["[object Boolean]"]=v["[object DataView]"]=v["[object Date]"]=v["[object Error]"]=v[l]=v["[object Map]"]=v["[object Number]"]=v[d]=v["[object RegExp]"]=v["[object Set]"]=v["[object String]"]=v["[object WeakMap]"]=!1;var m="object"==typeof e&&e&&e.Object===Object&&e,y="object"==typeof self&&self&&self.Object===Object&&self,E=m||y||Function("return this")(),_=t&&!t.nodeType&&t,k=_&&"object"==typeof n&&n&&!n.nodeType&&n,T=k&&k.exports===_,w=T&&m.process,S=function(){try{var e=k&&k.require&&k.require("util").types;return e||w&&w.binding&&w.binding("util")}catch(e){}}(),A=S&&S.isTypedArray;function I(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var R,O,L,D=Array.prototype,x=Function.prototype,C=Object.prototype,M=E["__core-js_shared__"],P=x.toString,N=C.hasOwnProperty,U=(R=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+R:"",F=C.toString,B=P.call(Object),j=RegExp("^"+P.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=T?E.Buffer:void 0,H=E.Symbol,W=E.Uint8Array,G=V?V.allocUnsafe:void 0,K=(O=Object.getPrototypeOf,L=Object,function(e){return O(L(e))}),Y=Object.create,$=C.propertyIsEnumerable,Q=D.splice,z=H?H.toStringTag:void 0,X=function(){try{var e=ke(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),J=V?V.isBuffer:void 0,Z=Math.max,ee=Date.now,te=ke(E,"Map"),ne=ke(Object,"create"),re=function(){function object(){}return function(e){if(!Me(e))return{};if(Y)return Y(e);object.prototype=e;var t=new object;return object.prototype=void 0,t}}();function ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(e){var data=this.__data__=new ae(e);this.size=data.size}function ue(e,t){var n=Oe(e),r=!n&&Re(e),o=!n&&!r&&De(e),c=!n&&!r&&!o&&Ne(e),l=n||r||o||c,d=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],h=d.length;for(var f in e)!t&&!N.call(e,f)||l&&("length"==f||o&&("offset"==f||"parent"==f)||c&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Te(f,h))||d.push(f);return d}function ce(object,e,t){(void 0!==t&&!Ie(object[e],t)||void 0===t&&!(e in object))&&he(object,e,t)}function le(object,e,t){var n=object[e];N.call(object,e)&&Ie(n,t)&&(void 0!==t||e in object)||he(object,e,t)}function de(e,t){for(var n=e.length;n--;)if(Ie(e[n][0],t))return n;return-1}function he(object,e,t){"__proto__"==e&&X?X(object,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):object[e]=t}ie.prototype.clear=function(){this.__data__=ne?ne(null):{},this.size=0},ie.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ie.prototype.get=function(e){var data=this.__data__;if(ne){var t=data[e];return t===r?void 0:t}return N.call(data,e)?data[e]:void 0},ie.prototype.has=function(e){var data=this.__data__;return ne?void 0!==data[e]:N.call(data,e)},ie.prototype.set=function(e,t){var data=this.__data__;return this.size+=this.has(e)?0:1,data[e]=ne&&void 0===t?r:t,this},ae.prototype.clear=function(){this.__data__=[],this.size=0},ae.prototype.delete=function(e){var data=this.__data__,t=de(data,e);return!(t<0)&&(t==data.length-1?data.pop():Q.call(data,t,1),--this.size,!0)},ae.prototype.get=function(e){var data=this.__data__,t=de(data,e);return t<0?void 0:data[t][1]},ae.prototype.has=function(e){return de(this.__data__,e)>-1},ae.prototype.set=function(e,t){var data=this.__data__,n=de(data,e);return n<0?(++this.size,data.push([e,t])):data[n][1]=t,this},oe.prototype.clear=function(){this.size=0,this.__data__={hash:new ie,map:new(te||ae),string:new ie}},oe.prototype.delete=function(e){var t=_e(this,e).delete(e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return _e(this,e).get(e)},oe.prototype.has=function(e){return _e(this,e).has(e)},oe.prototype.set=function(e,t){var data=_e(this,e),n=data.size;return data.set(e,t),this.size+=data.size==n?0:1,this},se.prototype.clear=function(){this.__data__=new ae,this.size=0},se.prototype.delete=function(e){var data=this.__data__,t=data.delete(e);return this.size=data.size,t},se.prototype.get=function(e){return this.__data__.get(e)},se.prototype.has=function(e){return this.__data__.has(e)},se.prototype.set=function(e,t){var data=this.__data__;if(data instanceof ae){var n=data.__data__;if(!te||n.length<199)return n.push([e,t]),this.size=++data.size,this;data=this.__data__=new oe(n)}return data.set(e,t),this.size=data.size,this};var fe,pe=function(object,e,t){for(var n=-1,r=Object(object),o=t(object),c=o.length;c--;){var l=o[fe?c:++n];if(!1===e(r[l],l,r))break}return object};
vendor: 4,806 bytes, line 2
2function ve(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":z&&z in Object(e)?function(e){var t=N.call(e,z),n=e[z];try{e[z]=void 0;var r=!0}catch(e){}var o=F.call(e);r&&(t?e[z]=n:delete e[z]);return o}(e):function(e){return F.call(e)}(e)}function me(e){return Pe(e)&&ve(e)==c}function ge(e){return!(!Me(e)||function(e){return!!U&&U in e}(e))&&(xe(e)?j:h).test(function(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ye(object){if(!Me(object))return function(object){var e=[];if(null!=object)for(var t in Object(object))e.push(t);return e}(object);var e=we(object),t=[];for(var n in object)("constructor"!=n||!e&&N.call(object,n))&&t.push(n);return t}function be(object,source,e,t,n){object!==source&&pe(source,(function(r,o){if(n||(n=new se),Me(r))!function(object,source,e,t,n,r,o){var c=Se(object,e),l=Se(source,e),h=o.get(l);if(h)return void ce(object,e,h);var f=r?r(c,l,e+"",object,source,o):void 0,v=void 0===f;if(v){var m=Oe(l),y=!m&&De(l),E=!m&&!y&&Ne(l);f=l,m||y||E?Oe(c)?f=c:Pe(S=c)&&Le(S)?f=function(source,e){var t=-1,n=source.length;e||(e=Array(n));for(;++t<n;)e[t]=source[t];return e}(c):y?(v=!1,f=function(e,t){if(t)return e.slice();var n=e.length,r=G?G(n):new e.constructor(n);return e.copy(r),r}(l,!0)):E?(v=!1,_=l,k=!0?(T=_.buffer,w=new T.constructor(T.byteLength),new W(w).set(new W(T)),w):_.buffer,f=new _.constructor(k,_.byteOffset,_.length)):f=[]:function(e){if(!Pe(e)||ve(e)!=d)return!1;var t=K(e);if(null===t)return!0;var n=N.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&P.call(n)==B}(l)||Re(l)?(f=c,Re(c)?f=function(e){return function(source,e,object,t){var n=!object;object||(object={});var r=-1,o=e.length;for(;++r<o;){var c=e[r],l=t?t(object[c],source[c],c,object,source):void 0;void 0===l&&(l=source[c]),n?he(object,c,l):le(object,c,l)}return object}(e,Ue(e))}(c):Me(c)&&!xe(c)||(f=function(object){return"function"!=typeof object.constructor||we(object)?{}:re(K(object))}(l))):v=!1}var _,k,T,w;var S;v&&(o.set(l,f),n(f,l,t,r,o),o.delete(l));ce(object,e,f)}(object,source,o,e,be,t,n);else{var c=t?t(Se(object,o),r,o+"",object,source,n):void 0;void 0===c&&(c=r),ce(object,o,c)}}),Ue)}function Ee(e,t){return Ae(function(e,t,n){return t=Z(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,c=Z(r.length-t,0),l=Array(c);++o<c;)l[o]=r[t+o];o=-1;for(var d=Array(t+1);++o<t;)d[o]=r[o];return d[t]=n(l),I(e,this,d)}}(e,t,je),e+"")}function _e(map,e){var t,n,data=map.__data__;return("string"==(n=typeof(t=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?data["string"==typeof e?"string":"hash"]:data.map}function ke(object,e){var t=function(object,e){return null==object?void 0:object[e]}(object,e);return ge(t)?t:void 0}function Te(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&f.test(e))&&e>-1&&e%1==0&&e<t}function we(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||C)}function Se(object,e){if(("constructor"!==e||"function"!=typeof object[e])&&"__proto__"!=e)return object[e]}var Ae=function(e){var t=0,n=0;return function(){var r=ee(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(X?function(e,t){return X(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:je);function Ie(e,t){return e===t||e!=e&&t!=t}var Re=me(function(){return arguments}())?me:function(e){return Pe(e)&&N.call(e,"callee")&&!$.call(e,"callee")},Oe=Array.isArray;function Le(e){return null!=e&&Ce(e.length)&&!xe(e)}var De=J||function(){return!1};function xe(e){if(!Me(e))return!1;var t=ve(e);return t==l||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ce(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Me(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Pe(e){return null!=e&&"object"==typeof e}var Ne=A?function(e){return function(t){return e(t)}}(A):function(e){return Pe(e)&&Ce(e.length)&&!!v[ve(e)]};function Ue(object){return Le(object)?ue(object,!0):ye(object)}var Fe,Be=(Fe=function(object,source,e,t){be(object,source,e,t)},Ee((function(object,e){var t=-1,n=e.length,r=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(r=Fe.length>3&&"function"==typeof r?(n--,r):void 0,o&&function(e,t,object){if(!Me(object))return!1;var n=typeof t;return!!("number"==n?Le(object)&&Te(t,object.length):"string"==n&&t in object)&&Ie(object[t],e)}(e[0],e[1],o)&&(r=n<3?void 0:r,n=1),object=Object(object);++t<n;){var source=e[t];source&&Fe(object,source,t,r)}return object})));function je(e){return e}n.exports=Be}).call(this,n(70),n(683)(e))},46:function(e,t,n){"use strict";n.r(t),n.d(t,"createDecorator",(function(){return m})),n.d(t,"mixins",(function(){return y}
2));var r=n(9);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return function(e){if(Array.isArray(e)){for(var i=0,t=new Array(e.length);i<e.length;i++)t[i]=e[i];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function d(){return"undefined"!=typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function h(e,t){f(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){f(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){f(e,t,n)}))}function f(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach((function(r){var o=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,o,e,n):Reflect.defineMetadata(r,o,e)}))}var v={__proto__:[]}instanceof Array;function m(e){return function(t,n,r){var o="function"==typeof t?t:t.constructor;o.__decorators__||(o.__decorators__=[]),"number"!=typeof r&&(r=void 0),o.__decorators__.push((function(t){return e(t,n,r)}))}}function y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.default.extend({mixins:t})}function E(e,t){var n=t.prototype._init;t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t},configurable:!0})}))};var data=new t;t.prototype._init=n;var r={};return Object.keys(data).forEach((function(e){void 0!==data[e]&&(r[e]=data[e])})),r}var _=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var n=e.prototype;Object.getOwnPropertyNames(n).forEach((function(e){if("constructor"!==e)if(_.indexOf(e)>-1)t[e]=n[e];else{var r=Object.getOwnPropertyDescriptor(n,e);void 0!==r.value?"function"==typeof r.value?(t.methods||(t.methods={}))[e]=r.value:(t.mixins||(t.mixins=[])).push({data:function(){return c({},e,r.value)}}):(r.get||r.set)&&((t.computed||(t.computed={}))[e]={get:r.get,set:r.set})}})),(t.mixins||(t.mixins=[])).push({data:function(){return E(this,e)}});var o=e.__decorators__;o&&(o.forEach((function(e){return e(t)})),delete e.__decorators__);var l=Object.getPrototypeOf(e.prototype),f=l instanceof r.default?l.constructor:r.default,v=f.extend(t);return w(v,e,f),d()&&h(v,e),v}var T={prototype:!0,arguments:!0,callee:!0,caller:!0};function w(e,t,n){Object.getOwnPropertyNames(t).forEach((function(r){if(!T[r]){var c=Object.getOwnPropertyDescriptor(e,r);if(!c||c.configurable){var l,d,h=Object.getOwnPropertyDescriptor(t,r);if(!v){if("cid"===r)return;var f=Object.getOwnPropertyDescriptor(n,r);if(l=h.value,d=o(l),null!=l&&("object"===d||"function"===d)&&f&&f.value===h.value)return}0,Object.defineProperty(e,r,h)}}}))}function S(e){return"function"==typeof e?k(e):function(t){return k(t,e)}}S.registerHooks=function(e){_.push.apply(_,l(e))},t.default=S},460:function(e,t,n){"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function o(){return"npm"}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r}))},461:function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return l}));var r=n(49),o=n(57);const c=Object(o.b)();function l(e,t={}){try{let n=e;const r=5,o=[];let c=0,l=0;const h=" > ",f=h.length;let v;const m=Array.isArray(t)?t:t.keyAttrs,y=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&c++<r&&(v=d(n,m),!("html"===v||c>1&&l+o.length*f+v.length>=y));)o.push(v),l+=v.length,n=n.parentNode;return o.reverse().join(h)}catch(e){return"<unknown>"}}function d(e,t){const n=e,o=[];let c,l,d,h,i;if(!n||!n.tagName)return"";o.push(n.tagName.toLowerCase());const f=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(f&&f.length)f.forEach((e=>{o.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&o.push(`#${n.id}
2`),c=n.className,c&&Object(r.l)(c))for(l=c.split(/\s+/),i=0;i<l.length;i++)o.push(`.${l[i]}`);const v=["aria-label","type","name","title","alt"];for(i=0;i<v.length;i++)d=v[i],h=n.getAttribute(d),h&&o.push(`[${d}="${h}"]`);return o.join("")}function h(){try{return c.document.location.href}catch(e){return""}}},462:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return y})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return T})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return _})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return k})),n.d(t,"i",(function(){return m}));var r=n(261),o=n(137),c=n(65);function l(e,t=[]){return[e,t]}function d(e,t){const[n,r]=e;return[n,[...r,t]]}function h(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function f(e,t){return h(e,((e,n)=>t.includes(n)))}function v(input,e){return(e||new TextEncoder).encode(input)}function m(e,t){const[n,r]=e;let c=JSON.stringify(n);function l(e){"string"==typeof c?c="string"==typeof e?c+e:[v(c,t),e]:c.push("string"==typeof e?v(e,t):e)}for(const e of r){const[t,n]=e;if(l(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)l(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(Object(o.a)(n))}l(e)}}return"string"==typeof c?c:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(c)}function y(e,t){const n="string"==typeof e.data?v(e.data,t):e.data;return[Object(c.c)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const E={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function _(e){return E[e]}function k(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function T(e,t,n,o){const l=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:Object(r.b)(o)},...l&&{trace:Object(c.c)({...l})}}}},463:function(e,t,n){"use strict";function r(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let i=0;i<t.length;i++){if(t[i]===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(let i=0;i<t.length;i++)if(t[i]===n){t.splice(i,1);break}}]}n.d(t,"a",(function(){return r}))},464:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}},465:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(87),o=n(10);n(75),n(17),n(100);function c(e){return null!==e&&"object"===Object(o.a)(e)}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".",o=arguments.length>3?arguments[3]:void 0;if(!c(t))return l(e,{},n,o);var object=Object.assign({},t);for(var d in e)if("__proto__"!==d&&"constructor"!==d){var h=e[d];null!=h&&(o&&o(object,d,h,n)||(Array.isArray(h)&&Array.isArray(object[d])?object[d]=[].concat(Object(r.a)(h),Object(r.a)(object[d])):c(h)&&c(object[d])?object[d]=l(h,object[d],(n?"".concat(n,"."):"")+d.toString(),o):object[d]=h))}return object}function d(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(p,t){return l(p,t,"",e)}),{})}}var h=d();d((function(object,e,t){if(void 0!==object[e]&&"function"==typeof t)return object[e]=t(object[e]),!0})),d((function(object,e,t){if(Array.isArray(object[e])&&"function"==typeof t)return object[e]=t(object[e]),!0}))},466:function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},467:function(e,t,n){e.exports=n(717).Observable},468:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}
2));var r=function(e,b){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)b.hasOwnProperty(p)&&(e[p]=b[p])})(e,b)};function o(e,b){function t(){this.constructor=e}r(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}},469:function(e,t,n){"use strict";e.exports=function(data,e){e||(e={}),"function"==typeof e&&(e={cmp:e});var t,n="boolean"==typeof e.cycles&&e.cycles,r=e.cmp&&(t=e.cmp,function(e){return function(a,b){var n={key:a,value:e[a]},r={key:b,value:e[b]};return t(n,r)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var i,c;if(Array.isArray(t)){for(c="[",i=0;i<t.length;i++)i&&(c+=","),c+=e(t[i])||"null";return c+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var l=o.push(t)-1,d=Object.keys(t).sort(r&&r(t));for(c="",i=0;i<d.length;i++){var h=d[i],f=e(t[h]);f&&(c&&(c+=","),c+=JSON.stringify(h)+":"+f)}return o.splice(l,1),"{"+c+"}"}}(data)}},470:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(718),o=n(11),c=n(719);function l(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var h,f,v,m,y,E=this;return r.__generator(this,(function(_){switch(_.label){case 0:return h=n.fragmentMap,f=n.contextValue,v=n.variableValues,m={},y=function(e){return r.__awaiter(E,void 0,void 0,(function(){var y,E,_,k,T;return r.__generator(this,(function(r){switch(r.label){case 0:return o.shouldInclude(e,v)?o.isField(e)?[4,d(e,t,n)]:[3,2]:[2];case 1:return y=r.sent(),E=o.resultKeyNameFromField(e),void 0!==y&&(void 0===m[E]?m[E]=y:c.merge(m[E],y)),[2];case 2:if(o.isInlineFragment(e))_=e;else if(!(_=h[e.name.value]))throw new Error("No fragment named "+e.name.value);return k=_.typeCondition.name.value,n.fragmentMatcher(t,k,f)?[4,l(_.selectionSet,t,n)]:[3,4];case 3:T=r.sent(),c.merge(m,T),r.label=4;case 4:return[2]}}
2))}))},[4,Promise.all(e.selections.map(y))];case 1:return _.sent(),n.resultMapper?[2,n.resultMapper(m,t)]:[2,m]}}))}))}function d(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var c,d,f,v,m,y,E;return r.__generator(this,(function(r){switch(r.label){case 0:return c=n.variableValues,d=n.contextValue,f=n.resolver,v=e.name.value,m=o.argumentsObjectFromField(e,c),y={isLeaf:!e.selectionSet,resultKey:o.resultKeyNameFromField(e),directives:o.getDirectiveInfoFromField(e,c),field:e},[4,f(v,t,m,d,y)];case 1:return E=r.sent(),e.selectionSet?null==E?[2,E]:Array.isArray(E)?[2,h(e,E,n)]:[2,l(e.selectionSet,E,n)]:[2,E]}}))}))}function h(e,t,n){return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?h(e,t,n):l(e.selectionSet,t,n)})))}t.graphql=function(e,t,n,r,c,d){void 0===d&&(d={});var h=o.getMainDefinition(t),f=o.getFragmentDefinitions(t),v={fragmentMap:o.createFragmentMap(f),contextValue:r,variableValues:c,resultMapper:d.resultMapper,resolver:e,fragmentMatcher:d.fragmentMatcher||function(){return!0}};return l(h.selectionSet,n,v)}},471:function(e,t,n){"use strict";var r=n(720)(n(721)),o=n(72),c=o.ApolloLink,l=o.Observable,d=n(810),h=d.selectURI,f=d.selectHttpOptionsAndBody,v=d.fallbackHttpConfig,m=d.serializeFetchParameter,y=d.createSignalIfSupported,E=d.parseAndCheckHttpResponse,_=n(722),k=_.extractFiles,T=_.isExtractableFile,w=_.ReactNativeFile;function S(e,t,n){e.append(t,n,n.name)}t.ReactNativeFile=w,t.isExtractableFile=T,t.formDataAppendFile=S,t.createUploadLink=function(e){var t=void 0===e?{}:e,n=t.uri,o=void 0===n?"/graphql":n,d=t.isExtractableFile,_=void 0===d?T:d,w=t.FormData,A=t.formDataAppendFile,I=void 0===A?S:A,R=t.fetch,O=t.fetchOptions,L=t.credentials,D=t.headers,x={http:{includeExtensions:t.includeExtensions},options:O,credentials:L,headers:D};return new c((function(e){var t=h(e,o),n=e.getContext(),c=n.clientAwareness,d=(c=void 0===c?{}:c).name,T=c.version,S=n.headers,A={http:n.http,options:n.fetchOptions,credentials:n.credentials,headers:(0,r.default)({},d&&{"apollographql-client-name":d},{},T&&{"apollographql-client-version":T},{},S)},O=f(e,v,x,A),L=O.options,body=O.body,D=k(body,"",_),C=D.clone,M=D.files,P=m(C,"Payload");if(M.size){delete L.headers["content-type"];var form=new(w||FormData);form.append("operations",P);var map={},i=0;M.forEach((function(e){map[++i]=e})),form.append("map",JSON.stringify(map)),i=0,M.forEach((function(e,t){I(form,++i,t)})),L.body=form}else L.body=P;return new l((function(n){var r;if(!L.signal){var o=y().controller;o&&(r=o,L.signal=r.signal)}return(R||fetch)(t,L).then((function(t){return e.setContext({response:t}),t})).then(E(e)).then((function(e){n.next(e),n.complete()})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){r&&r.abort()}}))}))}},473:function(e,t,n){"use strict";var r=n(33);n.d(t,"a",(function(){return r.f}));Object(r.g)("firebase","10.11.1","app")},474:function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){return null==e||"function"!=typeof e&&"object"!==(void 0===e?"undefined":r(e))},d=Object.prototype.toString,h=function(e){var t=void 0===e?"undefined":r(e);return"undefined"===t?"undefined":null===e?"null":!0===e||!1===e||e instanceof Boolean?"boolean":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?void 0!==e.constructor.name&&"Generator"===e.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(e)?"array":e instanceof RegExp?"regexp":e instanceof Date?"date":"[object RegExp]"===(t=d.call(e))?"regexp":"[object Date]"===t?"date":"[object Arguments]"===t?"arguments":"[object Error]"===t?"error":"[object Promise]"===t?"promise":function(e){return e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}(e)?"buffer":"[object Set]"===t?"set":"[object WeakSet]"===t?"weakset":"[object Map]"===t?"map":"[object WeakMap]"===t?"weakmap":"[object Symbol]"===t?"symbol":"[object Map Iterator]"===t?"mapiterator":"[object Set Iterator]"===t?"setiterator":"[object String Iterator]"===t?"stringiterator":"[object Array Iterator]"===t?"arrayiterator":"[object Int8Array]"===t?"int8array":"[object Uint8Array]"===t?"uint8array":"[object Uint8ClampedArray]"===t?"uint8clampedarray":"[object Int16Array]"===t?"int16array":"[object Uint16Array]"===t?"uint16array":"[object Int32Array]"===t?"int32array":"[object Uint32Array]"===t?"uint32array":"[object Float32Array]"===t?"float32array":"[object Float64Array
2]"===t?"float64array":"object"};function f(e){e=e||{};var t=arguments.length,i=0;if(1===t)return e;for(;++i<t;){var n=arguments[i];l(e)&&(e=n),m(n)&&v(e,n)}return e}function v(e,t){for(var n in function(e,t){if(null==e)throw new TypeError("expected first argument to be an object.");if(void 0===t||"undefined"==typeof Symbol)return e;if("function"!=typeof Object.getOwnPropertySymbols)return e;for(var n=Object.prototype.propertyIsEnumerable,r=Object(e),o=arguments.length,i=0;++i<o;)for(var c=Object(arguments[i]),l=Object.getOwnPropertySymbols(c),d=0;d<l.length;d++){var h=l[d];n.call(c,h)&&(r[h]=c[h])}}(e,t),t)if("__proto__"!==n&&y(t,n)){var r=t[n];m(r)?("undefined"===h(e[n])&&"function"===h(r)&&(e[n]=r),e[n]=f(e[n]||{},r)):e[n]=r}return e}function m(e){return"object"===h(e)||"function"===h(e)}function y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var E=f,_="undefined"!=typeof window,k=function(){if(_&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)return"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}}),!0;return!1}();var T="event",w="observer",S=function(){if(_)return"function"==typeof window.CustomEvent?window.CustomEvent:(e.prototype=window.Event.prototype,e);function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}}();function A(e,t){if(e.length){var n=e.indexOf(t);return n>-1?e.splice(n,1):void 0}}function I(e,t){if("IMG"===e.tagName&&e.getAttribute("data-srcset")){var n=e.getAttribute("data-srcset"),r=[],o=e.parentNode.offsetWidth*t,c=void 0,l=void 0,d=void 0;(n=n.trim().split(",")).map((function(e){e=e.trim(),-1===(c=e.lastIndexOf(" "))?(l=e,d=999998):(l=e.substr(0,c),d=parseInt(e.substr(c+1,e.length-c-2),10)),r.push([d,l])})),r.sort((function(a,b){if(a[0]<b[0])return 1;if(a[0]>b[0])return-1;if(a[0]===b[0]){if(-1!==b[1].indexOf(".webp",b[1].length-5))return 1;if(-1!==a[1].indexOf(".webp",a[1].length-5))return-1}return 0}));for(var h="",f=void 0,i=0;i<r.length;i++){h=(f=r[i])[1];var v=r[i+1];if(v&&v[0]<o){h=f[1];break}if(!v){h=f[1];break}}return h}}function R(e,t){for(var n=void 0,i=0,r=e.length;i<r;i++)if(t(e[i])){n=e[i];break}return n}var O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return _&&window.devicePixelRatio||e};function L(){if(!_)return!1;var e=!0,t=document;try{var n=t.createElement("object");n.type="image/webp",n.style.visibility="hidden",n.innerHTML="!",t.body.appendChild(n),e=!n.offsetWidth,t.body.removeChild(n)}catch(t){e=!1}return e}var D=function(){if(_){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}}(),x={on:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];D?e.addEventListener(t,n,{capture:r,passive:!0}):e.addEventListener(t,n,r)},off:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.removeEventListener(t,n,r)}},C=function(e,t,n){var image=new Image;if(!e||!e.src){var r=new Error("image src is required");return n(r)}image.src=e.src,image.onload=function(){t({naturalHeight:image.naturalHeight,naturalWidth:image.naturalWidth,src:image.src})},image.onerror=function(e){n(e)}},style=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},M=function(e){return style(e,"overflow")+style(e,"overflow-y")+style(e,"overflow-x")};function P(){}var N=function(){function e(t){var n=t.max;o(this,e),this.options={max:n||100},this._caches=[]}return c(e,[{key:"has",value:function(e){return this._caches.indexOf(e)>-1}},{key:"add",value:function(e){this.has(e)||(this._caches.push(e),this._caches.length>this.options.max&&this.free())}},{key:"free",value:function(){this._caches.shift()}}]),e}(),U=function(){function e(t){var n=t.el,r=t.src,c=t.error,l=t.loading,d=t.bindType,h=t.$parent,f=t.options,v=t.elRenderer,m=t.imageCache;o(this,e),this.el=n,this.src=r,this.error=c,this.loading=l,this.bindType=d,this.attempt=0,this.naturalHeight=0,this.naturalWi
vendor: 5,207 bytes, line 2
2dth=0,this.options=f,this.rect=null,this.$parent=h,this.elRenderer=v,this._imageCache=m,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return c(e,[{key:"initState",value:function(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(e){this.performanceData[e]=Date.now()}},{key:"update",value:function(e){var t=e.src,n=e.loading,r=e.error,o=this.src;this.src=t,this.loading=n,this.error=r,this.filter(),o!==this.src&&(this.attempt=0,this.initState())}},{key:"getRect",value:function(){this.rect=this.el.getBoundingClientRect()}},{key:"checkInView",value:function(){return this.getRect(),this.rect.top<window.innerHeight*this.options.preLoad&&this.rect.bottom>this.options.preLoadTop&&this.rect.left<window.innerWidth*this.options.preLoad&&this.rect.right>0}},{key:"filter",value:function(){var e=this;(function(e){if(!(e instanceof Object))return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t})(this.options.filter).map((function(t){e.options.filter[t](e,e.options)}))}},{key:"renderLoading",value:function(e){var t=this;this.state.loading=!0,C({src:this.loading},(function(data){t.render("loading",!1),t.state.loading=!1,e()}),(function(){e(),t.state.loading=!1,t.options.silent||console.warn("VueLazyload log: load failed with loading image("+t.loading+")")}))}},{key:"load",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log("VueLazyload log: "+this.src+" tried too more than "+this.options.attempt+" times"),void t()):this.state.rendered&&this.state.loaded?void 0:this._imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,t()):void this.renderLoading((function(){e.attempt++,e.options.adapter.beforeLoad&&e.options.adapter.beforeLoad(e,e.options),e.record("loadStart"),C({src:e.src},(function(data){e.naturalHeight=data.naturalHeight,e.naturalWidth=data.naturalWidth,e.state.loaded=!0,e.state.error=!1,e.record("loadEnd"),e.render("loaded",!1),e.state.rendered=!0,e._imageCache.add(e.src),t()}),(function(t){!e.options.silent&&console.error(t),e.state.error=!0,e.state.loaded=!1,e.render("error",!1)}))}))}},{key:"render",value:function(e,t){this.elRenderer(this,e,t)}},{key:"performance",value:function(){var e="loading",time=0;return this.state.loaded&&(e="loaded",time=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(e="error"),{src:this.src,state:e,time:time}}},{key:"$destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),e}(),F="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",B=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],j={rootMargin:"0px",threshold:0},V=function(e){return function(){function t(e){var n,r,c,l,d=e.preLoad,h=e.error,f=e.throttleWait,v=e.preLoadTop,m=e.dispatchEvent,y=e.loading,E=e.attempt,_=e.silent,k=void 0===_||_,S=e.scale,A=e.listenEvents,filter=(e.hasbind,e.filter),I=e.adapter,R=e.observer,D=e.observerOptions;o(this,t),this.version="1.3.3",this.mode=T,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:k,dispatchEvent:!!m,throttleWait:f||200,preLoad:d||1.3,preLoadTop:v||0,error:h||F,loading:y||F,attempt:E||3,scale:S||O(S),ListenEvents:A||B,hasbind:!1,supportWebp:L(),filter:filter||{},adapter:I||{},observer:!!R,observerOptions:D||j},this._initEvent(),this._imageCache=new N({max:200}),this.lazyLoadHandler=(n=this._lazyLoadHandler.bind(this),r=this.options.throttleWait,c=null,l=0,function(){if(!c){var e=Date.now()-l,t=this,o=arguments,d=function(){l=Date.now(),c=!1,n.apply(t,o)};e>=r?d():c=setTimeout(d,r)}}),this.setMode(this.options.observer?w:T)}return c(t,[{key:"config",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};E(this.options,e)}},{key:"performance",value:function(){var e=[];return this.ListenerQueue.map((function(t){e.push(t.performance())})),e}},{key:"addLazyBox",value:function(e){this.ListenerQueue.push(e),_&&(this._addListenerTarget(window),this._observer&&this._observer.observe(e.el),e.$el&&e.$el.parentNode&&this._addListenerTarget(e.$el.parentNode))}},{key:"add",value:function(t,n,r){var o=this;if(function(e,t){for(var n=!1,i=0,r=e.length;i<r;i++)if(t(e[i])){n=!0;break}return n}(this.ListenerQueue,(function(e){return e.el===t})))return this.update(t,n),e.nextTick(this.lazyLoadHandler);var c=this._valueFormatter(n.value),l=c.src,d=c.loading,h=c.error;e.nextTick((function(){l=I(t,o.options.scale)||l,o._observer&&o._observer.observe(t);var c=Object.keys(n.modifiers)[0],f=void 0;c&&(f=(f=r.context.$refs[c])?f.$el||f:document.getElementById(c)),f||(f=function(e){if(_){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(M(t)))return t;t=t.parentNode}return window}
vendor: 5,744 bytes, line 2
2}(t));var v=new U({bindType:n.arg,$parent:f,el:t,loading:d,error:h,src:l,elRenderer:o._elRenderer.bind(o),options:o.options,imageCache:o._imageCache});o.ListenerQueue.push(v),_&&(o._addListenerTarget(window),o._addListenerTarget(f)),o.lazyLoadHandler(),e.nextTick((function(){return o.lazyLoadHandler()}))}))}},{key:"update",value:function(t,n,r){var o=this,c=this._valueFormatter(n.value),l=c.src,d=c.loading,h=c.error;l=I(t,this.options.scale)||l;var f=R(this.ListenerQueue,(function(e){return e.el===t}));f?f.update({src:l,loading:d,error:h}):this.add(t,n,r),this._observer&&(this._observer.unobserve(t),this._observer.observe(t)),this.lazyLoadHandler(),e.nextTick((function(){return o.lazyLoadHandler()}))}},{key:"remove",value:function(e){if(e){this._observer&&this._observer.unobserve(e);var t=R(this.ListenerQueue,(function(t){return t.el===e}));t&&(this._removeListenerTarget(t.$parent),this._removeListenerTarget(window),A(this.ListenerQueue,t),t.$destroy())}}},{key:"removeComponent",value:function(e){e&&(A(this.ListenerQueue,e),this._observer&&this._observer.unobserve(e.el),e.$parent&&e.$el.parentNode&&this._removeListenerTarget(e.$el.parentNode),this._removeListenerTarget(window))}},{key:"setMode",value:function(e){var t=this;k||e!==w||(e=T),this.mode=e,e===T?(this._observer&&(this.ListenerQueue.forEach((function(e){t._observer.unobserve(e.el)})),this._observer=null),this.TargetQueue.forEach((function(e){t._initListen(e.el,!0)}))):(this.TargetQueue.forEach((function(e){t._initListen(e.el,!1)})),this._initIntersectionObserver())}},{key:"_addListenerTarget",value:function(e){if(e){var t=R(this.TargetQueue,(function(t){return t.el===e}));return t?t.childrenCount++:(t={el:e,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===T&&this._initListen(t.el,!0),this.TargetQueue.push(t)),this.TargetIndex}}},{key:"_removeListenerTarget",value:function(e){var t=this;this.TargetQueue.forEach((function(n,r){n.el===e&&(n.childrenCount--,n.childrenCount||(t._initListen(n.el,!1),t.TargetQueue.splice(r,1),n=null))}))}},{key:"_initListen",value:function(e,t){var n=this;this.options.ListenEvents.forEach((function(r){return x[t?"on":"off"](e,r,n.lazyLoadHandler)}))}},{key:"_initEvent",value:function(){var e=this;this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=function(t,n){e.Event.listeners[t]||(e.Event.listeners[t]=[]),e.Event.listeners[t].push(n)},this.$once=function(t,n){var r=e;e.$on(t,(function e(){r.$off(t,e),n.apply(r,arguments)}))},this.$off=function(t,n){if(n)A(e.Event.listeners[t],n);else{if(!e.Event.listeners[t])return;e.Event.listeners[t].length=0}},this.$emit=function(t,n,r){e.Event.listeners[t]&&e.Event.listeners[t].forEach((function(e){return e(n,r)}))}}},{key:"_lazyLoadHandler",value:function(){var e=this,t=[];this.ListenerQueue.forEach((function(e,n){e.el&&e.el.parentNode||t.push(e),e.checkInView()&&e.load()})),t.forEach((function(t){A(e.ListenerQueue,t),t.$destroy()}))}},{key:"_initIntersectionObserver",value:function(){var e=this;k&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach((function(t){e._observer.observe(t.el)})))}},{key:"_observerHandler",value:function(e,t){var n=this;e.forEach((function(e){e.isIntersecting&&n.ListenerQueue.forEach((function(t){if(t.el===e.target){if(t.state.loaded)return n._observer.unobserve(t.el);t.load()}}))}))}},{key:"_elRenderer",value:function(e,t,n){if(e.el){var r=e.el,o=e.bindType,c=void 0;switch(t){case"loading":c=e.loading;break;case"error":c=e.error;break;default:c=e.src}if(o?r.style[o]='url("'+c+'")':r.getAttribute("src")!==c&&r.setAttribute("src",c),r.setAttribute("lazy",t),this.$emit(t,e,n),this.options.adapter[t]&&this.options.adapter[t](e,this.options),this.options.dispatchEvent){var l=new S(t,{detail:e});r.dispatchEvent(l)}}}},{key:"_valueFormatter",value:function(e){var t,n=e,o=this.options.loading,c=this.options.error;return null!==(t=e)&&"object"===(void 0===t?"undefined":r(t))&&(e.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+e),n=e.src,o=e.loading||this.options.loading,c=e.error||this.options.error),{src:n,loading:o,error:c}}}]),t}()},H=function(e){return{props:{tag:{type:String,default:"div"}},render:function(e){return!1===this.show?e(this.tag):e(this.tag,null,this.$slots.default)},data:function(){return{el:null,state:{loaded:!1},rect:{},show:!1}},mounted:function(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeDestroy:function(){e.removeComponent(this)},methods:{getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),_&&this.rect.top<window.innerHeight*e.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*e.options.preLoad&&this.rect.right>0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy:function(){return this.$destroy}}}},W=function(){function e(t){var n=t.lazy;o(this,e),this.lazy=n,n.lazyContainerMananger=this,this._queue=[]}return c(e,[{key:"bind",value:function(e,t,n){var r=new K({el:e,binding:t,vnode:n,lazy:this.lazy});this._queue.push(r)}},{key:"update",value:function(e,t,n){var r=R(this._queue,(function(t){return t.el===e}));r&&r.update({el:e,binding:t,vnode:n})}},{key:"unbind",value:function(e,t,n){var r=R(this._queue,(function(t){return t.el===e}));r&&(r.clear(),A(this._queue,r))}}]),e}(),G={selector:"img"},K=function(){function e(t){var n=t.el,r=t.binding,c=t.vnode,l=t.lazy;o(this,e),this.el=null,this.vnode=c,this.binding=r,this.options={},this.lazy=l,this._queue=[],this.update({el:n,binding:r})}return c(e,[{key:"update",value:function(e){var t=this,n=e.el,r=e.binding;this.el=n,this.options=E({}
2,G,r.value),this.getImgs().forEach((function(e){t.lazy.add(e,E({},t.binding,{value:{src:"dataset"in e?e.dataset.src:e.getAttribute("data-src"),error:("dataset"in e?e.dataset.error:e.getAttribute("data-error"))||t.options.error,loading:("dataset"in e?e.dataset.loading:e.getAttribute("data-loading"))||t.options.loading}}),t.vnode)}))}},{key:"getImgs",value:function(){return function(e){for(var t=e.length,n=[],i=0;i<t;i++)n.push(e[i]);return n}(this.el.querySelectorAll(this.options.selector))}},{key:"clear",value:function(){var e=this;this.getImgs().forEach((function(t){return e.lazy.remove(t)})),this.vnode=null,this.binding=null,this.lazy=null}}]),e}(),Y=function(e){return{props:{src:[String,Object],tag:{type:String,default:"img"}},render:function(e){return e(this.tag,{attrs:{src:this.renderSrc}},this.$slots.default)},data:function(){return{el:null,options:{src:"",error:"",loading:"",attempt:e.options.attempt},state:{loaded:!1,error:!1,attempt:0},rect:{},renderSrc:""}},watch:{src:function(){this.init(),e.addLazyBox(this),e.lazyLoadHandler()}},created:function(){this.init(),this.renderSrc=this.options.loading},mounted:function(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeDestroy:function(){e.removeComponent(this)},methods:{init:function(){var t=e._valueFormatter(this.src),n=t.src,r=t.loading,o=t.error;this.state.loaded=!1,this.options.src=n,this.options.error=o,this.options.loading=r,this.renderSrc=this.options.loading},getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),_&&this.rect.top<window.innerHeight*e.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*e.options.preLoad&&this.rect.right>0},load:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;if(this.state.attempt>this.options.attempt-1&&this.state.error)return e.options.silent||console.log("VueLazyload log: "+this.options.src+" tried too more than "+this.options.attempt+" times"),void n();var r=this.options.src;C({src:r},(function(e){var n=e.src;t.renderSrc=n,t.state.loaded=!0}),(function(e){t.state.attempt++,t.renderSrc=t.options.error,t.state.error=!0}))}}}},$={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=V(e),r=new n(t),o=new W({lazy:r}),c="2"===e.version.split(".")[0];e.prototype.$Lazyload=r,t.lazyComponent&&e.component("lazy-component",H(r)),t.lazyImage&&e.component("lazy-image",Y(r)),c?(e.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}),e.directive("lazy-container",{bind:o.bind.bind(o),componentUpdated:o.update.bind(o),unbind:o.unbind.bind(o)})):(e.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update:function(e,t){E(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:e,oldValue:t},{context:this.vm})},unbind:function(){r.remove(this.el)}}),e.directive("lazy-container",{update:function(e,t){o.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:e,oldValue:t},{context:this.vm})},unbind:function(){o.unbind(this.el)}}))}};t.a=$},476:function(e,t,n){"use strict";n.r(t),n.d(t,"captureUserFeedback",(function(){return qe})),n.d(t,"close",(function(){return Ve})),n.d(t,"defaultIntegrations",(function(){return Me})),n.d(t,"flush",(function(){return je})),n.d(t,"forceLoad",(function(){return Fe})),n.d(t,"init",(function(){return Pe})),n.d(t,"lastEventId",(function(){return Ue})),n.d(t,"onLoad",(function(){return Be})),n.d(t,"showReportDialog",(function(){return Ne})),n.d(t,"wrap",(function(){return He}));var r=n(95),o=n(213),c=n(423),l=n(30),d=n(162),h=n(310),f=n(315),v=n(190),m=n(822),y=n(448),E=n(422),_=n(460),k=n(462),time=n(165);var T=n(261),w=n(49),object=n(65),S=n(137),A=n(139);function I(e,t){const n=O(e,t),r={type:t&&t.name,value:D(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function R(e,t){return{exception:{values:[I(e,t)]}}}function O(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(L.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const L=/Minified React error #\d+;/i;function D(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function x(e,t,n,r,o){let c;if(Object(w.e)(t)&&t.error){return R(e,t.error)}if(Object(w.a)(t)||Object(w.b)(t)){const o=t;if("stack"in t)c=R(e,t);else{const t=o.name||(Object(w.a)(o)?"DOMError":"DOMException"),l=o.message?`${t}: ${o.message}`:t;c=C(e,l,n,r),Object(A.b)(c,l)}return"code"in o&&(c.tags={...c.tags,"DOMException.code":`${o.code}`}),c}if(Object(w.d)(t))return R(e,t);if(Object(w.i)(t)||Object(w.f)(t)){return c=function(e,t,n,r){const o=Object(l.c)().getClient(),c=o&&o.getOptions().normalizeDepth,d={exception:{values:[{type:Object(w.f)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Object(object.d)(t)}`}]},extra:{__serialized__:Object(S.b)(t,c)}};if(n){const t=O(e,n);t.length&&(d.exception.values[0].stacktrace={frames:t})}return d}(e,t,n,o),Object(A.a)(c,{synthetic:!0}),c}return c=C(e,t,n,r),Object(A.b)(c,`${t}`,void 0),Object(A.a)(c,{synthetic:!0}),c}function C(e,input,t,n){const r={message:input};if(n&&t){const n=O(e,t);n.length&&(r.exception={values:[{value:input,stacktrace:{frames:n}}]})}return r}var M=n(80);const P=n(57).a;let N=0;function U(){return N>0}function F(){N++,setTimeout((()=>{N--}))}function B(e,t={}
2,n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(Object(object.f)(e))return e}catch(t){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const o=r.map((e=>B(e,t)));return e.apply(this,o)}catch(e){throw F(),Object(M.n)((n=>{n.addEventProcessor((e=>(t.mechanism&&(Object(A.b)(e,void 0,void 0),Object(A.a)(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),Object(M.d)(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}Object(object.g)(r,e),Object(object.a)(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}var j=n(461);const V=["fatal","error","warning","log","info","debug"];function H(e){return"warn"===e?"warning":V.includes(e)?e:"log"}var W=n(128),G=n(816);const K=1024,Y="Breadcrumbs";class ${static __initStatic(){this.id=Y}__init(){this.name=$.id}constructor(e){$.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Object(m.b)("console",Q),this.options.dom&&Object(m.b)("dom",function(e){function t(t){let n,r="object"==typeof e?e.serializeAttribute:void 0,o="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;o&&o>K&&(o=K),"string"==typeof r&&(r=[r]);try{const e=t.event;n=function(e){return e&&!!e.target}(e)?Object(j.b)(e.target,{keyAttrs:r,maxStringLength:o}):Object(j.b)(e,{keyAttrs:r,maxStringLength:o})}catch(e){n="<unknown>"}0!==n.length&&Object(l.c)().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&Object(m.b)("xhr",z),this.options.fetch&&Object(m.b)("fetch",X),this.options.history&&Object(m.b)("history",J)}addSentryBreadcrumb(e){this.options.sentry&&Object(l.c)().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Object(A.e)(e)},{event:e})}}function Q(e){for(let i=0;i<e.args.length;i++)if("ref=Ref<"===e.args[i]){e.args[i+1]="viewRef";break}const t={category:"console",data:{arguments:e.args,logger:"console"},level:H(e.level),message:Object(W.a)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${Object(W.a)(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}Object(l.c)().addBreadcrumb(t,{input:e.args,level:e.level})}function z(e){const{startTimestamp:t,endTimestamp:n}=e,r=e.xhr[m.a];if(!t||!n||!r)return;const{method:o,url:c,status_code:d,body:body}=r,data={method:o,url:c,status_code:d},h={xhr:e.xhr,input:body,startTimestamp:t,endTimestamp:n};Object(l.c)().addBreadcrumb({category:"xhr",data:data,type:"http"},h)}function X(e){const{startTimestamp:t,endTimestamp:n}=e;if(n&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){const data=e.fetchData,r={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};Object(l.c)().addBreadcrumb({category:"fetch",data:data,level:"error",type:"http"},r)}else{const data={...e.fetchData,status_code:e.response&&e.response.status},r={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};Object(l.c)().addBreadcrumb({category:"fetch",data:data,type:"http"},r)}}function J(e){let t=e.from,n=e.to;const r=Object(G.a)(P.location.href);let o=Object(G.a)(t);const c=Object(G.a)(n);o.path||(o=r),r.protocol===c.protocol&&r.host===c.host&&(n=c.relative),r.protocol===o.protocol&&r.host===o.host&&(t=o.relative),Object(l.c)().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}$.__initStatic();class Z extends y.a{constructor(e){const t=P.SENTRY_SDK_SOURCE||Object(_.a)();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${t}:@sentry/browser`,version:E.a}],version:E.a},super(e),e.sendClientReports&&P.document&&P.document.addEventListener("visibilitychange",(()=>{"hidden"===P.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const o=x(e,t,n&&n.syntheticException||void 0,r);return Object(A.a)(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Object(v.c)(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const c=C(e,t,r&&r.syntheticException||void 0,o);return c.level=n,r&&r.event_id&&(c.event_id=r.event_id),Object(v.c)(c)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){const n=this.getIntegrationById(Y);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(e),super.sendEvent(e,t)}captureUserFeedback(e){if(!this._isEnabled())return;const t=function(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Object(T.b)(r)}},c=function(e){return[{type:"user_report"},e]}(e);return Object(k.c)(o,[c])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return;if(!this._dsn)return;const t=function(e,t,n){const r=[{type:"client_report"},{timestamp:n||Object(time.a)(),discarded_events:e}];return Object(k.c)(t?{dsn:t}:{},[r])}(e,this._options.tunnel&&Object(T.b)(this._dsn));this._sendEnvelope(t)}}class ee{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=ee.id}__init2(){this._installFunc={onerror:te,onunhandledrejection:ne}}constructor(e){ee.prototype.__init.call(this),ee.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const t in e){const n=this._installFunc[t];n&&e[t]&&(t,n(),this._installFunc[t]=void 0)}}}function te(){Object(m.b)("error",(data=>{const[e,t,n]=ae();if(!e.getIntegration(ee))return;const{msg:r,url:o,line:line,column:c,error:l}=data;if(U()||l&&l.__sentry_own_request__)return;const d=void 0===l&&Object(w.l)(r)?function(e,t,line,n){const r=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=Object(w.e)(e)?e.message:e,c="Error";const l=o.match(r);l&&(c=l[1],o=l[2]);return re({exception:{values:[{type:c,value:o}]}},t,line,n)}(r,o,line,c):re(x(t,l||r,void 0,n,!1),o,line,c);d.level="error",ie(e,l,d,"onerror")}))}function ne(){Object(m.b)("unhandledrejection",(e=>{const[t,n,r]=ae();if(!t.getIntegration(ee))return;let o=e;try{"reason"in e?o=e.reason:"detail"in e&&"reason"in e.detail&&(o=e.detail.reason)}catch(e){}if(U()||o&&o.__sentry_own_request__)return!0;const c=Object(w.j)(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:x(n,o,void 0,r,!0);c.level="error",ie(t,o,c,"onunhandledrejection")}))}function re(e,t,line,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],c=o[0]=o[0]||{},l=c.stacktrace=c.stacktrace||{},d=l.frames=l.frames||[],h=isNaN(parseInt(n,10))?void 0:n,f=isNaN(parseInt(line,10))?void 0:line,v=Object(w.l)(t)&&t.length>0?t:Object(j.a)();return 0===d.length&&d.push({colno:h,filename:v,function:"?",in_app:!0,lineno:f}),e}function ie(e,t,n,r){Object(A.a)(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function ae(){const e=Object(l.c)(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}ee.__initStatic();const oe=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class se{static __initStatic(){this.id="TryCatch"}__init(){this.name=se.id}constructor(e){se.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&Object(object.e)(P,"setTimeout",ue),this._options.setInterval&&Object(object.e)(P,"setInterval",ue),this._options.requestAnimationFrame&&Object(object.e)(P,"requestAnimationFrame",ce),this._options.XMLHttpRequest&&"XMLHttpRequest"in P&&Object(object.e)(XMLHttpRequest.prototype,"send",le);const e=this._options.eventTarget;if(e){(Array.isArray(e)?e:oe).forEach(de)}}}function ue(e){return function(...t){const n=t[0];return t[0]=B(n,{mechanism:{data:{function:Object(h.b)(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function ce(e){return function(t){return e.apply(this,[B(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Object(h.b)(e)},handled:!0,type:"instrument"}})])}}function le(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&Object(object.e)(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Object(h.b)(t)},handled:!0,type:"instrument"}},r=Object(object.f)(t);return r&&(n.mechanism.data.handler=Object(h.b)(r)),B(t,n)}))})),e.apply(this,t)}}function de(e){const t=P,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(object.e)(n,"addEventListener",(function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=B(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Object(h.b)(r),target:e},handled:!0,type:"instrument"}}))}catch(e){}return t.apply(this,[n,B(r,{mechanism:{data:{function:"addEventListener",handler:Object(h.b)(r),target:e},handled:!0,type:"instrument"}}),o])}})),Object(object.e)(n,"removeEventListener",(function(e){return function(t,n,r){const o=n;try{const n=o&&o.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(e){}return e.call(this,t,o,r)}})))}se.__initStatic();var he=n(118);class fe{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=fe.id}constructor(e={}){fe.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){const e=Object(l.c)().getClient();e&&Object(he.b)(((t,n)=>{const r=Object(l.c)().getIntegration(fe);return r?function(e,t,n,r,o){if(!(r.exception&&r.exception.values&&o&&Object(w.g)(o.originalException,Error)))return r;const c=pe(e,n,o.originalException,t);return r.exception.values=[...c,...r.exception.values],r}(e.getOptions().stackParser,r._key,r._limit,t,n):t}))}}function pe(e,t,n,r,o=[]){if(!Object(w.g)(n[r],Error)||o.length+1>=t)return o;const c=I(e,n[r]);return pe(e,t,n[r],r,[c,...o])}fe.__initStatic();class ve{constructor(){ve.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=ve.id}setupOnce(){Object(he.b)((e=>{if(Object(l.c)().getIntegration(ve)){if(!P.navigator&&!P.location&&!P.document)return e;const t=e.request&&e.request.url||P.location&&P.location.href,{referrer:n}=P.document||{},{userAgent:r}=P.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},c={...e.request,...t&&{url:t},headers:o};return{...e,request:c}}return e}))}}ve.__initStatic();class me{constructor(){me.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=me.id}setupOnce(e,t){const n=e=>{if(e.type)return e;const n=t().getIntegration(me);if(n){try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!ye(e,t))return!1;if(!ge(e,t))return!1;return!0}(e,t))return!0;
2if(function(e,t){const n=be(t),r=be(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!ye(e,t))return!1;if(!ge(e,t))return!1;return!0}(e,t))return!0;return!1}(e,n._previousEvent))return null}catch(t){return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function ge(e,t){let n=Ee(e),r=Ee(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,r=r,r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const e=r[i],t=n[i];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function ye(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function be(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Ee(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){return}}me.__initStatic();const _e="?";function ke(e,t,n,r){const o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Te=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,we=/\((\S*)(?::(\d+))(?::(\d+))\)/,Se=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ae=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ie=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Re=[[30,line=>{const e=Te.exec(line);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=we.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=Le(e[1]||_e,e[2]);return ke(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,line=>{const e=Se.exec(line);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=Ae.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||_e;return[n,t]=Le(n,t),ke(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,line=>{const e=Ie.exec(line);return e?ke(e[2],e[1]||_e,+e[3],e[4]?+e[4]:void 0):void 0}]],Oe=Object(h.a)(...Re),Le=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:_e,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var base=n(449);let De;function xe(e,t=function(){if(De)return De;if(Object(f.a)(P.fetch))return De=P.fetch.bind(P);const e=P.document;let t=P.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){}return De=t.bind(P)}()){let n=0,r=0;return Object(base.a)(e,(function(o){const c=o.body.length;n+=c,r++;const l={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,l).then((e=>(n-=c,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return De=void 0,n-=c,r--,Object(v.b)(e)}}))}function Ce(e){return Object(base.a)(e,(function(t){return new v.a(((n,r)=>{const o=new XMLHttpRequest;o.onerror=r,o.onreadystatechange=()=>{4===o.readyState&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url);for(const header in e.headers)Object.prototype.hasOwnProperty.call(e.headers,header)&&o.setRequestHeader(header,e.headers[header]);o.send(t.body)}))}))}const Me=[new r.Integrations.InboundFilters,new r.Integrations.FunctionToString,new se,new $,new ee,new fe,new me,new ve];function Pe(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=Me),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),P.SENTRY_RELEASE&&P.SENTRY_RELEASE.id&&(e.release=P.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:Object(h.c)(e.stackParser||Oe),integrations:Object(o.a)(e),transport:e.transport||(Object(f.b)()?xe
2:Ce)};Object(c.a)(Z,t),e.autoSessionTracking&&function(){if(void 0===P.document)return;const e=Object(l.c)();if(!e.captureSession)return;We(e),Object(m.b)("history",(({from:e,to:t})=>{void 0!==e&&e!==t&&We(Object(l.c)())}))}()}function Ne(e={},t=Object(l.c)()){if(!P.document)return;const{client:n,scope:r}=t.getStackTop(),o=e.dsn||n&&n.getDsn();if(!o)return;r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const script=P.document.createElement("script");script.async=!0,script.src=Object(d.b)(o,e),e.onLoad&&(script.onload=e.onLoad);const c=P.document.head||P.document.body;c&&c.appendChild(script)}function Ue(){return Object(l.c)().lastEventId()}function Fe(){}function Be(e){e()}function je(e){const t=Object(l.c)().getClient();return t?t.flush(e):Object(v.c)(!1)}function Ve(e){const t=Object(l.c)().getClient();return t?t.close(e):Object(v.c)(!1)}function He(e){return B(e)()}function We(e){e.startSession({ignoreDuration:!0}),e.captureSession()}function qe(e){const t=Object(l.c)().getClient();t&&t.captureUserFeedback(e)}},477:function(e,t,n){"use strict";var r=n(188);function o(e,t){void 0===t&&(t={});var n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(e){}return e}var c=function(){return(c=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)},l=function(){function e(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(e,t){return"string"==typeof e?r.parse(e,t):"object"==typeof e&&null!==e?e:{}}(e,t),new Promise((function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie})).catch((function(){}))}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=r.parse(document.cookie,e))},e.prototype._emitChange=function(e){for(var i=0;i<this.changeListeners.length;++i)this.changeListeners[i](e)},e.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),o(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var r in this.cookies)n[r]=o(this.cookies[r],e);return n},e.prototype.set=function(e,t,n){var o;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=c(c({},this.cookies),((o={})[e]=t,o)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.serialize(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=c(c({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=c({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.serialize(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}();t.a=l},478:function(e,t,n){"use strict";n.d(t,"a",(function(){return mn}));var r=n(10);n(174),n(106),n(17),n(54),n(96),n(75),n(51),n(77),n(192),n(52),n(97);function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var c,l,d,h,f,v,m,y,E,_,k,T,w,S=function(){return c||"undefined"!=typeof window&&(c=window.gsap)&&c.registerPlugin&&c},A=1,I=[],R=[],O=[],L=Date.now,D=function(e,t){return t},x=function(element,e){return~O.indexOf(element)&&O[O.indexOf(element)+1][e]},C=function(e){return!!~_.indexOf(e)},M=function(element,e,t,n,r){return element.addEventListener(e,t,{passive:!1!==n,capture:!!r})},P=function(element,e,t,n){return element.removeEventListener(e,t,!!n)},N="scrollLeft",U="scrollTop",F=function(){return k&&k.isPressed||R.cache++},B=function(e,t){var n=function n(r){if(r||0===r){A&&(d.history.scrollRestoration="manual");var o=k&&k.isPressed;r=n.v=Math.round(r)||(k&&k.iOS?1:0),e(r),n.cacheID=R.cache,o&&D("ss",r)}else(t||R.cache!==n.cacheID||D("ref"))&&(n.cacheID=R.cache,n.v=e());return n.v+n.offset};return n.offset=0,e&&n},j={s:N,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:B((function(e){return arguments.length?d.scrollTo(e,V.sc()):d.pageXOffset||h.scrollLeft||f.scrollLeft||v.scrollLeft||0}))},V={s:U,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:j,sc:B((function(e){return arguments.length?d.scrollTo(j.sc(),e):d.pageYOffset||h.scrollTop||f.scrollTop||v.scrollTop||0}))},H=function(e,t){return(t&&t._ctx&&t._ctx.selector||c.utils.toArray)(e)[0]||("string"==typeof e&&!1!==c.config().nullTargetWarn?console.warn("Element not found:",e):null)},W=function(element,e){var s=e.s,t=e.sc;C(element)&&(element=h.scrollingElement||f);var i=R.indexOf(element),n=t===V.sc?1:2;!~i&&(i=R.push(element)-1),R[i+n]||M(element,"scroll",F);var r=R[i+n],o=r||(R[i+n]=B(x(element,s),!0)||(C(element)?t:B((function(e){return arguments.length?element[s]=e:element[s]}))));return o.target=element,r||(o.smooth="smooth"===c.getProperty(element,"scrollBehavior")),o},G=function(e,t,n){var r=e,o=e,c=L(),l=c,d=t||50,h=Math.max(500,3*d),f=function(e,t){var h=L();t||h-c>d?(o=r,r=e,l=c,c=h):n?r+=e:r=o+(e-o)/(h-l)*(c-l)};return{update:f,reset:function(){o=r=n?0:r,l=c=0},getVelocity:function(e){var t=l,d=o,v=L();return(e||0===e)&&e!==r&&f(e),c===l||v-l>
vendor: 18,722 bytes, line 2
2h?0:(r+(n?d:-d))/((n?v:c)-t)*1e3}}},K=function(e,t){return t&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},Y=function(a){var e=Math.max.apply(Math,a),t=Math.min.apply(Math,a);return Math.abs(e)>=Math.abs(t)?e:t},$=function(){var e,data,t,n;(E=c.core.globals().ScrollTrigger)&&E.core&&(e=E.core,data=e.bridge||{},t=e._scrollers,n=e._proxies,t.push.apply(t,R),n.push.apply(n,O),R=t,O=n,D=function(e,t){return data[e](t)})},Q=function(e){return c=e||S(),!l&&c&&"undefined"!=typeof document&&document.body&&(d=window,h=document,f=h.documentElement,v=h.body,_=[d,h,f,v],c.utils.clamp,w=c.core.context||function(){},y="onpointerenter"in v?"pointer":"mouse",m=z.isTouch=d.matchMedia&&d.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in d||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,T=z.eventTypes=("ontouchstart"in f?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in f?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout((function(){return A=0}),500),$(),l=1),l};j.op=V,R.cache=0;var z=function(){function e(e){this.init(e)}var t,n,r;return e.prototype.init=function(e){l||Q(c)||console.warn("Please gsap.registerPlugin(Observer)"),E||$();var t=e.tolerance,n=e.dragMinimum,r=e.type,o=e.target,_=e.lineHeight,S=e.debounce,A=e.preventDefault,R=e.onStop,O=e.onStopDelay,D=e.ignore,x=e.wheelSpeed,N=e.event,U=e.onDragStart,B=e.onDragEnd,z=e.onDrag,X=e.onPress,J=e.onRelease,Z=e.onRight,ee=e.onLeft,te=e.onUp,ne=e.onDown,re=e.onChangeX,ie=e.onChangeY,ae=e.onChange,oe=e.onToggleX,se=e.onToggleY,ue=e.onHover,ce=e.onHoverEnd,le=e.onMove,de=e.ignoreCheck,he=e.isNormalizer,fe=e.onGestureStart,pe=e.onGestureEnd,ve=e.onWheel,me=e.onEnable,ge=e.onDisable,ye=e.onClick,be=e.scrollSpeed,Ee=e.capture,_e=e.allowClicks,ke=e.lockAxis,Te=e.onLockAxis;this.target=o=H(o)||f,this.vars=e,D&&(D=c.utils.toArray(D)),t=t||1e-9,n=n||0,x=x||1,be=be||1,r=r||"wheel,touch,pointer",S=!1!==S,_||(_=parseFloat(d.getComputedStyle(v).lineHeight)||22);var we,Se,Ae,Ie,Re,Oe,Le,De=this,xe=0,Ce=0,Me=e.passive||!A&&!1!==e.passive,Pe=W(o,j),Ne=W(o,V),Ue=Pe(),Fe=Ne(),Be=~r.indexOf("touch")&&!~r.indexOf("pointer")&&"pointerdown"===T[0],je=C(o),Ve=o.ownerDocument||h,He=[0,0,0],We=[0,0,0],qe=0,Ge=function(){return qe=L()},Ke=function(e,t){return(De.event=e)&&D&&function(element,e){for(var i=e.length;i--;)if(e[i]===element||e[i].contains(element))return!0;return!1}(e.target,D)||t&&Be&&"touch"!==e.pointerType||de&&de(e,t)},Ye=function(){var e=De.deltaX=Y(He),n=De.deltaY=Y(We),r=Math.abs(e)>=t,o=Math.abs(n)>=t;ae&&(r||o)&&ae(De,e,n,He,We),r&&(Z&&De.deltaX>0&&Z(De),ee&&De.deltaX<0&&ee(De),re&&re(De),oe&&De.deltaX<0!=xe<0&&oe(De),xe=De.deltaX,He[0]=He[1]=He[2]=0),o&&(ne&&De.deltaY>0&&ne(De),te&&De.deltaY<0&&te(De),ie&&ie(De),se&&De.deltaY<0!=Ce<0&&se(De),Ce=De.deltaY,We[0]=We[1]=We[2]=0),(Ie||Ae)&&(le&&le(De),Ae&&(U&&1===Ae&&U(De),z&&z(De),Ae=0),Ie=!1),Oe&&!(Oe=!1)&&Te&&Te(De),Re&&(ve(De),Re=!1),we=0},$e=function(e,t,n){He[n]+=e,We[n]+=t,De._vx.update(e),De._vy.update(t),S?we||(we=requestAnimationFrame(Ye)):Ye()},Qe=function(e,t){ke&&!Le&&(De.axis=Le=Math.abs(e)>Math.abs(t)?"x":"y",Oe=!0),"y"!==Le&&(He[2]+=e,De._vx.update(e,!0)),"x"!==Le&&(We[2]+=t,De._vy.update(t,!0)),S?we||(we=requestAnimationFrame(Ye)):Ye()},ze=function(e){if(!Ke(e,1)){var t=(e=K(e,A)).clientX,r=e.clientY,o=t-De.x,c=r-De.y,l=De.isDragging;De.x=t,De.y=r,(l||(o||c)&&(Math.abs(De.startX-t)>=n||Math.abs(De.startY-r)>=n))&&(Ae||(Ae=l?2:1),l||(De.isDragging=!0),Qe(o,c))}},Xe=De.onPress=function(e){Ke(e,1)||e&&e.button||(De.axis=Le=null,Se.pause(),De.isPressed=!0,e=K(e),xe=Ce=0,De.startX=De.x=e.clientX,De.startY=De.y=e.clientY,De._vx.reset(),De._vy.reset(),M(he?o:Ve,T[1],ze,Me,!0),De.deltaX=De.deltaY=0,X&&X(De))},Je=De.onRelease=function(e){if(!Ke(e,1)){P(he?o:Ve,T[1],ze,!0);var t=!isNaN(De.y-De.startY),n=De.isDragging,r=n&&(Math.abs(De.x-De.startX)>3||Math.abs(De.y-De.startY)>3),l=K(e);!r&&t&&(De._vx.reset(),De._vy.reset(),A&&_e&&c.delayedCall(.08,(function(){if(L()-qe>300&&!e.defaultPrevented)if(e.target.click)e.target.click();else if(Ve.createEvent){var t=Ve.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,d,1,l.screenX,l.screenY,l.clientX,l.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(t)}}))),De.isDragging=De.isGesturing=De.isPressed=!1,R&&n&&!he&&Se.restart(!0),Ae&&Ye(),B&&n&&B(De),J&&J(De,r)}},Ze=function(e){return e.touches&&e.touches.length>1&&(De.isGesturing=!0)&&fe(e,De.isDragging)},et=function(){return(De.isGesturing=!1)||pe(De)},tt=function(e){if(!Ke(e)){var t=Pe(),n=Ne();$e((t-Ue)*be,(n-Fe)*be,1),Ue=t,Fe=n,R&&Se.restart(!0)}},nt=function(e){if(!Ke(e)){e=K(e,A),ve&&(Re=!0);var t=(1===e.deltaMode?_:2===e.deltaMode?d.innerHeight:1)*x;$e(e.deltaX*t,e.deltaY*t,0),R&&!he&&Se.restart(!0)}},it=function(e){if(!Ke(e)){var t=e.clientX,n=e.clientY,r=t-De.x,o=n-De.y;De.x=t,De.y=n,Ie=!0,R&&Se.restart(!0),(r||o)&&Qe(r,o)}},at=function(e){De.event=e,ue(De)},ot=function(e){De.event=e,ce(De)},st=function(e){return Ke(e)||K(e,A)&&ye(De)};Se=De._dc=c.delayedCall(O||.25,(function(){De._vx.reset(),De._vy.reset(),Se.pause(),R&&R(De)})).pause(),De.deltaX=De.deltaY=0,De._vx=G(0,50,!0),De._vy=G(0,50,!0),De.scrollX=Pe,De.scrollY=Ne,De.isDragging=De.isGesturing=De.isPressed=!1,w(this),De.enable=function(e){return De.isEnabled||(M(je?Ve:o,"scroll",F),r.indexOf("scroll")>=0&&M(je?Ve:o,"scroll",tt,Me,Ee),r.indexOf("wheel")>=0&&M(o,"wheel",nt,Me,Ee),(r.indexOf("touch")>=0&&m||r.indexOf("pointer")>=0)&&(M(o,T[0],Xe,Me,Ee),M(Ve,T[2],Je),M(Ve,T[3],Je),_e&&M(o,"click",Ge,!0,!0),ye&&M(o,"click",st),fe&&M(Ve,"gesturestart",Ze),pe&&M(Ve,"gestureend",et),ue&&M(o,y+"enter",at),ce&&M(o,y+"leave",ot),le&&M(o,y+"move",it)),De.isEnabled=!0,De.isDragging=De.isGesturing=De.isPressed=Ie=Ae=!1,De._vx.reset(),De._vy.reset(),Ue=Pe(),Fe=Ne(),e&&e.type&&Xe(e),me&&me(De)),De},De.disable=function(){De.isEnabled&&(I.filter((function(e){return e!==De&&C(e.target)})).length||P(je?Ve:o,"scroll",F),De.isPressed&&(De._vx.reset(),De._vy.reset(),P(he?o:Ve,T[1],ze,!0)),P(je?Ve:o,"scroll",tt,Ee),P(o,"wheel",nt,Ee),P(o,T[0],Xe,Ee),P(Ve,T[2],Je),P(Ve,T[3],Je),P(o,"click",Ge,!0),P(o,"click",st),P(Ve,"gesturestart",Ze),P(Ve,"gestureend",et),P(o,y+"enter",at),P(o,y+"leave",ot),P(o,y+"move",it),De.isEnabled=De.isPressed=De.isDragging=!1,ge&&ge(De))},De.kill=De.revert=function(){De.disable();var i=I.indexOf(De);i>=0&&I.splice(i,1),k===De&&(k=0)},I.push(De),he&&C(o)&&(k=De),De.enable(N)},t=e,(n=[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}])&&o(t.prototype,n),r&&o(t,r),e}();z.version="3.14.2",z.create=function(e){return new z(e)},z.register=Q,z.getAll=function(){return I.slice()},z.getById=function(e){return I.filter((function(t){return t.vars.id===e}))[0]},S()&&c.registerPlugin(z);var X,J,Z,ee,te,ne,re,ie,ae,oe,se,ue,ce,le,de,he,fe,pe,ve,me,ge,ye,be,Ee,_e,ke,Te,we,Se,Ae,Ie,Re,Oe,Le,De,xe,Ce,Me,Pe=1,Ne=Date.now,Ue=Ne(),Fe=0,Be=0,je=function(e,t,n){var r=et(e)&&("clamp("===e.substr(0,6)||e.indexOf("max")>-1);return n["_"+t+"Clamp"]=r,r?e.substr(6,e.length-7):e},Ve=function(e,t){return!t||et(e)&&"clamp("===e.substr(0,6)?e:"clamp("+e+")"},He=function e(){return Be&&requestAnimationFrame(e)},We=function(){return le=1},qe=function(){return le=0},Ge=function(e){return e},Ke=function(e){return Math.round(1e5*e)/1e5||0},Ye=function(){return"undefined"!=typeof window},$e=function(){return X||Ye()&&(X=window.gsap)&&X.registerPlugin&&X},Qe=function(e){return!!~re.indexOf(e)},ze=function(e){return("Height"===e?Ie:Z["inner"+e])||te["client"+e]||ne["client"+e]},Xe=function(element){return x(element,"getBoundingClientRect")||(Qe(element)?function(){return cn.width=Z.innerWidth,cn.height=Ie,cn}:function(){return Et(element)})},Je=function(element,e){var s=e.s,t=e.d2,n=e.d,a=e.a;return Math.max(0,(s="scroll"+t)&&(a=x(element,s))?a()-Xe(element)()[n]:Qe(element)?(te[s]||ne[s])-ze(t):element[s]-element["offset"+t])},Ze=function(e,t){for(var i=0;i<ve.length;i+=3)(!t||~t.indexOf(ve[i+1]))&&e(ve[i],ve[i+1],ve[i+2])},et=function(e){return"string"==typeof e},tt=function(e){return"function"==typeof e},nt=function(e){return"number"==typeof e},it=function(e){return"object"===Object(r.a)(e)},at=function(e,t,n){return e&&e.progress(t?0:1)&&n&&e.pause()},ot=function(e,t){if(e.enabled){var n=e._ctx?e._ctx.add((function(){return t(e)})):t(e);n&&n.totalTime&&(e.callbackAnimation=n)}},st=Math.abs,ut="left",ct="right",lt="bottom",ht="width",ft="height",pt="padding",vt="margin",mt="Width",gt="px",yt=function(element){return Z.getComputedStyle(element)},bt=function(e,t){for(var p in t)p in e||(e[p]=t[p]);return e},Et=function(element,e){var t=e&&"matrix(1, 0, 0, 1, 0, 0)"!==yt(element)[de]&&X.to(element,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),n=element.getBoundingClientRect();return t&&t.progress(0).kill(),n},_t=function(element,e){var t=e.d2;return element["offset"+t]||element["client"+t]||0},kt=function(e){var p,a=[],t=e.labels,n=e.duration();for(p in t)a.push(t[p]/n);return a},Tt=function(e){var t=X.utils.snap(e),a=Array.isArray(e)&&e.slice(0).sort((function(a,b){return a-b}));return a?function(e,n,r){var i;if(void 0===r&&(r=.001),!n)return t(e);if(n>0){for(e-=r,i=0;i<a.length;i++)if(a[i]>=e)return a[i];return a[i-1]}for(i=a.length,e+=r;i--;)if(a[i]<=e)return a[i];return a[0]}:function(n,r,o){void 0===o&&(o=.001);var c=t(n);return!r||Math.abs(c-n)<o||c-n<0==r<0?c:t(r<0?n-e:n+e)}},wt=function(e,element,t,n){return t.split(",").forEach((function(t){return e(element,t,n)}))},St=function(element,e,t,n,r){return element.addEventListener(e,t,{passive:!n,capture:!!r})},At=function(element,e,t,n){return element.removeEventListener(e,t,!!n)},It=function(e,t,n){(n=n&&n.wheelHandler)&&(e(t,"wheel",n),e(t,"touchmove",n))},Rt={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},Ot={toggleActions:"play",anticipatePin:0},Lt={top:0,left:0,center:.5,bottom:1,right:1},Dt=function(e,t){if(et(e)){var n=e.indexOf("="),r=~n?+(e.charAt(n-1)+1)*parseFloat(e.substr(n+1)):0;~n&&(e.indexOf("%")>n&&(r*=t/100),e=e.substr(0,n-1)),e=r+(e in Lt?Lt[e]*t:~e.indexOf("%")?parseFloat(e)*t/100:parseFloat(e)||0)}return e},xt=function(e,t,n,r,o,c,l,d){var h=o.startColor,f=o.endColor,v=o.fontSize,m=o.indent,y=o.fontWeight,E=ee.createElement("div"),_=Qe(n)||"fixed"===x(n,"pinType"),k=-1!==e.indexOf("scroller"),T=_?ne:n,w=-1!==e.indexOf("start"),S=w?h:f,A="border-color:"+S+";font-size:"+v+";color:"+S+";font-weight:"+y+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return A+="position:"+((k||d)&&_?"fixed;":"absolute;"),(k||d||!_)&&(A+=(r===V?ct:lt)+":"+(c+parseFloat(m))+"px;"),l&&(A+="box-sizing:border-box;text-align:left;width:"+l.offsetWidth+"px;"),E._isStart=w,E.setAttribute("class","gsap-marker-"+e+(t?" marker-"+t:"")),E.style.cssText=A,E.innerText=t||0===t?e+"-"+t:e,T.children[0]?T.insertBefore(E,T.children[0]):T.appendChild(E),E._offset=E["offset"+r.op.d2],Ct(E,0,r,w),E},Ct=function(marker,e,t,n){var r={display:"block"},o=t[n?"os2":"p2"],c=t[n?"p2":"os2"];marker._isFlipped=n,r[t.a+"Percent"]=n?-100:0,r[t.a]=n?"1px":0,r["border"+o+mt]=1,r["border"+c+mt]=0,r[t.p]=e+"px",X.set(marker,r)},Mt=[],Pt={},Nt=function(){return Ne()-Fe>34&&(De||(De=requestAnimationFrame(tn)))},Ut=function(){(!be||!be.isPressed||be.startX>ne.clientWidth)&&(R.cache++,be?De||(De=requestAnimationFrame(tn)):tn(),Fe||Wt("scrollStart"),Fe=Ne())},Ft=function(){ke=Z.innerWidth,_e=Z.innerHeight},Bt=function(e){R.cache++,(!0===e||!ce&&!ye&&!ee.fullscreenElement&&!ee.webkitFullscreenElement&&(!Ee||ke!==Z.innerWidth||Math.abs(Z.innerHeight-_e)>.25*Z.innerHeight))&&ie.restart(!0)},jt={},Vt=[],Ht=function e(){return At(mn,"scrollEnd",e)||Jt(!0)},Wt=function(e){return jt[e]&&jt[e].map((function(e){return e()}))||Vt},qt=[],Gt=function(e){for(var i=0;i<qt.length;i+=5)(!e||qt[i+4]&&qt[i+4].query===e)&&(qt[i].style.cssText=qt[i+1],qt[i].getBBox&&qt[i].setAttribute("transform",qt[i+2]||""),qt[i+3].uncache=1)},Kt=function(){return R.forEach((function(e){return tt(e)&&++e.cacheID&&(e.rec=e())}))},Yt=function(e,t){var n;for(he=0;he<Mt.length;he++)!(n=Mt[he])||t&&n._ctx!==t||(e?n.kill(1):n.revert(!0,!0));Re=!0,t&&Gt(t),t||Wt("revert")},$t=function(e,t){R.cache++,(t||!xe)&&R.forEach((function(e){return tt(e)&&e.cacheID++&&(e.rec=0)})),et(e)&&(Z.history.scrollRestoration=Se=e)},Qt=0,zt=function(){ne.appendChild(Ae),Ie=!be&&Ae.offsetHeight||Z.innerHeight,ne.removeChild(Ae)},Xt=function(e){return ae(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach((function(t){return t.style.display=e?"none":"block"}))},Jt=function(e,t){if(te=ee.documentElement,ne=ee.body,re=[Z,ee,te,ne],!Fe||e||Re){zt(),xe=mn.isRefreshing=!0,Re||Kt();var n=Wt("refreshInit");me&&mn.sort(),t||Yt(),R.forEach((function(e){tt(e)&&(e.smooth&&(e.target.style.scrollBehavior="auto"),e(0))})),Mt.slice(0).forEach((function(e){return e.refresh()})),Re=!1,Mt.forEach((function(e){if(e._subPinOffset&&e.pin){var t=e.vars.horizontal?"offsetWidth":"offsetHeight",n=e.pin[t];e.revert(!0,1),e.adjustPinSpacing(e.pin[t]-n),e.refresh()}})),Oe=1,Xt(!0),Mt.forEach((function(e){var t=Je(e.scroller,e._dir),n="max"===e.vars.end||e._endClamp&&e.end>t,r=e._startClamp&&e.start>=t;(n||r)&&e.setPositions(r?t-1:e.start,n?Math.max(r?t:e.start+1,t):e.end,!0)})),Xt(!1),Oe=0,n.forEach((function(e){return e&&e.render&&e.render(-1)})),R.forEach((function(e){tt(e)&&(e.smooth&&requestAnimationFrame((function(){return e.target.style.scrollBehavior="smooth"})),e.rec&&e(e.rec))})),$t(Se,1),ie.pause(),Qt++,xe=2,tn(2),Mt.forEach((function(e){return tt(e.vars.onRefresh)&&e.vars.onRefresh(e)})),xe=mn.isRefreshing=!1,Wt("refresh")}else St(mn,"scrollEnd",Ht)},Zt=0,en=1,tn=function(e){if(2===e||!xe&&!Re){mn.isUpdating=!0,Me&&Me.update(0);var t=Mt.length,time=Ne(),n=time-Ue>=50,r=t&&Mt[0].scroll();if(en=Zt>r?-1:1,xe||(Zt=r),n&&(Fe&&!le&&time-Fe>200&&(Fe=0,Wt("scrollEnd")),se=Ue,Ue=time),en<0){for(he=t;he-- >0;)Mt[he]&&Mt[he].update(0,n);en=1}else for(he=0;he<t;he++)Mt[he]&&Mt[he].update(0,n);mn.isUpdating=!1}De=0},nn=[ut,"top",lt,ct,"marginBottom","marginRight","marginTop","marginLeft","display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],rn=nn.concat([ht,ft,"boxSizing","maxWidth","maxHeight","position",vt,pt,"paddingTop","paddingRight","paddingBottom","paddingLeft"]),an=function(e,t,n,r){if(!e._gsap.swappedIn){for(var p,i=nn.length,o=t.style,c=e.style;i--;)o[p=nn[i]]=n[p];o.position="absolute"===n.position?"absolute":"relative","inline"===n.display&&(o.display="inline-block"),c.bottom=c.right="auto",o.flexBasis=n.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o.width=_t(e,j)+gt,o.height=_t(e,V)+gt,o.padding=c.margin=c.top=c.left="0",sn(r),c.width=c.maxWidth=n.width,c.height=c.maxHeight=n.height,c.padding=n.padding,e.parentNode!==t&&(e.parentNode.insertBefore(t,e),t.appendChild(e)),e._gsap.swappedIn=!0}},on=/([A-Z])/g,sn=function(e){if(e){var p,t,style=e.t.style,n=e.length,i=0;for((e.t._gsap||X.core.getCache(e.t)).uncache=1;i<n;i+=2)t=e[i+1],p=e[i],t?style[p]=t:style[p]&&style.removeProperty(p.replace(on,"-$1").toLowerCase())}},un=function(element){for(var e=rn.length,style=element.style,t=[],i=0;i<e;i++)t.push(rn[i],style[rn[i]]);return t.t=element,t},cn={left:0,top:0},ln=function(e,t,n,r,o,marker,c,l,d,h,f,v,m,y){tt(e)&&(e=e(l)),et(e)&&"max"===e.substr(0,3)&&(e=v+("="===e.charAt(4)?Dt("0"+e.substr(3),n):0));var E,_,element,time=m?m.time():0;if(m&&m.seek(0),isNaN(e)||(e=+e),nt(e))m&&(e=X.utils.mapRange(m.scrollTrigger.start,m.scrollTrigger.end,0,v,e)),c&&Ct(c,n,r,!0);else{tt(t)&&(t=t(l));var k,T,w,S,A=(e||"0").split(" ");element=H(t,l)||ne,(k=Et(element)||{})&&(k.left||k.top)||"none"!==yt(element).display||(S=element.style.display,element.style.display="block",k=Et(element),S?element.style.display=S:element.style.removeProperty("display")),T=Dt(A[0],k[r.d]),w=Dt(A[1]||"0",n),e=k[r.p]-d[r.p]-h+T+o-w,c&&Ct(c,w,r,n-w<20||c._isStart&&w>20),n-=n-w}if(y&&(l[y]=e||-.001,e<0&&(e=0)),marker){var I=e+n,R=marker._isStart;E="scroll"+r.d2,Ct(marker,I,r,R&&I>20||!R&&(f?Math.max(ne[E],te[E]):marker.parentNode[E])<=I+1),f&&(d=Et(c),f&&(marker.style[r.op.p]=d[r.op.p]-r.op.m-marker._offset+gt))}return m&&element&&(E=Et(element),m.seek(v),_=Et(element),m._caScrollDist=E[r.p]-_[r.p],e=e/m._caScrollDist*v),m&&m.seek(time),m?e:Math.round(e)},dn=/(webkit|moz|length|cssText|inset)/i,hn=function(element,e,t,n){if(element.parentNode!==e){var p,r,style=element.style;if(e===ne){for(p in element._stOrig=style.cssText,r=yt(element))+p||dn.test(p)||!r[p]||"string"!=typeof style[p]||"0"===p||(style[p]=r[p]);style.top=t,style.left=n}else style.cssText=element._stOrig;X.core.getCache(element).uncache=1,e.appendChild(element)}},fn=function(e,t,n){var r=t,o=r;return function(t){var c=Math.round(e());return c!==r&&c!==o&&Math.abs(c-r)>3&&Math.abs(c-o)>3&&(t=c,n&&n()),o=r,r=Math.round(t)}},pn=function(marker,e,t){var n={};n[e.p]="+="+t,X.set(marker,n)},vn=function(e,t){var n=W(e,t),r="_scroll"+t.p2,o=function t(o,c,l,d,h){var f=t.tween,v=c.onComplete,m={};l=l||n();var y=fn(n,l,(function(){f.kill(),t.tween=0}));return h=d&&h||0,d=d||o-l,f&&f.kill(),c[r]=o,c.inherit=!1,c.modifiers=m,m[r]=function(){return y(l+d*f.ratio+h*f.ratio*f.ratio)},c.onUpdate=function(){R.cache++,t.tween&&tn()},c.onComplete=function(){t.tween=0,v&&v.call(f)},f=t.tween=X.to(e,c)};return e[r]=n,n.wheelHandler=function(){return o.tween&&o.tween.kill()&&(o.tween=0)},St(e,"wheel",n.wheelHandler),mn.isTouch&&St(e,"touchmove",n.wheelHandler),o},mn=function(){function e(t,n){J||e.register(X)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),we(this),this.init(t,n)}return e.prototype.init=function(t,n){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),Be){var r,o,c,l,d,h,f,v,m,y,E,_,k,T,w,S,A,I,L,D,C,M,P,N,U,F,B,G,K,Y,$,Q,z,J,re,ie,ue,de,fe,pe,element,ve,ye=t=bt(et(t)||nt(t)||t.nodeType?{trigger:t}:t,Ot),be=ye.onUpdate,Ee=ye.toggleClass,_e=ye.id,ke=ye.onToggle,Te=ye.onRefresh,we=ye.scrub,Se=ye.trigger,Ae=ye.pin,Ie=ye.pinSpacing,Re=ye.invalidateOnRefresh,De=ye.anticipatePin,Ue=ye.onScrubComplete,He=ye.onSnapComplete,We=ye.once,qe=ye.snap,Ye=ye.pinReparent,$e=ye.pinSpacer,Ze=ye.containerAnimation,ut=ye.fastScrollEnd,ct=ye.preventOverlaps,lt=t.horizontal||t.containerAnimation&&!1!==t.horizontal?j:V,ht=!we&&0!==we,ft=H(t.scroller||Z),wt=X.core.getCache(ft),It=Qe(ft),Lt="fixed"===("pinType"in t?t.pinType:x(ft,"pinType")||It&&"f
2ixed"),Ct=[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack],Nt=ht&&t.toggleActions.split(" "),Ft="markers"in t?t.markers:Ot.markers,jt=It?0:parseFloat(yt(ft)["border"+lt.p2+mt])||0,Vt=this,Wt=t.onRefreshInit&&function(){return t.onRefreshInit(Vt)},qt=function(e,t,n){var r=n.d,o=n.d2,a=n.a;return(a=x(e,"getBoundingClientRect"))?function(){return a()[r]}:function(){return(t?ze(o):e["client"+o])||0}}(ft,It,lt),Gt=function(element,e){return!e||~O.indexOf(element)?Xe(element):function(){return cn}}(ft,It),Kt=0,Yt=0,$t=0,zt=W(ft,lt);if(Vt._startClamp=Vt._endClamp=!1,Vt._dir=lt,De*=45,Vt.scroller=ft,Vt.scroll=Ze?Ze.time.bind(Ze):zt,l=zt(),Vt.vars=t,n=n||t.animation,"refreshPriority"in t&&(me=1,-9999===t.refreshPriority&&(Me=Vt)),wt.tweenScroll=wt.tweenScroll||{top:vn(ft,V),left:vn(ft,j)},Vt.tweenTo=r=wt.tweenScroll[lt.p],Vt.scrubDuration=function(e){(z=nt(e)&&e)?Q?Q.duration(e):Q=X.to(n,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:z,paused:!0,onComplete:function(){return Ue&&Ue(Vt)}}):(Q&&Q.progress(1).kill(),Q=0)},n&&(n.vars.lazy=!1,n._initted&&!Vt.isReverted||!1!==n.vars.immediateRender&&!1!==t.immediateRender&&n.duration()&&n.render(0,!0,!0),Vt.animation=n.pause(),n.scrollTrigger=Vt,Vt.scrubDuration(we),Y=0,_e||(_e=n.vars.id)),qe&&(it(qe)&&!qe.push||(qe={snapTo:qe}),"scrollBehavior"in ne.style&&X.set(It?[ne,te]:ft,{scrollBehavior:"auto"}),R.forEach((function(e){return tt(e)&&e.target===(It?ee.scrollingElement||te:ft)&&(e.smooth=!1)})),c=tt(qe.snapTo)?qe.snapTo:"labels"===qe.snapTo?function(e){return function(t){return X.utils.snap(kt(e),t)}}(n):"labelsDirectional"===qe.snapTo?(pe=n,function(e,t){return Tt(kt(pe))(e,t.direction)}):!1!==qe.directional?function(e,t){return Tt(qe.snapTo)(e,Ne()-Yt<500?0:t.direction)}:X.utils.snap(qe.snapTo),J=qe.duration||{min:.1,max:2},J=it(J)?oe(J.min,J.max):oe(J,J),re=X.delayedCall(qe.delay||z/2||.1,(function(){var e=zt(),t=Ne()-Yt<500,o=r.tween;if(!(t||Math.abs(Vt.getVelocity())<10)||o||le||Kt===e)Vt.isActive&&Kt!==e&&re.restart(!0);else{var l,d,progress=(e-h)/T,v=n&&!ht?n.totalProgress():progress,m=t?0:(v-$)/(Ne()-se)*1e3||0,y=X.utils.clamp(-progress,1-progress,st(m/2)*m/.185),E=progress+(!1===qe.inertia?0:y),_=qe,k=_.onStart,w=_.onInterrupt,S=_.onComplete;if(l=c(E,Vt),nt(l)||(l=E),d=Math.max(0,Math.round(h+l*T)),e<=f&&e>=h&&d!==e){if(o&&!o._initted&&o.data<=st(d-e))return;!1===qe.inertia&&(y=l-progress),r(d,{duration:J(st(.185*Math.max(st(E-v),st(l-v))/m/.05||0)),ease:qe.ease||"power3",data:st(d-e),onInterrupt:function(){return re.restart(!0)&&w&&w(Vt)},onComplete:function(){Vt.update(),Kt=zt(),n&&!ht&&(Q?Q.resetTo("totalProgress",l,n._tTime/n._tDur):n.progress(l)),Y=$=n&&!ht?n.totalProgress():Vt.progress,He&&He(Vt),S&&S(Vt)}},e,y*T,d-e-y*T),k&&k(Vt,r.tween)}}})).pause()),_e&&(Pt[_e]=Vt),(fe=(Se=Vt.trigger=H(Se||!0!==Ae&&Ae))&&Se._gsap&&Se._gsap.stRevert)&&(fe=fe(Vt)),Ae=!0===Ae?Se:H(Ae),et(Ee)&&(Ee={targets:Se,className:Ee}),Ae&&(!1===Ie||Ie===vt||(Ie=!(!Ie&&Ae.parentNode&&Ae.parentNode.style&&"flex"===yt(Ae.parentNode).display)&&pt),Vt.pin=Ae,(o=X.core.getCache(Ae)).spacer?w=o.pinState:($e&&(($e=H($e))&&!$e.nodeType&&($e=$e.current||$e.nativeElement),o.spacerIsNative=!!$e,$e&&(o.spacerState=un($e))),o.spacer=I=$e||ee.createElement("div"),I.classList.add("pin-spacer"),_e&&I.classList.add("pin-spacer-"+_e),o.pinState=w=un(Ae)),!1!==t.force3D&&X.set(Ae,{force3D:!0}),Vt.spacer=I=o.spacer,K=yt(Ae),N=K[Ie+lt.os2],D=X.getProperty(Ae),C=X.quickSetter(Ae,lt.a,gt),an(Ae,I,K),A=un(Ae)),Ft){_=it(Ft)?bt(Ft,Rt):Rt,y=xt("scroller-start",_e,ft,lt,_,0),E=xt("scroller-end",_e,ft,lt,_,0,y),L=y["offset"+lt.op.d2];var content=H(x(ft,"content")||ft);v=this.markerStart=xt("start",_e,content,lt,_,L,0,Ze),m=this.markerEnd=xt("end",_e,content,lt,_,L,0,Ze),Ze&&(de=X.quickSetter([v,m],lt.a,gt)),Lt||O.length&&!0===x(ft,"fixedMarkers")||(ve=yt(element=It?ne:ft).position,element.style.position="absolute"===ve||"fixed"===ve?ve:"relative",X.set([y,E],{force3D:!0}),F=X.quickSetter(y,lt.a,gt),G=X.quickSetter(E,lt.a,gt))}if(Ze){var Xt=Ze.vars.onUpdate,Zt=Ze.vars.onUpdateParams;Ze.eventCallback("onUpdate",(function(){Vt.update(0,0,1),Xt&&Xt.apply(Ze,Zt||[])}))}if(Vt.previous=function(){return Mt[Mt.indexOf(Vt)-1]},Vt.next=function(){return Mt[Mt.indexOf(Vt)+1]},Vt.revert=function(e,t){if(!t)return Vt.kill(!0);var r=!1!==e||!Vt.enabled,o=ce;r!==Vt.isReverted&&(r&&(ie=Math.max(zt(),Vt.scroll.rec||0),$t=Vt.progress,ue=n&&n.progress()),v&&[v,m,y,E].forEac
vendor: 18,673 bytes, line 2
2h((function(e){return e.style.display=r?"none":"block"})),r&&(ce=Vt,Vt.update(r)),!Ae||Ye&&Vt.isActive||(r?function(e,t,n){sn(n);var r=e._gsap;if(r.spacerIsNative)sn(r.spacerState);else if(e._gsap.swappedIn){var o=t.parentNode;o&&(o.insertBefore(e,t),o.removeChild(t))}e._gsap.swappedIn=!1}(Ae,I,w):an(Ae,I,yt(Ae),U)),r||Vt.update(r),ce=o,Vt.isReverted=r)},Vt.refresh=function(o,c,_,R){if(!ce&&Vt.enabled||c)if(Ae&&o&&Fe)St(e,"scrollEnd",Ht);else{!xe&&Wt&&Wt(Vt),ce=Vt,r.tween&&!_&&(r.tween.kill(),r.tween=0),Q&&Q.pause(),Re&&n&&(n.revert({kill:!1}).invalidate(),n.getChildren?n.getChildren(!0,!0,!1).forEach((function(e){return e.vars.immediateRender&&e.render(0,!0,!0)})):n.vars.immediateRender&&n.render(0,!0,!0)),Vt.isReverted||Vt.revert(!0,!0),Vt._subPinOffset=!1;var O,L,x,C,N,F,G,K,Y,$,z,J,Z,ae=qt(),oe=Gt(),se=Ze?Ze.duration():Je(ft,lt),le=T<=.01||!T,de=0,he=R||0,fe=it(_)?_.end:t.end,pe=t.endTrigger||Se,ve=it(_)?_.start:t.start||(0!==t.start&&Se?Ae?"0 0":"0 100%":0),me=Vt.pinnedContainer=t.pinnedContainer&&H(t.pinnedContainer,Vt),ye=Se&&Math.max(0,Mt.indexOf(Vt))||0,i=ye;for(Ft&&it(_)&&(J=X.getProperty(y,lt.p),Z=X.getProperty(E,lt.p));i-- >0;)(F=Mt[i]).end||F.refresh(0,1)||(ce=Vt),!(G=F.pin)||G!==Se&&G!==Ae&&G!==me||F.isReverted||($||($=[]),$.unshift(F),F.revert(!0,!0)),F!==Mt[i]&&(ye--,i--);for(tt(ve)&&(ve=ve(Vt)),ve=je(ve,"start",Vt),h=ln(ve,Se,ae,lt,zt(),v,y,Vt,oe,jt,Lt,se,Ze,Vt._startClamp&&"_startClamp")||(Ae?-.001:0),tt(fe)&&(fe=fe(Vt)),et(fe)&&!fe.indexOf("+=")&&(~fe.indexOf(" ")?fe=(et(ve)?ve.split(" ")[0]:"")+fe:(de=Dt(fe.substr(2),ae),fe=et(ve)?ve:(Ze?X.utils.mapRange(0,Ze.duration(),Ze.scrollTrigger.start,Ze.scrollTrigger.end,h):h)+de,pe=Se)),fe=je(fe,"end",Vt),f=Math.max(h,ln(fe||(pe?"100% 0":se),pe,ae,lt,zt()+de,m,E,Vt,oe,jt,Lt,se,Ze,Vt._endClamp&&"_endClamp"))||-.001,de=0,i=ye;i--;)(G=(F=Mt[i]||{}).pin)&&F.start-F._pinPush<=h&&!Ze&&F.end>0&&(O=F.end-(Vt._startClamp?Math.max(0,F.start):F.start),(G===Se&&F.start-F._pinPush<h||G===me)&&isNaN(ve)&&(de+=O*(1-F.progress)),G===Ae&&(he+=O));if(h+=de,f+=de,Vt._startClamp&&(Vt._startClamp+=de),Vt._endClamp&&!xe&&(Vt._endClamp=f||-.001,f=Math.min(f,Je(ft,lt))),T=f-h||(h-=.01)&&.001,le&&($t=X.utils.clamp(0,1,X.utils.normalize(h,f,ie))),Vt._pinPush=he,v&&de&&((O={})[lt.a]="+="+de,me&&(O[lt.p]="-="+zt()),X.set([v,m],O)),!Ae||Oe&&Vt.end>=Je(ft,lt)){if(Se&&zt()&&!Ze)for(L=Se.parentNode;L&&L!==ne;)L._pinOffset&&(h-=L._pinOffset,f-=L._pinOffset),L=L.parentNode}else O=yt(Ae),C=lt===V,x=zt(),M=parseFloat(D(lt.a))+he,!se&&f>1&&(z={style:z=(It?ee.scrollingElement||te:ft).style,value:z["overflow"+lt.a.toUpperCase()]},It&&"scroll"!==yt(ne)["overflow"+lt.a.toUpperCase()]&&(z.style["overflow"+lt.a.toUpperCase()]="scroll")),an(Ae,I,O),A=un(Ae),L=Et(Ae,!0),K=Lt&&W(ft,C?j:V)(),Ie?((U=[Ie+lt.os2,T+he+gt]).t=I,(i=Ie===pt?_t(Ae,lt)+T+he:0)&&(U.push(lt.d,i+gt),"auto"!==I.style.flexBasis&&(I.style.flexBasis=i+gt)),sn(U),me&&Mt.forEach((function(e){e.pin===me&&!1!==e.vars.pinSpacing&&(e._subPinOffset=!0)})),Lt&&zt(ie)):(i=_t(Ae,lt))&&"auto"!==I.style.flexBasis&&(I.style.flexBasis=i+gt),Lt&&((N={top:L.top+(C?x-h:K)+gt,left:L.left+(C?K:x-h)+gt,boxSizing:"border-box",position:"fixed"}).width=N.maxWidth=Math.ceil(L.width)+gt,N.height=N.maxHeight=Math.ceil(L.height)+gt,N.margin=N.marginTop=N.marginRight=N.marginBottom=N.marginLeft="0",N.padding=O.padding,N.paddingTop=O.paddingTop,N.paddingRight=O.paddingRight,N.paddingBottom=O.paddingBottom,N.paddingLeft=O.paddingLeft,S=function(e,t,n){for(var p,r=[],o=e.length,i=n?8:0;i<o;i+=2)p=e[i],r.push(p,p in t?t[p]:e[i+1]);return r.t=e.t,r}(w,N,Ye),xe&&zt(0)),n?(Y=n._initted,ge(1),n.render(n.duration(),!0,!0),P=D(lt.a)-M+T+he,B=Math.abs(T-P)>1,Lt&&B&&S.splice(S.length-2,2),n.render(0,!0,!0),Y||n.invalidate(!0),n.parent||n.totalTime(n.totalTime()),ge(0)):P=T,z&&(z.value?z.style["overflow"+lt.a.toUpperCase()]=z.value:z.style.removeProperty("overflow-"+lt.a));$&&$.forEach((function(e){return e.revert(!1,!0)})),Vt.start=h,Vt.end=f,l=d=xe?ie:zt(),Ze||xe||(l<ie&&zt(ie),Vt.scroll.rec=0),Vt.revert(!1,!0),Yt=Ne(),re&&(Kt=-1,re.restart(!0)),ce=0,n&&ht&&(n._initted||ue)&&n.progress()!==ue&&n.progress(ue||0,!0).render(n.time(),!0,!0),(le||$t!==Vt.progress||Ze||Re||n&&!n._initted)&&(n&&!ht&&(n._initted||$t||!1!==n.vars.immediateRender)&&n.totalProgress(Ze&&h<-.001&&!$t?X.utils.normalize(h,f,0):$t,!0),Vt.progress=le||(l-h)/T===$t?0:$t),Ae&&Ie&&(I._pinOffset=Math.round(Vt.progress*P)),Q&&Q.invalidate(),isNaN(J)||(J-=X.getProperty(y,lt.p),Z-=X.getProperty(E,lt.p),pn(y,lt,J),pn(v,lt,J-(R||0)),pn(E,lt,Z),pn(m,lt,Z-(R||0))),le&&!xe&&Vt.update(),!Te||xe||k||(k=!0,Te(Vt),k=!1)}},Vt.getVelocity=function(){return(zt()-d)/(Ne()-se)*1e3||0},Vt.endAnimation=function(){at(Vt.callbackAnimation),n&&(Q?Q.progress(1):n.paused()?ht||at(n,Vt.direction<0,1):at(n,n.reversed()))},Vt.labelToScroll=function(label){return n&&n.labels&&(h||Vt.refresh()||h)+n.labels[label]/n.duration()*T||0},Vt.getTrailing=function(e){var i=Mt.indexOf(Vt),a=Vt.direction>0?Mt.slice(0,i).reverse():Mt.slice(i+1);return(et(e)?a.filter((function(t){return t.vars.preventOverlaps===e})):a).filter((function(e){return Vt.direction>0?e.end<=h:e.start>=f}))},Vt.update=function(e,t,o){if(!Ze||o||e){var c,v,m,E,_,k,w,R=!0===xe?ie:Vt.scroll(),p=e?0:(R-h)/T,O=p<0?0:p>1?1:p||0,L=Vt.progress;if(t&&(d=l,l=Ze?zt():R,qe&&($=Y,Y=n&&!ht?n.totalProgress():O)),De&&Ae&&!ce&&!Pe&&Fe&&(!O&&h<R+(R-d)/(Ne()-se)*De?O=1e-4:1===O&&f>R+(R-d)/(Ne()-se)*De&&(O=.9999)),O!==L&&Vt.enabled){if(E=(_=(c=Vt.isActive=!!O&&O<1)!==(!!L&&L<1))||!!O!=!!L,Vt.direction=O>L?1:-1,Vt.progress=O,E&&!ce&&(v=O&&!L?0:1===O?1:1===L?2:3,ht&&(m=!_&&"none"!==Nt[v+1]&&Nt[v+1]||Nt[v],w=n&&("complete"===m||"reset"===m||m in n))),ct&&(_||w)&&(w||we||!n)&&(tt(ct)?ct(Vt):Vt.getTrailing(ct).forEach((function(e){return e.endAnimation()}))),ht||(!Q||ce||Pe?n&&n.totalProgress(O,!(!ce||!Yt&&!e)):(Q._dp._time-Q._start!==Q._time&&Q.render(Q._dp._time-Q._start),Q.resetTo?Q.resetTo("totalProgress",O,n._tTime/n._tDur):(Q.vars.totalProgress=O,Q.invalidate().restart()))),Ae)if(e&&Ie&&(I.style[Ie+lt.os2]=N),Lt){if(E){if(k=!e&&O>L&&f+1>R&&R+1>=Je(ft,lt),Ye)if(e||!c&&!k)hn(Ae,I);else{var D=Et(Ae,!0),x=R-h;hn(Ae,ne,D.top+(lt===V?x:0)+gt,D.left+(lt===V?0:x)+gt)}sn(c||k?S:A),B&&O<1&&c||C(M+(1!==O||k?0:P))}}else C(Ke(M+P*O));qe&&!r.tween&&!ce&&!Pe&&re.restart(!0),Ee&&(_||We&&O&&(O<1||!Le))&&ae(Ee.targets).forEach((function(e){return e.classList[c||We?"add":"remove"](Ee.className)})),be&&!ht&&!e&&be(Vt),E&&!ce?(ht&&(w&&("complete"===m?n.pause().totalProgress(1):"reset"===m?n.restart(!0).pause():"restart"===m?n.restart(!0):n[m]()),be&&be(Vt)),!_&&Le||(ke&&_&&ot(Vt,ke),Ct[v]&&ot(Vt,Ct[v]),We&&(1===O?Vt.kill(!1,1):Ct[v]=0),_||Ct[v=1===O?1:3]&&ot(Vt,Ct[v])),ut&&!c&&Math.abs(Vt.getVelocity())>(nt(ut)?ut:2500)&&(at(Vt.callbackAnimation),Q?Q.progress(1):at(n,"reverse"===m?1:!O,1))):ht&&be&&!ce&&be(Vt)}if(G){var U=Ze?R/Ze.duration()*(Ze._caScrollDist||0):R;F(U+(y._isFlipped?1:0)),G(U)}de&&de(-R/Ze.duration()*(Ze._caScrollDist||0))}},Vt.enable=function(t,n){Vt.enabled||(Vt.enabled=!0,St(ft,"resize",Bt),It||St(ft,"scroll",Ut),Wt&&St(e,"refreshInit",Wt),!1!==t&&(Vt.progress=$t=0,l=d=Kt=zt()),!1!==n&&Vt.refresh())},Vt.getTween=function(e){return e&&r?r.tween:Q},Vt.setPositions=function(e,t,n,r){if(Ze){var o=Ze.scrollTrigger,c=Ze.duration(),l=o.end-o.start;e=o.start+l*e/c,t=o.start+l*t/c}Vt.refresh(!1,!1,{start:Ve(e,n&&!!Vt._startClamp),end:Ve(t,n&&!!Vt._endClamp)},r),Vt.update()},Vt.adjustPinSpacing=function(e){if(U&&e){var i=U.indexOf(lt.d)+1;U[i]=parseFloat(U[i])+e+gt,U[1]=parseFloat(U[1])+e+gt,sn(U)}},Vt.disable=function(t,n){if(!1!==t&&Vt.revert(!0,!0),Vt.enabled&&(Vt.enabled=Vt.isActive=!1,n||Q&&Q.pause(),ie=0,o&&(o.uncache=1),Wt&&At(e,"refreshInit",Wt),re&&(re.pause(),r.tween&&r.tween.kill()&&(r.tween=0)),!It)){for(var i=Mt.length;i--;)if(Mt[i].scroller===ft&&Mt[i]!==Vt)return;At(ft,"resize",Bt),It||At(ft,"scroll",Ut)}},Vt.kill=function(e,r){Vt.disable(e,r),Q&&!r&&Q.kill(),_e&&delete Pt[_e];var i=Mt.indexOf(Vt);i>=0&&Mt.splice(i,1),i===he&&en>0&&he--,i=0,Mt.forEach((function(e){return e.scroller===Vt.scroller&&(i=1)})),i||xe||(Vt.scroll.rec=0),n&&(n.scrollTrigger=null,e&&n.revert({kill:!1}),r||n.kill()),v&&[v,m,y,E].forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),Me===Vt&&(Me=0),Ae&&(o&&(o.uncache=1),i=0,Mt.forEach((function(e){return e.pin===Ae&&i++})),i||(o.spacer=0)),t.onKill&&t.onKill(Vt)},Mt.push(Vt),Vt.enable(!1,!1),fe&&fe(Vt),n&&n.add&&!T){var tn=Vt.update;Vt.update=function(){Vt.update=tn,R.cache++,h||f||Vt.refresh()},X.delayedCall(.01,Vt.update),T=.01,h=f=0}else Vt.refresh();Ae&&function(){if(Ce!==Qt){var e=Ce=Qt;requestAnimationFrame((function(){return e===Qt&&Jt(!0)}))}}()}else this.update=this.refresh=this.kill=Ge},e.register=function(t){return J||(X=t||$e(),Ye()&&window.document&&e.enable(),J=Be),J},e.defaults=function(e){if(e)for(var p in e)Ot[p]=e[p];return Ot},e.disable=function(e,t){Be=0,Mt.forEach((function(n){return n[t?"kill":"disable"](e)})),At(Z,"wheel",Ut),At(ee,"scroll",Ut),clearInterval(ue),At(ee,"touchcancel",Ge),At(ne,"touchstart",Ge),wt(At,ee,"pointerdown,touchstart,mousedown",We),wt(At,ee,"pointerup,touchend,mouseup",qe),ie.kill(),Ze(At);for(var i=0;i<R.length;i+=3)It(At,R[i],R[i+1]),It(At,R[i],R[i+2])},e.enable=function(){if(Z=window,ee=document,te=ee.documentElement,ne=ee.body,X&&(ae=X.utils.toArray,oe=X.utils.clamp,we=X.core.context||Ge,ge=X.core.suppressOverwrites||Ge,Se=Z.history.scrollRestoration||"auto",Zt=Z.pageYOffset||0,X.core.globals("ScrollTrigger",e),ne)){Be=1,(Ae=document.createElement("div")).style.height="100vh",Ae.style.position="absolute",zt(),He(),z.register(X),e.isTouch=z.isTouch,Te=z.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),Ee=1===z.isTouch,St(Z,"wheel",Ut),re=[Z,ee,te,ne],X.matchMedia?(e.matchMedia=function(e){var p,t=X.matchMedia();for(p in e)t.add(p,e[p]);return t},X.addEventListener("matchMediaInit",(function(){Kt(),Yt()})),X.addEventListener("matchMediaRevert",(function(){return Gt()})),X.addEventListener("matchMedia",(function(){Jt(0,1),Wt("matchMedia")})),X.matchMedia().add("(orientation: portrait)",(function(){return Ft(),Ft}))):console.warn("Requires GSAP 3.11.0 or later"),Ft(),St(ee,"scroll",Ut);var t,i,n=ne.hasAttribute("style"),r=ne.style,o=r.borderTopStyle,c=X.core.Animation.prototype;for(c.revert||Object.defineProperty(c,"revert",{value:function(){return this.time(-.01,!0)}}),r.borderTopStyle="solid",t=Et(ne),V.m=Math.round(t.top+V.sc())||0,j.m=Math.round(t.left+j.sc())||0,o?r.borderTopStyle=o:r.removeProperty("border-top-style"),n||(ne.setAttribute("style",""),ne.removeAttribute("style")),ue=setInterval(Nt,250),X.delayedCall(.5,(function(){return Pe=0})),St(ee,"touchcancel",Ge),St(ne,"touchstart",Ge),wt(St,ee,"pointerdown,touchstart,mousedown",We),wt(St,ee,"pointerup,touchend,mouseup",qe),de=X.utils.checkPrefix("transform"),rn.push(de),J=Ne(),ie=X.delayedCall(.2,Jt).pause(),ve=[ee,"visibilitychange",function(){var e=Z.innerWidth,t=Z.innerHeight;ee.hidden?(fe=e,pe=t):fe===e&&pe===t||Bt()},ee,"DOMContentLoaded",Jt,Z,"load",Jt,Z,"resize",Bt],Ze(St),Mt.forEach((function(e){return e.enable(0,1)})),i=0;i<R.length;i+=3)It(At,R[i],R[i+1]),It(At,R[i],R[i+2])}},e.config=function(t){"limitCallbacks"in t&&(Le=!!t.limitCallbacks);var n=t.syncInterval;n&&clearInterval(ue)||(ue=n)&&setInterval(Nt,n),"ignoreMobileResize"in t&&(Ee=1===e.isTouch&&t.ignoreMobileResize),"autoRefreshEvents"in t&&(Ze(At)||Ze(St,t.autoRefreshEvents||"none"),ye=-1===(t.autoRefreshEvents+"").indexOf("resize"))},e.scrollerProxy=function(e,t){var n=H(e),i=R.indexOf(n),r=Qe(n);~i&&R.splice(i,r?6:2),t&&(r?O.unshift(Z,t,ne,t,te,t):O.unshift(n,t))},e.clearMatchMedia=function(e){Mt.forEach((function(t){return t._ctx&&t._ctx.query===e&&t._ctx.kill(!0,!0)}))},e.isInViewport=function(element,e,t){var n=(et(element)?H(element):element).getBoundingClientRect(),r=n[t?ht:ft]*e||0;return t?n.right-r>0&&n.left+r<Z.innerWidth:n.bottom-r>0&&n.top+r<Z.innerHeight},e.positionInViewport=function(element,e,t){et(element)&&(element=H(element));var n=element.getBoundingClientRect(),r=n[t?ht:ft],o=null==e?r/2:e in Lt?Lt[e]*r:~e.indexOf("%")?parseFloat(e)*r/100:parseFloat(e)||0;return t?(n.left+o)/Z.innerWidth:(n.top+o)/Z.innerHeight},e.killAll=function(e){if(Mt.slice(0).forEach((function(e){return"ScrollSmoother"!==e.vars.id&&e.kill()})),!0!==e){var t=jt.killAll||[];jt={},t.forEach((function(e){return e()}))}},e}();mn.version="3.14.2",mn.saveStyles=function(e){return e?ae(e).forEach((function(e){if(e&&e.style){var i=qt.indexOf(e);i>=0&&qt.splice(i,5),qt.push(e,e.style.cssText,e.getBBox&&e.getAttribute("transform"),X.core.getCache(e),we())}})):qt},mn.revert=function(e,t){return Yt(!e,t)},mn.create=function(e,t){return new mn(e,t)},mn.refresh=function(e){return e?Bt(!0):(J||mn.register())&&Jt(!0)},mn.update=function(e){return++R.cache&&tn(!0===e?2:0)},mn.clearScrollMemory=$t,mn.maxScroll=function(element,e){return Je(element,e?j:V)},mn.getScrollFunc=function(element,e){return W(H(element),e?j:V)},mn.getById=function(e){return Pt[e]},mn.getAll=function(){return Mt.filter((function(e){return"ScrollSmoother"!==e.vars.id}))},mn.isScrolling=function(){return!!Fe},mn.snapDirectional=Tt,mn.addEventListener=function(e,t){var a=jt[e]||(jt[e]=[]);~a.indexOf(t)||a.push(t)},mn.removeEventListener=function(e,t){var a=jt[e],i=a&&a.indexOf(t);i>=0&&a.splice(i,1)},mn.batch=function(e,t){var p,n=[],r={},o=t.interval||.016,c=t.batchMax||1e9,l=function(e,t){var n=[],r=[],l=X.delayedCall(o,(function(){t(n,r),n=[],r=[]})).pause();return function(e){n.length||l.restart(!0),n.push(e.trigger),r.push(e),c<=n.length&&l.progress(1)}};for(p in t)r[p]="on"===p.substr(0,2)&&tt(t[p])&&"onRefreshInit"!==p?l(0,t[p]):t[p];return tt(c)&&(c=c(),St(mn,"refresh",(function(){return c=t.batchMax()}))),ae(e).forEach((function(e){var t={};for(p in r)t[p]=r[p];t.trigger=e,n.push(mn.create(t))})),n};var gn,yn=function(e,t,n,r){return t>r?e(r):t<0&&e(0),n>r?(r-t)/(n-t):n<0?t/(t-n):1},bn=function e(t,n){!0===n?t.style.removeProperty("touch-action"):t.style.touchAction=!0===n?"auto":n?"pan-"+n+(z.isTouch?" pinch-zoom":""):"none",t===te&&e(ne,n)},En={auto:1,scroll:1},_n=function(e){var t,n=e.event,r=e.target,o=e.axis,c=(n.changedTouches?n.changedTouches[0]:n).target,l=c._gsap||X.core.getCache(c),time=Ne();if(!l._isScrollT||time-l._isScrollT>2e3){for(;c&&c!==ne&&(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth||!En[(t=yt(c)).overflowY]&&!En[t.overflowX]);)c=c.parentNode;l._isScroll=c&&c!==r&&!Qe(c)&&(En[(t=yt(c)).overflowY]||En[t.overflowX]),l._isScrollT=time}(l._isScroll||"x"===o)&&(n.stopPropagation(),n._gsapAllow=!0)},kn=function(e,t,n,r){return z.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:r=r&&_n,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return n&&St(ee,z.eventTypes[0],wn,!1,!0)},onDisable:function(){return At(ee,z.eventTypes[0],wn,!0)}})},Tn=/(input|label|select|textarea)/i,wn=function(e){var t=Tn.test(e.target.tagName);(t||gn)&&(e._gsapAllow=!0,gn=t)},Sn=function(e){it(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||(e.type="wheel,touch"),e.debounce=!!e.debounce,e.id=e.id||"normalizer";var t,n,r,o,c,l,d,h,f=e,v=f.normalizeScrollX,m=f.momentum,y=f.allowNestedScroll,E=f.onRelease,_=H(e.target)||te,k=X.core.globals().ScrollSmoother,T=k&&k.get(),content=Te&&(e.content&&H(e.content)||T&&!1!==e.content&&!T.smooth()&&T.content()),w=W(_,V),S=W(_,j),A=1,I=(z.isTouch&&Z.visualViewport?Z.visualViewport.scale*Z.visualViewport.width:Z.outerWidth)/Z.innerWidth,O=0,L=tt(m)?function(){return m(t)}:function(){return m||2.8},D=kn(_,e.type,!0,y),x=function(){return o=!1},C=Ge,M=Ge,P=function(){n=Je(_,V),M=oe(Te?1:0,n),v&&(C=oe(0,Je(_,j))),r=Qt},N=function(){content._gsap.y=Ke(parseFloat(content._gsap.y)+w.offset)+"px",content.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(content._gsap.y)+", 0, 1)",w.offset=w.cacheID=0},U=function(){P(),c.isActive()&&c.vars.scrollY>n&&(w()>n?c.progress(1)&&w(n):c.resetTo("scrollY",n))};return content&&X.set(content,{y:"+=0"}),e.ignoreCheck=function(e){return Te&&"touchmove"===e.type&&function(){if(o){requestAnimationFrame(x);var e=Ke(t.deltaY/2),n=M(w.v-e);if(content&&n!==w.v+w.offset){w.offset=n-w.v;var r=Ke((parseFloat(content&&content._gsap.y)||0)-w.offset);content.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+r+", 0, 1)",content._gsap.y=r+"px",w.cacheID=R.cache,tn()}return!0}w.offset&&N(),o=!0}()||A>1.05&&"touchstart"!==e.type||t.isGesturing||e.touches&&e.touches.length>1},e.onPress=function(){o=!1;var e=A;A=Ke((Z.visualViewport&&Z.visualViewport.scale||1)/I),c.pause(),e!==A&&bn(_,A>1.01||!v&&"x"),l=S(),d=w(),P(),r=Qt},e.onRelease=e.onGestureStart=function(e,t){if(w.offset&&N(),t){R.cache++;var r,o,l=L();v&&(o=(r=S())+.05*l*-e.velocityX/.227,l*=yn(S,r,o,Je(_,j)),c.vars.scrollX=C(o)),o=(r=w())+.05*l*-e.velocityY/.227,l*=yn(w,r,o,Je(_,V)),c.vars.scrollY=M(o),c.invalidate().duration(l).play(.01),(Te&&c.vars.scrollY>=n||r>=n-1)&&X.to({},{onUpdate:U,duration:l})}else h.restart(!0);E&&E(e)},e.onWheel=function(){c._ts&&c.pause(),Ne()-O>1e3&&(r=0,O=Ne())},e.onChange=function(e,t,n,o,c){if(Qt!==r&&P(),t&&v&&S(C(o[2]===t?l+(e.startX-e.x):S()+t-o[1])),n){w.offset&&N();var h=c[2]===n,f=h?d+e.startY-e.y:w()+n-c[1],m=M(f);h&&f!==m&&(d+=m-f),w(m)}(n||t)&&tn()},e.onEnable=function(){bn(_,!v&&"x"),mn.addEventListener("refresh",U),St(Z,"resize",U),w.smooth&&(w.target.style.scrollBehavior="auto",w.smooth=S.smooth=!1),D.enable()},e.onDisable=function(){bn(_,!0),At(Z,"resize",U),mn.removeEventListener("refresh",U),D.kill()},e.lockAxis=!1!==e.lockAxis,(t=new z(e)).iOS=Te,Te&&!w()&&w(1),Te&&X.ticker.add(Ge),h=t._dc,c=X.to(t,{ease:"power4",paused:!0,inherit:!1,scrollX:v?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:fn(w,w(),(function(){return c.pause()}))},onUpdate:tn,onComplete:h.vars.onComplete}),t};mn.sort=function(e){if(tt(e))return Mt.sort(e);var t=Z.pageYOffset||0;return mn.getAll().forEach((function(e){return e._sortY=e.trigger?t+e.trigger.getBoundingClientRect().top:e.start+Z.innerHeight})),Mt.sort(e||function(a,b){return-1e6*(a.vars.refreshPriority||0)+(a.vars.containerAnimation?1e6:a._sortY)-((b.vars.containerAnimation?1e6:b._sortY)+-1e6*(b.vars.refreshPriority||0))})},mn.observe=function(e){return new z(e)},mn.normalizeScroll=function(e){if(void 0===e)return be;if(!0===e&&be)return be.enable();if(!1===e)return be&&be.kill(),void(be=e);var t=e instanceof z?e:Sn(e);return be&&be.target===t.target&&be.kill(),Qe(t.target)&&(be=t),t},mn.core={_getVelocityProp:G,_inputObserver:kn,_scrollers:R,_proxies:O,bridge:{ss:function(){Fe||Wt("scrollStart"),Fe=Ne()},ref:function(){return ce}}}
2,$e()&&X.registerPlugin(mn)},479:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(480);function o(e){return new r.a((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}},48:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return d}));var r=function(e,b){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)Object.prototype.hasOwnProperty.call(b,p)&&(e[p]=b[p])})(e,b)};function o(e,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function t(){this.constructor=e}r(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}var c=function(){return(c=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};function l(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]])}return t}Object.create;function d(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create},480:function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}n.d(t,"a",(function(){return D}));var d=function(){return"function"==typeof Symbol},h=function(e){return d()&&Boolean(Symbol[e])},f=function(e){return h(e)?Symbol[e]:"@@"+e};d()&&!h("observable")&&(Symbol.observable=Symbol("observable"));var v=f("iterator"),m=f("observable"),y=f("species");function E(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function _(e){var t=e.constructor;return void 0!==t&&null===(t=t[y])&&(t=void 0),void 0!==t?t:D}function k(e){return e instanceof D}function T(e){T.log?T.log(e):setTimeout((function(){throw e}))}function w(e){Promise.resolve().then((function(){try{e()}catch(e){T(e)}}))}function S(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=E(t,"unsubscribe");n&&n.call(t)}}catch(e){T(e)}}function A(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function I(e,t,n){e._state="running";var r=e._observer;try{var o=E(r,t);switch(t){case"next":o&&o.call(r,n);break;case"error":if(A(e),!o)throw n;o.call(r,n);break;case"complete":A(e),o&&o.call(r)}}catch(e){T(e)}"closed"===e._state?S(e):"running"===e._state&&(e._state="ready")}function R(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void w((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var i=0;i<t.length&&(I(e,t[i].type,t[i].value),"closed"!==e._state);++i);}}(e)}))):void I(e,t,n);e._queue.push({type:t,value:n})}}var O=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new L(this);try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(A(this),S(this))},l(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),L=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){R(this._subscription,"next",e)},t.error=function(e){R(this._subscription,"error",e)},t.complete=function(){R(this._subscription,"complete")},l(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),D=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new O(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var o=t.subscribe({next:function(t){try{e(t,c)}catch(e){r(e),o.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function c(){o.unsubscribe(),n()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(_(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(_(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=_(this),r=arguments.length>1,o=!1,c=arguments[1],l=c;return new n((function(n){return t.subscribe({next:function(t){var c=!o;if(o=!0,!c||r)try{l=e(l,t)}catch(e){return n.error(e)}else l=t},error:function(e){n.error(e)},complete:function(){if(!o&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(l),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=_(this);return new o((function(t){var r,c=0;return function e(l){r=l.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){c===n.length?(r=void 0,t.complete()):e(o.from(n[c++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=_(this);return new n((function(r){var o=[],c=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var c=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var i=o.indexOf(c);i>=0&&o.splice(i,1),l()}});o.push(c)},error:function(e){r.error(e)},complete:function(){l()}});function l(){c.closed&&0===o.length&&r.complete()}return function(){o.forEach((function(s){return s.unsubscribe()})),c.unsubscribe()}}))},t[m]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var o=E(t,m);if(o){var c=o.call(t);if(Object(c)!==c)throw new TypeError(c+" is not an object");return k(c)&&c.constructor===n?c:new n((function(e){return c.subscribe(e)}))}if(h("iterator")&&(o=E(t,v)))return new n((function(e){w((function(){if(!e.closed){for(var n,c=r(o.call(t));!(n=c()).done;){var l=n.value;if(e.next(l),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){w((function(){if(!e.closed){for(var i=0;i<t.length;++i)if(e.next(t[i]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o="function"==typeof this?this:e;return new o((function(e){w((function(){if(!e.closed){for(var i=0;i<n.length;++i)if(e.next(n[i]),e.closed)return;e.complete()}}))}))},l(e,null,[{key:y,get:function(){return this}}]),e}();d()&&Object.defineProperty(D,Symbol("extensions"),{value:{symbol:m,hostReportError:T},configurable:!0})},481:function(e,t,n){"use strict";n.r(t),n.d(t,"Component",(function(){return o.default})),n.d(t,"Vue",(function(){return r.default})),n.d(t,"Mixins",(function(){return o.mixins})),n.d(t,"Emit",(function(){return d})),n.d(t,"Inject",(function(){return f})),n.d(t,"InjectReactive",(function(){return _})),n.d(t,"Model",(function(){return w})),n.d(t,"ModelSync",(function(){return S})),n.d(t,"Prop",(function(){return A})),n.d(t,"PropSync",(function(){return I})),n.d(t,"Provide",(function(){return R})),n.d(t,"ProvideReactive",(function(){return O})),n.d(t,"Ref",(function(){return L})),n.d(t,"VModel",(function(){return D})),n.d(t,"Watch",(function(){return x}));var r=n(9),o=n(46),c=function(){for(var s=0,i=0,e=arguments.length;i<e;i++)s+=arguments[i].length;var t=Array(s),n=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,o=a.length;r<o;r++,n++)t[n]=a[r];return t},l=/\B([A-Z])/g;function d(e){return function(t,n,r){var o=n.replace(l,"-$1").toLowerCase(),d=r.value;r.value=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var l=function(r){var l=e||o;void 0===r?0===n.length?t.$emit(l):1===n.length?t.$emit(l,n[0]):t.$emit.apply(t,c([l],n)):(n.unshift(r),t.$emit.apply(t,c([l],n)))},f=d.apply(this,n);return h(f)?f.then(l):l(f),f}}}function h(e){return e instanceof Promise||e&&"function"==typeof e.then}function f(e){return Object(o.createDecorator)((function(t,n){void 0===t.inject&&(t.inject={}),Array.isArray(t.inject)||(t.inject[n]=e||n)}))}function v(e){return"function"!=typeof e||!e.managed&&!e.managedReactive}function m(e){var t=function(){var n=this,r="function"==typeof e?e.call(this):e;for(var i in(r=Object.create(r||null))[y]=Object.create(this[y]||{}),t.managed)r[t.managed[i]]=this[i];
2var o=function(i){r[t.managedReactive[i]]=c[i],Object.defineProperty(r[y],t.managedReactive[i],{enumerable:!0,configurable:!0,get:function(){return n[i]}})},c=this;for(var i in t.managedReactive)o(i);return r};return t.managed={},t.managedReactive={},t}var y="__reactiveInject__";function E(e){Array.isArray(e.inject)||(e.inject=e.inject||{},e.inject[y]={from:y,default:{}})}function _(e){return Object(o.createDecorator)((function(t,n){if(void 0===t.inject&&(t.inject={}),!Array.isArray(t.inject)){var r=e?e.from||e:n,o=!!e&&e.default||void 0;t.computed||(t.computed={}),t.computed[n]=function(){var e=this[y];return e?e[r]:o},t.inject[y]=y}}))}var k="undefined"!=typeof Reflect&&void 0!==Reflect.getMetadata;function T(e,t,n){if(k&&!Array.isArray(e)&&"function"!=typeof e&&!e.hasOwnProperty("type")&&void 0===e.type){var r=Reflect.getMetadata("design:type",t,n);r!==Object&&(e.type=r)}}function w(e,t){return void 0===t&&(t={}),function(n,r){T(t,n,r),Object(o.createDecorator)((function(n,r){(n.props||(n.props={}))[r]=t,n.model={prop:r,event:e||r}}))(n,r)}}function S(e,t,n){return void 0===n&&(n={}),function(r,c){T(n,r,c),Object(o.createDecorator)((function(r,o){(r.props||(r.props={}))[e]=n,r.model={prop:e,event:t||o},(r.computed||(r.computed={}))[o]={get:function(){return this[e]},set:function(e){this.$emit(t,e)}}}))(r,c)}}function A(e){return void 0===e&&(e={}),function(t,n){T(e,t,n),Object(o.createDecorator)((function(t,n){(t.props||(t.props={}))[n]=e}))(t,n)}}function I(e,t){return void 0===t&&(t={}),function(n,r){T(t,n,r),Object(o.createDecorator)((function(n,r){(n.props||(n.props={}))[e]=t,(n.computed||(n.computed={}))[r]={get:function(){return this[e]},set:function(t){this.$emit("update:"+e,t)}}}))(n,r)}}function R(e){return Object(o.createDecorator)((function(t,n){var r=t.provide;E(t),v(r)&&(r=t.provide=m(r)),r.managed[n]=e||n}))}function O(e){return Object(o.createDecorator)((function(t,n){var r=t.provide;E(t),v(r)&&(r=t.provide=m(r)),r.managedReactive[n]=e||n}))}function L(e){return Object(o.createDecorator)((function(t,n){t.computed=t.computed||{},t.computed[n]={cache:!1,get:function(){return this.$refs[e||n]}}}))}function D(e){void 0===e&&(e={});return Object(o.createDecorator)((function(t,n){(t.props||(t.props={})).value=e,(t.computed||(t.computed={}))[n]={get:function(){return this.value},set:function(e){this.$emit("input",e)}}}))}function x(path,e){void 0===e&&(e={});var t=e.deep,n=void 0!==t&&t,r=e.immediate,c=void 0!==r&&r;return Object(o.createDecorator)((function(e,t){"object"!=typeof e.watch&&(e.watch=Object.create(null));var r=e.watch;"object"!=typeof r[path]||Array.isArray(r[path])?void 0===r[path]&&(r[path]=[]):r[path]=[r[path]],r[path].push({handler:t,deep:n,immediate:c})}))}},49:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return y})),n.d(t,"g",(function(){return S})),n.d(t,"h",(function(){return w})),n.d(t,"i",(function(){return m})),n.d(t,"j",(function(){return v})),n.d(t,"k",(function(){return _})),n.d(t,"l",(function(){return f})),n.d(t,"m",(function(){return T})),n.d(t,"n",(function(){return k}));const r=Object.prototype.toString;function o(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return S(e,Error)}}function c(e,t){return r.call(e)===`[object ${t}]`}function l(e){return c(e,"ErrorEvent")}function d(e){return c(e,"DOMError")}function h(e){return c(e,"DOMException")}function f(e){return c(e,"String")}function v(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function m(e){return c(e,"Object")}function y(e){return"undefined"!=typeof Event&&S(e,Event)}function E(e){return"undefined"!=typeof Element&&S(e,Element)}function _(e){return c(e,"RegExp")}function k(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function T(e){return m(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function w(e){return"number"==typeof e&&e!=e}function S(e,base){try{return e instanceof base}catch(e){return!1}}},50:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}
vendor: 4,523 bytes, line 2
2)),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(112),o=function(){function e(e,t,source){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=source}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();Object(r.a)(o);var c=function(){function e(e,t,n,line,r,o,c){this.kind=e,this.start=t,this.end=n,this.line=line,this.column=r,this.value=c,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function l(e){return null!=e&&"string"==typeof e.kind}Object(r.a)(c)},521:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e){return e+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(e){return e<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return n.default.locale(r,null,!0),r}(n(8))},522:function(e,t,n){"use strict";(function(e){var r=n(690),o=n(691),c=n(692);function l(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(e,t){if(l()<t)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=h.prototype:(null===e&&(e=new h(t)),e.length=t),e}function h(e,t,n){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return m(this,e)}return f(this,e,t,n)}function f(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);h.TYPED_ARRAY_SUPPORT?(e=t).__proto__=h.prototype:e=y(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!h.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|_(t,n),o=(e=d(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(h.isBuffer(t)){var n=0|E(t.length);return 0===(e=d(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?d(e,0):y(e,t);if("Buffer"===t.type&&c(t.data))return y(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function v(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function m(e,t){if(v(t),e=d(e,t<0?0:0|E(t)),!h.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function y(e,t){var n=t.length<0?0:0|E(t.length);e=d(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function E(e){if(e>=l())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l().toString(16)+" bytes");return 0|e}function _(e,t){if(h.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return Q(e).length;t=(""+t).toLowerCase(),r=!0}}
vendor: 6,210 bytes, line 2
2function k(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function T(b,e,t){var i=b[e];b[e]=b[t],b[t]=i}function w(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=h.from(t,r)),h.isBuffer(t))return 0===t.length?-1:S(e,t,n,r,o);if("number"==typeof t)return t&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):S(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function S(e,t,n,r,o){var i,c=1,l=e.length,d=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;c=2,l/=2,d/=2,n/=2}function h(e,i){return 1===c?e[i]:e.readUInt16BE(i*c)}if(o){var f=-1;for(i=n;i<l;i++)if(h(e,i)===h(t,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===d)return f*c}else-1!==f&&(i-=i-f),f=-1}else for(n+d>l&&(n=l-d),i=n;i>=0;i--){for(var v=!0,m=0;m<d;m++)if(h(e,i+m)!==h(t,m)){v=!1;break}if(v)return i}return-1}function A(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var c=t.length;if(c%2!=0)throw new TypeError("Invalid hex string");r>c/2&&(r=c/2);for(var i=0;i<r;++i){var l=parseInt(t.substr(2*i,2),16);if(isNaN(l))return i;e[n+i]=l}return i}function I(e,t,n,r){return X(Q(t,e.length-n),e,n,r)}function R(e,t,n,r){return X(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,n,r)}function O(e,t,n,r){return R(e,t,n,r)}function L(e,t,n,r){return X(z(t),e,n,r)}function D(e,t,n,r){return X(function(e,t){for(var n,r,o,c=[],i=0;i<e.length&&!((t-=2)<0);++i)r=(n=e.charCodeAt(i))>>8,o=n%256,c.push(o),c.push(r);return c}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,c,l,d,h=e[i],f=null,v=h>239?4:h>223?3:h>191?2:1;if(i+v<=n)switch(v){case 1:h<128&&(f=h);break;case 2:128==(192&(o=e[i+1]))&&(d=(31&h)<<6|63&o)>127&&(f=d);break;case 3:o=e[i+1],c=e[i+2],128==(192&o)&&128==(192&c)&&(d=(15&h)<<12|(63&o)<<6|63&c)>2047&&(d<55296||d>57343)&&(f=d);break;case 4:o=e[i+1],c=e[i+2],l=e[i+3],128==(192&o)&&128==(192&c)&&128==(192&l)&&(d=(15&h)<<18|(63&o)<<12|(63&c)<<6|63&l)>65535&&d<1114112&&(f=d)}null===f?(f=65533,v=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=v}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=M));return n}(r)}t.Buffer=h,t.SlowBuffer=function(e){+e!=e&&(e=0);return h.alloc(+e)},t.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=l(),h.poolSize=8192,h._augment=function(e){return e.__proto__=h.prototype,e},h.from=function(e,t,n){return f(null,e,t,n)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(e,t,n){return function(e,t,n,r){return v(t),t<=0?d(e,t):void 0!==n?"string"==typeof r?d(e,t).fill(n,r):d(e,t).fill(n):d(e,t)}(null,e,t,n)},h.allocUnsafe=function(e){return m(null,e)},h.allocUnsafeSlow=function(e){return m(null,e)},h.isBuffer=function(b){return!(null==b||!b._isBuffer)},h.compare=function(a,b){if(!h.isBuffer(a)||!h.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var e=a.length,t=b.length,i=0,n=Math.min(e,t);i<n;++i)if(a[i]!==b[i]){e=a[i],t=b[i];break}return e<t?-1:t<e?1:0},h.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(e,t){if(!c(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=h.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var o=e[i];if(!h.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,r),r+=o.length}return n},h.byteLength=_,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<e;i+=2)T(this,i,i+1);return this},h.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<e;i+=4)T(this,i,i+3),T(this,i+1,i+2);return this},h.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<e;i+=8)T(this,i,i+7),T(this,i+1,i+6),T(this,i+2,i+5),T(this,i+3,i+4);return this},h.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):k.apply(this,arguments)},h.prototype.equals=function(b){if(!h.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===h.compare(this,b)},h.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"}
vendor: 9,846 bytes, line 2
2,h.prototype.compare=function(e,t,n,r,o){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var c=(o>>>=0)-(r>>>=0),l=(n>>>=0)-(t>>>=0),d=Math.min(c,l),f=this.slice(r,o),v=e.slice(t,n),i=0;i<d;++i)if(f[i]!==v[i]){c=f[i],l=v[i];break}return c<l?-1:l<c?1:0},h.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},h.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},h.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},h.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var c=!1;;)switch(r){case"hex":return A(this,e,t,n);case"utf8":case"utf-8":return I(this,e,t,n);case"ascii":return R(this,e,t,n);case"latin1":case"binary":return O(this,e,t,n);case"base64":return L(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,t,n);default:if(c)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),c=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function N(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function U(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=$(e[i]);return o}function F(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,o,c){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<c)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function V(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function H(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function W(e,t,n,r,o,c){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function G(e,t,n,r,c){return c||W(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function K(e,t,n,r,c){return c||W(e,0,n,8),o.write(e,t,n,r,52,8),n+8}h.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),h.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=h.prototype;else{var o=t-e;n=new h(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},h.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},h.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},h.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},h.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},h.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},h.prototype.readInt8=function(e,t){return t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),o.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),o.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),o.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),o.read(this,e,!1,52,8)},h.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||j(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},h.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||j(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},h.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,255,0),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},h.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):V(this,e,t,!0),t+2},h.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):V(this,e,t,!1),t+2},h.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):H(this,e,t,!0),t+4},h.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):H(this,e,t,!1),t+4},h.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);j(this,e,t,n,o-1,-o)}var i=0,c=1,sub=0;for(this[t]=255&e;++i<n&&(c*=256);)e<0&&0===sub&&0!==this[t+i-1]&&(sub=1),this[t+i]=(e/c>>0)-sub&255;return t+n},h.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);j(this,e,t,n,o-1,-o)}var i=n-1,c=1,sub=0;for(this[t+i]=255&e;--i>=0&&(c*=256);)e<0&&0===sub&&0!==this[t+i+1]&&(sub=1),this[t+i]=(e/c>>0)-sub&255;return t+n},h.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,127,-128),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},h.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):V(this,e,t,!0),t+2},h.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):V(this,e,t,!1),t+2},h.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):H(this,e,t,!0),t+4},h.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):H(this,e,t,!1),t+4},h.prototype.writeFloatLE=function(e,t,n){return G(this,e,t,!0,n)},h.prototype.writeFloatBE=function(e,t,n){return G(this,e,t,!1,n)},h.prototype.writeDoubleLE=function(e,t,n){return K(this,e,t,!0,n)},h.prototype.writeDoubleBE=function(e,t,n){return K(this,e,t,!1,n)},h.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!h.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},h.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var code=e.charCodeAt(0);code<256&&(e=code)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!h.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var o=h.isBuffer(e)?e:Q(new h(e,r).toString()),c=o.length;for(i=0;i<n-t;++i)this[i+t]=o[i%c]}return this};var Y=/[^+\/0-9A-Za-z-_]/g;function $(e){return e<16?"0"+e.toString(16):e.toString(16)}function Q(e,t){var n;t=t||1/0;for(var r=e.length,o=null,c=[],i=0;i<r;++i){if((n=e.charCodeAt(i))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>
2-1&&c.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&c.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&c.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&c.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;c.push(n)}else if(n<2048){if((t-=2)<0)break;c.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;c.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;c.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return c}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Y,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function X(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(70))},57:function(e,t,n){"use strict";(function(e){function r(e){return e&&e.Math==Math?e:void 0}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));const o="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof e&&r(e)||function(){return this}()||{};function c(){return o}function l(e,t,n){const r=n||o,c=r.__SENTRY__=r.__SENTRY__||{};return c[e]||(c[e]=t())}}).call(this,n(70))},59:function(e,t,n){"use strict";var r=n(250);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.c})),n.d(t,"d",(function(){return r.d})),n.d(t,"e",(function(){return r.e})),n.d(t,"f",(function(){return r.g})),n.d(t,"g",(function(){return r.h})),n.d(t,"h",(function(){return r.i})),n.d(t,"i",(function(){return r.j})),n.d(t,"j",(function(){return r.k})),n.d(t,"k",(function(){return r.l})),n.d(t,"l",(function(){return r.m})),n.d(t,"m",(function(){return r.n})),n.d(t,"n",(function(){return r.o})),n.d(t,"o",(function(){return r.p}))},594:function(e,t,n){var r;!function(){function o(a,b,e){return a.call.apply(a.bind,arguments)}function c(a,b,e){if(!a)throw Error();if(2<arguments.length){var t=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(e,t),a.apply(b,e)}}return function(){return a.apply(b,arguments)}}function p(a,b,e){return(p=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?o:c).apply(null,arguments)}var q=Date.now||function(){return+new Date};function l(a,b){this.a=a,this.o=b||a,this.c=this.o.document}var d=!!window.FontFace;function h(a,b,e,t){if(b=a.c.createElement(b),e)for(var n in e)e.hasOwnProperty(n)&&("style"==n?b.style.cssText=e[n]:b.setAttribute(n,e[n]));return t&&b.appendChild(a.c.createTextNode(t)),b}function u(a,b,e){(a=a.c.getElementsByTagName(b)[0])||(a=document.documentElement),a.insertBefore(e,a.lastChild)}function f(a){a.parentNode&&a.parentNode.removeChild(a)}function v(a,b,e){b=b||[],e=e||[];for(var t=a.className.split(/\s+/),n=0;n<b.length;n+=1){for(var r=!1,g=0;g<t.length;g+=1)if(b[n]===t[g]){r=!0;break}r||t.push(b[n])}for(b=[],n=0;n<t.length;n+=1){for(r=!1,g=0;g<e.length;g+=1)if(t[n]===e[g]){r=!0;break}r||b.push(t[n])}a.className=b.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function m(a,b){for(var e=a.className.split(/\s+/),t=0,n=e.length;t<n;t++)if(e[t]==b)return!0;return!1}function y(a,b,e){function t(){o&&n&&r&&(o(g),o=null)}b=h(a,"link",{rel:"stylesheet",href:b,media:"all"});var n=!1,r=!0,g=null,o=e||null;d?(b.onload=function(){n=!0,t()},b.onerror=function(){n=!0,g=Error("Stylesheet failed to load"),t()}):setTimeout((function(){n=!0,t()}),0),u(a,"head",b)}function E(a,b,e,t){var n=a.c.getElementsByTagName("head")[0];if(n){var r=h(a,"script",{src:b}),g=!1;return r.onload=r.onreadystatechange=function(){g||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(g=!0,e&&e(null),r.onload=r.onreadystatechange=null,"HEAD"==r.parentNode.tagName&&n.removeChild(r))},n.appendChild(r),setTimeout((function(){g||(g=!0,e&&e(Error("Script load timeout")))}),t||5e3),r}return null}function _(){this.a=0,this.c=null}function k(a){return a.a++,function(){a.a--,w(a)}}function T(a,b){a.c=b,w(a)}function w(a){0==a.a&&a.c&&(a.c(),a.c=null)}function S(a){this.a=a||"-"}function A(a,b){this.c=a,this.f=4,this.a="n";var e=(b||"n4").match(/^([nio])([1-9])$/i);e&&(this.a=e[1],this.f=parseInt(e[2],10))}function I(a){var b=[];a=a.split(/,\s*/);for(var e=0;e<a.length;e++){var t=a[e].replace(/['"]/g,"");-1!=t.indexOf(" ")||/^\d/.test(t)?b.push("'"+t+"'"):b.push(t)}return b.join(",")}function R(a){return a.a+a.f}function O(a){var b="normal";return"o"===a.a?b="oblique":"i"===a.a&&(b="italic"),b}function L(a){var b=4,e="n",t=null;return a&&((t=a.match(/(normal|oblique|italic)/i))&&t[1]&&(e=t[1].substr(0,1).toLowerCase()),(t=a.match(/([1-9]00|normal|bold)/i))&&t[1]&&(/bold/i.test(t[1])?b=7:/[1-9]00/.test(t[1])&&(b=parseInt(t[1].substr(0,1),10)))),e+b}function D(a,b){this.c=a,this.f=a.o.document.documentElement,this.h=b,this.a=new S("-"),this.j=!1!==b.events,this.g=!1!==b.classes}function x(a){if(a.g){var b=m(a.f,a.a.c("wf","active")),e=[],t=[a.a.c("wf","loading")];b||e.push(a.a.c("wf","inactive")),v(a.f,e,t)}C(a,"inactive")}function C(a,b,e){a.j&&a.h[b]&&(e?a.h[b](e.c,R(e)):a.h[b]())}function M(){this.c={}}function P(a,b){this.c=a,this.f=b,this.a=h(this.c,"span",{"aria-hidden":"true"},this.f)}function N(a){u(a.c,"body",a.a)}function U(a){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+I(a.c)+";font-style:"+O(a)+";font-weight:"+a.f+"00;"}function F(a,b,e,t,n,r){this.g=a,this.j=b,this.a=t,this.c=e,this.f=n||3e3,this.h=r||void 0}function B(a,b,e,t,n,r,g){this.v=a,this.B=b,this.c=e,this.a=t,this.s=g||"BESbswy",this.f={},this.w=n||3e3,this.u=r||null,this.m=this.j=this.h=this.g=null,this.g=new P(this.c,this.s),this.h=new P(this.c,this.s),this.j=new P(this.c,this.s),this.m=new P(this.c,this.s),a=U(a=new A(this.a.c+",serif",R(this.a))),this.g.a.style.cssText=a,a=U(a=new A(this.a.c+",sans-serif",R(this.a))),this.h.a.style.cssText=a,a=U(a=new A("serif",R(this.a))),this.j.a.style.cssText=a,a=U(a=new A("sans-serif",R(this.a))),this.m.a.style.cssText=a,N(this.g),N(this.h),N(this.j),N(this.m)}S.prototype.c=function(a){for(var b=[],e=0;e<arguments.length;e++)b.push(arguments[e].replace(/[\W_]+/g,"").toLowerCase());return b.join(this.a)},F.prototype.start=function(){var a=this.c.o.document,b=this,e=q(),t=new Promise((function(t,n){!function r(){q()-e>=b.f?n():a.fonts.load(function(a){return O(a)+" "+a.f+"00 300px "+I(a.c)}(b.a),b.h).then((function(a){1<=a.length?t():setTimeout(r,25)}),(function(){n()}))}()})),n=null,r=new Promise((function(a,e){n=setTimeout(e,b.f)}));Promise.race([r,t]).then((function(){n&&(clearTimeout(n),n=null),b.g(b.a)}),(function(){b.j(b.a)}))};var j={D:"serif",C:"sans-serif"},V=null;
vendor: 5,134 bytes, line 2
2function H(){if(null===V){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);V=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return V}function W(a,b,e){for(var t in j)if(j.hasOwnProperty(t)&&b===a.f[j[t]]&&e===a.f[j[t]])return!0;return!1}function G(a){var e,b=a.g.a.offsetWidth,t=a.h.a.offsetWidth;(e=b===a.f.serif&&t===a.f["sans-serif"])||(e=H()&&W(a,b,t)),e?q()-a.A>=a.w?H()&&W(a,b,t)&&(null===a.u||a.u.hasOwnProperty(a.a.c))?K(a,a.v):K(a,a.B):function(a){setTimeout(p((function(){G(this)}),a),50)}(a):K(a,a.v)}function K(a,b){setTimeout(p((function(){f(this.g.a),f(this.h.a),f(this.j.a),f(this.m.a),b(this.a)}),a),0)}function Y(a,b,e){this.c=a,this.a=b,this.f=0,this.m=this.j=!1,this.s=e}B.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=q(),G(this)};var $=null;function Q(a){0==--a.f&&a.j&&(a.m?((a=a.a).g&&v(a.f,[a.a.c("wf","active")],[a.a.c("wf","loading"),a.a.c("wf","inactive")]),C(a,"active")):x(a.a))}function z(a){this.j=a,this.a=new M,this.h=0,this.f=this.g=!0}function X(a,b,e,t,n){var r=0==--a.h;(a.f||a.g)&&setTimeout((function(){var a=n||null,o=t||{};if(0===e.length&&r)x(b.a);else{b.f+=e.length,r&&(b.j=r);var c,l=[];for(c=0;c<e.length;c++){var d=e[c],h=o[d.c],f=b.a,m=d;if(f.g&&v(f.f,[f.a.c("wf",m.c,R(m).toString(),"loading")]),C(f,"fontloading",m),f=null,null===$)if(window.FontFace){m=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var y=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);$=m?42<parseInt(m[1],10):!y}else $=!1;f=$?new F(p(b.g,b),p(b.h,b),b.c,d,b.s,h):new B(p(b.g,b),p(b.h,b),b.c,d,b.s,a,h),l.push(f)}for(c=0;c<l.length;c++)l[c].start()}}),0)}function J(a,b){this.c=a,this.a=b}function Z(a,b){this.c=a,this.a=b}function ee(a,b){this.c=a||te,this.a=[],this.f=[],this.g=b||""}Y.prototype.g=function(a){var b=this.a;b.g&&v(b.f,[b.a.c("wf",a.c,R(a).toString(),"active")],[b.a.c("wf",a.c,R(a).toString(),"loading"),b.a.c("wf",a.c,R(a).toString(),"inactive")]),C(b,"fontactive",a),this.m=!0,Q(this)},Y.prototype.h=function(a){var b=this.a;if(b.g){var e=m(b.f,b.a.c("wf",a.c,R(a).toString(),"active")),t=[],n=[b.a.c("wf",a.c,R(a).toString(),"loading")];e||t.push(b.a.c("wf",a.c,R(a).toString(),"inactive")),v(b.f,t,n)}C(b,"fontinactive",a),Q(this)},z.prototype.load=function(a){this.c=new l(this.j,a.context||this.j),this.g=!1!==a.events,this.f=!1!==a.classes,function(a,b,e){var t=[],n=e.timeout;!function(a){a.g&&v(a.f,[a.a.c("wf","loading")]),C(a,"loading")}(b);t=function(a,b,e){var t,n=[];for(t in b)if(b.hasOwnProperty(t)){var r=a.c[t];r&&n.push(r(b[t],e))}return n}(a.a,e,a.c);var r=new Y(a.c,b,n);for(a.h=t.length,b=0,e=t.length;b<e;b++)t[b].load((function(b,e,t){X(a,r,b,e,t)}))}(this,new D(this.c,a),a)},J.prototype.load=function(a){function b(){if(r["__mti_fntLst"+t]){var e,n=r["__mti_fntLst"+t](),o=[];if(n)for(var c=0;c<n.length;c++){var l=n[c].fontfamily;null!=n[c].fontStyle&&null!=n[c].fontWeight?(e=n[c].fontStyle+n[c].fontWeight,o.push(new A(l,e))):o.push(new A(l))}a(o)}else setTimeout((function(){b()}),50)}var e=this,t=e.a.projectId,n=e.a.version;if(t){var r=e.c.o;E(this.c,(e.a.api||"https://fast.fonts.net/jsapi")+"/"+t+".js"+(n?"?v="+n:""),(function(n){n?a([]):(r["__MonotypeConfiguration__"+t]=function(){return e.a},b())})).id="__MonotypeAPIScript__"+t}else a([])},Z.prototype.load=function(a){var b,e,t=this.a.urls||[],n=this.a.families||[],r=this.a.testStrings||{},g=new _;for(b=0,e=t.length;b<e;b++)y(this.c,t[b],k(g));var o=[];for(b=0,e=n.length;b<e;b++)if((t=n[b].split(":"))[1])for(var c=t[1].split(","),l=0;l<c.length;l+=1)o.push(new A(t[0],c[l]));else o.push(new A(t[0]));T(g,(function(){a(o,r)}))};var te="https://fonts.googleapis.com/css";function ne(a){this.f=a,this.a=[],this.c={}}var re={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},ie={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},ae={i:"i",italic:"i",n:"n",normal:"n"},oe=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function se(a,b){this.c=a,this.a=b}var ue={Arimo:!0,Cousine:!0,Tinos:!0};function ce(a,b){this.c=a,this.a=b}function le(a,b){this.c=a,this.f=b,this.a=[]}se.prototype.load=function(a){var b=new _,e=this.c,t=new ee(this.a.api,this.a.text),n=this.a.families;!function(a,b){for(var e=b.length,t=0;t<e;t++){var n=b[t].split(":");3==n.length&&a.f.push(n.pop());var r="";2==n.length&&""!=n[1]&&(r=":"),a.a.push(n.join(r))}}(t,n);var r=new ne(n);!function(a){for(var b=a.f.length,e=0;e<b;e++){var t=a.f[e].split(":"),n=t[0].replace(/\+/g," "),r=["n4"];if(2<=t.length){var g;if(g=[],o=t[1])for(var o,c=(o=o.split(",")).length,l=0;l<c;l++){var d;if((d=o[l]).match(/^[\w-]+$/))if(null==(h=oe.exec(d.toLowerCase())))d="";
2else{if(d=null==(d=h[2])||""==d?"n":ae[d],null==(h=h[1])||""==h)h="4";else var h=ie[h]||(isNaN(h)?"4":h.substr(0,1));d=[d,h].join("")}else d="";d&&g.push(d)}0<g.length&&(r=g),3==t.length&&(g=[],0<(t=(t=t[2])?t.split(","):g).length&&(t=re[t[0]])&&(a.c[n]=t))}for(a.c[n]||(t=re[n])&&(a.c[n]=t),t=0;t<r.length;t+=1)a.a.push(new A(n,r[t]))}}(r),y(e,function(a){if(0==a.a.length)throw Error("No fonts to load!");if(-1!=a.c.indexOf("kit="))return a.c;for(var b=a.a.length,e=[],t=0;t<b;t++)e.push(a.a[t].replace(/ /g,"+"));return b=a.c+"?family="+e.join("%7C"),0<a.f.length&&(b+="&subset="+a.f.join(",")),0<a.g.length&&(b+="&text="+encodeURIComponent(a.g)),b}(t),k(b)),T(b,(function(){a(r.a,r.c,ue)}))},ce.prototype.load=function(a){var b=this.a.id,e=this.c.o;b?E(this.c,(this.a.api||"https://use.typekit.net")+"/"+b+".js",(function(b){if(b)a([]);else if(e.Typekit&&e.Typekit.config&&e.Typekit.config.fn){b=e.Typekit.config.fn;for(var t=[],n=0;n<b.length;n+=2)for(var g=b[n],r=b[n+1],o=0;o<r.length;o++)t.push(new A(g,r[o]));try{e.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}a(t)}}),2e3):a([])},le.prototype.load=function(a){var b=this.f.id,e=this.c.o,t=this;b?(e.__webfontfontdeckmodule__||(e.__webfontfontdeckmodule__={}),e.__webfontfontdeckmodule__[b]=function(b,e){for(var g=0,n=e.fonts.length;g<n;++g){var r=e.fonts[g];t.a.push(new A(r.name,L("font-weight:"+r.weight+";font-style:"+r.style)))}a(t.a)},E(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(a){return a.o.location.hostname||a.a.location.hostname}(this.c)+"/"+b+".js",(function(b){b&&a([])}))):a([])};var de=new z(window);de.a.c.custom=function(a,b){return new Z(b,a)},de.a.c.fontdeck=function(a,b){return new le(b,a)},de.a.c.monotype=function(a,b){return new J(b,a)},de.a.c.typekit=function(a,b){return new ce(b,a)},de.a.c.google=function(a,b){return new se(b,a)};var he={load:p(de.load,de)};void 0===(r=function(){return he}.call(t,n,t,e))||(e.exports=r)}()},606:function(e,t){!function(){"use strict";var e="undefined"==typeof window,t=!e&&"scrollBehavior"in document.documentElement.style,n=function(){return(n=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)c.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return c}function o(){return null!=document.scrollingElement?document.scrollingElement:document.documentElement}var c="scroll-behavior",l=new RegExp("scroll-behavior:\\s*([^;]*)");function d(element,e){var t="scroll-behavior:"+e,n=element.getAttribute("style");if(null!=n&&""!==n){var r=h(element);if(null!=r){var o="scroll-behavior:"+r;n=(n=n.replace(o+";","")).replace(o,"")}element.setAttribute("style",n.endsWith(";")?""+n+t:";"+n+t)}else element.setAttribute("style",t)}function h(element){var e=element.getAttribute("style");if(null!=e&&e.includes(c)){var t=e.match(l);if(null!=t){var n=r(t,2)[1];if(null!=n&&""!==n)return n}}}function f(e,t){if(null!=t&&"smooth"===t.behavior)return"smooth";var n,r="style"in e?e:o();if("style"in r){var c=r.style.scrollBehavior;null!=c&&""!==c&&(n=c)}if(null==n){var l=r.getAttribute("scroll-behavior");null!=l&&""!==l&&(n=l)}if(null==n&&(n=h(r)),null==n){var d=getComputedStyle(r).getPropertyValue("scrollBehavior");null!=d&&""!==d&&(n=d)}return n}function v(e){return.5*(1-Math.cos(Math.PI*e))}var m={reset:function(){}},map="undefined"==typeof WeakMap?void 0:new WeakMap;function y(e){var n=e.startTime,r=e.startX,c=e.startY,l=e.endX,f=e.endY,y=e.method,E=e.scroller,_=0,k=l-r,T=f-c,w=Math.max(Math.abs(k/1e3*15e3),Math.abs(T/1e3*15e3)),S=function(e){if(t||null==map)return m;var n,r,c,l,f,v=o(),y=map.get(e);if(null!=y)n=y.cachedScrollSnapValue,r=y.cachedScrollBehaviorStyleAttributeValue,c=y.secondaryScroller,l=y.secondaryScrollerCachedScrollSnapValue,f=y.secondaryScrollerCachedScrollBehaviorStyleAttributeValue,y.release();else{n=""===e.style.scrollSnapType?null:e.style.scrollSnapType,r=h(e),c=e===v&&v!==document.body?document.body:void 0,l=null==c?void 0:""===c.style.scrollSnapType?null:c.style.scrollSnapType,f=null==c?void 0:h(c);var E=getComputedStyle(e).getPropertyValue("scroll-snap-type"),_=null==c?void 0:getComputedStyle(c).getPropertyValue("scroll-snap-type");if("none"===E&&"none"===_)return m}e.style.scrollSnapType="none",void 0!==c&&(c.style.scrollSnapType="none"),void 0!==r&&d(e,r),void 0!==c&&void 0!==f&&d(c,f);var k=!1,T=e===v?window:e;function w(){T.removeEventListener("scroll",S),null!=map&&map.delete(e),k=!0}function S(){e.style.scrollSnapType=n,null!=c&&void 0!==l&&(c.style.scrollSnapType=l),void 0!==r&&d(e,r),void 0!==c&&void 0!==f&&d(c,f),w()}return map.set(e,{release:w,cachedScrollSnapValue:n,cachedScrollBehaviorStyleAttributeValue:r,secondaryScroller:c,secondaryScrollerCachedScrollSnapValue:l,secondaryScrollerCachedScrollBehaviorStyleAttributeValue:f}),{reset:function(){setTimeout((function(){k||T.addEventListener("scroll",S)}))}}}(E);requestAnimationFrame((function animate(e){_+=e-n;var t=Math.max(0,Math.min(1,0===w?0:_/w)),o=Math.floor(r+k*v(t)),d=Math.floor(c+T*v(t));y(o,d),o!==l||d!==f?requestAnimationFrame(animate):null!=S&&(S.reset(),S=void 0)}))}var E=e?void 0:Element.prototype.scroll,_=e?void 0:window.scroll,k=e?void 0:Element.prototype.scrollBy,T=e?void 0:window.scrollBy,w=e?void 0:Element.prototype.scrollTo,S=e?void 0:window.scrollTo;function A(e,t){this.__adjustingScrollPosition=!0,this.scrollLeft=e,this.scrollTop=t,delete this.__adjustingScrollPosition}function I(e,t){return A.call(this,e,t)}function R(e,t){this.__adjustingScrollPosition=!0,this.scrollLeft+=e,this.scrollTop+=t,delete this.__adjustingScrollPosition}function O(e,element){switch(e){case"scroll":return element instanceof Element?null!=E?E:A:_;case"scrollBy":return element instanceof Element?null!=k?k:R:T;case"scrollTo":return element instanceof Element?null!=w?w:I:S}}function L(element,e,t,n){var r="performance"in window?performance.now():Date.now();if(element instanceof Element)return{startTime:r,startX:c=element.scrollLeft,startY:l=element.scrollTop,endX:Math.floor("scrollBy"===n?c+e
2:e),endY:Math.floor("scrollBy"===n?l+t:t),method:O("scrollTo",element).bind(element),scroller:element};var c,l,d=window.scrollX,h=window.pageXOffset,f=window.scrollY,v=window.pageYOffset;return{startTime:r,startX:c=null==d||0===d?h:d,startY:l=null==f||0===f?v:f,endX:Math.floor("scrollBy"===n?c+e:e),endY:Math.floor("scrollBy"===n?l+t:t),method:O("scrollTo",window).bind(window),scroller:o()}}function D(e){return null==e?0:"number"==typeof e?e:"string"==typeof e?parseFloat(e):0}function x(e){return null!=e&&"object"==typeof e}function C(element,e,t,r){!function(e,element,t){var n=f(element,e);null==n||"auto"===n?O(t,element).call(element,e.left,e.top):y(L(element,e.left,e.top,t))}(function(e,t){if(void 0===t&&!x(e))throw new TypeError("Failed to execute 'scroll' on 'Element': parameter 1 ('options') is not an object.");return x(e)?n(n({},M(e.left,e.top)),{behavior:null==e.behavior?"auto":e.behavior}):n(n({},M(e,t)),{behavior:"auto"})}(t,r),element,e)}function M(e,t){return{left:D(e),top:D(t)}}function P(e){return"nodeType"in e&&1===e.nodeType?e.parentNode:"ShadowRoot"in window&&e instanceof window.ShadowRoot?e.host:e===document?window:e instanceof Node?e.parentNode:null}function N(e){return"visible"!==e&&"clip"!==e}function U(element){if(element.clientHeight<element.scrollHeight||element.clientWidth<element.scrollWidth){var style=getComputedStyle(element,null);return N(style.overflowY)||N(style.overflowX)}return!1}function F(e){for(var t=e,n=o();null!=t;){var r=f(t);if(null!=r&&(t===n||U(t)))return[t,r];t=P(t)}for(t=e;null!=t;){if(t===n||U(t))return[t,"auto"];t=P(t)}return[n,"auto"]}function B(e){if(void 0===e&&(e=location),"origin"in e&&null!=e.origin)return e.origin;var t=null!=e.port&&e.port.length>0?":"+e.port:"";return("http:"===e.protocol&&":80"===t||"https:"===e.protocol&&":443"===t)&&(t=""),e.protocol+"//"+e.hostname+t}var j=/^#\d/;function V(){window.addEventListener("click",(function(e){if(e.isTrusted&&e.target instanceof HTMLAnchorElement){var t=e.target,n=t.pathname,o=t.search,c=t.hash;if(B(e.target)===B(location)&&n===location.pathname&&o===location.search&&null!=c&&!(c.length<1)){var l=function(e){for(var t=e;null!=t;){if("ShadowRoot"in window&&t instanceof window.ShadowRoot)return t;var n=P(t);if(n===t)return document;t=n}return document}(e.target),d=null!=c.match(j)?l.getElementById(c.slice(1)):l.querySelector(c);if(null!=d){var h=r(F(d),2)[1];"smooth"===h&&(e.preventDefault(),d.scrollIntoView({behavior:h}))}}}}))}var H=e?void 0:Element.prototype.scrollIntoView;function W(e,t,n,r,o,c,l,d){return c<e&&l>t||c>e&&l<t?0:c<=e&&d<=n||l>=t&&d>=n?c-e-r:l>t&&d<n||c<e&&d>n?l-t+o:0}function G(e,t,n){var r=n.block,c=n.inline,l=o(),d=null!=window.visualViewport?visualViewport.width:innerWidth,h=null!=window.visualViewport?visualViewport.height:innerHeight,f=null!=window.scrollX?window.scrollX:window.pageXOffset,v=null!=window.scrollY?window.scrollY:window.pageYOffset,m=e.getBoundingClientRect(),y=m.height,E=m.width,_=m.top,k=m.right,T=m.bottom,w=m.left,S="start"===r||"nearest"===r?_:"end"===r?T:_+y/2,A="center"===c?w+E/2:"end"===c?k:w,I=t.getBoundingClientRect(),R=I.height,O=I.width,L=I.top,D=I.right,x=I.bottom,C=I.left,M=getComputedStyle(t),P=parseInt(M.borderLeftWidth,10),N=parseInt(M.borderTopWidth,10),U=parseInt(M.borderRightWidth,10),F=parseInt(M.borderBottomWidth,10),B=0,j=0,V="offsetWidth"in t?t.offsetWidth-t.clientWidth-P-U:0,H="offsetHeight"in t?t.offsetHeight-t.clientHeight-N-F:0;if(l===t)B="start"===r?S:"end"===r?S-h:"nearest"===r?W(v,v+h,h,N,F,v+S,v+S+y,y):S-h/2,j="start"===c?A:"center"===c?A-d/2:"end"===c?A-d:W(f,f+d,d,P,U,f+A,f+A+E,E),B=Math.max(0,B+v),j=Math.max(0,j+f);else{B="start"===r?S-L-N:"end"===r?S-x+F+H:"nearest"===r?W(L,x,R,N,F+H,S,S+y,y):S-(L+R/2)+H/2,j="start"===c?A-C-P:"center"===c?A-(C+O/2)+V/2:"end"===c?A-D+U+V:W(C,D,O,P,U+V,A,A+E,E);var G=t.scrollLeft,K=t.scrollTop;B=Math.max(0,Math.min(K+B,t.scrollHeight-R+H)),j=Math.max(0,Math.min(G+j,t.scrollWidth-O+V))}return{top:B,left:j}}var K=e?void 0:Object.getOwnPropertyDescriptor(Element.prototype,"scrollTop").set;var Y=e?void 0:Object.getOwnPropertyDescriptor(Element.prototype,"scrollLeft").set;var $=!e&&("scroll"in Element.prototype&&"scrollTo"in Element.prototype&&"scrollBy"in Element.prototype&&"scrollIntoView"in Element.prototype);e||t&&$||(Element.prototype.scroll=function(e,t){C(this,"scroll",e,t)},Element.prototype.scrollBy=function(e,t){C(this,"scrollBy",e,t)},Element.prototype.scrollTo=function(e,t){C(this,"scrollTo",e,t)},Element.prototype.scrollIntoView=function(e){var t=null==e||!0===e?{block:"start",inline:"nearest"}:!1===e?{block:"end",inline:"nearest"}:e,o=r(F(this),2),c=o[0],l=o[1],d=null!=t.behavior?t.behavior:l;if("smooth"===d)c.scrollTo(n({behavior:d},G(this,c,t)));else if(null!=H)H.call(this,t);else{var h=G(this,c,t),f=h.top,v=h.left;O("scrollTo",this).call(this,v,f)}},null!=HTMLElement.prototype.scrollIntoView&&HTMLElement.prototype.scrollIntoView!==Element.prototype.scrollIntoView&&
2(HTMLElement.prototype.scrollIntoView=Element.prototype.scrollIntoView),Object.defineProperty(Element.prototype,"scrollLeft",{set:function(e){return this.__adjustingScrollPosition?Y.call(this,e):(C(this,"scrollTo",e,this.scrollTop),e)}}),Object.defineProperty(Element.prototype,"scrollTop",{set:function(e){return this.__adjustingScrollPosition?K.call(this,e):(C(this,"scrollTo",this.scrollLeft,e),e)}}),window.scroll=function(e,t){C(this,"scroll",e,t)},window.scrollBy=function(e,t){C(this,"scrollBy",e,t)},window.scrollTo=function(e,t){C(this,"scrollTo",e,t)},V())}()},61:function(e,t,n){"use strict";e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},65:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return k})),n.d(t,"d",(function(){return _})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return v}));var r=n(461),o=n(49),c=n(128);function l(source,e,t){if(!(e in source))return;const n=source[e],r=t(n);if("function"==typeof r)try{h(r,n)}catch(e){}source[e]=r}function d(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function h(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,d(e,"__sentry_original__",t)}function f(e){return e.__sentry_original__}function v(object){return Object.keys(object).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(object[e])}`)).join("&")}function m(e){if(Object(o.d)(e))return{message:e.message,name:e.name,stack:e.stack,...E(e)};if(Object(o.f)(e)){const t={type:e.type,target:y(e.target),currentTarget:y(e.currentTarget),...E(e)};return"undefined"!=typeof CustomEvent&&Object(o.g)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function y(e){try{return Object(o.c)(e)?Object(r.b)(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function E(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function _(e,t=40){const n=Object.keys(m(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(c.d)(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:Object(c.d)(r,t)}return""}function k(e){return T(e,new Map)}function T(e,t){if(Object(o.i)(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))void 0!==e[n]&&(r[n]=T(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(T(e,t))})),r}return e}},690:function(e,t,n){"use strict";t.byteLength=function(e){var t=d(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,i,n=d(e),r=n[0],l=n[1],h=new c(function(e,t,n){return 3*(t+n)/4-n}(0,r,l)),f=0,v=l>0?r-4:r;for(i=0;i<v;i+=4)t=o[e.charCodeAt(i)]<<18|o[e.charCodeAt(i+1)]<<12|o[e.charCodeAt(i+2)]<<6|o[e.charCodeAt(i+3)],h[f++]=t>>16&255,h[f++]=t>>8&255,h[f++]=255&t;2===l&&(t=o[e.charCodeAt(i)]<<2|o[e.charCodeAt(i+1)]>>4,h[f++]=255&t);1===l&&(t=o[e.charCodeAt(i)]<<10|o[e.charCodeAt(i+1)]<<4|o[e.charCodeAt(i+2)]>>2,h[f++]=t>>8&255,h[f++]=255&t);return h},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,c=[],l=16383,i=0,d=n-o;i<d;i+=l)c.push(h(e,i,i+l>d?d:i+l));1===o?(t=e[n-1],c.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],c.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return c.join("")};for(var r=[],o=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,l=code.length;i<l;++i)r[i]=code[i],o[code.charCodeAt(i)]=i;function d(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function h(e,t,n){for(var o,c,output=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),output.push(r[(c=o)>>18&63]+r[c>>12&63]+r[c>>6&63]+r[63&c]);return output.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},691:function(e,t){t.read=function(e,t,n,r,o){var c,l,d=8*o-r-1,h=(1<<d)-1,f=h>>1,v=-7,i=n?o-1:0,m=n?-1:1,s=e[t+i];for(i+=m,c=s&(1<<-v)-1,s>>=-v,v+=d;v>0;c=256*c+e[t+i],i+=m,v-=8);for(l=c&(1<<-v)-1,c>>=-v,v+=r;v>0;l=256*l+e[t+i],i+=m,v-=8);if(0===c)c=1-f;else{if(c===h)return l?NaN:1/0*(s?-1:1);l+=Math.pow(2,r),c-=f}return(s?-1:1)*l*Math.pow(2,c-r)},t.write=function(e,t,n,r,o,c){var l,d,h,f=8*c-o-1,v=(1<<f)-1,m=v>>1,rt=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,i=r?0:c-1,y=r?1:-1,s=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,l=v):(l=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-l))<1&&(l--,h*=2),(t+=l+m>=1?rt/h:rt*Math.pow(2,1-m))*h>=2&&(l++,h/=2),l+m>=v?(d=0,l=v):l+m>=1?(d=(t*h-1)*Math.pow(2,o),l+=m):(d=t*Math.pow(2,m-1)*Math.pow(2,o),l=0));o>=8;e[n+i]=255&d,i+=y,d/=256,o-=8);for(l=l<<o|d,f+=o;f>0;e[n+i]=255&l,i+=y,l/=256,f-=8);e[n+i-y]|=128*s}},692:function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},7:function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return D})),n.d(t,"c",(function(){return L})),n.d(t,"d",(function(){return h})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return B})),n.d(t,"g",(function(){return M})),n.d(t,"h",(function(){return F})),n.d(t,"i",(function(){return y}
vendor: 4,157 bytes, line 2
2)),n.d(t,"j",(function(){return m})),n.d(t,"k",(function(){return E})),n.d(t,"l",(function(){return H})),n.d(t,"m",(function(){return k})),n.d(t,"n",(function(){return w})),n.d(t,"o",(function(){return S})),n.d(t,"p",(function(){return C})),n.d(t,"q",(function(){return I})),n.d(t,"r",(function(){return R})),n.d(t,"s",(function(){return T})),n.d(t,"t",(function(){return A})),n.d(t,"u",(function(){return N})),n.d(t,"v",(function(){return U})),n.d(t,"w",(function(){return O}));const o=function(e){const t=[];let p=0;for(let i=0;i<e.length;i++){let n=e.charCodeAt(i);n<128?t[p++]=n:n<2048?(t[p++]=n>>6|192,t[p++]=63&n|128):55296==(64512&n)&&i+1<e.length&&56320==(64512&e.charCodeAt(i+1))?(n=65536+((1023&n)<<10)+(1023&e.charCodeAt(++i)),t[p++]=n>>18|240,t[p++]=n>>12&63|128,t[p++]=n>>6&63|128,t[p++]=63&n|128):(t[p++]=n>>12|224,t[p++]=n>>6&63|128,t[p++]=63&n|128)}return t},c={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(input,e){if(!Array.isArray(input))throw Error("encodeByteArray takes an array as a parameter");this.init_();const t=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,output=[];for(let i=0;i<input.length;i+=3){const e=input[i],n=i+1<input.length,r=n?input[i+1]:0,o=i+2<input.length,c=o?input[i+2]:0,l=e>>2,d=(3&e)<<4|r>>4;let h=(15&r)<<2|c>>6,f=63&c;o||(f=64,n||(h=64)),output.push(t[l],t[d],t[h],t[f])}return output.join("")},encodeString(input,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(input):this.encodeByteArray(o(input),e)},decodeString(input,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(input):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const o=e[n++];if(o<128)t[r++]=String.fromCharCode(o);else if(o>191&&o<224){const c=e[n++];t[r++]=String.fromCharCode((31&o)<<6|63&c)}else if(o>239&&o<365){const u=((7&o)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(u>>10)),t[r++]=String.fromCharCode(56320+(1023&u))}else{const c=e[n++],l=e[n++];t[r++]=String.fromCharCode((15&o)<<12|(63&c)<<6|63&l)}}return t.join("")}(this.decodeStringToByteArray(input,e))},decodeStringToByteArray(input,e){this.init_();const t=e?this.charToByteMapWebSafe_:this.charToByteMap_,output=[];for(let i=0;i<input.length;){const e=t[input.charAt(i++)],n=i<input.length?t[input.charAt(i)]:0;++i;const r=i<input.length?t[input.charAt(i)]:64;++i;const o=i<input.length?t[input.charAt(i)]:64;if(++i,null==e||null==n||null==r||null==o)throw new l;const c=e<<2|n>>4;if(output.push(c),64!==r){const e=n<<4&240|r>>2;if(output.push(e),64!==o){const e=r<<6&192|o;output.push(e)}}}return output},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let i=0;i<this.ENCODED_VALS.length;i++)this.byteToCharMap_[i]=this.ENCODED_VALS.charAt(i),this.charToByteMap_[this.byteToCharMap_[i]]=i,this.byteToCharMapWebSafe_[i]=this.ENCODED_VALS_WEBSAFE.charAt(i),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]]=i,i>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)]=i,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)]=i)}}};class l extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const d=function(e){return function(e){const t=o(e);return c.encodeByteArray(t,!0)}(e).replace(/\./g,"")},h=function(e){try{return c.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};const f=()=>function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,v=()=>{try{return f()||(()=>{if(void 0===r||void 0===r.env)return;const e=r.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;
2]+)/)}catch(e){return}const t=e&&h(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},m=e=>{var t,n;return null===(n=null===(t=v())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},y=()=>{var e;return null===(e=v())||void 0===e?void 0:e.config},E=e=>{var t;return null===(t=v())||void 0===t?void 0:t[`_${e}`]};class _{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}}function k(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function T(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(k())}function w(){return"object"==typeof self&&self.self===self}function S(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function A(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function I(){const e=k();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function R(){try{return"object"==typeof indexedDB}catch(e){return!1}}function O(){return new Promise(((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(r);o.onsuccess=()=>{o.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},o.onupgradeneeded=()=>{n=!1},o.onerror=()=>{var e;t((null===(e=o.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}}))}class L extends Error{constructor(code,e,t){super(e),this.code=code,this.customData=t,this.name="FirebaseError",Object.setPrototypeOf(this,L.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,D.prototype.create)}}class D{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(code,...data){const e=data[0]||{},t=`${this.service}/${code}`,template=this.errors[code],n=template?function(template,data){return template.replace(x,((e,t)=>{const n=data[t];return null!=n?String(n):`<${t}?>`}))}(template,e):"Error",r=`${this.serviceName}: ${n} (${t}).`;return new L(t,r,e)}}const x=/\{\$([^}]+)}/g;function C(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function M(a,b){if(a===b)return!0;const e=Object.keys(a),t=Object.keys(b);for(const n of e){if(!t.includes(n))return!1;const e=a[n],r=b[n];if(P(e)&&P(r)){if(!M(e,r))return!1}else if(e!==r)return!1}for(const n of t)if(!e.includes(n))return!1;return!0}function P(e){return null!==e&&"object"==typeof e}function N(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function U(e){const t={};return e.replace(/^\?/,"").split("&").forEach((e=>{if(e){const[n,r]=e.split("=");
vendor: 1,525 bytes, line 2
2t[decodeURIComponent(n)]=decodeURIComponent(r)}})),t}function F(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function B(e,t){const n=new j(e,t);return n.subscribe.bind(n)}class j{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)})),this.close(e)}complete(){this.forEachObserver((e=>{e.complete()})),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!=typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=V),void 0===r.error&&(r.error=V),void 0===r.complete&&(r.complete=V);const o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}})),this.observers.push(r),o}unsubscribeOne(i){void 0!==this.observers&&void 0!==this.observers[i]&&(delete this.observers[i],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let i=0;i<this.observers.length;i++)this.sendOne(i,e)}sendOne(i,e){this.task.then((()=>
vendor: 4,810 bytes, line 2
2{if(void 0!==this.observers&&void 0!==this.observers[i])try{e(this.observers[i])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}}))}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function V(){}function H(e){return e&&e._delegate?e._delegate:e}}).call(this,n(70),n(153))},705:function(e,t){!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),c="FormData"in e,l="ArrayBuffer"in e;if(l)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(e){return e&&d.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function v(e){return"string"!=typeof e&&(e=String(e)),e}function m(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function y(e){this.map={},e instanceof y?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(header){this.append(header[0],header[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function E(body){if(body.bodyUsed)return Promise.reject(new TypeError("Already read"));body.bodyUsed=!0}function _(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function k(e){var t=new FileReader,n=_(t);return t.readAsArrayBuffer(e),n}function T(e){if(e.slice)return e.slice(0);var view=new Uint8Array(e.byteLength);return view.set(new Uint8Array(e)),view.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(body){var e;this._bodyInit=body,body?"string"==typeof body?this._bodyText=body:o&&Blob.prototype.isPrototypeOf(body)?this._bodyBlob=body:c&&FormData.prototype.isPrototypeOf(body)?this._bodyFormData=body:n&&URLSearchParams.prototype.isPrototypeOf(body)?this._bodyText=body.toString():l&&o&&((e=body)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=T(body.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(body)||h(body))?this._bodyArrayBuffer=T(body):this._bodyText=body=Object.prototype.toString.call(body):this._bodyText="",this.headers.get("content-type")||("string"==typeof body?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(body)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=E(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?E(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(k)}),this.text=function(){var e,t,n,r=E(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=_(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var view=new Uint8Array(e),t=new Array(view.length),i=0;i<view.length;i++)t[i]=String.fromCharCode(view[i]);return t.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c&&(this.formData=function(){return this.text().then(I)}),this.json=function(){return this.text().then(JSON.parse)},this}y.prototype.append=function(e,t){e=f(e),t=v(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},y.prototype.delete=function(e){delete this.map[f(e)]},y.prototype.get=function(e){return e=f(e),this.has(e)?this.map[e]:null},y.prototype.has=function(e){return this.map.hasOwnProperty(f(e))},y.prototype.set=function(e,t){this.map[f(e)]=v(t)},y.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},y.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),m(e)},y.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),m(e)},y.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),m(e)},r&&(y.prototype[Symbol.iterator]=y.prototype.entries);
vendor: 8,693 bytes, line 2
2var S=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function A(input,e){var t,n,body=(e=e||{}).body;if(input instanceof A){if(input.bodyUsed)throw new TypeError("Already read");this.url=input.url,this.credentials=input.credentials,e.headers||(this.headers=new y(input.headers)),this.method=input.method,this.mode=input.mode,this.signal=input.signal,body||null==input._bodyInit||(body=input._bodyInit,input.bodyUsed=!0)}else this.url=String(input);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new y(e.headers)),this.method=(t=e.method||this.method||"GET",n=t.toUpperCase(),S.indexOf(n)>-1?n:t),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&body)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(body)}function I(body){var form=new FormData;return body.trim().split("&").forEach((function(e){if(e){var t=e.split("="),n=t.shift().replace(/\+/g," "),r=t.join("=").replace(/\+/g," ");form.append(decodeURIComponent(n),decodeURIComponent(r))}})),form}function R(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new y(t.headers),this.url=t.url||"",this._initBody(e)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})},w.call(A.prototype),w.call(R.prototype),R.prototype.clone=function(){return new R(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},R.error=function(){var e=new R(null,{status:0,statusText:""});return e.type="error",e};var O=[301,302,303,307,308];R.redirect=function(e,t){if(-1===O.indexOf(t))throw new RangeError("Invalid status code");return new R(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function L(input,e){return new Promise((function(n,r){var c=new A(input,e);if(c.signal&&c.signal.aborted)return r(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function d(){l.abort()}l.onload=function(){var e,t,r={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new y,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(line){var e=line.split(":"),n=e.shift().trim();if(n){var r=e.join(":").trim();t.append(n,r)}})),t)};r.url="responseURL"in l?l.responseURL:r.headers.get("X-Request-URL");var body="response"in l?l.response:l.responseText;n(new R(body,r))},l.onerror=function(){r(new TypeError("Network request failed"))},l.ontimeout=function(){r(new TypeError("Network request failed"))},l.onabort=function(){r(new t.DOMException("Aborted","AbortError"))},l.open(c.method,c.url,!0),"include"===c.credentials?l.withCredentials=!0:"omit"===c.credentials&&(l.withCredentials=!1),"responseType"in l&&o&&(l.responseType="blob"),c.headers.forEach((function(e,t){l.setRequestHeader(t,e)})),c.signal&&(c.signal.addEventListener("abort",d),l.onreadystatechange=function(){4===l.readyState&&c.signal.removeEventListener("abort",d)}),l.send(void 0===c._bodyInit?null:c._bodyInit)}))}L.polyfill=!0,e.fetch||(e.fetch=L,e.Headers=y,e.Request=A,e.Response=R),t.Headers=y,t.Request=A,t.Response=R,t.fetch=L}({})}("undefined"!=typeof self?self:this)},706:function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},707:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o="~";function c(){}function l(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function d(e,t,n,r,c){if("function"!=typeof n)throw new TypeError("The listener must be a function");var d=new l(n,r||e,c),h=o?o+t:t;return e._events[h]?e._events[h].fn?e._events[h]=[e._events[h],d]:e._events[h].push(d):(e._events[h]=d,e._eventsCount++),e}function h(e,t){0==--e._eventsCount?e._events=new c:delete e._events[t]}function f(){this._events=new c,this._eventsCount=0}Object.create&&(c.prototype=Object.create(null),(new c).__proto__||(o=!1)),f.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},f.prototype.listeners=function(e){var t=o?o+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,r=n.length,c=new Array(r);i<r;i++)c[i]=n[i].fn;return c},f.prototype.listenerCount=function(e){var t=o?o+e:e,n=this._events[t];return n?n.fn?1:n.length:0},f.prototype.emit=function(e,t,n,r,c,l){var d=o?o+e:e;if(!this._events[d])return!1;var h,i,f=this._events[d],v=arguments.length;if(f.fn){switch(f.once&&this.removeListener(e,f.fn,void 0,!0),v){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,t),!0;case 3:return f.fn.call(f.context,t,n),!0;case 4:return f.fn.call(f.context,t,n,r),!0;case 5:return f.fn.call(f.context,t,n,r,c),!0;case 6:return f.fn.call(f.context,t,n,r,c,l),!0}for(i=1,h=new Array(v-1);i<v;i++)h[i-1]=arguments[i];f.fn.apply(f.context,h)}else{var m,y=f.length;for(i=0;i<y;i++)switch(f[i].once&&this.removeListener(e,f[i].fn,void 0,!0),v){case 1:f[i].fn.call(f[i].context);break;case 2:f[i].fn.call(f[i].context,t);break;case 3:f[i].fn.call(f[i].context,t,n);break;case 4:f[i].fn.call(f[i].context,t,n,r);break;default:if(!h)for(m=1,h=new Array(v-1);m<v;m++)h[m-1]=arguments[m];f[i].fn.apply(f[i].context,h)}}return!0},f.prototype.on=function(e,t,n){return d(this,e,t,n,!1)},f.prototype.once=function(e,t,n){return d(this,e,t,n,!0)},f.prototype.removeListener=function(e,t,n,r){var c=o?o+e:e;if(!this._events[c])return this;if(!t)return h(this,c),this;var l=this._events[c];if(l.fn)l.fn!==t||r&&!l.once||n&&l.context!==n||h(this,c);else{for(var i=0,d=[],f=l.length;i<f;i++)(l[i].fn!==t||r&&!l[i].once||n&&l[i].context!==n)&&d.push(l[i]);d.length?this._events[c]=1===d.length?d[0]:d:h(this,c)}return this},f.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&h(this,t)):(this._events=new c,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=o,f.EventEmitter=f,e.exports=f},708:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e}},709:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!==e&&"object"==typeof e}},710:function(e,t,n){"use strict";n.r(t),n.d(t,"getOperationAST",(function(){return o}));var r=n(20);function o(e,t){for(var n=null,o=0,c=e.definitions;o<c.length;o++){var l,d=c[o];if(d.kind===r.a.OPERATION_DEFINITION)if(null==t){if(n)return null;n=d}else if((null===(l=d.name)||void 0===l?void 0:l.value)===t)return d}return n}},711:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GRAPHQL_SUBSCRIPTIONS=t.GRAPHQL_WS=void 0;t.GRAPHQL_WS="graphql-ws";t.GRAPHQL_SUBSCRIPTIONS="graphql-subscriptions"},712:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WS_TIMEOUT=t.MIN_WS_TIMEOUT=void 0;t.MIN_WS_TIMEOUT=1e3;t.WS_TIMEOUT=3e4},713:function(e,t,n){"use strict";var r=n(297),o=n(715),c=n(716),l=n(298),d=r.sum32,h=r.sum32_4,f=r.sum32_5,v=c.ch32,m=c.maj32,y=c.s0_256,E=c.s1_256,_=c.g0_256,k=c.g1_256,T=o.BlockHash,w=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
2734187,3204031479,3329325298];function S(){if(!(this instanceof S))return new S;T.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=w,this.W=new Array(64)}r.inherits(S,T),e.exports=S,S.blockSize=512,S.outSize=256,S.hmacStrength=192,S.padLength=64,S.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i<n.length;i++)n[i]=h(k(n[i-2]),n[i-7],_(n[i-15]),n[i-16]);var a=this.h[0],b=this.h[1],r=this.h[2],o=this.h[3],c=this.h[4],T=this.h[5],g=this.h[6],w=this.h[7];for(l(this.k.length===n.length),i=0;i<n.length;i++){var S=f(w,E(c),v(c,T,g),this.k[i],n[i]),A=d(y(a),m(a,b,r));w=g,g=T,T=c,c=d(o,S),o=r,r=b,b=a,a=d(S,A)}this.h[0]=d(this.h[0],a),this.h[1]=d(this.h[1],b),this.h[2]=d(this.h[2],r),this.h[3]=d(this.h[3],o),this.h[4]=d(this.h[4],c),this.h[5]=d(this.h[5],T),this.h[6]=d(this.h[6],g),this.h[7]=d(this.h[7],w)},S.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},714:function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},715:function(e,t,n){"use strict";var r=n(297),o=n(298);function c(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=c,c.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},c.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},c.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},716:function(e,t,n){"use strict";var r=n(297).rotr32;function o(e,t,n){return e&t^~e&n}function c(e,t,n){return e&t^e&n^t&n}function l(e,t,n){return e^t^n}t.ft_1=function(s,e,t,n){return 0===s?o(e,t,n):1===s||3===s?l(e,t,n):2===s?c(e,t,n):void 0},t.ch32=o,t.maj32=c,t.p32=l,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},717:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var l=function(){return"function"==typeof Symbol},d=function(e){return l()&&Boolean(Symbol[e])},h=function(e){return d(e)?Symbol[e]:"@@"+e};l()&&!d("observable")&&(Symbol.observable=Symbol("observable"));var f=h("iterator"),v=h("observable"),m=h("species");function y(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function E(e){var t=e.constructor;return void 0!==t&&null===(t=t[m])&&(t=void 0),void 0!==t?t:L}function _(e){return e instanceof L}function k(e){k.log?k.log(e):setTimeout((function(){throw e}))}function T(e){Promise.resolve().then((function(){try{e()}catch(e){k(e)}}))}function w(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=y(t,"unsubscribe");n&&n.call(t)}}catch(e){k(e)}}function S(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function A(e,t,n){e._state="running";var r=e._observer;try{var o=y(r,t);switch(t){case"next":o&&o.call(r,n);break;case"error":if(S(e),!o)throw n;o.call(r,n);break;case"complete":S(e),o&&o.call(r)}}catch(e){k(e)}"closed"===e._state?w(e):"running"===e._state&&(e._state="ready")}function I(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void T((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var i=0;i<t.length&&(A(e,t[i].type,t[i].value),"closed"!==e._state);++i);}}(e)}))):void A(e,t,n);e._queue.push({type:t,value:n})}}var R=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var o=new O(this);try{this._cleanup=n.call(void 0,o)}catch(e){o.error(e)}"initializing"===this._state&&(this._state="ready")}return c(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(S(this),w(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),O=function(){function e(t){r(this,e),this._subscription=t}return c(e,[{key:"next",value:function(e){I(this._subscription,"next",e)}},{key:"error",value:function(e){I(this._subscription,"error",e)}},{key:"complete",value:function(){I(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),L=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return c(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new R(e,this._subscriber)}}
vendor: 4,443 bytes, line 2
2,{key:"forEach",value:function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var o=t.subscribe({next:function(t){try{e(t,c)}catch(e){r(e),o.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function c(){o.unsubscribe(),n()}}))}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(E(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(E(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=E(this),r=arguments.length>1,o=!1,c=arguments[1],l=c;return new n((function(n){return t.subscribe({next:function(t){var c=!o;if(o=!0,!c||r)try{l=e(l,t)}catch(e){return n.error(e)}else l=t},error:function(e){n.error(e)},complete:function(){if(!o&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(l),n.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=E(this);return new o((function(t){var r,c=0;return function e(l){r=l.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){c===n.length?(r=void 0,t.complete()):e(o.from(n[c++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=E(this);return new n((function(r){var o=[],c=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var c=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var i=o.indexOf(c);i>=0&&o.splice(i,1),l()}});o.push(c)},error:function(e){r.error(e)},complete:function(){l()}});function l(){c.closed&&0===o.length&&r.complete()}return function(){o.forEach((function(s){return s.unsubscribe()})),c.unsubscribe()}}))}},{key:v,value:function(){return this}}],[{key:"from",value:function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=y(t,v);if(r){var o=r.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return _(o)&&o.constructor===n?o:new n((function(e){return o.subscribe(e)}))}if(d("iterator")&&(r=y(t,f)))return new n((function(e){T((function(){if(!e.closed){var n=!0,o=!1,c=void 0;try{for(var l,d=r.call(t)[Symbol.iterator]();!(n=(l=d.next()).done);n=!0){var h=l.value;if(e.next(h),e.closed)return}}catch(e){o=!0,c=e}finally{try{n||null==d.return||d.return()}finally{if(o)throw c}}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){T((function(){if(!e.closed){for(var i=0;i<t.length;++i)if(e.next(t[i]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o="function"==typeof this?this:e;return new o((function(e){T((function(){if(!e.closed){for(var i=0;i<n.length;++i)if(e.next(n[i]),e.closed)return;e.complete()}}))}))}},{key:m,get:function(){return this}}]),e}();t.Observable=L,l()&&Object.defineProperty(L,Symbol("extensions"),{value:{symbol:v,hostReportError:k},configurable:!0})},718:function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return c})),n.d(t,"__rest",(function(){return l})),n.d(t,"__decorate",(function(){return d})),n.d(t,"__param",(function(){return h})),n.d(t,"__metadata",(function(){return f})),n.d(t,"__awaiter",(function(){return v})),n.d(t,"__generator",(function(){return m})),n.d(t,"__createBinding",(function(){return y})),n.d(t,"__exportStar",(function(){return E})),n.d(t,"__values",(function(){return _})),n.d(t,"__read",(function(){return k})),n.d(t,"__spread",(function(){return T})),n.d(t,"__spreadArrays",(function(){return w})),n.d(t,"__await",(function(){return S})),n.d(t,"__asyncGenerator",(function(){return A})),n.d(t,"__asyncDelegator",(function(){return I})),n.d(t,"__asyncValues",(function(){return R}
vendor: 5,356 bytes, line 2
2)),n.d(t,"__makeTemplateObject",(function(){return O})),n.d(t,"__importStar",(function(){return L})),n.d(t,"__importDefault",(function(){return D})),n.d(t,"__classPrivateFieldGet",(function(){return x})),n.d(t,"__classPrivateFieldSet",(function(){return C}));var r=function(e,b){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)b.hasOwnProperty(p)&&(e[p]=b[p])})(e,b)};function o(e,b){function t(){this.constructor=e}r(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}var c=function(){return(c=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};function l(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]])}return t}function d(e,t,n,desc){var r,o=arguments.length,c=o<3?t:null===desc?desc=Object.getOwnPropertyDescriptor(t,n):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,n,desc);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(c=(o<3?r(c):o>3?r(t,n,c):r(t,n))||c);return o>3&&c&&Object.defineProperty(t,n,c),c}function h(e,t){return function(n,r){t(n,r,e)}}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function v(e,t,n,r){return new(n||(n=Promise))((function(o,c){function l(e){try{h(r.next(e))}catch(e){c(e)}}function d(e){try{h(r.throw(e))}catch(e){c(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,d)}h((r=r.apply(e,t||[])).next())}))}function m(e,body){var t,n,r,g,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return g={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function c(c){return function(l){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(6===c[0]&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=body.call(e,o)}catch(e){c=[6,e],n=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}}function y(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function E(e,t){for(var p in e)"default"===p||t.hasOwnProperty(p)||(t[p]=e[p])}function _(e){var s="function"==typeof Symbol&&Symbol.iterator,t=s&&e[s],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)c.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return c}function T(){for(var e=[],i=0;i<arguments.length;i++)e=e.concat(k(arguments[i]));return e}function w(){for(var s=0,i=0,e=arguments.length;i<e;i++)s+=arguments[i].length;var t=Array(s),n=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,o=a.length;r<o;r++,n++)t[n]=a[r];return t}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function A(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,g=n.apply(e,t||[]),q=[];return i={},r("next"),r("throw"),r("return"),i[Symbol.asyncIterator]=function(){return this},i;function r(e){g[e]&&(i[e]=function(t){return new Promise((function(a,b){q.push([e,t,a,b])>1||o(e,t)}))})}function o(e,t){try{(n=g[e](t)).value instanceof S?Promise.resolve(n.value.v).then(c,l):d(q[0][2],n)}catch(e){d(q[0][3],e)}var n}function c(e){o("next",e)}function l(e){o("throw",e)}function d(e,t){e(t),q.shift(),q.length&&o(q[0][0],q[0][1])}}function I(e){var i,p;return i={},t("next"),t("throw",(function(e){throw e})),t("return"),i[Symbol.iterator]=function(){return this},i;function t(t,n){i[t]=e[t]?function(r){return(p=!p)?{value:S(e[t](r)),done:"return"===t}:n?n(r):r}:n}}function R(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,t=e[Symbol.asyncIterator];return t?t.call(e):(e=_(e),i={},n("next"),n("throw"),n("return"),i[Symbol.asyncIterator]=function(){return this},i);function n(t){i[t]=e[t]&&function(n){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(n=e[t](n)).done,n.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
2function L(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function D(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},719:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11);function o(e,t,n){var l=n.fragmentMap,h=n.contextValue,f=n.variableValues,v={};return e.selections.forEach((function(e){if(!f||r.shouldInclude(e,f))if(r.isField(e)){var m=function(e,t,n){var l=n.variableValues,d=n.contextValue,h=n.resolver,f=e.name.value,v=r.argumentsObjectFromField(e,l),m={isLeaf:!e.selectionSet,resultKey:r.resultKeyNameFromField(e),directives:r.getDirectiveInfoFromField(e,l),field:e},y=h(f,t,v,d,m);if(!e.selectionSet)return y;if(null==y)return y;if(Array.isArray(y))return c(e,y,n);return o(e.selectionSet,y,n)}(e,t,n),y=r.resultKeyNameFromField(e);void 0!==m&&(void 0===v[y]?v[y]=m:d(v[y],m))}else{var E=void 0;if(r.isInlineFragment(e))E=e;else if(!(E=l[e.name.value]))throw new Error("No fragment named "+e.name.value);var _=E.typeCondition.name.value;if(n.fragmentMatcher(t,_,h)){var k=o(E.selectionSet,t,n);d(v,k)}}})),n.resultMapper?n.resultMapper(v,t):v}function c(e,t,n){return t.map((function(t){return null===t?null:Array.isArray(t)?c(e,t,n):o(e.selectionSet,t,n)}))}t.graphql=function(e,t,n,c,l,d){void 0===l&&(l={}),void 0===d&&(d={});var h=r.getMainDefinition(t),f=r.getFragmentDefinitions(t),v={fragmentMap:r.createFragmentMap(f),contextValue:c,variableValues:l,resultMapper:d.resultMapper,resolver:e,fragmentMatcher:d.fragmentMatcher||function(){return!0}};return o(h.selectionSet,n,v)};var l=Object.prototype.hasOwnProperty;function d(e,t){null!==t&&"object"==typeof t&&Object.keys(t).forEach((function(n){var r=t[n];l.call(e,n)?d(e[n],r):e[n]=r}))}t.merge=d},72:function(e,t,n){"use strict";n.r(t),n.d(t,"Observable",(function(){return r.a})),n.d(t,"getOperationName",(function(){return d.getOperationName})),n.d(t,"ApolloLink",(function(){return I})),n.d(t,"concat",(function(){return A})),n.d(t,"createOperation",(function(){return E})),n.d(t,"empty",(function(){return T})),n.d(t,"execute",(function(){return R})),n.d(t,"from",(function(){return w})),n.d(t,"fromError",(function(){return y})),n.d(t,"fromPromise",(function(){return m})),n.d(t,"makePromise",(function(){return v})),n.d(t,"split",(function(){return S})),n.d(t,"toPromise",(function(){return f}));var r=n(84),o=n(23),c=function(e,b){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)b.hasOwnProperty(p)&&(e[p]=b[p])})(e,b)};var l=function(){return(l=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};var d=n(11);!function(e){function t(t,link){var n=e.call(this,t)||this;return n.link=link,n}(function(e,b){function t(){this.constructor=e}c(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)})(t,e)}(Error);function h(link){return link.request.length<=1}function f(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(data){t||(t=!0,n(data))},error:r})}))}var v=f;function m(e){return new r.a((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function y(e){return new r.a((function(t){t.error(e)}))}function E(e,t){var n=l({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n=l({},n,"function"==typeof e?e(n):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return l({},n)}}),Object.defineProperty(t,"toKey",{enumerable:!1,value:function(){return function(e){var t=e.query,n=e.variables,r=e.operationName;return JSON.stringify([r,t,n])}(t)}}),t}function _(e,t){return t?t(e):r.a.of()}function k(e){return"function"==typeof e?new I(e):e}function T(){return new I((function(){return r.a.of()}))}function w(e){return 0===e.length?T():e.map(k).reduce((function(e,t){return e.concat(t)}))}function S(e,t,n){var o=k(t),c=k(n||new I(_));return h(o)&&h(c)?new I((function(t){return e(t)?o.request(t)||r.a.of():c.request(t)||r.a.of()})):new I((function(t,n){return e(t)?o.request(t,n)||r.a.of():c.request(t,n)||r.a.of()}))}var A=function(e,t){var n=k(e);if(h(n))return n;var o=k(t);return h(o)?new I((function(e){return n.request(e,(function(e){return o.request(e)||r.a.of()}))||r.a.of()})):new I((function(e,t){return n.request(e,(function(e){return o.request(e,t)||r.a.of()}))||r.a.of()}))},I=function(){function e(e){e&&(this.request=e)}return e.prototype.split=function(t,n,r){return this.concat(S(t,n,r||new e(_)))},e.prototype.concat=function(e){return A(this,e)},e.prototype.request=function(e,t){throw new o.a(1)},e.empty=T,e.from=w,e.split=S,e.execute=R,e}();function R(link,e){return link.request(E(e.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?Object(d.getOperationName)(t.query):""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var c=r[n];if(t.indexOf(c)<0)throw new o.a(2)}return e}(e))))||r.a.of()}},722:function(e,t,n){"use strict";n.r(t);var r=n(299);n.d(t,"ReactNativeFile",(function(){return r}));var o=n(434);n.d(t,"extractFiles",(function(){return o}
2));var c=n(300);n.d(t,"isExtractableFile",(function(){return c}))},724:function(e,t,n){"use strict";(function(e){var t,r,o,c,l=n(725),d=n(726),h=n(728),f=n(729),v=n(730),m=n(734),y=n(738),E=n(739),_=n(440),k=n(437),T=n(743),w=n(744),S=n(301),A=n(745),I=n(746),R=n(247),O=["action","relatedTarget"],L=["newState","oldState"];function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,a){if(e){if("string"==typeof e)return M(e,a);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?M(e,a):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw c}}}}function M(e,a){(null==a||a>e.length)&&(a=e.length);for(var t=0,n=Array(a);t<a;t++)n[t]=e[t];return n}function P(e){var t=N();return function(){var n,r=S(e);if(t){var s=S(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return w(this,n)}}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}n(53),n(747),n(748),n(17),n(88),n(749),n(750),n(751),n(89),n(752),n(413),n(415),n(25),n(754),n(68),n(141),n(755),n(756),n(106),n(75),n(100),n(54),n(192),n(96),n(140),n(73),n(51),n(77),n(76),n(151),n(142),n(407),n(757),n(759),n(761),n(762),n(763),n(765),n(766),n(767),n(768),n(769),n(770),n(771),n(772),n(774),n(775),n(776),n(777),n(778),n(779),n(780),n(781),n(782),n(783),n(784),n(785),n(34),n(129),n(52),n(81),n(226),n(274),n(191),n(224),n(174),n(267),n(786),n(169),n(104),n(483),n(484),n(485),n(486),n(487),n(488),n(489),n(490),n(491),n(492),n(493),n(494),n(495),n(496),n(497),n(498),n(499),n(97),n(351),n(787),n(788),n(789),n(790),n(792),n(793),n(794),n(405),n(176),n(272),n(173),n(523),n(796),n(797),n(408),n(294),n(798),n(193),n(799),n(800),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(801),n(105),n(264),n(802),n(335),n(803),n(804),n(518),n(384),n(517),n(806),n(332),n(333),n(519),n(520),n(807),function(n,D,M){var N=Object.defineProperty,U=Object.getPrototypeOf,F=Reflect.get,B=function(i){throw TypeError(i)},j=function(i,e,t){return function(i,e,t){return e in i?N(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t}(i,"symbol"!=R(e)?e+"":e,t)},V=function(i,e,t){return e.has(i)||B("Cannot "+t)},H=function(i,e,t){return V(i,e,"read from private field"),t?t.call(i):e.get(i)},W=function(i,e,t){return e.has(i)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t)},G=function(i,e,t,s){return V(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},K=function(i,e,t){return V(i,e,"access private method"),t},Y=function(i,e,t){return F(U(i),t,e)},$=function(){function e(){A(this,e)}return I(e,[{key:"addEventListener",value:function(){}},{key:"removeEventListener",value:function(){}},{key:"dispatchEvent",value:function(e){return!0}}]),e}();if("undefined"==typeof DocumentFragment){var i=function(e){T(i,e);var t=P(i);function i(){return A(this,i),t.apply(this,arguments)}return I(i)}($);globalThis.DocumentFragment=i}var Q,z=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}($),X=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}($),J={get:function(i){},define:function(i,e,t){},getName:function(i){return null},upgrade:function(i){},whenDefined:function(i){return Promise.resolve(z)}},em=function(){function em(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};A(this,em),W(this,Q),G(this,Q,null==t?void 0:t.detail)}return I(em,[{key:"detail",get:function(){return H(this,Q)}},{key:"initCustomEvent",value:function(){}}]),em}();Q=new WeakMap;var Z={document:{createElement:function(i,e){return new z}},DocumentFragment:DocumentFragment,customElements:J,CustomEvent:em,EventTarget:$,HTMLElement:z,HTMLVideoElement:X},ee="undefined"==typeof window||void 0===globalThis.customElements,te=ee?Z:globalThis,ne=(ee||globalThis.document,Object.create),re=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,ae=Object.getOwnPropertyNames,oe=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty,ue=function(i,e){return function(){return i&&(e=i(i=0)),e}},ce=function(i,e){return function(){return e||i((e={exports:{}}).exports,e),e.exports}},le=function(i,e,t){return t=null!=i?ne(oe(i)):{},function(i,e,t,s){if(e&&"object"==R(e)||"function"==typeof e)for(var n,r=ae(e),o=0,a=r.length;o<a;o++)n=r[o],!se.call(i,n)&&n!==t&&re(i,n,{get:function(t){return e[t]}.bind(null,n),enumerable:!(s=ie(e,n))||s.enumerable});return i}(!e&&i&&i.__esModule?t:re(t,"default",{value:i,enumerable:!0}),i)},de=ce((function(i,t){var n;n="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}
2,t.exports=n}));function he(i,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](i):he(i,e)}var fe=ue((function(){fe()}));function pe(i){return i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":R(i)}var ve=ue((function(){})),me=ce((function(i,e){var t=Array.prototype.slice;e.exports=function(e,n){for(("length"in e||(e=[e]),e=t.call(e));e.length;){var a=e.shift(),r=n(a);if(r)return r;a.childNodes&&a.childNodes.length&&(e=t.call(a.childNodes).concat(e))}}})),ge=ce((function(i,e){function t(s,e){if(!he(this,t))return new t(s,e);this.data=s,this.nodeValue=s,this.length=s.length,this.ownerDocument=e||null}fe(),e.exports=t,t.prototype.nodeType=8,t.prototype.nodeName="#comment",t.prototype.toString=function(){return"[object Comment]"}})),ye=ce((function(i,e){function t(s,e){if(!he(this,t))return new t(s);this.data=s||"",this.length=this.data.length,this.ownerDocument=e||null}fe(),e.exports=t,t.prototype.type="DOMTextNode",t.prototype.nodeType=3,t.prototype.nodeName="#text",t.prototype.toString=function(){return this.data},t.prototype.replaceData=function(s,e,t){var a=this.data,n=a.substring(0,s),r=a.substring(s+e,a.length);this.data=n+t+r,this.length=this.data.length}})),be=ce((function(i,e){e.exports=function(s){var e=this,t=s.type;s.target||(s.target=e),e.listeners||(e.listeners={});var a=e.listeners[t];if(a)return a.forEach((function(t){s.currentTarget=e,"function"==typeof t?t(s):t.handleEvent(s)}));e.parentNode&&e.parentNode.dispatchEvent(s)}})),Ee=ce((function(i,e){e.exports=function(s,e){var t=this;t.listeners||(t.listeners={}),t.listeners[s]||(t.listeners[s]=[]),-1===t.listeners[s].indexOf(e)&&t.listeners[s].push(e)}})),_e=ce((function(i,e){e.exports=function(s,e){var t=this;if(t.listeners&&t.listeners[s]){var a=t.listeners[s],n=a.indexOf(e);-1!==n&&a.splice(n,1)}}})),ke=ce((function(i,e){ve(),e.exports=s;var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function s(e){switch(e.nodeType){case 3:return u(e.data);case 8:return"\x3c!--"+e.data+"--\x3e";default:return function(e){var o=[],c=e.tagName;return"http://www.w3.org/1999/xhtml"===e.namespaceURI&&(c=c.toLowerCase()),o.push("<"+c+function(e){var t=[];for(var o in e)n(e,o)&&t.push({name:o,value:e[o]});for(var p in e._attributes)for(var g in e._attributes[p]){var c=e._attributes[p][g],l=(c.prefix?c.prefix+":":"")+g;t.push({name:l,value:c.value})}return e.className&&t.push({name:"class",value:e.className}),t.length?r(t):""}(e)+function(e){var t=e.dataset,n=[];for(var p in t)n.push({name:"data-"+p,value:t[p]});return n.length?r(n):""}(e)),t.indexOf(c)>-1?o.push(" />"):(o.push(">"),e.childNodes.length?o.push.apply(o,e.childNodes.map(s)):e.textContent||e.innerText?o.push(u(e.textContent||e.innerText)):e.innerHTML&&o.push(e.innerHTML),o.push("</"+c+">")),o.join("")}(e)}}function n(e,t){var n=pe(e[t]);return"style"===t&&Object.keys(e.style).length>0||e.hasOwnProperty(t)&&("string"===n||"boolean"===n||"number"===n)&&"nodeName"!==t&&"className"!==t&&"tagName"!==t&&"textContent"!==t&&"innerText"!==t&&"namespaceURI"!==t&&"innerHTML"!==t}function r(e){var t=[];return e.forEach((function(e){var p=e.name,g=e.value;"style"===p&&(g=function(e){if("string"==typeof e)return e;var t="";return Object.keys(e).forEach((function(n){var p=e[n];n=n.replace(/[A-Z]/g,(function(g){return"-"+g.toLowerCase()})),t+=n+":"+p+";"})),t}(g)),t.push(p+'="'+function(e){return u(e).replace(/"/g,"&quot;")}(g)+'"')})),t.length?" "+t.join(" "):""}function u(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}})),Te=ce((function(i,e){fe();var t=me(),s=be(),n=Ee(),r=_e(),a=ke(),o="http://www.w3.org/1999/xhtml";function c(e,u,t){if(!he(this,c))return new c(e);var n=void 0===t?o:t||null;this.tagName=n===o?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=u||null,this.namespaceURI=n,this._attributes={}
2,"INPUT"===this.tagName&&(this.type="text")}e.exports=c,c.prototype.type="DOMElement",c.prototype.nodeType=1,c.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e},c.prototype.replaceChild=function(e,u){e.parentNode&&e.parentNode.removeChild(e);var t=this.childNodes.indexOf(u);return u.parentNode=null,this.childNodes[t]=e,e.parentNode=this,u},c.prototype.removeChild=function(e){var u=this.childNodes.indexOf(e);return this.childNodes.splice(u,1),e.parentNode=null,e},c.prototype.insertBefore=function(e,u){e.parentNode&&e.parentNode.removeChild(e);var t=null==u?-1:this.childNodes.indexOf(u);return t>-1?this.childNodes.splice(t,0,e):this.childNodes.push(e),e.parentNode=this,e},c.prototype.setAttributeNS=function(e,u,t){var n=null,r=u,o=u.indexOf(":");(o>-1&&(n=u.substr(0,o),r=u.substr(o+1)),"INPUT"===this.tagName&&"type"===u)?this.type=t:(this._attributes[e]||(this._attributes[e]={}))[r]={value:t,prefix:n}},c.prototype.getAttributeNS=function(e,u){var t=this._attributes[e],n=t&&t[u]&&t[u].value;return"INPUT"===this.tagName&&"type"===u?this.type:"string"!=typeof n?null:n},c.prototype.removeAttributeNS=function(e,u){var t=this._attributes[e];t&&delete t[u]},c.prototype.hasAttributeNS=function(e,u){var t=this._attributes[e];return!!t&&u in t},c.prototype.setAttribute=function(e,u){return this.setAttributeNS(null,e,u)},c.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)},c.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)},c.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)},c.prototype.removeEventListener=r,c.prototype.addEventListener=n,c.prototype.dispatchEvent=s,c.prototype.focus=function(){},c.prototype.toString=function(){return a(this)},c.prototype.getElementsByClassName=function(e){var u=e.split(" "),n=[];return t(this,(function(e){if(1===e.nodeType){var t=(e.className||"").split(" ");u.every((function(p){return-1!==t.indexOf(p)}))&&n.push(e)}})),n},c.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var u=[];return t(this.childNodes,(function(t){1===t.nodeType&&("*"===e||t.tagName.toLowerCase()===e)&&u.push(t)})),u},c.prototype.contains=function(e){return t(this,(function(u){return e===u}))||!1}})),we=ce((function(i,e){fe();var t=Te();function s(e){if(!he(this,s))return new s;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}e.exports=s,s.prototype.type="DocumentFragment",s.prototype.nodeType=11,s.prototype.nodeName="#document-fragment",s.prototype.appendChild=t.prototype.appendChild,s.prototype.replaceChild=t.prototype.replaceChild,s.prototype.removeChild=t.prototype.removeChild,s.prototype.toString=function(){return this.childNodes.map((function(e){return String(e)})).join("")}})),Se=ce((function(i,e){function t(s){}e.exports=t,t.prototype.initEvent=function(s,e,t){this.type=s,this.bubbles=e,this.cancelable=t},t.prototype.preventDefault=function(){}})),Ae=ce((function(i,e){fe();var t=me(),s=ge(),n=ye(),r=Te(),a=we(),o=Se(),c=be(),l=Ee(),u=_e();function d(){if(!he(this,d))return new d;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}e.exports=d;var h=d.prototype;h.createTextNode=function(e){return new n(e,this)},h.createElementNS=function(e,t){var p=null===e?null:String(e);return new r(t,this,p)},h.createElement=function(e){return new r(e,this)},h.createDocumentFragment=function(){return new a(this)},h.createEvent=function(e){return new o(e)},h.createComment=function(e){return new s(e,this)},h.getElementById=function(e){return e=String(e),t(this.childNodes,(function(p){if(String(p.id)===e)return p}))||null},h.getElementsByClassName=r.prototype.getElementsByClassName,h.getElementsByTagName=r.prototype.getElementsByTagName,h.contains=r.prototype.contains,h.removeEventListener=u,h.addEventListener=l,h.dispatchEvent=c})),Ie=ce((function(i,e){var t=Ae();e.exports=new t})),Re=ce((function(i,t){var n,r=void 0!==e?e:"undefined"!=typeof window?window:{},s=Ie();"undefined"!=typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"])||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),t.exports=n}));function Oe(i,e){(null==e||e>i.length)&&(e=i.length);for(var t=0,s=new Array(e);t<e;t++)s[t]=i[t];return s}function Le(i,e){if(i){if("string"==typeof i)return Oe(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if("Object"===t&&i.constructor&&(t=i.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Oe(i,e)}}function De(i,e){return function(i){if(Array.isArray(i))return i}(i)||function(i,e){var t=null==i?null:"undefined"!=typeof Symbol&&i[Symbol.iterator]||i["@@iterator"];if(null!=t){var a,n,s=[],r=!0,o=!1;try{for(t=t.call(i);!(r=(a=t.next()).done)&&(s.push(a.value),!e||s.length!==e);r=!0);}catch(e){o=!0,n=e}finally{try{!r&&null!=t.return&&t.return()}finally{if(o)throw n}}return s}}(i,e)||Le(i,e)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var xe=le(de()),Ce=le(de()),Me=le(de()),Pe={now:function(){var i=Me.default.performance,e=i&&i.timing,t=e&&e.navigationStart,s="number"==typeof t&&"function"==typeof i.now?t+i.now():Date.now();return Math.round(s)}},Ne=function(){var i,e,t;if("function"==typeof(null===(i=Ce.default.crypto)||void 0===i?void 0:i.getRandomValues)){t=new Uint8Array(32),Ce.default.crypto.getRandomValues(t);for(var s=0;s<32;s++)t[s]=t[s]%16}else{t=[];for(var n=0;n<32;n++)t[n]=16*Math.random()|0}var r=0;e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n="x"===e?t[r]:3&t[r]|8;return r++,n.toString(16)}));var a=Pe.now(),o=null==a?void 0:a.toString(16).substring(3);return o?e.substring(0,28)+o:e},Ue=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},Fe=function(i){if(i&&void 0!==i.nodeName)return i.muxId||(i.muxId=Ue()),i.muxId;var e;try{e=document.querySelector(i)}catch(e){}return e&&!e.muxId&&(e.muxId=i),(null==e?void 0:e.muxId)||i},Be=function(i){var e;i&&void 0!==i.nodeName?i=Fe(e=i):e=document.querySelector(i);var t=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,i,t]};function je(i){return function(i){if(Array.isArray(i))return Oe(i)}(i)||function(i){if("undefined"!=typeof Symbol&&null!=i[Symbol.iterator]||null!=i["@@iterator"])return Array.from(i)}(i)||Le(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ve=0,He=1,We=2,qe=3,Ge=4,Ke=function(i){var e,s,t,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,o=i?[console,i]:[console],c=(e=console.trace).bind.apply(e,je(o)),l=(s=console.info).bind.apply(s,je(o)),u=(t=console.debug).bind.apply(t,je(o)),d=(n=console.warn).bind.apply(n,je(o)),h=(a=console.error).bind.apply(a,je(o)),f=r;return{trace:function(){for(var e=arguments.length,p=new Array(e),g=0;g<e;g++)p[g]=arguments[g];if(!(f>Ve))return c.apply(void 0,je(p))},debug:function(){for(var e=arguments.length,p=new Array(e),g=0;g<e;g++)p[g]=arguments[g];if(!(f>He))return u.apply(void 0,je(p))},info:function(){for(var e=arguments.length,p=new Array(e),g=0;g<e;g++)p[g]=arguments[g];if(!(f>We))return l.apply(void 0,je(p))},warn:function(){for(var e=arguments.length,p=new Array(e),g=0;g<e;g++)p[g]=arguments[g];if(!(f>qe))return d.apply(void 0,je(p))},error:function(){for(var e=arguments.length,p=new Array(e),g=0;g<e;g++)p[g]=arguments[g];if(!(f>Ge))return h.apply(void 0,je(p))},get level(){return f},set level(e){e!==this.level&&(f=null!=e?e:r)}}}("[mux]"),Ye=le(de());function $e(){return"1"===(Ye.default.doNotTrack||Ye.default.navigator&&Ye.default.navigator.doNotTrack)}function Qe(i){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function ze(i,e){if(!he(i,e))throw new TypeError("Cannot call a class as a function")}function Xe(i,e){for(var t=0;t<e.length;t++){var s=e[t];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(i,s.key,s)}}function Je(i,e,t){return e&&Xe(i.prototype,e),t&&Xe(i,t),i}function Ze(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function et(i){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}function tt(i,e,t){return(tt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(s,e,t){var a=function(i,e){for(;!Object.prototype.hasOwnProperty.call(i,e)&&null!==(i=et(i)););return i}(s,e);if(a){var n=Object.getOwnPropertyDescriptor(a,e);return n.get?n.get.call(t||s):n.value}})(i,e,t||i)}function nt(i,e){return(nt=Object.setPrototypeOf||function(e,s){return e.__proto__=s,e})(i,e)}function it(i,e){if(null==i)return{};var s,t,n=function(i,e){if(null==i)return{};var t,n,r={},s=Object.keys(i);for(n=0;n<s.length;n++)t=s[n],!(e.indexOf(t)>=0)&&(r[t]=i[t]);return r}(i,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(t=0;t<r.length;t++)s=r[t],!(e.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(i,s)&&(n[s]=i[s])}return n}function at(i,e){return!e||"object"!==pe(e)&&"function"!=typeof e?Qe(i):e}function ot(i){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var s,t=et(i);if(e){var n=et(this).constructor;s=Reflect.construct(t,arguments,n)}else s=t.apply(this,arguments);return at(this,s)}}fe(),ve();var st=function(i){return ut(i)[0]},ut=function(i){if("string"!=typeof i||""===i)return["localhost"];var e,s=(i.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return s&&(e=(s.match(/[^\.]+\.[^\.]+$/)||[])[0]),[s,e]},ct=le(de()),lt={exists:function(){var i=ct.default.performance;return void 0!==(i&&i.timing)},domContentLoadedEventEnd:function(){var i=ct.default.performance,e=i&&i.timing;return e&&e.domContentLoadedEventEnd},navigationStart:function(){var i=ct.default.performance,e=i&&i.timing;return e&&e.navigationStart}};function ht(i,e,t){t=void 0===t?1:t,i[e]=i[e]||0,i[e]+=t}function ft(i){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},s=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}
2)))),s.forEach((function(e){Ze(i,e,t[e])}))}return i}function pt(i,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):function(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),t.push.apply(t,s)}return t}(Object(e)).forEach((function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))})),i}var vt=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],mt=["x-cdn","content-type"].concat(vt);function gt(i){var e={};return(i=i||"").trim().split(/[\r\n]+/).forEach((function(s){if(s){var t=s.split(": "),n=t.shift();n&&(mt.indexOf(n.toLowerCase())>=0||0===n.toLowerCase().indexOf("x-litix-"))&&(e[n]=t.join(": "))}})),e}function yt(i){if(i){var e=vt.find((function(e){return void 0!==i[e]}));return e?i[e]:void 0}}var bt=function(i){var e={};for(var t in i){var s=i[t];if(-1!==s["DATA-ID"].search("io.litix.data."))e[s["DATA-ID"].replace("io.litix.data.","")]=s.VALUE}return e},Et=function(i){if(!i)return{};var e=lt.navigationStart(),t=i.loading,s=t?t.start:i.trequest,n=t?t.first:i.tfirst,r=t?t.end:i.tload;return{bytesLoaded:i.total,requestStart:Math.round(e+s),responseStart:Math.round(e+n),responseEnd:Math.round(e+r)}},_t=function(i){if(i&&"function"==typeof i.getAllResponseHeaders)return gt(i.getAllResponseHeaders())},kt=function(i,e){if(!i||!i.requestEndDate)return{};var u,t=st(i.url),s=i.url,n=i.bytesLoaded,r=new Date(i.requestStartDate).getTime(),a=new Date(i.firstByteDate).getTime(),o=new Date(i.requestEndDate).getTime(),c=isNaN(i.duration)?0:i.duration,l="function"==typeof e.getMetricsFor?e.getMetricsFor(i.mediaType).HttpList:e.getDashMetrics().getHttpRequests(i.mediaType);return l.length>0&&(u=gt(l[l.length-1]._responseHeaders||"")),{requestStart:r,requestResponseStart:a,requestResponseEnd:o,requestBytesLoaded:n,requestResponseHeaders:u,requestMediaDuration:c,requestHostname:t,requestUrl:s,requestId:u?yt(u):void 0}},Tt=function(i,e){var t=e.getQualityFor(i),s=e.getCurrentTrackFor(i).bitrateList;return s?{currentLevel:t,renditionWidth:s[t].width||null,renditionHeight:s[t].height||null,renditionBitrate:s[t].bandwidth}:{}},wt=function(i){var e;return null===(e=i.match(/.*codecs\*?="(.*)"/))||void 0===e?void 0:e[1]},St=function(i){try{var e,t;return null===(t=i.getVersion)||void 0===t||null===(e=t.call(i))||void 0===e?void 0:e.split(".").map((function(e){return parseInt(e)}))[0]}catch(e){return!1}},At=0,It=function(){function i(){ze(this,i),Ze(this,"_listeners",void 0)}return Je(i,[{key:"on",value:function(e,t,s){return t._eventEmitterGuid=t._eventEmitterGuid||++At,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],s&&(t=t.bind(s)),this._listeners[e].push(t),t}},{key:"off",value:function(e,t){var s=this._listeners&&this._listeners[e];s&&s.forEach((function(e,n){e._eventEmitterGuid===t._eventEmitterGuid&&s.splice(n,1)}))}},{key:"one",value:function(e,t,s){var n=this;t._eventEmitterGuid=t._eventEmitterGuid||++At;var r=function r(){n.off(e,r),t.apply(s||this,arguments)};r._eventEmitterGuid=t._eventEmitterGuid,this.on(e,r)}},{key:"emit",value:function(e,t){var s=this;if(this._listeners){t=t||{};var n=this._listeners["before"+e]||[],r=this._listeners["before*"]||[],a=this._listeners[e]||[],o=this._listeners["after"+e]||[],c=function(t,u){(t=t.slice()).forEach((function(t){t.call(s,{type:e},u)}))};c(n,t),c(r,t),c(a,t),c(o,t)}}}]),i}(),Rt=le(de()),Ot=function(){function i(e){var t=this;ze(this,i),Ze(this,"_playbackHeartbeatInterval",void 0),Ze(this,"_playheadShouldBeProgressing",void 0),Ze(this,"pm",void 0),this.pm=e,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,e.on("playing",(function(){t._playheadShouldBeProgressing=!0})),e.on("play",this._startPlaybackHeartbeatInterval.bind(this)),e.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),e.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),e.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("seeked",(function(){e.data.player_is_paused?t._stopPlaybackHeartbeatInterval():t._startPlaybackHeartbeatInterval()})),e.on("timeupdate",(function(){null!==t._playbackHeartbeatInterval&&e.emit("playbackheartbeat")})),e.on("devicesleep",(function(s,n){null!==t._playbackHeartbeatInterval&&(Rt.default.clearInterval(t._playbackHeartbeatInterval),e.emit("playbackheartbeatend",{viewer_time:n.viewer_time}),t._playbackHeartbeatInterval=null)}))}return Je(i,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;null===this._playbackHeartbeatInterval&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=
vendor: 6,665 bytes, line 2
2Rt.default.setInterval((function(){e.pm.emit("playbackheartbeat")}),this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(Rt.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),i}(),Lt=function i(e){var t=this;ze(this,i),Ze(this,"viewErrored",void 0),e.on("viewinit",(function(){t.viewErrored=!1})),e.on("error",(function(s,n){try{var r=e.errorTranslator({player_error_code:n.player_error_code,player_error_message:n.player_error_message,player_error_context:n.player_error_context,player_error_severity:n.player_error_severity,player_error_business_exception:n.player_error_business_exception});r&&(e.data.player_error_code=r.player_error_code||n.player_error_code,e.data.player_error_message=r.player_error_message||n.player_error_message,e.data.player_error_context=r.player_error_context||n.player_error_context,e.data.player_error_severity=r.player_error_severity||n.player_error_severity,e.data.player_error_business_exception=r.player_error_business_exception||n.player_error_business_exception,t.viewErrored=!0)}catch(n){e.mux.log.warn("Exception in error translator callback.",n),t.viewErrored=!0}})),e.on("aftererror",(function(){var s,t,n,a,r;null===(s=e.data)||void 0===s||delete s.player_error_code,null===(t=e.data)||void 0===t||delete t.player_error_message,null===(n=e.data)||void 0===n||delete n.player_error_context,null===(a=e.data)||void 0===a||delete a.player_error_severity,null===(r=e.data)||void 0===r||delete r.player_error_business_exception}))},Dt=function(){function i(e){ze(this,i),Ze(this,"_watchTimeTrackerLastCheckedTime",void 0),Ze(this,"pm",void 0),this.pm=e,this._watchTimeTrackerLastCheckedTime=null,e.on("playbackheartbeat",this._updateWatchTime.bind(this)),e.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return Je(i,[{key:"_updateWatchTime",value:function(e,t){var s=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=s),ht(this.pm.data,"view_watch_time",s-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=s}},{key:"_clearWatchTimeState",value:function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null}}]),i}(),xt=function(){function i(e){var t=this;ze(this,i),Ze(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),Ze(this,"_lastTime",void 0),Ze(this,"_isAdPlaying",void 0),Ze(this,"_callbackUpdatePlaybackTime",void 0),Ze(this,"pm",void 0),this.pm=e,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=Pe.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null,e.on("viewinit",(function(){t.pm.data.view_playing_time_ms_cumulative=0}));var s=this._startPlaybackTimeTracking.bind(this);e.on("playing",s),e.on("adplaying",s),e.on("seeked",s),e.on("rebufferend",s);var n=this._stopPlaybackTimeTracking.bind(this);e.on("playbackheartbeatend",n),e.on("seeking",n),e.on("rebufferstart",n),e.on("adplaying",(function(){t._isAdPlaying=!0})),e.on("adended",(function(){t._isAdPlaying=!1})),e.on("adpause",(function(){t._isAdPlaying=!1})),e.on("adbreakstart",(function(){t._isAdPlaying=!1})),e.on("adbreakend",(function(){t._isAdPlaying=!1})),e.on("adplay",(function(){t._isAdPlaying=!1})),e.on("viewinit",(function(){t._playbackTimeTrackerLastPlayheadPosition=-1,t._lastTime=Pe.now(),t._isAdPlaying=!1,t._callbackUpdatePlaybackTime=null}))}return Je(i,[{key:"_startPlaybackTimeTracking",value:function(){null===this._callbackUpdatePlaybackTime&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this._lastTime=Pe.now(),this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time||0,t=Pe.now(),s=t-this._lastTime,n=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?n=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(n=s),n>0&&n<=1e3&&ht(this.pm.data,"view_content_playback_time",n),null!==this._callbackUpdatePlaybackTime&&s>0&&s<=1e3&&(this._isAdPlaying&&ht(this.pm.data,"ad_playing_time_ms_cumulative",s),ht(this.pm.data,"view_playing_time_ms_cumulative",s)),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=t}}]),i}(),Ct=function(){function i(e){ze(this,i),Ze(this,"pm",void 0),this.pm=e;var t=this._updatePlayheadTime.bind(this);e.on("playbackheartbeat",t),e.on("playbackheartbeatend",t),e.on("timeupdate",t),e.on("destroy",(function(){e.off("timeupdate",t)}))}return Je(i,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=void 0===this.pm.data.view_max_playhead_position?this.pm.data.player_playhead_time:Math.max(this.pm.data.view_max_playhead_position,this.pm.data.player_playhead_time)}},{key:"_updatePlayheadTime",value:function(e,t){var s=this,n=function(){s.pm.currentFragmentPDT&&s.pm.currentFragmentStart&&(s.pm.data.player_program_time=s.pm.currentFragmentPDT+s.pm.data.player_playhead_time-s.pm.currentFragmentStart)};if(t&&t.player_playhead_time)this.pm.data.player_playhead_time=t.player_playhead_time,n(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var r=this.pm.getPlayheadTime();void 0!==r&&(this.pm.data.player_playhead_time=r,n(),this._updateMaxPlayheadPosition())}}}]),i}(),Mt=3e5,Pt=function i(e){if(ze(this,i),!e.disableRebufferTracking){var t,s=function(e,a){n(a),t=void 0},n=function(n){if(t){var a=n.viewer_time-t;ht(e.data,"view_rebuffer_duration",a),t=n.viewer_time,e.data.view_rebuffer_duration>Mt&&(e.emit("viewend"),e.send("viewend"),e.mux.log.warn("Ending view after rebuffering for longer than ".concat(Mt,"ms, future events will be ignored unless a programchange or videochange occurs.")))}e.data.view_watch_time>=0&&e.data.view_rebuffer_count>0&&(e.data.view_rebuffer_frequency=e.data.view_rebuffer_count/e.data.view_watch_time,e.data.view_rebuffer_percentage=e.data.view_rebuffer_duration/e.data.view_watch_time)};e.on("playbackheartbeat",(function(e,a){return n(a)})),e.on("rebufferstart",(function(n,a){t||(ht(e.data,"view_rebuffer_count",1),t=a.viewer_time,e.one("rebufferend",s))})),e.on("viewinit",(function(){t=void 0,e.off("rebufferend",s)}
2))}},Nt=function(){function i(e){var t=this;ze(this,i),Ze(this,"_lastCheckedTime",void 0),Ze(this,"_lastPlayheadTime",void 0),Ze(this,"_lastPlayheadTimeUpdatedTime",void 0),Ze(this,"_rebuffering",void 0),Ze(this,"pm",void 0),this.pm=e,!e.disableRebufferTracking&&!e.disablePlayheadRebufferTracking&&(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,e.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),e.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),e.on("seeking",(function(){t._cleanupRebufferTracker(null,{viewer_time:Pe.now()})})))}return Je(i,[{key:"_checkIfRebuffering",value:function(e,t){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing)this._cleanupRebufferTracker(e,t);else if(null!==this._lastCheckedTime)if(this._lastPlayheadTime===this.pm.data.player_playhead_time){var s=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.sustainedRebufferThreshold&&s>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=t.viewer_time}else this._cleanupRebufferTracker(e,t,!0);else this._prepareRebufferTrackerState(t.viewer_time)}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e}},{key:"_cleanupRebufferTracker",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:t.viewer_time});else{if(null===this._lastCheckedTime)return;var n=this.pm.data.player_playhead_time-this._lastPlayheadTime,r=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.minimumRebufferDuration&&n>0&&r-n>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+r-n}))}s?this._prepareRebufferTrackerState(t.viewer_time):this._clearRebufferTrackerState()}}]),i}(),Ut=function(){function i(e){var t=this;ze(this,i),Ze(this,"pm",void 0),this.pm=e,e.on("viewinit",(function(){var s=e.data,n=s.view_id;if(!s.view_program_changed){var r=function(a,r){var o=r.viewer_time;("playing"===a.type&&void 0===e.data.view_time_to_first_frame||"adplaying"===a.type&&(void 0===e.data.view_time_to_first_frame||t._inPrerollPosition()))&&t.calculateTimeToFirstFrame(o||Pe.now(),n)};e.one("playing",r),e.one("adplaying",r),e.one("viewend",(function(){e.off("playing",r),e.off("adplaying",r)}))}}))}return Je(i,[{key:"_inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,t){t===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.pm.pageLoadInitTime&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.pm.pageLoadInitTime))}}]),i}(),Ft=function i(e){var t=this;ze(this,i),Ze(this,"_lastPlayerHeight",void 0),Ze(this,"_lastPlayerWidth",void 0),Ze(this,"_lastPlayheadPosition",void 0),Ze(this,"_lastSourceHeight",void 0),Ze(this,"_lastSourceWidth",void 0),e.on("viewinit",(function(){t._lastPlayheadPosition=-1}));["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend","playbackmodechange"].forEach((function(n){e.on(n,(function(){if(t._lastPlayheadPosition>=0&&e.data.player_playhead_time>=0&&t._lastPlayerWidth>=0&&t._lastSourceWidth>0&&t._lastPlayerHeight>=0&&t._lastSourceHeight>0){var a=e.data.player_playhead_time-t._lastPlayheadPosition;if(a<0)return void(t._lastPlayheadPosition=-1);var n=Math.min(t._lastPlayerWidth/t._lastSourceWidth,t._lastPlayerHeight/t._lastSourceHeight),r=Math.max(0,n-1),o=Math.max(0,1-n);e.data.view_max_upscale_percentage=Math.max(e.data.view_max_upscale_percentage||0,r),e.data.view_max_downscale_percentage=Math.max(e.data.view_max_downscale_percentage||0,o),ht(e.data,"view_total_content_playback_time",a),ht(e.data,"view_total_upscaling",r*a),ht(e.data,"view_total_downscaling",o*a)}t._lastPlayheadPosition=-1}))})),["playing","hb","renditionchange","orientationchange","playbackmodechange"].forEach((function(n){e.on(n,(function(){t._lastPlayheadPosition=e.data.player_playhead_time,t._lastPlayerWidth=e.data.player_width,t._lastPlayerHeight=e.data.player_height,t._lastSourceWidth=e.data.video_source_width,t._lastSourceHeight=e.data.video_source_height}))}))},Bt=function i(e){var t=this;ze(this,i),Ze(this,"isSeeking",void 0),this.isSeeking=!1;var s=-1,n=function(){var n=Pe.now(),a=(e.data.viewer_time||n)-(s||n);ht(e.data,"view_seek_duration",a),e.data.view_max_seek_time=Math.max(e.data.view_max_seek_time||0,a),t.isSeeking=!1,s=-1};e.on("seeking",(function(r,a){Object.assign(e.data,a),t.isSeeking&&a.viewer_time-s<=2e3?s=a.viewer_time:(t.isSeeking&&n(),t.isSeeking=!0,s=a.viewer_time,ht(e.data,"view_seek_count",1),e.send("seeking"))})),e.on("seeked",(function(){n()})),e.on("viewend",(function(){t.isSeeking&&(n(),e.send("seeked")),t.isSeeking=!1,s=-1}))},jt=function(i,e){i.push(e),i.sort((function(e,s){return e.viewer_time-s.viewer_time}))},Vt=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],Ht=function(){function i(e){var t=this;ze(this,i),Ze(this,"_adHasPlayed",void 0),Ze(this,"_adRequests",void 0),Ze(this,"_adResponses",void 0),Ze(this,"_currentAdRequestNumber",void 0),Ze(this,"_currentAdResponseNumber",void 0),Ze(this,"_prerollPlayTime",void 0),Ze(this,"_wouldBeNewAdPlay",void 0),Ze(this,"isAdBreak",void 0),Ze(this,"pm",void 0),this.pm=e,e.on("viewinit",(function(){t.isAdBreak=!1,t._currentAdRequestNumber=0,t._
vendor: 4,155 bytes, line 2
2currentAdResponseNumber=0,t._adRequests=[],t._adResponses=[],t._adHasPlayed=!1,t._wouldBeNewAdPlay=!0,t._prerollPlayTime=void 0})),Vt.forEach((function(n){return e.on(n,t._updateAdData.bind(t))}));var s=function(){t.isAdBreak=!1};e.on("adbreakstart",(function(){t.isAdBreak=!0})),e.on("play",s),e.on("playing",s),e.on("viewend",s),e.on("adrequest",(function(n,r){r=Object.assign({ad_request_id:"generatedAdRequestId"+t._currentAdRequestNumber++},r),jt(t._adRequests,r),ht(e.data,"view_ad_request_count"),t.inPrerollPosition()&&(e.data.view_preroll_requested=!0,t._adHasPlayed||ht(e.data,"view_preroll_request_count"))})),e.on("adresponse",(function(n,r){r=Object.assign({ad_request_id:"generatedAdRequestId"+t._currentAdResponseNumber++},r),jt(t._adResponses,r);var a=t.findAdRequest(r.ad_request_id);a&&ht(e.data,"view_ad_request_time",Math.max(0,r.viewer_time-a.viewer_time))})),e.on("adplay",(function(n,r){t._adHasPlayed=!0,t._wouldBeNewAdPlay&&(t._wouldBeNewAdPlay=!1,ht(e.data,"view_ad_played_count")),t.inPrerollPosition()&&!e.data.view_preroll_played&&(e.data.view_preroll_played=!0,t._adRequests.length>0&&(e.data.view_preroll_request_time=Math.max(0,r.viewer_time-t._adRequests[0].viewer_time)),e.data.view_start&&(e.data.view_startup_preroll_request_time=Math.max(0,r.viewer_time-e.data.view_start)),t._prerollPlayTime=r.viewer_time)})),e.on("adplaying",(function(n,r){t.inPrerollPosition()&&void 0===e.data.view_preroll_load_time&&void 0!==t._prerollPlayTime&&(e.data.view_preroll_load_time=r.viewer_time-t._prerollPlayTime,e.data.view_startup_preroll_load_time=r.viewer_time-t._prerollPlayTime)})),e.on("adclicked",(function(n,r){t._wouldBeNewAdPlay||ht(e.data,"view_ad_clicked_count")})),e.on("adskipped",(function(n,r){t._wouldBeNewAdPlay||ht(e.data,"view_ad_skipped_count")})),e.on("adended",(function(){t._wouldBeNewAdPlay=!0})),e.on("aderror",(function(){t._wouldBeNewAdPlay=!0}))}return Je(i,[{key:"inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var t=0;t<this._adRequests.length;t++)if(this._adRequests[t].ad_request_id===e)return this._adRequests[t]}},{key:"_updateAdData",value:function(e,t){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&t.ad_tag_url){var s=De(ut(t.ad_tag_url),2),n=s[0],r=s[1];this.pm.data.view_preroll_ad_tag_domain=r,this.pm.data.view_preroll_ad_tag_hostname=n}if(!this.pm.data.view_preroll_ad_asset_hostname&&t.ad_asset_url){var a=De(ut(t.ad_asset_url),2),o=a[0],c=a[1];this.pm.data.view_preroll_ad_asset_domain=c,this.pm.data.view_preroll_ad_asset_hostname=o}this.pm.data.ad_type="preroll"}this.pm.data.ad_asset_url=null==t?void 0:t.ad_asset_url,this.pm.data.ad_tag_url=null==t?void 0:t.ad_tag_url,this.pm.data.ad_creative_id=null==t?void 0:t.ad_creative_id,this.pm.data.ad_id=null==t?void 0:t.ad_id,this.pm.data.ad_universal_id=null==t?void 0:t.ad_universal_id,null!=t&&t.ad_type&&(this.pm.data.ad_type=null==t?void 0:t.ad_type)}}]),i}(),Wt=function i(e){var t=this;ze(this,i),Ze(this,"lastWallClockTime",void 0);var s=function(){t.lastWallClockTime=Pe.now(),e.on("before*",n)},n=function(n){var a=Pe.now(),r=t.lastWallClockTime;t.lastWallClockTime=a,a-r>3e4&&(e.emit("devicesleep",{viewer_time:r}),Object.assign(e.data,{viewer_time:r}),e.send("devicesleep"),e.emit("devicewake",{viewer_time:a}),Object.assign(e.data,{viewer_time:a}),e.send("devicewake"))};e.one("playbackheartbeat",s),e.on("playbackheartbeatend",(function(){e.off("before*",n),e.one("playbackheartbeat",s)}))},qt=le(de()),Gt=function(){var i=function(){for(var e=0,s={};e<arguments.length;e++){var t=arguments[e];for(var n in t)s[n]=t[n]}return s};function e(t){function s(e,n,a){var r;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(a=i({path:"/"},s.defaults,a)).expires){var o=new Date;o.setMilliseconds(o.getMilliseconds()+864e5*a.expires),a.expires=o}try{r=JSON.stringify(n),/^[\{\[]/.test(r)&&(n=r)}catch(e){}return n=t.write?t.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decode
vendor: 4,414 bytes, line 2
2URIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",n,a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}e||(r={});for(var c=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,l=0;l<c.length;l++){var d=c[l].split("="),h=d.slice(1).join("=");'"'===h.charAt(0)&&(h=h.slice(1,-1));try{var f=d[0].replace(u,decodeURIComponent);if(h=t.read?t.read(h,f):t(h,f)||h.replace(u,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(e){}if(e===f){r=h;break}e||(r[f]=h)}catch(e){}}return r}}return s.set=s,s.get=function(e){return s.call(s,e)},s.getJSON=function(){return s.apply({json:!0},[].slice.call(arguments))},s.defaults={},s.remove=function(e,t){s(e,"",i(t,{expires:-1}))},s.withConverter=e,s}return e((function(){}))}(),Kt="muxData",Yt=function(){var i;try{i=function(i){return i.split("&").reduce((function(e,t){var s=De(t.split("="),2),n=s[0],r=s[1],a=+r,o=r&&a==r?a:r;return e[n]=o,e}),{})}(Gt.get(Kt)||"")}catch(e){i={}}return i},$t=function(i){try{Gt.set(Kt,function(i){return Object.entries(i).map((function(e){var t=De(e,2),s=t[0],n=t[1];return"".concat(s,"=").concat(n)})).join("&")}(i),{expires:365})}catch(e){}},Qt=function(){var i=Yt();return i.mux_viewer_id=i.mux_viewer_id||Ne(),i.msn=i.msn||Math.random(),$t(i),{mux_viewer_id:i.mux_viewer_id,mux_sample_number:i.msn}};function zt(i,e){var t=e.beaconCollectionDomain,s=e.beaconDomain;if(t)return"https://"+t;var n=s||"litix.io";return(i=i||"inferred").match(/^[a-z0-9]+$/)?"https://"+i+"."+n:"https://img.litix.io/a.gif"}var Xt=le(de()),Jt=function(){var i;switch(Zt()){case"cellular":i="cellular";break;case"ethernet":i="wired";break;case"wifi":i="wifi";break;case void 0:break;default:i="other"}return i},Zt=function(){var i=Xt.default.navigator,e=i&&(i.connection||i.mozConnection||i.webkitConnection);return e&&e.type};Jt.getConnectionFromAPI=Zt;var en=Jt,tn=rn({a:"env",b:"beacon",c:"custom",d:"ad",e:"event",f:"experiment",i:"internal",m:"mux",n:"response",p:"player",q:"request",r:"retry",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view",y:"sub"}),nn=rn({ad:"ad",af:"affiliate",ag:"aggregate",ap:"api",al:"application",ao:"audio",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",bn:"brand",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ci:"client",ck:"clicked",cl:"canceled",cm:"cmcd",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cv:"cumulative",cx:"connection",cz:"context",da:"data",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",dy:"dynamic",eb:"enabled",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mp:"mode",ms:"ms",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",or:"origin",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pp:"pip",pr:"preload",ps:"position",pt:"part",pv:"previous",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"});function rn(i){var e={};
2for(var t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function an(i){var e={},t={};return Object.keys(i).forEach((function(s){var n=!1;if(i.hasOwnProperty(s)&&void 0!==i[s]){var r=s.split("_"),a=r[0],o=tn[a];o||(Ke.info("Data key word `"+r[0]+"` not expected in "+s),o=a+"_"),r.splice(1).forEach((function(e){"url"===e&&(n=!0),nn[e]?o+=nn[e]:Number.isInteger(Number(e))?o+=e:(Ke.info("Data key word `"+e+"` not expected in "+s),o+="_"+e+"_")})),n?t[o]=i[s]:e[o]=i[s]}})),Object.assign(e,t)}var on=le(de()),sn=le(Re()),un={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},cn=["hb","requestcompleted","requestfailed","requestcanceled"],ln="https://img.litix.io",dn=function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._beaconUrl=i||ln,this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},un,e)};dn.prototype.queueEvent=function(i,e){var t=Object.assign({},e);return(this._eventQueue.length<=this._options.maxQueueLength||"eventrateexceeded"===i)&&(this._eventQueue.push(t),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength)},dn.prototype.flushEvents=function(){var i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];i&&1===this._eventQueue.length?this._eventQueue.pop():(this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending())},dn.prototype.destroy=function(){var i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,i?this._clearBeaconQueue():this.flushEvents(),on.default.clearTimeout(this._sendTimeout)},dn.prototype._clearBeaconQueue=function(){var i=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,e=this._eventQueue.slice(i);i>0&&Object.assign(e[e.length-1],an({mux_view_message:"event queue truncated"}));var t=this._createPayload(e);fn(this._beaconUrl,t,!0,(function(){}))},dn.prototype._sendBeaconQueue=function(){var i=this;if(this._postInFlight)this._resendAfterPost=!0;else{var e=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var t=this._createPayload(e),s=Pe.now();fn(this._beaconUrl,t,!1,(function(t,n){n?(i._eventQueue=e.concat(i._eventQueue),i._failureCount+=1,Ke.info("Error sending beacon: "+n)):i._failureCount=0,i._roundTripTime=Pe.now()-s,i._postInFlight=!1,i._resendAfterPost&&(i._resendAfterPost=!1,i._eventQueue.length>0&&i._sendBeaconQueue())}))}},dn.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var i=Math.pow(2,this._failureCount-1);return(1+(i*=Math.random()))*this._options.baseTimeBetweenBeacons},dn.prototype._startBeaconSending=function(){var i=this;on.default.clearTimeout(this._sendTimeout),!this.destroyed&&(this._sendTimeout=on.default.setTimeout((function(){i._eventQueue.length&&i._sendBeaconQueue(),i._startBeaconSending()}),this._getNextBeaconTime()))},dn.prototype._createPayload=function(i){var e=this,t={transmission_timestamp:Math.round(Pe.now())};this._roundTripTime&&(t.rtt_ms=Math.round(this._roundTripTime));var s,n,r,a=function(){s=JSON.stringify({metadata:t,events:n||i}),r=s.length/1024},o=function(){return r<=e._options.maxPayloadKBSize};return a(),o()||(Ke.info("Payload size is too big ("+r+" kb). Removing unnecessary events."),n=i.filter((function(e){return-1===cn.indexOf(e.e)})),a()),o()||(Ke.info("Payload size still too big ("+r+" kb). Cropping fields.."),n.forEach((function(e){for(var t in e){var u=e[t];"string"==typeof u&&u.length>51200&&(e[t]=u.substring(0,51200))}})),a()),s};var hn="function"==typeof sn.default.exitPictureInPicture?function(i){return i.length<=57344}:function(i){return!1},fn=function(i,e,t,s){if(t&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(i,e))s();else if(on.default.fetch)on.default.fetch(i,{method:"POST",body:e,headers:{"Content-Type":"text/plain"},keepalive:hn(e)}).then((function(e){return s(null,e.ok?null:"Error")})).catch((function(e){return s(null,e)}));else{if(on.default.XMLHttpRequest){var n=new on.default.XMLHttpRequest;return n.onreadystatechange=function(){if(4===n.readyState)return s(null,200!==n.status?"error":void 0)},n.open("POST",i),n.setRequestHeader("Content-Type","text/plain"),void n.send(e)}s()}},pn=dn,vn=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception","view_playing_time_ms_cumulative","ad_playing_time_ms_cumulative"],mn=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],gn=["ad_id","ad_creative_id","ad_universal_id"],yn=["viewstart","error","ended","viewend"],bn=function(){function i(e,t){var n,r,a,o,c,l,u,d,h,f,v,p,g,m,y,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ze(this,i),Ze(this,"mux",void 0),Ze(this,"envKey",void 0),Ze(this,"options",void 0),Ze(this,"eventQueue",void 0),Ze(this,"sampleRate",void 0),Ze(this,"disableCookies",void 0),Ze(this,"respectDoNotTrack",void 0),Ze(this,"previousBeaconData",void 0),Ze(this,"lastEventTime",void 0),Ze(this,"rateLimited",void 0),Ze(this,"pageLevelData",void 0),Ze(this,"viewerData",void 0),this.mux=e,this.envKey=t,this.options=s,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new pn(zt(this.envKey,this.options)),this.sampleRate=null!==(g=this.options.sampleRate)&&void 0!==g?g:1,this.disableCookies=null!==(m=this.options.disableCookies)&&void 0!==m&&m,this.respectDoNotTrack=null!==(y=this.options.respectDoNotTrack)&&void 0!==y&&y,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:null===(n=this.options.platform)||void 0===n?void 0:n.name,viewer_application_version:null===(r=this.options.platform)||void 0===r?void 0:r.version,viewer_application_engine:null===(a=this.options.platform)||void 0===a?void 0:a.layout,viewer_device_name:null===(o=this.options.platform)||void 0===o?void 0:o.product,viewer_device_category:"",viewer_device_manufacturer:null===(c=this.options.platform)||void 0===c?void 0:c.manufacturer,viewer_os_family:null===(u=this.options.platform)||void 0===u||null===(l=u.os)||void 0===l?void 0:l.family,viewer_os_architecture:null===(h=this.options.platform)||void 0===h||null===(d=h.os)||void 0===d?void 0:d.architecture,viewer_os_version:null===(v=this.options.platform)||void 0===v||null===(f=v.os)||void 0===f?void 0:f.version,viewer_connection_type:en(),page_url:null===qt.default||void 0===qt.default||null===(p=qt.default.location)||void 0===p?void 0:p.href},this.viewerData=this.disableCookies?{}:Qt()}return Je(i,[{key:"send",value:function(e,t){if(e&&null!=t&&t.view_id){if(this.respectDoNotTrack&&$e())return Ke.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=R(t))return Ke.error("A data object was expected in send() but was not provided");var s=this.disableCookies?{}:function(){var i=Yt(),e=Pe.now();return i.session_start&&(i.sst=i.session_start,delete i.session_start),i.session_id&&(i.sid=i.session_id,delete i.session_id),i.session_expires&&(i.sex=i.session_expires,delete i.session_expires),(!i.sex||i.sex<e)&&(i.sid=Ne(),i.sst=e),i.sex=e+15e5,$t(i),{session_id:i.sid,session_start:i.sst,session_expires:i.sex}}(),n=pt(ft({},this.pageLevelData,t,s,this.viewerData),{event:e,env_key:this.envKey});
vendor: 9,402 bytes, line 2
2n.user_id&&(n.viewer_user_id=n.user_id,delete n.user_id);var r,a=(null!==(r=n.mux_sample_number)&&void 0!==r?r:0)>=this.sampleRate,o=an(this._deduplicateBeaconData(e,n));if(this.lastEventTime=this.mux.utils.now(),a)return Ke.info("Not sending event due to sample rate restriction",e,n,o);if(this.envKey||Ke.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,n,o),!this.rateLimited)if(Ke.info("Sending event",e,n,o),this.rateLimited=!this.eventQueue.queueEvent(e,o),this.mux.WINDOW_UNLOADING&&"viewend"===e)this.eventQueue.destroy(!0);else{if(this.mux.WINDOW_HIDDEN&&"hb"===e)this.eventQueue.flushEvents(!0);else if(yn.indexOf(e)>=0){if("error"===e&&"warning"===t.player_error_severity)return;this.eventQueue.flushEvents()}if(this.rateLimited)return n.event="eventrateexceeded",o=an(n),this.eventQueue.queueEvent(n.event,o),Ke.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,t){var s=this,n={},r=t.view_id;if("-1"===r||"viewstart"===e||"viewend"===e||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=6e5)n=ft({},t),r&&(this.previousBeaconData=n),r&&"viewend"===e&&(this.previousBeaconData=null);else{var a=0===e.indexOf("request");Object.entries(t).forEach((function(t){var r=De(t,2),o=r[0],u=r[1];s.previousBeaconData&&(u!==s.previousBeaconData[o]||vn.indexOf(o)>-1||s.objectHasChanged(a,o,u,s.previousBeaconData[o])||s.eventRequiresKey(e,o))&&(n[o]=u,s.previousBeaconData[o]=u)}))}return n}},{key:"objectHasChanged",value:function(e,t,s,n){return!(!e||0!==t.indexOf("request_"))&&("request_response_headers"===t||"object"!=R(s)||"object"!=R(n)||Object.keys(s||{}).length!==Object.keys(n||{}).length)}},{key:"eventRequiresKey",value:function(e,t){return!!("renditionchange"===e&&0===t.indexOf("video_source_")||gn.includes(t)&&mn.includes(e))}}]),i}(),En=function i(e){ze(this,i);var t=0,s=0,n=0,r=0,a=0,o=0,c=0;e.on("requestcompleted",(function(o,c){var l,d,h=c.request_start,p=c.request_response_start,g=c.request_response_end,f=c.request_bytes_loaded;if(r++,p?(l=p-(null!=h?h:0),d=(null!=g?g:0)-p):d=(null!=g?g:0)-(null!=h?h:0),d>0&&f&&f>0){var b=f/d*8e3;a++,s+=f,n+=d,e.data.view_min_request_throughput=Math.min(e.data.view_min_request_throughput||1/0,b),e.data.view_average_request_throughput=s/n*8e3,e.data.view_request_count=r,l>0&&(t+=l,e.data.view_max_request_latency=Math.max(e.data.view_max_request_latency||0,l),e.data.view_average_request_latency=t/a)}})),e.on("requestfailed",(function(t,n){r++,o++,e.data.view_request_count=r,e.data.view_request_failed_count=o})),e.on("requestcanceled",(function(t,n){r++,c++,e.data.view_request_count=r,e.data.view_request_canceled_count=c}))},_n=function i(e){var t=this;ze(this,i),Ze(this,"_lastEventTime",void 0),e.on("before*",(function(s,n){var r=n.viewer_time,a=Pe.now(),o=t._lastEventTime;if(t._lastEventTime=a,o&&a-o>36e5){var c=Object.keys(e.data).reduce((function(u,t){return 0===t.indexOf("video_")?Object.assign(u,Ze({},t,e.data[t])):u}),{});e.mux.log.info("Received event after at least an hour inactivity, creating a new view");var l=e.playbackHeartbeat._playheadShouldBeProgressing;e._resetView(Object.assign({viewer_time:r},c)),e.playbackHeartbeat._playheadShouldBeProgressing=l,e.playbackHeartbeat._playheadShouldBeProgressing&&"play"!==s.type&&"adbreakstart"!==s.type&&(e.emit("play",{viewer_time:r}),"playing"!==s.type&&e.emit("playing",{viewer_time:r}))}}))};function kn(i,e){return(null==i?void 0:i.toLowerCase())===(null==e?void 0:e.toLowerCase())}var Tn=function i(e){ze(this,i);var t=function(t){var n=function(i){var e;return null!=i&&i.request_type&&("media"===i.request_type||"video"===i.request_type)&&null!==(e=i.request_response_headers)&&void 0!==e&&e["x-cdn"]?i.request_response_headers["x-cdn"]:null!=i&&i.video_cdn?i.video_cdn:null}(t),o=function(i){return null!=i&&i.request_start?i.request_start:null!=i&&i.viewer_time?i.viewer_time:Date.now()}(t);if(null!=n&&!kn(n,r)&&a<=o){r=n,a=o;var u={video_cdn:n};e.emit("cdnchange",u)}},s=null,n=null,r=null,a=0;e.on("viewinit",(function(){s=null,n=null,r=null,a=0})),e.on("beforecdnchange",(function(e,t){var r=null==t?void 0:t.video_cdn;r&&(void 0===t.video_previous_cdn||null===t.video_previous_cdn)&&(kn(r,n)?t.video_previous_cdn=null!=s?s:void 0:(t.video_previous_cdn=null!=n?n:void 0,s=n,n=r))})),e.on("requestcompleted",(function(e,n){t(n)}))},wn=function i(e){var t=this;ze(this,i),Ze(this,"_emittingAutomaticEvent",!1),Ze(this,"_hasInitialized",!1),Ze(this,"_currentMode","standard"),e.on("viewstart",(function(){t._hasInitialized||(t._hasInitialized=!0,t._currentMode=e.data.player_playback_mode||"standard",t._emittingAutomaticEvent=!0,e.emit("playbackmodechange",{player_playback_mode:t._currentMode,player_playback_mode_data:"{}"}),t._emittingAutomaticEvent=!1)})),e.on("viewend",(function(){t._hasInitialized=!1})),e.on("playbackmodechange",(function(s,n){t._emittingAutomaticEvent||(n.player_playback_mode_data?function(i){try{return JSON.parse(i),!0}catch(e){return!1}}(n.player_playback_mode_data)||(e.mux.log.warn("Invalid JSON string for player_playback_mode_data"),n.player_playback_mode_data="{}"):n.player_playback_mode_data="{}",e.data.player_playback_mode_data=n.player_playback_mode_data,e.data.player_playback_mode=n.player_playback_mode,t._currentMode=n.player_playback_mode)}))},Sn=function(){function i(e){ze(this,i),Ze(this,"pm",void 0),Ze(this,"_currentRangeStart",void 0),Ze(this,"_lastPlayheadTime",void 0),this.pm=e,this._currentRangeStart=null,this._lastPlayheadTime=null,e.on("playbackheartbeat",this._updatePlaybackRange.bind(this)),e.on("playbackheartbeatend",this._endPlaybackRange.bind(this))}return Je(i,[{key:"_updateLastRangeEnd",value:function(){var e=this.pm.data.video_playback_ranges;if(e&&e.length>0){var t=this.pm.data.player_playhead_time||0;e[e.length-1][1]=t}}},{key:"_updatePlaybackRange",value:function(){var e,t=this.pm.data.player_playhead_time||0;if(!(!this.pm.disableAdPlaybackRangeFiltering&&null!==(e=this.pm.adTracker)&&void 0!==e&&e.isAdBreak&&null!==this._lastPlayheadTime&&t<this._lastPlayheadTime)){if(null!==this._lastPlayheadTime&&null!==this._currentRangeStart)if(Math.abs(t-this._lastPlayheadTime)>1e3){var n=this.pm.data.video_playback_ranges;n&&n.length>0&&(n[n.length-1][1]=this._lastPlayheadTime),this._currentRangeStart=null}if(null===this._currentRangeStart){var r=this.pm.data.video_playback_ranges||[];r.length>0&&r[r.length-1][1]===t?this._currentRangeStart=r[r.length-1][0]:(this._currentRangeStart=t,r.push([t,t])),this.pm.data.video_playback_ranges=r}else this._updateLastRangeEnd();this._lastPlayheadTime=t}}},{key:"_endPlaybackRange",value:function(){null!==this._currentRangeStart&&(this._updateLastRangeEnd(),this._currentRangeStart=null,this._lastPlayheadTime=null)}}]),i}(),An=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange","cdnchange","playbackmodechange"],In=new Set(["requestcompleted","requestfailed","requestcanceled"]),Rn=function(i){!function(i,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),e&&nt(i,e)}(t,i);var e=ot(t);function t(s,n,r){var a;ze(this,t),Ze(Qe(a=e.call(this)),"pageLoadEndTime",void 0),Ze(Qe(a),"pageLoadInitTime",void 0),Ze(Qe(a),"_destroyed",void 0),Ze(Qe(a),"_heartBeatTimeout",void 0),Ze(Qe(a),"adTracker",void 0),Ze(Qe(a),"dashjs",void 0),Ze(Qe(a),"data",void 0),Ze(Qe(a),"disablePlayheadRebufferTracking",void 0),Ze(Qe(a),"disableRebufferTracking",void 0),Ze(Qe(a),"disableAdPlaybackRangeFiltering",void 0),Ze(Qe(a),"errorTracker",void 0),Ze(Qe(a),"errorTranslator",void 0),Ze(Qe(a),"emitTranslator",void 0),Ze(Qe(a),"getAdData",void 0),Ze(Qe(a),"getPlayheadTime",void 0),Ze(Qe(a),"getStateData",void 0),Ze(Qe(a),"stateDataTranslator",void 0),Ze(Qe(a),"hlsjs",void 0),Ze(Qe(a),"id",void 0),Ze(Qe(a),"longResumeTracker",void 0),Ze(Qe(a),"minimumRebufferDuration",void 0),Ze(Qe(a),"mux",void 0),Ze(Qe(a),"playbackEventDispatcher",void 0),Ze(Qe(a),"playbackHeartbeat",void 0),Ze(Qe(a),"playbackHeartbeatTime",void 0),Ze(Qe(a),"playheadTime",void 0),Ze(Qe(a),"seekingTracker",void 0),Ze(Qe(a),"sustainedRebufferThreshold",void 0),Ze(Qe(a),"watchTimeTracker",void 0),Ze(Qe(a),"currentFragmentPDT",void 0),Ze(Qe(a),"currentFragmentStart",void 0),a.pageLoadInitTime=lt.navigationStart(),a.pageLoadEndTime=lt.domContentLoadedEventEnd();var o={debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,disableAdPlaybackRangeFiltering:!1,errorTranslator:function(e){return e},emitTranslator:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t},stateDataTranslator:function(e){return e}};a.mux=s,a.id=n,null!=r&&r.beaconDomain&&a.mux.log.warn("The `beaconDomain` setting has been deprecated 
2in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),(r=Object.assign(o,r)).data=r.data||{},r.data.property_key&&(r.data.env_key=r.data.property_key,delete r.data.property_key),Ke.level=r.debug?He:qe,a.getPlayheadTime=r.getPlayheadTime,a.getStateData=r.getStateData||function(){return{}},a.getAdData=r.getAdData||function(){},a.minimumRebufferDuration=r.minimumRebufferDuration,a.sustainedRebufferThreshold=r.sustainedRebufferThreshold,a.playbackHeartbeatTime=r.playbackHeartbeatTime,a.disableRebufferTracking=r.disableRebufferTracking,a.disableRebufferTracking&&a.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."),a.disablePlayheadRebufferTracking=r.disablePlayheadRebufferTracking,a.disableAdPlaybackRangeFiltering=r.disableAdPlaybackRangeFiltering,a.errorTranslator=r.errorTranslator,a.emitTranslator=r.emitTranslator,a.stateDataTranslator=r.stateDataTranslator,a.playbackEventDispatcher=new bn(s,r.data.env_key,r),a.data={player_instance_id:Ne(),mux_sample_rate:r.sampleRate,beacon_domain:r.beaconCollectionDomain||r.beaconDomain},a.data.view_sequence_number=1,a.data.player_sequence_number=1;var c=function(){void 0===this.data.view_start&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"),this.emit("renditionchange"))}.bind(Qe(a));if(a.on("viewinit",(function(e,t){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,t),this._initializeViewData(),this.one("play",c),this.one("adbreakstart",c)})),a.on("videochange",(function(e,t){this._resetView(t)})),a.on("programchange",(function(e,t){this.data.player_is_paused&&this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."),this._resetView(Object.assign(t,{view_program_changed:!0})),c(),this.emit("play"),this.emit("playing")})),a.on("fragmentchange",(function(e,t){this.currentFragmentPDT=t.currentFragmentPDT,this.currentFragmentStart=t.currentFragmentStart})),a.on("destroy",a.destroy),"undefined"!=typeof window&&"function"==typeof window.addEventListener&&"function"==typeof window.removeEventListener){var l=function(){var e=void 0!==a.data.view_start;a.mux.WINDOW_HIDDEN="hidden"===document.visibilityState,e&&a.mux.WINDOW_HIDDEN&&(a.data.player_is_paused||a.emit("hb"))};window.addEventListener("visibilitychange",l,!1);var u=function(e){e.persisted||a.destroy()};window.addEventListener("pagehide",u,!1),a.on("destroy",(function(){window.removeEventListener("visibilitychange",l),window.removeEventListener("pagehide",u)}))}a.on("playerready",(function(e,t){Object.assign(this.data,t)})),An.forEach((function(e){a.on(e,(function(t,n){0!==e.indexOf("ad")&&this._updateStateData(),Object.assign(this.data,n),this._sanitizeData()})),a.on("after"+e,(function(){("error"!==e||this.errorTracker.viewErrored)&&this.send(e)}))})),a.on("viewend",(function(e,t){Object.assign(a.data,t)}));return a.one("playerready",(function(e){var t=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=t-this.data.player_init_time),this.pageLoadInitTime=this.data.page_load_init_time||this.pageLoadInitTime,this.pageLoadEndTime=this.data.page_load_end_time||this.pageLoadEndTime,!this.mux.PLAYER_TRACKED&&this.pageLoadInitTime&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.pageLoadEndTime)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.pageLoadEndTime||1/0)-this.pageLoadInitTime)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time})),a.longResumeTracker=new _n(Qe(a)),a.errorTracker=new Lt(Qe(a)),new Wt(Qe(a)),a.seekingTracker=new Bt(Qe(a)),a.playheadTime=new Ct(Qe(a)),a.playbackHeartbeat=new Ot(Qe(a)),new Ft(Qe(a)),a.watchTimeTracker=new Dt(Qe(a)),new xt(Qe(a)),new Sn(Qe(a)),a.adTracker=new Ht(Qe(a)),new Nt(Qe(a)),new Pt(Qe(a)),new Ut(Qe(a)),new En(Qe(a)),new Tn(Qe(a)),new wn(Qe(a)),r.hlsjs&&a.addHLSJS(r),r.dashjs&&a.addD
vendor: 9,272 bytes, line 2
2ashJS(r),a.emit("viewinit",r.data),a}return Je(t,[{key:"emit",value:function(s,e){var n,a=Object.assign({viewer_time:this.mux.utils.now()},e),r=[s,a];if(this.emitTranslator)try{r=this.emitTranslator(s,a)}catch(e){this.mux.log.warn("Exception in emit translator callback.",e)}null!=r&&r.length&&(n=tt(et(t.prototype),"emit",this)).call.apply(n,[this].concat(je(r)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,void 0!==this.data.view_start&&(this.emit("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(s){if(this.data.view_id){var e=Object.assign({},this.data);if(void 0===e.video_source_is_live&&(e.player_source_duration===1/0||e.video_source_duration===1/0?e.video_source_is_live=!0:(e.player_source_duration>0||e.video_source_duration>0)&&(e.video_source_is_live=!1)),e.video_source_is_live||["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"].forEach((function(t){e[t]=void 0})),e.video_source_url=e.video_source_url||e.player_source_url,e.video_source_url){var a=De(ut(e.video_source_url),2),t=a[0],n=a[1];e.video_source_domain=n,e.video_source_hostname=t}delete e.ad_request_id,e.video_playback_ranges&&(e.video_playback_range=JSON.stringify(e.video_playback_ranges.filter((function(e){return e[0]!==e[1]})).map((function(e){return"".concat(e[0],":").concat(e[1])}))),delete e.video_playback_ranges),this.playbackEventDispatcher.send(s,e),this.data.view_sequence_number++,this.data.player_sequence_number++,In.has(s)||this._restartHeartBeat(),"viewend"===s&&delete this.data.view_id}}},{key:"_resetView",value:function(s){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",s)}},{key:"_updateStateData",value:function(){var s,e=this.getStateData();if("function"==typeof this.stateDataTranslator)try{e=this.stateDataTranslator(e)}catch(e){this.mux.log.warn("Exception in stateDataTranslator translator callback.",e)}if(null!==(s=this.data)&&void 0!==s&&s.video_cdn&&null!=e&&e.video_cdn){e.video_cdn;e=it(e,["video_cdn"])}Object.assign(this.data,e),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var s=this;["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"].forEach((function(a){var e=parseInt(s.data[a],10);s.data[a]=isNaN(e)?void 0:e}));["player_source_url","video_source_url"].forEach((function(a){if(s.data[a]){var e=s.data[a].toLowerCase();(0===e.indexOf("data:")||0===e.indexOf("blob:"))&&(s.data[a]="MSE style URL")}}))}},{key:"_resetVideoData",value:function(){var s=this;Object.keys(this.data).forEach((function(e){0===e.indexOf("video_")&&delete s.data[e]}))}},{key:"_resetViewData",value:function(){var s=this;Object.keys(this.data).forEach((function(e){0===e.indexOf("view_")&&delete s.data[e]})),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var s=this,e=this.data.view_id=Ne(),t=function(){e===s.data.view_id&&ht(s.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",t):t()}},{key:"_restartHeartBeat",value:function(){var s=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout((function(){s.data.player_is_paused||s.emit("hb")}),1e4)}},{key:"addHLSJS",value:function(s){s.hlsjs?this.hlsjs?this.mux.log.warn("An instance of HLS.js is already being monitored for this player."):(this.hlsjs=s.hlsjs,function(i,e,t){var n=arguments.length>4?arguments[4]:void 0,r=i.log,a=i.utils.secondsToMs,o=function(e){var t,r=parseInt(n.version);return 1===r&&null!==e.programDateTime&&(t=e.programDateTime),0===r&&null!==e.pdt&&(t=e.pdt),t};if(lt.exists()){var c=function(t,n){return i.emit(e,t,n)},l=function(e,t){var n=t.levels,b=t.audioTracks,r=t.url,o=t.stats,l=t.networkDetails,d=t.sessionData,h={},f={};n.forEach((function(e,t){h[t]={width:e.width,height:e.height,bitrate:e.bitrate,attrs:e.attrs}})),b.forEach((function(e,t){f[t]={name:e.name,language:e.lang,bitrate:e.bitrate}}));var v=Et(o),m=v.bytesLoaded,y=v.requestStart,E=v.responseStart,_=v.responseEnd;c("requestcompleted",pt(ft({},bt(d)),{request_event_type:e,request_bytes_loaded:m,request_start:y,request_response_start:E,request_response_end:_,request_type:"manifest",request_hostname:st(r),request_response_headers:_t(l),request_rendition_lists:{media:h,audio:f,video:{}}}))};t.on(n.Events.MANIFEST_LOADED,l);var u=function(e,t){var n=t.details,b=t.level,r=t.networkDetails,l=t.stats,d=Et(l),h=d.bytesLoaded,f=d.requestStart,v=d.responseStart,m=d.responseEnd,y=n.fragments[n.fragments.length-1],E=o(y)+a(y.duration);c("requestcompleted",{request_event_type:e,request_bytes_loaded:h,request_start:f,request_response_start:v,request_response_end:m,request_current_level:b,request_type:"manifest",request_hostname:st(n.url),request_response_headers:_t(r),video_holdback:n.holdBack&&a(n.holdBack),video_part_holdback:n.partHoldBack&&a(n.partHoldBack),video_part_target_duration:n.partTarget&&a(n.partTarget),video_target_duration:n.targetduration&&a(n.targetduration),video_source_is_live:n.live,player_manifest_newest_program_time:isNaN(E)?void 0:E})};t.on(n.Events.LEVEL_LOADED,u);var d=function(e,t){var n=t.details,b=t.networkDetails,r=t.stats,o=Et(r),l=o.bytesLoaded,d=o.requestStart,h=o.responseStart,f=o.responseEnd;c("requestcompleted",{request_event_type:e,request_bytes_loaded:l,request_start:d,request_response_start:h,request_response_end:f,request_type:"manifest",request_hostname:st(n.url),request_response_headers:_t(b)})};t.on(n.Events.AUDIO_TRACK_LOADED,d);var h=function(e,n){var r=n.stats,b=n.networkDetails,o=n.frag;r=r||o.stats;var l=Et(r),d=l.bytesLoaded,h=l.requestStart,f=l.responseStart,v=l.responseEnd,m=b?_t(b):void 0,y={request_event_type:e,request_bytes_loaded:d,request_start:h,request_response_start:f,request_response_end:v,request_hostname:b?st(b.responseURL):void 0,request_id:m?yt(m):void 0,request_response_headers:m,request_media_duration:o.duration,request_url:null==b?void 0:b.responseURL};"main"===o.type?(y.request_type="media",y.request_current_level=o.level,y.request_video_width=(t.levels[o.level]||{}).width,y.request_video_height=(t.levels[o.level]||{}).height,y.request_labeled_bitrate=(t.levels[o.level]||{}).bitrate):y.request_type=o.type,c("requestcompleted",y)};t.on(n.Events.FRAG_LOADED,h);var f=function(e,t){var n=t.frag,b=n.start,r={currentFragmentPDT:o(n),currentFragmentStart:a(b)};c("fragmentchange",r)};t.on(n.Events.FRAG_CHANGED,f);var v=function(e,t){var r=t.type,b=t.details,o=t.response,l=t.fatal,d=t.frag,h=t.networkDetails,f=(null==d?void 0:d.url)||t.url||"",v=h?_t(h):void 0;if((b===n.ErrorDetails.MANIFEST_LOAD_ERROR||b===n.ErrorDetails.MANIFEST_LOAD_TIMEOUT||b===n.ErrorDetails.FRAG_LOAD_ERROR||b===n.ErrorDetails.FRAG_LOAD_TIMEOUT||b===n.ErrorDetails.LEVEL_LOAD_ERROR||b===n.ErrorDetails.LEVEL_LOAD_TIMEOUT||b===n.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||b===n.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||b===n.ErrorDetails.SUBTITLE_LOAD_ERROR||b===n.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||b===n.ErrorDetails.KEY_LOAD_ERROR||b===n.ErrorDetails.KEY_LOAD_TIMEOUT)&&c("requestfailed",{request_error:b,request_url:f,request_hostname:st(f),request_id:v?yt(v):void 0,request_type:b===n.ErrorDetails.FRAG_LOAD_ERROR||b===n.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":b===n.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||b===n.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":b===n.ErrorDetails.SUBTITLE_LOAD_ERROR||b===n.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":b===n.ErrorDetails.KEY_LOAD_ERROR||b===n.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:null==o?void 0:o.code,request_error_text:null==o?void 0:o.text}),l){var m,y="".concat(f?"url: ".concat(f,"\n"):"")+"".concat(o&&(o.code||o.text)?"response: ".concat(o.code,", ").concat(o.text,"\n"):"")+"".concat(t.reason?"failure reason: ".concat(t.reason,"\n"):"")+"".concat(t.level?"level: ".concat(t.level,"\n"):"")+"".concat(t.parent?"parent stream controller: ".concat(t.parent,"\n"):"")+"".concat(t.buffer?"buffer length: ".concat(t.buffer,"\n"):"")+"".concat(t.error?"error: ".concat(t.error,"\n"):"")+"".concat(t.event?"event: ".concat(t.event,"\n"):"")+"".concat(t.err?"error message: ".concat(null===(m=t.err)||void 0===m?void 0:m.message,"\n"):"");c("error",{player_error_code:r,player_error_message:b,player_error_context:y})}};t.on(n.Events.ERROR,v);var p=function(e,t){var n=t.frag,b=n&&n._url||"";c("requestcanceled",{request_event_type:e,request_url:b,request_type:"media",request_hostname:st(b)})};t.on(n.Events.FRAG_LOAD_EMERGENCY_ABORTED,p);var g=function(e,n){var o=n.level,b=t.levels[o];if(b&&b.attrs&&b.attrs.BANDWIDTH){var l,d=b.attrs.BANDWIDTH,h=parseFloat(b.attrs["FRAME-RATE"]);isNaN(h)||(l=h),d?c("renditionchange",{video_source_fps:l,video_source_bitrate:d,video_source_width:b.
2width,video_source_height:b.height,video_source_rendition_name:b.name,video_source_codec:null==b?void 0:b.videoCodec}):r.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};t.on(n.Events.LEVEL_SWITCHED,g),t._stopMuxMonitor=function(){t.off(n.Events.MANIFEST_LOADED,l),t.off(n.Events.LEVEL_LOADED,u),t.off(n.Events.AUDIO_TRACK_LOADED,d),t.off(n.Events.FRAG_LOADED,h),t.off(n.Events.FRAG_CHANGED,f),t.off(n.Events.ERROR,v),t.off(n.Events.FRAG_LOAD_EMERGENCY_ABORTED,p),t.off(n.Events.LEVEL_SWITCHED,g),t.off(n.Events.DESTROYING,t._stopMuxMonitor),delete t._stopMuxMonitor},t.on(n.Events.DESTROYING,t._stopMuxMonitor)}else r.warn("performance timing not supported. Not tracking HLS.js.")}(this.mux,this.id,s.hlsjs,{},s.Hls||window.Hls)):this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.")}},{key:"removeHLSJS",value:function(){this.hlsjs&&(function(i){i&&"function"==typeof i._stopMuxMonitor&&i._stopMuxMonitor()}(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(s){s.dashjs?this.dashjs?this.mux.log.warn("An instance of Dash.js is already being monitored for this player."):(this.dashjs=s.dashjs,function(i,e,t){var n=i.log;if(t&&t.on){var r=St(t),a=function(t,b){return i.emit(e,t,b)},o=function(e){var b=e.type,t=(e.data||{}).url;a("requestcompleted",{request_event_type:b,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:st(t),request_url:t})};t.on("manifestLoaded",o);var c={},l=function(e){if("function"!=typeof e.getRequests)return null;var b=e.getRequests({state:"executed"});return 0===b.length?null:b[b.length-1]},u=function(e){var b=e.type,t=e.fragmentModel,n=e.chunk,r=l(t);d({type:b,request:r,chunk:n})},d=function(e){var b=e.type,n=e.chunk,r=e.request,o=(n||{}).mediaInfo||{},l=o.type,d=o.bitrateList,h={};(d=d||[]).forEach((function(e,t){h[t]={},h[t].width=e.width,h[t].height=e.height,h[t].bitrate=e.bandwidth,h[t].attrs={}})),"video"===l?c.video=h:"audio"===l?c.audio=h:c.media=h;var f=kt(r,t),v=f.requestStart,m=f.requestResponseStart,y=f.requestResponseEnd,E=f.requestResponseHeaders,_=f.requestMediaDuration,q=f.requestHostname,k=f.requestUrl,T=f.requestId;a("requestcompleted",{request_event_type:b,request_start:v,request_response_start:m,request_response_end:y,request_bytes_loaded:-1,request_type:l+"_init",request_response_headers:E,request_hostname:q,request_id:T,request_url:k,request_media_duration:_,request_rendition_lists:c})};r>=4?t.on("initFragmentLoaded",d):t.on("initFragmentLoaded",u);var h=function(e){var b=e.type,t=e.fragmentModel,n=e.chunk,r=l(t);f({type:b,request:r,chunk:n})},f=function(e){var b=e.type,n=e.chunk,r=e.request,o=n||{},c=o.mediaInfo,l=o.start,d=(c||{}).type,h=kt(r,t),f=h.requestStart,v=h.requestResponseStart,m=h.requestResponseEnd,y=h.requestBytesLoaded,E=h.requestResponseHeaders,q=h.requestMediaDuration,_=h.requestHostname,k=h.requestUrl,T=h.requestId,w=Tt(d,t),S=w.currentLevel,A=w.renditionWidth,I=w.renditionHeight,R=w.renditionBitrate;a("requestcompleted",{request_event_type:b,request_start:f,request_response_start:v,request_response_end:m,request_bytes_loaded:y,request_type:d,request_response_headers:E,request_hostname:_,request_id:T,request_url:k,request_media_start_time:l,request_media_duration:q,request_current_level:S,request_labeled_bitrate:R,request_video_width:A,request_video_height:I})};r>=4?t.on("mediaFragmentLoaded",f):t.on("mediaFragmentLoaded",h);var v={video:void 0,audio:void 0,totalBitrate:void 0},p=function(){if(v.video&&"number"==typeof v.video.bitrate){if(!v.video.width||!v.video.height)return void n.warn("have bitrate info for video but missing width/height");var e=v.video.bitrate;if(v.audio&&"number"==typeof v.audio.bitrate&&(e+=v.audio.bitrate),e!==v.totalBitrate)return v.totalBitrate=e,{video_source_bitrate:e,video_source_height:v.video.height,video_source_width:v.video.width,video_source_codec:wt(v.video.codec)}}},g=function(e,b,r){if("number"==typeof e.newQuality){var o=e.mediaType;if("audio"===o||"video"===o){var c=t.getBitrateInfoListFor(o).find((function(t){return t.qualityIndex===e.newQuality}));if(!c||"number"!=typeof c.bitrate)return void n.warn("missing bitrate info for ".concat(o));v[o]=pt(ft({},c),{codec:t.getCurrentTrackFor(o).codec});var l=p();l&&a("renditionchange",l)}}else n.warn("missing evt.newQuality in qualityChangeRendered event",e)};t.on("qualityChangeRendered",g);var m=function(e){var b=e.request,t=e.mediaType;a("requestcanceled",{request_event_type:(b=b||{}).type+"_"+b.action,request_url:b.url,request_type:t,request_hostname:st(b.url)})};t.on("fragmentLoadingAbandoned",m);var y=function(e){var t,n,b=e.error,r=(null==b||null===(t=b.data)||void 0===t?void 0:t.request)||{},o=(null==b||null===(n=b.data)||void 0===n?void 0:n.response)||{};27===(null==b?void 0:b.code)&&a("requestfailed",{request_error:r.type+"_"+r.action,request_url:r.url,request_hostname:st(r.url),request_type:r.mediaType,request_error_code:o.status,request_error_text:o.statusText});var c="".concat(null!=r&&r.url?"url: ".concat(r.url,"\n"):"")+"".concat(null!=o&&o.status||null!=o&&o.statusText?"response: ".concat(null==o?void 0:o.status,", ").concat(null==o?void 0:o.statusText,"\n"):"");a("error",{player_error_code:null==b?void 0:b.code,player_error_message:null==b?void 0:b.message,player_error_context:c})};t.on("error",y),t._stopMuxMonitor=function(){t.off("manifestLoaded",o),t.off("initFragmentLoaded",d),t.off("mediaFragmentLoaded",f),t.off("qualityChangeRendered",g),t.off("error",y),t.off("fragmentLoadingAbandoned",m),delete t._stopMuxMonitor}}else n.warn("Invalid dash.js player reference. Monitoring blocked.")}(this.mux,this.id,s.dashjs)):this.mux.log.warn("You must pass a valid dashjs instance in order to track it.")}},{key:"removeDashJS",value:function(){this.dashjs&&(function(i){i&&"function"==typeof i._stopMuxMonitor&&i._stopMuxMonitor()}(this.dashjs),this.dashjs=void 0)}}]),t}(It),On=le(Re());function Ln(){return On.default&&!!(On.default.fullscreenElement||On.default.webkitFullscreenElement||On.default.mozFullScreenElement||On.default.msFullscreenElement)}var Dn=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],xn={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};var Cn,Mn=le(de());Mn.default&&Mn.default.WeakMap&&(Cn=new WeakMap);var Pn="#EXT-X-TARGETDURATION",Nn="#EXT-X-PART-INF",Un="#EXT-X-SERVER-CONTROL",Fn="#EXTINF",Bn="#EXT-X-PROGRAM-DATE-TIME",
vendor: 11,502 bytes, line 2
2jn="#EXT-X-VERSION",Vn="#EXT-X-SESSION-DATA",Hn=function(i){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(i),this.manifest};Hn.prototype.process=function(i){var e;for(this.buffer+=i,e=this.buffer.indexOf("\n");e>-1;e=this.buffer.indexOf("\n"))this.processLine(this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},Hn.prototype.processLine=function(i){var e=i.indexOf(":"),t=Qn(i,e),s=t[0],n=2===t.length?Gn(t[1]):void 0;if("#"!==s[0])this.currentUri.uri=s,this.manifest.segments.push(this.currentUri),this.manifest.targetDuration&&!("duration"in this.currentUri)&&(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(s){case Pn:if(!isFinite(n)||n<0)return;this.manifest.targetDuration=n,this.setHoldBack();break;case Nn:Wn(this.manifest,t),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case Un:Wn(this.manifest,t),this.setHoldBack();break;case Fn:0===n?this.currentUri.duration=.01:n>0&&(this.currentUri.duration=n);break;case Bn:var r=n,a=new Date(r);this.manifest.dateTimeString||(this.manifest.dateTimeString=r,this.manifest.dateTimeObject=a),this.currentUri.dateTimeString=r,this.currentUri.dateTimeObject=a;break;case jn:Wn(this.manifest,t);break;case Vn:var o=zn(t[1]),c=bt(o);Object.assign(this.manifest.sessionData,c)}},Hn.prototype.setHoldBack=function(){var i=this.manifest,e=i.serverControl,t=i.targetDuration,s=i.partTargetDuration;if(e){var n="holdBack",r="partHoldBack",a=t&&3*t,o=s&&2*s;t&&!e.hasOwnProperty(n)&&(e[n]=a),a&&e[n]<a&&(e[n]=a),s&&!e.hasOwnProperty(r)&&(e[r]=3*s),s&&e[r]<o&&(e[r]=o)}};var Wn=function(i,e){var s,t=qn(e[0].replace("#EXT-X-",""));$n(e[1])?(s={},s=Object.assign(Yn(e[1]),s)):s=Gn(e[1]),i[t]=s},qn=function(i){return i.toLowerCase().replace(/-(\w)/g,(function(e){return e[1].toUpperCase()}))},Gn=function(i){if("yes"===i.toLowerCase()||"no"===i.toLowerCase())return"yes"===i.toLowerCase();var e=-1!==i.indexOf(":")?i:parseFloat(i);return isNaN(e)?i:e},Kn=function(i){var e={},t=i.split("=");t.length>1&&(e[qn(t[0])]=Gn(t[1]));return e},Yn=function(i){for(var e=i.split(","),t={},s=0;e.length>s;s++){var n=e[s],r=Kn(n);t=Object.assign(r,t)}return t},$n=function(i){return i.indexOf("=")>-1},Qn=function(i,e){return-1===e?[i]:[i.substring(0,e),i.substring(e+1)]},zn=function(i){var e={};if(i){var t=i.search(",");return[i.slice(0,t),i.slice(t+1)].forEach((function(a,t){for(var n=a.replace(/['"]+/g,"").split("="),r=0;r<n.length;r++)"DATA-ID"===n[r]&&(e["DATA-ID"]=n[1-r]),"VALUE"===n[r]&&(e.VALUE=n[1-r])})),{data:e}}},Xn=Hn,Jn={safeCall:function(i,e,t,s){var n=s;if(i&&"function"==typeof i[e])try{n=i[e].apply(i,t)}catch(e){Ke.info("safeCall error",e)}return n},safeIncrement:ht,getComputedStyle:function(i,e){return i&&e&&Mn.default&&"function"==typeof Mn.default.getComputedStyle?(Cn&&Cn.has(i)&&(t=Cn.get(i)),t||(t=Mn.default.getComputedStyle(i,null),Cn&&Cn.set(i,t)),t.getPropertyValue(e)):"";var t},secondsToMs:function(i){return Math.floor(1e3*i)},assign:Object.assign,headersStringToObject:gt,cdnHeadersToRequestId:yt,extractHostnameAndDomain:ut,extractHostname:st,manifestParser:Xn,generateShortID:Ue,generateUUID:Ne,now:Pe.now,findMediaElement:Be},Zn={PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",PLAYBACK_MODE_CHANGE:"playbackmodechange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled",HEARTBEAT:"hb",DESTROY:"destroy"},er={},tr=function tr(i){var e=arguments;"string"==typeof i?tr.hasOwnProperty(i)?xe.default.setTimeout((function(){e=Array.prototype.splice.call(e,1),tr[i].apply(null,e)}),0):Ke.warn("`"+i+"` is an unknown task"):"function"==typeof i?xe.default.setTimeout((function(){i(tr)}),0):Ke.warn("`"+i+"` is invalid.")},nr={loaded:Pe.now(),NAME:"mux-embed",VERSION:"5.16.1",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(i,e){return function(i,e,t){var s=De(Be(e),3),n=s[0],r=s[1],a=s[2],o=i.log,c=i.utils.getComputedStyle,l=i.utils.secondsToMs;if(!n)return o.error("No element was found with the `"+r+"` query selector.");if("video"!==a&&"audio"!==a)return o.error("The element of `"+r+"` was not a media element.");n.mux&&(n.mux.destroy(),delete n.mux,o.warn("Already monitoring this video element, replacing existing event listeners"));var d={getPlayheadTime:function(){return l(n.currentTime)},getStateData:function(){var e,p,g=(null===(e=this.getPlayheadTime)||void 0===e?void 0:e.call(this))||l(n.currentTime),t=this.hlsjs&&this.hlsjs.url,r=this.dashjs&&"function"==typeof this.dashjs.getSource&&this.dashjs.getSource(),o={player_is_paused:n.paused,player_width:parseInt(c(n,"width")),player_height:parseInt(c(n,"height")),player_autoplay_on:n.autoplay,player_preload_on:n.preload,player_language_code:n.lang,player_is_fullscreen:Ln(),video_poster_url:n.poster,video_source_url:t||r||n.currentSrc,video_source_duration:l(n.duration),video_source_height:n.videoHeight,video_source_width:n.videoWidth,view_dropped_frame_count:null==n||null===(p=n.getVideoPlaybackQuality)||void 0===p?void 0:p.call(n).droppedVideoFrames};if(n.getStartDate&&g>0){var b=n.getStartDate();if(b&&"function"==typeof b.getTime&&b.getTime()){var d=b.getTime();if(o.player_program_time=d+g,n.seekable.length>0){var h=d+n.seekable.end(n.seekable.length-1);o.player_live_edge_program_time=h}}}return o}};(t=Object.assign({automaticErrorTracking:!0},t,d)).data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:i.VERSION},t.data),n.mux=n.mux||{},n.mux.deleted=!1,n.mux.emit=function(e,t){i.emit(r,e,t)},n.mux.updateData=function(e){n.mux.emit("hb",e)};var h=function(){o.error("The monitor for this video element has already been destroyed.")};n.mux.destroy=function(){Object.keys(n.mux.listeners).forEach((function(e){n.removeEventListener(e,n.mux.listeners[e],!1)})),delete n.mux.listeners,n.mux.fullscreenChangeListener&&(document.removeEventListener("fullscreenchange",n.mux.fullscreenChangeListener,!1),delete n.mux.fullscreenChangeListener),n.mux.destroy=h,n.mux.swapElement=h,n.mux.emit=h,n.mux.addHLSJS=h,n.mux.addDashJS=h,n.mux.removeHLSJS=h,n.mux.removeDashJS=h,n.mux.updateData=h,n.mux.setEmitTranslator=h,n.mux.setStateDataTranslator=h,n.mux.setGetPlayheadTime=h,n.mux.deleted=!0,i.emit(r,"destroy")},n.mux.swapElement=function(e){var t=De(Be(e),3),p=t[0],g=t[1],r=t[2];return p?"video"!==r&&"audio"!==r?i.log.error("The element of `"+g+"` was not a media element."):(p.muxId=n.muxId,delete n.muxId,p.mux=p.mux||{},p.mux.listeners=Object.assign({},n.mux.listeners),delete n.mux.listeners,Object.keys(p.mux.listeners).forEach((function(e){n.removeEventListener(e,p.mux.listeners[e],!1),p.addEventListener(e,p.mux.listeners[e],!1)})),p.mux.fullscreenChangeListener=n.mux.fullscreenChangeListener,delete n.mux.fullscreenChangeListener,p.mux.swapElement=n.mux.swapElement,p.mux.destroy=n.mux.destroy,delete n.mux,void(n=p)):i.log.error("No element was found with the `"+g+"` query selector.")},n.mux.addHLSJS=function(e){i.addHLSJS(r,e)},n.mux.addDashJS=function(e){i.addDashJS(r,e)},n.mux.removeHLSJS=function(){i.removeHLSJS(r)},n.mux.removeDashJS=function(){i.removeDashJS(r)},n.mux.setEmitTranslator=function(e){i.setEmitTranslator(r,e)},n.mux.setStateDataTranslator=function(e){i.setStateDataTranslator(r,e)},n.mux.setGetPlayheadTime=function(e){e||(e=t.getPlayheadTime),i.setGetPlayheadTime(r,e)},i.init(r,t),i.emit(r,"playerready"),n.paused||(i.emit(r,"play"),n.readyState>2&&i.emit(r,"playing")),n.mux.listeners={},Dn.forEach((function(e){"error"===e&&!t.automaticErrorTracking||(n.mux.listeners[e]=function(){var t={};if("error"===e){if(!n.error||1===n.error.code)return;t.player_error_code=n.error.code,t.player_error_message=xn[n.error.code]||n.error.message}i.emit(r,e,t)},n.addEventListener(e,n.mux.listeners[e],!1))})),n.mux.listeners.enterpictureinpicture=function(){i.emit(r,"playbackmodechange",{player_playback_mode:"pip",player_playback_mode_data:"{}"})},n.mux.listeners.leavepictureinpicture=function(){var e=Ln()?"fullscreen":"standard";i.emit(r,"playbackmodechange",{player_playback_mode:e,player_playback_mode_data:"{}"})},n.addEventListener("enterpictureinpicture",n.mux.listeners.enterpictureinpicture,!1),n.addEventListener("leavepictureinpicture",n.mux.listeners.leavepictureinpicture,!1),n.mux.fullscreenChangeListener=function(){var e=Ln(),t=document.fullscreenElement;if(e&&(t===n||null!=t&&t.contains(n)))i.emit(r,"playbackmodechange",{player_playback_mode:"fullscreen",player_playback_mode_data:"{}"});else if(!e){var g=document.pictureInPictureElement===n?"pip":"standard";i.emit(r,"playbackmodechange",{player_playback_mode:g,player_playback_mode_data:"{}"})}},document.addEventListener("fullscreenchange",n.mux.fullscreenChangeListener,!1)}(tr,i,e)},destroyMonitor:function(i){var e=De(Be(i),1)[0];e&&e.mux&&"function"==typeof e.mux.destroy?e.mux.destroy():Ke.error("A video element monitor for `"+i+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(i,e){var t=Fe(i);er[t]?er[t].addHLSJS(e):Ke.error("A monitor for `"+t+"` has not been initialized.")},addDashJS:function(i,e){var t=Fe(i);er[t]?er[t].addDashJS(e):Ke.error("A monitor for `"+t+"` has not been initialized.")},removeHLSJS:function(i){var e=Fe(i);er[e]?er[e].removeHLSJS():Ke.error("A monitor for `"+e+"` has not been initialized.")},removeDashJS:function(i){var e=Fe(i);er[e]?er[e].removeDashJS():Ke.error("A monitor for `"+e+"` has not been initialized.")},init:function(i,e){$e()&&e&&e.respectDoNotTrack&&Ke.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var t=Fe(i);er[t]=new Rn(tr,t,e)},emit:function(i,e,t){var s=Fe(i);er[s]?(er[s].emit(e,t),"destroy"===e&&delete er[s]):Ke.error("A monitor for `"+s+"` has not been initialized.")},updateData:function(i,e){var t=Fe(i);er[t]?er[t].emit("hb",e):Ke.error("A monitor for `"+t+"` has not been initialized.")},setEmitTranslator:function(i,e){var t=Fe(i);er[t]?er[t].emitTranslator=e:Ke.error("A monitor for `"+t+"` has not been initialized.")},setStateDataTranslator:function(i,e){var t=Fe(i);er[t]?er[t].stateDataTranslator=e:Ke.error("A monitor for `"+t+"` has not been initialized.")},setGetPlayheadTime:function(i,e){var t=Fe(i);er[t]?er[t].getPlayheadTime=e:Ke.error("A monitor for `"+t+"` has not been initialized.")},checkDoNotTrack:$e,log:Ke,utils:Jn,events:Zn,WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(tr,nr),void 0!==xe.default&&"function"==typeof xe.default.addEventListener&&xe.default.addEventListener("pagehide",(function(i){i.persisted||(tr.WINDOW_UNLOADING=!0)}),!1);var rr=tr,ir=Number.isFinite||function(i){return"number"==typeof i&&isFinite(i)},ar=Number.isSafeInteger||function(i){return"number"==typeof i&&Math.abs(i)<=or},or=Number.MAX_SAFE_INTEGER||9007199254740991,sr=function(i){return i.NETWORK_E
2RROR="networkError",i.MEDIA_ERROR="mediaError",i.KEY_SYSTEM_ERROR="keySystemError",i.MUX_ERROR="muxError",i.OTHER_ERROR="otherError",i}({}),ur=function(i){return i.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",i.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",i.KEY_SYSTEM_NO_SESSION="keySystemNoSession",i.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",i.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",i.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",i.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",i.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",i.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",i.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",i.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",i.MANIFEST_LOAD_ERROR="manifestLoadError",i.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",i.MANIFEST_PARSING_ERROR="manifestParsingError",i.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",i.LEVEL_EMPTY_ERROR="levelEmptyError",i.LEVEL_LOAD_ERROR="levelLoadError",i.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",i.LEVEL_PARSING_ERROR="levelParsingError",i.LEVEL_SWITCH_ERROR="levelSwitchError",i.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",i.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",i.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",i.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",i.FRAG_LOAD_ERROR="fragLoadError",i.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",i.FRAG_DECRYPT_ERROR="fragDecryptError",i.FRAG_PARSING_ERROR="fragParsingError",i.FRAG_GAP="fragGap",i.REMUX_ALLOC_ERROR="remuxAllocError",i.KEY_LOAD_ERROR="keyLoadError",i.KEY_LOAD_TIMEOUT="keyLoadTimeOut",i.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",i.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",i.BUFFER_APPEND_ERROR="bufferAppendError",i.BUFFER_APPENDING_ERROR="bufferAppendingError",i.BUFFER_STALLED_ERROR="bufferStalledError",i.BUFFER_FULL_ERROR="bufferFullError",i.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",i.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",i.ASSET_LIST_LOAD_ERROR="assetListLoadError",i.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",i.ASSET_LIST_PARSING_ERROR="assetListParsingError",i.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",i.INTERNAL_EXCEPTION="internalException",i.INTERNAL_ABORTED="aborted",i.ATTACH_MEDIA_ERROR="attachMediaError",i.UNKNOWN="unknown",i}({}),cr=function(i){return i.MEDIA_ATTACHING="hlsMediaAttaching",i.MEDIA_ATTACHED="hlsMediaAttached",i.MEDIA_DETACHING="hlsMediaDetaching",i.MEDIA_DETACHED="hlsMediaDetached",i.MEDIA_ENDED="hlsMediaEnded",i.STALL_RESOLVED="hlsStallResolved",i.BUFFER_RESET="hlsBufferReset",i.BUFFER_CODECS="hlsBufferCodecs",i.BUFFER_CREATED="hlsBufferCreated",i.BUFFER_APPENDING="hlsBufferAppending",i.BUFFER_APPENDED="hlsBufferAppended",i.BUFFER_EOS="hlsBufferEos",i.BUFFERED_TO_END="hlsBufferedToEnd",i.BUFFER_FLUSHING="hlsBufferFlushing",i.BUFFER_FLUSHED="hlsBufferFlushed",i.MANIFEST_LOADING="hlsManifestLoading",i.MANIFEST_LOADED="hlsManifestLoaded",i.MANIFEST_PARSED="hlsManifestParsed",i.LEVEL_SWITCHING="hlsLevelSwitching",i.LEVEL_SWITCHED="hlsLevelSwitched",i.LEVEL_LOADING="hlsLevelLoading",i.LEVEL_LOADED="hlsLevelLoaded",i.LEVEL_UPDATED="hlsLevelUpdated",i.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",i.LEVELS_UPDATED="hlsLevelsUpdated",i.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",i.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",i.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",i.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",i.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",i.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",i.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",i.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",i.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",i.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",i.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",i.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",i.SUBTITLE_FRAG_PROCESSED="hl
2sSubtitleFragProcessed",i.CUES_PARSED="hlsCuesParsed",i.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",i.INIT_PTS_FOUND="hlsInitPtsFound",i.FRAG_LOADING="hlsFragLoading",i.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",i.FRAG_LOADED="hlsFragLoaded",i.FRAG_DECRYPTED="hlsFragDecrypted",i.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",i.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",i.FRAG_PARSING_METADATA="hlsFragParsingMetadata",i.FRAG_PARSED="hlsFragParsed",i.FRAG_BUFFERED="hlsFragBuffered",i.FRAG_CHANGED="hlsFragChanged",i.FPS_DROP="hlsFpsDrop",i.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",i.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",i.ERROR="hlsError",i.DESTROYING="hlsDestroying",i.KEY_LOADING="hlsKeyLoading",i.KEY_LOADED="hlsKeyLoaded",i.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",i.BACK_BUFFER_REACHED="hlsBackBufferReached",i.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",i.ASSET_LIST_LOADING="hlsAssetListLoading",i.ASSET_LIST_LOADED="hlsAssetListLoaded",i.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",i.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",i.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",i.INTERSTITIAL_STARTED="hlsInterstitialStarted",i.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",i.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",i.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",i.INTERSTITIAL_ENDED="hlsInterstitialEnded",i.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",i.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",i.EVENT_CUE_ENTER="hlsEventCueEnter",i}({}),lr="manifest",dr="level",fr="audioTrack",pr="subtitleTrack",vr="main",mr="audio",gr="subtitle",yr=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;A(this,e),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=n,this.totalWeight_=s}return I(e,[{key:"sample",value:function(e,t){var s=Math.pow(this.alpha_,e);this.estimate_=t*(1-s)+s*this.estimate_,this.totalWeight_+=e}},{key:"getTotalWeight",value:function(){return this.totalWeight_}},{key:"getEstimate",value:function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}]),e}(),Er=function(){function e(t,n,s){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100;A(this,e),this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=s,this.minWeight_=.001,this.minDelayMs_=50,this.slow_
vendor: 13,905 bytes, line 2
2=new yr(t),this.fast_=new yr(n),this.defaultTTFB_=r,this.ttfb_=new yr(t)}return I(e,[{key:"update",value:function(e,t){var s=this.slow_,n=this.fast_,r=this.ttfb_;s.halfLife!==e&&(this.slow_=new yr(e,s.getEstimate(),s.getTotalWeight())),n.halfLife!==t&&(this.fast_=new yr(t,n.getEstimate(),n.getTotalWeight())),r.halfLife!==e&&(this.ttfb_=new yr(e,r.getEstimate(),r.getTotalWeight()))}},{key:"sample",value:function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)}},{key:"sampleTTFB",value:function(e){var t=e/1e3,s=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(s,Math.max(e,5))}},{key:"canEstimate",value:function(){return this.fast_.getTotalWeight()>=this.minWeight_}},{key:"getEstimate",value:function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}},{key:"getEstimateTTFB",value:function(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}},{key:"defaultEstimate",get:function(){return this.defaultEstimate_}},{key:"destroy",value:function(){}}]),e}();function _r(i,e,t){return(e=function(i){var e=function(i,e){if("object"!=R(i)||!i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var s=t.call(i,e);if("object"!=R(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"==R(e)?e:e+""}(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function kr(){return(kr=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)({}).hasOwnProperty.call(t,s)&&(i[s]=t[s])}return i}).apply(null,arguments)}function Tr(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),t.push.apply(t,s)}return t}function wr(i){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Tr(Object(t),!0).forEach((function(s){_r(i,s,t[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):Tr(Object(t)).forEach((function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(t,s))}))}return i}var Sr=I((function e(t,n){A(this,e),this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;var s="[".concat(t,"]:");this.trace=Ar,this.debug=n.debug.bind(null,s),this.log=n.log.bind(null,s),this.warn=n.warn.bind(null,s),this.info=n.info.bind(null,s),this.error=n.error.bind(null,s)})),Ar=function(){},Ir={trace:Ar,debug:Ar,log:Ar,warn:Ar,info:Ar,error:Ar};function Rr(){return kr({},Ir)}function Or(i,e,t){return e[i]?e[i].bind(e):function(i,e){var t=self.console[i];return t?t.bind(self.console,"".concat(e?"["+e+"] ":"","[").concat(i,"] >")):Ar}(i,t)}var Lr=Rr();function Dr(i,e,t){var s=Rr();if("object"==("undefined"==typeof console?"undefined":R(console))&&!0===i||"object"==R(i)){var n=["debug","log","info","warn","error"];n.forEach((function(e){s[e]=Or(e,i,t)}));try{s.log('Debug logs enabled for "'.concat(e,'" in hls.js version 1.6.15'))}catch(e){return Rr()}n.forEach((function(e){Lr[e]=Or(e,i)}))}else kr(Lr,s);return s}var xr=Lr;function Cr(){var i=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return"undefined"==typeof self?void 0:(i||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Mr(i,e){var t=Object.keys(i),s=Object.keys(e),n=t.length,r=s.length;return!n||!r||n===r&&!t.some((function(a){return-1===s.indexOf(a)}))}function Pr(i){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("undefined"!=typeof TextDecoder){var t=new TextDecoder("utf-8").decode(i);if(e){var u=t.indexOf("\0");return-1!==u?t.substring(0,u):t}return t.replace(/\0/g,"")}for(var s,n,r,o=i.length,a="",c=0;c<o;){if(0===(s=i[c++])&&e)return a;if(0!==s&&3!==s)switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(s);break;case 12:case 13:n=i[c++],a+=String.fromCharCode((31&s)<<6|63&n);break;case 14:n=i[c++],r=i[c++],a+=String.fromCharCode((15&s)<<12|(63&n)<<6|(63&r)<<0)}}return a}function Nr(i){for(var e="",t=0;t<i.length;t++){var s=i[t].toString(16);s.length<2&&(s="0"+s),e+=s}return e}function Ur(i){return Uint8Array.from(i.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}var Fr,Br={exports:{}};var jr=(Fr||(Fr=1,function(i,e){var s,t,n,a,r;s=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,t=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,r={buildAbsoluteURL:function(e,n,u){if(u=u||{},e=e.trim(),!(n=n.trim())){if(!u.alwaysNormalize)return e;var o=r.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");return o.path=r.normalizePath(o.path),r.buildURLFromParts(o)}var c=r.parseURL(n);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return u.alwaysNormalize?(c.path=r.normalizePath(c.path),r.buildURLFromParts(c)):n;var l=r.parseURL(e);if(!l)throw new Error("Error trying to parse base URL.");if(!l.netLoc&&l.path&&"/"!==l.path[0]){var d=t.exec(l.path);l.netLoc=d[1],l.path=d[2]}l.netLoc&&!l.path&&(l.path="/");var p={scheme:l.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(p.netLoc=l.netLoc,"/"!==c.path[0]))if(c.path){var g=l.path,h=g.substring(0,g.lastIndexOf("/")+1)+c.path;p.path=r.normalizePath(h)}else p.path=l.path,c.params||(p.params=l.params,c.query||(p.query=l.query));return null===p.path&&(p.path=u.alwaysNormalize?r.normalizePath(c.path):c.path),r.buildURLFromParts(p)},parseURL:function(e){var t=s.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},i.exports=r}(Br)),Br.exports),Vr=I((function e(){A(this,e),this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}})),Hr="audio",Wr="video",qr="audiovideo",Gr=function(){function e(t){A(this,e),this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,"string"==typeof t&&(t={url:t}),this.base=t,function(i,e){var t=Qr(i,e);t&&(t.enumerable=!0,Object.defineProperty(i,e,t))}(this,"stats")}return I(e,[{key:"setByteRange",value:function(e,t){var n,s=e.split("@",2);n=1===s.length?(null==t?void 0:t.byteRangeEndOffset)||0:parseInt(s[1]),this._byteRange=[n,parseInt(s[0])+n]}},{key:"baseurl",get:function(){return this.base.url}},{key:"byteRange",get:function(){return null===this._byteRange?[]:this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"elementaryStreams",get:function(){var e;return null===this._streams&&(this._streams=(k(e={},Hr,null),k(e,Wr,null),k(e,qr,null),e)),this._streams},set:function(e){this._streams=e}},{key:"hasStats",get:function(){return null!==this._stats}},{key:"hasStreams",get:function(){return null!==this._streams}},{key:"stats",get:function(){return null===this._stats&&(this._stats=new Vr),this._stats},set:function(e){this._stats=e}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=jr.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}},{key:"clearElementaryStreamInfo",value:function(){var e=this.elementaryStreams;e[Hr]=null,e[Wr]=null,e[qr]=null}}]),e}();function Kr(i){return"initSegment"!==i.sn}var Yr=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this,r))._decryptdata=null,o._programDateTime=null,o._ref=null,o._bitrate=void 0,o.rawProgramDateTime=null,o.tagList=[],o.duration=0,o.sn=0,o.levelkeys=void 0,o.type=void 0,o.loader=null,o.keyLoader=null,o.level=-1,o.cc=0,o.startPTS=void 0,o.endPTS=void 0,o.startDTS=void 0,o.endDTS=void 0,o.start=0,o.playlistOffset=0,o.deltaPTS=void 0,o.maxStartPTS=void 0,o.minEndPTS=void 0,o.data=void 0,o.bitrateTest=!1,o.title=null,o.initSegment=null,o.endList=void 0,o.gap=void 0,o.urlId=0,o.type=e,o}return I(n,[{key:"byteLength",get:function(){if(this.hasStats){var e=this.stats.total;if(e)return e}if(this.byteRange.length){var t=this.byteRange[0],n=this.byteRange[1];if(ir(t)&&ir(n))return n-t}return null}},{key:"bitrate",get:function(){return this.byteLength?8*this.byteLength/this.duration:this._bitrate?this._bitrate:null},set:function(e){this._bitrate=e}},{key:"decryptdata",get:function(){var e,t=this.levelkeys;if(!t||t.NONE)return null;if(t.identity)this._decryptdata||(this._decryptdata=t.identity.getDecryptData(this.sn));else if(null==(e=this._decryptdata)||!e.keyId){var s=Object.keys(t);if(1===s.length){var n=this._decryptdata=t[s[0]]||null;n&&(this._decryptdata=n.getDecryptData(this.sn,t))}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;var e=ir(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){var t,s=Object.keys(this.levelkeys),n=s.length;if(n>1||1===n&&null!=(t=this.levelkeys[s[0]])&&t.encrypted)return!0}return!1}},{key:"programDateTime",get:function(){return null===this._programDateTime&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime},set:function(e){ir(e)?this._programDateTime=e:this._programDateTime=this.rawProgramDateTime=null}},{key:"ref",get:function(){return Kr(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}},{key:"addStart",value:function(e){this.setStart(this.start+e)}},{key:"setStart",value:function(e){this.start=e,this._ref&&(this._ref.start=e)}},{key:"setDuration",value:function(e){this.duration=e,this._ref&&(this._ref.duration=e)}},{key:"setKeyFormat",value:function(e){var t=this.levelkeys;if(t){var s,n=t[e];n&&(null==(s=this._decryptdata)||!s.keyId)&&(this._decryptdata=n.getDecryptData(this.sn,t))}}},{key:"abortRequests",value:function(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()}},{key:"setElementaryStreamInfo",value:function(e,t,s,n,r){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=this.elementaryStreams,c=o[e];c?(c.startPTS=Math.min(c.startPTS,t),c.endPTS=Math.max(c.endPTS,s),c.startDTS=Math.min(c.startDTS,n),c.endDTS=Math.max(c.endDTS,r)):o[e]={startPTS:t,endPTS:s,startDTS:n,endDTS:r,partial:a}}}]),n}(Gr),$r=function(e){T(n,e);var t=P(n);function n(e,r,s,o,c){var l;A(this,n),(l=t.call(this,s)).fragOffset=0,l.duration=0,l.gap=!1,l.independent=!1,l.relurl=void 0,l.fragment=void 0,l.index=void 0,l.duration=e.decimalFloatingPoint("DURATION"),l.gap=e.bool("GAP"),l.independent=e.bool("INDEPENDENT"),l.relurl=e.enumeratedString("URI"),l.fragment=r,l.index=o;var a=e.enumeratedString("BYTERANGE");return a&&l.setByteRange(a,c),c&&(l.fragOffset=c.fragOffset+c.duration),l}return I(n,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),n}(Gr);function Qr(i,e){var t=Object.getPrototypeOf(i);if(t)return Object.getOwnPropertyDescriptor(t,e)||Qr(t,e)}var zr=Math.pow(2,32)-1,Xr=[].push,Jr={video:1,audio:2,id3:3,text:4};function Zr(i){return String.fromCharCode.apply(null,i)}function ei(i,e){var t=i[e]<<8|i[e+1];return t<0?65536+t:t}function ti(i,e){var t=ri(i,e);return t<0?4294967296+t:t}function ni(i,e){var t=ti(i,e);return t*=Math.pow(2,32),t+=ti(i,e+4)}function ri(i,e){return i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3]}function ii(i,e){var t=[];if(!e.length)return t;for(var s=i.byteLength,n=0;n<s;){var r=ti(i,n),o=r>1?n+r:s;if(Zr(i.subarray(n+4,n+8))===e[0])if(1===e.length)t.push(i.subarray(n+8,o));else{var c=ii(i.subarray(n+8,o),e.slice(1));c.length&&Xr.apply(t,c)}n=o}return t}function ai(i){var e=[],t=i[0],s=8,n=ti(i,s);s+=4;var r=0,a=0;0===t?(r=ti(i,s),a=ti(i,s+4),s+=8):(r=ni(i,s),a=ni(i,s+8),s+=16),s+=2;var o=i.length+a,c=ei(i,s);s+=2;for(var l=0;l<c;l++){var u=s,d=ti(i,u);u+=4;var h=2147483647&d;if((2147483648&d)>>>31==1)return xr.warn("SIDX has hierarchical references (not supported)"),null;var f=ti(i,u);u+=4,e.push({referenceSize:h,subsegmentDuration:f,info:{duration:f/n,start:o,end:o+h-1}}),o+=h,s=u+=4}return{earliestPresentationTime:r,timescale:n,version:t,referencesCount:c,references:e}}function oi(i){for(var e=[],t=ii(i,["moov","trak"]),n=0;n<t.length;n++){var r=t[n],a=ii(r,["tkhd"])[0];if(a){var o=a[0],c=ti(a,0===o?12:20),l=ii(r,["mdia","mdhd"])[0];if(l){var u=ti(l,0===(o=l[0])?12:20),d=ii(r,["mdia","hdlr"])[0];if(d){var h=Zr(d.subarray(8,12)),f={soun:Hr,vide:Wr}[h],p=si(ii(r,["mdia","minf","stbl","stsd"])[0]);f?(e[c]={timescale:u,type:f,stsd:p},e[f]=wr({timescale:u,id:c},p)):e[c]={timescale:u,type:h,stsd:p}}}}}return ii(i,["moov","mvex","trex"]).forEach((function(t){var n=ti(t,4),a=e[n];a&&(a.default={duration:ti(t,12),flags:ti(t,20)})})),e}function si(i){var e,t=i.subarray(8),n=t.subarray(86),s=Zr(t.subarray(4,8)),r=s,a="enca"===s||"encv"===s;if(a){var o=ii(t,[s])[0].subarray("enca"===s?28:78);
vendor: 10,220 bytes, line 2
2ii(o,["sinf"]).forEach((function(e){var t=ii(e,["schm"])[0];if(t){var n=Zr(t.subarray(4,8));if("cbcs"===n||"cenc"===n){var o=ii(e,["frma"])[0];o&&(r=Zr(o))}}}))}var c=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":var l=ii(n,["avcC"])[0];l&&l.length>3&&(r+="."+di(l[1])+di(l[2])+di(l[3]),e=ui("avc1"===c?"dva1":"dvav",n));break;case"mp4a":var d=ii(t,[s])[0],h=ii(d.subarray(28),["esds"])[0];if(h&&h.length>7){var u=4;if(3!==h[u++])break;u=ci(h,u),u+=2;var f=h[u++];if(128&f&&(u+=2),64&f&&(u+=h[u++]),4!==h[u++])break;u=ci(h,u);var v=h[u++];if(64!==v)break;if(r+="."+di(v),u+=12,5!==h[u++])break;u=ci(h,u);var m=h[u++],y=(248&m)>>3;31===y&&(y+=1+((7&m)<<3)+((224&h[u])>>5)),r+="."+y}break;case"hvc1":case"hev1":var E=ii(n,["hvcC"])[0];if(E&&E.length>12){var _=E[1],k=["","A","B","C"][_>>6],T=31&_,w=ti(E,2),S=(32&_)>>5?"H":"L",A=E[12],p=E.subarray(6,12);r+="."+k+T,r+="."+function(i){for(var e=0,t=0;t<32;t++)e|=(i>>t&1)<<31-t;return e>>>0}(w).toString(16).toUpperCase(),r+="."+S+A;for(var g="",I=p.length;I--;){var R=p[I];(R||g)&&(g="."+R.toString(16).toUpperCase()+g)}r+=g}e=ui("hev1"==c?"dvhe":"dvh1",n);break;case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":r=ui(r,n)||r;break;case"vp09":var O=ii(n,["vpcC"])[0];if(O&&O.length>6){var L=O[4],D=O[5],x=O[6]>>4&15;r+="."+hi(L)+"."+hi(D)+"."+hi(x)}break;case"av01":var C=ii(n,["av1C"])[0];if(C&&C.length>2){var M=C[1]>>>5,P=31&C[1],N=C[2]>>>7?"H":"M",U=(64&C[2])>>6,F=(32&C[2])>>5,B=2===M&&U?F?12:10:U?10:8,j=(16&C[2])>>4,V=(8&C[2])>>3,H=(4&C[2])>>2,W=3&C[2];r+="."+M+"."+hi(P)+N+"."+hi(B)+"."+j+"."+V+H+W+"."+hi(1)+"."+hi(1)+"."+hi(1)+".0",e=ui("dav1",n)}}return{codec:r,encrypted:a,supplemental:e}}function ui(i,e){var t=ii(e,["dvvC"]),s=t.length?t[0]:ii(e,["dvcC"])[0];if(s){var n=s[2]>>1&127,r=s[2]<<5&32|s[3]>>3&31;return i+"."+hi(n)+"."+hi(r)}}function ci(i,e){for(var t=e+5;128&i[e++]&&e<t;);return e}function di(i){return("0"+i.toString(16).toUpperCase()).slice(-2)}function hi(i){return(i<10?"0":"")+i}function fi(i,e){ii(i,["moov","trak"]).forEach((function(s){var t=ii(s,["mdia","minf","stbl","stsd"])[0];if(t){var n=t.subarray(8),a=ii(n,["enca"]),r=a.length>0;r||(a=ii(n,["encv"])),a.forEach((function(t){ii(r?t.subarray(28):t.subarray(78),["sinf"]).forEach((function(t){var n=pi(t);n&&e(n,r)}))}))}}))}function pi(i){var e=ii(i,["schm"])[0];if(e){var t=Zr(e.subarray(4,8));if("cbcs"===t||"cenc"===t){var s=ii(i,["schi","tenc"])[0];if(s)return s}}}function vi(i,e){var t=new Uint8Array(i.length+e.length);return t.set(i),t.set(e,i.length),t}function mi(i,e){var t=[],s=e.samples,n=e.timescale,r=e.id,a=!1;return ii(s,["moof"]).map((function(o){var c=o.byteOffset-8;ii(o,["traf"]).map((function(o){var l=ii(o,["tfdt"]).map((function(e){var t=e[0],p=ti(e,4);return 1===t&&(p*=Math.pow(2,32),p+=ti(e,8)),p/n}))[0];return void 0!==l&&(i=l),ii(o,["tfhd"]).map((function(l){var d=ti(l,4),p=16777215&ti(l,0),h=0,b=0!=(16&p),f=0,v=0!=(32&p),m=8;d===r&&(0!=(1&p)&&(m+=8),0!=(2&p)&&(m+=4),0!=(8&p)&&(h=ti(l,m),m+=4),b&&(f=ti(l,m),m+=4),v&&(m+=4),"video"===e.type&&(a=gi(e.codec)),ii(o,["trun"]).map((function(r){var o=r[0],l=16777215&ti(r,0),d=0!=(1&l),v=0,m=0!=(4&l),y=0!=(256&l),E=0,_=0!=(512&l),k=0,q=0!=(1024&l),T=0!=(2048&l),w=0,S=ti(r,4),A=8;d&&(v=ti(r,A),A+=4),m&&(A+=4);for(var I=v+c,R=0;R<S;R++){if(y?(E=ti(r,A),A+=4):E=h,_?(k=ti(r,A),A+=4):k=f,q&&(A+=4),T&&(w=0===o?ti(r,A):ri(r,A),A+=4),e.type===Wr)for(var O=0;O<k;){var L=ti(s,I);if(yi(a,s[I+=4]))bi(s.subarray(I,I+L),a?2:1,i+w/n,t);I+=L,O+=L+4}i+=E/n}})))}))}))})),t}function gi(i){if(!i)return!1;var e=i.substring(0,4);return"hvc1"===e||"hev1"===e||"dvh1"===e||"dvhe"===e}function yi(i,e){if(i){var t=e>>1&63;return 39===t||40===t}return 6==(31&e)}function bi(i,e,t,s){var n=Ei(i),r=0;r+=e;for(var a=0,o=0,c=0;r<n.length;){a=0;do{if(r>=n.length)break;a+=c=n[r++]}while(255===c);o=0;do{if(r>=n.length)break;o+=c=n[r++]}while(255===c);var l=n.length-r,u=r;if(o<l)r+=o;else if(o>l){xr.error("Malformed SEI payload. ".concat(o," is too small, only ").concat(l," bytes left to parse."));break}if(4===a){if(181===n[u++]){var d=ei(n,u);if(u+=2,49===d){var h=ti(n,u);if(u+=4,1195456820===h){var f=n[u++];if(3===f){var p=n[u++],v=64&p,m=v?2+3*(31&p):0,y=new Uint8Array(m);if(v){y[0]=p;for(var b=1;b<m;b++)y[b]=n[u++]}s.push({type:f,payloadType:a,pts:t,bytes:y})}}}}}else if(5===a&&o>16){for(var E=[],_=0;_<16;_++){var k=n[u++].toString(16);E.push(1==k.length?"0"+k:k),(3===_||5===_||7===_||9===_)&&E.push("-")}for(var T=o-16,w=new Uint8Array(T),S=0;S<T;S++)w[S]=n[u++];s.push({payloadType:a,pts:t,uuid:E.join(""),userData:Pr(w),userDataBytes:w})}}}function Ei(i){for(var e=i.byteLength,t=[],s=1;s<e-2;)0===i[s]&&0===i[s+1]&&3===i[s+2]?(t.push(s+2),s+=2):s++;if(0===t.length)return i;var n=e-t.length,r=new Uint8Array(n),a=0;for(s=0;s<n;a++,s++)a===t[0]&&(a++,t.shift()),r[s]=i[a];return r}function _i(i,e,t){if(16!==i.byteLength)throw new RangeError("Invalid system id");var n,r;n=new Uint8Array,r=new Uint8Array;var a=new Uint8Array(4);return t.byteLength>0&&new DataView(a.buffer).setUint32(0,t.byteLength,!1),function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];for(var r=t.length,s=8,o=r;o--;)s+=t[o].byteLength;var c=new Uint8Array(s);for(c[0]=s>>24&255,c[1]=s>>16&255,c[2]=s>>8&255,c[3]=255&s,c.set(i,4),o=0,s=8;o<r;o++)c.set(t[o],s),s+=t[o].byteLength;return c}([112,115,115,104],new Uint8Array([0,0,0,0]),i,r,n,a,t)}function ki(i){var e=i.getUint32(0),t=i.byteOffset,s=i.byteLength;if(s<e)return{offset:t,size:s};if(1886614376!==i.getUint32(4))return{offset:t,size:e};var n=i.getUint32(8)>>>24;if(0!==n&&1!==n)return{offset:t,size:e};var a=i.buffer,r=Nr(new Uint8Array(a,t+12,16)),o=null,u=0;if(0===n)u=28;else{var c=i.getUint32(28);if(!c||s<32+16*c)return{offset:t,size:e};o=[];for(var l=0;l<c;l++)o.push(new Uint8Array(a,t+32+16*l,16));u=32+16*c}if(!u)return{offset:t,size:e};var d=i.getUint32(u);return e-32<d?{offset:t,size:e}:{version:n,systemId:r,kids:o,data:new Uint8Array(a,t+u+4,d),offset:t,size:e}}var Ti=function(){return/\(Windows.+Firefox\//i.test(navigator.userAgent)},wi={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Si(i,e){var t=wi[e];return!!t&&!!t[i.slice(0,4)]}function Ai(i,e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return!i.split(",").some((function(s){return!Ii(s,e,t)}))}function Ii(i,e){var s,t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=Cr(t);return null!=(s=null==n?void 0:n.isTypeSupported(Ri(i,e)))&&s}function Ri(i,e){return"".concat(e,"/mp4;codecs=").concat(i)}function Oi(i){if(i){var e=i.substring(0,4);return wi.video[e]}return 2}function Li(i){var e=Ti();return i.split(",").reduce((function(t,s){var n=e&&gi(s)?9:wi.video[s];return n?(2*n+t)/(t?3:2):(wi.audio[s]+t)/(t?2:1)}),0)}var Di={};function xi(i){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Di[i])return Di[i];for(var t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[i],n=0;n<t.length;n++){var s;if(Ii(t[n],"audio",e))return Di[i]=t[n],t[n];if("mp3"===t[n]&&null!=(s=Cr(e))&&s.isTypeSupported("audio/mpeg"))return""}return i}var Ci=/flac|opus|mp4a\.40\.34/i;function Mi(i){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i.replace(Ci,(function(t){return xi(t.toLowerCase(),e)}))}function Pi(i,e){if(i&&(i.length>4||-1!==["ac-3","ec-3","alac","fLaC","Opus"].indexOf(i))&&(Ni(i,"audio")||Ni(i,"video")))return i;if(e){var t=e.split(",");if(t.length>1){if(i)for(var s=t.length;s--;)if(t[s].substring(0,4)===i.substring(0,4))return t[s];return t[0]}}return e||i}function Ni(i,e){return Si(i,e)&&Ii(i,e)}function Ui(i){if(i.startsWith("av01.")){for(var e=i.split("."),t=["0","111","01","01","01","0"],s=e.length;s>4&&s<10;s++)e[s]=t[s-4];return e.join(".")}return i}function Fi(i){var e=Cr(i)||{isTypeSupported:function(){return!1}};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function Bi(i){return i.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}var ji={supported:!1,smooth:!1,powerEfficient:!1},Vi={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function Hi(i,e){return{supported:!1,configurations:e,decodingInfoResults:[ji],error:i}}function Wi(i,e,t){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i.videoCodec;if(!n&&!i.audioCodec||!t)return Promise.resolve(Vi);for(var r=[],a=qi(i),o=a.length,c=Gi(i,e,o>0),l=c.length,u=o||1*l||1;u--;){var d={type:"media-source"};if(o&&(d.video=a[u%o]),l){d.audio=c[u%l];var h=d.audio.bitrate;d.video&&h&&(d.video.bitrate-=h)}r.push(d)}if(n){var f=navigator.userAgent;if(n.split(",").some((function(e){return gi(e)}))&&Ti())return Promise.resolve(Hi(new Error("Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (".concat(f,")")),r))}return Promise.all(r.map((function(u){var e=$i(u);return s[e]||(s[e]=t.decodingInfo(u))}))).then((function(u){return{supported:!u.some((function(e){return!e.supported})),configurations:r,decodingInfoResults:u}})).catch((function(u){return{supported:!1,configurations:r,decodingInfoResults:[],error:u}}))}function qi(i){var e,t=null==(e=i.videoCodec)?void 0:e.split(","),s=Yi(i),n=i.width||640,r=i.height||480,a=i.frameRate||30,o=i.videoRange.toLowerCase();return t?t.map((function(e){var t={contentType:Ri(Ui(e),"video"),width:n,height:r,bitrate:s,framerate:a};return"sdr"!==o&&(t.transferFunction=o),t})):[]}function Gi(i,e,t){var s,n=null==(s=i.audioCodec)?void 0:s.split(","),r=Yi(i);return n&&i.audioGroups?i.audioGroups.reduce((function(a,o){var c,l=o?null==(c=e.groups[o])?void 0:c.tracks:null;return l?l.reduce((function(u,e){if(e.groupId===o){var c=parseFloat(e.channels||"");
2n.forEach((function(e){var n={contentType:Ri(e,"audio"),bitrate:t?Ki(e,r):r};c&&(n.channels=""+c),u.push(n)}))}return u}),a):a}),[]):[]}function Ki(i,e){if(e<=1)return 1;var t=128e3;return"ec-3"===i?t=768e3:"ac-3"===i&&(t=64e4),Math.min(e/2,t)}function Yi(i){return 1e3*Math.ceil(Math.max(.9*i.bitrate,i.averageBitrate)/1e3)||1}function $i(i){var e="",t=i.audio,s=i.video;if(s){var n=Bi(s.contentType);e+="".concat(n,"_r").concat(s.height,"x").concat(s.width,"f").concat(Math.ceil(s.framerate)).concat(s.transferFunction||"sd","_").concat(Math.ceil(s.bitrate/1e5))}if(t){var r=Bi(t.contentType);e+="".concat(s?"_":"").concat(r,"_c").concat(t.channels)}return e}var Qi=["NONE","TYPE-0","TYPE-1",null];var zi=["SDR","PQ","HLG"];var Xi="",Ji="YES",Zi="v2";function ea(i){var e=i.canSkipUntil,t=i.canSkipDateRanges,s=i.age;return e&&s<e/2?t?Zi:Ji:Xi}var ta=function(){function e(t,n,s){A(this,e),this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=t,this.part=n,this.skip=s}return I(e,[{key:"addDirectives",value:function(e){var t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}]),e}(),na=function(){function e(t){if(A(this,e),this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[t.url],this._attrs=[t.attrs],this.bitrate=t.bitrate,t.details&&(this.details=t.details),this.id=t.id||0,this.name=t.name,this.width=t.width||0,this.height=t.height||0,this.frameRate=t.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=t.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=t.audioCodec,this.videoCodec=t.videoCodec,this.codecSet=[t.videoCodec,t.audioCodec].filter((function(s){return!!s})).map((function(s){return s.substring(0,4)})).join(","),"supplemental"in t){var n;this.supplemental=t.supplemental;var s=null==(n=t.supplemental)?void 0:n.videoCodec;s&&s!==t.videoCodec&&(this.codecSet+=",".concat(s.substring(0,4)))}this.addGroupId("audio",t.attrs.AUDIO),this.addGroupId("text",t.attrs.SUBTITLES)}return I(e,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"averageBitrate",get:function(){return this._avgBitrate||this.realBitrate||this.bitrate}},{key:"attrs",get:function(){return this._attrs[0]}},{key:"codecs",get:function(){return this.attrs.CODECS||""}},{key:"pathwayId",get:function(){return this.attrs["PATHWAY-ID"]||"."}},{key:"videoRange",get:function(){return this.attrs["VIDEO-RANGE"]||"SDR"}},{key:"score",get:function(){return this.attrs.optionalFloat("SCORE",0)}},{key:"uri",get:function(){return this.url[0]||""}},{key:"hasAudioGroup",value:function(e){return ra(this._audioGroups,e)}},{key:"hasSubtitleGroup",value:function(e){return ra(this._subtitleGroups,e)}},{key:"audioGroups",get:function(){return this._audioGroups}},{key:"subtitleGroups",get:function(){return this._subtitleGroups}},{key:"addGroupId",value:function(e,t){if(t)if("audio"===e){var s=this._audioGroups;s||(s=this._audioGroups=[]),-1===s.indexOf(t)&&s.push(t)}else if("text"===e){var n=this._subtitleGroups;n||(n=this._subtitleGroups=[]),-1===n.indexOf(t)&&n.push(t)}}},{key:"urlId",get:function(){return 0},set:function(e){}},{key:"audioGroupIds",get:function(){return this.audioGroups?[this.audioGroupId]:void 0}},{key:"textGroupIds",get:function(){return this.subtitleGroups?[this.textGroupId]:void 0}},{key:"audioGroupId",get:function(){var e;return null==(e=this.audioGroups)?void 0:e[0]}},{key:"textGroupId",get:function(){var e;return null==(e=this.subtitleGroups)?void 0:e[0]}},{key:"addFallback",value:function(){}}]),e}();function ra(i,e){return!(!e||!i)&&-1!==i.indexOf(e)}function ia(i,e){var t=!1,s=[];if(i&&(t="SDR"!==i,s=[i]),e){var n="SDR"!==(s=e.allowedVideoRanges||zi.slice(0)).join("")&&!e.videoCodec;(t=void 0!==e.preferHDR?e.preferHDR:n&&function(){if("function"==typeof matchMedia){var e=matchMedia("(dynamic-range: high)"),t=matchMedia("bad query");if(e.media!==t.media)return!0===e.matches}return!1}())||(s=["SDR"])}return{preferHDR:t,allowedVideoRanges:s}}var aa=function(i,e){return JSON.stringify(i,function(i){var e=new WeakSet;return function(t,s){if(i&&(s=i(t,s)),"object"==R(s)&&null!==s){if(e.has(s))return;e.add(s)}return s}}(e))};function oa(i,e){xr.log('[abr] start candidates with "'.concat(i,'" ignored because ').
vendor: 15,490 bytes, line 2
2concat(e))}function sa(i){return i.reduce((function(e,t){var s=e.groups[t.groupId];s||(s=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),s.tracks.push(t);var n=t.channels||"2";return s.channels[n]=(s.channels[n]||0)+1,s.hasDefault=s.hasDefault||t.default,s.hasAutoSelect=s.hasAutoSelect||t.autoselect,s.hasDefault&&(e.hasDefaultAudio=!0),s.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e}),{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function ua(i){return i?{lang:i.lang,assocLang:i.assocLang,characteristics:i.characteristics,channels:i.channels,audioCodec:i.audioCodec}:i}function ca(i,e,t){if("attrs"in i){var s=e.indexOf(i);if(-1!==s)return s}for(var n=0;n<e.length;n++){if(la(i,e[n],t))return n}return-1}function la(i,e,t){var s=i.groupId,n=i.name,r=i.lang,a=i.assocLang,o=i.default,c=i.forced;return(void 0===s||e.groupId===s)&&(void 0===n||e.name===n)&&(void 0===r||function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"--";return i.length===e.length?i===e:i.startsWith(e)||e.startsWith(i)}(r,e.lang))&&(void 0===r||e.assocLang===a)&&(void 0===o||e.default===o)&&(void 0===c||e.forced===c)&&(!("characteristics"in i)||function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=i.split(","),s=e.split(",");return t.length===s.length&&!t.some((function(e){return-1===s.indexOf(e)}))}(i.characteristics||"",e.characteristics))&&(void 0===t||t(i,e))}function da(i,e){var t=i.audioCodec,s=i.channels;return!(void 0!==t&&(e.audioCodec||"").substring(0,4)!==t.substring(0,4)||void 0!==s&&s!==(e.channels||"2"))}function ha(i,e,t){for(var s=e;s>-1;s--)if(t(i[s]))return s;for(var n=e+1;n<i.length;n++)if(t(i[n]))return n;return-1}function fa(i,e){var t;return!!i&&i!==(null==(t=e.loadLevelObj)?void 0:t.uri)}var pa=function(e){T(n,e);var t=P(n);function n(e){var r;return A(this,n),(r=t.call(this,"abr",e.logger)).hls=void 0,r.lastLevelLoadSec=0,r.lastLoadedFragLevel=-1,r.firstSelection=-1,r._nextAutoLevel=-1,r.nextAutoLevelKey="",r.audioTracksByGroup=null,r.codecTiers=null,r.timer=-1,r.fragCurrent=null,r.partCurrent=null,r.bitrateTestDelay=0,r.rebufferNotice=-1,r.supportedCache={},r.bwEstimator=void 0,r._abandonRulesCheck=function(e){var s,t=_(r),n=t.fragCurrent,o=t.partCurrent,a=t.hls,c=a.autoLevelEnabled,l=a.media;if(n&&l){var d=performance.now(),u=o?o.stats:n.stats,h=o?o.duration:n.duration,f=d-u.loading.start,v=a.minAutoLevel,m=n.level,p=r._nextAutoLevel;if(u.aborted||u.loaded&&u.loaded===u.total||m<=v)return r.clearTimer(),void(r._nextAutoLevel=-1);if(c){var g=p>-1&&p!==m,y=!!e||g;if(y||!l.paused&&l.playbackRate&&l.readyState){var E=a.mainForwardBufferInfo;if(y||null!==E){var k=r.bwEstimator.getEstimateTTFB(),b=Math.abs(l.playbackRate);if(!(f<=Math.max(k,h/(2*b)*1e3))){var T=E?E.len/b:0,w=u.loading.first?u.loading.first-u.loading.start:-1,S=u.loaded&&w>-1,A=r.getBwEstimate(),I=a.levels,R=I[m],O=Math.max(u.loaded,Math.round(h*(n.bitrate||R.averageBitrate)/8)),L=S?f-w:f;L<1&&S&&(L=Math.min(f,8*u.loaded/A));var D=S?1e3*u.loaded/L:0,x=k/1e3,C=D?(O-u.loaded)/D:8*O/A+x;if(!(C<=T)){var M,P=D?8*D:A,N=!0===(null==(s=(null==e?void 0:e.details)||r.hls.latestLevelDetails)?void 0:s.live),q=r.hls.config.abrBandWidthUpFactor,U=Number.POSITIVE_INFINITY;for(M=m-1;M>v;M--){var F=I[M].maxBitrate,B=!I[M].details||N;if((U=r.getTimeToLoadFrag(x,P,h*F,B))<Math.min(T,h+x))break}if(!(U>=C||U>10*h)){S?r.bwEstimator.sample(f-Math.min(k,w),u.loaded):r.bwEstimator.sampleTTFB(f);var j=I[M].maxBitrate;r.getBwEstimate()*q>j&&r.resetEstimator(j);var V=r.findBestLevel(j,v,M,0,T,1,1);V>-1&&(M=V),r.warn("Fragment ".concat(n.sn).concat(o?" part "+o.index:""," of level ").concat(m," is loading too slowly;\n      Fragment duration: ").concat(n.duration.toFixed(3),"\n      Time to underbuffer: ").concat(T.toFixed(3)," s\n      Estimated load time for current fragment: ").concat(C.toFixed(3)," s\n      Estimated load time for down switch fragment: ").concat(U.toFixed(3)," s\n      TTFB estimate: ").concat(0|w," ms\n      Current BW estimate: ").concat(ir(A)?0|A:"Unknown"," bps\n      New BW estimate: ").concat(0|r.getBwEstimate()," bps\n      Switching to level ").concat(M," @ ").concat(0|j," bps")),a.nextLoadLevel=a.nextAutoLevel=M,r.clearTimer();var H=function(){if(r.clearTimer(),r.fragCurrent===n&&r.hls.loadLevel===M&&M>0){var e=r.getStarvationDelay();if(r.warn("Aborting inflight request ".concat(M>0?"and switching down":"","\n      Fragment duration: ").concat(n.duration.toFixed(3)," s\n      Time to underbuffer: ").concat(e.toFixed(3)," s")),n.abortRequests(),r.fragCurrent=r.partCurrent=null,M>v){var t=r.findBestLevel(r.hls.levels[v].bitrate,v,M,0,e,1,1);-1===t&&(t=v),r.hls.nextLoadLevel=r.hls.nextAutoLevel=t,r.resetEstimator(r.hls.levels[t].bitrate)}}};g||C>2*U?H():r.timer=self.setInterval(H,1e3*U),a.trigger(cr.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,part:o,stats:u})}}}}}}}},r.hls=e,r.bwEstimator=r.initEstimator(),r.registerListeners(),r}return I(n,[{key:"resetEstimator",value:function(e){e&&(this.log("setting initial bwe to ".concat(e)),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}},{key:"initEstimator",value:function(){var e=this.hls.config;return new Er(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}},{key:"registerListeners",value:function(){var e=this.hls;e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.FRAG_LOADING,this.onFragLoading,this),e.on(cr.FRAG_LOADED,this.onFragLoaded,this),e.on(cr.FRAG_BUFFERED,this.onFragBuffered,this),e.on(cr.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(cr.LEVEL_LOADED,this.onLevelLoaded,this),e.on(cr.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(cr.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(cr.ERROR,this.onError,this)}},{key:"unregisterListeners",value:function(){var e=this.hls;e&&(e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.FRAG_LOADING,this.onFragLoading,this),e.off(cr.FRAG_LOADED,this.onFragLoaded,this),e.off(cr.FRAG_BUFFERED,this.onFragBuffered,this),e.off(cr.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(cr.LEVEL_LOADED,this.onLevelLoaded,this),e.off(cr.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(cr.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(cr.ERROR,this.onError,this))}},{key:"destroy",value:function(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}},{key:"onManifestLoading",value:function(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}},{key:"onLevelsUpdated",value:function(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}},{key:"onMaxAutoLevelUpdated",value:function(){this.firstSelection=-1,this.nextAutoLevelKey=""}},{key:"onFragLoading",value:function(e,t){var s=t.frag;if(!this.ignoreFragment(s)){var n;if(!s.bitrateTest)this.fragCurrent=s,this.partCurrent=null!=(n=t.part)?n:null;this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}},{key:"onLevelSwitching",value:function(e,t){this.clearTimer()}},{key:"onError",value:function(e,t){if(!t.fatal)switch(t.details){case ur.BUFFER_ADD_CODEC_ERROR:case ur.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case ur.FRAG_LOAD_TIMEOUT:var s=t.frag,n=this.fragCurrent,r=this.partCurrent;if(s&&n&&s.sn===n.sn&&s.level===n.level){var a=performance.now(),o=r?r.stats:s.stats,c=a-o.loading.start,l=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&l>-1){var d=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(c-Math.min(d,l),o.loaded)}else this.bwEstimator.sampleTTFB(c)}}}},{key:"getTimeToLoadFrag",value:function(e,t,s,n){return e+s/t+(n?e+this.lastLevelLoadSec:0)}},{key:"onLevelLoaded",value:function(e,t){var s=this.hls.config,n=t.stats.loading,r=n.end-n.first;ir(r)&&(this.lastLevelLoadSec=r/1e3),t.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}},{key:"onFragLoaded",value:function(e,t){var n=t.frag,s=t.part,r=s?s.stats:n.stats;if(n.type===vr&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(n)){if(this.clearTimer(),n.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){var o=s?s.duration:n.duration,a=this.hls.levels[n.level],c=(a.loaded?a.loaded.bytes:0)+r.loaded,l=(a.loaded?a.loaded.duration:0)+o;a.loaded={bytes:c,duration:l},a.realBitrate=Math.round(8*c/l)}if(n.bitrateTest){var d={stats:r,frag:n,part:s,id:n.type};this.onFragBuffered(cr.FRAG_BUFFERED,d),n.bitrateTest=!1}else this.lastLoadedFragLevel=n.level}}},{key:"onFragBuffered",value:function(e,t){var s=t.frag,n=t.part,r=null!=n&&n.stats.loaded?n.stats:s.stats;if(!r.aborted&&!this.ignoreFragment(s)){var a=r.parsing.end-r.loading.start-Math.min(r.loading.first-r.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,r.loaded),r.bwEstimate=this.getBwEstimate(),s.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}}},{key:"ignoreFragment",value:function(e){return e.type!==vr||"initSegment"===e.sn}},{key:"clearTimer",value:function(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}},{key:"firstAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,n=e.minAutoLevel,s=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,o=this.findBestLevel(s,n,t,0,r,1,1);if(o>-1)return o;var a=this.hls.firstLevel,c=Math.min(Math.max(a,n),t);return this.warn("Could not find best starting auto level. Defaulting to first in playlist ".concat(a," clamped to ").concat(c)),c}},{key:"forcedAutoLevel",get:function(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}},{key:"nextAutoLevel",get:function(){var e=this.forcedAutoLevel,s=this.bwEstimator.canEstimate(),t=this.lastLoadedFragLevel>-1;if(!(-1===e||s&&t&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return e;var n=s&&t?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){var a=this.hls.levels;if(a.length>Math.max(e,n)&&a[e].loadError<=a[n].loadError)return e}return this._nextAutoLevel=n,this.nextAutoLevelKey=this.getAutoLevelKey(),n},set:function(e){var t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}},{key:"getAutoLevelKey",value:function(){return"".concat(this.getBwEstimate(),"_").concat(this.getStarvationDelay().toFixed(2))}},{key:"getNextABRAutoLevel",value:function(){var e=this.fragCurrent,t=this.partCurrent,s=this.hls;if(s.levels.length<=1)return s.loadLevel;var n=s.maxAutoLevel,r=s.config,a=s.minAutoLevel,o=t?t.duration:e?e.duration:0,c=this.getBwEstimate(),l=this.getStarvationDelay(),u=r.abrBandWidthFactor,d=r.abrBandWidthUpFactor;if(l){var g=this.findBestLevel(c,a,n,l,0,u,d);if(g>=0)return this.rebufferNotice=-1,g}var h=o?Math.min(o,r.maxStarvationDelay):r.maxStarvationDelay;if(!l){var f=this.bitrateTestDelay;f&&(h=(o?Math.min(o,r.maxLoadingDelay):r.maxLoadingDelay)-f,this.info("bitrate test took ".concat(Math.round(1e3*f),"ms, set first fragment max fetchDuration to ").concat(Math.round(1e3*h)," ms")),u=d=1)}var v=this.findBestLevel(c,a,n,l,h,u,d);if(this.rebufferNotice!==v&&(this.rebufferNotice=v,this.info("".concat(l?"rebuffering expected":"buffer is empty",", optimal quality level ").concat(v))),v>-1)return v;var m=s.levels[a],p=s.loadLevelObj;return p&&(null==m?void 0:m.bitrate)<p.bitrate?a:s.loadLevel}},{key:"getStarvationDelay",value:function(){var e=this.hls,t=e.media;if(!t)return 1/0;var s=t&&0!==t.playbackRate?Math.abs(t.playbackRate):1,n=e.mainForwardBufferInfo;return(n?n.len:0)/s}},{key:"getBwEstimate",value:function(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}},{key:"findBestLevel",value:function(e,t,s,n,r,a,o){var c,l=this,d=n+r,u=this.lastLoadedFragLevel,h=-1===u?this.hls.firstLevel:u,f=this.fragCurrent,v=this.partCurrent,m=this.hls,y=m.levels,p=m.allAudioTracks,g=m.loadLevel,E=m.config;if(1===y.length)return 0;var _,k=y[h],T=!(null==(c=this.hls.latestLevelDetails)||!c.live),b=-1===g||-1===u,w="SDR",S=(null==k?void 0:k.frameRate)||0,A=E.audioPreference,I=E.videoPreference,O=this.audioTracksByGroup||(this.audioTracksByGroup=sa(p)),L=-1;if(b){if(-1!==this.firstSelection)return this.firstSelection;var D=function(i,e,t,s,n){for(var r=Object.keys(i),a=null==s?void 0:s.channels,o=null==s?void 0:s.audioCodec,c=null==n?void 0:n.videoCodec,l=a&&2===parseInt(a),u=!1,d=!1,h=1/0,f=1/0,v=1/0,p=1/0,g=0,m=[],y=ia(e,n),E=y.preferHDR,_=y.allowedVideoRanges,k=function(){var e=i[r[T]];u||(u=e.channels[2]>0),h=Math.min(h,e.minHeight),f=Math.min(f,e.minFramerate),v=Math.min(v,e.minBitrate),_.filter((function(t){return e.videoRanges[t]>0})).length>0&&(d=!0)},T=r.length;T--;)k();h=ir(h)?h:0,f=ir(f)?f:0;var b=Math.max(1080,h),w=Math.max(30,f);v=ir(v)?v:t,t=Math.max(v,t),d||(e=void 0);var S=r.length>1;return{codecSet:r.reduce((function(e,n){var r=i[n];if(n===e)return e;if(m=d?_.filter((function(e){return r.videoRanges[e]>0})):[],S){if(r.minBitrate>t)return oa(n,"min bitrate of ".concat(r.minBitrate," > current estimate of ").concat(t)),e;if(!r.hasDefaultAudio)return oa(n,"no renditions with default or auto-select sound found"),e;if(o&&n.indexOf(o.substring(0,4))%5!=0)return oa(n,'audio codec preference "'.concat(o,'" not found')),e;if(a&&!l){if(!r.channels[a])return oa(n,"no renditions with ".concat(a," channel sound found (channels options: ").concat(Object.keys(r.channels),")")),e}else if((!o||l)&&u&&0===r.channels[2])return oa(n,"no renditions with stereo sound found"),e;if(r.minHeight>b)return oa(n,"min resolution of ".concat(r.minHeight," > maximum of ").concat(b)),e;if(r.minFramerate>w)return oa(n,"min framerate of ".concat(r.minFramerate," > maximum of ").concat(w)),e;if(!m.some((function(e){return r.videoRanges[e]>0})))return oa(n,"no variants with VIDEO-RANGE of ".concat(aa(m)," found")),e;if(c&&n.indexOf(c.substring(0,4))%5!=0)return oa(n,'video codec preference "'.concat(c,'" not found')),e;if(r.maxScore<g)return oa(n,"max score of ".concat(r.maxScore," < selected max of ").concat(g)),e}return e&&(Li(n)>=Li(e)||r.fragmentError>i[e].fragmentError)?e:(p=r.minIndex,g=r.maxScore,n)}),void 0),videoRanges:m,preferHDR:E,minFramerate:f,minBitrate:v,minIndex:p}}(this.codecTiers||(this.codecTiers=function(i,e,t,s){return i.slice(t,s+1).reduce((function(t,n,a){if(!n.codecSet)return t;var r=n.audioGroups,o=t[n.codecSet];o||(t[n.codecSet]=o={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:a,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!r,fragmentError:0}),o.minBitrate=Math.min(o.minBitrate,n.bitrate);var c=Math.min(n.height,n.width);return o.minHeight=Math.min(o.minHeight,c),o.minFramerate=Math.min(o.minFramerate,n.frameRate),o.minIndex=Math.min(o.minIndex,a),o.maxScore=Math.max(o.maxScore,n.score),o.fragmentError+=n.fragmentError,o.videoRanges[n.videoRange]=(o.videoRanges[n.videoRange]||0)+1,r&&r.forEach((function(u){if(u){var t=e.groups[u];t&&(o.hasDefaultAudio=o.hasDefaultAudio||e.hasDefaultAudio?t.hasDefault:t.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(t.channels).forEac
2h((function(e){o.channels[e]=(o.channels[e]||0)+t.channels[e]})))}})),t}),{})}(y,O,t,s)),w,e,A,I),q=D.codecSet,x=D.videoRanges,C=D.minFramerate,M=D.minBitrate,P=D.minIndex,N=D.preferHDR;L=P,_=q,w=N?x[x.length-1]:x[0],S=C,e=Math.max(e,M),this.log("picked start tier ".concat(aa(D)))}else _=null==k?void 0:k.codecSet,w=null==k?void 0:k.videoRange;for(var U=v?v.duration:f?f.duration:0,F=this.bwEstimator.getEstimateTTFB()/1e3,B=[],j=function(){var t=y[V],q=V>h;if(!t)return"continue";if(E.useMediaCapabilities&&!t.supportedResult&&!t.supportedPromise){var c=navigator.mediaCapabilities;"function"==typeof(null==c?void 0:c.decodingInfo)&&function(i,e,t,s,n,r){var a=i.videoCodec,o=i.audioCodec?i.audioGroups:null,c=null==r?void 0:r.audioCodec,l=null==r?void 0:r.channels,u=l?parseInt(l):c?1/0:2,d=null;if(null!=o&&o.length)try{d=1===o.length&&o[0]?e.groups[o[0]].channels:o.reduce((function(t,n){if(n){var r=e.groups[n];if(!r)throw new Error("Audio track group ".concat(n," not found"));Object.keys(r.channels).forEach((function(p){t[p]=(t[p]||0)+r.channels[p]}))}return t}),{2:0})}catch(e){return!0}return void 0!==a&&(a.split(",").some((function(e){return gi(e)}))||i.width>1920&&i.height>1088||i.height>1920&&i.width>1088||i.frameRate>Math.max(s,30)||"SDR"!==i.videoRange&&i.videoRange!==t||i.bitrate>Math.max(n,8e6))||!!d&&ir(u)&&Object.keys(d).some((function(e){return parseInt(e)>u}))}(t,O,w,S,e,A)?(t.supportedPromise=Wi(t,O,c,l.supportedCache),t.supportedPromise.then((function(e){if(l.hls){t.supportedResult=e;var n=l.hls.levels,r=n.indexOf(t);e.error?l.warn('MediaCapabilities decodingInfo error: "'.concat(e.error,'" for level ').concat(r," ").concat(aa(e))):e.supported?e.decodingInfoResults.some((function(e){return!1===e.smooth||!1===e.powerEfficient}))&&l.log("MediaCapabilities decodingInfo for level ".concat(r," not smooth or powerEfficient: ").concat(aa(e))):(l.warn("Unsupported MediaCapabilities decodingInfo result for level ".concat(r," ").concat(aa(e))),r>-1&&n.length>1&&(l.log("Removing unsupported level ".concat(r)),l.hls.removeLevel(r),-1===l.hls.loadLevel&&(l.hls.nextLoadLevel=0)))}})).catch((function(e){l.warn("Error handling MediaCapabilities decodingInfo: ".concat(e))}))):t.supportedResult=Vi}if((_&&t.codecSet!==_||w&&t.videoRange!==w||q&&S>t.frameRate||!q&&S>0&&S<t.frameRate||null!=(H=t.supportedResult)&&null!=(H=H.decodingInfoResults)&&H.some((function(e){return!1===e.smooth})))&&(!b||V!==L))return B.push(V),"continue";var f,m=t.details,k=(v?null==m?void 0:m.partTarget:null==m?void 0:m.averagetargetduration)||U;f=q?o*e:a*e;var I=U&&n>=2*U&&0===r?t.averageBitrate:t.maxBitrate,R=l.getTimeToLoadFrag(F,f,I*k,void 0===m);if(f>=I&&(V===u||0===t.loadError&&0===t.fragmentError)&&(R<=F||!ir(R)||T&&!l.bitrateTestDelay||R<d)){var D=l.forcedAutoLevel;return{v:(V!==g&&(-1===D||D!==g)&&(B.length&&l.trace("Skipped level(s) ".concat(B.join(",")," of ").concat(s,' max with CODECS and VIDEO-RANGE:"').concat(y[B[0]].codecs,'" ').concat(y[B[0]].videoRange,'; not compatible with "').concat(_,'" ').concat(w)),l.info("switch candidate:".concat(h,"->").concat(V," adjustedbw(").concat(Math.round(f),")-bitrate=").concat(Math.round(f-I)," ttfb:").concat(F.toFixed(1)," avgDuration:").concat(k.toFixed(1)," maxFetchDuration:").concat(d.toFixed(1)," fetchDuration:").concat(R.toFixed(1)," firstSelection:").concat(b," codecSet:").concat(t.codecSet," videoRange:").concat(t.videoRange," hls.loadLevel:").concat(g))),b&&(l.firstSelection=V),V)}}},V=s;V>=t;V--){var H,W=j();if("continue"!==W&&"object"===R(W))return W.v}return-1}},{key:"deriveNextAutoLevel",value:function(e){var t=this.hls,n=t.maxAutoLevel,s=t.minAutoLevel;return Math.min(Math.max(e,s),n)}}]),n}(Sr),va=function(i,e){for(var t=0,s=i.length-1,n=null,r=null;t<=s;){var a=e(r=i[n=(t+s)/2|0]);if(a>0)t=n+1;else{if(!(a<0))return r;s=n-1}}return null};function ma(i,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.005,r=null;if(i){r=e[1+i.sn-e[0].sn]||null;var o=i.endDTS-t;o>0&&o<15e-7&&(t+=15e-7),r&&i.level!==r.level&&r.end<=i.end&&(r=e[2+i.sn-e[0].sn]||null)}else 0===t&&0===e[0].start&&(r=e[0]);if(r&&((!i||i.level===r.level)&&0===ya(t,s,r)||ga(r,i,Math.min(n,s))))return r;var a=va(e,ya.bind(null,t,s));return!a||a===i&&r?r:a}function ga(i,e,t){if(e&&0===e.start&&e.level<i.level&&(e.endPTS||0)>0){var s=e.tagList.reduce((function(e,t){return"INF"===t[0]&&(e+=parseFloat(t[1])),e}),t);return i.start<=s}return!1}function ya(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2?arguments[2]:void 0;if(t.start<=i&&t.start+t.duration>i)return 0;var s=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-s<=i?1:t.start-s>i&&t.start?-1:0}function ba(i,e,t){var s=1e3*Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return(t.endProgramDateTime||0)-s>i}function Ea(i,e,t){if(i&&i.startCC<=e&&i.endCC>=e){var n,s=i.fragments,r=i.fragmentHint;return r&&(s=s.concat(r)),va(s,(function(a){return a.cc<e?1:a.cc>e?-1:(n=a,a.end<=t?1:a.start>t?-1:0)})),n||null}return null}function _a(i){switch(i.details){case ur.FRAG_LOAD_TIMEOUT:case ur.KEY_LOAD_TIMEOUT:case ur.LEVEL_LOAD_TIMEOUT:case ur.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function ka(i){return i.details.startsWith("key")}function Ta(i){return ka(i)&&!!i.frag&&!i.frag.decryptdata}function wa(i,e){var t=_a(e);return i.default["".concat(t?"timeout":"error","Retry")]}function Sa(i,e){var t="linear"===i.backoff?1:Math.pow(2,e);return Math.min(t*i.retryDelayMs,i.maxRetryDelayMs)}function Aa(i){return wr(wr({},i),{errorRetry:null,timeoutRetry:null})}function Ia(i,e,t,s){if(!i)return!1;var n=null==s?void 0:s.code,r=e<i.maxNumRetry&&(function(i){return Ra(i)||!!i&&(i<400||i>499)}(n)||!!t);return i.shouldRetry?i.shouldRetry(i,e,t,s,r):r}function Ra(i){return 0===i&&!1===navigator.onLine}var Oa=0,La=2,Da=3,xa=5,Ca=0,Ma=1,Pa=2,Na=4,Ua=function(e){T(n,e);var t=P(n);function n(e){var r;return A(this,n),(r=t.call(this,"error-controller",e.logger)).hls=void 0,r.playlistError=0,r.hls=e,r.registerListeners(),r}return I(n,[{key:"registerListeners",value:function(){var e=this.hls;
vendor: 6,058 bytes, line 2
2e.on(cr.ERROR,this.onError,this),e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.LEVEL_UPDATED,this.onLevelUpdated,this)}},{key:"unregisterListeners",value:function(){var e=this.hls;e&&(e.off(cr.ERROR,this.onError,this),e.off(cr.ERROR,this.onErrorOut,this),e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.LEVEL_UPDATED,this.onLevelUpdated,this))}},{key:"destroy",value:function(){this.unregisterListeners(),this.hls=null}},{key:"startLoad",value:function(e){}},{key:"stopLoad",value:function(){this.playlistError=0}},{key:"getVariantLevelIndex",value:function(e){return(null==e?void 0:e.type)===vr?e.level:this.getVariantIndex()}},{key:"getVariantIndex",value:function(){var e,t=this.hls,s=t.currentLevel;return null!=(e=t.loadLevelObj)&&e.details||-1===s?t.loadLevel:s}},{key:"variantHasKey",value:function(e,t){if(e){var s;if(null!=(s=e.details)&&s.hasKey(t))return!0;var n=e.audioGroups;if(n)return this.hls.allAudioTracks.filter((function(a){return n.indexOf(a.groupId)>=0})).some((function(a){var e;return null==(e=a.details)?void 0:e.hasKey(t)}))}return!1}},{key:"onManifestLoading",value:function(){this.playlistError=0}},{key:"onLevelUpdated",value:function(){this.playlistError=0}},{key:"onError",value:function(e,t){var s;if(!t.fatal){var n=this.hls,r=t.context;switch(t.details){case ur.FRAG_LOAD_ERROR:case ur.FRAG_LOAD_TIMEOUT:case ur.KEY_LOAD_ERROR:case ur.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case ur.FRAG_PARSING_ERROR:if(null!=(s=t.frag)&&s.gap)return void(t.errorAction=Fa());case ur.FRAG_GAP:case ur.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=La);case ur.LEVEL_EMPTY_ERROR:case ur.LEVEL_PARSING_ERROR:var a,o=t.parent===vr?t.level:n.loadLevel;return void(t.details===ur.LEVEL_EMPTY_ERROR&&null!=(a=t.context)&&null!=(a=a.levelDetails)&&a.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,o):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,o)));case ur.LEVEL_LOAD_ERROR:case ur.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==r?void 0:r.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.level)));case ur.AUDIO_TRACK_LOAD_ERROR:case ur.AUDIO_TRACK_LOAD_TIMEOUT:case ur.SUBTITLE_LOAD_ERROR:case ur.SUBTITLE_TRACK_LOAD_TIMEOUT:if(r){var c=n.loadLevelObj;if(c&&(r.type===fr&&c.hasAudioGroup(r.groupId)||r.type===pr&&c.hasSubtitleGroup(r.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=La,void(t.errorAction.flags=Ma)}return;case ur.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:return void(t.errorAction={action:La,flags:Pa});case ur.KEY_SYSTEM_SESSION_UPDATE_FAILED:case ur.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case ur.KEY_SYSTEM_NO_SESSION:return void(t.errorAction={action:La,flags:Na});case ur.BUFFER_ADD_CODEC_ERROR:case ur.REMUX_ALLOC_ERROR:case ur.BUFFER_APPEND_ERROR:var l;if(!t.errorAction)t.errorAction=this.getLevelSwitchAction(t,null!=(l=t.level)?l:n.loadLevel);return;case ur.INTERNAL_EXCEPTION:case ur.BUFFER_APPENDING_ERROR:case ur.BUFFER_FULL_ERROR:case ur.LEVEL_SWITCH_ERROR:case ur.BUFFER_STALLED_ERROR:case ur.BUFFER_SEEK_OVER_HOLE:case ur.BUFFER_NUDGE_ON_STALL:return void(t.errorAction=Fa())}t.type===sr.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=Fa())}}},{key:"getPlaylistRetryOrSwitchAction",value:function(e,t){var n=wa(this.hls.config.playlistLoadPolicy,e),r=this.playlistError++;if(Ia(n,r,_a(e),e.response))return{action:xa,flags:Ca,retryConfig:n,retryCount:r};var o=this.getLevelSwitchAction(e,t);return n&&(o.retryConfig=n,o.retryCount=r),o}},{key:"getFragRetryOrSwitchAction",value:function(e){var t=this.hls,s=this.getVariantLevelIndex(e.frag),n=t.levels[s],r=t.config,o=r.fragLoadPolicy,a=r.keyLoadPolicy,c=wa(ka(e)?a:o,e),l=t.levels.reduce((function(u,e){return u+e.fragmentError}),0);if(n&&(e.details!==ur.FRAG_GAP&&n.fragmentError++,!Ta(e)&&Ia(c,l,_a(e),e.response)))return{action:xa,flags:Ca,retryConfig:c,retryCount:l};var d=this.getLevelSwitchAction(e,s);return c&&(d.retryConfig=c,d.retryCount=l),d}},{key:"getLevelSwitchAction",value:function(e,t){var s=this.hls;null==t&&(t=s.loadLevel);var n=this.hls.levels[t];if(n){var r,a,o=e.details;n.loadError++,o===ur.BUFFER_APPEND_ERROR&&n.fragmentError++;var u=-1,c=s.levels,l=s.loadLevel,d=s.minAutoLevel,h=s.maxAutoLevel;!s.autoLevelEnabled&&!s.config.preserveManualLevelOnError&&(s.loadLevel=-1);for(var p=null==(r=e.frag)?void 0:r.type,f=(p===mr&&o===ur.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(o===ur.BUFFER_ADD_CODEC_ERROR||o===ur.BUFFER_APPEND_ERROR))&&c.some((function(e){var t=e.audioCodec;return n.audioCodec!==t})),v="video"===e.sourceBufferName&&(o===ur.BUFFER_ADD_CODEC_ERROR||o===ur.BUFFER_APPEND_ERROR)&&c.some((function(e){var t=e.codecSet,r=e.audioCodec;return n.codecSet!==t&&n.audioCodec===r})),m=null!=(a=e.context)?a:{},b=m.type,y=m.groupId,E=function(){var t=(_+l)%c.length;if(t!==l&&t>=d&&t<=h&&0===c[t].loadError){var r=c[t];if(o===ur.FRAG_GAP&&p===vr&&e.frag){var m=c[t].details;if(m){var E=ma(e.frag,m.fragments,e.frag.start);if(null!=E&&E.gap)return"continue"}}else{if(b===fr&&r.hasAudioGroup(y)||b===pr&&r.hasSubtitleGroup(y))return"continue";if(p===mr&&null!=(k=n.audioGroups)&&k.some((function(e){return r.hasAudioGroup(e)}))||p===gr&&null!=(T=n.subtitleGroups)&&T.some((function(e){return r.hasSubtitleGroup(e)}))||f&&n.audioCodec===r.audioCodec||v&&n.codecSet===r.codecSet||!f&&n.codecSet!==r.codecSet)return"continue"}return u=t,"break"}},_=c.length;_--;){var k,T,w=E();if("continue"!==w&&"break"===w)break}if(u>-1&&s.loadLevel!==u)return e.levelRetry=!0,this.playlistError=0,{action:La,flags:Ca,nextAutoLevel:u}}return{action:La,flags:Ma}}},{key:"onErrorOut",value:function(e,t){var s;switch(null==(s=t.errorAction)?void 0:s.action){case Oa:break;case La:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===ur.FRAG_GAP?/MediaSource readyState: ended/.test(t.error.message)&&(this.warn('MediaSource ended after "'.concat(t.sourceBufferName,'" sourceBuffer append error. Attempting to re
2cover from media error.')),this.hls.recoverMediaError()):t.fatal=!0}t.fatal&&this.hls.stopLoad()}},{key:"sendAlternateToPenaltyBox",value:function(e){var t=this.hls,s=e.errorAction;if(s){var n=s.flags,r=s.nextAutoLevel;switch(n){case Ca:this.switchLevel(e,r);break;case Pa:var o=this.getVariantLevelIndex(e.frag),c=t.levels[o],u=null==c?void 0:c.attrs["HDCP-LEVEL"];if(s.hdcpLevel=u,"NONE"===u)this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(u){t.maxHdcpLevel=Qi[Qi.indexOf(u)-1],s.resolved=!0,this.warn('Restricting playback to HDCP-LEVEL of "'.concat(t.maxHdcpLevel,'" or lower'));break}case Na:var l=e.decryptdata;if(l){for(var d=this.hls.levels,h=d.length,f=h;f--;)if(this.variantHasKey(d[f],l)){var a,v;this.log("Banned key found in level ".concat(f," (").concat(d[f].bitrate,'bps) or audio group "').concat(null==(a=d[f].audioGroups)?void 0:a.join(","),'" (').concat(null==(v=e.frag)?void 0:v.type," fragment) ").concat(Nr(l.keyId||[]))),d[f].fragmentError++,d[f].loadError++,this.log("Removing level ".concat(f," with key error (").concat(e.error,")")),this.hls.removeLevel(f)}var m=e.frag;if(this.hls.levels.length<h)s.resolved=!0;else if(m&&m.type!==vr){var y=m.decryptdata;y&&!l.matches(y)&&(s.resolved=!0)}}}s.resolved||this.switchLevel(e,r)}}},{key:"switchLevel",value:function(e,t){if(void 0!==t&&e.errorAction&&(this.warn("switching to level ".concat(t," after ").concat(e.details)),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===ur.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&"audiovideo"!==e.sourceBufferName))for(var s=Bi(e.mimeType),n=this.hls.levels,r=n.length;r--;)n[r]["".concat(e.sourceBufferName,"Codec")]===s&&(this.log("Removing level ".concat(r," for ").concat(e.details,' ("').concat(s,'" not supported)')),this.hls.removeLevel(r))}}]),n}(Sr);function Fa(i){var e={action:Oa,flags:Ca};return i&&(e.resolved=!0),e}var Ba="NOT_LOADED",ja="APPENDING",Va="PARTIAL",Ha="OK",Wa=function(){function e(t){A(this,e),this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=t,this._registerListeners()}return I(e,[{key:"_registerListeners",value:function(){var e=this.hls;e&&(e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.BUFFER_APPENDED,this.onBufferAppended,this),e.on(cr.FRAG_BUFFERED,this.onFragBuffered,this),e.on(cr.FRAG_LOADED,this.onFragLoaded,this))}},{key:"_unregisterListeners",value:function(){var e=this.hls;e&&(e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.BUFFER_APPENDED,this.onBufferAppended,this),e.off(cr.FRAG_BUFFERED,this.onFragBuffered,this),e.off(cr.FRAG_LOADED,this.onFragLoaded,this))}},{key:"destroy",value:function(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}},{key:"getAppendedFrag",value:function(e,t){var s=this.activePartLists[t];if(s)for(var n=s.length;n--;){var r=s[n];if(!r)break;if(r.start<=e&&e<=r.end&&r.loaded)return r}return this.getBufferedFrag(e,t)}},{key:"getBufferedFrag",value:function(e,t){return this.getFragAtPos(e,t,!0)}},{key:"getFragAtPos",value:function(e,t,s){for(var n=this.fragments,r=Object.keys(n),a=r.length;a--;){var o=n[r[a]];if((null==o?void 0:o.body.type)===t&&(!s||o.buffered)){var c=o.body;if(c.start<=e&&e<=c.end)return c}}return null}},{key:"detectEvictedFragments",value:function(e,t,s,n,r){var o=this;this.timeRanges&&(this.timeRanges[e]=t);var a=(null==n?void 0:n.fragment.sn)||-1;Object.keys(this.fragments).forEach((function(n){var c=o.fragments[n];if(c&&!(a>=c.body.sn))if(c.buffered||c.loaded&&!r){var l=c.range[e];if(l){if(0===l.time.length)return void o.removeFragment(c.body);l.time.some((function(u){var e=!o.isTimeBuffered(u.startPTS,u.endPTS,t);return e&&o.removeFragment(c.body),e}))}}else c.body.type===s&&o.removeFragment(c.body)}))}},{key:"detectPartialFragments",value:function(e){var t=this,n=this.timeRanges;if(n&&"initSegment"!==e.frag.sn){var s=e.frag,r=Ga(s),o=this.fragments[r];if(!(!o||o.buffered&&s.gap)){var a=!s.relurl;
vendor: 27,398 bytes, line 2
2Object.keys(n).forEach((function(r){var c=s.elementaryStreams[r];if(c){var l=n[r],u=a||!0===c.partial;o.range[r]=t.getBufferedTimes(s,e.part,u,l)}})),o.loaded=null,Object.keys(o.range).length?(this.bufferedEnd(o,s),qa(o)||this.removeParts(s.sn-1,s.type)):this.removeFragment(o.body)}}}},{key:"bufferedEnd",value:function(e,t){e.buffered=!0,(e.body.endList=t.endList||e.body.endList)&&(this.endListFragments[e.body.type]=e)}},{key:"removeParts",value:function(e,t){var s=this.activePartLists[t];s&&(this.activePartLists[t]=Ka(s,(function(t){return t.fragment.sn>=e})))}},{key:"fragBuffered",value:function(e,t){var s=Ga(e),n=this.fragments[s];!n&&t&&(n=this.fragments[s]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),n&&(n.loaded=null,this.bufferedEnd(n,e))}},{key:"getBufferedTimes",value:function(e,t,s,n){for(var r={time:[],partial:s},a=e.start,o=e.end,c=e.minEndPTS||o,l=e.maxStartPTS||a,u=0;u<n.length;u++){var d=n.start(u)-this.bufferPadding,h=n.end(u)+this.bufferPadding;if(l>=d&&c<=h){r.time.push({startPTS:Math.max(a,n.start(u)),endPTS:Math.min(o,n.end(u))});break}if(a<h&&o>d){var f=Math.max(a,n.start(u)),v=Math.min(o,n.end(u));v>f&&(r.partial=!0,r.time.push({startPTS:f,endPTS:v}))}else if(o<=d)break}return r}},{key:"getPartialFragment",value:function(e){var s,t,n,r=null,a=0,o=this.bufferPadding,c=this.fragments;return Object.keys(c).forEach((function(l){var u=c[l];u&&qa(u)&&(t=u.body.start-o,n=u.body.end+o,e>=t&&e<=n&&(s=Math.min(e-t,n-e),a<=s&&(r=u.body,a=s)))})),r}},{key:"isEndListAppended",value:function(e){var t=this.endListFragments[e];return void 0!==t&&(t.buffered||qa(t))}},{key:"getState",value:function(e){var t=Ga(e),s=this.fragments[t];return s?s.buffered?qa(s)?Va:Ha:ja:Ba}},{key:"isTimeBuffered",value:function(e,t,s){for(var n,r,a=0;a<s.length;a++){if(n=s.start(a)-this.bufferPadding,r=s.end(a)+this.bufferPadding,e>=n&&t<=r)return!0;if(t<=n)return!1}return!1}},{key:"onManifestLoading",value:function(){this.removeAllFragments()}},{key:"onFragLoaded",value:function(e,t){if("initSegment"!==t.frag.sn&&!t.frag.bitrateTest){var s=t.frag,n=t.part?null:t,r=Ga(s);this.fragments[r]={body:s,appendedPTS:null,loaded:n,buffered:!1,range:Object.create(null)}}}},{key:"onBufferAppended",value:function(e,t){var s=t.frag,n=t.part,r=t.timeRanges,a=t.type;if("initSegment"!==s.sn){var o=s.type;if(n){var c=this.activePartLists[o];c||(this.activePartLists[o]=c=[]),c.push(n)}this.timeRanges=r;var l=r[a];this.detectEvictedFragments(a,l,o,n)}}},{key:"onFragBuffered",value:function(e,t){this.detectPartialFragments(t)}},{key:"hasFragment",value:function(e){var t=Ga(e);return!!this.fragments[t]}},{key:"hasFragments",value:function(e){var t=this.fragments,s=Object.keys(t);if(!e)return s.length>0;for(var n=s.length;n--;){var r=t[s[n]];if((null==r?void 0:r.body.type)===e)return!0}return!1}},{key:"hasParts",value:function(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)}},{key:"removeFragmentsInRange",value:function(e,t,s,n,r){var o=this;n&&!this.hasGaps||Object.keys(this.fragments).forEach((function(a){var c=o.fragments[a];if(c){var l=c.body;l.type!==s||n&&!l.gap||l.start<t&&l.end>e&&(c.buffered||r)&&o.removeFragment(l)}}))}},{key:"removeFragment",value:function(e){var t=Ga(e);e.clearElementaryStreamInfo();var s=this.activePartLists[e.type];if(s){var n=e.sn;this.activePartLists[e.type]=Ka(s,(function(e){return e.fragment.sn!==n}))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}},{key:"removeAllFragments",value:function(){var e;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;var t=null==(e=this.hls)||null==(e=e.latestLevelDetails)?void 0:e.partList;t&&t.forEach((function(s){return s.clearElementaryStreamInfo()}))}}]),e}();function qa(i){var e,t,s;return i.buffered&&!!(i.body.gap||null!=(e=i.range.video)&&e.partial||null!=(t=i.range.audio)&&t.partial||null!=(s=i.range.audiovideo)&&s.partial)}function Ga(i){return"".concat(i.type,"_").concat(i.level,"_").concat(i.sn)}function Ka(i,e){return i.filter((function(t){var s=e(t);return s||t.clearElementaryStreamInfo(),s}))}var Ya=0,$a=1,Qa=function(){function e(t,n,s){A(this,e),this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=t,this.aesIV=n,this.aesMode=s}return I(e,[{key:"decrypt",value:function(e,t){switch(this.aesMode){case Ya:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case $a:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error("[AESCrypto] invalid aes mode ".concat(this.aesMode))}}}]),e}();var za=function(){function e(){A(this,e),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}return I(e,[{key:"uint8ArrayToUint32Array_",value:function(e){for(var t=new DataView(e),s=new Uint32Array(4),n=0;n<4;n++)s[n]=t.getUint32(4*n);return s}},{key:"initTable",value:function(){var e=this.sBox,t=this.invSBox,s=this.subMix,n=s[0],r=s[1],a=s[2],o=s[3],c=this.invSubMix,l=c[0],u=c[1],d=c[2],h=c[3],f=new Uint32Array(256),v=0,p=0,g=0;for(g=0;g<256;g++)f[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){var m=p^p<<1^p<<2^p<<3^p<<4;m=m>>>8^255&m^99,e[v]=m,t[m]=v;var y=f[v],E=f[y],b=f[E],_=257*f[m]^16843008*m;n[v]=_<<24|_>>>8,r[v]=_<<16|_>>>16,a[v]=_<<8|_>>>24,o[v]=_,_=16843009*b^65537*E^257*y^16843008*v,l[m]=_<<24|_>>>8,u[m]=_<<16|_>>>16,d[m]=_<<8|_>>>24,h[m]=_,v?(v=y^f[f[f[b^y]]],p^=f[f[p]]):v=p=1}}},{key:"expandKey",value:function(e){for(var t=this.uint8ArrayToUint32Array_(e),s=!0,n=0;n<t.length&&s;)s=t[n]===this.key[n],n++;if(!s){this.key=t;var r=this.keySize=t.length;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size="+r);var o,c,l,d,a=this.ksRows=4*(r+6+1),h=this.keySchedule=new Uint32Array(a),u=this.invKeySchedule=new Uint32Array(a),f=this.sBox,v=this.rcon,m=this.invSubMix,y=m[0],p=m[1],g=m[2],E=m[3];for(o=0;o<a;o++)o<r?l=h[o]=t[o]:(d=l,o%r==0?(d=f[(d=d<<8|d>>>24)>>>24]<<24|f[d>>>16&255]<<16|f[d>>>8&255]<<8|f[255&d],d^=v[o/r|0]<<24):r>6&&o%r==4&&(d=f[d>>>24]<<24|f[d>>>16&255]<<16|f[d>>>8&255]<<8|f[255&d]),h[o]=l=(h[o-r]^d)>>>0);for(c=0;c<a;c++)o=a-c,d=3&c?h[o]:h[o-4],u[c]=c<4||o<=4?d:y[f[d>>>24]]^p[f[d>>>16&255]]^g[f[d>>>8&255]]^E[f[255&d]],u[c]=u[c]>>>0}}},{key:"networkToHostOrderSwap",value:function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}},{key:"decrypt",value:function(e,t,s){for(var n,b,r,o,c,l,d,h,f,v,m,y,E,_,k=this.keySize+6,T=this.invKeySchedule,a=this.invSBox,w=this.invSubMix,S=w[0],A=w[1],u=w[2],I=w[3],R=this.uint8ArrayToUint32Array_(s),O=R[0],L=R[1],p=R[2],g=R[3],D=new Int32Array(e),x=new Int32Array(D.length),C=this.networkToHostOrderSwap;t<D.length;){for(f=C(D[t]),v=C(D[t+1]),m=C(D[t+2]),y=C(D[t+3]),c=f^T[0],l=y^T[1],d=m^T[2],h=v^T[3],E=4,_=1;_<k;_++)n=S[c>>>24]^A[l>>16&255]^u[d>>8&255]^I[255&h]^T[E],b=S[l>>>24]^A[d>>16&255]^u[h>>8&255]^I[255&c]^T[E+1],r=S[d>>>24]^A[h>>16&255]^u[c>>8&255]^I[255&l]^T[E+2],o=S[h>>>24]^A[c>>16&255]^u[l>>8&255]^I[255&d]^T[E+3],c=n,l=b,d=r,h=o,E+=4;n=a[c>>>24]<<24^a[l>>16&255]<<16^a[d>>8&255]<<8^a[255&h]^T[E],b=a[l>>>24]<<24^a[d>>16&255]<<16^a[h>>8&255]<<8^a[255&c]^T[E+1],r=a[d>>>24]<<24^a[h>>16&255]<<16^a[c>>8&255]<<8^a[255&l]^T[E+2],o=a[h>>>24]<<24^a[c>>16&255]<<16^a[l>>8&255]<<8^a[255&d]^T[E+3],x[t]=C(n^O),x[t+1]=C(o^L),x[t+2]=C(r^p),x[t+3]=C(b^g),O=f,L=v,p=m,g=y,t+=4}return x.buffer}}]),e}(),Xa=function(){function e(t,n,s){A(this,e),this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=t,this.key=n,this.aesMode=s}return I(e,[{key:"expandKey",value:function(){var e=function(i){switch(i){case Ya:return"AES-CBC";case $a:return"AES-CTR";default:throw new Error("[FastAESKey] invalid aes mode ".concat(i))}}(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}]),e}();var Ja=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.removePKCS7Padding,o=void 0===r||r;if(A(this,e),this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=t.enableSoftwareAES,this.removePKCS7Padding=o,o)try{var s=self.crypto;s&&(this.subtle=s.subtle||s.webkitSubtle)}catch(e){}this.useSoftware=!this.subtle}return I(e,[{key:"destroy",value:function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}},{key:"isSync",value:function(){return this.useSoftware}},{key:"flush",value:function(){var e=this.currentResult,t=this.remainderData;if(!e||t)return this.reset(),null;var s=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?function(i){var e=i.byteLength,t=e&&new DataView(i.buffer).getUint8(e-1);return t?i.slice(0,e-t):i}(s):s}},{key:"reset",value:function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}},{key:"decrypt",value:function(e,t,s,n){var r=this;return this.useSoftware?new Promise((function(o,a){var c=ArrayBuffer.isView(e)?e:new Uint8Array(e);r.softwareDecrypt(c,t,s,n);var l=r.flush();l?o(l.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))})):this.webCryptoDecrypt(new Uint8Array(e),t,s,n)}},{key:"softwareDecrypt",value:function(e,t,s,n){var r=this.currentIV,a=this.currentResult,o=this.remainderData;if(n!==Ya||16!==t.byteLength)return xr.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),o&&(e=vi(o,e),this.remainderData=null);var c=this.getValidChunk(e);if(!c.length)return null;r&&(s=r);var l=this.softwareDecrypter;l||(l=this.softwareDecrypter=new za),l.expandKey(t);var u=a;return this.currentResult=l.decrypt(c.buffer,0,s),this.currentIV=c.slice(-16).buffer,u||null}},{key:"webCryptoDecrypt",value:function(e,t,s,n){var r=this;if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,s,n));this.key=t,this.fastAesKey=new Xa(this.subtle,t,n)}return this.fastAesKey.expandKey().then((function(t){return r.subtle?(r.logOnce("WebCrypto AES decrypt"),new Qa(r.subtle,new Uint8Array(s),n).decrypt(e.buffer,t)):Promise.reject(new Error("web crypto not initialized"))})).catch((function(o){return xr.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, ".concat(o.name,": ").concat(o.message)),r.onWebCryptoError(e,t,s,n)}))}},{key:"onWebCryptoError",value:function(e,t,s,n){var r=this.enableSoftwareAES;if(r){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,s,n);var a=this.flush();if(a)return a.buffer}throw new Error("WebCrypto"+(r?" and softwareDecrypt":"")+": failed to decrypt data")}},{key:"getValidChunk",value:function(e){var t=e,s=e.length-e.length%16;return s!==e.length&&(t=e.slice(0,s),this.remainderData=e.slice(s)),t}},{key:"logOnce",value:function(e){this.logEnabled&&(xr.log("[decrypter]: ".concat(e)),this.logEnabled=!1)}}]),e}(),Za=Math.pow(2,17),eo=function(){function e(t){A(this,e),this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}return I(e,[{key:"destroy",value:function(){this.loader&&(this.loader.destroy(),this.loader=null)}},{key:"abort",value:function(){this.loader&&this.loader.abort()}},{key:"load",value:function(e,t){var n=this,s=e.url;if(!s)return Promise.reject(new io({type:sr.NETWORK_ERROR,details:ur.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a ".concat(s?"part list":"url")),networkDetails:null}));this.abort();var r=this.config,o=r.fLoader,a=r.loader;return new Promise((function(c,l){if(n.loader&&n.loader.destroy(),e.gap){if(e.tagList.some((function(e){return"GAP"===e[0]})))return void l(no(e));e.gap=!1}var d=n.loader=o?new o(r):new a(r),u=to(e);e.loader=d;var h=Aa(r.fragLoadPolicy.default),f={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:Za};e.stats=d.stats;var v={onSuccess:function(t,p,g,r){n.resetLoader(e,d);var o=t.data;g.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(o.slice(0,16)),o=o.slice(16)),c({frag:e,part:null,payload:o,networkDetails:r})},onError:function(t,p,g,r){n.resetLoader(e,d),l(new io({type:sr.NETWORK_ERROR,details:ur.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:wr({url:s,data:void 0},t),error:new Error("HTTP Error ".concat(t.code," ").concat(t.text)),networkDetails:g,stats:r}))},onAbort:function(t,p,g){n.resetLoader(e,d),l(new io({type:sr.NETWORK_ERROR,details:ur.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:g,stats:t}))},onTimeout:function(t,p,g){n.resetLoader(e,d),l(new io({type:sr.NETWORK_ERROR,details:ur.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error("Timeout after ".concat(f.timeout,"ms")),networkDetails:g,stats:t}))}};t&&(v.onProgress=function(n,p,g,r){return t({frag:e,part:null,payload:g,networkDetails:r})}),d.load(u,f,v)}))}},{key:"loadPart",value:function(e,t,s){var n=this;this.abort();var r=this.config,o=r.fLoader,a=r.loader;return new Promise((function(c,l){if(n.loader&&n.loader.destroy(),e.gap||t.gap)l(no(e,t));else{var d=n.loader=o?new o(r):new a(r),u=to(e,t);e.loader=d;var h=Aa(r.fragLoadPolicy.default),f={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Za};t.stats=d.stats,d.load(u,f,{onSuccess:function(r,o,p,g){n.resetLoader(e,d),n.updateStatsFromPart(e,t);var l={frag:e,part:t,payload:r.data,networkDetails:g};s(l),c(l)},onError:function(r,o,p,g){n.resetLoader(e,d),l(new io({type:sr.NETWORK_ERROR,details:ur.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:wr({url:u.url,data:void 0},r),error:new Error("HTTP Error ".concat(r.code," ").concat(r.text)),networkDetails:p,stats:g}))},onAbort:function(r,o,p){e.stats.aborted=t.stats.aborted,n.resetLoader(e,d),l(new io({type:sr.NETWORK_ERROR,details:ur.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:p,stats:r}))},onTimeout:function(r,o,p){n.resetLoader(e,d),l(new io({type:sr.NETWORK_ERROR,details:ur.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error("Timeout after ".concat(f.timeout,"ms")),networkDetails:p,stats:r}))}})}}))}},{key:"updateStatsFromPart",value:function(e,t){var s=e.stats,n=t.stats,r=n.total;if(s.loaded+=n.loaded,r){var o=Math.round(e.duration/t.duration),c=Math.min(Math.round(s.loaded/r),o),l=(o-c)*Math.round(s.loaded/c);s.total=s.loaded+l}else s.total=Math.max(s.loaded,s.total);var a=s.loading,d=n.loading;a.start?a.first+=d.first-d.start:(a.start=d.start,a.first=d.first),a.end=d.end}},{key:"resetLoader",value:function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}]),e}();function to(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=e||i,s={frag:i,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},n=t.byteRangeStartOffset,r=t.byteRangeEndOffset;if(ir(n)&&ir(r)){var a,o=n,c=r;if("initSegment"===i.sn&&ro(null==(a=i.decryptdata)?void 0:a.method)){var l=r-n;l%16&&(c=r+(16-l%16)),0!==n&&(s.resetIV=!0,o=n-16)}s.rangeStart=o,s.rangeEnd=c}return s}function no(i,e){var t=new Error("GAP ".concat(i.gap?"tag":"attribute"," found")),s={type:sr.MEDIA_ERROR,details:ur.FRAG_GAP,fatal:!1,frag:i,error:t,networkDetails:null};return e&&(s.part=e),(e||i).stats.aborted=!0,new io(s)}function ro(i){return"AES-128"===i||"AES-256"===i}var io=function(e){T(n,e);var t=P(n);function n(e){var r;return A(this,n),(r=t.call(this,e.error.message)).data=void 0,r.data=e,r}return I(n)}(E(Error)),ao=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this,e,r))._boundTick=void 0,o._tickTimer=null,o._tickInterval=null,o._tickCallCount=0,o._boundTick=o.tick.bind(_(o)),o}return I(n,[{key:"destroy",value:function(){this.onHandlerDestroying(),this.onHandlerDestroyed()}},{key:"onHandlerDestroying",value:function(){this.clearNextTick(),this.clearInterval()}},{key:"onHandlerDestroyed",value:function(){}},{key:"hasInterval",value:function(){return!!this._tickInterval}},{key:"hasNextTick",value:function(){return!!this._tickTimer}},{key:"setInterval",value:function(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}},{key:"clearInterval",value:function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)}},{key:"clearNextTick",value:function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)}},{key:"tick",value:function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}},{key:"tickImmediate",value:function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}},{key:"doTick",value:function(){}}]),n}(Sr),oo=I((function e(t,n,s){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];A(this,e),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=t,this.sn=n,this.id=s,this.size=r,this.part=o,this.partial=a}));var so={length:0,start:function(){return 0},end:function(){return 0}},uo=function(){function i(){A(this,i)}return I(i,null,[{key:"isBuffered",value:function(e,t){if(e)for(var s=i.getBuffered(e),n=s.length;n--;)if(t>=s.start(n)&&t<=s.end(n))return!0;return!1}},{key:"bufferedRanges",value:function(e){if(e){var t=i.getBuffered(e);return i.timeRangesToArray(t)}return[]}},{key:"timeRangesToArray",value:function(e){for(var t=[],s=0;s<e.length;s++)t.push({start:e.start(s),end:e.end(s)});return t}},{key:"bufferInfo",value:function(e,t,s){if(e){var n=i.bufferedRanges(e);if(n.length)return i.bufferedInfo(n,t,s)}return{len:0,start:t,end:t,bufferedIndex:-1}}},{key:"bufferedInfo",value:function(e,t,s){t=Math.max(0,t),e.length>1&&e.sort((function(u,e){return u.start-e.start||e.end-u.end}));var n=-1,r=[];if(s)for(var u=0;u<e.length;u++){t>=e[u].start&&t<=e[u].end&&(n=u);var o=r.length;if(o){var c=r[o-1].end;e[u].start-c<s?e[u].end>c&&(r[o-1].end=e[u].end):r.push(e[u])}else r.push(e[u])}else r=e;for(var l,a=0,d=t,h=t,f=0;f<r.length;f++){var v=r[f].start,m=r[f].end;if(-1===n&&t>=v&&t<=m&&(n=f),t+s>=v&&t<m)d=v,a=(h=m)-t;else if(t+s<v){l=v;break}}return{len:a,start:d||0,end:h||0,nextStart:l,buffered:e,bufferedIndex:n}}},{key:"getBuffered",value:function(e){try{return e.buffered||so}catch(e){return xr.log("failed to get media.buffered",e),so}}}]),i}(),co=/\{\$([a-zA-Z0-9-_]+)\}/g;function lo(i){return co.test(i)}function ho(i,e){if(null!==i.variableList||i.hasVariableRefs){var t=i.variableList;return e.replace(co,(function(s){var e=s.substring(2,s.length-1),n=null==t?void 0:t[e];return void 0===n?(i.playlistParsingError||(i.playlistParsingError=new Error('Missing preceding EXT-X-DEFINE tag for Variable Reference: "'.concat(e,'"'))),s):n}))}return e}function fo(i,e,t){var n,r,s=i.variableList;if(s||(i.variableList=s={}),"QUERYPARAM"in e){n=e.QUERYPARAM;try{var a=new self.URL(t).searchParams;if(!a.has(n))throw new Error('"'.concat(n,'" does not match any query parameter in URI: "').concat(t,'"'));r=a.get(n)}catch(a){i.playlistParsingError||(i.playlistParsingError=new Error("EXT-X-DEFINE QUERYPARAM: ".concat(a.message)))}}else n=e.NAME,r=e.VALUE;n in s?i.playlistParsingError||(i.playlistParsingError=new Error('EXT-X-DEFINE duplicate Variable Name declarations: "'.concat(n,'"'))):s[n]=r||""}function po(i,e,t){var s=e.IMPORT;if(t&&s in t){var n=i.variableList;n||(i.variableList=n={}),n[s]=t[s]}else i.playlistParsingError||(i.playlistParsingError=new Error('EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "'.concat(s,'"')))}var vo=/^(\d+)x(\d+)$/,mo=/(.+?)=(".*?"|.*?)(?:,|$)/g,go=function(){function i(e,t){A(this,i),"string"==typeof e&&(e=i.parseAttrList(e,t)),kr(this,e)}return I(i,[{key:"clientAttrs",get:function(){return Object.keys(this).filter((function(e){return"X-"===e.substring(0,2)}))}},{key:"decimalInteger",value:function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}},{key:"hexadecimalInteger",value:function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var s=new Uint8Array(t.length/2),n=0;n<t.length/2;n++)s[n]=parseInt(t.slice(2*n,2*n+2),16);return s}return null}},{key:"hexadecimalIntegerAsNumber",value:function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}},{key:"decimalFloatingPoint",value:function(e){return parseFloat(this[e])}},{key:"optionalFloat",value:function(e,t){var s=this[e];return s?parseFloat(s):t}},{key:"enumeratedString",value:function(e){return this[e]}},{key:"enumeratedStringList",value:function(e,t){var s=this[e];return(s?s.split(/[ ,]+/):[]).reduce((function(e,t){return e[t.toLowerCase()]=!0,e}),t)}},{key:"bool",value:function(e){return"YES"===this[e]}},{key:"decimalResolution",value:function(e){var t=vo.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}}],[{key:"parseAttrList",value:function(e,t){var s,n={};for(mo.lastIndex=0;null!==(s=mo.exec(e));){var a=s[1].trim(),r=s[2],o=0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1,c=!1;if(o)r=r.slice(1,-1);else switch(a){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(o||c))r=ho(t,r);else if(!c&&!o)switch(a){case"CLOSED-CAPTIONS":if("NONE"===r)break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":xr.warn("".concat(e,": attribute ").concat(a," is missing quotes"))}n[a]=r}return n}}]),i}();function yo(i){return"ID"!==i&&"CLASS"!==i&&"CUE"!==i&&"START-DATE"!==i&&"DURATION"!==i&&"END-DATE"!==i&&"END-ON-NEXT"!==i}function bo(i){return"SCTE35-OUT"===i||"SCTE35-IN"===i||"SCTE35-CMD"===i}var Eo=function(){function e(t,n){var r,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(A(this,e),this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(null==n?void 0:n.tagAnchor)||null,this.tagOrder=null!=(r=null==n?void 0:n.tagOrder)?r:s,n){var o=n.attr;for(var a in o)if(Object.prototype.hasOwnProperty.call(t,a)&&t[a]!==o[a]){xr.warn('DATERANGE tag attribute: "'.concat(a,'" does not match for tags with ID: "').concat(t.ID,'"')),this._badValueForSameId=a;break}t=kr(new go({}),o,t)}if(this.attr=t,n?(this._startDate=n._startDate,this._cue=n._cue,this._endDate=n._endDate,this._dateAtEnd=n._dateAtEnd):this._startDate=new Date(t["START-DATE"]),"END-DATE"in this.attr){var c=(null==n?void 0:n.endDate)||new Date(this.attr["END-DATE"]);ir(c.getTime())&&(this._endDate=c)}}return I(e,[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"cue",get:function(){var e=this._cue;return void 0===e?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}},{key:"startTime",get:function(){var e=this.tagAnchor;return null===e||null===e.programDateTime?(xr.warn('Expected tagAnchor Fragment with PDT set for DateRange "'.concat(this.id,'": ').concat(e)),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){var e=this._endDate||this._dateAtEnd;if(e)return e;var t=this.duration;return null!==t?this._dateAtEnd=new Date(this._startDate.getTime()+1e3*t):null}},{key:"duration",get:function(){if("DURATION"in this.attr){var e=this.attr.decimalFloatingPoint("DURATION");if(ir(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}},{key:"endOnNext",get:function(){return this.attr.bool("END-ON-NEXT")}},{key:"isInterstitial",get:function(){return"com.apple.hls.interstitial"===this.class}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&ir(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}]),e}(),_o=function(){function e(t){A(this,e),this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=t}return I(e,[{key:"reloaded",value:function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,s=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!s||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&s>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1}},{key:"hasKey",value:function(e){return this.encryptedFragments.some((function(t){var s=t.decryptdata;return s||(t.setKeyFormat(e.keyFormat),s=t.decryptdata),!!s&&e.matches(s)}))}},{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&ir(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}}
vendor: 16,282 bytes, line 2
2,{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}},{key:"fragmentStart",get:function(){return this.fragments.length?this.fragments[0].start:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"maxPartIndex",get:function(){var e=this.partList;if(e){var t=this.lastPartIndex;if(-1!==t){for(var s=e.length;s--;)if(e[s].index>t)return e[s].index;return t}}return 0}},{key:"lastPartSn",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}},{key:"expired",get:function(){if(this.live&&this.age&&this.misses<3){var e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}]),e}();function ko(i,e){return i.length===e.length&&!i.some((function(t,s){return t!==e[s]}))}function To(i,e){return!i&&!e||!(!i||!e)&&ko(i,e)}function wo(i){return"AES-128"===i||"AES-256"===i||"AES-256-CTR"===i}function So(i){switch(i){case"AES-128":case"AES-256":return Ya;case"AES-256-CTR":return $a;default:throw new Error("invalid full segment method ".concat(i))}}function Ao(i){return Uint8Array.from(atob(i),(function(e){return e.charCodeAt(0)}))}function Io(i){return Uint8Array.from(unescape(encodeURIComponent(i)),(function(e){return e.charCodeAt(0)}))}function Ro(i){var e=function(s,e,t){var a=s[e];s[e]=s[t],s[t]=a};e(i,0,3),e(i,1,2),e(i,4,5),e(i,6,7)}function Oo(i){var e=i.split(":"),t=null;if("data"===e[0]&&2===e.length){var s=e[1].split(";"),n=s[s.length-1].split(",");if(2===n.length){var r="base64"===n[0],a=n[1];r?(s.splice(-1,1),t=Ao(a)):t=function(i){var e=Io(i).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}(a)}}return t}var Lo="undefined"!=typeof self?self:void 0,Do={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},xo="org.w3.clearkey",Co="com.apple.streamingkeydelivery",Mo="com.microsoft.playready",Po="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function No(i){switch(i){case Co:return Do.FAIRPLAY;case Mo:return Do.PLAYREADY;case Po:return Do.WIDEVINE;case xo:return Do.CLEARKEY}}function Uo(i){switch(i){case Do.FAIRPLAY:return Co;case Do.PLAYREADY:return Mo;case Do.WIDEVINE:return Po;case Do.CLEARKEY:return xo}}function Fo(i){var e=i.drmSystems,t=i.widevineLicenseUrl,s=e?[Do.FAIRPLAY,Do.WIDEVINE,Do.PLAYREADY,Do.CLEARKEY].filter((function(t){return!!e[t]})):[];return!s[Do.WIDEVINE]&&t&&s.push(Do.WIDEVINE),s}var Bo=function(i){return null!=Lo&&null!=(i=Lo.navigator)&&i.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function jo(i){var e=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),s=t.substring(t.indexOf("<"),t.length),a=(new DOMParser).parseFromString(s,"text/xml").getElementsByTagName("KID")[0];if(a){var n=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(n){var r=Ao(n).subarray(0,16);return Ro(r),r}}return null}var Vo={},Ho=function(){function i(e,t,s){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[1],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5?arguments[5]:void 0;A(this,i),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=s,this.keyFormatVersions=n,this.iv=r,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&!wo(e),null!=a&&a.startsWith("0x")&&(this.keyId=new Uint8Array(Ur(a)))}return I(i,[{key:"matches",value:function(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&ko(e.keyFormatVersions,this.keyFormatVersions)&&To(e.iv,this.iv)&&To(e.keyId,this.keyId)}},{key:"isSupported",value:function(){if(this.method){if(wo(this.method)||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case Co:case Po:case Mo:case xo:return-1!==["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1}},{key:"getDecryptData",value:function(e,t){if(!this.encrypted||!this.uri)return null;if(wo(this.method)){var n=this.iv;return n||("number"!=typeof e&&(xr.warn('missing IV for initialization segment with method="'.concat(this.method,'" - compliance issue')),e=0),n=function(i){for(var e=new Uint8Array(16),t=12;t<16;t++)e[t]=i>>8*(15-t)&255;return e}(e)),new i(this.method,this.uri,"identity",this.keyFormatVersions,n)}if(this.keyId){var r=Vo[this.uri];if(r&&!ko(this.keyId,r)&&i.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}var o,s=Oo(this.uri);if(s)switch(this.keyFormat){case Po:if(this.pssh=s,!this.keyId){var c=function(i){var e=[];if(i instanceof ArrayBuffer)for(var t=i.byteLength,s=0;s+32<t;){var n=ki(new DataView(i,s));e.push(n),s+=n.size}return e}(s.buffer);if(c.length){var l,a=c[0];this.keyId=null!=(l=a.kids)&&l.length?a.kids[0]:null}}this.keyId||(this.keyId=Wo(t));break;case Mo:var d=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=_i(d,0,s),this.keyId=jo(s);break;default:var h=s.subarray(0,16);if(16!==h.length){var f=new Uint8Array(16);f.set(h,16-h.length),h=f}this.keyId=h}this.keyId&&16===this.keyId.byteLength||((o=function(i){var e=null==i?void 0:i[Po];return e?e.keyId:null}(t))||((o=Wo(t))||(o=Vo[this.uri])),o&&(this.keyId=o,i.setKeyIdForUri(this.uri,o)));return this}}],[{key:"clearKeyUriToKeyIdMap",value:function(){Vo={}}},{key:"setKeyIdForUri",value:function(e,t){Vo[e]=t}},{key:"addKeyIdForUri",value:function(e){var t=Object.keys(Vo).length%Number.MAX_SAFE_INTEGER,s=new Uint8Array(16);return new DataView(s.buffer,12,4).setUint32(0,t),Vo[e]=s,s}}]),i}();function Wo(i){var e=null==i?void 0:i[Mo];if(e){var t=Oo(e.uri);if(t)return jo(t)}return null}var qo=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,Go=/#EXT-X-MEDIA:(.*)/g,Ko=/^#EXT(?:INF|-X-TARGETDURATION):/m,Yo=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),$o=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),Qo=function(){function i(){A(this,i)}return I(i,null,[{key:"findGroup",value:function(e,t){for(var s=0;s<e.length;s++){var n=e[s];if(n.id===t)return n}}},{key:"resolve",value:function(e,t){return jr.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}},{key:"isMediaPlaylist",value:function(e){return Ko.test(e)}},{key:"parseMasterPlaylist",value:function(e,t){var a,n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:lo(e)},r=[];if(qo.lastIndex=0,!e.startsWith("#EXTM3U"))return n.playlistParsingError=new Error("no EXTM3U delimiter"),n;for(;null!=(a=qo.exec(e));)if(a[1]){var o,c=new go(a[1],n),u=ho(n,a[2]),l={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:i.resolve(u,t)},d=c.decimalResolution("RESOLUTION");d&&(l.width=d.width,l.height=d.height),es(c.CODECS,l);var h=c["SUPPLEMENTAL-CODECS"];h&&(l.supplemental={},es(h,l.supplemental)),null!=(o=l.unknownCodecs)&&o.length||r.push(l),n.levels.push(l)}else if(a[3]){var f=a[3],v=a[4];switch(f){case"SESSION-DATA":var m=new go(v,n),y=m["DATA-ID"];y&&(null===n.sessionData&&(n.sessionData={}),n.sessionData[y]=m);break;case"SESSION-KEY":var E=Jo(v,t,n);E.encrypted&&E.isSupported()?(null===n.sessionKeys&&(n.sessionKeys=[]),n.sessionKeys.push(E)):xr.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'.concat(v,'"'));break;case"DEFINE":fo(n,new go(v,n),t);break;case"CONTENT-STEERING":var _=new go(v,n);n.contentSteering={uri:i.resolve(_["SERVER-URI"],t),pathwayId:_["PATHWAY-ID"]||"."};break;case"START":n.startTimeOffset=Zo(v)}}var k=r.length>0&&r.length<n.levels.length;return n.levels=k?r:n.levels,0===n.levels.length&&(n.playlistParsingError=new Error("no levels found in manifest")),n}},{key:"parseMasterPlaylistMedia",value:function(e,t,s){var n,r={},a=s.levels,o={AUDIO:a.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),SUBTITLES:a.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),"CLOSED-CAPTIONS":[]},c=0;for(Go.lastIndex=0;null!==(n=Go.exec(e));){var l=new go(n[1],s),u=l.TYPE;if(u){var d=o[u],h=r[u]||[];r[u]=h;var f=l.LANGUAGE,v=l["ASSOC-LANGUAGE"],p=l.CHANNELS,g=l.CHARACTERISTICS,m=l["INSTREAM-ID"],y={attrs:l,bitrate:0,id:c++,groupId:l["GROUP-ID"]||"",name:l.NAME||f||"",type:u,default:l.bool("DEFAULT"),autoselect:l.bool("AUTOSELECT"),forced:l.bool("FORCED"),lang:f,url:l.URI?i.resolve(l.URI,t):""};if(v&&(y.assocLang=v),p&&(y.channels=p),g&&(y.characteristics=g),m&&(y.instreamId=m),null!=d&&d.length){var E=i.findGroup(d,y.groupId)||d[0];ts(y,E,"audioCodec"),ts(y,E,"textCodec")}h.push(y)}}return r}},{key:"parseLevelPlaylist",value:function(e,t,s,n,r,a){var o,b,c,l,d,h={url:t},f=new _o(t),u=f.fragments,v=[],m=null,y=0,E=0,p=0,g=0,_=0,k=null,T=new Yr(n,h),w=-1,S=!1,A=null;if(Yo.lastIndex=0,f.m3u8=e,f.hasVariableRefs=lo(e),"#EXTM3U"!==(null==(o=Yo.exec(e))?void 0:o[0]))return f.playlistParsingError=new Error("Missing format identifier #EXTM3U"),f;for(;null!==(b=Yo.exec(e));){S&&(S=!1,(T=new Yr(n,h)).playlistOffset=p,T.setStart(p),T.sn=y,T.cc=g,_&&(T.bitrate=_),T.level=s,m&&(T.initSegment=m,m.rawProgramDateTime&&(T.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null),A&&(T.setByteRange(A),A=null)));var I=b[1];if(I){T.duration=parseFloat(I);var R=(" "+b[2]).slice(1);T.title=R||null,T.tagList.push(R?["INF",I,R]:["INF",I])}else if(b[3]){if(ir(T.duration)){T.playlistOffset=p,T.setStart(p),l&&is(T,l,f),T.sn=y,T.level=s,T.cc=g,u.push(T);var O=(" "+b[3]).slice(1);T.relurl=ho(f,O),ns(T,k,v),k=T,p+=T.duration,y++,E=0,S=!0}}else{if(!(b=b[0].match($o))){xr.warn("No matches on slow regex match for level playlist!");continue}for(c=1;c<b.length&&void 0===b[c];c++);var L=(" "+b[c]).slice(1),D=(" "+b[c+1]).slice(1),x=b[c+2]?(" "+b[c+2]).slice(1):null;switch(L){case"BYTERANGE":k?T.setByteRange(D,k):T.setByteRange(D);break;case"PROGRAM-DATE-TIME":T.rawProgramDateTime=D,T.tagList.push(["PROGRAM-DATE-TIME",D]),-1===w&&(w=u.length);break;case"PLAYLIST-TYPE":f.type&&as(f,L,b),f.type=D.toUpperCase();break;case"MEDIA-SEQUENCE":0!==f.startSN?as(f,L,b):u.length>0&&os(f,L,b),y=f.startSN=parseInt(D);break;case"SKIP":f.skippedSegments&&as(f,L,b);var q=new go(D,f),C=q.decimalInteger("SKIPPED-SEGMENTS");if(ir(C)){f.skippedSegments+=C;for(var M=C;M--;)u.push(null);y+=C}var P=q.enumeratedString("RECENTLY-REMOVED-DATERANGES");P&&(f.recentlyRemovedDateranges=(f.recentlyRemovedDateranges||[]).concat(P.split("\t")));break;case"TARGETDURATION":0!==f.targetduration&&as(f,L,b),f.targetduration=Math.max(parseInt(D),1);break;case"VERSION":null!==f.version&&as(f,L,b),f.version=parseInt(D);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":f.live||as(f,L,b),f.live=!1;break;case"#":(D||x)&&T.tagList.push(x?[D,x]:[D]);break;case"DISCONTINUITY":g++,T.tagList.push(["DIS"]);break;case"GAP":T.gap=!0,T.tagList.push([L]);break;case"BITRATE":T.tagList.push([L,D]),_=1e3*parseInt(D),ir(_)?T.bitrate=_:_=0;break;case"DATERANGE":var N=new go(D,f),U=new Eo(N,f.dateRanges[N.ID],f.dateRangeTagCount);f.dateRangeTagCount++,U.isValid||f.skippedSegments?f.dateRanges[U.id]=U:xr.warn('Ignoring invalid DATERANGE tag: "'.concat(D,'"')),T.tagList.push(["EXT-X-DATERANGE",D]);break;case"DEFINE":var F=new go(D,f);"IMPORT"in F?po(f,F,a):fo(f,F,t);break;case"DISCONTINUITY-SEQUENCE":0!==f.startCC?as(f,L,b):u.length>0&&os(f,L,b),f.startCC=g=parseInt(D);break;case"KEY":var B=Jo(D,t,f);if(B.isSupported()){if("NONE"===B.method){l=void 0;break}l||(l={});var j=l[B.keyFormat];null!=j&&j.matches(B)||(j&&(l=kr({},l)),l[B.keyFormat]=B)}else xr.warn('[Keys] Ignoring unsupported EXT-X-KEY tag: "'.concat(D,'"'));break;case"START":f.startTimeOffset=Zo(D);break;case"MAP":var V=new go(D,f);if(T.duration){var H=new Yr(n,h);rs(H,V,s,l),m=H,T.initSegment=m,m.rawProgramDateTime&&!T.rawProgramDateTime&&(T.rawProgramDateTime=m.rawProgramDateTime)}else{var W=T.byteRangeEndOffset;if(W){var G=T.byteRangeStartOffset;A="".concat(W-G,"@").concat(G)}else A=null;rs(T,V,s,l),m=T,S=!0}m.cc=g;break;case"SERVER-CONTROL":d&&as(f,L,b),d=new go(D),f.canBlockReload=d.bool("CAN-BLOCK-RELOAD"),f.canSkipUntil=d.optionalFloat("CAN-SKIP-UNTIL",0),f.canSkipDateRanges=f.canSkipUntil>0&&d.bool("CAN-SKIP-DATERANGES"),f.partHoldBack=d.optionalFloat("PART-HOLD-BACK",0),f.holdBack=d.optionalFloat("HOLD-BACK",0);break;case"PART-INF":f.partTarget&&as(f,L,b);var K=new go(D);f.partTarget=K.decimalFloatingPoint("PART-TARGET");break;case"PART":var Y=f.partList;Y||(Y=f.partList=[]);var $=E>0?Y[Y.length-1]:void 0,Q=E++,z=new go(D,f),X=new $r(z,T,h,Q,$);Y.push(X),T.duration+=X.duration;break;case"PRELOAD-HINT":var J=new go(D,f);f.preloadHint=J;break;case"RENDITION-REPORT":var Z=new go(D,f);f.renditionReports=f.renditionReports||[],f.renditionReports.push(Z);break;default:xr.warn("line parsed but not handled: ".concat(b))}}}k&&!k.relurl?(u.pop(),p-=k.duration,f.partList&&(f.fragmentHint=k)):f.partList&&(ns(T,k,v),T.cc=g,f.fragmentHint=T,l&&is(T,l,f)),f.targetduration||(f.playlistParsingError=new Error("Missing Target Duration"));var ee=u.length,te=u[0],ne=u[ee-1];if((p+=f.skippedSegments*f.targetduration)>0&&ee&&ne){f.averagetargetduration=p/ee;var re=ne.sn;f.endSN="initSegment"!==re?re:0,f.live||(ne.endList=!0),w>0&&(function(i,e){for(var t=i[e],s=e;s--;){var n=i[s];if(!n)return;n.programDateTime=t.programDateTime-1e3*n.duration,t=n}}(u,w),te&&v.unshift(te))}return f.fragmentHint&&(p+=f.fragmentHint.duration),f.totalduration=p,v.length&&f.dateRangeTagCount&&te&&zo(v,f),f.endCC=g,f}}]),i}();function zo(i,e){var t=i.length;if(!t){if(!e.hasProgramDateTime)return;var n=e.fragments[e.fragments.length-1];i.push(n),t++}for(var s=i[t-1],r=e.live?1/0:e.totalduration,o=Object.keys(e.dateRanges),c=o.length;c--;){var l=e.dateRanges[o[c]],d=l.startDate.getTime();l.tagAnchor=s.ref;for(var u=t;u--;){var a;if((null==(a=i[u])?void 0:a.sn)<e.startSN)break;var h=Xo(e,d,i,u,r);if(-1!==h){l.tagAnchor=e.fragments[h].ref;break}}}}function Xo(i,e,t,s,n){var r=t[s];if(r){var a,o=r.programDateTime;if(e>=o||0===s)if(e<=o+1e3*(((null==(a=t[s+1])?void 0:a.start)||n)-r.start)){var c=t[s].sn-i.startSN;if(c<0)return-1;var u=i.fragments;if(u.length>t.length)for(var l=(t[s+1]||u[u.length-1]).sn-i.startSN;l>c;l--){var d=u[l].programDateTime;if(e>=d&&e<d+1e3*u[l].duration)return l}return c}}return-1}function Jo(i,e,t){var s,n,r=new go(i,t),a=null!=(s=r.METHOD)?s:"",o=r.URI,c=r.hexadecimalInteger("IV"),l=r.KEYFORMATVERSIONS,u=null!=(n=r.KEYFORMAT)?n:"identity";o&&r.IV&&!c&&xr.error("Invalid IV: ".concat(r.IV));var d=o?Qo.resolve(o,e):"",h=(l||"1").split("/").map(Number).filter(Number.isFinite);return new Ho(a,d,u,h,c,r.KEYID)}function Zo(i){var e=new go(i).decimalFloatingPoint("TIME-OFFSET");return ir(e)?e:null}function es(i,e){var t=(i||"").split(/[ ,]+/).filter((function(s){return s}));["video","audio","text"].forEach((function(s){var n=t.filter((function(e){return Si(e,s)}));n.length&&(e["".concat(s,"Codec")]=n.map((function(e){return e.split("/")[0]})).join(","),t=t.filter((function(e){return-1===n.indexOf(e)})))}
2)),e.unknownCodecs=t}function ts(i,e,t){var s=e[t];s&&(i[t]=s)}function ns(i,e,t){i.rawProgramDateTime?t.push(i):null!=e&&e.programDateTime&&(i.programDateTime=e.endProgramDateTime)}function rs(i,e,t,s){i.relurl=e.URI,e.BYTERANGE&&i.setByteRange(e.BYTERANGE),i.level=t,i.sn="initSegment",s&&(i.levelkeys=s),i.initSegment=null}function is(i,e,t){i.levelkeys=e;var s=t.encryptedFragments;(!s.length||s[s.length-1].levelkeys!==e)&&Object.keys(e).some((function(t){return e[t].isCommonEncryption}))&&s.push(i)}function as(i,e,t){i.playlistParsingError=new Error("#EXT-X-".concat(e," must not appear more than once (").concat(t[0],")"))}function os(i,e,t){i.playlistParsingError=new Error("#EXT-X-".concat(e," must appear before the first Media Segment (").concat(t[0],")"))}function ss(i,e){var t=e.startPTS;if(ir(t)){var n,s=0;e.sn>i.sn?(s=t-i.start,n=i):(s=i.start-t,n=e),n.duration!==s&&n.setDuration(s)}else e.sn>i.sn?i.cc===e.cc&&i.minEndPTS?e.setStart(i.start+(i.minEndPTS-i.start)):e.setStart(i.start+i.duration):e.setStart(Math.max(i.start-e.duration,0))}function us(i,e,t,s,n,r,a){s-t<=0&&(a.warn("Fragment should have a positive duration",e),s=t+e.duration,r=n+e.duration);var o=t,c=s,u=e.startPTS,l=e.endPTS;if(ir(u)){var d=Math.abs(u-t);i&&d>i.totalduration?a.warn("media timestamps and playlist times differ by ".concat(d,"s for level ").concat(e.level," ").concat(i.url)):ir(e.deltaPTS)?e.deltaPTS=Math.max(d,e.deltaPTS):e.deltaPTS=d,o=Math.max(t,u),t=Math.min(t,u),n=void 0!==e.startDTS?Math.min(n,e.startDTS):n,c=Math.min(s,l),s=Math.max(s,l),r=void 0!==e.endDTS?Math.max(r,e.endDTS):r}var h=t-e.start;0!==e.start&&e.setStart(t),e.setDuration(s-e.start),e.startPTS=t,e.maxStartPTS=o,e.startDTS=n,e.endPTS=s,e.minEndPTS=c,e.endDTS=r;var f=e.sn;if(!i||f<i.startSN||f>i.endSN)return 0;var v,p=f-i.startSN,g=i.fragments;for(g[p]=e,v=p;v>0;v--)ss(g[v],g[v-1]);for(v=p;v<g.length-1;v++)ss(g[v],g[v+1]);return i.fragmentHint&&ss(g[g.length-1],i.fragmentHint),i.PTSKnown=i.alignedSliding=!0,h}function cs(i,e,t){if(i!==e){for(var n,s=null,r=i.fragments,u=r.length-1;u>=0;u--){var o=r[u].initSegment;if(o){s=o;break}}i.fragmentHint&&delete i.fragmentHint.endPTS,function(i,e,t){for(var s=e.skippedSegments,n=Math.max(i.startSN,e.startSN)-e.startSN,r=(i.fragmentHint?1:0)+(s?e.endSN:Math.min(i.endSN,e.endSN))-e.startSN,a=e.startSN-i.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,c=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments,l=n;l<=r;l++){var u=c[a+l],d=o[l];if(s&&!d&&u&&(d=e.fragments[l]=u),u&&d){t(u,d,l,o);var h=u.relurl,f=d.relurl;if(h&&ys(h,f))return void(e.playlistParsingError=ls("media sequence mismatch ".concat(d.sn,":"),i,e,u,d));if(u.cc!==d.cc)return void(e.playlistParsingError=ls("discontinuity sequence mismatch (".concat(u.cc,"!=").concat(d.cc,")"),i,e,u,d))}}}(i,e,(function(u,t,r,o){if((!e.startCC||e.skippedSegments)&&t.cc!==u.cc){for(var c=u.cc-t.cc,p=r;p<o.length;p++)o[p].cc+=c;e.endCC=o[o.length-1].cc}ir(u.startPTS)&&ir(u.endPTS)&&(t.setStart(t.startPTS=u.startPTS),t.startDTS=u.startDTS,t.maxStartPTS=u.maxStartPTS,t.endPTS=u.endPTS,t.endDTS=u.endDTS,t.minEndPTS=u.minEndPTS,t.setDuration(u.endPTS-u.startPTS),t.duration&&(n=t),e.PTSKnown=e.alignedSliding=!0),u.hasStream
2s&&(t.elementaryStreams=u.elementaryStreams),t.loader=u.loader,u.hasStats&&(t.stats=u.stats),u.initSegment&&(t.initSegment=u.initSegment,s=u.initSegment)}));var a=e.fragments,c=e.fragmentHint?a.concat(e.fragmentHint):a;if(s&&c.forEach((function(u){var e;u&&(!u.initSegment||u.initSegment.relurl===(null==(e=s)?void 0:e.relurl))&&(u.initSegment=s)})),e.skippedSegments){if(e.deltaUpdateFailed=a.some((function(u){return!u})),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var l=e.skippedSegments;l--;)a.shift();e.startSN=a[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=function(i,e,t){var s=e.dateRanges,n=e.recentlyRemovedDateranges,r=kr({},i);n&&n.forEach((function(e){delete r[e]}));var o=Object.keys(r).length;return o?(Object.keys(s).forEach((function(e){var n=r[e],u=new Eo(s[e].attr,n);u.isValid?(r[e]=u,n||(u.tagOrder+=o)):t.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'.concat(aa(s[e].attr),'"'))})),r):s}(i.dateRanges,e,t));var d=i.fragments.filter((function(e){return e.rawProgramDateTime}));if(i.hasProgramDateTime&&!e.hasProgramDateTime)for(var h=1;h<c.length;h++)null===c[h].programDateTime&&ns(c[h],c[h-1],d);zo(d,e)}e.endCC=a[a.length-1].cc}if(!e.startCC){var f,v=ps(i,e.startSN-1);e.startCC=null!=(f=null==v?void 0:v.cc)?f:a[0].cc}(function(i,e,t){if(i&&e)for(var s=0,n=0,r=i.length;n<=r;n++){var a=i[n],o=e[n+s];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?t(a,o):s--}})(i.partList,e.partList,(function(u,e){e.elementaryStreams=u.elementaryStreams,e.stats=u.stats})),n?us(e,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS,t):ds(i,e),a.length&&(e.totalduration=e.edge-a[0].start),e.driftStartTime=i.driftStartTime,e.driftStart=i.driftStart;var m=e.advancedDateTime;if(e.advanced&&m){var y=e.edge;e.driftStart||(e.driftStartTime=m,e.driftStart=y),e.driftEndTime=m,e.driftEnd=y}else e.driftEndTime=i.driftEndTime,e.driftEnd=i.driftEnd,e.advancedDateTime=i.advancedDateTime;-1===e.requestScheduled&&(e.requestScheduled=i.requestScheduled)}}function ls(i,e,t,s,n){return new Error("".concat(i," ").concat(n.url,"\nPlaylist starting @").concat(e.startSN,"\n").concat(e.m3u8,"\n\nPlaylist starting @").concat(t.startSN,"\n").concat(t.m3u8))}function ds(i,e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=e.startSN+e.skippedSegments-i.startSN,n=i.fragments,r=s>=0,a=0;if(r&&s<n.length)a=n[s].start;else if(r&&e.startSN===i.endSN+1)a=i.fragmentEnd;else if(r&&t)a=i.fragmentStart+s*e.levelTargetDuration;else{if(e.skippedSegments||0!==e.fragmentStart)return;a=i.fragmentStart}hs(e,a)}function hs(i,e){if(e){for(var t=i.fragments,s=i.skippedSegments;s<t.length;s++)t[s].addStart(e);i.fragmentHint&&i.fragmentHint.addStart(e)}}function fs(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,t=1e3*i.targetduration;if(i.updated){var s=i.fragments;if(s.length&&4*t>e){var n=1e3*s[s.length-1].duration;n<t&&(t=n)}}else t/=2;return Math.round(t)}function ps(i,e,t){if(!i)return null;var s=i.fragments[e-i.startSN];return s||(s=i.fragmentHint)&&s.sn===e?s:e<i.startSN&&t&&t.sn===e?t:null}function vs(i,e,t){return i?ms(i.partList,e,t):null}function ms(i,e,t){if(i)for(var s=i.length;s--;){var n=i[s];if(n.index===t&&n.fragment.sn===e)return n}return null}function gs(i){i.forEach((function(e,t){var s;null==(s=e.details)||s.fragments.forEach((function(e){e.level=t,e.initSegment&&(e.initSegment.level=t)}))}))}function ys(i,e){return!(i===e||!e)&&bs(i)!==bs(e)}function bs(i){return i.replace(/\?[^?]*$/,"")}function Es(i,e){for(var s=0,t=i.length;s<t;s++){var n;if((null==(n=i[s])?void 0:n.cc)===e)return i[s]}return null}function _s(i,e){var t=i.start+e;i.startPTS=t,i.setStart(t),i.endPTS=t+i.duration}function ks(i,e){for(var t=e.fragments,s=0,n=t.length;s<n;s++)_s(t[s],i);e.fragmentHint&&_s(e.fragmentHint,i),e.alignedSliding=!0}function Ts(i,e){if(function(i,e){return!!(i&&e.startCC<i.endCC&&e.endCC>i.startCC)}(e,i)){var t=Math.min(e.endCC,i.endCC),s=Es(e.fragments,t),n=Es(i.fragments,t);if(s&&n)xr.log("Aligning playlist at start of dicontinuity sequence ".concat(t)),ks(s.start-n.start,i)}}function ws(i,e){if(i.hasProgramDateTime&&e.hasProgramDateTime){var t=i.fragments,s=e.fragments;if(t.length&&s.length){var n,r,a=Math.min(e.endCC,i.endCC);e.startCC<a&&i.startCC<a&&(n=Es(s,a),r=Es(t,a)),(!n||!r)&&(r=Es(t,(n=s[Math.floor(s.length/2)]).cc)||t[Math.floor(t.length/2)]);var o=n.programDateTime,c=r.programDateTime;if(o&&c)ks((c-o)/1e3-(r.start-n.start),i)}}}function Ss(i,e,t){As(i,e,t),i.addEventListener(e,t)}function As(i,e,t){i.removeEventListener(e,t)}var Is=function(i){for(var e="",t=i.length,s=0;s<t;s++)e+="[".concat(i.start(s).toFixed(3),"-").concat(i.end(s).toFixed(3),"]");return e},Rs="STOPPED",Os="IDLE",Ls="KEY_LOADING",Ds="FRAG_LOADING",xs="FRAG_LOADING_WAITING_RETRY",Cs="WAITING_TRACK",Ms="PARSING",Ps="PARSED",Ns="ENDED",Us="ERROR",Fs="WAITING_INIT_PTS",Bs="WAITING_LEVEL",js=function(e){T(n,e);var t=P(n);function n(e,r,s,o,c){var l;return A(this,n),(l=t.call(this,o,e.logger)).hls=void 0,l.fragPrevious=null,l.fragCurrent=null,l.fragmentTracker=void 0,l.transmuxer=null,l._state=Rs,l.playlistType=void 0,l.media=null,l.mediaBuffer=null,l.config=void 0,l.bitrateTest=!1,l.lastCurrentTime=0,l.nextLo
vendor: 24,489 bytes, line 2
2adPosition=0,l.startPosition=0,l.startTimeOffset=null,l.retryDate=0,l.levels=null,l.fragmentLoader=void 0,l.keyLoader=void 0,l.levelLastLoaded=null,l.startFragRequested=!1,l.decrypter=void 0,l.initPTS=[],l.buffering=!0,l.loadingParts=!1,l.loopSn=void 0,l.onMediaSeeking=function(){var e=_(l),a=e.config,t=e.fragCurrent,n=e.media,r=e.mediaBuffer,u=e.state,o=n?n.currentTime:0,c=uo.bufferInfo(r||n,o,a.maxBufferHole),d=!c.len;if(l.log("Media seeking to ".concat(ir(o)?o.toFixed(3):o,", state: ").concat(u,", ").concat(d?"out of":"in"," buffer")),l.state===Ns)l.resetLoadingState();else if(t){var h=a.maxFragLookUpTolerance,p=t.start-h,g=t.start+t.duration+h;if(d||g<c.start||p>c.end){var f=o>g;(o<p||f)&&(f&&t.loader&&(l.log("Cancelling fragment load for seek (sn: ".concat(t.sn,")")),t.abortRequests(),l.resetLoadingState()),l.fragPrevious=null)}}if(n&&(l.fragmentTracker.removeFragmentsInRange(o,1/0,l.playlistType,!0),o>l.lastCurrentTime&&(l.lastCurrentTime=o),!l.loadingParts)){var v=Math.max(c.end,o),m=l.shouldLoadParts(l.getLevelDetails(),v);m&&(l.log("LL-Part loading ON after seeking to ".concat(o.toFixed(2)," with buffer @").concat(v.toFixed(2))),l.loadingParts=m)}l.hls.hasEnoughToStart||(l.log("Setting ".concat(d?"startPosition":"nextLoadPosition"," to ").concat(o," for seek without enough to start")),l.nextLoadPosition=o,d&&(l.startPosition=o)),d&&l.state===Os&&l.tickImmediate()},l.onMediaEnded=function(){l.log("setting startPosition to 0 because media ended"),l.startPosition=l.lastCurrentTime=0},l.playlistType=c,l.hls=e,l.fragmentLoader=new eo(e.config),l.keyLoader=s,l.fragmentTracker=r,l.config=e.config,l.decrypter=new Ja(e.config),l}return I(n,[{key:"registerListeners",value:function(){var e=this.hls;e.on(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(cr.ERROR,this.onError,this)}},{key:"unregisterListeners",value:function(){var e=this.hls;e.off(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(cr.ERROR,this.onError,this)}},{key:"doTick",value:function(){this.onTickEnd()}},{key:"onTickEnd",value:function(){}},{key:"startLoad",value:function(e){}},{key:"stopLoad",value:function(){if(this.state!==Rs){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);var e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Rs}}},{key:"startPositionValue",get:function(){var e=this.nextLoadPosition,t=this.startPosition;return-1===t&&e?e:t}},{key:"bufferingEnabled",get:function(){return this.buffering}},{key:"pauseBuffering",value:function(){this.buffering=!1}},{key:"resumeBuffering",value:function(){this.buffering=!0}},{key:"inFlightFrag",get:function(){return{frag:this.fragCurrent,state:this.state}}},{key:"_streamEnded",value:function(e,t){if(t.live||!this.media)return!1;var s=e.end||0,n=this.config.timelineOffset||0;if(s<=n)return!1;var r=e.buffered;this.config.maxBufferHole&&r&&r.length>1&&(e=uo.bufferedInfo(r,e.start,0));var a=e.nextStart;if(a&&a>n&&a<t.edge||this.media.currentTime<e.start)return!1;var o=t.partList;if(null!=o&&o.length){var u=o[o.length-1];return uo.isBuffered(this.media,u.start+u.duration/2)}var c=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(c)}},{key:"getLevelDetails",value:function(){if(this.levels&&null!==this.levelLastLoaded)return this.levelLastLoaded.details}},{key:"timelineOffset",get:function(){var e,t=this.config.timelineOffset;return t?(null==(e=this.getLevelDetails())?void 0:e.appliedTimelineOffset)||t:0}},{key:"onMediaAttached",value:function(e,t){var s=this.media=this.mediaBuffer=t.media;Ss(s,"seeking",this.onMediaSeeking),Ss(s,"ended",this.onMediaEnded);var n=this.config;this.levels&&n.autoStartLoad&&this.state===Rs&&this.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(e,t){var s=!!t.transferMedia,n=this.media;if(null!==n){if(n.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),As(n,"seeking",this.onMediaSeeking),As(n,"ended",this.onMediaEnded),this.keyLoader&&!s&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,s)return this.resetLoadingState(),void this.resetTransmuxer();this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}},{key:"onManifestLoading",value:function(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}},{key:"onError",value:function(e,t){}},{key:"onManifestLoaded",value:function(e,t){this.startTimeOffset=t.startTimeOffset}},{key:"onHandlerDestroying",value:function(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),y(S(n.prototype),"onHandlerDestroying",this).call(this),this.hls=this.onMediaSeeking=this.onMediaEnded=null}},{key:"onHandlerDestroyed",value:function(){this.state=Rs,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,y(S(n.prototype),"onHandlerDestroyed",this).call(this)}},{key:"loadFragment",value:function(e,t,s){this.startFragRequested=!0,this._loadFragForPlayback(e,t,s)}},{key:"_loadFragForPlayback",value:function(e,t,s){var n=this;this._doFragLoad(e,t,s,(function(e){var a=e.frag;if(n.fragContextChanged(a))return n.warn("".concat(a.type," sn: ").concat(a.sn).concat(e.part?" part: "+e.part.index:""," of ").concat(n.fragInfo(a,!1,e.part),") was dropped during download.")),void n.fragmentTracker.removeFragment(a);a.stats.chunkCount++,n._handleFragmentLoadProgress(e)})).then((function(e){if(e){var a=n.state,t=e.frag;n.fragContextChanged(t)?(a===Ds||!n.fragCurrent&&a===Ms)&&(n.fragmentTracker.removeFragment(t),n.state=Os):("payload"in e&&(n.log("Loaded ".concat(t.type," sn: ").concat(t.sn," of ").concat(n.playlistLabel()," ").concat(t.level)),n.hls.trigger(cr.FRAG_LOADED,e)),n._handleFragmentLoadComplete(e))}})).catch((function(t){n.state===Rs||n.state===Us||(n.warn("Frag error: ".concat((null==t?void 0:t.message)||t)),n.resetFragmentLoading(e))}))}},{key:"clearTrackerIfNeeded",value:function(e){var t,s=this.fragmentTracker;if(s.getState(e)===ja){var n=e.type,a=this.getFwdBufferInfo(this.mediaBuffer,n),r=Math.max(e.duration,a?a.len:this.config.maxBufferLength),o=this.backtrackFragment;(1==(o?e.sn-o.sn:0)||this.reduceMaxBufferLength(r,e.duration))&&s.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?s.removeAllFragments():s.hasParts(e.type)&&(s.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),s.getState(e)===Va&&s.removeFragment(e))}},{key:"checkLiveUpdate",value:function(e){if(e.updated&&!e.live){var t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}},{key:"waitForLive",value:function(e){var t=e.details;return(null==t?void 0:t.live)&&"EVENT"!==t.type&&(this.levelLastLoaded!==e||t.expired)}},{key:"flushMainBuffer",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(e-t){var n={startOffset:e,endOffset:t,type:s};this.hls.trigger(cr.BUFFER_FLUSHING,n)}}},{key:"_loadInitSegment",value:function(e,t){var n=this;this._doFragLoad(e,t).then((function(s){var e=null==s?void 0:s.frag;if(!e||n.fragContextChanged(e)||!n.levels)throw new Error("init load aborted");return s})).then((function(s){var e=n.hls,t=s.frag,a=s.payload,r=t.decryptdata;if(a&&a.byteLength>0&&null!=r&&r.key&&r.iv&&wo(r.method)){var o=self.performance.now();return n.decrypter.decrypt(new Uint8Array(a),r.key.buffer,r.iv.buffer,So(r.method)).catch((function(n){throw e.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.FRAG_DECRYPT_ERROR,fatal:!1,error:n,reason:n.message,frag:t}),n})).then((function(r){var u=self.performance.now();return e.trigger(cr.FRAG_DECRYPTED,{frag:t,payload:r,stats:{tstart:o,tdecrypt:u}}),s.payload=r,n.completeInitSegmentLoad(s)}))}return n.completeInitSegmentLoad(s)})).catch((function(s){n.state===Rs||n.state===Us||(n.warn(s),n.resetFragmentLoading(e))}))}},{key:"completeInitSegmentLoad",value:function(e){if(!this.levels)throw new Error("init load aborted, missing levels");var s=e.frag.stats;this.state!==Rs&&(this.state=Os),e.frag.data=new Uint8Array(e.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),this.tick()}},{key:"unhandledEncryptionError",value:function(e,t){var s,n,r=e.tracks;if(r&&!t.encrypted&&(null!=(s=r.audio)&&s.encrypted||null!=(n=r.video)&&n.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){var a=this.media,o=new Error("Encrypted track with no key in ".concat(this.fragInfo(t)," (media ").concat(a?"attached mediaKeys: "+a.mediaKeys:"detached",")"));return this.warn(o.message),!(!a||a.mediaKeys)&&(this.hls.trigger(cr.ERROR,{type:sr.KEY_SYSTEM_ERROR,details:ur.KEY_SYSTEM_NO_KEYS,fatal:!1,error:o,frag:t}),this.resetTransmuxer(),!0)}return!1}},{key:"fragContextChanged",value:function(e){var t=this.fragCurrent;return!e||!t||e.sn!==t.sn||e.level!==t.level}},{key:"fragBufferedComplete",value:function(e,t){var s=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log("Buffered ".concat(e.type," sn: ").concat(e.sn).concat(t?" part: "+t.index:""," of ").concat(this.fragInfo(e,!1,t)," > buffer:").concat(s?Is(uo.getBuffered(s)):"(detached)",")")),Kr(e)){var n;if(e.type!==gr){var a=e.elementaryStreams;if(!Object.keys(a).some((function(e){return!!a[e]})))return void(this.state=Os)}var r=null==(n=this.levels)?void 0:n[e.level];null!=r&&r.fragmentError&&(this.log("Resetting level fragment error count of ".concat(r.fragmentError," on frag buffered")),r.fragmentError=0)}this.state=Os}},{key:"_handleFragmentLoadComplete",value:function(e){var t=this.transmuxer;if(t){var s=e.frag,n=e.part,r=e.partsLoaded,a=!r||0===r.length||r.some((function(e){return!e})),o=new oo(s.level,s.sn,s.stats.chunkCount+1,0,n?n.index:-1,!a);t.flush(o)}}},{key:"_handleFragmentLoadProgress",value:function(e){}},{key:"_doFragLoad",value:function(e,t){var n,r=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3?arguments[3]:void 0;this.fragCurrent=e;var a=t.details;if(!this.levels||!a)throw new Error("frag load aborted, missing level".concat(a?"":" detail","s"));var c=null;if(!e.encrypted||null!=(n=e.decryptdata)&&n.key)e.encrypted||(c=this.keyLoader.loadClear(e,a.encryptedFragments,this.startFragRequested))&&this.log("[eme] blocking frag load until media-keys acquired");else if(this.log("Loading key for ".concat(e.sn," of [").concat(a.startSN,"-").concat(a.endSN,"], ").concat(this.playlistLabel()," ").concat(e.level)),this.state=Ls,this.fragCurrent=e,c=this.keyLoader.load(e).then((function(e){if(!r.fragContextChanged(e.frag))return r.hls.trigger(cr.KEY_LOADED,e),r.state===Ls&&(r.state=Os),e})),this.hls.trigger(cr.KEY_LOADING,{frag:e}),null===this.fragCurrent)return this.log("context changed in KEY_LOADING"),Promise.resolve(null);var l,d=this.fragPrevious;if(Kr(e)&&(!d||e.sn!==d.sn)){var h=this.shouldLoadParts(t.details,e.end);h!==this.loadingParts&&(this.log("LL-Part loading ".concat(h?"ON":"OFF"," loading sn ").concat(null==d?void 0:d.sn,"->").concat(e.sn)),this.loadingParts=h)}if(s=Math.max(e.start,s||0),this.loadingParts&&Kr(e)){var f=a.partList;if(f&&o){s>a.fragmentEnd&&a.fragmentHint&&(e=a.fragmentHint);var v=this.getNextPart(f,e,s);if(v>-1){var p,y=f[v];return e=this.fragCurrent=y.fragment,this.log("Loading ".concat(e.type," sn: ").concat(e.sn," part: ").concat(y.index," (").concat(v,"/").concat(f.length-1,") of ").concat(this.fragInfo(e,!1,y),") cc: ").concat(e.cc," [").concat(a.startSN,"-").concat(a.endSN,"], target: ").concat(parseFloat(s.toFixed(3)))),this.nextLoadPosition=y.start+y.duration,this.state=Ds,p=c?c.then((function(g){return!g||r.fragContextChanged(g.frag)?null:r.doFragPartsLoad(e,y,t,o)})).catch((function(g){return r.handleFragLoadError(g)})):this.doFragPartsLoad(e,y,t,o).catch((function(g){return r.handleFragLoadError(g)})),this.hls.trigger(cr.FRAG_LOADING,{frag:e,part:y,targetBufferTime:s}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):p}if(!e.url||this.loadedEndOfParts(f,s))return Promise.resolve(null)}}if(Kr(e)&&this.loadingParts)this.log("LL-Part loading OFF after next part miss @".concat(s.toFixed(2)," Check buffer at sn: ").concat(e.sn," loaded parts: ").concat(null==(l=a.partList)?void 0:l.filter((function(e){return e.loaded})).map((function(e){return"[".concat(e.start,"-").concat(e.end,"]")})))),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log("Loading ".concat(e.type," sn: ").concat(e.sn," of ").concat(this.fragInfo(e,!1),") cc: ").concat(e.cc," ").concat("["+a.startSN+"-"+a.endSN+"]",", target: ").concat(parseFloat(s.toFixed(3)))),ir(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Ds;var E,u=this.config.progressive&&e.type!==gr;return E=u&&c?c.then((function(t){return!t||r.fragContextChanged(t.frag)?null:r.fragmentLoader.load(e,o)})).catch((function(e){return r.handleFragLoadError(e)})):Promise.all([this.fragmentLoader.load(e,u?o:void 0),c]).then((function(e){var t=m(e,1)[0];return!u&&o&&o(t),t})).catch((function(e){return r.handleFragLoadError(e)})),this.hls.trigger(cr.FRAG_LOADING,{frag:e,targetBufferTime:s}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):E}},{key:"doFragPartsLoad",value:function(e,t,s,n){var r=this;return new Promise((function(o,a){var c,l=[],d=null==(c=s.details)?void 0:c.partList;!function u(t){r.fragmentLoader.loadPart(e,t,n).then((function(n){l[t.index]=n;var c=n.part;r.hls.trigger(cr.FRAG_LOADED,n);var h=vs(s.details,e.sn,t.index+1)||ms(d,e.sn,t.index+1);if(!h)return o({frag:e,part:c,partsLoaded:l});u(h)})).catch(a)}(t)}))}},{key:"handleFragLoadError",value:function(e){if("data"in e){var t=e.data;t.frag&&t.details===ur.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===sr.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(cr.ERROR,t)}else this.hls.trigger(cr.ERROR,{type:sr.OTHER_ERROR,details:ur.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}},{key:"_handleTransmuxerFlush",value:function(e){var t=this.getCurrentContext(e);if(t&&this.state===Ms){var s=t.frag,n=t.part,r=t.level,a=self.performance.now();s.stats.parsing.end=a,n&&(n.stats.parsing.end=a);var o=this.getLevelDetails(),c=o&&s.sn>o.endSN||this.shouldLoadParts(o,s.end);c!==this.loadingParts&&(this.log("LL-Part loading ".concat(c?"ON":"OFF"," after parsing segment ending @").concat(s.end.toFixed(2))),this.loadingParts=c),this.updateLevelTiming(s,n,r,e.partial)}else!this.fragCurrent&&this.state!==Rs&&this.state!==Us&&(this.state=Os)}},{key:"shouldLoadParts",value:function(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var s,n,r=e.partList[0];if(r.fragment.type===gr)return!1;if(t>=r.end+((null==(s=e.fragmentHint)?void 0:s.duration)||0))if((this.hls.hasEnoughToStart?(null==(n=this.media)?void 0:n.currentTime)||this.lastCurrentTime:this.getLoadPosition())>r.start-r.fragment.duration)return!0}}return!1}},{key:"getCurrentContext",value:function(e){var t=this.levels,s=this.fragCurrent,n=e.level,r=e.sn,a=e.part;if(null==t||!t[n])return this.warn("Levels object was unset while buffering fragment ".concat(r," of ").concat(this.playlistLabel()," ").concat(n,". The current chunk will not be buffered.")),null;var o=t[n],c=o.details,l=a>-1?vs(c,r,a):null,u=l?l.fragment:ps(c,r,s);return u?(s&&s!==u&&(u.stats=s.stats),{frag:u,part:l,level:o}):null}},{key:"bufferFragmentData",value:function(e,t,s,n,r){if(this.state===Ms){var a=e.data1,o=e.data2,c=a;if(o&&(c=vi(a,o)),c.length){var l=this.initPTS[t.cc],u=l?-l.baseTime/l.timescale:void 0,d={type:e.type,frag:t,part:s,chunkMeta:n,offset:u,parent:t.type,data:c};if(this.hls.trigger(cr.BUFFER_APPENDING,d),e.dropped&&e.independent&&!s){if(r)return;this.flushBufferGap(t)}}}}},{key:"flushBufferGap",value:function(e){var t=this.media;if(t)if(uo.isBuffered(t,t.currentTime)){var s=t.currentTime,n=uo.bufferInfo(t,s,0),r=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*r),o=Math.max(Math.min(e.start-a,n.end-a),s+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}else this.flushMainBuffer(0,e.start)}},{key:"getFwdBufferInfo",value:function(e,t){var s,n=this.getLoadPosition();if(!ir(n))return null;var a=this.lastCurrentTime>n||null!=(s=this.media)&&s.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,n,t,a)}},{key:"getFwdBufferInfoAtPos",value:function(e,t,s,n){var r=uo.bufferInfo(e,t,n);if(0===r.len&&void 0!==r.nextStart){var a=this.fragmentTracker.getBufferedFrag(t,s);if(a&&(r.nextStart<=a.end||a.gap)){var o=Math.max(Math.min(r.nextStart,a.end)-t,n);return uo.bufferInfo(e,t,o)}}return r}},{key:"getMaxBufferLength",value:function(e){var s,t=this.config;return s=e?Math.max(8*t.maxBufferSize/e,t.maxBufferLength):t.maxBufferLength,Math.min(s,t.maxMaxBufferLength)}},{key:"reduceMaxBufferLength",value:function(e,t){var s=this.config,n=Math.max(Math.min(e-t,s.maxBufferLength),t),r=Math.max(e-3*t,s.maxMaxBufferLength/2,n);return r>=n&&(s.maxMaxBufferLength=r,this.warn("Reduce max buffer length to ".concat(r,"s")),!0)}},{key:"getAppendedFrag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vr,s=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,t):null;return s&&"fragment"in s?s.fragment:s}},{key:"getNextFragment",value:function(e,t){var s=t.fragments,n=s.length;if(!n)return null;var r=this.config,a=s[0].start,o=r.lowLatencyMode&&!!t.partList,c=null;if(t.live){var l=r.initialLiveManifestSize;if(n<l)return this.warn("Not enough fragments to start playback (have: ".concat(n,", need: ").concat(l,")")),null;if(!t.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<a){var d;o&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),c=this.getInitialLiveFragment(t);var h=this.hls.startPosition,f=this.hls.liveSyncPosition,v=c?(-1!==h&&h>=a?h:f)||c.start:e;this.log("Setting startPosition to ".concat(v," to match start frag at live edge. mainStart: ").concat(h," liveSyncPosition: ").concat(f," frag.start: ").concat(null==(d=c)?void 0:d.start)),this.startPosition=this.nextLoadPosition=v}}else e<=a&&(c=s[0]);if(!c){var m=this.loadingParts?t.partEnd:t.fragmentEnd;c=this.getFragmentAtPosition(e,m,t)}var u=this.filterReplacedPrimary(c,t);if(!u&&c){var y=c.sn-t.startSN;u=this.filterReplacedPrimary(s[y+1]||null,t)}return this.mapToInitFragWhenRequired(u)}},{key:"isLoopLoading",value:function(e,t){var s=this.fragmentTracker.getState(e);return(s===Ha||s===Va&&!!e.gap)&&this.nextLoadPosition>t}},{key:"getNextFragmentLoopLoading",value:function(e,t,s,n,r){var a=null;if(e.gap&&((a=this.getNextFragment(this.nextLoadPosition,t))&&!a.gap&&s.nextStart)){var o=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,s.nextStart,n,0);if(null!==o&&s.len+o.len>=r){var c=a.sn;return this.loopSn!==c&&(this.log('buffer full after gaps in "'.concat(n,'" playlist starting at sn: ').concat(c)),this.loopSn=c),null}}return this.loopSn=void 0,a}},{key:"primaryPrefetch",get:function(){var e;if(Vs(this.config)&&(null==(e=this.hls.interstitialsManager)||null==(e=e.playingItem)?void 0:e.event))return!0;return!1}},{key:"filterReplacedPrimary",value:function(e,t){if(!e)return e;if(Vs(this.config)&&e.type!==gr){var s=this.hls.interstitialsManager,n=null==s?void 0:s.bufferingItem;if(n){var a=n.event;if(a){if(a.appendInPlace||Math.abs(e.start-n.start)>1||0===n.start)return null}else if(e.end<=n.start&&!1===(null==t?void 0:t.live)||e.start>n.end&&n.nextEvent&&(n.nextEvent.appendInPlace||e.start-n.end>1))return null}var r=null==s?void 0:s.playerQueue;if(r)for(var o=r.length;o--;){var c=r[o].interstitial;if(c.appendInPlace&&e.start>=c.startTime&&e.end<=c.resumeTime)return null}}return e}},{key:"mapToInitFragWhenRequired",value:function(e){return null==e||!e.initSegment||e.initSegment.data||this.bitrateTest?e:e.initSegment}},{key:"getNextPart",value:function(e,t,s){for(var n=-1,r=!1,a=!0,o=0,c=e.length;o<c;o++){var l=e[o];if(a=a&&!l.independent,n>-1&&s<l.start)break;var u=l.loaded;u?n=-1:(r||(l.independent||a)&&l.fragment===t)&&(l.fragment!==t&&this.warn("Need buffer at ".concat(s," but next unloaded part starts at ").concat(l.start)),n=o),r=u}return n}},{key:"loadedEndOfParts",value:function(e,t){for(var s,n=e.length;n--;){if(!(s=e[n]).loaded)return!1;if(t>s.start)return!0}return!1}},{key:"getInitialLiveFragment",value:function(e){var t=e.fragments,s=this.fragPrevious,n=null;if(s){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: ".concat(s.programDateTime)),n=function(i,e,t){if(null===e||!Array.isArray(i)||!i.length||!ir(e))return null;if(e<(i[0].programDateTime||0))return null;if(e>=(i[i.length-1].endProgramDateTime||0))return null;for(var n=0;n<i.length;++n){var a=i[n];if(ba(e,t,a))return a}return null}(t,s.endProgramDateTime,this.config.maxFragLookUpTolerance)),!n){var r=s.sn+1;if(r>=e.startSN&&r<=e.endSN){var a=t[r-e.startSN];s.cc===a.cc&&(n=a,this.log("Live playlist, switching playlist, load frag with next SN: ".concat(n.sn)))}n||(n=Ea(e,s.cc,s.end))&&this.log("Live playlist, switching playlist, load frag with same CC: ".concat(n.sn))}}else{var o=this.hls.liveSyncPosition;null!==o&&(n=this.getFragmentAtPosition(o,this.bitrateTest?e.fragmentEnd:e.edge,e))}return n}},{key:"getFragmentAtPosition",value:function(e,t,s){var n,r,o=this.config,c=this.fragPrevious,a=s.fragments,l=s.endSN,d=s.fragmentHint,h=o.maxFragLookUpTolerance,u=s.partList,f=!!(this.loadingParts&&null!=u&&u.length&&d);(f&&!this.bitrateTest&&u[u.length-1].fragment.sn===d.sn&&(a=a.concat(d),l=d.sn),e<t)?n=ma(c,a,e,e<this.lastCurrentTime||e>t-h||null!=(r=this.media)&&r.paused||!this.startFragRequested?0:h):n=a[a.length-1];if(n){var v=n.sn-s.startSN,m=this.fragmentTracker.getState(n);if((m===Ha||m===Va&&n.gap)&&(c=n),c&&n.sn===c.sn&&(!f||u[0].fragment.sn>n.sn||!s.live)&&n.level===c.level){var y=a[v+1];n=n.sn<l&&this.fragmentTracker.getState(y)!==Ha?y:null}}return n}},{key:"alignPlaylists",value:function(e,t,s){var n=e.fragments.length;if(!n)return this.warn("No fragments in live playlist"),0;var r=e.fragmentStart,a=!t,o=e.alignedSliding&&ir(r);if(a||!o&&!r){!function(i,e){i&&(Ts(e,i),e.alignedSliding||ws(e,i),!e.alignedSliding&&!e.skippedSegments&&ds(i,e,!1))}(s,e);var c=e.fragmentStart;return this.log("Live playlist sliding: ".concat(c.toFixed(2)," start-sn: ").concat(t?t.startSN:"na","->").concat(e.startSN," fragments: ").concat(n)),c}return r}},{key:"waitForCdnTuneIn",value:function(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)}},{key:"setStartPosition",value:function(e,t){var s=this.startPosition;s<t&&(s=-1);var n=this.timelineOffset;if(-1===s){var r=null!==this.startTimeOffset,a=r?this.startTimeOffset:e.startTimeOffset;null!==a&&ir(a)?(s=t+a,a<0&&(s+=e.edge),s=Math.min(Math.max(t,s),t+e.totalduration),this.log("Setting startPosition to ".concat(s," for start time offset ").concat(a," found in ").concat(r?"multivariant":"media"," playlist")),this.startPosition=s):e.live?(s=this.hls.liveSyncPosition||t,this.log("Setting startPosition to -1 to start at live edge ".concat(s)),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=s=0),this.lastCurrentTime=s+n}this.nextLoadPosition=s+n}},{key:"getLoadPosition",value:function(){var e,t=this.media,s=0;return null!=(e=this.hls)&&e.hasEnoughToStart&&t?s=t.currentTime:this.nextLoadPosition>=0&&(s=this.nextLoadPosition),s}},{key:"handleFragLoadAborted",value:function(e,t){this.transmuxer&&e.type===this.playlistType&&Kr(e)&&e.stats.aborted&&(this.log("Fragment ".concat(e.sn).c
2oncat(t?" part "+t.index:""," of ").concat(this.playlistLabel()," ").concat(e.level," was aborted")),this.resetFragmentLoading(e))}},{key:"resetFragmentLoading",value:function(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==xs)&&(this.state=Os)}},{key:"onFragmentOrKeyLoadError",value:function(e,t){var s;if(t.chunkMeta&&!t.frag){var n=this.getCurrentContext(t.chunkMeta);n&&(t.frag=n.frag)}var r=t.frag;if(r&&r.type===e&&this.levels)if(this.fragContextChanged(r)){var o;this.warn("Frag load error must match current frag to retry ".concat(r.url," > ").concat(null==(o=this.fragCurrent)?void 0:o.url))}else{var a=t.details===ur.FRAG_GAP;a&&this.fragmentTracker.fragBuffered(r,!0);var c=t.errorAction;if(c){var l=c.action,d=c.flags,h=c.retryCount,u=void 0===h?0:h,f=c.retryConfig,v=!!f,m=v&&l===xa,y=v&&!c.resolved&&d===Ma,p=null==(s=this.hls.latestLevelDetails)?void 0:s.live;if(!m&&y&&Kr(r)&&!r.endList&&p&&!Ta(t))this.resetFragmentErrors(e),this.treatAsGap(r),c.resolved=!0;else if((m||y)&&u<f.maxNumRetry){var g,E=Ra(null==(g=t.response)?void 0:g.code),_=Sa(f,u);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+_,this.state=xs,c.resolved=!0,E)return this.log("Waiting for connection (offline)"),this.retryDate=1/0,void(t.reason="offline");this.warn("Fragment ".concat(r.sn," of ").concat(e," ").concat(r.level," errored with ").concat(t.details,", retrying loading ").concat(u+1,"/").concat(f.maxNumRetry," in ").concat(_,"ms"))}else if(f){if(this.resetFragmentErrors(e),!(u<f.maxNumRetry))return void this.warn("".concat(t.details," reached or exceeded max retry (").concat(u,")"));!a&&l!==Da&&(c.resolved=!0)}else this.state=l===La?Bs:Us;this.tickImmediate()}else this.state=Us}}},{key:"checkRetryDate",value:function(){var e=self.performance.now(),t=this.retryDate,s=t===1/0;(!t||e>=t||s&&!Ra(0))&&(s&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=Os)}},{key:"reduceLengthAndFlushBuffer",value:function(e){if(this.state===Ms||this.state===Ps){var t=e.frag,s=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,s),r=n&&n.len>.5;r&&this.reduceMaxBufferLength(n.len,(null==t?void 0:t.duration)||10);var a=!r;return a&&this.warn("Buffer full error while media.currentTime (".concat(this.getLoadPosition(),") is not buffered, flush ").concat(s," buffer")),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),a}return!1}},{key:"resetFragmentErrors",value:function(e){e===mr&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Rs&&(this.state=Os)}},{key:"afterBufferFlushed",value:function(e,t,s){if(e){var n=uo.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,s),this.state===Ns&&this.resetLoadingState()}}},{key:"resetLoadingState",value:function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Rs&&(this.state=Os)}},{key:"resetStartWhenNotLoaded",value:function(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;var e=this.levelLastLoaded,t=e?e.details:null;null!=t&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}},{key:"resetWhenMissingContext",value:function(e){this.log("Loading context changed while buffering sn ".concat(e.sn," of ").concat(this.playlistLabel()," ").concat(-1===e.level?"<removed>":e.level,". This chunk will not be buffered.")),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()}},{key:"removeUnbufferedFrags",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}},{key:"updateLevelTiming",value:function(e,t,s,n){var r=this,o=s.details;if(o){if(!Object.keys(e.elementaryStreams).reduce((function(t,c){var u=e.elementaryStreams[c];if(u){var l=u.endPTS-u.startPTS;if(l<=0)return r.warn("Could not parse fragment ".concat(e.sn," ").concat(c," duration reliably (").concat(l,")")),t||!1;var d=n?0:us(o,e,u.startPTS,u.endPTS,u.startDTS,u.endDTS,r);return r.hls.trigger(cr.LEVEL_PTS_UPDATED,{details:o,level:s,drift:d,type:c,frag:e,start:u.startPTS,end:u.endPTS}),!0}return t}),!1)){var c,l=null===(null==(c=this.transmuxer)?void 0:c.error);if((0===s.fragmentError||l&&(s.fragmentError<2||e.endList))&&this.treatAsGap(e,s),l){var d=new Error("Found no media in fragment ".concat(e.sn," of ").concat(this.playlistLabel()," ").concat(e.level," resetting transmuxer to fallback to playlist timing"));if(this.warn(d.message),this.hls.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.FRAG_PARSING_ERROR,fatal:!1,error:d,frag:e,reason:"Found no media in msn ".concat(e.sn," of ").concat(this.playlistLabel(),' "').concat(s.url,'"')}),!this.hls)return;this.resetTransmuxer()}}this.state=Ps,this.log("Parsed ".concat(e.type," sn: ").concat(e.sn).c
vendor: 57,537 bytes, line 2
2oncat(t?" part: "+t.index:""," of ").concat(this.fragInfo(e,!1,t),")")),this.hls.trigger(cr.FRAG_PARSED,{frag:e,part:t})}else this.warn("level.details undefined")}},{key:"playlistLabel",value:function(){return this.playlistType===vr?"level":"track"}},{key:"fragInfo",value:function(e){var t,n,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=arguments.length>2?arguments[2]:void 0;return"".concat(this.playlistLabel()," ").concat(e.level," (").concat(s?"part":"frag",":[").concat((null!=(t=r&&!s?e.startPTS:(s||e).start)?t:NaN).toFixed(3),"-").concat((null!=(n=r&&!s?e.endPTS:(s||e).end)?n:NaN).toFixed(3),"]").concat(s&&"main"===e.type?"INDEPENDENT="+(s.independent?"YES":"NO"):"")}},{key:"treatAsGap",value:function(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}},{key:"resetTransmuxer",value:function(){var e;null==(e=this.transmuxer)||e.reset()}},{key:"recoverWorkerError",value:function(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())}},{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log("".concat(t,"->").concat(e)))}}]),n}(ao);function Vs(i){return!!i.interstitialsController&&!1!==i.enableInterstitialPlayback}var Hs=function(){function e(){A(this,e),this.chunks=[],this.dataLength=0}return I(e,[{key:"push",value:function(e){this.chunks.push(e),this.dataLength+=e.length}},{key:"flush",value:function(){var s,e=this.chunks,t=this.dataLength;return e.length?(s=1===e.length?e[0]:function(i,e){for(var t=new Uint8Array(e),s=0,n=0;n<i.length;n++){var r=i[n];t.set(r,s),s+=r.length}return t}(e,t),this.reset(),s):new Uint8Array(0)}},{key:"reset",value:function(){this.chunks.length=0,this.dataLength=0}}]),e}();var Ws,qs={exports:{}};var Gs=function(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}((Ws||(Ws=1,function(i){var e=Object.prototype.hasOwnProperty,t="~";function s(){}function n(e,t,u){this.fn=e,this.context=t,this.once=u||!1}function r(e,r,u,o,c){if("function"!=typeof u)throw new TypeError("The listener must be a function");var l=new n(u,o||e,c),d=t?t+r:r;return e._events[d]?e._events[d].fn?e._events[d]=[e._events[d],l]:e._events[d].push(l):(e._events[d]=l,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new s:delete e._events[t]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(t=!1)),o.prototype.eventNames=function(){var u,n,r=[];if(0===this._eventsCount)return r;for(n in u=this._events)e.call(u,n)&&r.push(t?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(u)):r},o.prototype.listeners=function(e){var u=t?t+e:e,n=this._events[u];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,c=new Array(o);r<o;r++)c[r]=n[r].fn;return c},o.prototype.listenerCount=function(e){var u=t?t+e:e,n=this._events[u];return n?n.fn?1:n.length:0},o.prototype.emit=function(e,u,n,r,o,c){var p=t?t+e:e;if(!this._events[p])return!1;var l,d,g=this._events[p],h=arguments.length;if(g.fn){switch(g.once&&this.removeListener(e,g.fn,void 0,!0),h){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,n),!0;case 4:return g.fn.call(g.context,u,n,r),!0;case 5:return g.fn.call(g.context,u,n,r,o),!0;case 6:return g.fn.call(g.context,u,n,r,o,c),!0}for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];g.fn.apply(g.context,l)}else{var f,b=g.length;for(d=0;d<b;d++)switch(g[d].once&&this.removeListener(e,g[d].fn,void 0,!0),h){case 1:g[d].fn.call(g[d].context);break;case 2:g[d].fn.call(g[d].context,u);break;case 3:g[d].fn.call(g[d].context,u,n);break;case 4:g[d].fn.call(g[d].context,u,n,r);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];g[d].fn.apply(g[d].context,l)}}return!0},o.prototype.on=function(e,u,t){return r(this,e,u,t,!1)},o.prototype.once=function(e,u,t){return r(this,e,u,t,!0)},o.prototype.removeListener=function(e,u,n,r){var o=t?t+e:e;if(!this._events[o])return this;if(!u)return a(this,o),this;var c=this._events[o];if(c.fn)c.fn===u&&(!r||c.once)&&(!n||c.context===n)&&a(this,o);else{for(var p=0,g=[],l=c.length;p<l;p++)(c[p].fn!==u||r&&!c[p].once||n&&c[p].context!==n)&&g.push(c[p]);g.length?this._events[o]=1===g.length?g[0]:g:a(this,o)}return this},o.prototype.removeAllListeners=function(e){var u;return e?(u=t?t+e:e,this._events[u]&&a(this,u)):(this._events=new s,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,i.exports=o}(qs)),qs.exports)),Ks="1.6.15",Ys={};function $s(i,e){return e+10<=i.length&&51===i[e]&&68===i[e+1]&&73===i[e+2]&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128}function Qs(i,e){return e+10<=i.length&&73===i[e]&&68===i[e+1]&&51===i[e+2]&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128}function zs(i,e){var t=0;return t=(127&i[e])<<21,t|=(127&i[e+1])<<14,t|=(127&i[e+2])<<7,t|=127&i[e+3]}function Xs(i,e){for(var t=e,s=0;Qs(i,e);){s+=10,s+=zs(i,e+6),$s(i,e+10)&&(s+=10),e+=s}if(s>0)return i.subarray(t,t+s)}function Js(i,e){return 255===i[e]&&240==(246&i[e+1])}function Zs(i,e){return 1&i[e+1]?7:9}function eu(i,e){return(3&i[e+3])<<11|i[e+4]<<3|(224&i[e+5])>>>5}function tu(i,e){return e+1<i.length&&Js(i,e)}function nu(i,e){if(tu(i,e)){var t=Zs(i,e);if(e+t>=i.length)return!1;var s=eu(i,e);if(s<=t)return!1;var n=e+s;return n===i.length||tu(i,n)}return!1}function ru(i,e,t,s,n){if(!i.samplerate){var r=function(i,e,t,s){var n=e[t+2],a=n>>2&15;if(!(a>12)){var r=1+(n>>6&3),o=e[t+3]>>6&3|(1&n)<<2,c="mp4a.40."+r,u=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][a],l=a;(5===r||29===r)&&(l-=3);var d=[r<<3|(14&l)>>1,(1&l)<<7|o<<3];return xr.log("manifest codec:".concat(s,", parsed codec:").concat(c,", channels:").concat(o,", rate:").concat(u," (ADTS object type:").concat(r," sampling index:").concat(a,")")),{config:d,samplerate:u,channelCount:o,codec:c,parsedCodec:c,manifestCodec:s}}var h=new Error("invalid ADTS sampling index:".concat(a));i.emit(cr.ERROR,cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.FRAG_PARSING_ERROR,fatal:!0,error:h,reason:h.message})}(e,t,s,n);if(!r)return;kr(i,r)}}function iu(i){return 9216e4/i}function au(i,e,t,s,n){var r,a=s+n*iu(i.samplerate),o=function(i,e){var t=Zs(i,e);if(e+t<=i.length){var s=eu(i,e)-t;if(s>0)return{headerLength:t,frameLength:s}}}(e,t);if(o){var c=o.frameLength,l=o.headerLength,d=l+c,h=Math.max(0,t+d-e.length);h?(r=new Uint8Array(d-l)).set(e.subarray(t+l,e.length),0):r=e.subarray(t+l,t+d);var p={unit:r,pts:a};return h||i.samples.push(p),{sample:p,length:d,missing:h}}var f=e.length-t;return(r=new Uint8Array(f)).set(e.subarray(t,e.length),0),{sample:{unit:r,pts:a},length:f,missing:-1}}function ou(i,e){return Qs(i,e)&&zs(i,e+6)+10<=i.length-e}function su(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;return uu(i,e,t,Uint8Array)}function uu(i,e,t,s){var n=function(i){return i instanceof ArrayBuffer?i:i.buffer}(i),r=1;"BYTES_PER_ELEMENT"in s&&(r=s.BYTES_PER_ELEMENT);var a=function(i){return i&&i.buffer instanceof ArrayBuffer&&void 0!==i.byteLength&&void 0!==i.byteOffset}(i)?i.byteOffset:0,o=(a+i.byteLength)/r,c=(a+e)/r,l=Math.floor(Math.max(0,Math.min(c,o)));return new s(n,l,Math.floor(Math.min(l+Math.max(t,0),o))-l)}function cu(i){var e={key:i.type,description:"",data:"",mimeType:null,pictureType:null};if(!(i.size<2))if(3===i.data[0]){var s=i.data.subarray(1).indexOf(0);if(-1!==s){var t=Pr(su(i.data,1,s)),n=i.data[2+s],a=i.data.subarray(3+s).indexOf(0);if(-1!==a){var r,o=Pr(su(i.data,3+s,a));return r="--\x3e"===t?Pr(su(i.data,4+s+a)):function(i){return i instanceof ArrayBuffer?i:0==i.byteOffset&&i.byteLength==i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer}(i.data.subarray(4+s+a)),e.mimeType=t,e.pictureType=n,e.description=o,e.data=r,e}}}else console.log("Ignore frame with unrecognized character encoding")}function lu(i){return"PRIV"===i.type?function(i){if(!(i.size<2)){var e=Pr(i.data,!0),t=new Uint8Array(i.data.subarray(e.length+1));return{key:i.type,info:e,data:t.buffer}}}(i):"W"===i.type[0]?function(i){if("WXXX"===i.type){if(i.size<2)return;var e=1,s=Pr(i.data.subarray(e),!0);e+=s.length+1;var t=Pr(i.data.subarray(e));return{key:i.type,info:s,data:t}}var n=Pr(i.data);return{key:i.type,info:"",data:n}}(i):"APIC"===i.type?cu(i):function(i){if(!(i.size<2)){if("TXXX"===i.type){var e=1,s=Pr(i.data.subarray(e),!0);e+=s.length+1;var t=Pr(i.data.subarray(e));return{key:i.type,info:s,data:t}}var n=Pr(i.data.subarray(1));return{key:i.type,info:"",data:n}}}(i)}function du(i){var e=String.fromCharCode(i[0],i[1],i[2],i[3]),t=zs(i,4);return{type:e,size:t,data:i.subarray(10,10+t)}}function hu(i){for(var e=0,t=[];Qs(i,e);){var s=zs(i,e+6);i[e+5]>>6&1&&(e+=10);for(var n=(e+=10)+s;e+10<n;){var r=du(i.subarray(e)),a=lu(r);a&&t.push(a),e+=r.size+10}$s(i,e)&&(e+=10)}return t}function fu(i){return i&&"PRIV"===i.key&&"com.apple.streaming.transportStreamTimestamp"===i.info}function pu(i){if(8===i.data.byteLength){var e=new Uint8Array(i.data),t=1&e[3],s=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return s/=45,t&&(s+=47721858.84),Math.round(s)}}function vu(i){for(var e=hu(i),t=0;t<e.length;t++){var s=e[t];if(fu(s))return pu(s)}}var li=function(i){return i.audioId3="org.id3",i.dateRange="com.apple.quicktime.HLS",i.emsg="https://aomedia.org/emsg/ID3",i.misbklv="urn:misb:KLV:bin:1910.1",i}({});function mu(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return{type:i,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}var gu=function(){function e(){A(this,e),this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}return I(e,[{key:"resetInitSegment",value:function(e,t,s,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}},{key:"resetTimeStamp",value:function(e){this.initPTS=e,this.resetContiguity()}},{key:"resetContiguity",value:function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}},{key:"canParse",value:function(e,t){return!1}},{key:"appendFrame",value:function(e,t,s){}},{key:"demux",value:function(e,t){this.cachedData&&(e=vi(this.cachedData,e),this.cachedData=null);var n,s=Xs(e,0),r=s?s.length:0,a=this._audioTrack,o=this._id3Track,c=s?vu(s):void 0,l=e.length;for((null===this.basePTS||0===this.frameIndex&&ir(c))&&(this.basePTS=yu(c,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),s&&s.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:li.audioId3,duration:Number.POSITIVE_INFINITY});r<l;){if(this.canParse(e,r)){var u=this.appendFrame(a,e,r);u?(this.frameIndex++,this.lastPTS=u.sample.pts,n=r+=u.length):r=l}else ou(e,r)?(s=Xs(e,r),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:li.audioId3,duration:Number.POSITIVE_INFINITY}),n=r+=s.length):r++;if(r===l&&n!==l){var d=e.slice(n);this.cachedData?this.cachedData=vi(this.cachedData,d):this.cachedData=d}}return{audioTrack:a,videoTrack:mu(),id3Track:o,textTrack:mu()}}},{key:"demuxSampleAes",value:function(e,t,s){return Promise.reject(new Error("[".concat(this,"] This demuxer does not support Sample-AES decryption")))}},{key:"flush",value:function(e){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:mu(),id3Track:this._id3Track,textTrack:mu()}}},{key:"destroy",value:function(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}]),e}(),yu=function(i,e,t){return ir(i)?90*i:9e4*e+(t?9e4*t.baseTime/t.timescale:0)},bu=null,Eu=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],_u=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],ku=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Tu=[0,1,1,4];function wu(i,e,t,s,n){if(!(t+24>e.length)){var r=Su(e,t);if(r&&t+r.frameLength<=e.length){var o=s+n*(9e4*r.samplesPerFrame/r.sampleRate),c={unit:e.subarray(t,t+r.frameLength),pts:o,dts:o};return i.config=[],i.channelCount=r.channelCount,i.samplerate=r.sampleRate,i.samples.push(c),{sample:c,length:r.frameLength,missing:0}}}}function Su(i,e){var t=i[e+1]>>3&3,s=i[e+1]>>1&3,n=i[e+2]>>4&15,r=i[e+2]>>2&3;if(1!==t&&0!==n&&15!==n&&3!==r){var a=i[e+2]>>1&1,o=i[e+3]>>6,c=1e3*Eu[14*(3===t?3-s:3===s?3:4)+n-1],l=_u[3*(3===t?0:2===t?1:2)+r],d=3===o?1:2,h=ku[t][s],f=Tu[s],p=8*h*f,g=Math.floor(h*c/l+a)*f;if(null===bu){var v=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);bu=v?parseInt(v[1]):0}return!!bu&&bu<=87&&2===s&&c>=224e3&&0===o&&(i[e+3]=128|i[e+3]),{sampleRate:l,channelCount:d,frameLength:g,samplesPerFrame:p}}}function Au(i,e){return 255===i[e]&&224==(224&i[e+1])&&0!=(6&i[e+1])}function Iu(i,e){return e+1<i.length&&Au(i,e)}function Ru(i,e){if(e+1<i.length&&Au(i,e)){var s=Su(i,e),t=4;null!=s&&s.frameLength&&(t=s.frameLength);var n=e+t;return n===i.length||Iu(i,n)}return!1}var Ou=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this)).observer=void 0,o.config=void 0,o.observer=e,o.config=r,o}return I(n,[{key:"resetInitSegment",value:function(e,t,s,r){y(S(n.prototype),"resetInitSegment",this).call(this,e,t,s,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}},{key:"canParse",value:function(e,t){return function(i,e){return function(i,e){return e+5<i.length}(i,e)&&Js(i,e)&&eu(i,e)<=i.length-e}(e,t)}},{key:"appendFrame",value:function(e,t,s){ru(e,this.observer,t,s,e.manifestCodec);var n=au(e,t,s,this.basePTS,this.frameIndex);if(n&&0===n.missing)return n}}],[{key:"probe",value:function(e,t){if(!e)return!1;var s=Xs(e,0),n=(null==s?void 0:s.length)||0;if(Ru(e,n))return!1;for(var r=e.length;n<r;n++)if(nu(e,n))return t.log("ADTS sync word found !"),!0;return!1}}]),n}(gu),Lu=function(i,e){var t=0,s=5;e+=s;for(var n=new Uint32Array(1),r=new Uint32Array(1),a=new Uint8Array(1);s>0;){a[0]=i[e];var o=Math.min(s,8),c=8-o;r[0]=4278190080>>>24+c<<c,n[0]=(a[0]&r[0])>>c,t=t?t<<o|n[0]:n[0],e+=1,s-=o}return t},Du=function(e){T(n,e);var t=P(n);function n(e){var r;return A(this,n),(r=t.call(this)).observer=void 0,r.observer=e,r}return I(n,[{key:"resetInitSegment",value:function(e,t,s,r){y(S(n.prototype),"resetInitSegment",this).call(this,e,t,s,r),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}},{key:"canParse",value:function(e,t){return t+64<e.length}},{key:"appendFrame",value:function(e,t,s){var n=xu(e,t,s,this.basePTS,this.frameIndex);if(-1!==n)return{sample:e.samples[e.samples.length-1],length:n,missing:0}}}],[{key:"probe",value:function(e){if(!e)return!1;var t=Xs(e,0);if(!t)return!1;var s=t.length;return 11===e[s]&&119===e[s+1]&&void 0!==vu(t)&&Lu(e,s)<16}}]),n}(gu);function xu(i,e,t,s,n){if(t+8>e.length||11!==e[t]||119!==e[t+1])return-1;var r=e[t+4]>>6;if(r>=3)return-1;var o=[48e3,44100,32e3][r],c=63&e[t+4],u=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*c+r];if(t+u>e.length)return-1;var l=e[t+6]>>5,d=0;2===l?d+=2:(1&l&&1!==l&&(d+=2),4&l&&(d+=2));var h=(e[t+6]<<8|e[t+7])>>12-d&1,p=[2,1,2,3,3,4,4,5][l]+h,g=e[t+5]>>3,f=7&e[t+5],v=new Uint8Array([r<<6|g<<1|f>>2,(3&f)<<6|l<<3|h<<2|c>>4,c<<4&224]),b=s+n*(1536/o*9e4),m=e.subarray(t,t+u);return i.config=v,i.channelCount=p,i.samplerate=o,i.samples.push({unit:m,pts:b}),u}var Cu=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"resetInitSegment",value:function(e,t,s,r){y(S(n.prototype),"resetInitSegment",this).call(this,e,t,s,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}},{key:"canParse",value:function(e,t){return function(i,e){return Au(i,e)&&4<=i.length-e}(e,t)}},{key:"appendFrame",value:function(e,t,s){if(null!==this.basePTS)return wu(e,t,s,this.basePTS,this.frameIndex)}}],[{key:"probe",value:function(e){if(!e)return!1;var t=Xs(e,0),s=(null==t?void 0:t.length)||0;if(t&&11===e[s]&&119===e[s+1]&&void 0!==vu(t)&&Lu(e,s)<=16)return!1;for(var n=e.length;s<n;s++)if(Ru(e,s))return xr.log("MPEG Audio sync word found !"),!0;return!1}}]),n}(gu),Mu=/\/emsg[-/]ID3/i,rp=function(){function rp(e,t){A(this,rp),this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}return I(rp,[{key:"resetTimeStamp",value:function(){}},{key:"resetInitSegment",value:function(e,t,s,n){var r=this.videoTrack=mu("video",1),a=this.audioTrack=mu("audio",1),o=this.txtTrack=mu("text",1);if(this.id3Track=mu("id3",1),this.timeOffset=0,null!=e&&e.byteLength){var c=oi(e);if(c.video){var l=c.video,d=l.id,u=l.timescale,h=l.codec,f=l.supplemental;r.id=d,r.timescale=o.timescale=u,r.codec=h,r.supplemental=f}if(c.audio){var v=c.audio,m=v.id,y=v.timescale,E=v.codec;a.id=m,a.timescale=y,a.codec=E}o.id=Jr.text,r.sampleDuration=0,r.duration=a.duration=n}}},{key:"resetContiguity",value:function(){this.remainderData=null}},{key:"demux",value:function(e,t){this.timeOffset=t;var s=e,n=this.videoTrack,r=this.txtTrack;if(this.config.progressive){this.remainderData&&(s=vi(this.remainderData,e));var o=function(i){var e={valid:null,remainder:null},t=ii(i,["moof"]);if(t.length<2)return e.remainder=i,e;var s=t[t.length-1];return e.valid=i.slice(0,s.byteOffset-8),e.remainder=i.slice(s.byteOffset-8),e}(s);this.remainderData=o.remainder,n.samples=o.valid||new Uint8Array}else n.samples=s;var a=this.extractID3Track(n,t);return r.samples=mi(t,n),{videoTrack:n,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}},{key:"flush",value:function(){var e=this.timeOffset,t=this.videoTrack,s=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;var n=this.extractID3Track(t,this.timeOffset);return s.samples=mi(e,t),{videoTrack:t,audioTrack:mu(),id3Track:n,textTrack:mu()}}},{key:"extractID3Track",value:function(e,t){var n=this,s=this.id3Track;if(e.samples.length){var r=ii(e.samples,["emsg"]);r&&r.forEach((function(e){var a=function(i){var e=i[0],t="",s="",n=0,r=0,a=0,o=0,c=0,l=0;if(0===e){for(;"\0"!==Zr(i.subarray(l,l+1));)t+=Zr(i.subarray(l,l+1)),l+=1;for(t+=Zr(i.subarray(l,l+1)),l+=1;"\0"!==Zr(i.subarray(l,l+1));)s+=Zr(i.subarray(l,l+1)),l+=1;s+=Zr(i.subarray(l,l+1)),l+=1,n=ti(i,12),r=ti(i,16),o=ti(i,20),c=ti(i,24),l=28}else if(1===e){n=ti(i,l+=4);var d=ti(i,l+=4),h=ti(i,l+=4);for(l+=4,a=Math.pow(2,32)*d+h,ar(a)||(a=Number.MAX_SAFE_INTEGER,xr.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=ti(i,l),c=ti(i,l+=4),l+=4;"\0"!==Zr(i.subarray(l,l+1));)t+=Zr(i.subarray(l,l+1)),l+=1;for(t+=Zr(i.subarray(l,l+1)),l+=1;"\0"!==Zr(i.subarray(l,l+1));)s+=Zr(i.subarray(l,l+1)),l+=1;s+=Zr(i.subarray(l,l+1)),l+=1}return{schemeIdUri:t,value:s,timeScale:n,presentationTime:a,presentationTimeDelta:r,eventDuration:o,id:c,payload:i.subarray(l,i.byteLength)}}(e);if(Mu.test(a.schemeIdUri)){var r=Pu(a,t),o=4294967295===a.eventDuration?Number.POSITIVE_INFINITY:a.eventDuration/a.timeScale;o<=.001&&(o=Number.POSITIVE_INFINITY);var c=a.payload;s.samples.push({data:c,len:c.byteLength,dts:r,pts:r,type:li.emsg,duration:o})}else if(n.config.enableEmsgKLVMetadata&&a.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){var l=Pu(a,t);s.samples.push({data:a.payload,len:a.payload.byteLength,dts:l,pts:l,type:li.misbklv,duration:Number.POSITIVE_INFINITY})}}))}return s}},{key:"demuxSampleAes",value:function(e,t,s){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}},{key:"destroy",value:function(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}],[{key:"probe",value:function(e){return function(i){for(var e=i.byteLength,t=0;t<e;){var s=ti(i,t);if(s>8&&109===i[t+4]&&111===i[t+5]&&111===i[t+6]&&102===i[t+7])return!0;t=s>1?t+s:e}return!1}(e)}}]),rp}();function Pu(i,e){return ir(i.presentationTime)?i.presentationTime/i.timeScale:e+i.presentationTimeDelta/i.timeScale}var Nu=function(){function e(t,n,s){A(this,e),this.keyData=void 0,this.decrypter=void 0,this.keyData=s,this.decrypter=new Ja(n,{removePKCS7Padding:!1})}return I(e,[{key:"decryptBuffer",value:function(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,Ya)}},{key:"decryptAacSample",value:function(e,t,s){var n=this,r=e[t].unit;if(!(r.length<=16)){var o=r.subarray(16,r.length-r.length%16),a=o.buffer.slice(o.byteOffset,o.byteOffset+o.length);this.decryptBuffer(a).then((function(o){var c=new Uint8Array(o);r.set(c,16),n.decrypter.isSync()||n.decryptAacSamples(e,t+1,s)})).catch(s)}}},{key:"decryptAacSamples",value:function(e,t,s){for(;;t++){if(t>=e.length)return void s();if(!(e[t].unit.length<32||(this.decryptAacSample(e,t,s),this.decrypter.isSync())))return}}},{key:"getAvcEncryptedData",value:function(e){for(var t=16*Math.floor((e.length-48)/160)+16,s=new Int8Array(t),n=0,r=32;r<e.length-16;r+=160,n+=16)s.set(e.subarray(r,r+16),n);return s}},{key:"getAvcDecryptedUnit",value:function(e,t){for(var s=new Uint8Array(t),n=0,r=32;r<e.length-16;r+=160,n+=16)e.set(s.subarray(n,n+16),r);return e}},{key:"decryptAvcSample",value:function(e,t,s,n,r){var o=this,a=Ei(r.data),c=this.getAvcEncryptedData(a);this.decryptBuffer(c.buffer).then((function(c){r.data=o.getAvcDecryptedUnit(a,c),o.decrypter.isSync()||o.decryptAvcSamples(e,t,s+1,n)})).catch(n)}},{key:"decryptAvcSamples",value:function(e,t,s,n){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,s=0){if(t>=e.length)return void n();for(var r=e[t].units;!(s>=r.length);s++){var a=r[s];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,s,n,a),this.decrypter.isSync())))return}}}}]),e}(),Uu=function(){function e(){A(this,e),this.VideoSample=null}return I(e,[{key:"createVideoSample",value:function(e,t,s){return{key:e,frame:!1,pts:t,dts:s,units:[],length:0}}},{key:"getLastNalUnit",value:function(e){var t,n,s=this.VideoSample;if((!s||0===s.units.length)&&(s=e[e.length-1]),null!=(t=s)&&t.units){var r=s.units;n=r[r.length-1]}return n}},{key:"pushAccessUnit",value:function(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var s=t.samples,n=s.length;if(!n)return void t.dropped++;var r=s[n-1];e.pts=r.pts,e.dts=r.dts}t.samples.push(e)}}},{key:"parseNALu",value:function(e,t,s){var n,u,r=t.byteLength,o=e.naluState||0,a=o,c=[],l=0,d=-1,h=0;for(-1===o&&(d=0,h=this.getNALuType(t,0),o=0,l=1);l<r;)if(n=t[l++],o)if(1!==o)if(n)if(1===n){if(u=l-o-1,d>=0){var f={data:t.subarray(d,u),type:h};c.push(f)}else{var v=this.getLastNalUnit(e.samples);v&&(a&&l<=4-a&&v.state&&(v.data=v.data.subarray(0,v.data.byteLength-a)),u>0&&(v.data=vi(v.data,t.subarray(0,u)),v.state=0))}l<r?(d=l,h=this.getNALuType(t,l),o=0):o=-1}else o=0;else o=3;else o=n?0:2;else o=n?0:1;if(d>=0&&o>=0){var m={data:t.subarray(d,r),type:h,state:o};c.push(m)}if(0===c.length){var y=this.getLastNalUnit(e.samples);y&&(y.data=vi(y.data,t))}return e.naluState=o,c}}]),e}(),Fu=function(){function e(t){A(this,e),this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}return I(e,[{key:"loadWord",value:function(){var e=this.data,t=this.bytesAvailable,s=e.byteLength-t,n=new Uint8Array(4),r=Math.min(4,t);if(0===r)throw new Error("no bytes available");n.set(e.subarray(s,s+r)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r}},{key:"skipBits",value:function(e){var t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),s=this.word>>>32-t;if(e>32&&xr.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return(t=e-t)>0&&this.bitsAvailable?s<<t|this.readBits(t):s}},{key:"skipLZ",value:function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}}]),e}(),Bu=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"parsePES",value:function(e,t,s,n){var r,o=this,c=this.parseNALu(e,s.data,n),a=this.VideoSample,l=!1;s.data=null,a&&c.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,s.pts,s.dts)),c.forEach((function(n){var u,c;switch(n.type){case 1:var p=!1;r=!0;var d,g=n.data;if(l&&g.length>4){var h=o.readSliceType(g);(2===h||4===h||7===h||9===h)&&(p=!0)}if(p)null!=(d=a)&&d.frame&&!a.key&&(o.pushAccessUnit(a,e),a=o.VideoSample=null);a||(a=o.VideoSample=o.createVideoSample(!0,s.pts,s.dts)),a.frame=!0,a.key=p;break;case 5:r=!0,null!=(u=a)&&u.frame&&!a.key&&(o.pushAccessUnit(a,e),a=o.VideoSample=null),a||(a=o.VideoSample=o.createVideoSample(!0,s.pts,s.dts)),a.key=!0,a.frame=!0;break;case 6:r=!0,bi(n.data,1,s.pts,t.samples);break;case 7:var f,v;r=!0,l=!0;var m=n.data,y=o.readSPS(m);if(!e.sps||e.width!==y.width||e.height!==y.height||(null==(f=e.pixelRatio)?void 0:f[0])!==y.pixelRatio[0]||(null==(v=e.pixelRatio)?void 0:v[1])!==y.pixelRatio[1]){e.width=y.width,e.height=y.height,e.pixelRatio=y.pixelRatio,e.sps=[m];for(var E=m.subarray(1,4),_="avc1.",k=0;k<3;k++){var b=E[k].toString(16);b.length<2&&(b="0"+b),_+=b}e.codec=_}break;case 8:r=!0,e.pps=[n.data];break;case 9:r=!0,e.audFound=!0,null!=(c=a)&&c.frame&&(o.pushAccessUnit(a,e),a=null),a||(a=o.VideoSample=o.createVideoSample(!1,s.pts,s.dts));break;case 12:r=!0;break;default:r=!1}a&&r&&a.units.push(n)})),n&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}},{key:"getNALuType",value:function(e,t){return 31&e[t]}},{key:"readSliceType",value:function(e){var t=new Fu(e);return t.readUByte(),t.readUEG(),t.readUEG()}},{key:"skipScalingList",value:function(e,t){for(var s=8,n=8,a=0;a<e;a++)0!==n&&(n=(s+t.readEG()+256)%256),s=0===n?s:n}},{key:"readSPS",value:function(e){var t,n,r,o=new Fu(e),s=0,c=0,l=0,a=0,u=o.readUByte.bind(o),d=o.readBits.bind(o),h=o.readUEG.bind(o),f=o.readBoolean.bind(o),v=o.skipBits.bind(o),p=o.skipEG.bind(o),g=o.skipUEG.bind(o),m=this.skipScalingList.bind(this);u();var y=u();if(d(5),v(3),u(),g(),100===y||110===y||122===y||244===y||44===y||83===y||86===y||118===y||128===y){var E=h();if(3===E&&v(1),g(),g(),v(1),f())for(n=3!==E?8:12,r=0;r<n;r++)f()&&m(r<6?16:64,o)}g();var _=h();if(0===_)h();else if(1===_)for(v(1),p(),p(),t=h(),r=0;r<t;r++)p();g(),v(1);var b=h(),k=h(),T=d(1);0===T&&v(1),v(1),f()&&(s=h(),c=h(),l=h(),a=h());var w=[1,1];if(f()&&f())switch(u()){case 1:w=[1,1];break;case 2:w=[12,11];break;case 3:w=[10,11];break;case 4:w=[16,11];break;case 5:w=[40,33];break;case 6:w=[24,11];break;case 7:w=[20,11];break;case 8:w=[32,11];break;case 9:w=[80,33];break;case 10:w=[18,11];break;case 11:w=[15,11];break;case 12:w=[64,33];break;case 13:w=[160,99];break;case 14:w=[4,3];break;case 15:w=[3,2];break;case 16:w=[2,1];break;case 255:w=[u()<<8|u(),u()<<8|u()]}return{width:Math.ceil(16*(b+1)-2*s-2*c),height:(2-T)*(k+1)*16-(T?2:4)*(l+a),pixelRatio:w}}}]),n}(Uu),ju=function(e){T(n,e);var t=P(n);function n(){var e;A(this,n);for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c];return(e=t.call.apply(t,[this].concat(o))).initVPS=null,e}return I(n,[{key:"parsePES",value:function(e,t,s,n){var r,o=this,c=this.parseNALu(e,s.data,n),a=this.VideoSample,l=!1;s.data=null,a&&c.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,s.pts,s.dts)),c.forEach((function(n){var u,c;switch(n.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:a||(a=o.VideoSample=o.createVideoSample(!1,s.pts,s.dts)),a.frame=!0,r=!0;break;case 16:case 17:case 18:case 21:var d;if(r=!0,l)null!=(d=a)&&d.frame&&!a.key&&(o.pushAccessUnit(a,e),a=o.VideoSample=null);a||(a=o.VideoSample=o.createVideoSample(!0,s.pts,s.dts)),a.key=!0,a.frame=!0;break;case 19:case 20:r=!0,null!=(u=a)&&u.frame&&!a.key&&(o.pushAccessUnit(a,e),a=o.VideoSample=null),a||(a=o.VideoSample=o.createVideoSample(!0,s.pts,s.dts)),a.key=!0,a.frame=!0;break;case 39:r=!0,bi(n.data,2,s.pts,t.samples);break;case 32:r=!0,e.vps||("object"!=R(e.params)&&(e.params={}),e.params=kr(e.params,o.readVPS(n.data)),o.initVPS=n.data),e.vps=[n.data];break;case 33:if(r=!0,l=!0,void 0!==e.vps&&e.vps[0]!==o.initVPS&&void 0!==e.sps&&!o.matchSPS(e.sps[0],n.data)&&(o.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){var h=o.readSPS(n.data);for(var f in e.width=h.width,e.height=h.height,e.pixelRatio=h.pixelRatio,e.codec=h.codecString,e.sps=[],"object"!=R(e.params)&&(e.params={}),h.params)e.params[f]=h.params[f]}o.pushParameterSet(e.sps,n.data,e.vps),a||(a=o.VideoSample=o.createVideoSample(!0,s.pts,s.dts)),a.key=!0;break;case 34:if(r=!0,"object"==R(e.params)){if(!e.pps){e.pps=[];var v=o.readPPS(n.data);for(var m in v)e.params[m]=v[m]}o.pushParameterSet(e.pps,n.data,e.vps)}break;case 35:r=!0,e.audFound=!0,null!=(c=a)&&c.frame&&(o.pushAccessUnit(a,e),a=null),a||(a=o.VideoSample=o.createVideoSample(!1,s.pts,s.dts));break;default:r=!1}a&&r&&a.units.push(n)})),n&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}},{key:"pushParameterSet",value:function(e,t,s){(s&&s[0]===this.initVPS||!s&&!e.length)&&e.push(t)}},{key:"getNALuType",value:function(e,t){return(126&e[t])>>>1}},{key:"ebsp2rbsp",value:function(e){for(var t=new Uint8Array(e.byteLength),s=0,n=0;n<e.byteLength;n++)n>=2&&3===e[n]&&0===e[n-1]&&0===e[n-2]||(t[s]=e[n],s++);return new Uint8Array(t.buffer,0,s)}},{key:"pushAccessUnit",value:function(e,t){y(S(n.prototype),"pushAccessUnit",this).call(this,e,t),this.initVPS&&(this.initVPS=null)}},{key:"readVPS",value:function(e){var t=new Fu(e);return t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6),{numTemporalLayers:t.readBits(3)+1,temporalIdNested:t.readBoolean()}}},{key:"readSPS",value:function(e){var t=new Fu(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);var s=t.readBits(3);t.readBoolean();for(var n=t.readBits(2),r=t.readBoolean(),a=t.readBits(5),o=t.readUByte(),c=t.readUByte(),l=t.readUByte(),u=t.readUByte(),d=t.readUByte(),h=t.readUByte(),f=t.readUByte(),v=t.readUByte(),p=t.readUByte(),g=t.readUByte(),m=t.readUByte(),y=[],E=[],_=0;_<s;_++)y.push(t.readBoolean()),E.push(t.readBoolean());if(s>0)for(var k=s;k<8;k++)t.readBits(2);for(var T=0;T<s;T++)y[T]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),E[T]&&t.readUByte();t.readUEG();var b=t.readUEG();3==b&&t.skipBits(1);var w=t.readUEG(),S=t.readUEG(),A=t.readBoolean(),I=0,R=0,O=0,L=0;A&&(I+=t.readUEG(),R+=t.readUEG(),O+=t.readUEG(),L+=t.readUEG());for(var D=t.readUEG(),x=t.readUEG(),C=t.readUEG(),M=t.readBoolean()?0:s;M<=s;M++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(var P=0;P<4;P++)for(var N=0;N<(3===P?2:6);N++)if(t.readBoolean()){var U=Math.min(64,1<<4+(P<<1));P>1&&t.readEG();for(var F=0;F<U;F++)t.readEG()}else t.readUEG();t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());for(var q=t.readUEG(),B=0,j=0;j<q;j++){var V=!1;if(0!==j&&(V=t.readBoolean()),V){j===q&&t.readUEG(),t.readBoolean(),t.readUEG();for(var H=0,W=0;W<=B;W++){var G=t.readBoolean(),K=!1;G||(K=t.readBoolean()),(G||K)&&H++}B=H}else{var Y=t.readUEG(),$=t.readUEG();B=Y+$;for(var Q=0;Q<Y;Q++)t.readUEG(),t.readBoolean();for(var z=0;z<$;z++)t.readUEG(),t.readBoolean()}}if(t.readBoolean())for(var X=t.readUEG(),J=0;J<X;J++){for(var Z=0;Z<C+4;Z++)t.readBits(1);t.readBits(1)}var ee=0,te=1,ne=1,re=!0,ie=1,ae=0;t.readBoolean(),t.readBoolean();if(t.readBoolean()){if(t.readBoolean()){var oe=t.readUByte();oe>0&&oe<16?(te=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][oe-1],ne=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][oe-1]):255===oe&&(te=t.readBits(16),ne=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(ie=t.readBits(32),ae=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){var se=t.readBoolean(),ue=t.readBoolean(),ce=!1;(se||ue)&&((ce=t.readBoolean())&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),ce&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(var le=0;le<=s;le++){var de=!1;(re=t.readBoolean())||t.readBoolean()?t.readEG():de=t.readBoolean();var he=de?1:t.readUEG()+1;if(se)for(var fe=0;fe<he;fe++)t.readUEG(),t.readUEG(),ce&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(ue)for(var pe=0;pe<he;pe++)t.readUEG(),t.readUEG(),ce&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),ee=t.readUEG())}var ve=w,me=S;if(A){var ge=1,ye=1;1===b?ge=ye=2:2==b&&(ge=2),ve=w-ge*R-ge*I,me=S-ye*L-ye*O}for(var be=n?["A","B","C"][n]:"",Ee=o<<24|c<<16|l<<8|u,_e=0,ke=0;ke<32;ke++)_e=(_e|(Ee>>ke&1)<<31-ke)>>>0;var Te=_e.toString(16);return 1===a&&"2"===Te&&(Te="6"),{codecString:"hvc1.".concat(be).concat(a,".").concat(Te,".").concat(r?"H":"L").concat(m,".B0"),params:{general_tier_flag:r,general_profile_idc:a,general_profile_space:n,general_profile_compatibility_flags:[o,c,l,u],general_constraint_indicator_flags:[d,h,f,v,p,g],general_level_idc:m,bit_depth:D+8,bit_depth_luma_minus8:D,bit_depth_chroma_minus8:x,min_spatial_segmentation_idc:ee,chroma_format_idc:b,frame_rate:{fixed:re,fps:ae/ie}},width:ve,height:me,pixelRatio:[te,ne]}}},{key:"readPPS",value:function(e){var t=new Fu(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);var n=t.readBoolean(),r=t.readBoolean(),a=1;return r&&n?a=0:r?a=3:n&&(a=2),{parallelismType:a}}},{key:"matchSPS",value:function(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}]),n}(Uu),Vu=188,Hu=function(){function i(e,t,s,n){A(this,i),this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=s,this.logger=n,this.videoParser=null}return I(i,[{key:"resetInitSegment",value:function(e,t,s,n){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=i.createTrack("video"),this._videoTrack.duration=n,this._audioTrack=i.createTrack("audio",n),this._id3Track=i.createTrack("id3"),this._txtTrack=i.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=s}},{key:"resetTimeStamp",value:function(){}},{key:"resetContiguity",value:function(){var e=this._audioTrack,t=this._videoTrack,s=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),s&&(s.pesData=null),this.aacOverFlow=null,this.remainderData=null}},{key:"demux",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];s||(this.sampleAes=null);var r,a=this._videoTrack,o=this._audioTrack,c=this._id3Track,l=this._txtTrack,u=a.pid,d=a.pesData,h=o.pid,f=c.pid,v=o.pesData,p=c.pesData,g=null,m=this.pmtParsed,y=this._pmtId,E=e.length;if(this.remainderData&&(E=(e=vi(this.remainderData,e)).length,this.remainderData=null),E<Vu&&!n)return this.remainderData=e,{audioTrack:o,videoTrack:a,id3Track:c,textTrack:l};var b=Math.max(0,i.syncOffset(e));(E-=(E-b)%Vu)<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,E,e.buffer.byteLength-E));for(var _=0,k=b;k<E;k+=Vu)if(71===e[k]){var T=!!(64&e[k+1]),w=Wu(e,k),S=(48&e[k+3])>>4,A=void 0;if(S>1){if((A=k+5+e[k+4])===k+Vu)continue}else A=k+4;switch(w){case u:T&&(d&&(r=$u(d,this.logger))&&(this.readyVideoParser(a.segmentCodec),null!==this.videoParser&&this.videoParser.parsePES(a,l,r,!1)),d={data:[],size:0}),d&&(d.data.push(e.subarray(A,k+Vu)),d.size+=k+Vu-A);break;case h:if(T){if(v&&(r=$u(v,this.logger)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,r);break;case"mp3":this.parseMPEGPES(o,r);break;case"ac3":this.parseAC3PES(o,r)}v={data:[],size:0}}v&&(v.data.push(e.subarray(A,k+Vu)),v.size+=k+Vu-A);break;case f:T&&(p&&(r=$u(p,this.logger))&&this.parseID3PES(c,r),p={data:[],size:0}),p&&(p.data.push(e.subarray(A,k+Vu)),p.size+=k+Vu-A);break;case 0:T&&(A+=e[A]+1),y=this._pmtId=qu(e,A);break;case y:T&&(A+=e[A]+1);var I=Gu(e,A,this.typeSupported,s,this.observer,this.logger);(u=I.videoPid)>0&&(a.pid=u,a.segmentCodec=I.segmentVideoCodec),(h=I.audioPid)>0&&(o.pid=h,o.segmentCodec=I.segmentAudioCodec),(f=I.id3Pid)>0&&(c.pid=f),null!==g&&!m&&(this.logger.warn("MPEG-TS PMT found at ".concat(k," after unknown PID '").concat(g,"'. Backtracking to sync byte @").concat(b," to parse all TS packets.")),g=null,k=b-188),m=this.pmtParsed=!0;break;case 17:case 8191:break;default:g=w}}else _++;_>0&&Ku(this.observer,new Error("Found ".concat(_," TS packet/s that do not start with 0x47")),void 0,this.logger),a.pesData=d,o.pesData=v,c.pesData=p;var R={audioTrack:o,videoTrack:a,id3Track:c,textTrack:l};return n&&this.extractRemainingSamples(R),R}},{key:"flush",value:function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e}},{key:"extractRemainingSamples",value:function(e){var t,n=e.audioTrack,s=e.videoTrack,r=e.id3Track,o=e.textTrack,a=s.pesData,c=n.pesData,l=r.pesData;if(a&&(t=$u(a,this.logger))?(this.readyVideoParser(s.segmentCodec),null!==this.videoParser&&(this.videoParser.parsePES(s,o,t,!0),s.pesData=null)):s.pesData=a,c&&(t=$u(c,this.logger))){switch(n.segmentCodec){case"aac":this.parseAACPES(n,t);break;case"mp3":this.parseMPEGPES(n,t);break;case"ac3":this.parseAC3PES(n,t)}n.pesData=null}else null!=c&&c.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=c;l&&(t=$u(l,this.logger))?(this.parseID3PES(r,t),r.pesData=null):r.pesData=l}},{key:"demuxSampleAes",value:function(e,t,s){var n=this.demux(e,s,!0,!this.config.progressive),r=this.sampleAes=new Nu(this.observer,this.config,t);return this.decrypt(n,r)}},{key:"readyVideoParser",value:function(e){null===this.videoParser&&("avc"===e?this.videoParser=new Bu:"hevc"===e&&(this.videoParser=new ju))}},{key:"decrypt",value:function(e,t){return new Promise((function(s){var n=e.audioTrack,r=e.videoTrack;n.samples&&"aac"===n.segmentCodec?t.decryptAacSamples(n.samples,0,(function(){r.samples?t.decryptAvcSamples(r.samples,0,0,(function(){s(e)})):s(e)})):r.samples&&t.decryptAvcSamples(r.samples,0,0,(function(){s(e)}))}))}},{key:"destroy",value:function(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}},{key:"parseAACPES",value:function(e,t){var a,n,r,s=0,o=this.aacOverFlow,c=t.data;if(o){this.aacOverFlow=null;var l=o.missing,d=o.sample.unit.byteLength;if(-1===l)c=vi(o.sample.unit,c);else{var h=d-l;o.sample.unit.set(c.subarray(0,l),h),e.samples.push(o.sample),s=o.missing}}for(a=s,n=c.length;a<n-1&&!tu(c,a);a++);if(a!==s){var f,v=a<n-1;if(f=v?"AAC PES did not start with ADTS header,offset:".concat(a):"No ADTS header found in AAC PES",Ku(this.observer,new Error(f),v,this.logger),!v)return}if(ru(e,this.observer,c,a,this.audioCodec),void 0!==t.pts)r=t.pts;else{if(!o)return void this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var m=iu(e.samplerate);r=o.sample.pts+m}for(var u,y=0;a<n;){if(a+=(u=au(e,c,a,r,y)).length,u.missing){this.aacOverFlow=u;break}for(y++;a<n-1&&!tu(c,a);a++);}}},{key:"parseMPEGPES",value:function(e,t){var s=t.data,n=s.length,r=0,a=0,o=t.pts;if(void 0!==o)for(;a<n;)if(Iu(s,a)){var c=wu(e,s,a,o,r);if(!c)break;a+=c.length,r++}else a++;else this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")}},{key:"parseAC3PES",value:function(e,t){var s=t.data,n=t.pts;if(void 0!==n)for(var r,o=s.length,a=0,c=0;c<o&&(r=xu(e,s,c,n,a++))>0;)c+=r;else this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS")}},{key:"parseID3PES",value:function(e,t){if(void 0!==t.pts){var s=kr({},t,{type:this._videoTrack?li.emsg:li.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(s)}else this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")}}],[{key:"probe",value:function(e,t){var s=i.syncOffset(e);return s>0&&t.warn("MPEG2-TS detected but first sync word found @ offset ".concat(s)),-1!==s}},{key:"syncOffset",value:function(e){for(var t=e.length,s=Math.min(940,t-Vu)+1,n=0;n<s;){for(var r=!1,a=-1,o=0,c=n;c<t;c+=Vu){if(71!==e[c]||t-c!==Vu&&71!==e[c+Vu]){if(o)return-1;break}if(o++,-1===a&&(0!==(a=c)&&(s=Math.min(a+18612,e.length-Vu)+1)),r||(r=0===Wu(e,c)),r&&o>1&&(0===a&&o>2||c+Vu>s))return a}n++}return-1}},{key:"createTrack",value:function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:Jr[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}}}]),i}();function Wu(i,e){return((31&i[e+1])<<8)+i[e+2]}function qu(i,e){return(31&i[e+10])<<8|i[e+11]}function Gu(i,e,t,s,n,r){var a={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=e+3+((15&i[e+1])<<8|i[e+2])-4;for(e+=12+((15&i[e+10])<<8|i[e+11]);e<o;){var u=Wu(i,e),c=(15&i[e+3])<<8|i[e+4];switch(i[e]){case 207:if(!s){Yu("ADTS AAC",r);break}case 15:-1===a.audioPid&&(a.audioPid=u);break;case 21:-1===a.id3Pid&&(a.id3Pid=u);break;case 219:if(!s){Yu("H.264",r);break}case 27:-1===a.videoPid&&(a.videoPid=u);break;case 3:case 4:t.mpeg||t.mp3?-1===a.audioPid&&(a.audioPid=u,a.segmentAudioCodec="mp3"):r.log("MPEG audio found, not supported in this browser");break;case 193:if(!s){Yu("AC-3",r);break}case 129:t.ac3?-1===a.audioPid&&(a.audioPid=u,a.segmentAudioCodec="ac3"):r.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===a.audioPid&&c>0)for(var l=e+5,d=c;d>2;){switch(i[l]){case 106:!0!==t.ac3?r.log("AC-3 audio found, not supported in this browser for now"):(a.audioPid=u,a.segmentAudioCodec="ac3")}var p=i[l+1]+2;l+=p,d-=p}break;case 194:case 135:return Ku(n,new Error("Unsupported EC-3 in M2TS found"),void 0,r),a;case 36:-1===a.videoPid&&(a.videoPid=u,a.segmentVideoCodec="hevc",r.log("HEVC in M2TS found"))}e+=c+5}return a}function Ku(i,e,t,s){s.warn("parsing error: ".concat(e.message)),i.emit(cr.ERROR,cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function Yu(i,e){e.log("".concat(i," with AES-128-CBC encryption found in unencrypted stream"))}function $u(i,e){var s,t,n,a,r,o=0,c=i.data;if(!i||0===i.size)return null;for(;c[0].length<19&&c.length>1;)c[0]=vi(c[0],c[1]),c.splice(1,1);if(((s=c[0])[0]<<16)+(s[1]<<8)+s[2]===1){if((t=(s[4]<<8)+s[5])&&t>i.size-6)return null;var u=s[7];192&u&&(a=536870912*(14&s[9])+4194304*(255&s[10])+16384*(254&s[11])+128*(255&s[12])+(254&s[13])/2,64&u?a-(r=536870912*(14&s[14])+4194304*(255&s[15])+16384*(254&s[16])+128*(255&s[17])+(254&s[18])/2)>54e5&&(e.warn("".concat(Math.round((a-r)/9e4),"s delta between PTS and DTS, align them")),a=r):r=a);var l=(n=s[8])+9;if(i.size<=l)return null;i.size-=l;for(var d=new Uint8Array(i.size),h=0,f=c.length;h<f;h++){var p=(s=c[h]).byteLength;if(l){if(l>p){l-=p;continue}s=s.subarray(l),p-=l,l=0}d.set(s,o),o+=p}return t&&(t-=n+3),{data:d,pts:a,dts:r,len:t}}return null}var Qu=function(){function e(){A(this,e)}return I(e,null,[{key:"getSilentFrame",value:function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}]),e}(),zu=Math.pow(2,32)-1,Xu=function(){function i(){A(this,i)}return I(i,null,[{key:"init",value:function(){var e;for(e in i.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},i.types)i.types.hasOwnProperty(e)&&(i.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),s=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);i.HDLR_TYPES={video:t,audio:s};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r=new Uint8Array([0,0,0,0,0,0,0,0]);i.STTS=i.STSC=i.STCO=r,i.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),i.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),i.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),i.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);i.FTYP=i.box(i.types.ftyp,a,c,a,o),i.DINF=i.box(i.types.dinf,i.box(i.types.dref,n))}},{key:"box",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var s=8,o=n.length,c=o;o--;)s+=n[o].byteLength;var a=new Uint8Array(s);for(a[0]=s>>24&255,a[1]=s>>16&255,a[2]=s>>8&255,a[3]=255&s,a.set(e,4),o=0,s=8;o<c;o++)a.set(n[o],s),s+=n[o].byteLength;return a}},{key:"hdlr",value:function(e){return i.box(i.types.hdlr,i.HDLR_TYPES[e])}},{key:"mdat",value:function(e){return i.box(i.types.mdat,e)}},{key:"mdhd",value:function(e,t){t*=e;var s=Math.floor(t/(zu+1)),n=Math.floor(t%(zu+1));return i.box(i.types.mdhd,new Uint8Array([1,0,0,0,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,255&e,s>>24,s>>16&255,s>>8&255,255&s,n>>24,n>>16&255,n>>8&255,255&n,85,196,0,0]))}},{key:"mdia",value:function(e){return i.box(i.types.mdia,i.mdhd(e.timescale||0,e.duration||0),i.hdlr(e.type),i.minf(e))}},{key:"mfhd",value:function(e){return i.box(i.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}},{key:"minf",value:function(e){return"audio"===e.type?i.box(i.types.minf,i.box(i.types.smhd,i.SMHD),i.DINF,i.stbl(e)):i.box(i.types.minf,i.box(i.types.vmhd,i.VMHD),i.DINF,i.stbl(e))}},{key:"moof",value:function(e,t,s){return i.box(i.types.moof,i.mfhd(e),i.traf(s,t))}},{key:"moov",value:function(e){for(var t=e.length,s=[];t--;)s[t]=i.trak(e[t]);return i.box.apply(null,[i.types.moov,i.mvhd(e[0].timescale||0,e[0].duration||0)].concat(s).concat(i.mvex(e)))}},{key:"mvex",value:function(e){for(var t=e.length,s=[];t--;)s[t]=i.trex(e[t]);return i.box.apply(null,[i.types.mvex].concat(s))}},{key:"mvhd",value:function(e,t){t*=e;var s=Math.floor(t/(zu+1)),n=Math.floor(t%(zu+1)),r=new Uint8Array([1,0,0,0,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,255&e,s>>24,s>>16&255,s>>8&255,255&s,n>>24,n>>16&255,n>>8&255,255&n,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 i.box(i.types.mvhd,r)}},{key:"sdtp",value:function(e){var t,n,r=e.samples||[],s=new Uint8Array(4+r.length);for(t=0;t<r.length;t++)n=r[t].flags,s[t+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return i.box(i.types.sdtp,s)}},{key:"stbl",value:function(e){return i.box(i.types.stbl,i.stsd(e),i.box(i.types.stts,i.STTS),i.box(i.types.stsc,i.STSC),i.box(i.types.stsz,i.STSZ),i.box(i.types.stco,i.STCO))}},{key:"avc1",value:function(e){var t,n,a,r=[],s=[];for(t=0;t<e.sps.length;t++)a=(n=e.sps[t]).byteLength,r.push(a>>>8&255),r.push(255&a),r=r.concat(Array.prototype.slice.call(n));for(t=0;t<e.pps.length;t++)a=(n=e.pps[t]).byteLength,s.push(a>>>8&255),s.push(255&a),s=s.concat(Array.prototype.slice.call(n));var o=i.box(i.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|e.sps.length].concat(r).concat([e.pps.length]).concat(s))),c=e.width,l=e.height,u=e.pixelRatio[0],d=e.pixelRatio[1];return i.box(i.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,c>>8&255,255&c,l>>8&255,255&l,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]),o,i.box(i.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),i.box(i.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,d>>24,d>>16&255,d>>8&255,255&d])))}},{key:"esds",value:function(e){var t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2].concat(v(t),[6,1,2]))}},{key:"audioStsd",value:function(e){var t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,255&t,0,0])}},{key:"mp4a",value:function(e){return i.box(i.types.mp4a,i.audioStsd(e),i.box(i.types.esds,i.esds(e)))}},{key:"mp3",value:function(e){return i.box(i.types[".mp3"],i.audioStsd(e))}},{key:"ac3",value:function(e){return i.box(i.types["ac-3"],i.audioStsd(e),i.box(i.types.dac3,e.config))}},{key:"stsd",value:function(e){var t=e.segmentCodec;if("audio"===e.type){if("aac"===t)return i.box(i.types.stsd,i.STSD,i.mp4a(e));if("ac3"===t&&e.config)return i.box(i.types.stsd,i.STSD,i.ac3(e));if("mp3"===t&&"mp3"===e.codec)return i.box(i.types.stsd,i.STSD,i.mp3(e))}else{if(!e.pps||!e.sps)throw new Error("video track missing pps or sps");if("avc"===t)return i.box(i.types.stsd,i.STSD,i.avc1(e));if("hevc"===t&&e.vps)return i.box(i.types.stsd,i.STSD,i.hvc1(e))}throw new Error("unsupported ".concat(e.type," segment codec (").concat(t,"/").concat(e.codec,")"))}},{key:"tkhd",value:function(e){var t=e.id,s=(e.duration||0)*(e.timescale||0),n=e.width||0,r=e.height||0,a=Math.floor(s/(zu+1)),o=Math.floor(s%(zu+1));return i.box(i.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o,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,255&n,0,0,r>>8&255,255&r,0,0]))}},{key:"traf",value:function(e,t){var s=i.sdtp(e),n=e.id,r=Math.floor(t/(zu+1)),a=Math.floor(t%(zu+1));return i.box(i.types.traf,i.box(i.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),i.box(i.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,a>>24,a>>16&255,a>>8&255,255&a])),i.trun(e,s.length+16+20+8+16+8+8),s)}},{key:"trak",value:function(e){return e.duration=e.duration||4294967295,i.box(i.types.trak,i.tkhd(e),i.mdia(e))}},{key:"trex",value:function(e){var t=e.id;return i.box(i.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trun",value:function(e,t){var n,r,o,u,c,l,s=e.samples||[],d=s.length,h=12+16*d,a=new Uint8Array(h);for(t+=8+h,a.set(["video"===e.type?1:0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),n=0;n<d;n++)o=(r=s[n]).duration,u=r.size,c=r.flags,l=r.cts,a.set([o>>>24&255,o>>>16&255,o>>>8&255,255&o,u>>>24&255,u>>>16&255,u>>>8&255,255&u,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.paddingValue<<1|c.isNonSync,61440&c.degradPrio,15&c.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*n);return i.box(i.types.trun,a)}},{key:"initSegment",value:function(e){i.types||i.init();var t=i.moov(e);return vi(i.FTYP,t)}},{key:"hvc1",value:function(e){for(var t=e.params,s=[e.vps,e.sps,e.pps],n=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),3|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),s.length]),a=n.length,r=0;r<s.length;r+=1){a+=3;for(var p=0;p<s[r].length;p+=1)a+=2+s[r][p].length}var o=new Uint8Array(a);o.set(n,0),a=n.length;for(var c=s.length-1,l=0;l<s.length;l+=1){o.set(new Uint8Array([32+l|(l===c?128:0),0,s[l].length]),a),a+=3;for(var d=0;d<s[l].length;d+=1)o.set(new Uint8Array([s[l][d].length>>8,255&s[l][d].length]),a),a+=2,o.set(s[l][d],a),a+=s[l][d].length}var h=i.box(i.types.hvcC,o),u=e.width,f=e.height,v=e.pixelRatio[0],m=e.pixelRatio[1];return i.box(i.types.hvc1,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,u>>8&255,255&u,f>>8&255,255&f,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]),h,i.box(i.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),i.box(i.types.pasp,new Uint8Array([v>>24,v>>16&255,v>>8&255,255&v,m>>24,m>>16&255,m>>8&255,255&m])))}}]),i}();Xu.types=void 0,Xu.HDLR_TYPES=void 0,Xu.STTS=void 0,Xu.STSC=void 0,Xu.STCO=void 0,Xu.STSZ=void 0,Xu.VMHD=void 0,Xu.SMHD=void 0,Xu.STSD=void 0,Xu.FTYP=void 0,Xu.DINF=void 0;var Ju=9e4;function Zu(i,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=i*e*t;return s?Math.round(n):n}function ec(i){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Zu(i,1e3,1/Ju,e)}function tc(i){var e=i.baseTime,t=i.timescale,s=i.trackId;return"".concat(e/t," (").concat(e,"/").concat(t,") trackId: ").concat(s)}var nc=null,rc=null;function ic(i,e,t,s){return{duration:e,size:t,cts:s,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:i?2:1,isNonSync:i?0:1}}}var ac=function(e){T(n,e);var t=P(n);function n(e,r,s,o){var c;if(A(this,n),(c=t.call(this,"mp4-remuxer",o)).observer=void 0,c.config=void 0,c.typeSupp
2orted=void 0,c.ISGenerated=!1,c._initPTS=null,c._initDTS=null,c.nextVideoTs=null,c.nextAudioTs=null,c.videoSampleDuration=null,c.isAudioContiguous=!1,c.isVideoContiguous=!1,c.videoTrackConfig=void 0,c.observer=e,c.config=r,c.typeSupported=s,c.ISGenerated=!1,null===nc){var a=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);nc=a?parseInt(a[1]):0}if(null===rc){var l=navigator.userAgent.match(/Safari\/(\d+)/i);rc=l?parseInt(l[1]):0}return w(c)}return I(n,[{key:"destroy",value:function(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}},{key:"resetTimeStamp",value:function(e){var t=this._initPTS;(!t||!e||e.trackId!==t.trackId||e.baseTime!==t.baseTime||e.timescale!==t.timescale)&&this.log("Reset initPTS: ".concat(t&&tc(t)," > ").concat(e&&tc(e))),this._initPTS=this._initDTS=e}},{key:"resetNextTimestamp",value:function(){this.log("reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}},{key:"resetInitSegment",value:function(){this.log("ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}},{key:"getVideoStartPts",value:function(e){var t=!1,s=e[0].pts,n=e.reduce((function(e,a){var n=a.pts,r=n-e;return r<-4294967296&&(t=!0,r=(n=oc(n,s))-e),r>0?e:n}),s);return t&&this.debug("PTS rollover detected"),n}},{key:"remux",value:function(e,t,s,n,r,a,o,c){var l,u,d,h,f,v,p=r,g=r,m=e.pid>-1,y=t.pid>-1,E=t.samples.length,b=e.samples.length>0,_=o&&E>0||E>1;if((!m||b)&&(!y||_)||this.ISGenerated||o){if(this.ISGenerated){var k,T,w,S,A=this.videoTrackConfig;(A&&(t.width!==A.width||t.height!==A.height||(null==(k=t.pixelRatio)?void 0:k[0])!==(null==(T=A.pixelRatio)?void 0:T[0])||(null==(w=t.pixelRatio)?void 0:w[1])!==(null==(S=A.pixelRatio)?void 0:S[1]))||!A&&_||null===this.nextAudioTs&&b)&&this.resetInitSegment()}this.ISGenerated||(d=this.generateIS(e,t,r,a));var I,R=this.isVideoContiguous,O=-1;if(_&&(O=function(i){for(var e=0;e<i.length;e++)if(i[e].key)return e;return-1}(t.samples),!R&&this.config.forceKeyFrameOnDiscontinuity))if(v=!0,O>0){this.warn("Dropped ".concat(O," out of ").concat(E," video samples due to a missing keyframe"));var L=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(O),t.dropped+=O,I=g+=(t.samples[0].pts-L)/t.inputTimeScale}else-1===O&&(this.warn("No keyframe found out of ".concat(E," video samples")),v=!1);if(this.ISGenerated){if(b&&_){var D=this.getVideoStartPts(t.samples),x=(oc(e.samples[0].pts,D)-D)/t.inputTimeScale;p+=Math.max(0,x),g+=Math.max(0,-x)}if(b){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),d=this.generateIS(e,t,r,a)),u=this.remuxAudio(e,p,this.isAudioContiguous,a,y||_||c===mr?g:void 0),_){var C=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),d=this.generateIS(e,t,r,a)),l=this.remuxVideo(t,g,R,C)}}else _&&(l=this.remuxVideo(t,g,R,0));l&&(l.firstKeyFrame=O,l.independent=-1!==O,l.firstKeyFramePTS=I)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(s.samples.length&&(f=sc(s,r,this._initPTS,this._initDTS)),n.samples.length&&(h=uc(n,r,this._initPTS))),{audio:u,video:l,initSegment:d,independent:v,text:h,id3:f}}},{key:"computeInitPts",value:function(e,t,s,n){var r=Math.round(s*t),a=oc(e,r);if(a<r+t)for(this.log("Adjusting PTS for rollover in timeline near ".concat((r-a)/t," ").concat(n));a<r+t;)a+=8589934592;return a-r}},{key:"generateIS",value:function(e,t,s,n){var r,o,c,l=e.samples,a=t.samples,d=this.typeSupported,h={},f=this._initPTS,u=!f||n,v="audio/mp4",p=-1;if(u&&(r=o=1/0),e.config&&l.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":d.mpeg?(v="audio/mpeg",e.codec=""):d.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}h.audio={id:"audio",container:v,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&d.mpeg?new Uint8Array(0):Xu.initSegment([e]),metadata:{channelCount:e.channelCount}},u&&(p=e.id,c=e.inputTimeScale,f&&c===f.timescale?u=!1:r=o=this.computeInitPts(l[0].pts,c,s,"audio"))}if(t.sps&&t.pps&&a.length){if(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Xu.initSegment([t]),metadata:{width:t.width,height:t.height}},u)if(p=t.id,c=t.inputTimeScale,f&&c===f.timescale)u=!1;else{var g=this.getVideoStartPts(a),m=oc(a[0].dts,g),y=this.computeInitPts(m,c,s,"video"),E=this.computeInitPts(g,c,s,"video");o=Math.min(o,y),r=Math.min(r,E)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(h).length)return this.ISGenerated=!0,u?(f&&this.warn("Timestamps at playlist time: ".concat(n?"":"~").concat(s," ").concat(r/c," != initPTS: ").concat(f.baseTime/f.timescale," (").concat(f.baseTime,"/").concat(f.timescale,") trackId: ").concat(f.trackId)),this.log("Found initPTS at playlist time: ".concat(s," offset: ").concat(r/c," (").concat(r,"/").concat(c,") trackId: ").concat(p)),this._initPTS={baseTime:r,timescale:c,trackId:p},this._initDTS={baseTime:o,timescale:c,trackId:p}):r=c=void 0,{tracks:h,initPTS:r,timescale:c,trackId:p}}},{key:"remuxVideo",value:function(e,t,s,n){var r,p,o=e.inputTimeScale,a=e.samples,c=[],l=a.length,d=this._initPTS,u=d.baseTime*o/d.timescale,h=this.nextVideoTs,f=8,v=this.videoSampleDuration,g=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,y=!1;if(!s||null===h){var E=u+t*o,_=a[0].pts-oc(a[0].dts,a[0].pts);nc&&null!==h&&Math.abs(E-_-(h+u))<15e3?s=!0:h=E-_-u}for(var k=h+u,T=0;T<l;T++){var w=a[T];w.pts=oc(w.pts,k),w.dts=oc(w.dts,k),w.dts<a[T>0?T-1:T].dts&&(y=!0)}y&&a.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),r=a[0].dts;var b=(p=a[a.length-1].dts)-r,S=b?Math.round(b/(l-1)):v||e.inputTimeScale/30;if(s){var A=r-k,I=A>S,R=A<-1;if((I||R)&&(I?this.warn("".concat((e.segmentCodec||"").toUpperCase(),": ").concat(ec(A,!0)," ms (").concat(A,"dts) hole between fragments detected at ").concat(t.toFixed(3))):this.warn("".concat((e.segmentCodec||"").toUpperCase(),": ").concat(ec(-A,!0)," ms (").concat(A,"dts) overlapping between fragments detected at ").concat(t.toFixed(3))),!R||k>=a[0].pts||nc)){r=k;var O=a[0].pts-A;if(I)a[0].dts=r,a[0].pts=O;else for(var L=!0,D=0;D<a.length&&!(a[D].dts>O&&L);D++){var x=a[D].pts;if(a[D].dts-=A,a[D].pts-=A,D<a.length-1){var C=a[D+1].pts;L=C<=a[D].pts==C<=x}}this.log("Video: Initial PTS/DTS adjusted: ".concat(ec(O,!0),"/").concat(ec(r,!0),", delta: ").concat(ec(A,!0)," ms"))}}for(var M=0,P=0,N=r=Math.max(0,r),U=0;U<l;U++){for(var F=a[U],B=F.units,j=B.length,V=0,H=0;H<j;H++)V+=B[H].data.length;P+=V,M+=j,F.length=V,F.dts<N?(F.dts=N,N+=S/4|0||1):N=F.dts,g=Math.min(F.pts,g),m=Math.max(F.pts,m)}p=a[l-1].dts;var W,G=P+4*M+8;
vendor: 6,052 bytes, line 2
2try{W=new Uint8Array(G)}catch(E){return void this.observer.emit(cr.ERROR,cr.ERROR,{type:sr.MUX_ERROR,details:ur.REMUX_ALLOC_ERROR,fatal:!1,error:E,bytes:G,reason:"fail allocating video mdat ".concat(G)})}var K=new DataView(W.buffer);K.setUint32(0,G),W.set(Xu.types.mdat,4);for(var Y=!1,$=Number.POSITIVE_INFINITY,Q=Number.POSITIVE_INFINITY,z=Number.NEGATIVE_INFINITY,X=Number.NEGATIVE_INFINITY,J=0;J<l;J++){for(var Z=a[J],ee=Z.units,te=0,ne=0,re=ee.length;ne<re;ne++){var ie=ee[ne],ae=ie.data,oe=ie.data.byteLength;K.setUint32(f,oe),f+=4,W.set(ae,f),f+=oe,te+=4+oe}var se=void 0;if(J<l-1)v=a[J+1].dts-Z.dts,se=a[J+1].pts-Z.pts;else{var ue=this.config,ce=J>0?Z.dts-a[J-1].dts:S;if(se=J>0?Z.pts-a[J-1].pts:S,ue.stretchShortVideoTrack&&null!==this.nextAudioTs){var le=Math.floor(ue.maxBufferHole*o),de=(n?g+n*o:this.nextAudioTs+u)-Z.pts;de>le?((v=de-ce)<0?v=ce:Y=!0,this.log("It is approximately ".concat(de/90," ms to the next segment; using duration ").concat(v/90," ms for the last video frame."))):v=ce}else v=ce}var he=Math.round(Z.pts-Z.dts);$=Math.min($,v),z=Math.max(z,v),Q=Math.min(Q,se),X=Math.max(X,se),c.push(ic(Z.key,v,te,he))}if(c.length)if(nc){if(nc<70){var fe=c[0].flags;fe.dependsOn=2,fe.isNonSync=0}}else if(rc&&X-Q<z-$&&S/z<.025&&0===c[0].cts){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var pe=r,ve=0,me=c.length;ve<me;ve++){var ge=pe+c[ve].duration,ye=pe+c[ve].cts;if(ve<me-1){var be=ge+c[ve+1].cts;c[ve].duration=be-ye}else c[ve].duration=ve?c[ve-1].duration:S;c[ve].cts=0,pe=ge}}var Ee=p+(v=Y||!v?S:v);this.nextVideoTs=h=Ee-u,this.videoSampleDuration=v,this.isVideoContiguous=!0;var _e={data1:Xu.moof(e.sequenceNumber++,r,kr(e,{samples:c})),data2:W,startPTS:(g-u)/o,endPTS:(m+v-u)/o,startDTS:(r-u)/o,endDTS:h/o,type:"video",hasAudio:!1,hasVideo:!0,nb:c.length,dropped:e.dropped};return e.samples=[],e.dropped=0,_e}},{key:"getSamplesPerFrame",value:function(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}}},{key:"remuxAudio",value:function(e,t,s,n,r){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),c=this.getSamplesPerFrame(e),u=c*o,l=this._initPTS,d="mp3"===e.segmentCodec&&this.typeSupported.mpeg,h=[],f=void 0!==r,p=e.samples,g=d?0:8,v=this.nextAudioTs||-1,m=l.baseTime*a/l.timescale,y=m+t*a;if(this.isAudioContiguous=s=s||p.length&&v>0&&(n&&Math.abs(y-(v+m))<9e3||Math.abs(oc(p[0].pts,y)-(v+m))<20*u),p.forEach((function(e){e.pts=oc(e.pts,y)})),!s||v<0){var E=p.length;if(E!==(p=p.filter((function(e){return e.pts>=0}))).length&&this.warn("Removed ".concat(p.length-E," of ").concat(E," samples (initPTS ").concat(m," / ").concat(a,")")),!p.length)return;v=0===r?0:n&&!f?Math.max(0,y-m):p[0].pts-m}if("aac"===e.segmentCodec)for(var _=this.config.maxAudioFramesDrift,k=0,q=v+m;k<p.length;k++){var T=p[k],w=T.pts,S=w-q,A=Math.abs(1e3*S/a);if(S<=-_*u&&f)0===k&&(this.warn("Audio frame @ ".concat((w/a).toFixed(3),"s overlaps marker by ").concat(Math.round(1e3*S/a)," ms.")),this.nextAudioTs=v=w-m,q=w);else if(S>=_*u&&A<1e4&&f){var I=Math.round(S/u);for(q=w-I*u;q<0&&I&&u;)I--,q+=u;0===k&&(this.nextAudioTs=v=q-m),this.warn("Injecting ".concat(I," audio frames @ ").concat(((q-m)/a).toFixed(3),"s due to ").concat(Math.round(1e3*S/a)," ms gap."));for(var R=0;R<I;R++){var O=Qu.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);O||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),O=T.unit.subarray()),p.splice(k,0,{unit:O,pts:q}),q+=u,k++}}T.pts=q,q+=u}for(var L,b=null,D=null,x=0,C=p.length;C--;)x+=p[C].unit.byteLength;for(var M=0,P=p.length;M<P;M++){var N=p[M],U=N.unit,F=N.pts;if(null!==D){h[M-1].duration=Math.round((F-D)/o)}else{if(s&&"aac"===e.segmentCodec&&(F=v+m),b=F,!(x>0))return;x+=g;try{L=new Uint8Array(x)}catch(A){return void this.observer.emit(cr.ERROR,cr.ERROR,{type:sr.MUX_ERROR,details:ur.REMUX_ALLOC_ERROR,fatal:!1,error:A,bytes:x,reason:"fail allocating audio mdat ".concat(x)})}d||(new DataView(L.buffer).setUint32(0,x),L.set(Xu.types.mdat,4))}L.set(U,g);var B=U.byteLength;g+=B,h.push(ic(!0,c,B,0)),D=F}var j=h.length;if(j){var V=h[h.length-1];v=D-m,this.nextAudioTs=v+o*V.duration;var H=d?new Uint8Array(0):Xu.moof(e.sequenceNumber++,b/o,kr({},e,{samples:h}));e.samples=[];var W=(b-m)/a,G=this.nextAudioTs/a,K={data1:H,data2:L,startPTS:W,endPTS:G,startDTS:W,endDTS:G,type:"audio",hasAudio:!0,hasVideo:!1,nb:j};return this.isAudioContiguous=!0,K}}}]),n}(Sr);function oc(i,e){var t;if(null===e)return i;for(t=e<i?-8589934592:8589934592;Math.abs(i-e)>4294967296;)i+=t;return i}function sc(i,e,t,s){var n=i.samples.length;if(n){for(var r=i.inputTimeScale,o=0;o<n;o++){var c=i.samples[o];c.pts=oc(c.pts-t.baseTime*r/t.timescale,e*r)/r,c.dts=oc(c.dts-s.baseTime*r/s.timescale,e*r)/r}var a=i.samples;return i.samples=[],{samples:a}}}function uc(i,e,t){var s=i.samples.length;if(s){for(var n=i.inputTimeScale,a=0;a<s;a++){var r=i.samples[a];r.pts=oc(r.pts-t.baseTime*n/t.timescale,e*n)/n}i.samples.sort((function(a,e){return a.pts-e.pts}));var o=i.samples;return i.samples=[],{samples:o}}}var cc,lc=function(e){T(n,e);var t=P(n);function n(e,r,s,o){var c;return A(this,n),(c=t.call(this,"passthrough-remuxer",o)).emitInitSegment=!1,c.audioCodec=void 0,c.videoCodec=void 0,c.initData=void 0,c.initPTS=null,c.initTracks=void 0,c.lastEndTime=null,c.isVideoContiguous=!1,c}return I(n,[{key:"destroy",value:function(){}},{key:"resetTimeStamp",value:function(e){this.lastEndTime=null;var t=this.initPTS;t&&e&&t.baseTime===e.baseTime&&t.timescale===e.timescale||(this.initPTS=e)}},{key:"resetNextTimestamp",value:function(){this.isVideoContiguous=!1,this.lastEndTime=null}},{key:"resetInitSegment",value:function(e,t,s,n){this.audioCodec=t,this.videoCodec=s,this.generateInitSegment(e,n),this.emitInitSegment=!0}},{key:"generateInitSegment",value:function(e,t){var s=this.audioCodec,n=this.videoCodec;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=oi(e),o=r.audio,a=r.video;
vendor: 4,534 bytes, line 2
2if(t)!function(i,e){if(i&&e){var t=e.keyId;t&&e.isCommonEncryption&&fi(i,(function(s,e){var n=s.subarray(8,24);n.some((function(a){return 0!==a}))||(xr.log("[eme] Patching keyId in 'enc".concat(e?"a":"v",">sinf>>tenc' box: ").concat(Nr(n)," -> ").concat(Nr(t))),s.set(t,8))}))}}(e,t);else{var c=o||a;null!=c&&c.encrypted&&this.warn('Init segment with encrypted track with has no key ("'.concat(c.codec,'")!'))}o&&(s=hc(o,Hr,this)),a&&(n=hc(a,Wr,this));var l={};o&&a?l.audiovideo={container:"video/mp4",codec:s+","+n,supplemental:a.supplemental,encrypted:a.encrypted,initSegment:e,id:"main"}:o?l.audio={container:"audio/mp4",codec:s,encrypted:o.encrypted,initSegment:e,id:"audio"}:a?l.video={container:"video/mp4",codec:n,supplemental:a.supplemental,encrypted:a.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=l}},{key:"remux",value:function(e,t,s,n,r,a){var o,c,l=this.initPTS,u=this.lastEndTime,d={audio:void 0,video:void 0,text:n,id3:s,initSegment:void 0};ir(u)||(u=this.lastEndTime=r||0);var h=t.samples;if(!h.length)return d;var f={initPTS:void 0,timescale:void 0,trackId:void 0},v=this.initData;if(null!=(o=v)&&o.length||(this.generateInitSegment(h),v=this.initData),null==(c=v)||!c.length)return this.warn("Failed to generate initSegment."),d;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1);var p=function(i,e,t){for(var s={},n=ii(i,["moof","traf"]),r=0;r<n.length;r++){var a=n[r],o=ii(a,["tfhd"])[0],c=ti(o,4),l=e[c];if(l){s[c]||(s[c]={start:NaN,duration:0,sampleCount:0,timescale:l.timescale,type:l.type});var u=s[c],d=ii(a,["tfdt"])[0];if(d){var h=d[0],b=ti(d,4);1===h&&(b===zr?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(b*=zr+1,b+=ti(d,8))),ir(b)&&(!ir(u.start)||b<u.start)&&(u.start=b)}var f=l.default,v=ti(o,0)|(null==f?void 0:f.flags),m=(null==f?void 0:f.duration)||0;8&v&&(m=ti(o,2&v?12:8));for(var p=ii(a,["trun"]),g=u.start||0,y=0,E=m,_=0;_<p.length;_++){var k=p[_],T=ti(k,4),w=u.sampleCount;u.sampleCount+=T;var S=1&k[3],A=4&k[3],I=1&k[2],R=2&k[2],O=4&k[2],L=8&k[2],D=8,x=T;for(S&&(D+=4),A&&T&&(!(1&k[D+1])&&void 0===u.keyFrameIndex&&(u.keyFrameIndex=w),D+=4,I?(E=ti(k,D),D+=4):E=m,R&&(D+=4),L&&(D+=4),g+=E,y+=E,x--);x--;)I?(E=ti(k,D),D+=4):E=m,R&&(D+=4),O&&(1&k[D+1]||void 0===u.keyFrameIndex&&(u.keyFrameIndex=u.sampleCount-(x+1),u.keyFrameStart=g),D+=4),L&&(D+=4),g+=E,y+=E;!y&&m&&(y+=m*T)}u.duration+=y}}if(!Object.keys(s).some((function(e){return s[e].duration}))){for(var C=1/0,M=0,P=ii(i,["sidx"]),N=0;N<P.length;N++){var U=ai(P[N]);if(null!=U&&U.references){C=Math.min(C,U.earliestPresentationTime/U.timescale);var F=U.references.reduce((function(e,t){return e+t.info.duration||0}),0);M=Math.max(M,F+U.earliestPresentationTime/U.timescale)}}M&&ir(M)&&Object.keys(s).forEach((function(e){s[e].duration||(s[e].duration=M*s[e].timescale-s[e].start)}))}return s}(h,v,this),g=v.audio?p[v.audio.id]:null,m=v.video?p[v.video.id]:null,y=dc(m,1/0),E=dc(g,1/0),b=dc(m,0,!0),_=dc(g,0,!0),k=r,T=0,w=g&&(!m||!l&&E<y||l&&l.trackId===v.audio.id),S=w?g:m;if(S){var q=S.timescale,A=S.start-r*q,I=w?v.audio.id:v.video.id;k=S.start/q,T=w?_-E:b-y,(a||!l)&&(function(i,e,t,s){if(null===i)return!0;var n=Math.max(s,1),r=e-i.baseTime/i.timescale;return Math.abs(r-t)>n}(l,k,r,T)||q!==l.timescale)&&(l&&this.warn("Timestamps at playlist time: ".concat(a?"":"~").concat(r," ").concat(A/q," != initPTS: ").concat(l.baseTime/l.timescale," (").concat(l.baseTime,"/").concat(l.timescale,") trackId: ").concat(l.trackId)),this.log("Found initPTS at playlist time: ".concat(r," offset: ").concat(k-r," (").concat(A,"/").concat(q,") trackId: ").concat(I)),l=null,f.initPTS=A,f.timescale=q,f.trackId=I)}else this.warn("No audio or video samples found for initPTS at playlist time: ".concat(r));l?(f.initPTS=l.baseTime,f.timescale=l.timescale,f.trackId=l.trackId):((!f.timescale||void 0===f.trackId||void 0===f.initPTS)&&(this.warn("Could not set initPTS"),f.initPTS=k,f.timescale=1,f.trackId=-1),this.initPTS=l={baseTime:f.initPTS,timescale:f.timescale,trackId:f.trackId});var R=k-l.baseTime/l.timescale,O=R+T;T>0?this.lastEndTime=O:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var L=!!v.audio,D=!!v.video,x="";L&&(x+="audio"),D&&(x+="video");var C={data1:h,startPTS:R,startDTS:R,endPTS:O,endDTS:O,type:x,hasAudio:L,hasVideo:D,nb:1,dropped:0,encrypted:!!v.audio&&v.audio.encrypted||!!v.video&&v.video.encrypted};d.audio=L&&!D?C:void 0,d.video=D?C:void 0;
2var M=null==m?void 0:m.sampleCount;if(M){var P=m.keyFrameIndex,N=-1!==P;C.nb=M,C.dropped=0===P||this.isVideoContiguous?0:N?P:M,C.independent=N,C.firstKeyFrame=P,N&&m.keyFrameStart&&(C.firstKeyFramePTS=(m.keyFrameStart-l.baseTime)/l.timescale),this.isVideoContiguous||(d.independent=N),this.isVideoContiguous||(this.isVideoContiguous=N),C.dropped&&this.warn("fmp4 does not start with IDR: firstIDR ".concat(P,"/").concat(M," dropped: ").concat(C.dropped," start: ").concat(C.firstKeyFramePTS||"NA"))}return d.initSegment=f,d.id3=sc(s,r,l,l),n.samples.length&&(d.text=uc(n,r,l)),d}}]),n}(Sr);function dc(i,e){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return void 0!==(null==i?void 0:i.start)?(i.start+(t?i.duration:0))/i.timescale:e}function hc(i,e,t){var s=i.codec;return s&&s.length>4?s:e===Hr?"ec-3"===s||"ac-3"===s||"alac"===s?s:"fLaC"===s||"Opus"===s?Mi(s,!1):(t.warn('Unhandled audio codec "'.concat(s,'" in mp4 MAP')),s||"mp4a"):(t.warn('Unhandled video codec "'.concat(s,'" in mp4 MAP')),s||"avc1")}try{cc=self.performance.now.bind(self.performance)}catch(e){cc=Date.now}var fc=[{demux:rp,remux:lc},{demux:Hu,remux:ac},{demux:Ou,remux:ac},{demux:Cu,remux:ac}];fc.splice(2,0,{demux:Du,remux:ac});var pc=function(){function e(t,n,s,r,o,a){A(this,e),this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=t,this.typeSupported=n,this.config=s,this.id=o,this.logger=a}return I(e,[{key:"configure",value:function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}},{key:"push",value:function(e,t,s,n){var r=this,o=s.transmuxing;o.executeStart=cc();var a=new Uint8Array(e),c=this.currentTransmuxState,l=this.transmuxConfig;n&&(this.currentTransmuxState=n);var d=n||c,h=d.contiguous,u=d.discontinuity,f=d.trackSwitch,v=d.accurateTimeOffset,m=d.timeOffset,y=d.initSegmentChange,p=l.audioCodec,g=l.videoCodec,E=l.defaultInitPts,_=l.duration,k=l.initSegmentData,b=function(i,e){var t=null;return i.byteLength>0&&null!=(null==e?void 0:e.key)&&null!==e.iv&&null!=e.method&&(t=e),t}(a,t);if(b&&wo(b.method)){var T=this.getDecrypter(),w=So(b.method);if(!T.isSync())return this.asyncResult=!0,this.decryptionPromise=T.webCryptoDecrypt(a,b.key.buffer,b.iv.buffer,w).then((function(e){var t=r.push(e,null,s);return r.decryptionPromise=null,t})),this.decryptionPromise;var S=T.softwareDecrypt(a,b.key.buffer,b.iv.buffer,w);if(s.part>-1){var A=T.flush();S=A&&A.buffer}if(!S)return o.executeEnd=cc(),vc(s);a=new Uint8Array(S)}var I=this.needsProbing(u,f);if(I){var R=this.configureTransmuxer(a);if(R)return this.logger.warn("[transmuxer] ".concat(R.message)),this.observer.emit(cr.ERROR,cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.FRAG_PARSING_ERROR,fatal:!1,error:R,reason:R.message}),o.executeEnd=cc(),vc(s)}(u||f||y||I)&&this.resetInitSegment(k,p,g,_,t),(u||y||I)&&this.resetInitialTimestamp(E),h||this.resetContiguity();var O=this.transmux(a,b,m,v,s);this.asyncResult=mc(O);var L=this.currentTransmuxState;return L.contiguous=!0,L.discontinuity=!1,L.trackSwitch=!1,o.executeEnd=cc(),O}},{key:"flush",value:function(e){var t=this,n=e.transmuxing;n.executeStart=cc();var s=this.decrypter,r=this.currentTransmuxState,o=this.decryptionPromise;if(o)return this.asyncResult=!0,o.then((function(){return t.flush(e)}));var a=[],c=r.timeOffset;if(s){var l=s.flush();l&&a.push(this.push(l.buffer,null,e))}var d=this.demuxer,h=this.remuxer;if(!d||!h){n.executeEnd=cc();var f=[vc(e)];return this.asyncResult?Promise.resolve(f):f}var u=d.flush(c);return mc(u)?(this.asyncResult=!0,u.then((function(n){return t.flushRemux(a,n,e),a}))):(this.flushRemux(a,u,e),this.asyncResult?Promise.resolve(a):a)}},{key:"flushRemux",value:function(e,t,s){var n=t.audioTrack,r=t.videoTrack,a=t.id3Track,o=t.textTrack,c=this.currentTransmuxState,l=c.accurateTimeOffset,d=c.timeOffset;this.logger.log("[transmuxer.ts]: Flushed ".concat(this.id," sn: ").concat(s.sn).concat(s.part>-1?" part: "+s.part:""," of ").concat(this.id===vr?"level":"track"," ").concat(s.level));var u=this.remuxer.remux(n,r,a,o,d,l,!0,this.id);e.push({remuxResult:u,chunkMeta:s}),s.transmuxing.executeEnd=cc()}},{key:"resetInitialTimestamp",value:function(e){var t=this.demuxer,s=this.remuxer;!t||!s||(t.resetTimeStamp(e),s.resetTimeStamp(e))}},{key:"resetContiguity",value:function(){var e=this.demuxer,t=this.remuxer;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}},{key:"resetInitSegment",value:function(e,t,s,n,r){var a=this.demuxer,o=this.remuxer;!a||!o||(a.resetInitSegment(e,t,s,n),o.resetInitSegment(e,t,s,r))}},{key:"destroy",value:function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}},{key:"transmux",value:function(e,t,s,n,r){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,s,n,r):this.transmuxUnencrypted(e,s,n,r)}},{key:"transmuxUnencrypted",value:function(e,t,s,n){var r=this.demuxer.demux(e,t,!1,!this.config.progressive),o=r.audioTrack,a=r.videoTrack,
vendor: 45,149 bytes, line 2
2c=r.id3Track,l=r.textTrack;return{remuxResult:this.remuxer.remux(o,a,c,l,t,s,!1,this.id),chunkMeta:n}}},{key:"transmuxSampleAes",value:function(e,t,s,n,r){var o=this;return this.demuxer.demuxSampleAes(e,t,s).then((function(a){return{remuxResult:o.remuxer.remux(a.audioTrack,a.videoTrack,a.id3Track,a.textTrack,s,n,!1,o.id),chunkMeta:r}}))}},{key:"configureTransmuxer",value:function(e){for(var t,n=this.config,s=this.observer,r=this.typeSupported,o=0,c=fc.length;o<c;o++){var a;if(null!=(a=fc[o].demux)&&a.probe(e,this.logger)){t=fc[o];break}}if(!t)return new Error("Failed to find demuxer by probing fragment data");var l=this.demuxer,d=this.remuxer,h=t.remux,u=t.demux;(!d||!(d instanceof h))&&(this.remuxer=new h(s,n,r,this.logger)),(!l||!(l instanceof u))&&(this.demuxer=new u(s,n,r,this.logger),this.probe=u.probe)}},{key:"needsProbing",value:function(e,t){return!this.demuxer||!this.remuxer||e||t}},{key:"getDecrypter",value:function(){var e=this.decrypter;return e||(e=this.decrypter=new Ja(this.config)),e}}]),e}();var vc=function(i){return{remuxResult:{},chunkMeta:i}};function mc(i){return"then"in i&&i.then instanceof Function}var gc=I((function e(t,n,s,r,o){A(this,e),this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=t,this.videoCodec=n,this.initSegmentData=s,this.duration=r,this.defaultInitPts=o||null})),yc=I((function e(t,n,s,r,o,a){A(this,e),this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=t,this.contiguous=n,this.accurateTimeOffset=s,this.trackSwitch=r,this.timeOffset=o,this.initSegmentChange=a})),bc=0,Ec=function(){function e(t,n,s,r){var o=this;A(this,e),this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=bc++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=function(e){var t=e.data,u=o.hls;if(u&&null!=t&&t.event&&t.instanceNo===o.instanceNo)switch(t.event){case"init":var n,r=null==(n=o.workerContext)?void 0:n.objectURL;r&&self.URL.revokeObjectURL(r);break;case"transmuxComplete":o.handleTransmuxComplete(t.data);break;case"flush":o.onFlush(t.data);break;case"workerLog":u.logger[t.data.logType]&&u.logger[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=o.frag,t.data.part=o.part,t.data.id=o.id,u.trigger(t.event,t.data)}},this.onWorkerError=function(e){if(o.hls){var t=new Error("".concat(e.message,"  (").concat(e.filename,":").concat(e.lineno,")"));o.hls.config.enableWorker=!1,o.hls.logger.warn('Error in "'.concat(o.id,'" Web Worker, fallback to inline')),o.hls.trigger(cr.ERROR,{type:sr.OTHER_ERROR,details:ur.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:t})}};var c=t.config;this.hls=t,this.id=n,this.useWorker=!!c.enableWorker,this.onTransmuxComplete=s,this.onFlush=r;var a=function(e,t){(t=t||{}).frag=o.frag||void 0,e===cr.ERROR&&((t=t).parent=o.id,t.part=o.part,o.error=t.error),o.hls.trigger(e,t)};this.observer=new Gs,this.observer.on(cr.FRAG_DECRYPTED,a),this.observer.on(cr.ERROR,a);var l=Fi(c.preferManagedMediaSource);if(this.useWorker&&"undefined"!=typeof Worker){var d=this.hls.logger;if(c.workerPath||"function"==typeof __HLS_WORKER_BUNDLE__){try{c.workerPath?(d.log("loading Web Worker ".concat(c.workerPath,' for "').concat(n,'"')),this.workerContext=function(i){var e=Ys[i];if(e)return e.clientCount++,e;var t=new self.URL(i,self.location.href).href,n={worker:new self.Worker(t),scriptURL:t,clientCount:1};return Ys[i]=n,n}(c.workerPath)):(d.log('injecting Web Worker for "'.concat(n,'"')),this.workerContext=function(){var i=Ys[Ks];if(i)return i.clientCount++,i;var e=new self.Blob(["var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(".concat(__HLS_WORKER_BUNDLE__.toString(),")(true);")],{type:"text/javascript"}),t=self.URL.createObjectURL(e),n={worker:new self.Worker(t),objectURL:t,clientCount:1};return Ys[Ks]=n,n}());var u=this.workerContext.worker;u.addEventListener("message",this.onWorkerMessage),u.addEventListener("error",this.onWorkerError),u.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:l,id:n,config:aa(c)})}catch(u){d.warn('Error setting up "'.concat(n,'" Web Worker, fallback to inline'),u),this.terminateWorker(),this.error=null,this.transmuxer=new pc(this.observer,l,c,"",n,t.logger)}return}}this.transmuxer=new pc(this.observer,l,c,"",n,t.logger)}return I(e,[{key:"reset",value:function(){if(this.frag=null,this.part=null,this.workerContext){var e=this.instanceNo;this.instanceNo=bc++;var t=this.hls.config,s=Fi(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:s,id:this.id,config:aa(t)})}}},{key:"terminateWorker",value:function(){if(this.workerContext){var e=this.workerContext.worker;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),function(i){var e=Ys[i||Ks];if(e&&1==e.clientCount--){var s=e.worker,t=e.objectURL;delete Ys[i||Ks],t&&self.URL.revokeObjectURL(t),s.terminate()}}(this.hls.config.workerPath)}}},{key:"destroy",value:function(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}},{key:"push",value:function(e,t,s,n,r,a,o,c,l,u){var d,h,f=this;l.transmuxing.start=self.performance.now();var v=this.instanceNo,m=this.transmuxer,p=a?a.start:r.start,g=r.decryptdata,y=this.frag,E=!(y&&r.cc===y.cc),_=!(y&&l.level===y.level),b=y?l.sn-y.sn:-1,k=this.part?l.part-this.part.index:-1,T=0===b&&l.id>1&&l.id===(null==y?void 0:y.stats.chunkCount),w=!_&&(1===b||0===b&&(1===k||T&&k<=0)),S=self.performance.now();(_||b||0===r.stats.parsing.start)&&(r.stats.parsing.start=S),a&&(k||!w)&&(a.stats.parsing.start=S);var A=!(y&&(null==(d=r.initSegment)?void 0:d.url)===(null==(h=y.initSegment)?void 0:h.url)),I=new yc(E,w,c,_,p,A);if(!w||E||A){this.hls.logger.log("[transmuxer-interface]: Starting new transmux session for ".concat(r.type," sn: ").concat(l.sn).concat(l.part>-1?" part: "+l.part:""," ").concat(this.id===vr?"level":"track",": ").concat(l.level," id: ").concat(l.id,"\n        discontinuity: ").concat(E,"\n        trackSwitch: ").concat(_,"\n        contiguous: ").concat(w,"\n        accurateTimeOffset: ").concat(c,"\n        timeOffset: ").concat(p,"\n        initSegmentChange: ").concat(A));var R=new gc(s,n,t,o,u);this.configureTransmuxer(R)}if(this.frag=r,this.part=a,this.workerContext)this.workerContext.worker.postMessage({instanceNo:v,cmd:"demux",data:e,decryptdata:g,chunkMeta:l,state:I},e instanceof ArrayBuffer?[e]:[]);else if(m){var O=m.push(e,g,l,I);mc(O)?O.then((function(e){f.handleTransmuxComplete(e)})).catch((function(e){f.transmuxerError(e,l,"transmuxer-interface push error")})):this.handleTransmuxComplete(O)}}},{key:"flush",value:function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.instanceNo,s=this.transmuxer;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:n,cmd:"flush",chunkMeta:e});else if(s){var r=s.flush(e);mc(r)?r.then((function(n){t.handleFlushResult(n,e)})).catch((function(n){t.transmuxerError(n,e,"transmuxer-interface flush error")})):this.handleFlushResult(r,e)}}},{key:"transmuxerError",value:function(e,t,s){this.hls&&(this.error=e,this.hls.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:s}))}},{key:"handleFlushResult",value:function(e,t){var n=this;e.forEach((function(s){n.handleTransmuxComplete(s)})),this.onFlush(t)}},{key:"configureTransmuxer",value:function(e){var t=this.instanceNo,s=this.transmuxer;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):s&&s.configure(e)}},{key:"handleTransmuxComplete",value:function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}]),e}(),_c=function(e){T(n,e);var t=P(n);function n(e,r,s){var o;return A(this,n),(o=t.call(this,e,r,s,"audio-stream-controller",mr)).mainAnchor=null,o.mainFragLoading=null,o.audioOnly=!1,o.bufferedTrack=null,o.switchingTrack=null,o.trackId=-1,o.waitingData=null,o.mainDetails=null,o.flushing=!1,o.bufferFlushed=!1,o.cachedTrackLoadedData=null,o.registerListeners(),o}return I(n,[{key:"onHandlerDestroying",value:function(){this.unregisterListeners(),y(S(n.prototype),"onHandlerDestroying",this).call(this),this.resetItem()}},{key:"resetItem",value:function(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}},{key:"registerListeners",value:function(){y(S(n.prototype),"registerListeners",this).call(this);var e=this.hls;e.on(cr.LEVEL_LOADED,this.onLevelLoaded,this),e.on(cr.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(cr.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(cr.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(cr.BUFFER_RESET,this.onBufferReset,this),e.on(cr.BUFFER_CREATED,this.onBufferCreated,this),e.on(cr.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(cr.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(cr.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(cr.FRAG_LOADING,this.onFragLoading,this),e.on(cr.FRAG_BUFFERED,this.onFragBuffered,this)}},{key:"unregisterListeners",value:function(){var e=this.hls;e&&(y(S(n.prototype),"unregisterListeners",this).call(this),e.off(cr.LEVEL_LOADED,this.onLevelLoaded,this),e.off(cr.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(cr.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(cr.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(cr.BUFFER_RESET,this.onBufferReset,this),e.off(cr.BUFFER_CREATED,this.onBufferCreated,this),e.off(cr.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(cr.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(cr.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(cr.FRAG_LOADING,this.onFragLoading,this),e.off(cr.FRAG_BUFFERED,this.onFragBuffered,this))}},{key:"onInitPtsFound",value:function(e,t){var n=t.frag,s=t.id,r=t.initPTS,o=t.timescale,a=t.trackId;if(s===vr){var c=n.cc,l=this.fragCurrent;if(this.initPTS[c]={baseTime:r,timescale:o,trackId:a},this.log("InitPTS for cc: ".concat(c," found from main: ").concat(r/o," (").concat(r,"/").concat(o,") trackId: ").concat(a)),this.mainAnchor=n,this.state===Fs){var d=this.waitingData;(!d&&!this.loadingParts||d&&d.frag.cc!==c)&&this.syncWithAnchor(n,null==d?void 0:d.frag)}else!this.hls.hasEnoughToStart&&l&&l.cc!==c?(l.abortRequests(),this.syncWithAnchor(n,l)):this.state===Os&&this.tick()}}},{key:"getLoadPosition",value:function(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:y(S(n.prototype),"getLoadPosition",this).call(this)}},{key:"syncWithAnchor",value:function(e,t){var s,n=(null==(s=this.mainFragLoading)?void 0:s.frag)||null;if(!t||(null==n?void 0:n.cc)!==t.cc){var r=(n||e).cc,o=Ea(this.getLevelDetails(),r,this.getLoadPosition());o&&(this.log("Syncing with main frag at ".concat(o.start," cc ").concat(o.cc)),this.startFragRequested=!1,this.nextLoadPosition=o.start,this.resetLoadingState(),this.state===Os&&this.doTickIdle())}}},{key:"startLoad",value:function(e,t){if(!this.levels)return this.startPosition=e,void(this.state=Rs);var s=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),s>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @".concat(s.toFixed(3))),e=s,this.state=Os):this.state=Cs,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}},{key:"doTick",value:function(){switch(this.state){case Os:this.doTickIdle();break;case Cs:var e=this.levels,t=this.trackId,s=null==e?void 0:e[t],r=null==s?void 0:s.details;if(r&&!this.waitForLive(s)){if(this.waitForCdnTuneIn(r))break;this.state=Fs}break;case xs:this.checkRetryDate();break;case Fs:var o=this.waitingData;if(o){var c=o.frag,l=o.part,d=o.cache,h=o.complete,a=this.mainAnchor;if(void 0!==this.initPTS[c.cc]){this.waitingData=null,this.state=Ds;var f={frag:c,part:l,payload:d.flush().buffer,networkDetails:null};this._handleFragmentLoadProgress(f),h&&y(S(n.prototype),"_handleFragmentLoadComplete",this).call(this,f)}else a&&a.cc!==o.frag.cc&&this.syncWithAnchor(a,o.frag)}else this.state=Os}this.onTickEnd()}},{key:"resetLoadingState",value:function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),y(S(n.prototype),"resetLoadingState",this).call(this)}},{key:"onTickEnd",value:function(){var e=this.media;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)}},{key:"doTickIdle",value:function(){var e,t=this.hls,s=this.levels,n=this.media,r=this.trackId,a=t.config;if(this.buffering&&(n||this.primaryPrefetch||!this.startFragRequested&&a.startFragPrefetch)&&null!=s&&s[r]){var o=s[r],c=o.details;if(!c||this.waitForLive(o)||this.waitForCdnTuneIn(c))return this.state=Cs,void(this.startFragRequested=!1);var l=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&l&&(this.bufferFlushed=!1,this.afterBufferFlushed(l,Hr,mr));var u=this.getFwdBufferInfo(l,mr);if(null!==u){if(!this.switchingTrack&&this._streamEnded(u,c))return t.trigger(cr.BUFFER_EOS,{type:"audio"}),void(this.state=Ns);var d=u.len,h=t.maxBufferLength,f=c.fragments,v=f[0].start,p=this.getLoadPosition(),g=this.flushing?p:u.end;if(this.switchingTrack&&n){var m=p;c.PTSKnown&&m<v&&(u.end>v||u.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=v+.05)}if(!(d>=h&&!this.switchingTrack&&g<f[f.length-1].start)){var y=this.getNextFragment(g,c);if(y&&this.isLoopLoading(y,g)&&(y=this.getNextFragmentLoopLoading(y,c,u,vr,h)),y){var E=(null==(e=this.mainFragLoading)?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&E&&Kr(y)&&!y.endList&&(!c.live||!this.loadingParts&&g<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(E)===Ha&&(this.mainFragLoading=E=null),E&&Kr(E))){if(y.start>E.end){var b=this.fragmentTracker.getFragAtPos(g,vr);b&&b.end>E.end&&(E=b,this.mainFragLoading={frag:b,targetBufferTime:null})}if(y.start>E.end)return}this.loadFragment(y,o,g)}else this.bufferFlushed=!0}}}}},{key:"onMediaDetaching",value:function(e,t){this.bufferFlushed=this.flushing=!1,y(S(n.prototype),"onMediaDetaching",this).call(this,e,t)}},{key:"onAudioTracksUpdated",value:function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(s){return new na(s)}))}},{key:"onAudioTrackSwitching",value:function(e,t){var s=!!t.url;this.trackId=t.id;var n=this.fragCurrent;n&&(n.abortRequests(),this.removeUnbufferedFrags(n.start)),this.resetLoadingState(),s?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==Rs&&(this.setInterval(100),this.state=Os,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}},{key:"onManifestLoading",value:function(){y(S(n.prototype),"onManifestLoading",this).call(this),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}},{key:"onLevelLoaded",value:function(e,t){this.mainDetails=t.details;var s=this.cachedTrackLoadedData;s&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(cr.AUDIO_TRACK_LOADED,s))}},{key:"onAudioTrackLoaded",value:function(e,t){var s,n=this.levels,r=t.details,a=t.id,o=t.groupId,c=t.track;if(n){var l=this.mainDetails;if(!l||r.endCC>l.endCC||l.expired)return this.cachedTrackLoadedData=t,void(this.state!==Rs&&(this.state=Cs));this.cachedTrackLoadedData=null,this.log("Audio track ".concat(a,' "').concat(c.name,'" of "').concat(o,'" loaded [').concat(r.startSN,",").concat(r.endSN,"]").concat(r.lastPartSn?"[part-".concat(r.lastPartSn,"-").concat(r.lastPartIndex,"]"):"",",duration:").concat(r.totalduration));var u=n[a],d=0;if(r.live||null!=(s=u.details)&&s.live){if(this.checkLiveUpdate(r),r.deltaUpdateFailed)return;var h;if(u.details)d=this.alignPlaylists(r,u.details,null==(h=this.levelLastLoaded)?void 0:h.details);r.alignedSliding||(Ts(r,l),r.alignedSliding||ws(r,l),d=r.fragmentStart)}u.details=r,this.levelLastLoaded=u,this.startFragRequested||this.setStartPosition(l,d),this.hls.trigger(cr.AUDIO_TRACK_UPDATED,{details:r,id:a,groupId:t.groupId}),this.state===Cs&&!this.waitForCdnTuneIn(r)&&(this.state=Os),this.tick()}else this.warn("Audio tracks reset while loading track ".concat(a,' "').concat(c.name,'" of "').concat(o,'"'))}},{key:"_handleFragmentLoadProgress",value:function(e){var t,s=e.frag,n=e.part,r=e.payload,a=this.config,o=this.trackId,c=this.levels;if(c){var l=c[o];if(l){var u=l.details;if(!u)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(s.start);var d=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2",h=this.transmuxer;h||(h=this.transmuxer=new Ec(this.hls,mr,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var f=this.initPTS[s.cc],v=null==(t=s.initSegment)?void 0:t.data;if(void 0!==f){var g=n?n.index:-1,m=-1!==g,y=new oo(s.level,s.sn,s.stats.chunkCount,r.byteLength,g,m);h.push(r,v,d,"",s,n,u.totalduration,!1,y,f)}else{this.log("Unknown video PTS for cc ".concat(s.cc,", waiting for video PTS before demuxing audio frag ").concat(s.sn," of [").concat(u.startSN," ,").concat(u.endSN,"],track ").concat(o)),(this.waitingData=this.waitingData||{frag:s,part:n,cache:new Hs,complete:!1}).cache.push(new Uint8Array(r)),this.state!==Rs&&(this.state=Fs)}}else this.warn("Audio track is undefined on fragment load progress")}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment ".concat(s.sn," of level ").concat(s.level," will not be buffered"))}},{key:"_handleFragmentLoadComplete",value:function(e){this.waitingData?this.waitingData.complete=!0:y(S(n.prototype),"_handleFragmentLoadComplete",this).call(this,e)}},{key:"onBufferReset",value:function(){this.mediaBuffer=null}},{key:"onBufferCreated",value:function(e,t){this.bufferFlushed=this.flushing=!1;var s=t.tracks.audio;s&&(this.mediaBuffer=s.buffer||null)}},{key:"onFragLoading",value:function(e,t){!this.audioOnly&&t.frag.type===vr&&Kr(t.frag)&&(this.mainFragLoading=t,this.state===Os&&this.tick())}},{key:"onFragBuffered",value:function(e,t){var s=t.frag,n=t.part;if(s.type===mr)if(this.fragContextChanged(s))this.warn("Fragment ".concat(s.sn).concat(n?" p: "+n.index:""," of level ").concat(s.level," finished buffering, but was aborted. state: ").concat(this.state,", audioSwitch: ").concat(this.switchingTrack?this.switchingTrack.name:"false"));else{if(Kr(s)){this.fragPrevious=s;var r=this.switchingTrack;r&&(this.bufferedTrack=r,this.switchingTrack=null,this.hls.trigger(cr.AUDIO_TRACK_SWITCHED,wr({},r)))}this.fragBufferedComplete(s,n),this.media&&this.tick()}else!this.audioOnly&&s.type===vr&&!s.elementaryStreams.video&&!s.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null)}},{key:"onError",value:function(e,t){var s;if(t.fatal)this.state=Us;else switch(t.details){case ur.FRAG_GAP:case ur.FRAG_PARSING_ERROR:case ur.FRAG_DECRYPT_ERROR:case ur.FRAG_LOAD_ERROR:case ur.FRAG_LOAD_TIMEOUT:case ur.KEY_LOAD_ERROR:case ur.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(mr,t);break;case ur.AUDIO_TRACK_LOAD_ERROR:case ur.AUDIO_TRACK_LOAD_TIMEOUT:case ur.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Cs&&(null==(s=t.context)?void 0:s.type)===fr&&(this.state=Os);break;case ur.BUFFER_ADD_CODEC_ERROR:case ur.BUFFER_APPEND_ERROR:if("audio"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case ur.BUFFER_FULL_ERROR:if("audio"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,y(S(n.prototype),"flushMainBuffer",this).call(this,0,Number.POSITIVE_INFINITY,"audio"));break;case ur.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}},{key:"onBufferFlushing",value:function(e,t){t.type!==Wr&&(this.flushing=!0)}},{key:"onBufferFlushed",value:function(e,t){var n=t.type;if(n!==Wr){this.flushing=!1,this.bufferFlushed=!0,this.state===Ns&&(this.state=Os);var s=this.mediaBuffer||this.media;s&&(this.afterBufferFlushed(s,n,mr),this.tick())}}},{key:"_handleTransmuxComplete",value:function(e){var t,s="audio",n=this.hls,r=e.remuxResult,a=e.chunkMeta,o=this.getCurrentContext(a);if(o){var c=o.frag,l=o.part,u=o.level,d=u.details,h=r.audio,f=r.text,v=r.id3,p=r.initSegment;if(!this.fragContextChanged(c)&&d){if(this.state=Ms,this.switchingTrack&&h&&this.completeAudioSwitch(this.switchingTrack),null!=p&&p.tracks){var g=c.initSegment||c;if(this.unhandledEncryptionError(p,c))return;this._bufferInitSegment(u,p.tracks,g,a),n.trigger(cr.FRAG_PARSING_INIT_SEGMENT,{frag:g,id:s,tracks:p.tracks})}if(h){var m=h.startPTS,y=h.endPTS,E=h.startDTS,_=h.endDTS;l&&(l.elementaryStreams[Hr]={startPTS:m,endPTS:y,startDTS:E,endDTS:_}),c.setElementaryStreamInfo(Hr,m,y,E,_),this.bufferFragmentData(h,c,l,a)}if(null!=v&&null!=(t=v.samples)&&t.length){var k=kr({id:s,frag:c,details:d},v);n.trigger(cr.FRAG_PARSING_METADATA,k)}if(f){var T=kr({id:s,frag:c,details:d},f);n.trigger(cr.FRAG_PARSING_USERDATA,T)}}else this.fragmentTracker.removeFragment(c)}else this.resetWhenMissingContext(a)}},{key:"_bufferInitSegment",value:function(e,t,s,n){if(this.state===Ms&&(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,t.audio)){var r=t.audio;r.id=mr;var a=e.audioCodec;this.log("Init audio buffer, container:".concat(r.container,", codecs[level/parsed]=[").concat(a,"/").concat(r.codec,"]")),a&&1===a.split(",").length&&(r.levelCodec=a),this.hls.trigger(cr.BUFFER_CODECS,t);var o=r.initSegment;if(null!=o&&o.byteLength){var c={type:"audio",frag:s,part:null,chunkMeta:n,parent:s.type,data:o};this.hls.trigger(cr.BUFFER_APPENDING,c)}this.tickImmediate()}}},{key:"loadFragment",value:function(e,t,s){var r,o=this.fragmentTracker.getState(e);if(this.switchingTrack||o===Ba||o===Va)if(Kr(e))if(null!=(r=t.details)&&r.live&&!this.initPTS[e.cc]){this.log("Waiting for video PTS in continuity counter ".concat(e.cc," of live stream before loading audio fragment ").concat(e.sn," of level ").concat(this.trackId)),this.state=Fs;var a=this.mainDetails;a&&a.fragmentStart!==t.details.fragmentStart&&ws(t.details,a)}else y(S(n.prototype),"loadFragment",this).call(this,e,t,s);else this._loadInitSegment(e,t);else this.clearTrackerIfNeeded(e)}},{key:"flushAudioIfNeeded",value:function(e){if(this.media&&this.bufferedTrack){var t=this.bufferedTrack;la({name:t.name,lang:t.lang,assocLang:t.assocLang,characteristics:t.characteristics,audioCodec:t.audioCodec,channels:t.channels},e,da)||(fa(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),y(S(n.prototype),"flushMainBuffer",this).call(this,0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}},{key:"completeAudioSwitch",value:function(e){var t=this.hls;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(cr.AUDIO_TRACK_SWITCHED,wr({},e))}}]),n}(js),kc=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this,r,e.logger)).hls=void 0,o.canLoad=!1,o.timer=-1,o.hls=e,o}return I(n,[{key:"destroy",value:function(){this.clearTimer(),this.hls=this.log=this.warn=null}},{key:"clearTimer",value:function(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)}},{key:"startLoad",value:function(){this.canLoad=!0,this.loadPlaylist()}},{key:"stopLoad",value:function(){this.canLoad=!1,this.clearTimer()}},{key:"switchParams",value:function(e,t,s){var n=null==t?void 0:t.renditionReports;if(n){for(var r=-1,a=0;a<n.length;a++){var o=n[a],c=void 0;try{c=new self.URL(o.URI,t.url).href}catch(f){this.warn("Could not construct new URL for Rendition Report: ".concat(f)),c=o.URI||""}if(c===e){r=a;break}c===e.substring(0,c.length)&&(r=a)}if(-1!==r){var l=n[r],d=parseInt(l["LAST-MSN"])||t.lastPartSn,h=parseInt(l["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){var u=Math.min(t.age-t.partTarget,t.targetduration);h>=0&&u>t.partTarget&&(h+=1)}var f=s&&ea(s);return new ta(d,h>=0?h:void 0,f)}}}},{key:"loadPlaylist",value:function(e){this.clearTimer()}},{key:"loadingPlaylist",value:function(e,t){this.clearTimer()}},{key:"shouldLoadPlaylist",value:function(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}},{key:"getUrlWithDirectives",value:function(e,t){if(t)try{return t.addDirectives(e)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: ".concat(e))}return e}},{key:"playlistLoaded",value:function(e,t,s){var n=t.details,r=t.stats,a=self.performance.now(),o=r.loading.first?Math.max(0,a-r.loading.first):0;n.advancedDateTime=Date.now()-o;var c=this.hls.config.timelineOffset;if(c!==n.appliedTimelineOffset){var u=Math.max(c||0,0);n.appliedTimelineOffset=u,n.fragments.forEach((function(e){e.setStart(e.playlistOffset+u)}))}if(n.live||null!=s&&s.live){var l="levelInfo"in t?t.levelInfo:t.track;if(n.reloaded(s),s&&n.fragments.length>0){cs(s,n,this);var d=n.playlistParsingError;if(d){this.warn(d);var h=this.hls;if(!h.config.ignorePlaylistParsingErrors){var f,b=t.networkDetails;return void h.trigger(cr.ERROR,{type:sr.NETWORK_ERROR,details:ur.LEVEL_PARSING_ERROR,fatal:!1,url:n.url,error:d,reason:d.message,level:t.level||void 0,parent:null==(f=n.fragments[0])?void 0:f.type,networkDetails:b,stats:r})}n.playlistParsingError=null}}-1===n.requestScheduled&&(n.requestScheduled=r.loading.start);var p,g,v,m=this.hls.mainForwardBufferInfo,y=m?m.end-m.len:0,E=fs(n,1e3*(n.edge-y));if(n.requestScheduled+E<a?n.requestScheduled=a:n.requestScheduled+=E,this.log("live playlist ".concat(e," ").concat(n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:n.updated?"UPDATED":"MISSED")),!this.canLoad||!n.live)return;if(n.canBlockReload&&n.endSN&&n.advanced){var _=this.hls.config.lowLatencyMode,k=n.lastPartSn,T=n.endSN,w=n.lastPartIndex,S=k===T;-1!==w?S?(g=T+1,v=_?0:w):(g=k,v=_?w+1:n.maxPartIndex):g=T+1;var A=n.age,I=A+n.ageHeader,R=Math.min(I-n.partTarget,1.5*n.targetduration);if(R>0){if(I>3*n.targetduration)this.log("Playlist last advanced ".concat(A.toFixed(2),"s ago. Omitting segment and part directives.")),g=void 0,v=void 0;else if(null!=s&&s.tuneInGoal&&I-n.partTarget>s.tuneInGoal)this.warn("CDN Tune-in goal increased from: ".concat(s.tuneInGoal," to: ").concat(R," with playlist age: ").concat(n.age)),R=0;else{var O=Math.floor(R/n.targetduration);if(g+=O,void 0!==v)v+=Math.round(R%n.targetduration/n.partTarget);this.log("CDN Tune-in age: ".concat(n.ageHeader,"s last advanced ").concat(A.toFixed(2),"s goal: ").concat(R," skip sn ").concat(O," to part ").concat(v))}n.tuneInGoal=R}if(p=this.getDeliveryDirectives(n,t.deliveryDirectives,g,v),_||!S)return n.requestScheduled=a,void this.loadingPlaylist(l,p)}else(n.canBlockReload||n.canSkipUntil)&&(p=this.getDeliveryDirectives(n,t.deliveryDirectives,g,v));p&&void 0!==g&&n.canBlockReload&&(n.requestScheduled=r.loading.first+Math.max(E-2*o,E/2)),this.scheduleLoading(l,p,n)}else this.clearTimer()}},{key:"scheduleLoading",value:function(e,t,s){var n=this,r=s||e.details;if(r){var o=self.performance.now(),a=r.requestScheduled;if(o>=a)this.loadingPlaylist(e,t);else{var c=a-o;this.log("reload live playlist ".concat(e.name||e.bitrate+"bps"," in ").concat(Math.round(c)," ms")),this.clearTimer(),this.timer=self.setTimeout((function(){return n.loadingPlaylist(e,t)}),c)}}else this.loadingPlaylist(e,t)}},{key:"getDeliveryDirectives",value:function(e,t,s,n){var r=ea(e);return null!=t&&t.skip&&e.deltaUpdateFailed&&(s=t.msn,n=t.part,r=Xi),new ta(s,n,r)}},{key:"checkRetry",value:function(e){var t=this,n=e.details,s=_a(e),r=e.errorAction,o=r||{},c=o.action,l=o.retryCount,a=void 0===l?0:l,d=o.retryConfig,h=!!r&&!!d&&(c===xa||!r.resolved&&c===La);if(h){var f;if(a>=d.maxNumRetry)return!1;if(s&&null!=(f=e.context)&&f.deliveryDirectives)this.warn("Retrying playlist loading ".concat(a+1,"/").concat(d.maxNumRetry,' after "').concat(n,'" without delivery-directives')),this.loadPlaylist();else{var u=Sa(d,a);this.clearTimer(),this.timer=self.setTimeout((function(){return t.loadPlaylist()}),u),this.warn("Retrying playlist loading ".concat(a+1,"/").concat(d.maxNumRetry,' after "').concat(n,'" in ').concat(u,"ms"))}e.levelRetry=!0,r.resolved=!0}return h}}]),n}(Sr);function Tc(i,e){if(i.length!==e.length)return!1;for(var t=0;t<i.length;t++)if(!wc(i[t].attrs,e[t].attrs))return!1;return!0}function wc(i,e,t){var s=i["STABLE-RENDITION-ID"];return s&&!t?s===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some((function(t){return i[t]!==e[t]}))}function Sc(i,e){return e.label.toLowerCase()===i.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(i.lang||"").toLowerCase())}var Ac=function(e){T(n,e);var t=P(n);function n(e){var r;return A(this,n),(r=t.call(this,e,"audio-track-controller")).tracks=[],r.groupIds=null,r.tracksInGroup=[],r.trackId=-1,r.currentTrack=null,r.selectDefaultTrack=!0,r.registerListeners(),r}return I(n,[{key:"registerListeners",value:function(){var e=this.hls;e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.on(cr.LEVEL_LOADING,this.onLevelLoading,this),e.on(cr.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(cr.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(cr.ERROR,this.onError,this)}},{key:"unregisterListeners",value:function(){var e=this.hls;e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.off(cr.LEVEL_LOADING,this.onLevelLoading,this),e.off(cr.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(cr.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(cr.ERROR,this.onError,this)}},{key:"destroy",value:function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,y(S(n.prototype),"destroy",this).call(this)}},{key:"onManifestLoading",value:function(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}},{key:"onManifestParsed",value:function(e,t){this.tracks=t.audioTracks||[]}},{key:"onAudioTrackLoaded",value:function(e,t){var s=t.id,n=t.groupId,r=t.details,a=this.tracksInGroup[s];if(a&&a.groupId===n){var o=a.details;a.details=t.details,this.log("Audio track ".concat(s,' "').concat(a.name,'" lang:').concat(a.lang," group:").concat(n," loaded [").concat(r.startSN,"-").concat(r.endSN,"]")),s===this.trackId&&this.playlistLoaded(s,t,o)}else this.warn("Audio track with id:".concat(s," and group:").concat(n," not found in active group ").concat(null==a?void 0:a.groupId))}},{key:"onLevelLoading",value:function(e,t){this.switchLevel(t.level)}},{key:"onLevelSwitching",value:function(e,t){this.switchLevel(t.level)}},{key:"switchLevel",value:function(e){var t=this.hls.levels[e];if(t){var s=t.audioGroups||null,n=this.groupIds,r=this.currentTrack;if(!s||(null==n?void 0:n.length)!==(null==s?void 0:s.length)||null!=s&&s.some((function(e){return-1===(null==n?void 0:n.indexOf(e))}))){this.groupIds=s,this.trackId=-1,this.currentTrack=null;var o=this.tracks.filter((function(e){return!s||-1!==s.indexOf(e.groupId)}));if(o.length)this.selectDefaultTrack&&!o.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),o.forEach((function(e,t){e.id=t}));else if(!r&&!this.tracksInGroup.length)return;this.tracksInGroup=o;var c=this.hls.config.audioPreference;if(!r&&c){var l=ca(c,o,da);if(l>-1)r=o[l];else{var d=ca(c,this.tracks);r=this.tracks[d]}}var h=this.findTrackId(r);-1===h&&r&&(h=this.findTrackId(null));var u={audioTracks:o};this.log("Updating audio tracks, ".concat(o.length," track(s) found in group(s): ").concat(null==s?void 0:s.join(","))),this.hls.trigger(cr.AUDIO_TRACKS_UPDATED,u);var f=this.trackId;if(-1!==h&&-1===f)this.setAudioTrack(h);else if(o.length&&-1===f){var a,v=new Error("No audio track selected for current audio group-ID(s): ".concat(null==(a=this.groupIds)?void 0:a.join(",")," track count: ").concat(o.length));this.warn(v.message),this.hls.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:v})}}}}},{key:"onError",value:function(e,t){t.fatal||!t.context||t.context.type===fr&&t.context.id===this.trackId&&(!this.groupIds||-1!==this.groupIds.indexOf(t.context.groupId))&&this.checkRetry(t)}},{key:"allAudioTracks",get:function(){return this.tracks}},{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}},{key:"setAudioOption",value:function(e){var t=this.hls;if(t.config.audioPreference=e,e){var s=this.allAudioTracks;if(this.selectDefaultTrack=!1,s.length){var n=this.currentTrack;if(n&&la(e,n,da))return n;var r=ca(e,this.tracksInGroup,da);if(r>-1){var a=this.tracksInGroup[r];return this.setAudioTrack(r),a}if(n){var o=t.loadLevel;-1===o&&(o=t.firstAutoLevel);var c=function(i,e,t,s,n){var r=e[s],o=e.reduce((function(e,t,n){var p=t.uri;return(e[p]||(e[p]=[])).push(n),e}),{})[r.uri];o.length>1&&(s=Math.max.apply(Math,o));var c=r.videoRange,l=r.frameRate,u=r.codecSet.substring(0,4),d=ha(e,s,(function(e){if(e.videoRange!==c||e.frameRate!==l||e.codecSet.substring(0,4)!==u)return!1;var r=e.audioGroups,o=t.filter((function(p){return!r||-1!==r.indexOf(p.groupId)}));return ca(i,o,n)>-1}));return d>-1?d:ha(e,s,(function(e){var r=e.audioGroups,o=t.filter((function(p){return!r||-1!==r.indexOf(p.groupId)}));return ca(i,o,n)>-1}))}(e,t.levels,s,o,da);if(-1===c)return null;t.nextLoadLevel=c}if(e.channels||e.audioCodec){var l=ca(e,s);if(l>-1)return s[l]}}}return null}},{key:"setAudioTrack",value:function(e){var t=this.tracksInGroup;if(e<0||e>=t.length)this.warn("Invalid audio track id: ".concat(e));else{this.selectDefaultTrack=!1;var s=this.currentTrack,n=t[e],r=n.details&&!n.details.live;if(!(e===this.trackId&&n===s&&r||(this.log("Switching to audio-track ".concat(e,' "').concat(n.name,'" lang:').concat(n.lang," group:").concat(n.groupId," channels:").concat(n.channels)),this.trackId=e,this.currentTrack=n,this.hls.trigger(cr.AUDIO_TRACK_SWITCHING,wr({},n)),r))){var a=this.switchParams(n.url,null==s?void 0:s.details,n.details);this.loadPlaylist(a)}}}},{key:"findTrackId",value:function(e){for(var t=this.tracksInGroup,s=0;s<t.length;s++){var n=t[s];if((!this.selectDefaultTrack||n.default)&&(!e||la(e,n,da)))return s}if(e){for(var r=e.name,o=e.lang,c=e.assocLang,a=e.characteristics,l=e.audioCodec,d=e.channels,h=0;h<t.length;h++){if(la({name:r,lang:o,assocLang:c,characteristics:a,audioCodec:l,channels:d},t[h],da))return h}for(var f=0;f<t.length;f++){var v=t[f];if(wc(e.attrs,v.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return f}for(var m=0;m<t.length;m++){var y=t[m];if(wc(e.attrs,y.attrs,["LANGUAGE"]))return m}}return-1}},{key:"loadPlaylist",value:function(e){y(S(n.prototype),"loadPlaylist",this).call(this);var t=this.currentTrack;this.shouldLoadPlaylist(t)&&fa(t.url,this.hls)&&this.scheduleLoading(t,e)}},{key:"loadingPlaylist",value:function(e,t){y(S(n.prototype),"loadingPlaylist",this).call(this,e,t);var s=e.id,r=e.groupId,o=this.getUrlWithDirectives(e.url,t),a=e.details,c=null==a?void 0:a.age;this.log("Loading audio-track ".concat(s,' "').concat(e.name,'" lang:').concat(e.lang," group:").concat(r).concat(void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:"").concat(c&&a.live?" age "+c.toFixed(1)+(a.type&&" "+a.type||""):""," ").concat(o)),this.hls.trigger(cr.AUDIO_TRACK_LOADING,{url:o,id:s,groupId:r,deliveryDirectives:t||null,track:e})}}]),n}(kc),Ic=function(){function e(t){A(this,e),this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=t}return I(e,[{key:"destroy",value:function(){this.tracks=this.queues=null}},{key:"append",value:function(e,t,s){if(null!==this.queues&&null!==this.tracks){var n=this.queues[t];n.push(e),1===n.length&&!s&&this.executeNext(t)}}},{key:"appendBlocker",value:function(e){var t=this;return new Promise((function(n){var s={label:"async-blocker",execute:n,onStart:function(){},onComplete:function(){},onError:function(){}};t.append(s,e)}))}},{key:"prependBlocker",value:function(e){var t=this;return new Promise((function(n){if(t.queues){var s={label:"async-blocker-prepend",execute:n,onStart:function(){},onComplete:function(){},onError:function(){}};t.queues[e].unshift(s)}}))}},{key:"removeBlockers",value:function(){null!==this.queues&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach((function(e){var t,s=null==(t=e[0])?void 0:t.label;("async-blocker"===s||"async-blocker-prepend"===s)&&(e[0].execute(),e.splice(0,1))}))}},{key:"unblockAudio",value:function(e){null!==this.queues&&this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}},{key:"executeNext",value:function(e){if(null!==this.queues&&null!==this.tracks){var t=this.queues[e];if(t.length){var n=t[0];try{n.execute()}catch(t){var s;if(n.onError(t),null===this.queues||null===this.tracks)return;var a=null==(s=this.tracks[e])?void 0:s.buffer;null!=a&&a.updating||this.shiftAndExecuteNext(e)}}}}},{key:"shiftAndExecuteNext",value:function(e){null!==this.queues&&(this.queues[e].shift(),this.executeNext(e))}},{key:"current",value:function(e){var t;return(null==(t=this.queues)?void 0:t[e][0])||null}},{key:"toString",value:function(){var e=this.queues,t=this.tracks;return null===e||null===t?"<destroyed>":"\n".concat(this.list("video"),"\n").concat(this.list("audio"),"\n").concat(this.list("audiovideo"),"}")}},{key:"list",value:function(e){var t,s;return null!=(t=this.queues)&&t[e]||null!=(s=this.tracks)&&s[e]?"".concat(e,": (").concat(this.listSbInfo(e),") ").concat(this.listOps(e)):""}},{key:"listSbInfo",value:function(e){var t,s=null==(t=this.tracks)?void 0:t[e],n=null==s?void 0:s.buffer;return n?"SourceBuffer".concat(n.updating?" updating":"").concat(s.ended?" ended":"").concat(s.ending?" ending":""):"none"}},{key:"listOps",value:function(e){var t;return(null==(t=this.queues)?void 0:t[e].map((function(s){return s.label})).join(", "))||""}}]),e}(),Rc=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,Oc="HlsJsTrackRemovedError",Lc=function(e){T(n,e);var t=P(n);function n(e){var r;return A(this,n),(r=t.call(this,e)).name=Oc,r}return I(n)}(E(Error)),Dc=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this,"buffer-controller",e.logger)).hls=void 0,o.fragmentTracker=void 0,o.details=null,o._objectUrl=null,o.operationQueue=null,o.bufferCodecEventsTotal=0,o.media=null,o.mediaSource=null,o.lastMpegAudioChunk=null,o.blockedAudioAppend=null,o.lastVideoAppendEnd=0,o.appendSource=void 0,o.transferData=void 0,o.overrides=void 0,o.appendErrors={audio:0,video:0,audiovideo:0},o.tracks={},o.sourceBuffers=[[null,null],[null,null]],o._onEndStreaming=function(s){var e;o.hls&&"open"===(null==(e=o.mediaSource)?void 0:e.readyState)&&o.hls.pauseBuffering()},o._onStartStreaming=function(s){o.hls&&o.hls.resumeBuffering()},o._onMediaSourceOpen=function(s){var e=_(o),t=e.media,n=e.mediaSource;s&&o.log("Media source opened"),t&&n&&(n.removeEventListener("sourceopen",o._onMediaSourceOpen),t.removeEventListener("emptied",o._onMediaEmptied),o.updateDuration(),o.hls.trigger(cr.MEDIA_ATTACHED,{media:t,mediaSource:n}),null!==o.mediaSource&&o.checkPendingTracks())},o._onMediaSourceClose=function(){o.log("Media source closed")},o._onMediaSourceEnded=function(){o.log("Media source ended")},o._onMediaEmptied=function(){var e=_(o),s=e.mediaSrc,t=e._objectUrl;s!==t&&o.error("Media element src was set while attaching MediaSource (".concat(t," > ").concat(s,")"))},o.hls=e,o.fragmentTracker=r,o.appendSource=function(i){return"undefined"!=typeof self&&i===self.ManagedMediaSource}(Cr(e.config.preferManagedMediaSource)),o.initTracks(),o.registerListeners(),o}return I(n,[{key:"hasSourceTypes",value:function(){return Object.keys(this.tracks).length>0}},{key:"destroy",value:function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}},{key:"registerListeners",value:function(){var e=this.hls;e.on(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.on(cr.BUFFER_RESET,this.onBufferReset,this),e.on(cr.BUFFER_APPENDING,this.onBufferAppending,this),e.on(cr.BUFFER_CODECS,this.onBufferCodecs,this),e.on(cr.BUFFER_EOS,this.onBufferEos,this),e.on(cr.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(cr.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(cr.FRAG_PARSED,this.onFragParsed,this),e.on(cr.FRAG_CHANGED,this.onFragChanged,this),e.on(cr.ERROR,this.onError,this)}},{key:"unregisterListeners",value:function(){var e=this.hls;e.off(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.off(cr.BUFFER_RESET,this.onBufferReset,this),e.off(cr.BUFFER_APPENDING,this.onBufferAppending,this),e.off(cr.BUFFER_CODECS,this.onBufferCodecs,this),e.off(cr.BUFFER_EOS,this.onBufferEos,this),e.off(cr.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(cr.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(cr.FRAG_PARSED,this.onFragParsed,this),e.off(cr.FRAG_CHANGED,this.onFragChanged,this),e.off(cr.ERROR,this.onError,this)}},{key:"transferMedia",value:function(){var e=this,t=this.media,n=this.mediaSource;if(!t)return null;var s={};if(this.operationQueue){var r=this.isUpdating();r||this.operationQueue.removeBlockers();var a=this.isQueued();(r||a)&&this.warn("Transfering MediaSource with".concat(a?" operations in queue":"").concat(r?" updating SourceBuffer(s)":""," ").concat(this.operationQueue)),this.operationQueue.destroy()}var o=this.transferData;return!this.sourceBufferCount&&o&&o.mediaSource===n?kr(s,o.tracks):this.sourceBuffers.forEach((function(t){var a=m(t,1)[0];a&&(s[a]=kr({},e.tracks[a]),e.removeBuffer(a)),t[0]=t[1]=null})),{media:t,mediaSource:n,tracks:s}}},{key:"initTracks",value:function(){this.sourceBuffers=[[null,null],[null,null]],this.tracks={},this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}},{key:"onManifestLoading",value:function(){this.bufferCodecEventsTotal=0,this.details=null}},{key:"onManifestParsed",value:function(e,t){var s,n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsTotal=n,this.log("".concat(n," bufferCodec event(s) expected.")),null!=(s=this.transferData)&&s.mediaSource&&this.sourceBufferCount&&n&&this.bufferCreated()}},{key:"onMediaAttaching",value:function(e,t){var s=this.media=t.media;this.transferData=this.overrides=void 0;var n=Cr(this.appendSource);if(n){var r=!!t.mediaSource;(r||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);var a=this.mediaSource=t.mediaSource||new n;if(this.assignMediaSource(a),r)this._objectUrl=s.src,this.attachTransferred();else{var o=this._objectUrl=self.URL.createObjectURL(a);if(this.appendSource)try{s.removeAttribute("src");var c=self.ManagedMediaSource;s.disableRemotePlayback=s.disableRemotePlayback||c&&a instanceof c,xc(s),function(i,e){var t=self.document.createElement("source");t.type="video/mp4",t.src=e,i.appendChild(t)}(s,o),s.load()}catch(e){s.src=o}else s.src=o}s.addEventListener("emptied",this._onMediaEmptied)}}},{key:"assignMediaSource",value:function(e){var t,s;this.log("".concat((null==(t=this.transferData)?void 0:t.mediaSource)===e?"transferred":"created"," media source: ").concat(null==(s=e.constructor)?void 0:s.name)),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}},{key:"attachTransferred",value:function(){var e=this,t=this.media,n=this.transferData;if(n&&t){var s=this.tracks,r=n.tracks,o=r?Object.keys(r):null,a=o?o.length:0,c=function(){Promise.resolve().then((function(){e.media&&e.mediaSourceOpenOrEnded&&e._onMediaSourceOpen()}))};if(r&&o&&a){if(!this.tracksReady)return this.hls.config.startFragPrefetch=!0,void this.log("attachTransferred: waiting for SourceBuffer track info");if(this.log("attachTransferred: (bufferCodecEventsTotal ".concat(this.bufferCodecEventsTotal,")\nrequired tracks: ").concat(aa(s,(function(e,t){return"initSegment"===e?void 0:t})),";\ntransfer tracks: ").concat(aa(r,(function(e,t){return"initSegment"===e?void 0:t})),"}
2")),!Mr(r,s)){n.mediaSource=null,n.tracks=void 0;var l=t.currentTime,d=this.details,u=Math.max(l,(null==d?void 0:d.fragments[0].start)||0);return u-l>1?void this.log("attachTransferred: waiting for playback to reach new tracks start time ".concat(l," -> ").concat(u)):(this.warn('attachTransferred: resetting MediaSource for incompatible tracks ("'.concat(Object.keys(r),'"->"').concat(Object.keys(s),'") start time: ').concat(u," currentTime: ").concat(l)),this.onMediaDetaching(cr.MEDIA_DETACHING,{}),this.onMediaAttaching(cr.MEDIA_ATTACHING,n),void(t.currentTime=u))}this.transferData=void 0,o.forEach((function(t){var n=t,u=r[n];if(u){var o=u.buffer;if(o){var c=e.fragmentTracker,l=u.id;if(c.hasFragments(l)||c.hasParts(l)){var g=uo.getBuffered(o);c.detectEvictedFragments(n,g,l,null,!0)}var d=Cc(n),p=[n,o];e.sourceBuffers[d]=p,o.updating&&e.operationQueue&&e.operationQueue.prependBlocker(n),e.trackSourceBuffer(n,u)}}})),c(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),c()}}},{key:"mediaSourceOpenOrEnded",get:function(){var e,t=null==(e=this.mediaSource)?void 0:e.readyState;return"open"===t||"ended"===t}},{key:"onMediaDetaching",value:function(e,t){var n=this,s=!!t.transferMedia;this.transferData=this.overrides=void 0;var r=this.media,o=this.mediaSource,a=this._objectUrl;if(o){if(this.log("media source ".concat(s?"transferring":"detaching")),s)this.sourceBuffers.forEach((function(e){var t=m(e,1)[0];t&&n.removeBuffer(t)})),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){var c="open"===o.readyState;try{for(var l=o.sourceBuffers,d=l.length;d--;)c&&l[d].abort(),o.removeSourceBuffer(l[d]);c&&o.endOfStream()}catch(l){this.warn("onMediaDetaching: ".concat(l.message," while calling endOfStream"))}}this.sourceBufferCount&&this.onBufferReset()}o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(o.removeEventListener("startstreaming",this._onStartStreaming),o.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),s||(a&&self.URL.revokeObjectURL(a),this.mediaSrc===a?(r.removeAttribute("src"),this.appendSource&&xc(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(cr.MEDIA_DETACHED,t)}},{key:"onBufferReset",value:function(){var e=this;this.sourceBuffers.forEach((function(t){var n=m(t,1)[0];n&&e.resetBuffer(n)})),this.initTracks()}},{key:"resetBuffer",value:function(e){var t,s=null==(t=this.tracks[e])?void 0:t.buffer;if(this.removeBuffer(e),s)try{var n;null!=(n=this.mediaSource)&&n.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(s)}catch(t){this.warn("onBufferReset ".concat(e),t)}delete this.tracks[e]}},{key:"removeBuffer",value:function(e){this.removeBufferListeners(e),this.sourceBuffers[Cc(e)]=[null,null];var t=this.tracks[e];t&&(t.buffer=void 0)}},{key:"resetQueue",value:function(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Ic(this.tracks)}},{key:"onBufferCodecs",value:function(e,t){var s,n=this,r=this.tracks,o=Object.keys(t);this.log('BUFFER_CODECS: "'.concat(o,'" (current SB count ').concat(this.sourceBufferCount,")"));var a="audiovideo"in t&&(r.audio||r.video)||r.audiovideo&&("audio"in t||"video"in t),c=!a&&this.sourceBufferCount&&this.media&&o.some((function(e){return!r[e]}));a||c?this.warn('Unsupported transition between "'.concat(Object.keys(r),'" and "').concat(o,'" SourceBuffers')):(o.forEach((function(e){var o,u,c=t[e],l=c.id,d=c.codec,h=c.levelCodec,p=c.container,g=c.metadata,f=c.supplemental,v=r[e],m=null==(o=n.transferData)||null==(o=o.tracks)?void 0:o[e],b=null!=m&&m.buffer?m:v,y=(null==b?void 0:b.pendingCodec)||(null==b?void 0:b.codec),E=null==b?void 0:b.levelCodec;v||(v=r[e]={buffer:void 0,listeners:[],codec:d,supplemental:f,container:p,levelCodec:h,metadata:g,id:l});var _=Pi(y,E),k=null==_?void 0:_.replace(Rc,"$1"),T=Pi(d,h),w=null==(u=T)?void 0:u.replace(Rc,"$1");T&&_&&k!==w&&("audio"===e.slice(0,5)&&(T=Mi(T,n.appendSource)),n.log("switching codec ".concat(y," to ").concat(T)),T!==(v.pendingCodec||v.codec)&&(v.pendingCodec=T),v.container=p,n.appendChangeType(e,p,T))})),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!t.video&&"main"===(null==(s=t.audio)?void 0:s.id)&&(this.log("Main audio-only"),this.bufferCodecEventsTotal=1),this.mediaSourceOpenOrEnded&&this.checkPendingTracks()))}},{key:"sourceBufferTracks",get:function(){var e=this;return Object.keys(this.tracks).reduce((function(t,n){var s=e.tracks[n];return t[n]={id:s.id,container:s.container,codec:s.codec,levelCodec:s.levelCodec},t}),{})}},{key:"appendChangeType",value:function(e,t,s){var n=this,r="".concat(t,";codecs=").concat(s),o={label:"change-type=".concat(r),execute:function(){var a=n.tracks[e];if(a){var o=a.buffer;null!=o&&o.changeType&&(n.log("changing ".concat(e," sourceBuffer type to ").concat(r)),o.changeType(r),a.codec=s,a.container=t)}n.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(a){n.warn("Failed to change ".concat(e," SourceBuffer type"),a)}};this.append(o,e,this.isPending(this.tracks[e]))}},{key:"blockAudio",value:function(e){var t,n=this,s=e.start,r=s+.05*e.duration;if(!0!==(null==(t=this.fragmentTracker.getAppendedFrag(s,vr))?void 0:t.gap)){var a={label:"block-audio",execute:function(){var e,t=n.tracks.video;(n.lastVideoAppendEnd>r||null!=t&&t.buffer&&uo.isBuffered(t.buffer,r)||!0===(null==(e=n.fragmentTracker.getAppendedFrag(r,vr))?void 0:e.gap))&&(n.blockedAudioAppend=null,n.shiftAndExecuteNext("audio"))},onStart:function(){},onComplete:function(){},onError:function(e){n.warn("Error executing block-audio operation",e)}};this.blockedAudioAppend={op:a,frag:e},this.append(a,"audio",!0)}}},{key:"unblockAudio",value:function(){var e=this.blockedAudioAppend,t=this.operationQueue;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}},{key:"onBufferAppending",value:function(e,t){var n=this,s=this.tracks,r=t.data,o=t.type,a=t.parent,c=t.frag,l=t.part,d=t.chunkMeta,u=t.offset,h=d.buffering[o],f=c.sn,v=c.cc,y=self.performance.now();h.start=y;var p=c.stats.buffering,g=l?l.stats.buffering:null;0===p.start&&(p.start=y),g&&0===g.start&&(g.start=y);var E=s.audio,_=!1;
vendor: 19,318 bytes, line 2
2"audio"===o&&"audio/mpeg"===(null==E?void 0:E.container)&&(_=!this.lastMpegAudioChunk||1===d.id||this.lastMpegAudioChunk.sn!==d.sn,this.lastMpegAudioChunk=d);var k=s.video,b=null==k?void 0:k.buffer;if(b&&"initSegment"!==f){var T=l||c,w=this.blockedAudioAppend;if("audio"!==o||"main"===a||this.blockedAudioAppend||k.ending||k.ended){if("video"===o){var S=T.end;if(w){var A=w.frag.start;(S>A||S<this.lastVideoAppendEnd||uo.isBuffered(b,A))&&this.unblockAudio()}this.lastVideoAppendEnd=S}}else{var I=T.start+.05*T.duration,R=b.buffered,O=this.currentOp("video");R.length||O?!O&&!uo.isBuffered(b,I)&&this.lastVideoAppendEnd<I&&this.blockAudio(T):this.blockAudio(T)}}var L=(l||c).start,D={label:"append-".concat(o),execute:function(){var e;h.executeStart=self.performance.now();var t=null==(e=n.tracks[o])?void 0:e.buffer;t&&(_?n.updateTimestampOffset(t,L,.1,o,f,v):void 0!==u&&ir(u)&&n.updateTimestampOffset(t,u,1e-6,o,f,v)),n.appendExecutor(r,o)},onStart:function(){},onComplete:function(){var e=self.performance.now();h.executeEnd=h.end=e,0===p.first&&(p.first=e),g&&0===g.first&&(g.first=e);var t={};n.sourceBuffers.forEach((function(e){var n=m(e,2),r=n[0],o=n[1];r&&(t[r]=uo.getBuffered(o))})),n.appendErrors[o]=0,"audio"===o||"video"===o?n.appendErrors.audiovideo=0:(n.appendErrors.audio=0,n.appendErrors.video=0),n.hls.trigger(cr.BUFFER_APPENDED,{type:o,frag:c,part:l,chunkMeta:d,parent:c.type,timeRanges:t})},onError:function(e){var t,r={type:sr.MEDIA_ERROR,parent:c.type,details:ur.BUFFER_APPEND_ERROR,sourceBufferName:o,frag:c,part:l,chunkMeta:d,error:e,err:e,fatal:!1},h=null==(t=n.media)?void 0:t.error;if(e.code===DOMException.QUOTA_EXCEEDED_ERR||"QuotaExceededError"==e.name||"quota"in e)r.details=ur.BUFFER_FULL_ERROR;else if(e.code===DOMException.INVALID_STATE_ERR&&n.mediaSourceOpenOrEnded&&!h)r.errorAction=Fa(!0);else if(e.name===Oc&&0===n.sourceBufferCount)r.errorAction=Fa(!0);else{var f=++n.appendErrors[o];n.warn("Failed ".concat(f,"/").concat(n.hls.config.appendErrorMaxRetry,' times to append segment in "').concat(o,'" sourceBuffer (').concat(h||"no media error",")")),(f>=n.hls.config.appendErrorMaxRetry||h)&&(r.fatal=!0)}n.hls.trigger(cr.ERROR,r)}};this.log('queuing "'.concat(o,'" append sn: ').concat(f).concat(l?" p: "+l.index:""," of ").concat(c.type===vr?"level":"track"," ").concat(c.level," cc: ").concat(v)),this.append(D,o,this.isPending(this.tracks[o]))}},{key:"getFlushOp",value:function(e,t,s){var n=this;return this.log('queuing "'.concat(e,'" remove ').concat(t,"-").concat(s)),{label:"remove",execute:function(){n.removeExecutor(e,t,s)},onStart:function(){},onComplete:function(){n.hls.trigger(cr.BUFFER_FLUSHED,{type:e})},onError:function(r){n.warn("Failed to remove ".concat(t,"-").concat(s,' from "').concat(e,'" SourceBuffer'),r)}}}},{key:"onBufferFlushing",value:function(e,t){var n=this,s=t.type,r=t.startOffset,o=t.endOffset;s?this.append(this.getFlushOp(s,r,o),s):this.sourceBuffers.forEach((function(e){var a=m(e,1)[0];a&&n.append(n.getFlushOp(a,r,o),a)}))}},{key:"onFragParsed",value:function(e,t){var n=this,s=t.frag,r=t.part,o=[],a=r?r.elementaryStreams:s.elementaryStreams;a[qr]?o.push("audiovideo"):(a[Hr]&&o.push("audio"),a[Wr]&&o.push("video"));0===o.length&&this.warn("Fragments must have at least one ElementaryStreamType set. type: ".concat(s.type," level: ").concat(s.level," sn: ").concat(s.sn)),this.blockBuffers((function(){var e=self.performance.now();s.stats.buffering.end=e,r&&(r.stats.buffering.end=e);var t=r?r.stats:s.stats;n.hls.trigger(cr.FRAG_BUFFERED,{frag:s,part:r,stats:t,id:s.type})}),o).catch((function(e){n.warn("Fragment buffered callback ".concat(e)),n.stepOperationQueue(n.sourceBufferTypes)}))}},{key:"onFragChanged",value:function(e,t){this.trimBuffers()}},{key:"bufferedToEnd",get:function(){var e=this;return this.sourceBufferCount>0&&!this.sourceBuffers.some((function(t){var n=m(t,1)[0];if(n){var r=e.tracks[n];if(r)return!r.ended||r.ending}return!1}))}},{key:"onBufferEos",value:function(e,t){var s,n=this;this.sourceBuffers.forEach((function(e){var a=m(e,1)[0];if(a){var r=n.tracks[a];(!t.type||t.type===a)&&(r.ending=!0,r.ended||(r.ended=!0,n.log("".concat(a," buffer reached EOS"))))}}));var r=!1!==(null==(s=this.overrides)?void 0:s.endOfStream);this.sourceBufferCount>0&&!this.sourceBuffers.some((function(e){var t,a=m(e,1)[0];return a&&!(null!=(t=n.tracks[a])&&t.ended)}))?r?(this.log("Queueing EOS"),this.blockUntilOpen((function(){n.tracksEnded();var a=n.mediaSource;a&&"open"===a.readyState?(n.log("Calling mediaSource.endOfStream()"),a.endOfStream(),n.hls.trigger(cr.BUFFERED_TO_END,void 0)):a&&n.log("Could not call mediaSource.endOfStream(). mediaSource.readyState: ".concat(a.readyState))}))):(this.tracksEnded(),this.hls.trigger(cr.BUFFERED_TO_END,void 0)):"video"===t.type&&this.unblockAudio()}},{key:"tracksEnded",value:function(){var e=this;this.sourceBuffers.forEach((function(t){var n=m(t,1)[0];if(null!==n){var r=e.tracks[n];r&&(r.ending=!1)}}))}},{key:"onLevelUpdated",value:function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.updateDuration())}},{key:"updateDuration",value:function(){var e=this;this.blockUntilOpen((function(){var t=e.getDurationAndRange();t&&e.updateMediaSource(t)}))}},{key:"onError",value:function(e,t){if(t.details===ur.BUFFER_APPEND_ERROR&&t.frag){var s,n=null==(s=t.errorAction)?void 0:s.nextAutoLevel;ir(n)&&n!==t.frag.level&&this.resetAppendErrors()}}},{key:"resetAppendErrors",value:function(){this.appendErrors={audio:0,video:0,audiovideo:0}}},{key:"trimBuffers",value:function(){var e=this.hls,t=this.details,s=this.media;if(s&&null!==t&&this.sourceBufferCount){var n=e.config,r=s.currentTime,a=t.levelTargetDuration,o=t.live&&null!==n.liveBackBufferLength?n.liveBackBufferLength:n.backBufferLength;if(ir(o)&&o>=0){var c=Math.max(o,a),u=Math.floor(r/a)*a-c;this.flushBackBuffer(r,a,u)}var l=n.frontBufferFlushThreshold;if(ir(l)&&l>0){var d=Math.max(n.maxBufferLength,l),h=Math.max(d,a),f=Math.floor(r/a)*a+h;this.flushFrontBuffer(r,a,f)}}}},{key:"flushBackBuffer",value:function(e,t,s){var n=this;this.sourceBuffers.forEach((function(e){var t=m(e,2),r=t[0],o=t[1];if(o){var c=uo.getBuffered(o);if(c.length>0&&s>c.start(0)){var a;n.hls.trigger(cr.BACK_BUFFER_REACHED,{bufferEnd:s});var l=n.tracks[r];if(null!=(a=n.details)&&a.live)n.hls.trigger(cr.LIVE_BACK_BUFFER_REACHED,{bufferEnd:s});else if(null!=l&&l.ended)return void n.log("Cannot flush ".concat(r," back buffer while SourceBuffer is in ended state"));n.hls.trigger(cr.BUFFER_FLUSHING,{startOffset:0,endOffset:s,type:r})}}}))}},{key:"flushFrontBuffer",value:function(e,t,s){var n=this;this.sourceBuffers.forEach((function(t){var r=m(t,2),o=r[0],c=r[1];if(c){var a=uo.getBuffered(c),l=a.length;if(l<2)return;var d=a.start(l-1),h=a.end(l-1);if(s>d||e>=d&&e<=h)return;n.hls.trigger(cr.BUFFER_FLUSHING,{startOffset:d,endOffset:1/0,type:o})}}))}},{key:"getDurationAndRange",value:function(){var e,t=this.details,s=this.mediaSource;if(!t||!this.media||"open"!==(null==s?void 0:s.readyState))return null;var n=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&s.setLiveSeekableRange){var r=Math.max(0,t.fragmentStart);return{duration:1/0,start:r,end:Math.max(r,n)}}return{duration:1/0}}var o=null==(e=this.overrides)?void 0:e.duration;if(o)return ir(o)?{duration:o}:null;var a=this.media.duration;return n>(ir(s.duration)?s.duration:0)&&n>a||!ir(a)?{duration:n}:null}},{key:"updateMediaSource",value:function(e){var t=e.duration,n=e.start,s=e.end,r=this.mediaSource;!this.media||!r||"open"!==r.readyState||(r.duration!==t&&(ir(t)&&this.log("Updating MediaSource duration to ".concat(t.toFixed(3))),r.duration=t),void 0!==n&&void 0!==s&&(this.log("MediaSource duration is set to ".concat(r.duration,". Setting seekable range to ").concat(n,"-").concat(s,".")),r.setLiveSeekableRange(n,s)))}},{key:"tracksReady",get:function(){var e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}},{key:"checkPendingTracks",value:function(){var e=this.bufferCodecEventsTotal,t=this.pendingTrackCount,s=this.tracks;if(this.log("checkPendingTracks (pending: ".concat(t," codec events expected: ").concat(e,") ").concat(aa(s))),this.tracksReady){var n,r=null==(n=this.transferData)?void 0:n.tracks;r&&Object.keys(r).length?this.attachTransferred():this.createSourceBuffers()}}},{key:"bufferCreated",value:function(){var e=this;if(this.sourceBufferCount){var t={};this.sourceBuffers.forEach((function(n){var r=m(n,2),o=r[0],s=r[1];if(o){var c=e.tracks[o];t[o]={buffer:s,container:c.container,codec:c.codec,supplemental:c.supplemental,levelCodec:c.levelCodec,id:c.id,metadata:c.metadata}}})),this.hls.trigger(cr.BUFFER_CREATED,{tracks:t}),this.log("SourceBuffers created. Running queue: ".concat(this.operationQueue)),this.sourceBuffers.forEach((function(t){var n=m(t,1)[0];e.executeNext(n)}))}else{var n=new Error("could not create source buffer for media codec(s)");this.hls.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:n,reason:n.message})}}},{key:"createSourceBuffers",value:function(){var e=this.tracks,t=this.sourceBuffers,s=this.mediaSource;if(!s)throw new Error("createSourceBuffers called when mediaSource was null");for(var n in e){var a=n,r=e[a];if(this.isPending(r)){var o=this.getTrackCodec(r,a),c="".concat(r.container,";codecs=").concat(o);r.codec=o,this.log("creating sourceBuffer(".concat(c,")").concat(this.currentOp(a)?" Queued":""," ").concat(aa(r)));try{var u=s.addSourceBuffer(c),l=Cc(a),d=[a,u];t[l]=d,r.buffer=u}catch(u){var h;return this.error("error while trying to add sourceBuffer: ".concat(u.message)),this.shiftAndExecuteNext(a),null==(h=this.operationQueue)||h.removeBlockers(),delete this.tracks[a],void this.hls.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:u,sourceBufferName:a,mimeType:c,parent:r.id})}this.trackSourceBuffer(a,r)}}this.bufferCreated()}},{key:"getTrackCodec",value:function(e,t){var s=e.supplemental,n=e.codec;s&&("video"===t||"audiovideo"===t)&&Ai(s,"video")&&(n=function(i,e){var t=[];if(i)for(var s=i.split(","),n=0;n<s.length;n++)Si(s[n],"video")||t.push(s[n]);return e&&t.push(e),t.join(",")}(n,s));var r=Pi(n,e.levelCodec);return r?"audio"===t.slice(0,5)?Mi(r,this.appendSource):r:""}},{key:"trackSourceBuffer",value:function(e,t){var n=this,s=t.buffer;if(s){var r=this.getTrackCodec(t,e);this.tracks[e]={buffer:s,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(function(e,a){var t=a.removedRanges;null!=t&&t.length&&n.hls.trigger(cr.BUFFER_FLUSHED,{type:e})}))}}},{key:"mediaSrc",get:function(){var e,t,s=(null==(e=this.media)||null==(t=e.querySelector)?void 0:t.call(e,"source"))||this.media;return null==s?void 0:s.src}},{key:"onSBUpdateStart",value:function(e){var t=this.currentOp(e);t&&t.onStart()}},{key:"onSBUpdateEnd",value:function(e){var t;if("closed"!==(null==(t=this.mediaSource)?void 0:t.readyState)){var s=this.currentOp(e);s&&(s.onComplete(),this.shiftAndExecuteNext(e))}else this.resetBuffer(e)}},{key:"onSBUpdateError",value:function(e,t){var s,n=new Error("".concat(e," SourceBuffer error. MediaSource readyState: ").concat(null==(s=this.mediaSource)?void 0:s.readyState));this.error("".concat(n),t),this.hls.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:n,fatal:!1});var r=this.currentOp(e);r&&r.onError(n)}},{key:"updateTimestampOffset",value:function(e,t,s,n,r,a){var o=t-e.timestampOffset;Math.abs(o)>=s&&(this.log("Updating ".concat(n," SourceBuffer timestampOffset to ").concat(t," (sn: ").concat(r," cc: ").concat(a,")")),e.timestampOffset=t)}},{key:"removeExecutor",value:function(e,t,s){var n=this.media,r=this.mediaSource,a=this.tracks[e],o=null==a?void 0:a.buffer;if(!n||!r||!o)return this.warn("Attempting to remove from the ".concat(e," SourceBuffer, but it does not exist")),void this.shiftAndExecuteNext(e);var c=ir(n.duration)?n.duration:1/0,l=ir(r.duration)?r.duration:1/0,u=Math.max(0,t),d=Math.min(s,c,l);d>u&&(!a.ending||a.ended)?(a.ended=!1,this.log("Removing [".concat(u,",").concat(d,"] from the ").concat(e," SourceBuffer")),o.remove(u,d)):this.shiftAndExecuteNext(e)}},{key:"appendExecutor",value:function(e,t){var s=this.tracks[t],n=null==s?void 0:s.buffer;if(!n)throw new Lc("Attempting to append to the ".concat(t," SourceBuffer, but it does not exist"));s.ending=!1,s.ended=!1,n.appendBuffer(e)}},{key:"blockUntilOpen",value:function(e){var t=this;if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch((function(e){t.warn("SourceBuffer blocked callback ".concat(e)),t.stepOperationQueue(t.sourceBufferTypes)}));else try{e()}catch(e){this.warn("Callback run without blocking ".concat(this.operationQueue," ").concat(e))}}},{key:"isUpdating",value:function(){return this.sourceBuffers.some((function(e){var t=m(e,2),n=t[0],r=t[1];return n&&r.updating}))}},{key:"isQueued",value:function(){var e=this;return this.sourceBuffers.some((function(t){var n=m(t,1)[0];return n&&!!e.currentOp(n)}))}},{key:"isPending",value:function(e){return!!e&&!e.buffer}},{key:"blockBuffers",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.sourceBufferTypes;if(!n.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);var s=this.operationQueue,r=n.map((function(a){return t.appendBlocker(a)}));return n.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then((function(a){s===t.operationQueue&&(e(),t.stepOperationQueue(t.sourceBufferTypes))}))}},{key:"stepOperationQueue",value:function(e){var t=this;e.forEach((function(e){var s,n=null==(s=t.tracks[e])?void 0:s.buffer;!n||n.updating||t.shiftAndExecuteNext(e)}))}},{key:"append",value:function(e,t,s){this.operationQueue&&this.operationQueue.append(e,t,s)}},{key:"appendBlocker",value:function(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}},{key:"currentOp",value:function(e){return this.operationQueue?this.operationQueue.current(e):null}},{key:"executeNext",value:function(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}},{key:"shiftAndExecuteNext",value:function(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}},{key:"pendingTrackCount",get:function(){var e=this;return Object.keys(this.tracks).reduce((function(t,n){return t+(e.isPending(e.tracks[n])?1:0)}),0)}},{key:"sourceBufferCount",get:function(){return this.sourceBuffers.reduce((function(e,t){return e+(m(t,1)[0]?1:0)}),0)}},{key:"sourceBufferTypes",get:function(){return this.sourceBuffers.map((function(e){return m(e,1)[0]})).filter((function(e){return!!e}))}},{key:"addBufferListener",value:function(e,t,s){var n=this.tracks[e];if(n){var r=n.buffer;if(r){var a=s.bind(this,e);n.listeners.push({event:t,listener:a}),r.addEventListener(t,a)}}}},{key:"removeBufferListeners",value:function(e){var t=this.tracks[e];if(t){var s=t.buffer;s&&(t.listeners.forEach((function(e){s.removeEventListener(e.event,e.listener)})),t.listeners.length=0)}}}]),n}(Sr);function xc(i){var e=i.querySelectorAll("source");[].slice.call(e).forEach((function(e){i.removeChild(e)}))}function Cc(i){return"audio"===i?1:0}var Mc=function(){function i(e){A(this,i),this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}return I(i,[{key:"setStreamController",value:function(e){this.streamController=e}},{key:"destroy",value:function(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}},{key:"registerListeners",value:function(){var e=this.hls;e.on(cr.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.on(cr.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(cr.BUFFER_CODECS,this.onBufferCodecs,this),e.on(cr.MEDIA_DETACHING,this.onMediaDetaching,this)}},{key:"unregisterListener",value:function(){var e=this.hls;e.off(cr.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.off(cr.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(cr.BUFFER_CODECS,this.onBufferCodecs,this),e.off(cr.MEDIA_DETACHING,this.onMediaDetaching,this)}},{key:"onFpsDropLevelCapping",value:function(e,t){var s=this.hls.levels[t.droppedLevel];this.isLevelAllowed(s)&&this.restrictedLevels.push({bitrate:s.bitrate,height:s.height,width:s.width})}},{key:"onMediaAttaching",value:function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}},{key:"onManifestParsed",value:function(e,t){var s=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,s.config.capLevelToPlayerSize&&t.video&&this.startCapping()}},{key:"onLevelsUpdated",value:function(e,t){this.timer&&ir(this.autoLevelCapping)&&this.detectPlayerSize()}},{key:"onBufferCodecs",value:function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}},{key:"onMediaDetaching",value:function(){this.stopCapping(),this.media=null}},{key:"detectPlayerSize",value:function(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);var e=this.hls.levels;if(e.length){var t=this.hls,s=this.getMaxLevel(e.length-1);s!==this.autoLevelCapping&&t.logger.log("Setting autoLevelCapping to ".concat(s,": ").concat(e[s].height,"p@").concat(e[s].bitrate," for media ").concat(this.mediaWidth,"x").concat(this.mediaHeight)),t.autoLevelCapping=s,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}},{key:"getMaxLevel",value:function(e){var t=this,n=this.hls.levels;if(!n.length)return-1;var s=n.filter((function(n,r){return t.isLevelAllowed(n)&&r<=e}));return this.clientRect=null,i.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)}},{key:"startCapping",value:function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}},{key:"stopCapping",value:function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}},{key:"getDimensions",value:function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var s=e.getBoundingClientRect();t.width=s.width,t.height=s.height,!t.width&&!t.height&&(t.width=s.right-s.left||e.
2width||0,t.height=s.bottom-s.top||e.height||0)}return this.clientRect=t,t}},{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}},{key:"isLevelAllowed",value:function(e){return!this.restrictedLevels.some((function(s){return e.bitrate===s.bitrate&&e.width===s.width&&e.height===s.height}))}}],[{key:"getMaxLevelByMediaSize",value:function(e,t,s){if(null==e||!e.length)return-1;for(var n=function(e,t){return!t||(e.width!==t.width||e.height!==t.height)},r=e.length-1,a=Math.max(t,s),o=0;o<e.length;o+=1){var c=e[o];if((c.width>=a||c.height>=a)&&n(c,e[o+1])){r=o;break}}return r}}]),i}(),Pc={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Nc={HLS:"h"},Uc=I((function i(e,t){A(this,i),Array.isArray(e)&&(e=e.map((function(s){return s instanceof i?s:new i(s)}))),this.value=e,this.params=t})),Fc="Dict";function Bc(i,e,t,s){return new Error("failed to ".concat(i,' "').concat(function(i){return Array.isArray(i)?JSON.stringify(i):i instanceof Map?"Map{}":i instanceof Set?"Set{}":"object"==R(i)?JSON.stringify(i):String(i)}(e),'" as ').concat(t),{cause:s})}function jc(i,e,t){return Bc("serialize",i,e,t)}var Vc=I((function e(t){A(this,e),this.description=t})),Hc="Bare Item";function Wc(i){if(!1===ArrayBuffer.isView(i))throw jc(i,"Byte Sequence");return":".concat(function(i){return btoa(String.fromCharCode.apply(String,v(i)))}(i),":")}function qc(i){if(function(i){return i<-999999999999999||999999999999999<i}(i))throw jc(i,"Integer");return i.toString()}function Gc(i,e){if(i<0)return-Gc(-i,e);var t=Math.pow(10,e);if(Math.abs(i*t%1-.5)<Number.EPSILON){var n=Math.floor(i*t);return(n%2==0?n:n+1)/t}return Math.round(i*t)/t}function Kc(i){var e=Gc(i,3);if(Math.floor(Math.abs(e)).toString().length>12)throw jc(i,"Decimal");var t=e.toString();return t.includes(".")?t:"".concat(t,".0")}var Yc=/[\x00-\x1f\x7f]+/;function $c(i){var e=function(i){return i.description||i.toString().slice(7,-1)}(i);if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e))throw jc(e,"Token");return e}function Qc(i){switch(R(i)){case"number":if(!ir(i))throw jc(i,Hc);return Number.isInteger(i)?qc(i):Kc(i);case"string":return function(i){if(Yc.test(i))throw jc(i,"String");return'"'.concat(i.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),'"')}(i);case"symbol":return $c(i);case"boolean":return function(i){if("boolean"!=typeof i)throw jc(i,"Boolean");return i?"?1":"?0"}(i);case"object":if(i instanceof Date)return function(i){return"@".concat(qc(i.getTime()/1e3))}(i);if(i instanceof Uint8Array)return Wc(i);if(i instanceof Vc)return $c(i);default:throw jc(i,Hc)}}function zc(i){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(i))throw jc(i,"Key");return i}function Xc(i){return null==i?"":Object.entries(i).map((function(e){var t=m(e,2),n=t[0],r=t[1];return!0===r?";".concat(zc(n)):";".concat(zc(n),"=").concat(Qc(r))})).join("")}function Jc(i){return i instanceof Uc?"".concat(Qc(i.value)).concat(Xc(i.params)):Qc(i)}function Zc(i){return"(".concat(i.value.map(Jc).join(" "),")").concat(Xc(i.params))}function el(i,e){return function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{whitespace:!0};if("object"!=R(i)||null==i)throw jc(i,Fc);var t=i instanceof Map?i.entries():Object.entries(i),s=null!=e&&e.whitespace?" ":"";return Array.from(t).map((function(e){var t=m(e,2),n=t[0],r=t[1];r instanceof Uc||(r=new Uc(r));var a=zc(n);return!0===r.value?a+=Xc(r.params):(a+="=",Array.isArray(r.value)?a+=Zc(r):a+=Jc(r)),a})).join(",".concat(s))}(i,e)}var tl="CMCD-Object",nl="CMCD-Request",rl="CMCD-Session",il="CMCD-Status",al={br:tl,ab:tl,d:tl,ot:tl,tb:tl,tpb:tl,lb:tl,tab:tl,lab:tl,url:tl,pb:nl,bl:nl,tbl:nl,dl:nl,ltc:nl,mtp:nl,nor:nl,nrr:nl,rc:nl,sn:nl,sta:nl,su:nl,ttfb:nl,ttfbb:nl,ttlb:nl,cmsdd:nl,cmsds:nl,smrt:nl,df:nl,cs:nl,ts:nl,cid:rl,pr:rl,sf:rl,sid:rl,st:rl,v:rl,msd:rl,bs:il,bsd:il,cdn:il,rtp:il,bg:il,pt:il,ec:il,e:il},sl=nl;function cl(i,e){var t={};if(!i)return t;var s=Object.keys(i),n=e?function(i){return Object.keys(i).reduce((function(e,t){var s;
2return null===(s=i[t])||void 0===s||s.forEach((function(n){return e[n]=t})),e}),{})}(e):{};return s.reduce((function(e,a){var t,r=al[a]||n[a]||sl;return(null!==(t=e[r])&&void 0!==t?t:e[r]={})[a]=i[a],e}),t)}function ll(i){return["ot","sf","st","e","sta"].includes(i)}function hl(i){return"number"==typeof i?ir(i):null!=i&&""!==i&&!1!==i}var fl="event";var pl=function(i){return Math.round(i)},vl=function e(i,t){return Array.isArray(i)?i.map((function(n){return e(n,t)})):i instanceof Uc&&"string"==typeof i.value?new Uc(e(i.value,t),i.params):(t.baseUrl&&(i=function(i,e){var t=new URL(i),s=new URL(e);if(t.origin!==s.origin)return i;for(var n=t.pathname.split("/").slice(1),r=s.pathname.split("/").slice(1,-1);n[0]===r[0];)n.shift(),r.shift();for(;r.length;)r.shift(),n.unshift("..");return n.join("/")+t.search+t.hash}(i,t.baseUrl)),1===t.version?encodeURIComponent(i):i)},ml=function(i){return 100*pl(i/100)},gl={br:pl,d:pl,bl:ml,dl:ml,mtp:ml,nor:function(i,e){var t=i;return e.version>=2&&(i instanceof Uc&&"string"==typeof i.value?t=new Uc([i]):"string"==typeof i&&(t=[i])),vl(t,e)},rtp:ml,tb:pl},yl="request",bl="response",El=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],_l=["e"],kl=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function Tl(i){return kl.test(i)}var wl=["d","dl","nor","ot","rtp","su"];var Sl=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];var Al=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function Il(i){return Al.includes(i)||Tl(i)}var Rl=(k(n={},bl,(function(i){return El.includes(i)||wl.includes(i)||Sl.includes(i)||Tl(i)})),k(n,fl,(function(i){return El.includes(i)||_l.includes(i)||Tl(i)})),k(n,yl,(function(i){return El.includes(i)||wl.includes(i)||Tl(i)})),n);function Ol(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={};if(null==i||"object"!=R(i))return t;var s=e.version||i.v||1,n=e.reportingMode||yl,r=1===s?Il:Rl[n],a=Object.keys(i).filter(r),o=e.filter;"function"==typeof o&&(a=a.filter(o));var c=n===bl||n===fl;c&&!a.includes("ts")&&a.push("ts"),s>1&&!a.includes("v")&&a.push("v");var l=kr({},gl,e.formatters),u={version:s,reportingMode:n,baseUrl:e.baseUrl};return a.sort().forEach((function(e){var n=i[e],r=l[e];if("function"==typeof r&&(n=r(n,u)),"v"===e){if(1===s)return;n=s}"pr"==e&&1===n||(c&&"ts"===e&&!ir(n)&&(n=Date.now()),hl(n)&&(ll(e)&&"string"==typeof n&&(n=new Vc(n)),t[e]=n))})),t}function Ll(i,e,t){return kr(i,function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={};if(!i)return t;var n=cl(Ol(i,e),null==e?void 0:e.customHeaderMap);return Object.entries(n).reduce((function(e,t){var n=m(t,2),a=n[0],r=el(n[1],{whitespace:!1});return r&&(e[a]=r),e}),t)}(e,t))}var Dl="CMCD";function xl(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i?el(Ol(i,e),{whitespace:!1}):""}function Cl(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!i)return"";var t=xl(i,e);return encodeURIComponent(t)}var Ml=/CMCD=[^&#]+/;function Pl(i,e,t){var s=function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!i)return"";var t=Cl(i,e);return"".concat(Dl,"=").concat(t)}(e,t);if(!s)return i;if(Ml.test(i))return i.replace(Ml,s);var n=i.includes("?")?"&":"?";return"".concat(i).concat(n).concat(s)}var Nl=function(){function e(t){var n=this;A(this,e),this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(e){try{n.apply(e,{ot:Pc.MANIFEST,su:!n.initialized})}catch(e){n.hls.logger.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var t=e.frag,a=e.part,r=n.hls.levels[t.level],o=n.getObjectType(t),c={d:1e3*(a||t).duration,ot:o};(o===Pc.VIDEO||o===Pc.AUDIO||o==Pc.MUXED)&&(c.br=r.bitrate/1e3,c.tb=n.getTopBandwidth(o)/1e3,c.bl=n.getBufferLength(o));var u=a?n.getNextPart(a):n.getNextFrag(t);null!=u&&u.url&&u.url!==t.url&&(c.nor=u.url),n.apply(e,c)}catch(t){n.hls.logger.warn("Could not generate segment CMCD data.",t)}},this.hls=t;var r=this.config=t.config,s=r.cmcd;null!=s&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=s.sessionId||t.sessionId,this.cid=s.contentId,this.useHeaders=!0===s.useHeaders,this.includeKeys=s.includeKeys,this.registerListeners())}return I(e,[{key:"registerListeners",value:function(){var e=this.hls;
vendor: 17,657 bytes, line 2
2e.on(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(cr.MEDIA_DETACHED,this.onMediaDetached,this),e.on(cr.BUFFER_CREATED,this.onBufferCreated,this)}},{key:"unregisterListeners",value:function(){var e=this.hls;e.off(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(cr.MEDIA_DETACHED,this.onMediaDetached,this),e.off(cr.BUFFER_CREATED,this.onBufferCreated,this)}},{key:"destroy",value:function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}},{key:"onMediaAttached",value:function(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}},{key:"onMediaDetached",value:function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}},{key:"onBufferCreated",value:function(e,t){var s,n;this.audioBuffer=null==(s=t.tracks.audio)?void 0:s.buffer,this.videoBuffer=null==(n=t.tracks.video)?void 0:n.buffer}},{key:"createData",value:function(){var e;return{v:1,sf:Nc.HLS,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};kr(t,this.createData());var s=t.ot===Pc.INIT||t.ot===Pc.VIDEO||t.ot===Pc.MUXED;this.starved&&s&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering);var n=this.includeKeys;n&&(t=Object.keys(t).reduce((function(a,e){return n.includes(e)&&(a[e]=t[e]),a}),{}));var r={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),Ll(e.headers,t,r)):e.url=Pl(e.url,t,r)}},{key:"getNextFrag",value:function(e){var t,s=null==(t=this.hls.levels[e.level])?void 0:t.details;if(s){var n=e.sn-s.startSN;return s.fragments[n+1]}}},{key:"getNextPart",value:function(e){var t,s=e.index,n=e.fragment,r=null==(t=this.hls.levels[n.level])||null==(t=t.details)?void 0:t.partList;if(r)for(var a=n.sn,o=r.length-1;o>=0;o--){var c=r[o];if(c.index===s&&c.fragment.sn===a)return r[o+1]}}},{key:"getObjectType",value:function(e){var t=e.type;return"subtitle"===t?Pc.TIMED_TEXT:"initSegment"===e.sn?Pc.INIT:"audio"===t?Pc.AUDIO:"main"===t?this.hls.audioTracks.length?Pc.VIDEO:Pc.MUXED:void 0}},{key:"getTopBandwidth",value:function(e){var s,t=0,n=this.hls;if(e===Pc.AUDIO)s=n.audioTracks;else{var r=n.maxAutoLevel,a=r>-1?r+1:n.levels.length;s=n.levels.slice(0,a)}return s.forEach((function(e){e.bitrate>t&&(t=e.bitrate)})),t>0?t:NaN}},{key:"getBufferLength",value:function(e){var t=this.media,s=e===Pc.AUDIO?this.audioBuffer:this.videoBuffer;return s&&t?1e3*uo.bufferInfo(s,t.currentTime,this.config.maxBufferHole).len:NaN}},{key:"createPlaylistLoader",value:function(){var e=this.config.pLoader,t=this.applyPlaylistData,s=e||this.config.loader;return function(){function e(t){A(this,e),this.loader=void 0,this.loader=new s(t)}return I(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}},{key:"destroy",value:function(){this.loader.destroy()}},{key:"abort",value:function(){this.loader.abort()}},{key:"load",value:function(e,a,n){t(e),this.loader.load(e,a,n)}}]),e}()}},{key:"createFragmentLoader",value:function(){var e=this.config.fLoader,t=this.applyFragmentData,s=e||this.config.loader;return function(){function e(t){A(this,e),this.loader=void 0,this.loader=new s(t)}return I(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}},{key:"destroy",value:function(){this.loader.destroy()}},{key:"abort",value:function(){this.loader.abort()}},{key:"load",value:function(e,a,n){t(e),this.loader.load(e,a,n)}}]),e}()}}]),e}(),Ul=function(e){T(n,e);var t=P(n);function n(e){var r;return A(this,n),(r=t.call(this,"content-steering",e.logger)).hls=void 0,r.loader=null,r.uri=null,r.pathwayId=".",r._pathwayPriority=null,r.timeToLoad=300,r.reloadTimer=-1,r.updated=0,r.started=!1,r.enabled=!0,r.levels=null,r.audioTracks=null,r.subtitleTracks=null,r.penalizedPathways={},r.hls=e,r.registerListeners(),r}return I(n,[{key:"registerListeners",value:function(){var e=this.hls;e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.on(cr.ERROR,this.onError,this)}},{key:"unregisterListeners",value:function(){var e=this.hls;e&&(e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.off(cr.ERROR,this.onError,this))}},{key:"pathways",value:function(){return(this.levels||[]).reduce((function(e,t){return-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e}),[])}},{key:"pathwayPriority",get:function(){return this._pathwayPriority},set:function(e){this.updatePathwayPriority(e)}},{key:"startLoad",value:function(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){var e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}}},{key:"stopLoad",value:function(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}},{key:"clearTimeout",value:function(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}},{key:"destroy",value:function(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}},{key:"removeLevel",value:function(e){var t=this.levels;t&&(this.levels=t.filter((function(s){return s!==e})))}},{key:"onManifestLoading",value:function(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}},{key:"onManifestLoaded",value:function(e,t){var s=t.contentSteering;null!==s&&(this.pathwayId=s.pathwayId,this.uri=s.uri,this.started&&this.startLoad())}},{key:"onManifestParsed",value:function(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}},{key:"onError",value:function(e,t){var s=t.errorAction;if((null==s?void 0:s.action)===La&&s.flags===Ma){var n=this.levels,r=this._pathwayPriority,a=this.pathwayId;if(t.context){var o=t.context,c=o.groupId,l=o.pathwayId,d=o.type;c&&n?a=this.getPathwayForGroupId(c,d,a):l&&(a=l)}a in this.penalizedPathways||(this.penalizedPathways[a]=performance.now()),!r&&n&&(r=this.pathways()),r&&r.length>1&&(this.updatePathwayPriority(r),s.resolved=this.pathwayId!==a),t.details!==ur.BUFFER_APPEND_ERROR||t.fatal?s.resolved||this.warn("Could not resolve ".concat(t.details,' ("').concat(t.error.message,'") with content-steering for Pathway: ').concat(a," levels: ").concat(n&&n.length," priorities: ").concat(aa(r)," penalized: ").concat(aa(this.penalizedPathways))):s.resolved=!0}}},{key:"filterParsedLevels",value:function(e){this.levels=e;var t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){var s=e[0].pathwayId;this.log("No levels found in Pathway ".concat(this.pathwayId,'. Setting initial Pathway to "').concat(s,'"')),t=this.getLevelsForPathway(s),this.pathwayId=s}return t.length!==e.length&&this.log("Found ".concat(t.length,"/").concat(e.length,' levels in Pathway "').concat(this.pathwayId,'"')),t}},{key:"getLevelsForPathway",value:function(e){return null===this.levels?[]:this.levels.filter((function(t){return e===t.pathwayId}))}},{key:"updatePathwayPriority",value:function(e){this._pathwayPriority=e;var t,s=this.penalizedPathways,n=performance.now();Object.keys(s).forEach((function(e){n-s[e]>3e5&&delete s[e]}));for(var r=0;r<e.length;r++){var a=e[r];if(!(a in s)){if(a===this.pathwayId)return;var o=this.hls.nextLoadLevel,c=this.hls.levels[o];if((t=this.getLevelsForPathway(a)).length>0){this.log('Setting Pathway to "'.concat(a,'"')),this.pathwayId=a,gs(t),this.hls.trigger(cr.LEVELS_UPDATED,{levels:t});var l=this.hls.levels[o];c&&l&&this.levels&&(l.attrs["STABLE-VARIANT-ID"]!==c.attrs["STABLE-VARIANT-ID"]&&l.bitrate!==c.bitrate&&this.log("Unstable Pathways change from bitrate ".concat(c.bitrate," to ").concat(l.bitrate)),this.hls.nextLoadLevel=o);break}}}}},{key:"getPathwayForGroupId",value:function(e,t,s){for(var n=this.getLevelsForPathway(s).concat(this.levels||[]),r=0;r<n.length;r++)if(t===fr&&n[r].hasAudioGroup(e)||t===pr&&n[r].hasSubtitleGroup(e))return n[r].pathwayId;return s}},{key:"clonePathways",value:function(e){var t=this,n=this.levels;if(n){var s={},r={};e.forEach((function(e){var a=e.ID,o=e["BASE-ID"],c=e["URI-REPLACEMENT"];if(!n.some((function(u){return u.pathwayId===a}))){var l=t.getLevelsForPathway(o).map((function(u){var e=new go(u.attrs);e["PATHWAY-ID"]=a;var t=e.AUDIO&&"".concat(e.AUDIO,"_clone_").concat(a),n=e.SUBTITLES&&"".concat(e.SUBTITLES,"_clone_").concat(a);t&&(s[e.AUDIO]=t,e.AUDIO=t),n&&(r[e.SUBTITLES]=n,e.SUBTITLES=n);var o=Bl(u.uri,e["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",c),p=new na({attrs:e,audioCodec:u.audioCodec,bitrate:u.bitrate,height:u.height,name:u.name,url:o,videoCodec:u.videoCodec,width:u.width});if(u.audioGroups)for(var g=1;g<u.audioGroups.length;g++)p.addGroupId("audio","".concat(u.audioGroups[g],"_clone_").concat(a));if(u.subtitleGroups)for(var l=1;l<u.subtitleGroups.length;l++)p.addGroupId("text","".concat(u.subtitleGroups[l],"_clone_").concat(a));return p}));n.push.apply(n,v(l)),Fl(t.audioTracks,s,c,a),Fl(t.subtitleTracks,r,c,a)}}))}}},{key:"loadSteeringManifest",value:function(e){var t,n=this,r=this.hls.config,s=r.loader;this.loader&&this.loader.destroy(),this.loader=new s(r);try{t=new self.URL(e)}catch(t){return this.enabled=!1,void this.log("Failed to parse Steering Manifest URI: ".concat(e))}if("data:"!==t.protocol){var u=0|(this.hls.bandwidthEstimate||r.abrEwmaDefaultEstimate);t.searchParams.set("_HLS_pathway",this.pathwayId),t.searchParams.set("_HLS_throughput",""+u)}var o={responseType:"json",url:t.href},a=r.steeringManifestLoadPolicy.default,c=a.errorRetry||a.timeoutRetry||{},l={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:c.maxNumRetry||0,retryDelay:c.retryDelayMs||0,maxRetryDelay:c.maxRetryDelayMs||0},d={onSuccess:function(u,e,r,o){n.log('Loaded steering manifest: "'.concat(t,'"'));var c=u.data;if(1===(null==c?void 0:c.VERSION)){n.updated=performance.now(),n.timeToLoad=c.TTL;var p=c["RELOAD-URI"],g=c["PATHWAY-CLONES"],l=c["PATHWAY-PRIORITY"];if(p)try{n.uri=new self.URL(p,t).href}catch(e){return n.enabled=!1,void n.log("Failed to parse Steering Manifest RELOAD-URI: ".concat(p))}n.scheduleRefresh(n.uri||r.url),g&&n.clonePathways(g);var d={steeringManifest:c,url:t.toString()};n.hls.trigger(cr.STEERING_MANIFEST_LOADED,d),l&&n.updatePathwayPriority(l)}else n.log("Steering VERSION ".concat(c.VERSION," not supported!"))},onError:function(u,e,t,r){if(n.log("Error loading steering manifest: ".concat(u.code," ").concat(u.text," (").concat(e.url,")")),n.stopLoad(),410===u.code)return n.enabled=!1,void n.log("Steering manifest ".concat(e.url," no longer available"));var o=1e3*n.timeToLoad;if(429!==u.code)n.scheduleRefresh(n.uri||e.url,o);else{var p=n.loader;if("function"==typeof(null==p?void 0:p.getResponseHeader)){var g=p.getResponseHeader("Retry-After");g&&(o=1e3*parseFloat(g))}n.log("Steering manifest ".concat(e.url," rate limited"))}},onTimeout:function(u,e,t){n.log("Timeout loading steering manifest (".concat(e.url,")")),n.scheduleRefresh(n.uri||e.url)}};this.log("Requesting steering manifest: ".concat(t)),this.loader.load(o,l,d)}},{key:"scheduleRefresh",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3*this.timeToLoad;this.clearTimeout(),this.reloadTimer=self.setTimeout((function(){var s,n=null==(s=t.hls)?void 0:s.media;!n||n.ended?t.scheduleRefresh(e,1e3*t.timeToLoad):t.loadSteeringManifest(e)}),n)}}]),n}(Sr);function Fl(i,e,t,s){i&&Object.keys(e).forEach((function(n){var r=i.filter((function(a){return a.groupId===n})).map((function(a){var r=kr({},a);return r.details=void 0,r.attrs=new go(r.attrs),r.url=r.attrs.URI=Bl(a.url,a.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),r.groupId=r.attrs["GROUP-ID"]=e[n],r.attrs["PATHWAY-ID"]=s,r}));i.push.apply(i,v(r))}))}function Bl(i,e,t,s){var n,r=s.HOST,o=s.PARAMS,a=s[t];e&&((n=null==a?void 0:a[e])&&(i=n));var c=new self.URL(i);return r&&!n&&(c.host=r),o&&Object.keys(o).sort().forEach((function(e){e&&c.searchParams.set(e,o[e])})),c.href}var jl=function(e){T(i,e);var t=P(i);function i(e){var n;return A(this,i),(n=t.call(this,"eme",e.logger)).hls=void 0,n.config=void 0,n.media=null,n.mediaResolved=void 0,n.keyFormatPromise=null,n.keySystemAccessPromises={},n._requestLicenseFailureCount=0,n.mediaKeySessions=[],n.keyIdToKeySessionPromise={},n.mediaKeys=null,n.setMediaKeysQueue=i.CDMCleanupPromise?[i.CDMCleanupPromise]:[],n.bannedKeyIds={},n.onMediaEncrypted=function(e){var s=e.initDataType,t=e.initData,r='"'.concat(e.type,'" event: init data type: "').concat(s,'"');if(n.debug(r),null!==t){if(!n.keyFormatPromise){var a=Object.keys(n.keySystemAccessPromises);a.length||(a=Fo(n.config));var o=a.map(Uo).filter((function(e){return!!e}));n.keyFormatPromise=n.getKeyFormatPromise(o)}n.keyFormatPromise.then((function(a){var o=No(a);if("sinf"===s&&o===Do.FAIRPLAY){var c;try{var l=Zr(new Uint8Array(t)),p=pi(Ao(JSON.parse(l).sinf));if(!p)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");c=new Uint8Array(p.subarray(8,24))}catch(l){return void n.warn("".concat(r," Failed to parse sinf: ").concat(l))}for(var d=Nr(c),h=_(n),u=h.keyIdToKeySessionPromise,f=h.mediaKeySessions,v=u[d],m=function(){var e=f[y],p=e.decryptdata;if(!p.keyId)return"continue";var g=Nr(p.keyId);return ko(c,p.keyId)||-1!==p.uri.replace(/-/g,"").indexOf(d)?(v=u[g])?(p.pssh||(delete u[g],p.pssh=new Uint8Array(t),p.keyId=c,(v=u[d]=v.then((function(){return n.generateRequestWithPreferredKeySession(e,s,t,"encrypted-event-key-match")}))).catch((function(e){return n.handleError(e)}))),"break"):"continue":void 0},y=0;y<f.length;y++){var E=m();if("continue"!==E&&"break"===E)break}v||n.handleError(new Error("Key ID ".concat(d," not encountered in playlist. Key-system sessions ").concat(f.length,".")))}else n.log('Ignoring "'.concat(e.type,'" event with init data type: "').concat(s,'" for selected key-system ').concat(o))})).catch((function(a){return n.handleError(a)}))}},n.onWaitingForKey=function(e){n.log('"'.concat(e.type,'" event'))},n.hls=e,n.config=e.config,n.registerListeners(),n}return I(i,[{key:"destroy",value:function(){this.onDestroying(),this.onMediaDetached();var e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}},{key:"registerListeners",value:function(){this.hls.on(cr.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(cr.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(cr.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(cr.DESTROYING,this.onDestroying,this)}},{key:"unregisterListeners",value:function(){this.hls.off(cr.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(cr.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(cr.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(cr.DESTROYING,this.onDestroying,this)}},{key:"getLicenseServerUrl",value:function(e){var t=this.config,n=t.drmSystems,s=t.widevineLicenseUrl,r=null==n?void 0:n[e];return r?r.licenseUrl:e===Do.WIDEVINE&&s?s:void 0}},{key:"getLicenseServerUrlOrThrow",value:function(e){var t=this.getLicenseServerUrl(e);if(void 0===t)throw new Error('no license server URL configured for key-system "'.concat(e,'"'));return t}},{key:"getServerCertificateUrl",value:function(e){var t=this.config.drmSystems,s=null==t?void 0:t[e];if(s)return s.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'.concat(e,'"]'))}},{key:"attemptKeySystemAccess",value:function(e){var t=this,n=this.hls.levels,s=function(a,e,t){return!!a&&t.indexOf(a)===e},r=n.map((function(a){return a.audioCodec})).filter(s),o=n.map((function(a){return a.videoCodec})).filter(s);return r.length+o.length===0&&o.push("avc1.42e01e"),new Promise((function(a,n){!function e(c){var u=c.shift();t.getMediaKeysPromise(u,r,o).then((function(e){return a({keySystem:u,mediaKeys:e})})).catch((function(t){c.length?e(c):n(t instanceof Wl?t:new Wl({type:sr.KEY_SYSTEM_ERROR,details:ur.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))}(e)}))}},{key:"requestMediaKeySystemAccess",value:function(e,t){var s=this.config.requestMediaKeySystemAccessFunc;if("function"!=typeof s){var n="Configured requestMediaKeySystemAccess is not a function ".concat(s);return null===Bo&&"http:"===self.location.protocol&&(n="navigator.requestMediaKeySystemAccess is not available over insecure protocol ".concat(location.protocol)),Promise.reject(new Error(n))}return s(e,t)}},{key:"getMediaKeysPromise",value:function(e,t,s){var n,r=this,o=function(i,e,t,s){var n;switch(i){case Do.FAIRPLAY:n=["cenc","sinf"];break;case Do.WIDEVINE:case Do.PLAYREADY:n=["cenc"];break;case Do.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error("Unknown key-system: ".concat(i))}return function(i,e,t,s){return[{initDataTypes:i,persistentState:s.persistentState||"optional",distinctiveIdentifier:s.distinctiveIdentifier||"optional",sessionTypes:s.sessionTypes||[s.sessionType||"temporary"],audioCapabilities:e.map((function(e){return{contentType:"audio/mp4;
2 codecs=".concat(e),robustness:s.audioRobustness||"",encryptionScheme:s.audioEncryptionScheme||null}})),videoCapabilities:t.map((function(e){return{contentType:"video/mp4; codecs=".concat(e),robustness:s.videoRobustness||"",encryptionScheme:s.videoEncryptionScheme||null}}))}]}(n,e,t,s)}(e,t,s,this.config.drmSystemOptions||{}),a=this.keySystemAccessPromises[e],c=null==(n=a)?void 0:n.keySystemAccess;if(!c){this.log('Requesting encrypted media "'.concat(e,'" key-system access with config: ').concat(aa(o))),c=this.requestMediaKeySystemAccess(e,o);var l=a=this.keySystemAccessPromises[e]={keySystemAccess:c};return c.catch((function(t){r.log('Failed to obtain access to key-system "'.concat(e,'": ').concat(t))})),c.then((function(t){r.log('Access for key-system "'.concat(t.keySystem,'" obtained'));var u=r.fetchServerCertificate(e);r.log('Create media-keys for "'.concat(e,'"'));var n=l.mediaKeys=t.createMediaKeys().then((function(t){return r.log('Media-keys created for "'.concat(e,'"')),l.hasMediaKeys=!0,u.then((function(n){return n?r.setMediaKeysServerCertificate(t,e,n):t}))}));return n.catch((function(t){r.error('Failed to create media-keys for "'.concat(e,'"}: ').concat(t))})),n}))}return c.then((function(){return a.mediaKeys}))}},{key:"createMediaKeySessionContext",value:function(e){var t=e.decryptdata,n=e.keySystem,s=e.mediaKeys;this.log('Creating key-system session "'.concat(n,'" keyId: ').concat(Nr(t.keyId||[])," keyUri: ").concat(t.uri));var r=s.createSession(),o={decryptdata:t,keySystem:n,mediaKeys:s,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(o),o}},{key:"renewKeySession",value:function(e){var t=e.decryptdata;if(t.pssh){var s=this.createMediaKeySessionContext(e),n=Vl(t);this.keyIdToKeySessionPromise[n]=this.generateRequestWithPreferredKeySession(s,"cenc",t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}},{key:"updateKeySession",value:function(e,t){var s=e.mediaKeysSession;return this.log('Updating key-session "'.concat(s.sessionId,'" for keyId ').concat(Nr(e.decryptdata.keyId||[]),"\n      } (data length: ").concat(t.byteLength,")")),s.update(t)}},{key:"getSelectedKeySystemFormats",value:function(){var e=this;return Object.keys(this.keySystemAccessPromises).map((function(t){return{keySystem:t,hasMediaKeys:e.keySystemAccessPromises[t].hasMediaKeys}})).filter((function(e){return!!e.hasMediaKeys}
2)).map((function(e){return Uo(e.keySystem)})).filter((function(e){return!!e}))}},{key:"getKeySystemAccess",value:function(e){var t=this;return this.getKeySystemSelectionPromise(e).then((function(e){var n=e.keySystem,s=e.mediaKeys;return t.attemptSetMediaKeys(n,s)}))}},{key:"selectKeySystem",value:function(e){var t=this;return new Promise((function(n,s){t.getKeySystemSelectionPromise(e).then((function(e){var t=e.keySystem,r=Uo(t);r?n(r):s(new Error('Unable to find format for key-system "'.concat(t,'"')))})).catch(s)}))}},{key:"selectKeySystemFormat",value:function(e){var t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: ".concat(e.sn," ").concat(e.type,": ").concat(e.level,") key formats ").concat(t.join(", "))),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}},{key:"getKeyFormatPromise",value:function(e){var t=Fo(this.config),s=e.map(No).filter((function(e){return!!e&&-1!==t.indexOf(e)}));return this.selectKeySystem(s)}},{key:"getKeyStatus",value:function(e){for(var t=this.mediaKeySessions,s=0;s<t.length;s++){var n=Hl(e,t[s]);if(n)return n}}},{key:"loadKey",value:function(e){var t=this,n=e.keyInfo.decryptdata,s=Vl(n),r=this.bannedKeyIds[s];if(r||"internal-error"===this.getKeyStatus(n)){var o=ql(r||"internal-error",n);return this.handleError(o,e.frag),Promise.reject(o)}var c="(keyId: ".concat(s,' format: "').concat(n.keyFormat,'" method: ').concat(n.method," uri: ").concat(n.uri,")");this.log("Starting session for key ".concat(c));var a=this.keyIdToKeySessionPromise[s];if(!a){var l=this.getKeySystemForKeyPromise(n).then((function(r){var o=r.keySystem,l=r.mediaKeys;return t.throwIfDestroyed(),t.log("Handle encrypted media sn: ".concat(e.frag.sn," ").concat(e.frag.type,": ").concat(e.frag.level," using key ").concat(c)),t.attemptSetMediaKeys(o,l).then((function(){return t.throwIfDestroyed(),t.createMediaKeySessionContext({keySystem:o,mediaKeys:l,decryptdata:n})}))})).then((function(e){var u=n.pssh?n.pssh.buffer:null;return t.generateRequestWithPreferredKeySession(e,"cenc",u,"playlist-key")}));return l.catch((function(n){return t.handleError(n,e.frag)})),this.keyIdToKeySessionPromise[s]=l,l}return a.catch((function(r){if(r instanceof Wl){var o=wr({},r.data);"internal-error"===t.getKeyStatus(n)&&(o.decryptdata=n);var c=new Wl(o,r.message);t.handleError(c,e.frag)}})),a}},{key:"throwIfDestroyed",value:function(){if(!this.hls)throw new Error("invalid state")}},{key:"handleError",value:function(e,t){if(this.hls)if(e instanceof Wl){t&&(e.data.frag=t);var s=e.data.decryptdata;this.error("".concat(e.message).concat(s?" (".concat(Nr(s.keyId||[]),")"):"")),this.hls.trigger(cr.ERROR,e.data)}else this.error(e.message),this.hls.trigger(cr.ERROR,{type:sr.KEY_SYSTEM_ERROR,details:ur.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}},{key:"getKeySystemForKeyPromise",value:function(e){var t=Vl(e),s=this.keyIdToKeySessionPromise[t];if(!s){var n=No(e.keyFormat),r=n?[n]:Fo(this.config);return this.attemptKeySystemAccess(r)}return s}},{key:"getKeySystemSelectionPromise",value:function(e){if(e.length||(e=Fo(this.config)),0===e.length)throw new Wl({type:sr.KEY_SYSTEM_ERROR,details:ur.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options ".concat(aa({drmSystems:this.config.drmSystems})));return this.attemptKeySystemAccess(e)}},{key:"attemptSetMediaKeys",value:function(e,t){var n=this;if(this.mediaResolved=void 0,this.mediaKeys===t)return Promise.resolve();var s=this.setMediaKeysQueue.slice();this.log('Setting media-keys for "'.concat(e,'"'));var r=Promise.all(s).then((function(){return n.media?n.media.setMediaKeys(t):new Promise((function(e,a){n.mediaResolved=function(){if(n.mediaResolved=void 0,!n.media)return a(new Error("Attempted to set mediaKeys without media element attached"));n.mediaKeys=t,n.media.setMediaKeys(t).then(e).catch(a)}}))}));return this.mediaKeys=t,this.setMediaKeysQueue.push(r),r.then((function(){n.log('Media-keys set for "'.concat(e,'"')),s.push(r),n.setMediaKeysQueue=n.setMediaKeysQueue.filter((function(e){return-1===s.indexOf(e)}))}))}},{key:"generateRequestWithPreferredKeySession",value:function(e,t,s,n){var r,o=this,a=null==(r=this.config.drmSystems)||null==(r=r[e.keySystem])?void 0:r.generateRequest;if(a)try{var c=a.call(this.hls,t,s,e);
2if(!c)throw new Error("Invalid response from configured generateRequest filter");t=c.initDataType,s=c.initData?c.initData:null,e.decryptdata.pssh=s?new Uint8Array(s):null}catch(c){if(this.warn(c.message),this.hls&&this.hls.config.debug)throw c}if(null===s)return this.log('Skipping key-session request for "'.concat(n,'" (no initData)')),Promise.resolve(e);var l=Vl(e.decryptdata),d=e.decryptdata.uri;this.log('Generating key-session request for "'.concat(n,'" keyId: ').concat(l," URI: ").concat(d," (init data type: ").concat(t," length: ").concat(s.byteLength,")"));var h=new Gs,u=e._onmessage=function(t){var p=e.mediaKeysSession;if(p){var g=t.messageType,n=t.message;o.log('"'.concat(g,'" message event for session "').concat(p.sessionId,'" message size: ').concat(n.byteLength)),"license-request"===g||"license-renewal"===g?o.renewLicense(e,n).catch((function(e){h.eventNames().length?h.emit("error",e):o.handleError(e)})):"license-release"===g?e.keySystem===Do.FAIRPLAY&&o.updateKeySession(e,Io("acknowledged")).then((function(){return o.removeSession(e)})).catch((function(e){return o.handleError(e)})):o.warn('unhandled media key message type "'.concat(g,'"'))}else h.emit("error",new Error("invalid state"))},f=function(e,p){var g;p.keyStatus=e,e.startsWith("usable")?h.emit("resolved"):"internal-error"===e||"output-restricted"===e||"output-downscaled"===e?g=ql(e,p.decryptdata):"expired"===e?g=new Error("key expired (keyId: ".concat(l,")")):"released"===e?g=new Error("key released"):"status-pending"===e||o.warn('unhandled key status change "'.concat(e,'" (keyId: ').concat(l,")")),g&&(h.eventNames().length?h.emit("error",g):o.handleError(g))},v=e._onkeystatuseschange=function(t){if(e.mediaKeysSession){var g=o.getKeyStatuses(e);if(Object.keys(g).some((function(b){return"status-pending"!==g[b]}))){if("expired"===g[l])return o.log("Expired key ".concat(aa(g),' in key-session "').concat(e.mediaKeysSession.sessionId,'"')),void o.renewKeySession(e);var n,r=g[l];if(r)f(r,e);else e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(n=e.keyStatusTimeouts)[l]||(n[l]=self.setTimeout((function(){if(e.mediaKeysSession&&o.mediaKeys){var t=o.getKeyStatus(e.decryptdata);if(t&&"status-pending"!==t)return o.log("No status for keyId ".concat(l,' in key-session "').concat(e.mediaKeysSession.sessionId,'". Using session key-status ').concat(t," from other session.")),f(t,e);o.log("key status for ".concat(l,' in key-session "').concat(e.mediaKeysSession.sessionId,'" timed out after 1000ms')),f(r="internal-error",e)}}),1e3)),o.log("No status for keyId ".concat(l," (").concat(aa(g),")."))}}else h.emit("error",new Error("invalid state"))};Ss(e.mediaKeysSession,"message",u),Ss(e.mediaKeysSession,"keystatuseschange",v);var m=new Promise((function(e,p){h.on("error",p),h.on("resolved",e)}));return e.mediaKeysSession.generateRequest(t,s).then((function(){o.log('Request generated for key-session "'.concat(e.mediaKeysSession.sessionId,'" keyId: ').concat(l," URI: ").concat(d))})).catch((function(t){throw new Wl({type:sr.KEY_SYSTEM_ERROR,details:ur.KEY_SYSTEM_NO_SESSION,error:t,decryptdata:e.decryptdata,fatal:!1},"Error generating key-session request: ".concat(t))})).then((function(){return m})).catch((function(t){return h.removeAllListeners(),o.removeSession(e).then((function(){throw t}))})).then((function(){return h.removeAllListeners(),e}))}},{key:"getKeyStatuses",value:function(e){var t=this,n={};return e.mediaKeysSession.keyStatuses.forEach((function(s,r){if("string"==typeof r&&"object"==R(s)){var o=r;r=s,s=o}var c="buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r);if(e.keySystem===Do.PLAYREADY&&16===c.length){var l=Nr(c);n[l]=s,Ro(c)}var a=Nr(c);"internal-error"===s&&(t.bannedKeyIds[a]=s),t.log('key status change "'.concat(s,'" for keyStatuses keyId: ').concat(a,' key-session "').concat(e.mediaKeysSession.sessionId,'"')),n[a]=s})),n}},{key:"fetchServerCertificate",value:function(e){var t=this.config,n=new(0,t.loader)(t),r=this.getServerCertificateUrl(e);return r?(this.log('Fetching server certificate for "'.concat(e,'"')),new Promise((function(a,o){var c={responseType:"arraybuffer",url:r},l=t.certLoadPolicy.default,u={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:function(e,t,n,p){a(e.data)},onError:function(t,n,l,p){o(new Wl({type:sr.KEY_SYSTEM_ERROR,details:ur.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:wr({url:c.url,data:void 0},t)},'"'.concat(e,'" certificate request failed (').concat(r,"). Status: ").concat(t.code," (").concat(t.text,")")))},onTimeout:function(t,n,l){o(new Wl({type:sr.KEY_SYSTEM_ERROR,details:ur.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:{url:c.url,data:void 0}},'"'.concat(e,'" certificate request timed out (').concat(r,")")))},onAbort:function(e,t,n){o(new Error("aborted"))}};n.load(c,u,d)}))):Promise.resolve()}},{key:"setMediaKeysServerCertificate",value:function(e,t,s){var n=this;return new Promise((function(r,o){e.setServerCertificate(s).then((function(a){n.log("setServerCertificate ".concat(a?"success":"not supported by CDM"," (").concat(s.byteLength,') on "').concat(t,'"')),r(e)})).catch((function(a){o(new Wl({type:sr.KEY_SYSTEM_ERROR,details:ur.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:a,fatal:!0},a.message))}))}))}},{key:"renewLicense",value:function(e,t){var n=this;return this.requestLicense(e,new Uint8Array(t)).then((function(s){return n.updateKeySession(e,new Uint8Array(s)).catch((function(t){throw new Wl({type:sr.KEY_SYSTEM_ERROR,details:ur.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:t,fatal:!1},t.message)}))}))}},{key:"unpackPlayReadyKeyMessage",value:function(e,t){var s=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!s.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;var n=(new DOMParser).parseFromString(s,"application/xml"),r=n.querySelectorAll("HttpHeader");if(r.length>0)for(var u,o=0,c=r.length;o<c;o++){var a,l,d=null==(a=(u=r[o]).querySelector("name"))?void 0:a.textContent,h=null==(l=u.querySelector("value"))?void 0:l.textContent;d&&h&&e.setRequestHeader(d,h)}var f=n.querySelector("Challenge"),v=null==f?void 0:f.textContent;
2if(!v)throw new Error("Cannot find <Challenge> in key message");return Io(atob(v))}},{key:"setupLicenseXHR",value:function(e,t,s,n){var r=this,o=this.config.licenseXhrSetup;return o?Promise.resolve().then((function(){if(!s.decryptdata)throw new Error("Key removed");return o.call(r.hls,e,t,s,n)})).catch((function(a){if(!s.decryptdata)throw a;return e.open("POST",t,!0),o.call(r.hls,e,t,s,n)})).then((function(a){return e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:a||n}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:n}))}},{key:"requestLicense",value:function(e,t){var n=this,s=this.config.keyLoadPolicy.default;return new Promise((function(r,o){var a=n.getLicenseServerUrlOrThrow(e.keySystem);n.log("Sending license request to URL: ".concat(a));var c=new XMLHttpRequest;c.responseType="arraybuffer",c.onreadystatechange=function(){if(!n.hls||!e.mediaKeysSession)return o(new Error("invalid state"));if(4===c.readyState)if(200===c.status){n._requestLicenseFailureCount=0;var l=c.response;n.log("License received ".concat(l instanceof ArrayBuffer?l.byteLength:l));var d=n.config.licenseResponseCallback;if(d)try{l=d.call(n.hls,c,a,e)}catch(u){n.error(u)}r(l)}else{var h=s.errorRetry,f=h?h.maxNumRetry:0;if(n._requestLicenseFailureCount++,n._requestLicenseFailureCount>f||c.status>=400&&c.status<500)o(new Wl({type:sr.KEY_SYSTEM_ERROR,details:ur.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:c,response:{url:a,data:void 0,code:c.status,text:c.statusText}},"License Request XHR failed (".concat(a,"). Status: ").concat(c.status," (").concat(c.statusText,")")));else{var u=f-n._requestLicenseFailureCount+1;n.warn("Retrying license request, ".concat(u," attempts left")),n.requestLicense(e,t).then(r,o)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=c,n.setupLicenseXHR(c,a,e,t).then((function(t){var r=t.xhr,o=t.licenseChallenge;e.keySystem==Do.PLAYREADY&&(o=n.unpackPlayReadyKeyMessage(r,o)),r.send(o)})).catch(o)}))}},{key:"onDestroying",value:function(){this.unregisterListeners(),this._clear()}},{key:"onMediaAttached",value:function(e,t){if(this.config.emeEnabled){var s=t.media;this.media=s,Ss(s,"encrypted",this.onMediaEncrypted),Ss(s,"waitingforkey",this.onWaitingForKey);var n=this.mediaResolved;n?n():this.mediaKeys=s.mediaKeys}}},{key:"onMediaDetached",value:function(){var e=this.media;e&&(As(e,"encrypted",this.onMediaEncrypted),As(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}},{key:"_clear",value:function(){var e,t=this;this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={};var n=this.mediaResolved;if(n&&n(),this.mediaKeys||this.mediaKeySessions.length){var s=this.media,r=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,Ho.clearKeyUriToKeyIdMap();var o=r.length;i.CDMCleanupPromise=Promise.all(r.map((function(a){return t.removeSession(a)})).concat((null==s||null==(e=s.setMediaKeys(null))?void 0:e.catch((function(a){t.log("Could not clear media keys: ".concat(a)),t.hls&&t.hls.trigger(cr.ERROR,{type:sr.OTHER_ERROR,details:ur.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error("Could not clear media keys: ".concat(a))})})))||Promise.resolve())).catch((function(a){t.log("Could not close sessions and clear media keys: ".concat(a)),t.hls&&t.hls.trigger(cr.ERROR,{type:sr.OTHER_ERROR,details:ur.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error("Could not close sessions and clear media keys: ".concat(a))})})).then((function(){o&&t.log("finished closing key sessions and clearing media keys")}))}}},{key:"onManifestLoading",value:function(){this._clear()}},{key:"onManifestLoaded",value:function(e,t){var n=t.sessionKeys;if(n&&this.config.emeEnabled&&!this.keyFormatPromise){var s=n.reduce((function(e,t){return-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e}),[]);this.log("Selecting key-system from session-keys ".concat(s.join(", "))),this.keyFormatPromise=this.getKeyFormatPromise(s)}}},{key:"removeSession",value:function(e){var t=this,n=e.mediaKeysSession,s=e.licenseXhr,r=e.decryptdata;
2if(n){this.log('Remove licenses and keys and close session "'.concat(n.sessionId,'" keyId: ').concat(Nr((null==r?void 0:r.keyId)||[]))),e._onmessage&&(n.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(n.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),s&&s.readyState!==XMLHttpRequest.DONE&&s.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;var o=this.mediaKeySessions.indexOf(e);o>-1&&this.mediaKeySessions.splice(o,1);var a=e.keyStatusTimeouts;return a&&Object.keys(a).forEach((function(e){return self.clearTimeout(a[e])})),(function(i){var e;return!(!i||"persistent-license"!==i.sessionType&&(null==(e=i.sessionTypes)||!e.some((function(e){return"persistent-license"===e}))))}(this.config.drmSystemOptions)?new Promise((function(e,u){self.setTimeout((function(){return u(new Error("MediaKeySession.remove() timeout"))}),8e3),n.remove().then(e).catch(u)})):Promise.resolve()).catch((function(e){t.log("Could not remove session: ".concat(e)),t.hls&&t.hls.trigger(cr.ERROR,{type:sr.OTHER_ERROR,details:ur.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error("Could not remove session: ".concat(e))})})).then((function(){return n.close()})).catch((function(e){t.log("Could not close session: ".concat(e)),t.hls&&t.hls.trigger(cr.ERROR,{type:sr.OTHER_ERROR,details:ur.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error("Could not close session: ".concat(e))})}))}return Promise.resolve()}}]),i}(Sr);function Vl(i){if(!i)throw new Error("Could not read keyId of undefined decryptdata");if(null===i.keyId)throw new Error("keyId is null");return Nr(i.keyId)}function Hl(i,e){return i.keyId&&e.mediaKeysSession.keyStatuses.has(i.keyId)?e.mediaKeysSession.keyStatuses.get(i.keyId):i.matches(e.decryptdata)?e.keyStatus:void 0}jl.CDMCleanupPromise=void 0;var Wl=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this,r)).data=void 0,e.error||(e.error=new Error(r)),o.data=e,e.err=e.error,o}return I(n)}(E(Error));function ql(i,e){var t="output-restricted"===i,s=t?ur.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:ur.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new Wl({type:sr.KEY_SYSTEM_ERROR,details:s,fatal:!1,decryptdata:e},t?"HDCP level output restricted":'key status changed to "'.concat(i,'"'))}var Gl=function(){function e(t){A(this,e),this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=t,this.registerListeners()}return I(e,[{key:"setStreamController",value:function(e){this.streamController=e}},{key:"registerListeners",value:function(){this.hls.on(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(cr.MEDIA_DETACHING,this.onMediaDetaching,this)}},{key:"unregisterListeners",value:function(){this.hls.off(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(cr.MEDIA_DETACHING,this.onMediaDetaching,this)}},{key:"destroy",value:function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}},{key:"onMediaAttaching",value:function(e,t){var s=this.hls.config;if(s.capLevelOnFPSDrop){var n=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=n,n&&"function"==typeof n.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),s.fpsDroppedMonitoringPeriod)}}},{key:"onMediaDetaching",value:function(){this.media=null}},{key:"checkFPS",value:function(e,t,s){var n=performance.now();if(t){if(this.lastTime){var r=n-this.lastTime,a=s-this.lastDroppedFrames,o=t-this.lastDecodedFrames,c=1e3*a/r,l=this.hls;if(l.trigger(cr.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:s}),c>0&&a>l.config.fpsDroppedMonitoringThreshold*o){var u=l.currentLevel;l.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=u)&&(u-=1,l.trigger(cr.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:l.currentLevel}),l.autoLevelCapping=u,this.streamController.nextLevelSwitch())}}this.lastTime=n,this.lastDroppedFrames=s,this.lastDecodedFrames=t}}},{key:"checkFPSInterval",value:function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}
vendor: 13,029 bytes, line 2
2}]),e}();function Kl(i,e){var t;try{t=new Event("addtrack")}catch(e){(t=document.createEvent("Event")).initEvent("addtrack",!1,!1)}t.track=i,e.dispatchEvent(t)}function Yl(i,e){var t=i.mode;if("disabled"===t&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(e.id))try{if(i.addCue(e),!i.cues.getCueById(e.id))throw new Error("addCue is failed for: ".concat(e))}catch(t){xr.debug("[texttrack-utils]: ".concat(t));try{var n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,i.addCue(n)}catch(n){xr.debug("[texttrack-utils]: Legacy TextTrackCue fallback failed: ".concat(n))}}"disabled"===t&&(i.mode=t)}function $l(i,e){var t=i.mode;if("disabled"===t&&(i.mode="hidden"),i.cues)for(var s=i.cues.length;s--;)e&&i.cues[s].removeEventListener("enter",e),i.removeCue(i.cues[s]);"disabled"===t&&(i.mode=t)}function Ql(i,e,t,s){var n=i.mode;if("disabled"===n&&(i.mode="hidden"),i.cues&&i.cues.length>0)for(var r=function(i,e,t){var s=[],n=function(i,e){if(e<=i[0].startTime)return 0;var t=i.length-1;if(e>i[t].endTime)return-1;for(var n,s=0,r=t;s<=r;)if(n=Math.floor((r+s)/2),e<i[n].startTime)r=n-1;else{if(!(e>i[n].startTime&&s<t))return n;s=n+1}return i[s].startTime-e<e-i[r].startTime?s:r}(i,e);if(n>-1)for(var r=n,a=i.length;r<a;r++){var o=i[r];if(o.startTime>=e&&o.endTime<=t)s.push(o);else if(o.startTime>t)return s}return s}(i.cues,e,t),a=0;a<r.length;a++)(!s||s(r[a]))&&i.removeCue(r[a]);"disabled"===n&&(i.mode=n)}function zl(i){for(var e=[],t=0;t<i.length;t++){var s=i[t];("subtitles"===s.kind||"captions"===s.kind)&&s.label&&e.push(i[t])}return e}var Xl=function(e){T(n,e);var t=P(n);function n(e){var r;return A(this,n),(r=t.call(this,e,"subtitle-track-controller")).media=null,r.tracks=[],r.groupIds=null,r.tracksInGroup=[],r.trackId=-1,r.currentTrack=null,r.selectDefaultTrack=!0,r.queuedDefaultTrack=-1,r.useTextTrackPolling=!1,r.subtitlePollingInterval=-1,r._subtitleDisplay=!0,r.asyncPollTrackChange=function(){return r.pollTrackChange(0)},r.onTextTracksChanged=function(){if(r.useTextTrackPolling||self.clearInterval(r.subtitlePollingInterval),r.media&&r.hls.config.renderTextTracksNatively){for(var e=null,s=zl(r.media.textTracks),t=0;t<s.length;t++)if("hidden"===s[t].mode)e=s[t];else if("showing"===s[t].mode){e=s[t];break}var n=r.findTrackForTextTrack(e);r.subtitleTrack!==n&&r.setSubtitleTrack(n)}},r.registerListeners(),r}return I(n,[{key:"destroy",value:function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,y(S(n.prototype),"destroy",this).call(this)}},{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}},{key:"registerListeners",value:function(){var e=this.hls;e.on(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.on(cr.LEVEL_LOADING,this.onLevelLoading,this),e.on(cr.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(cr.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(cr.ERROR,this.onError,this)}},{key:"unregisterListeners",value:function(){var e=this.hls;e.off(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.off(cr.LEVEL_LOADING,this.onLevelLoading,this),e.off(cr.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(cr.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(cr.ERROR,this.onError,this)}},{key:"onMediaAttached",value:function(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}},{key:"pollTrackChange",value:function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}},{key:"onMediaDetaching",value:function(e,t){var s=this.media;if(s){var n=!!t.transferMedia;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||s.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,n||zl(s.textTracks).forEach((function(a){$l(a)}))}}},{key:"onManifestLoading",value:function(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}},{key:"onManifestParsed",value:function(e,t){this.tracks=t.subtitleTracks}},{key:"onSubtitleTrackLoaded",value:function(e,t){var s=t.id,n=t.groupId,r=t.details,a=this.tracksInGroup[s];if(a&&a.groupId===n){var o=a.details;a.details=t.details,this.log("Subtitle track ".concat(s,' "').concat(a.name,'" lang:').concat(a.lang," group:").concat(n," loaded [").concat(r.startSN,"-").concat(r.endSN,"]")),s===this.trackId&&this.playlistLoaded(s,t,o)}else this.warn("Subtitle track with id:".concat(s," and group:").concat(n," not found in active group ").concat(null==a?void 0:a.groupId))}},{key:"onLevelLoading",value:function(e,t){this.switchLevel(t.level)}},{key:"onLevelSwitching",value:function(e,t){this.switchLevel(t.level)}},{key:"switchLevel",value:function(e){var t=this.hls.levels[e];if(t){var s=t.subtitleGroups||null,n=this.groupIds,r=this.currentTrack;if(!s||(null==n?void 0:n.length)!==(null==s?void 0:s.length)||null!=s&&s.some((function(a){return-1===(null==n?void 0:n.indexOf(a))}))){this.groupIds=s,this.trackId=-1,this.currentTrack=null;var a=this.tracks.filter((function(u){return!s||-1!==s.indexOf(u.groupId)}));if(a.length)this.selectDefaultTrack&&!a.some((function(u){return u.default}))&&(this.selectDefaultTrack=!1),a.forEach((function(u,e){u.id=e}));else if(!r&&!this.tracksInGroup.length)return;this.tracksInGroup=a;var o=this.hls.config.subtitlePreference;if(!r&&o){this.selectDefaultTrack=!1;var u=ca(o,a);if(u>-1)r=a[u];else{var c=ca(o,this.tracks);r=this.tracks[c]}}var l=this.findTrackId(r);-1===l&&r&&(l=this.findTrackId(null));var d={subtitleTracks:a};this.log("Updating subtitle tracks, ".concat(a.length,' track(s) found in "').concat(null==s?void 0:s.join(","),'" group-id')),this.hls.trigger(cr.SUBTITLE_TRACKS_UPDATED,d),-1!==l&&-1===this.trackId&&this.setSubtitleTrack(l)}}}},{key:"findTrackId",value:function(e){for(var t=this.tracksInGroup,s=this.selectDefaultTrack,n=0;n<t.length;n++){var r=t[n];if((!s||r.default)&&(s||e)&&(!e||la(r,e)))return n}if(e){for(var o=0;o<t.length;o++){var c=t[o];if(wc(e.attrs,c.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return o}for(var l=0;l<t.length;l++){var d=t[l];if(wc(e.attrs,d.attrs,["LANGUAGE"]))return l}}return-1}},{key:"findTrackForTextTrack",value:function(e){if(e)for(var t=this.tracksInGroup,s=0;s<t.length;s++){if(Sc(t[s],e))return s}return-1}},{key:"onError",value:function(e,t){t.fatal||!t.context||t.context.type===pr&&t.context.id===this.trackId&&(!this.groupIds||-1!==this.groupIds.indexOf(t.context.groupId))&&this.checkRetry(t)}},{key:"allSubtitleTracks",get:function(){return this.tracks}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}},{key:"setSubtitleOption",value:function(e){if(this.hls.config.subtitlePreference=e,e){if(-1===e.id)return this.setSubtitleTrack(-1),null;var t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){var s=this.currentTrack;if(s&&la(e,s))return s;var n=ca(e,this.tracksInGroup);if(n>-1){var r=this.tracksInGroup[n];return this.setSubtitleTrack(n),r}if(s)return null;var o=ca(e,t);if(o>-1)return t[o]}}return null}},{key:"loadPlaylist",value:function(e){y(S(n.prototype),"loadPlaylist",this).call(this),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}},{key:"loadingPlaylist",value:function(e,t){y(S(n.prototype),"loadingPlaylist",this).call(this,e,t);var s=e.id,r=e.groupId,o=this.getUrlWithDirectives(e.url,t),a=e.details,c=null==a?void 0:a.age;this.log("Loading subtitle ".concat(s,' "').concat(e.name,'" lang:').concat(e.lang," group:").concat(r).concat(void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:"").concat(c&&a.live?" age "+c.toFixed(1)+(a.type&&" "+a.type||""):""," ").concat(o)),this.hls.trigger(cr.SUBTITLE_TRACK_LOADING,{url:o,id:s,groupId:r,deliveryDirectives:t||null,track:e})}},{key:"toggleTrackModes",value:function(){var e=this.media;if(e){var t,n=zl(e.textTracks),s=this.currentTrack;if(s&&((t=n.filter((function(e){return Sc(s,e)}))[0])||this.warn('Unable to find subtitle TextTrack with name "'.concat(s.name,'" and language "').concat(s.lang,'"'))),[].slice.call(n).forEach((function(e){"disabled"!==e.mode&&e!==t&&(e.mode="disabled")})),t){var r=this.subtitleDisplay?"showing":"hidden";t.mode!==r&&(t.mode=r)}}}},{key:"setSubtitleTrack",value:function(e){var t=this.tracksInGroup;if(this.media)if(e<-1||e>=t.length||!ir(e))this.warn("Invalid subtitle track id: ".concat(e));else{this.selectDefaultTrack=!1;var s=this.currentTrack,n=t[e]||null;if(this.trackId=e,this.currentTrack=n,this.toggleTrackModes(),n){var r=!!n.details&&!n.details.live;if(e!==this.trackId||n!==s||!r){this.log("Switching to subtitle-track ".concat(e)+(n?' "'.concat(n.name,'" lang:').concat(n.lang," group:").concat(n.groupId):""));var a=n.id,o=n.groupId,c=void 0===o?"":o,l=n.name,d=n.type,u=n.url;this.hls.trigger(cr.SUBTITLE_TRACK_SWITCH,{id:a,groupId:c,name:l,type:d,url:u});var h=this.switchParams(n.url,null==s?void 0:s.details,n.details);this.loadPlaylist(h)}}else this.hls.trigger(cr.SUBTITLE_TRACK_SWITCH,{id:e})}else this.queuedDefaultTrack=e}}]),n}(kc);function Jl(i){for(var e=5381,t=i.length;t;)e=33*e^i.charCodeAt(--t);return(e>>>0).toString()}var Zl=.025,ed=function(i){return i[i.Point=0]="Point",i[i.Range=1]="Range",i}({});function nd(i,e,t){return"".concat(i.identifier,"-").concat(t+1,"-").concat(Jl(e))}var rd=function(){function e(t,n){A(this,e),this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=n,this.dateRange=t,this.setDateRange(t)}return I(e,[{key:"setDateRange",value:function(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}},{key:"reset",value:function(){var e;this.appendInPlaceStarted=!1,null==(e=this.assetListLoader)||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}},{key:"isAssetPastPlayoutLimit",value:function(e){var t;if(e>0&&e>=this.assetList.length)return!0;var s=this.playoutLimit;return!(e<=0||isNaN(s))&&(0===s||((null==(t=this.assetList[e])?void 0:t.startOffset)||0)>s)}},{key:"findAssetIndex",value:function(e){return this.assetList.indexOf(e)}},{key:"identifier",get:function(){return this.dateRange.id}},{key:"startDate",get:function(){return this.dateRange.startDate}},{key:"startTime",get:function(){var e=this.dateRange.startTime;if(this.snapOptions.out){var t=this.dateRange.tagAnchor;if(t)return id(e,t)}return e}},{key:"startOffset",get:function(){return this.cue.pre?0:this.startTime}},{key:"startIsAligned",get:function(){if(0===this.startTime||this.snapOptions.out)return!0;var e=this.dateRange.tagAnchor;if(e){var t=this.dateRange.startTime;return t-id(t,e)<.1}return!1}},{key:"resumptionOffset",get:function(){var e=this.resumeOffset,t=ir(e)?e:this.duration;return this.cumulativeDuration+t}},{key:"resumeTime",get:function(){var e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){var t=this.resumeAnchor;if(t)return id(e,t)}return e}},{key:"appendInPlace",get:function(){return!!this.appendInPlaceStarted||!this.appendInPlaceDisabled&&!(this.cue.once||this.cue.pre||!this.startIsAligned||!(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<Zl))},set:function(e){this.appendInPlaceStarted?this.resetOnResume=!e:this.appendInPlaceDisabled=!e}},{key:"timelineStart",get:function(){return null!==this._timelineStart?this._timelineStart:this.startTime},set:function(e){this._timelineStart=e}}
2,{key:"duration",get:function(){var e,t=this.playoutLimit;return e=null!==this._duration?this._duration:this.dateRange.duration?this.dateRange.duration:this.dateRange.plannedDuration||0,!isNaN(t)&&t<e&&(e=t),e},set:function(e){this._duration=e}},{key:"cue",get:function(){return this.dateRange.cue}},{key:"timelineOccupancy",get:function(){return"RANGE"===this.dateRange.attr["X-TIMELINE-OCCUPIES"]?ed.Range:ed.Point}},{key:"supplementsPrimary",get:function(){return"PRIMARY"===this.dateRange.attr["X-TIMELINE-STYLE"]}},{key:"contentMayVary",get:function(){return"NO"!==this.dateRange.attr["X-CONTENT-MAY-VARY"]}},{key:"assetUrl",get:function(){return this.dateRange.attr["X-ASSET-URI"]}},{key:"assetListUrl",get:function(){return this.dateRange.attr["X-ASSET-LIST"]}},{key:"baseUrl",get:function(){return this.base.url}},{key:"assetListLoaded",get:function(){return this.assetList.length>0||null!==this.assetListResponse}},{key:"toString",value:function(){return function(i){return'["'.concat(i.identifier,'" ').concat(i.cue.pre?"<pre>":i.cue.post?"<post>":"").concat(i.timelineStart.toFixed(2),"-").concat(i.resumeTime.toFixed(2),"]")}(this)}}]),e}();function id(i,e){return i-e.start<e.duration/2&&!(Math.abs(i-(e.start+e.duration))<Zl)?e.start:e.start+e.duration}function ad(i,e,t){var s=new self.URL(i,t);return"data:"!==s.protocol&&s.searchParams.set("_HLS_primary_id",e),s}function od(i,e){for(;null!=(t=i.assetList[++e])&&t.error;)var t;return e}function sd(i){var e=i.timelineStart,t=i.duration||0;return'["'.concat(i.identifier,'" ').concat(e.toFixed(2),"-").concat((e+t).toFixed(2),"]")}var ud=function(){function e(t,n,s,r){var o=this;A(this,e),this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=function(){o.reachedPlayout(o.currentTime)&&o.hls&&o.hls.trigger(cr.PLAYOUT_LIMIT_REACHED,{})};var c=this.hls=new t(n);this.interstitial=s,this.assetItem=r;var a=function(){o.hasDetails=!0};c.once(cr.LEVEL_LOADED,a),c.once(cr.AUDIO_TRACK_LOADED,a),c.once(cr.SUBTITLE_TRACK_LOADED,a),c.on(cr.MEDIA_ATTACHING,(function(e,t){var n=t.media;o.removeMediaListeners(),o.mediaAttached=n,o.interstitial.playoutLimit&&(n.addEventListener("timeupdate",o.checkPlayout),o.appendInPlace&&c.on(cr.BUFFER_APPENDED,(function(){var u=o.bufferedEnd;o.reachedPlayout(u)&&(o._bufferedEosTime=u,c.trigger(cr.BUFFERED_TO_END,void 0))})))}))}return I(e,[{key:"appendInPlace",get:function(){return this.interstitial.appendInPlace}},{key:"loadSource",value:function(){var e=this.hls;if(e)if(e.url)e.levels.length&&!e.started&&e.startLoad(-1,!0);else{var t=this.assetItem.uri;try{t=ad(t,e.config.primarySessionId||"").href}catch(e){}e.loadSource(t)}}},{key:"bufferedInPlaceToEnd",value:function(e){var t;if(!this.appendInPlace)return!1;if(null!=(t=this.hls)&&t.bufferedToEnd)return!0;if(!e)return!1;var s=Math.min(this._bufferedEosTime||1/0,this.duration),n=this.timelineOffset,r=uo.bufferInfo(e,n,0);return this.getAssetTime(r.end)>=s-.02}},{key:"reachedPlayout",value:function(e){var s=this.interstitial.playoutLimit;return this.startOffset+e>=s}},{key:"destroyed",get:function(){var e;return!(null!=(e=this.hls)&&e.userConfig)}},{key:"assetId",get:function(){return this.assetItem.identifier}},{key:"interstitialId",get:function(){return this.assetItem.parentIdentifier}},{key:"media",get:function(){var e;return(null==(e=this.hls)?void 0:e.media)||null}},{key:"bufferedEnd",get:function(){var e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;var t=uo.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}},{key:"currentTime",get:function(){var e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}},{key:"duration",get:function(){var e=this.assetItem.duration;if(!e)return 0;var t=this.interstitial.playoutLimit;if(t){var s=t-this.startOffset;if(s>0&&s<e)return s}return e}},{key:"remaining",get:function(){var e=this.duration;return e?Math.max(0,e-this.currentTime):0}},{key:"startOffset",get:function(){return this.assetItem.startOffset}},{key:"timelineOffset",get:function(){var e;return(null==(e=this.hls)?void 0:e.config.timelineOffset)||0},set:function(e){var t=this.timelineOffset;if(e!==t){var s=e-t;if(Math.abs(s)>
vendor: 9,664 bytes, line 2
21/9e4&&this.hls){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}},{key:"getAssetTime",value:function(e){var t=this.timelineOffset,s=this.duration;return Math.min(Math.max(0,e-t),s)}},{key:"removeMediaListeners",value:function(){var e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}},{key:"bufferSnapShot",value:function(){var e;this.mediaAttached&&(null!=(e=this.hls)&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd))}},{key:"destroy",value:function(){this.removeMediaListeners(),this.hls&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null}},{key:"attachMedia",value:function(e){var t;this.loadSource(),null==(t=this.hls)||t.attachMedia(e)}},{key:"detachMedia",value:function(){var e;this.removeMediaListeners(),this.mediaAttached=null,null==(e=this.hls)||e.detachMedia()}},{key:"resumeBuffering",value:function(){var e;null==(e=this.hls)||e.resumeBuffering()}},{key:"pauseBuffering",value:function(){var e;null==(e=this.hls)||e.pauseBuffering()}},{key:"transferMedia",value:function(){var e;return this.bufferSnapShot(),(null==(e=this.hls)?void 0:e.transferMedia())||null}},{key:"resetDetails",value:function(){var e=this.hls;if(e&&this.hasDetails){e.stopLoad();var t=function(s){return delete s.details};e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}},{key:"on",value:function(e,t,s){var n;null==(n=this.hls)||n.on(e,t)}},{key:"once",value:function(e,t,s){var n;null==(n=this.hls)||n.once(e,t)}},{key:"off",value:function(e,t,s){var n;null==(n=this.hls)||n.off(e,t)}},{key:"toString",value:function(){var e;return"HlsAssetPlayer: ".concat(sd(this.assetItem)," ").concat(null==(e=this.hls)?void 0:e.sessionId," ").concat(this.appendInPlace?"append-in-place":"")}}]),e}(),cd=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this,"interstitials-sched",r)).onScheduleUpdate=void 0,o.eventMap={},o.events=null,o.items=null,o.durations={primary:0,playout:0,integrated:0},o.onScheduleUpdate=e,o}return I(n,[{key:"destroy",value:function(){this.reset(),this.onScheduleUpdate=null}},{key:"reset",value:function(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach((function(e){return e.reset()})),this.events=this.items=null}},{key:"resetErrorsInRange",value:function(e,t){return this.events?this.events.reduce((function(s,n){return e<=n.startOffset&&t>n.startOffset?(delete n.error,s+1):s}),0):0}},{key:"duration",get:function(){var e=this.items;return e?e[e.length-1].end:0}},{key:"length",get:function(){return this.items?this.items.length:0}},{key:"getEvent",value:function(e){return e&&this.eventMap[e]||null}},{key:"hasEvent",value:function(e){return e in this.eventMap}},{key:"findItemIndex",value:function(e,t){if(e.event)return this.findEventIndex(e.event.identifier);var s=-1;e.nextEvent?s=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(s=this.findEventIndex(e.previousEvent.identifier)+1);var n=this.items;if(n)for(n[s]||(void 0===t&&(t=e.start),s=this.findItemIndexAtTime(t));s>=0&&null!=(r=n[s])&&r.event;){var r;s--}return s}},{key:"findItemIndexAtTime",value:function(e,t){var s=this.items;if(s)for(var n=0;n<s.length;n++){var r=s[n];if(t&&"primary"!==t&&(r=r[t]),e===r.start||e>r.start&&e<r.end)return n}return-1}},{key:"findJumpRestrictedIndex",value:function(e,t){var s=this.items;if(s)for(var n=e;n<=t&&s[n];n++){var r=s[n].event;if(null!=r&&r.restrictions.jump&&!r.appendInPlace)return n}return-1}},{key:"findEventIndex",value:function(e){var t=this.items;if(t)for(var n=t.length;n--;){var s;if((null==(s=t[n].event)?void 0:s.identifier)===e)return n}return-1}},{key:"findAssetIndex",value:function(e,t){var s=e.assetList,n=s.length;if(n>1)for(var r=0;r<n;r++){var a=s[r];if(!a.error){var o=a.timelineStart;if(t===o||t>o&&(t<o+(a.duration||0)||r===n-1))return r}}return 0}},{key:"assetIdAtEnd",get:function(){var e,t=null==(e=this.items)||null==(e=e[this.length-1])?void 0:e.event;if(t){var s=t.assetList,n=s[s.length-1];if(n)return n.identifier}return null}},{key:"parseInterstitialDateRanges",value:function(e,t){var n=this,s=e.main.details,r=s.dateRanges,o=this.events,a=this.parseDateRanges(r,{url:s.url},t),c=Object.keys(r),l=o?o.filter((function(e){return!c.includes(e.identifier)})):[];a.length&&a.sort((function(e,u){var t=e.cue.pre,n=e.cue.post,r=u.cue.pre,o=u.cue.post;if(t&&!r)return-1;if(r&&!t||n&&!o)return 1;if(o&&!n)return-1;if(!(t||r||n||o)){var p=e.startTime,g=u.startTime;if(p!==g)return p-g}return e.dateRange.tagOrder-u.dateRange.tagOrder})),this.events=a,l.forEach((function(e){n.removeEvent(e)})),this.updateSchedule(e,l)}},{key:"updateSchedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.events||[];if(n.length||t.length||this.length<2){var r=this.items,a=this.parseSchedule(n,e);(s||t.length||(null==r?void 0:r.length)!==a.length||a.some((function(e,t){return Math.abs(e.playout.start-r[t].playout.start)>.005||Math.abs(e.playout.end-r[t].playout.end)>.005})))&&(this.items=a,this.onScheduleUpdate(t,r))}}},{key:"parseDateRanges",value:function(e,t,s){for(var n=[],r=Object.keys(e),a=0;a<r.length;a++){var o=r[a],c=e[o];if(c.isInterstitial){var l=this.eventMap[o];l?l.setDateRange(c):(l=new rd(c,t),this.eventMap[o]=l,!1===s&&(l.appendInPlace=s)),n.push(l)}}return n}},{key:"parseSchedule",value:function(e,t){var s=[],n=t.main.details,r=n.live?1/0:n.edge,a=0;if((e=e.filter((function(e){return!(e.error||e.cue.once&&e.hasPlayed)}))).length){this.resolveOffsets(e,t);var o=0,c=0;if(e.forEach((function(u,t){var n=u.cue.pre,l=u.cue.post,d=e[t-1]||null,p=u.appendInPlace,g=l?r:u.startOffset,h=u.duration,f=u.timelineOccupancy===ed.Range?h:0,v=u.resumptionOffset,b=(null==d?void 0:d.startTime)===g,m=g+u.cumulativeDuration,y=p?m+h:g+v;if(n||!l&&g<=0){var E=c;c+=f,u.timelineStart=m;var _=a;a+=h,s.push({event:u,start:m,end:y,playout:{start:_,end:a},integrated:{start:E,end:c}})}else{if(!(g<=r))return;if(!b){var k=g-o;if(k>.033){var T=o,w=c;c+=k;var S=a;a+=k;var A={previousEvent:e[t-1]||null,nextEvent:u,start:T,end:T+k,playout:{start:S,end:a},integrated:{start:w,end:c}};s.push(A)}else k>0&&d&&(d.cumulativeDuration+=k,s[s.length-1].end=g)}l&&(y=m),u.timelineStart=m;var I=c;c+=f;var R=a;a+=h,s.push({event:u,start:m,end:y,playout:{start:R,end:a},integrated:{start:I,end:c}})}var O=u.resumeTime;o=l||O>r?r:O})),o<r){var l,u=o,d=c,h=r-o;c+=h;var f=a;a+=h,s.push({previousEvent:(null==(l=s[s.length-1])?void 0:l.event)||null,nextEvent:null,start:o,end:u+h,playout:{start:f,end:a},integrated:{start:d,end:c}})}this.setDurations(r,a,c)}else s.push({previousEvent:null,nextEvent:null,start:0,end:r,playout:{start:0,end:r},integrated:{start:0,end:r}}),this.setDurations(r,r,r);return s}},{key:"setDurations",value:function(e,t,s){this.durations={primary:e,playout:t,integrated:s}}},{key:"resolveOffsets",value:function(e,t){var n=this,s=t.main.details,r=s.live?1/0:s.edge,o=0,a=-1;e.forEach((function(c,l){var d=c.cue.pre,u=c.cue.post,h=d?0:u?r:c.startTime;n.updateAssetDurations(c),a===h?c.cumulativeDuration=o:(o=0,a=h),!u&&c.snapOptions.in&&(c.resumeAnchor=ma(null,s.fragments,c.startOffset+c.resumptionOffset,0,0)||void 0),c.appendInPlace&&!c.appendInPlaceStarted&&(n.primaryCanResumeInPlaceAt(c,t)||(c.appendInPlace=!1)),!c.appendInPlace&&l+1<e.length&&e[l+1].startTime-e[l].resumeTime<.033&&(e[l+1].appendInPlace=!1,e[l+1].appendInPlace&&n.warn("Could not change append strategy for abutting event ".concat(c)));var f=ir(c.resumeOffset)?c.resumeOffset:c.duration;o+=f}))}},{key:"primaryCanResumeInPlaceAt",value:function(e,t){var n=this,s=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(s-r)>Zl?(this.log('"'.concat(e.identifier,'" resumption ').concat(s," not aligned with estimated timeline end ").concat(r)),!1):!Object.keys(t).some((function(a){var r=t[a].details,o=r.edge;if(s>=o)return n.log('"'.concat(e.identifier,'" resumption ').concat(s," past ").concat(a," playlist end ").concat(o)),!1;var c=ma(null,r.fragments,s);if(!c)return n.log('"'.concat(e.identifier,'" resumption ').concat(s," does not align with any fragments in ").concat(a," playlist (").concat(r.fragStart,"-").concat(r.fragmentEnd,")")),!0;var u="audio"===a?.175:0;return!(Math.abs(c.start-s)<Zl+u||Math.abs(c.end-s)<Zl+u)&&(n.log('"'.concat(e.identifier,'" resumption ').concat(s," not aligned with ").concat(a," fragment bounds (").concat(c.start,"-").concat(c.end," sn: ").concat(c.sn," cc: ").concat(c.cc,")")),!0)}))}},{key:"updateAssetDurations",value:function(e){if(e.assetListLoaded){for(var t=e.timelineStart,s=0,n=!1,r=!1,a=0;a<e.assetList.length;a++){var o=e.assetList[a],c=t+s;o.startOffset=s,o.timelineStart=c,n||(n=null===o.duration),r||(r=!!o.error),s+=o.error?0:o.duration||0}e.duration=n&&!r?Math.max(s,e.duration):s}}},{key:"removeEvent",value:function(e){e.reset(),delete this.eventMap[e.identifier]}}]),n}(Sr);function ld(i){return"[".concat(i.event?'"'+i.event.identifier+'"':"primary",": ").concat(i.start.toFixed(2),"-").concat(i.end.toFixed(2),"]")}var hd=function(){function e(t){A(this,e),this.hls=void 0,this.hls=t}return I(e,[{key:"destroy",value:function(){this.hls=null}},{key:"loadAssetList",value:function(e,t){var n,r=this,s=e.assetListUrl;try{n=ad(s,this.hls.sessionId,e.baseUrl)}catch(t){var o=this.assignAssetListError(e,ur.ASSET_LIST_LOAD_ERROR,t,s);return void this.hls.trigger(cr.ERROR,o)}t&&"data:"!==n.protocol&&n.searchParams.set("_HLS_start_offset",""+t);
2var c=this.hls.config,l=new(0,c.loader)(c),d={responseType:"json",url:n.href},h=c.interstitialAssetListLoadPolicy.default,u={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},f={onSuccess:function(t,n,o,p){var g=t.data,c=null==g?void 0:g.ASSETS;if(Array.isArray(c))e.assetListResponse=g,r.hls.trigger(cr.ASSET_LIST_LOADED,{event:e,assetListResponse:g,networkDetails:p});else{var l=r.assignAssetListError(e,ur.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),o.url,n,p);r.hls.trigger(cr.ERROR,l)}},onError:function(t,n,o,p){var g=r.assignAssetListError(e,ur.ASSET_LIST_LOAD_ERROR,new Error("Error loading X-ASSET-LIST: HTTP status ".concat(t.code," ").concat(t.text," (").concat(n.url,")")),n.url,p,o);r.hls.trigger(cr.ERROR,g)},onTimeout:function(t,n,o){var p=r.assignAssetListError(e,ur.ASSET_LIST_LOAD_TIMEOUT,new Error("Timeout loading X-ASSET-LIST (".concat(n.url,")")),n.url,t,o);r.hls.trigger(cr.ERROR,p)}};return l.load(d,u,f),this.hls.trigger(cr.ASSET_LIST_LOADING,{event:e}),l}},{key:"assignAssetListError",value:function(e,t,s,n,r,a){return e.error=s,{type:sr.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:n,error:s,networkDetails:a,stats:r}}}]),e}();function fd(i){var e;null==i||null==(e=i.play())||e.catch((function(){}))}function pd(i,e){return"[".concat(i,"] Advancing timeline position to ").concat(e)}var vd=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this,"interstitials",e.logger)).HlsPlayerClass=void 0,o.hls=void 0,o.assetListLoader=void 0,o.mediaSelection=null,o.altSelection=null,o.media=null,o.detachedData=null,o.requiredTracks=null,o.manager=null,o.playerQueue=[],o.bufferedPos=-1,o.timelinePos=-1,o.schedule=void 0,o.playingItem=null,o.bufferingItem=null,o.waitingItem=null,o.endedItem=null,o.playingAsset=null,o.endedAsset=null,o.bufferingAsset=null,o.shouldPlay=!1,o.onPlay=function(){o.shouldPlay=!0},o.onPause=function(){o.shouldPlay=!1},o.onSeeking=function(){var s=o.currentTime;if(void 0!==s&&!o.playbackDisabled&&o.schedule){var e=s-o.timelinePos;if(!(Math.abs(e)<1/7056e5)){var a=e<=-.01;o.timelinePos=s,o.bufferedPos=s;var t=o.playingItem;if(t)if(a&&o.schedule.resetErrorsInRange(s,s-e)&&o.updateSchedule(!0),o.checkBuffer(),a&&s<t.start||s>=t.end){var n,r=o.findItemIndex(t),c=o.schedule.findItemIndexAtTime(s);if(-1===c&&(c=r+(a?-1:1),o.log("seeked ".concat(a?"back ":"","to position not covered by schedule ").concat(s," (resolving from ").concat(r," to ").concat(c,")"))),!o.isInterstitial(t)&&null!=(n=o.media)&&n.paused&&(o.shouldPlay=!1),!a&&c>r){var p=o.schedule.findJumpRestrictedIndex(r+1,c);if(p>r)return void o.setSchedulePosition(p)}o.setSchedulePosition(c)}else{var l=o.playingAsset;if(l){var d,u=l.timelineStart,h=l.duration||0;if(a&&s<u||s>=u+h)null!=(d=t.event)&&d.appendInPlace&&(o.clearAssetPlayers(t.event,t),o.flushFrontBuffer(s)),o.setScheduleToAssetAtTime(s,l)}else if(o.playingLastItem&&o.isInterstitial(t)){var f=t.event.assetList[0];f&&(o.endedItem=o.playingItem,o.playingItem=null,o.setScheduleToAssetAtTime(s,f))}}else o.checkBuffer()}}},o.onTimeupdate=function(){var s=o.currentTime;if(void 0!==s&&!o.playbackDisabled&&s>o.timelinePos){o.timelinePos=s,s>o.bufferedPos&&o.checkBuffer();var e=o.playingItem;if(e&&!o.playingLastItem){if(s>=e.end){o.timelinePos=e.end;var t=o.findItemIndex(e);o.setSchedulePosition(t+1)}var n=o.playingAsset;if(n)s>=n.timelineStart+(n.duration||0)&&o.setScheduleToAssetAtTime(s,n)}}},o.onScheduleUpdate=function(s,e){var t=o.schedule;if(t){var a=o.playingItem,n=t.events||[],r=t.items||[],c=t.durations,u=s.map((function(p){return p.identifier})),l=!(!n.length&&!u.length);(l||e)&&o.log("INTERSTITIALS_UPDATED (".concat(n.length,"): ").concat(n,"\nSchedule: ").concat(r.map((function(p){return ld(p)}))," pos: ").concat(o.timelinePos)),u.length&&o.log("Removed events ".concat(u));var d=null,h=null;a&&(d=o.updateItem(a,o.timelinePos),o.itemsMatch(a,d)?o.playingItem=d:o.waitingItem=o.endedItem=null),o.waitingItem=o.updateItem(o.waitingItem),o.endedItem=o.updateItem(o.endedItem);var f=o.bufferingItem;if(f&&(h=o.updateItem(f,o.bufferedPos),o.itemsMatch(f,h)?o.bufferingItem=h:f.event&&(o.bufferingItem=o.playingItem,o.clearInterstitial(f.event,null))),s.forEac
vendor: 4,750 bytes, line 2
2h((function(p){p.assetList.forEach((function(g){o.clearAssetPlayer(g.identifier,null)}))})),o.playerQueue.forEach((function(p){if(p.interstitial.appendInPlace){var g=p.assetItem.timelineStart,e=p.timelineOffset-g;if(e)try{p.timelineOffset=g}catch(t){Math.abs(e)>Zl&&o.warn("".concat(t,' ("').concat(p.assetId,'" ').concat(p.timelineOffset,"->").concat(g,")"))}}})),l||e){if(o.hls.trigger(cr.INTERSTITIALS_UPDATED,{events:n.slice(0),schedule:r.slice(0),durations:c,removedIds:u}),o.isInterstitial(a)&&u.includes(a.event.identifier))return o.warn('Interstitial "'.concat(a.event.identifier,'" removed while playing')),void o.primaryFallback(a.event);a&&o.trimInPlace(d,a),f&&h!==d&&o.trimInPlace(h,f),o.checkBuffer()}}},o.hls=e,o.HlsPlayerClass=r,o.assetListLoader=new hd(e),o.schedule=new cd(o.onScheduleUpdate,e.logger),o.registerListeners(),o}return I(n,[{key:"registerListeners",value:function(){var e=this.hls;e&&(e.on(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(cr.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(cr.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(cr.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(cr.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(cr.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(cr.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(cr.BUFFER_APPENDED,this.onBufferAppended,this),e.on(cr.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(cr.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(cr.MEDIA_ENDED,this.onMediaEnded,this),e.on(cr.ERROR,this.onError,this),e.on(cr.DESTROYING,this.onDestroying,this))}},{key:"unregisterListeners",value:function(){var e=this.hls;e&&(e.off(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(cr.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(cr.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(cr.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(cr.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(cr.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(cr.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(cr.BUFFER_CODECS,this.onBufferCodecs,this),e.off(cr.BUFFER_APPENDED,this.onBufferAppended,this),e.off(cr.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(cr.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(cr.MEDIA_ENDED,this.onMediaEnded,this),e.off(cr.ERROR,this.onError,this),e.off(cr.DESTROYING,this.onDestroying,this))}},{key:"startLoad",value:function(){this.resumeBuffering()}},{key:"stopLoad",value:function(){this.pauseBuffering()}},{key:"resumeBuffering",value:function(){var e;null==(e=this.getBufferingPlayer())||e.resumeBuffering()}},{key:"pauseBuffering",value:function(){var e;null==(e=this.getBufferingPlayer())||e.pauseBuffering()}},{key:"destroy",value:function(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.schedule=this.manager=null,this.hls=this.HlsPlayerClass=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}},{key:"onDestroying",value:function(){var e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}},{key:"removeMediaListeners",value:function(e){As(e,"play",this.onPlay),As(e,"pause",this.onPause),As(e,"seeking",this.onSeeking),As(e,"timeupdate",this.onTimeupdate)}},{key:"onMediaAttaching",value:function(e,t){var s=this.media=t.media;Ss(s,"seeking",this.onSeeking),Ss(s,"timeupdate",this.onTimeupdate),Ss(s,"play",this.onPlay),Ss(s,"pause",this.onPause)}},{key:"onMediaAttached",value:function(e,t){var s=this.effectivePlayingItem,n=this.detachedData;if(this.detachedData=null,null===s)this.checkStart();else if(!n){this.clearScheduleState();var r=this.findItemIndex(s);this.setSchedulePosition(r)}}},{key:"clearScheduleState",value:function(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}},{key:"onMediaDetaching",value:function(e,t){var s=!!t.transferMedia,n=this.media;if(this.media=null,!s&&(n&&this.removeMediaListeners(n),this.detachedData)){var r=this.getBuffer
vendor: 4,458 bytes, line 2
2ingPlayer();r&&(this.log("Removing schedule state for detachedData and ".concat(r)),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,r.detachMedia()),this.shouldPlay=!1}}},{key:"interstitialsManager",get:function(){if(!this.hls)return null;if(this.manager)return this.manager;var e=this,t=function(){return e.bufferingItem||e.waitingItem},s=function(t){return t&&e.getAssetPlayer(t.identifier)},n=function(t,n,r,o,p){if(t){var g=t[n].start,c=t.event;if(c){if("playout"===n||c.timelineOccupancy!==ed.Point){var l=s(r);(null==l?void 0:l.interstitial)===c&&(g+=l.assetItem.startOffset+l[p])}}else g+=("bufferedPos"===o?a():e[o])-t.start;return g}return 0},a=function(){var t=e.bufferedPos;return t===Number.MAX_VALUE?r("primary"):Math.max(t,0)},r=function(t){var n,r;return null!=(n=e.primaryDetails)&&n.live?e.primaryDetails.edge:(null==(r=e.schedule)?void 0:r.durations[t])||0},o=function(t,r){var o,c,p=e.effectivePlayingItem;if((null==p||null==(o=p.event)||!o.restrictions.skip)&&e.schedule){e.log("seek to ".concat(t,' "').concat(r,'"'));var g=e.effectivePlayingItem,l=e.schedule.findItemIndexAtTime(t,r),d=null==(c=e.schedule.items)?void 0:c[l],h=e.getBufferingPlayer(),b=null==h?void 0:h.interstitial,f=null==b?void 0:b.appendInPlace,v=g&&e.itemsMatch(g,d);if(g&&(f||v)){var m=s(e.playingAsset),y=(null==m?void 0:m.media)||e.primaryMedia;if(y){var E="primary"===r?y.currentTime:n(g,r,e.playingAsset,"timelinePos","currentTime"),_=t-E,k=(f?E:y.currentTime)+_;if(k>=0&&(!m||f||k<=m.duration))return void(y.currentTime=k)}}if(d){var T=t;if("primary"!==r){var w=t-d[r].start;T=d.start+w}var S=!e.isInterstitial(d);if(e.isInterstitial(g)&&!g.event.appendInPlace||!S&&!d.event.appendInPlace){if(g){var A=e.findItemIndex(g);if(l>A){var I=e.schedule.findJumpRestrictedIndex(A+1,l);if(I>A)return void e.setSchedulePosition(I)}var R=0;if(S)e.timelinePos=T,e.checkBuffer();else for(var O=d.event.assetList,L=t-(d[r]||d).start,D=O.length;D--;){var x=O[D];if(x.duration&&L>=x.startOffset&&L<x.startOffset+x.duration){R=D;break}}e.setSchedulePosition(l,R)}}else{var C=e.media||(f?null==h?void 0:h.media:null);C&&(C.currentTime=T)}}}},c=function(){var n=e.effectivePlayingItem;if(e.isInterstitial(n))return n;var r=t();return e.isInterstitial(r)?r:null},u={get bufferedEnd(){var r,o=t(),c=e.bufferingItem;return c&&c===o&&(n(c,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-c.playout.start||(null==(r=e.bufferingAsset)?void 0:r.startOffset))||0},get currentTime(){var t=c(),r=e.effectivePlayingItem;return r&&r===t?n(r,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-r.playout.start:0},set currentTime(t){var n=c(),r=e.effectivePlayingItem;r&&r===n&&o(t+r.playout.start,"playout")},get duration(){var e=c();return e?e.playout.end-e.playout.start:0},get assetPlayers(){var t,n=null==(t=c())?void 0:t.event.assetList;return n?n.map((function(t){return e.getAssetPlayer(t.identifier)})):[]},get playingIndex(){var t,n=null==(t=c())?void 0:t.event;return n&&e.effectivePlayingAsset?n.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};return this.manager={get events(){var t;return(null==(t=e.schedule)||null==(t=t.events)?void 0:t.slice(0))||[]},get schedule(){var t;return(null==(t=e.schedule)||null==(t=t.items)?void 0:t.slice(0))||[]},get interstitialPlayer(){return c()?u:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){var n=t();return e.findItemIndex(n)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){var t=e.effectivePlayingItem;return e.findItemIndex(t)},primary:{get bufferedEnd(){return a()},get currentTime(){var t=e.timelinePos;return t>0?t:0},set currentTime(e){o(e,"primary")},get duration(){return r("primary")},get seekableStart(){var t;return(null==(t=e.primaryDetails)?void 0:t.fragmentStart)||0}},integrated:{get bufferedEnd(){return n(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return n(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(e){o(e,"integrated")},get duration(){return r("integrated")},get seekableStart(){var t;return function(t,n){var r;if(0!==t&&"primary"!==n&&null!=(r=e.schedule)&&r.length){var o,p=e.schedule.findItemIndexAtTime(t),g=null==(o=e.sc
vendor: 4,191 bytes, line 2
2hedule.items)?void 0:o[p];if(g)return t+(g[n].start-g.start)}return t}((null==(t=e.primaryDetails)?void 0:t.fragmentStart)||0,"integrated")}},skip:function(){var t=e.effectivePlayingItem,n=null==t?void 0:t.event;if(n&&!n.restrictions.skip){var r=e.findItemIndex(t);if(n.appendInPlace){var c=t.playout.start+t.event.duration;o(c+.001,"playout")}else e.advanceAfterAssetEnded(n,r,1/0)}}}}},{key:"effectivePlayingItem",get:function(){return this.waitingItem||this.playingItem||this.endedItem}},{key:"effectivePlayingAsset",get:function(){return this.playingAsset||this.endedAsset}},{key:"playingLastItem",get:function(){var e,t=this.playingItem,s=null==(e=this.schedule)?void 0:e.items;return!!(this.playbackStarted&&t&&s)&&this.findItemIndex(t)===s.length-1}},{key:"playbackStarted",get:function(){return null!==this.effectivePlayingItem}},{key:"currentTime",get:function(){var e,t;if(null!==this.mediaSelection){var s=this.waitingItem||this.playingItem;if(!this.isInterstitial(s)||s.event.appendInPlace){var n=this.media;!n&&null!=(e=this.bufferingItem)&&null!=(e=e.event)&&e.appendInPlace&&(n=this.primaryMedia);var r=null==(t=n)?void 0:t.currentTime;return void 0!==r&&ir(r)?r:void 0}}}},{key:"primaryMedia",get:function(){var e;return this.media||(null==(e=this.detachedData)?void 0:e.media)||null}},{key:"isInterstitial",value:function(e){return!(null==e||!e.event)}},{key:"retreiveMediaSource",value:function(e,t){var s=this.getAssetPlayer(e);s&&this.transferMediaFromPlayer(s,t)}},{key:"transferMediaFromPlayer",value:function(e,t){var s=e.interstitial.appendInPlace,n=e.media;if(s&&n===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&n)return void(this.detachedData={media:n});var r=e.transferMedia();this.log("transfer MediaSource from ".concat(e," ").concat(aa(r))),this.detachedData=r}else t&&n&&(this.shouldPlay||(this.shouldPlay=!n.paused))}},{key:"transferMediaTo",value:function(e,t){var s,n,r=this;if(e.media!==t){var u,o=null,a=this.hls,c=e!==a,l=c&&e.interstitial.appendInPlace,d=null==(s=this.detachedData)?void 0:s.mediaSource;if(a.media)l&&(o=a.transferMedia(),this.detachedData=o),u="Primary";else if(d){var h=this.getBufferingPlayer();h?(o=h.transferMedia(),u="".concat(h)):u="detached MediaSource"}else u="detached media";if(!o)if(d)o=this.detachedData,this.log("using detachedData: MediaSource ".concat(aa(o)));else if(!this.detachedData||a.media===t){var f=this.playerQueue;f.length>1&&f.forEach((function(p){if(c&&p.interstitial.appendInPlace!==l){var g=p.interstitial;r.clearInterstitial(p.interstitial,null),g.appendInPlace=!1,g.appendInPlace&&r.warn("Could not change append strategy for queued assets ".concat(g))}})),this.hls.detachMedia(),this.detachedData={media:t}}var v=o&&"mediaSource"in o&&"closed"!==(null==(n=o.mediaSource)?void 0:n.readyState),m=v&&o?o:t;this.log("".concat(v?"transfering MediaSource":"attaching media"," to ").concat(c?e:"Primary"," from ").concat(u," (media.currentTime: ").concat(t.currentTime,")"));var y=this.schedule;if(m===o&&y){var E=c&&e.assetId===y.assetIdAtEnd;m.overrides={duration:y.duration,endOfStream:!c||E,cueRemoval:!c}}e.attachMedia(m)}}},{key:"onInterstitialCueEnter",value:function(){this.onTimeupdate()}},{key:"checkStart",value:function(){var e=this.schedule,t=null==e?void 0:e.events;if(t&&!this.playbackDisabled&&this.media){-1===this.bufferedPos&&(this.bufferedPos=0);var s=this.timelinePos,n=this.effectivePlayingItem;if(-1===s){var r=this.hls.startPosition;if(this.log(pd("checkStart",r)),this.timelinePos=r,t.length&&t[0].cue.pre){var a=e.findEventIndex(t[0].identifier);this.setSchedulePosition(a)}else if(r>=0||!this.primaryLive){var o=this.timelinePos=r>0?r:0,c=e.findItemIndexAtTime(o);this.setSchedulePosition(c)}}else if(n&&!this.playingItem){var l=e.findItemIndex(n);this.setSchedulePosition(l)}}}},{key:"advanceAssetBuffering",value:function(e,t){var s=e.event,n=s.findAssetIndex(t),r=od(s,n);if(s.isAssetPastPlayoutLimit(r)){if(this.schedule){var a,o=null==(a=this.schedule.items)?void 0:a[this.findItemIndex(e)+1];o&&this.bufferedToItem(o)}}else this.bufferedToEvent(e,r)}},{key:"advanceAfterAssetEnded",value:function(e,t,s){var n=od(e,s);
vendor: 8,597 bytes, line 2
2if(e.isAssetPastPlayoutLimit(n)){if(this.schedule){var r=this.schedule.items;if(r){var a=t+1;if(a>=r.length)return void this.setSchedulePosition(-1);var o=e.resumeTime;this.timelinePos<o&&(this.log(pd("advanceAfterAssetEnded",o)),this.timelinePos=o,e.appendInPlace&&this.advanceInPlace(o),this.checkBuffer(this.bufferedPos<o)),this.setSchedulePosition(a)}}}else{if(e.appendInPlace){var c=e.assetList[n];c&&this.advanceInPlace(c.timelineStart)}this.setSchedulePosition(t,n)}}},{key:"setScheduleToAssetAtTime",value:function(e,t){var s=this.schedule;if(s){var n=t.parentIdentifier,r=s.getEvent(n);if(r){var a=s.findEventIndex(n),o=s.findAssetIndex(r,e);this.advanceAfterAssetEnded(r,a,o-1)}}}},{key:"setSchedulePosition",value:function(e,t){var s,n=null==(s=this.schedule)?void 0:s.items;if(n&&!this.playbackDisabled){var r=e>=0?n[e]:null;this.log("setSchedulePosition ".concat(e,", ").concat(t," (").concat(r&&ld(r),") pos: ").concat(this.timelinePos));var a=this.waitingItem||this.playingItem,o=this.playingLastItem;if(this.isInterstitial(a)){var u=a.event,c=this.playingAsset,l=null==c?void 0:c.identifier,d=l?this.getAssetPlayer(l):null;if(d&&l&&(!this.eventItemsMatch(a,r)||void 0!==t&&l!==u.assetList[t].identifier)){var h,f=u.findAssetIndex(c);if(this.log("INTERSTITIAL_ASSET_ENDED ".concat(f+1,"/").concat(u.assetList.length," ").concat(sd(c))),this.endedAsset=c,this.playingAsset=null,this.hls.trigger(cr.INTERSTITIAL_ASSET_ENDED,{asset:c,assetListIndex:f,event:u,schedule:n.slice(0),scheduleIndex:e,player:d}),a!==this.playingItem)return void(this.itemsMatch(a,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(u,this.findItemIndex(this.playingItem),f));this.retreiveMediaSource(l,r),d.media&&(null==(h=this.detachedData)||!h.mediaSource)&&d.detachMedia()}if(!this.eventItemsMatch(a,r)&&(this.endedItem=a,this.playingItem=null,this.log("INTERSTITIAL_ENDED ".concat(u," ").concat(ld(a))),u.hasPlayed=!0,this.hls.trigger(cr.INTERSTITIAL_ENDED,{event:u,schedule:n.slice(0),scheduleIndex:e}),u.cue.once)){var v;this.updateSchedule();var m=null==(v=this.schedule)?void 0:v.items;if(r&&m){var p=this.findItemIndex(r);this.advanceSchedule(p,m,t,a,o)}return}}this.advanceSchedule(e,n,t,a,o)}}},{key:"advanceSchedule",value:function(e,t,s,n,r){var o=this,a=this.schedule;if(a){var c=t[e]||null,l=this.primaryMedia,d=this.playerQueue;if(d.length&&d.forEach((function(u){var t=u.interstitial,n=a.findEventIndex(t.identifier);(n<e||n>e+1)&&o.clearInterstitial(t,c)})),this.isInterstitial(c)){this.timelinePos=Math.min(Math.max(this.timelinePos,c.start),c.end);var u=c.event;if(void 0===s){var h=od(u,(s=a.findAssetIndex(u,this.timelinePos))-1);if(u.isAssetPastPlayoutLimit(h)||u.appendInPlace&&this.timelinePos===c.end)return void this.advanceAfterAssetEnded(u,e,s);s=h}var f=this.waitingItem;this.assetsBuffered(c,l)||this.setBufferingItem(c);var v=this.preloadAssets(u,s);if(this.eventItemsMatch(c,f||n)||(this.waitingItem=c,this.log("INTERSTITIAL_STARTED ".concat(ld(c)," ").concat(u.appendInPlace?"append in place":"")),this.hls.trigger(cr.INTERSTITIAL_STARTED,{event:u,schedule:t.slice(0),scheduleIndex:e})),!u.assetListLoaded)return void this.log("Waiting for ASSET-LIST to complete loading ".concat(u));if(u.assetListLoader&&(u.assetListLoader.destroy(),u.assetListLoader=void 0),!l)return void this.log("Waiting for attachMedia to start Interstitial ".concat(u));this.waitingItem=this.endedItem=null,this.playingItem=c;var m=u.assetList[s];if(!m)return void this.advanceAfterAssetEnded(u,e,s||0);if(v||(v=this.getAssetPlayer(m.identifier)),null===v||v.destroyed){var y=u.assetList.length;this.warn("asset ".concat(s+1,"/").concat(y," player destroyed ").concat(u)),(v=this.createAssetPlayer(u,m,s)).loadSource()}if(!this.eventItemsMatch(c,this.bufferingItem)&&u.appendInPlace&&this.isAssetBuffered(m))return;this.startAssetPlayer(v,s,t,e,l),this.shouldPlay&&fd(v.media)}else c?(this.resumePrimary(c,e,n),this.shouldPlay&&fd(this.hls.media)):r&&this.isInterstitial(n)&&(this.endedItem=null,this.playingItem=n,n.event.appendInPlace||this.attachPrimary(a.durations.primary,null))}}},{key:"playbackDisabled",get:function(){return!1===this.hls.config.enableInterstitialPlayback}},{key:"primaryDetails",get:function(){var e;return null==(e=this.mediaSelection)?void 0:e.main.details}},{key:"primaryLive",get:function(){var e;return!(null==(e=this.primaryDetails)||!e.live)}},{key:"resumePrimary",value:function(e,t,s){var n,r;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log("resuming ".concat(ld(e))),null==(n=this.detachedData)||!n.mediaSource){var o=this.timelinePos;(o<e.start||o>=e.end)&&(o=this.getPrimaryResumption(e,t),this.log(pd("resumePrimary",o)),this.timelinePos=o),this.attachPrimary(o,e)}if(s){var a=null==(r=this.schedule)?void 0:r.items;a&&(this.log("INTERSTITIALS_PRIMARY_RESUMED ".concat(ld(e))),this.hls.trigger(cr.INTERSTITIALS_PRIMARY_RESUMED,{schedule:a.slice(0),scheduleIndex:t}),this.checkBuffer())}}},{key:"getPrimaryResumption",value:function(e,t){var s=e.start;if(this.primaryLive){var n=this.primaryDetails;if(0===t)return this.hls.startPosition;if(n&&(s<n.fragmentStart||s>n.edge))return this.hls.liveSyncPosition||-1}return s}},{key:"isAssetBuffered",value:function(e){var t=this.getAssetPlayer(e.identifier);return null!=t&&t.hls?t.hls.bufferedToEnd:uo.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}},{key:"attachPrimary",value:function(e,t,s){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;var n=this.primaryMedia;if(n){var r=this.hls;r.media?this.checkBuffer():(this.transferMediaTo(r,n),s&&this.startLoadingPrimaryAt(e,s)),s||(this.log(pd("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,s))}}},{key:"startLoadingPrimaryAt",value:function(e,t){var s,n=this.hls;!n.loadingEnabled||!n.media||Math.abs(((null==(s=n.mainForwardBufferInfo)?void 0:s.start)||n.media.currentTime)-e)>.5?n.startLoad(e,t):n.bufferingEnabled||n.resumeBuffering()}},{key:"onManifestLoading",value:function(){var e;this.stopLoad(),null==(e=this.schedule)||e.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(cr.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(cr.BUFFER_CODECS,this.onBufferCodecs,this)}},{key:"onLevelUpdated",value:function(e,t){if(-1!==t.level&&this.schedule){var s=this.hls.levels[t.level];if(s.details){var n=wr(wr({},this.mediaSelection||this.altSelection),{},{main:s});this.mediaSelection=n,this.schedule.parseInterstitialDateRanges(n,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}}}},{key:"onAudioTrackUpdated",value:function(e,t){var s=this.hls.audioTracks[t.id],n=this.mediaSelection;if(n){var r=wr(wr({},n),{},{audio:s});this.mediaSelection=r}else this.altSelection=wr(wr({},this.altSelection),{},{audio:s})}},{key:"onSubtitleTrackUpdated",value:function(e,t){var s=this.hls.subtitleTracks[t.id],n=this.mediaSelection;if(n){var r=wr(wr({},n),{},{subtitles:s});this.mediaSelection=r}else this.altSelection=wr(wr({},this.altSelection),{},{subtitles:s})}},{key:"onAudioTrackSwitching",value:function(e,t){var s=ua(t);this.playerQueue.forEach((function(e){var n=e.hls;return n&&(n.setAudioOption(t)||n.setAudioOption(s))}))}},{key:"onSubtitleTrackSwitch",value:function(e,t){var s=ua(t);this.playerQueue.forEach((function(e){var n=e.hls;return n&&(n.setSubtitleOption(t)||-1!==t.id&&n.setSubtitleOption(s))}))}},{key:"onBufferCodecs",value:function(e,t){var s=t.tracks;s&&(this.requiredTracks=s)}},{key:"onBufferAppended",value:function(e,t){this.checkBuffer()}},{key:"onBufferFlushed",value:function(e,t){var s=this.playingItem;if(s&&!this.itemsMatch(s,this.bufferingItem)&&!this.isInterstitial(s)){var n=this.timelinePos;this.bufferedPos=n,this.checkBuffer()}}},{key:"onBufferedToEnd",value:function(e){if(this.schedule){var t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(var n=0;n<t.length;n++){var r=t[n];if(r.cue.post){var s,a=this.schedule.findEventIndex(r.identifier),o=null==(s=this.schedule.items)?void 0:s[a];this.isInterstitial(o)&&this.eventItemsMatch(o,this.bufferingItem)&&this.bufferedToItem(o,0);break}}this.bufferedPos=Number.MAX_VALUE}}}},{key:"onMediaEnded",value:function(e){var t=this.playingItem;if(!this.playingLastItem&&t){var s=this.findItemIndex(t);this.setSchedulePosition(s+1)}else this.shouldPlay=!1}
2},{key:"updateItem",value:function(e,t){var s,n=null==(s=this.schedule)?void 0:s.items;return e&&n&&n[this.findItemIndex(e,t)]||null}},{key:"trimInPlace",value:function(e,t){var n=this;if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((function(t,a){e.event.isAssetPastPlayoutLimit(a)&&n.clearAssetPlayer(t.identifier,null)}));var s=e.end+.25,r=uo.bufferInfo(this.primaryMedia,s,0);(r.end>s||(r.nextStart||0)>s)&&(this.log("trim buffered interstitial ".concat(ld(e)," (was ").concat(ld(t),")")),this.attachPrimary(s,null,!0),this.flushFrontBuffer(s))}}},{key:"itemsMatch",value:function(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}},{key:"eventItemsMatch",value:function(e,t){var s;return!!t&&(e===t||e.event.identifier===(null==(s=t.event)?void 0:s.identifier))}},{key:"findItemIndex",value:function(e,t){return e&&this.schedule?this.schedule.findItemIndex(e,t):-1}},{key:"updateSchedule",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=this.mediaSelection;s&&(null==(e=this.schedule)||e.updateSchedule(s,[],t))}},{key:"checkBuffer",value:function(e){var t,s=null==(t=this.schedule)?void 0:t.items;if(s){var n=uo.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=n.len<1),this.updateBufferedPos(n.end,s,e)}}},{key:"updateBufferedPos",value:function(e,t,s){var n=this.schedule,r=this.bufferingItem;if(!(this.bufferedPos>e)&&n)if(1===t.length&&this.itemsMatch(t[0],r))this.bufferedPos=e;else{var a=this.playingItem,o=this.findItemIndex(a),c=n.findItemIndexAtTime(e);if(this.bufferedPos<e){var l,u=this.findItemIndex(r),d=Math.min(u+1,t.length-1),h=t[d];if((-1===c&&r&&e>=r.end||null!=(l=h.event)&&l.appendInPlace&&e+.01>=h.start)&&(c=d),this.isInterstitial(r)){var f=r.event;if(d-o>1&&!1===f.appendInPlace||0===f.assetList.length&&f.assetListLoader)return}if(this.bufferedPos=e,c>u&&c>o)this.bufferedToItem(h);else{var v=this.primaryDetails;this.primaryLive&&v&&e>v.edge-v.targetduration&&h.start<v.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(h)&&this.preloadAssets(h.event,0)}}else s&&a&&!this.itemsMatch(a,r)&&(c===o?this.bufferedToItem(a):c===o+1&&this.bufferedToItem(t[c]))}}},{key:"assetsBuffered",value:function(e,t){var n=this;return 0!==e.event.assetList.length&&!e.event.assetList.some((function(e){var r=n.getAssetPlayer(e.identifier);return!(null!=r&&r.bufferedInPlaceToEnd(t))}))}},{key:"setBufferingItem",value:function(e){var t=this,n=this.bufferingItem,s=this.schedule;if(!this.itemsMatch(e,n)&&s){var r=s.items,o=s.events;if(!r||!o)return n;var a=this.isInterstitial(e),c=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));var l=c?c.remaining:n?n.end-this.timelinePos:0;if(this.log("INTERSTITIALS_BUFFERED_TO_BOUNDARY ".concat(ld(e))+(n?" (".concat(l.toFixed(2)," remaining)"):"")),!this.playbackDisabled)if(a){var d=s.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((function(u,e){var n=t.getAssetPlayer(u.identifier);n&&(e===d&&n.loadSource(),n.resumeBuffering())}))}else this.hls.resumeBuffering(),this.playerQueue.forEach((function(e){return e.pauseBuffering()}));this.hls.trigger(cr.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:o.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);return n}},{key:"bufferedToItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=this.setBufferingItem(e);if(!this.playbackDisabled)if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(null!==s){this.bufferingAsset=null;var n=this.detachedData;n&&n.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e)}}},{key:"preloadPrimary",value:function(e){var t=this.findItemIndex(e),s=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(s)}},{key:"bufferedToEvent",value:function(e,t){var s=e.event,n=0===s.assetList.length&&!s.assetListLoader,r=s.cue.once;if(n||!r){var a=this.preloadAssets(s,t);if(null!=a&&a.interstitial.appendInPlace){var o=this.primaryMedia;o&&this.bufferAssetPlayer(a,o)}}}},{key:"preloadAssets",value:function(e,t){var s=e.assetUrl,n=e.assetList.length,r=0===n&&!e.assetListLoader,a=e.cue.once;if(r){var o=e.timelineStart;if(e.appendInPlace){var c,l=this.playingItem;!this.isInterstitial(l)&&(null==l||null==(c=l.nextEvent)?void 0:c.identifier)===e.identifier&&this.flushFrontBuffer(o+.25)}var d,u=0;if(!this.playingItem&&this.primaryLive&&(-1===(u=this.hls.startPosition)&&(u=this.hls.liveSyncPosition||0)),u&&!e.cue.pre&&!e.cue.post){var h=u-o;h>0&&(d=Math.round(1e3*h)/1e3)}if(this.log("Load interstitial asset ".concat(t+1,"/").concat(s?1:n," ").concat(e).concat(d?" live-start: ".concat(u," start-offset: ").concat(d):"")),s)return this.createAsset(e,0,0,o,e.duration,s);var f=this.assetListLoader.loadAssetList(e,d);f&&(e.assetListLoader=f)}else if(!a&&n){for(var v=t;v<n;v++){var m=e.assetList[v],y=this.getAssetPlayerQueueIndex(m.identifier);(-1===y||this.playerQueue[y].destroyed)&&!m.error&&this.createAssetPlayer(e,m,v)}var E=e.assetList[t];if(E){var _=this.getAssetPlayer(E.identifier);return _&&_.loadSource(),_}}return null}},{key:"flushFrontBuffer",value:function(e){var t=this,n=this.requiredTracks;n&&(this.log("Removing front buffer starting at ".concat(e)),Object.keys(n).forEac
2h((function(n){t.hls.trigger(cr.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:n})})))}},{key:"getAssetPlayerQueueIndex",value:function(e){for(var t=this.playerQueue,s=0;s<t.length;s++)if(e===t[s].assetId)return s;return-1}},{key:"getAssetPlayer",value:function(e){var t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}},{key:"getBufferingPlayer",value:function(){var e=this.playerQueue,t=this.primaryMedia;if(t)for(var s=0;s<e.length;s++)if(e[s].media===t)return e[s];return null}},{key:"createAsset",value:function(e,t,s,n,r,a){var o={parentIdentifier:e.identifier,identifier:nd(e,a,t),duration:r,startOffset:s,timelineStart:n,uri:a};return this.createAssetPlayer(e,o,t)}},{key:"createAssetPlayer",value:function(e,t,s){var n=this,r=this.hls,o=r.userConfig,a=o.videoPreference,c=r.loadLevelObj||r.levels[r.currentLevel];(a||c)&&(a=kr({},a),c.videoCodec&&(a.videoCodec=c.videoCodec),c.videoRange&&(a.allowedVideoRanges=[c.videoRange]));var l=r.audioTracks[r.audioTrack],d=r.subtitleTracks[r.subtitleTrack],u=0;if(this.primaryLive||e.appendInPlace){var b=this.timelinePos-t.timelineStart;if(b>1){var h=t.duration;h&&b<h&&(u=b)}}var f=t.identifier,v=wr(wr({},o),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:f,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:u,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:a,audioPreference:l||o.audioPreference,subtitlePreference:d||o.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(v.timelineOffset=t.timelineStart));var m=v.cmcd;null!=m&&m.sessionId&&m.contentId&&(v.cmcd=kr({},m,{contentId:Jl(t.uri)})),this.getAssetPlayer(f)&&this.warn("Duplicate date range identifier ".concat(e," and asset ").concat(f));var y=new ud(this.HlsPlayerClass,v,e,t);this.playerQueue.push(y),e.assetList[s]=t;var p=!0,g=function(b){if(b.live){var r,o=new Error("Interstitials MUST be VOD assets ".concat(e)),c={fatal:!0,type:sr.OTHER_ERROR,details:ur.INTERSTITIAL_ASSET_ITEM_ERROR,error:o},l=(null==(r=n.schedule)?void 0:r.findEventIndex(e.identifier))||-1;n.handleAssetItemError(c,e,l,s,o.message)}else{var d=b.edge-b.fragmentStart,h=t.duration;(p||null===h||d>h)&&(p=!1,n.log('Interstitial asset "'.concat(f,'" duration change ').concat(h," > ").concat(d)),t.duration=d,n.updateSchedule())}};y.on(cr.LEVEL_UPDATED,(function(b,e){var t=e.details;return g(t)})),y.on(cr.LEVEL_PTS_UPDATED,(function(b,e){var t=e.details;return g(t)})),y.on(cr.EVENT_CUE_ENTER,(function(){return n.onInterstitialCueEnter()}));y.on(cr.BUFFER_CODECS,(function e(b,t){var r=n.getAssetPlayer(f);if(r&&t.tracks){r.off(cr.BUFFER_CODECS,e),r.tracks=t.tracks;var o=n.primaryMedia;n.bufferingAsset===r.assetItem&&o&&!r.media&&n.bufferAssetPlayer(r,o)}}));y.on(cr.BUFFERED_TO_END,(function(){var b,r=n.getAssetPlayer(f);if(n.log("buffered to end of asset ".concat(r)),r&&n.schedule){var o=n.schedule.findEventIndex(e.identifier),c=null==(b=n.schedule.items)?void 0:b[o];n.isInterstitial(c)&&n.advanceAssetBuffering(c,t)}}));var E=function(b){return function(){if(n.getAssetPlayer(f)&&n.schedule){n.shouldPlay=!0;var t=n.schedule.findEventIndex(e.identifier);n.advanceAfterAssetEnded(e,t,b)}}};return y.once(cr.MEDIA_ENDED,E(s)),y.once(cr.PLAYOUT_LIMIT_REACHED,E(1/0)),y.on(cr.ERROR,(function(b,t){if(n.schedule){var r=n.getAssetPlayer(f);if(t.details===ur.BUFFER_STALLED_ERROR)return null!=r&&r.appendInPlace?void n.handleInPlaceStall(e):(n.onTimeupdate(),void n.checkBuffer(!0));n.handleAssetItemError(t,e,n.schedule.findEventIndex(e.identifier),s,"Asset player error ".concat(t.error," ").concat(e))}})),y.on(cr.DESTROYING,(function(){if(n.getAssetPlayer(f)&&n.schedule){var t=new Error("Asset player destroyed unexpectedly ".concat(f)),r={fatal:!0,type:sr.OTHER_ERROR,details:ur.INTERSTITIAL_ASSET_ITEM_ERROR,error:t};n.handleAssetItemError(r,e,n.schedule.findEventIndex(e.identifier),s,t.message)}})),this.log("INTERSTITIAL_ASSET_PLAYER_CREATED ".concat(sd(t))),this.hls.trigger(cr.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:s,event:e,player:y}),y}},{key:"clearInterstitial",value:function(e,t){this.clearAssetPlayers(e,t),e.reset()}},{key:"clearAssetPlayers",value:function(e,t){var n=this;e.assetList.forEach((function(s){n.clearAssetPlayer(s.identifier,t)}))}},{key:"resetAssetPlayer",value:function(e){var t=this.getAssetPlayerQueueIndex(e);if(-1!==t){this.log('reset asset player "'.concat(e,'" after error'));var s=this.playerQueue[t];this.transferMediaFromPlayer(s,null),s.resetDetails()}}},{key:"clearAssetPlayer",value:function(e,t){var s=this.getAssetPlayerQueueIndex(e);if(-1!==s){var n=this.playerQueue[s];this.log("clear ".concat(n," toSegment: ").concat(t&&ld(t))),this.transferMediaFromPlayer(n,t),this.playerQueue.splice(s,1),n.destroy()}}},{key:"emptyPlayerQueue",value:function(){for(var e;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}},{key:"startAssetPlayer",value:function(e,t,s,n,r){var a=e.interstitial,o=e.assetItem,c=e.assetId,l=a.assetList.length,u=this.playingAsset;this.endedAsset=null,this.playingAsset=o,(!u||u.identifier!==c)&&(u&&(this.clearAssetPlayer(u.identifier,s[n]),delete u.error),this.log("INTERSTITIAL_ASSET_STARTED ".concat(t+1,"/").concat(l," ").concat(sd(o))),this.hls.trigger(cr.INTERSTITIAL_ASSET_STARTED,{asset:o,assetListIndex:t,event:a,schedule:s.slice(0),scheduleIndex:n,player:e})),this.bufferAssetPlayer(e,r)}},{key:"bufferAssetPlayer",value:function(e,t){var s,n;if(this.schedule){var r=e.interstitial,a=e.assetItem,o=this.schedule.findEventIndex(r.identifier),c=null==(s=this.schedule.items)?void 0:s[o];if(c){e.loadSource(),this.setBufferingItem(c),this.bufferingAsset=a;
2var l=this.getBufferingPlayer();if(l!==e){var u=r.appendInPlace;if(!u||!1!==(null==l?void 0:l.interstitial.appendInPlace)){var d=(null==l?void 0:l.tracks)||(null==(n=this.detachedData)?void 0:n.tracks)||this.requiredTracks;if(u&&a!==this.playingAsset){if(!e.tracks)return void this.log("Waiting for track info before buffering ".concat(e));if(d&&!Mr(d,e.tracks)){var h=new Error("Asset ".concat(sd(a)," SourceBuffer tracks ('").concat(Object.keys(e.tracks),"') are not compatible with primary content tracks ('").concat(Object.keys(d),"')")),f={fatal:!0,type:sr.OTHER_ERROR,details:ur.INTERSTITIAL_ASSET_ITEM_ERROR,error:h},v=r.findAssetIndex(a);return void this.handleAssetItemError(f,r,o,v,h.message)}}this.transferMediaTo(e,t)}}}}}},{key:"handleInPlaceStall",value:function(e){var t=this.schedule,s=this.primaryMedia;if(t&&s){var n=s.currentTime,r=t.findAssetIndex(e,n),a=e.assetList[r];if(a){var o=this.getAssetPlayer(a.identifier);if(o){var c=o.currentTime||n-a.timelineStart,l=o.duration-c;if(this.warn("Stalled at ".concat(c," of ").concat(c+l," in ").concat(o," ").concat(e," (media.currentTime: ").concat(n,")")),c&&(l/s.playbackRate<.5||o.bufferedInPlaceToEnd(s))&&o.hls){var u=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,u,r)}}}}}},{key:"advanceInPlace",value:function(e){var t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}},{key:"handleAssetItemError",value:function(e,t,s,n,r){if(e.details!==ur.BUFFER_STALLED_ERROR){var a=t.assetList[n]||null;if(this.warn("INTERSTITIAL_ASSET_ERROR ".concat(a&&sd(a)," ").concat(e.error)),this.schedule){var o=(null==a?void 0:a.identifier)||"",c=this.getAssetPlayerQueueIndex(o),l=this.playerQueue[c]||null,u=this.schedule.items,d=kr({},e,{fatal:!1,errorAction:Fa(!0),asset:a,assetListIndex:n,event:t,schedule:u,scheduleIndex:s,player:l});if(this.hls.trigger(cr.INTERSTITIAL_ASSET_ERROR,d),e.fatal){var h=this.playingAsset,f=this.bufferingAsset,v=new Error(r);if(a&&(this.clearAssetPlayer(o,null),a.error=v),t.assetList.some((function(p){return!p.error})))for(var p=n;p<t.assetList.length;p++)this.resetAssetPlayer(t.assetList[p].identifier);else t.error=v;this.updateSchedule(!0),t.error?this.primaryFallback(t):h&&h.identifier===o?this.advanceAfterAssetEnded(t,s,n):f&&f.identifier===o&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,f)}}}}},{key:"primaryFallback",value:function(e){var t=e.timelineStart,s=this.effectivePlayingItem,n=this.timelinePos;if(s){this.log('Fallback to primary from event "'.concat(e.identifier,'" start: ').concat(t," pos: ").concat(n," playing: ").concat(ld(s)," error: ").concat(e.error)),-1===n&&(n=this.hls.startPosition);var a=this.updateItem(s,n);this.itemsMatch(s,a)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t))}else if(-1===n)return void this.checkStart();if(this.schedule){var r=this.schedule.findItemIndexAtTime(n);this.setSchedulePosition(r)}}},{key:"onAssetListLoaded",value:function(e,t){var s,n,r=this,o=t.event,a=o.identifier,c=t.assetListResponse.ASSETS;if(null!=(s=this.schedule)&&s.hasEvent(a)){var l=o.timelineStart,d=o.duration,u=0;c.forEach((function(p,g){var e=parseFloat(p.DURATION);r.createAsset(o,g,u,l+u,e,p.URI),u+=e})),o.duration=u,this.log("Loaded asset-list with duration: ".concat(u," (was: ").concat(d,") ").concat(o));var h=this.waitingItem,f=(null==h?void 0:h.event.identifier)===a;this.updateSchedule();var v=null==(n=this.bufferingItem)?void 0:n.event;if(f){var m,p=this.schedule.findEventIndex(a),g=null==(m=this.schedule.items)?void 0:m[p];if(g){if(!this.playingItem&&this.timelinePos>g.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==p)return o.error=new Error("Interstitial ".concat(c.length?"no longer within playback range":"asset-list is empty"," ").concat(this.timelinePos," ").concat(o)),this.log(o.error.message),this.updateSchedule(!0),void this.primaryFallback(o);this.setBufferingItem(g)}this.setSchedulePosition(p)}else if((null==v?void 0:v.identifier)===a){var y=o.assetList[0];if(y){var E=this.getAssetPlayer(y.identifier);if(v.appendInPlace){var _=this.primaryMedia;E&&_&&this.bufferAssetPlayer(E,_)}else E&&E.loadSource()}}}}},{key:"onError",value:function(e,t){if(this.schedule)switch(t.details){case ur.ASSET_LIST_PARSING_ERROR:case ur.ASSET_LIST_LOAD_ERROR:case ur.ASSET_LIST_LOAD_TIMEOUT:var s=t.interstitial;s&&(this.updateSchedule(!0),this.primaryFallback(s));break;case ur.BUFFER_STALLED_ERROR:var n=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&n.event.appendInPlace)return void this.handleInPlaceStall(n.event);this.log("Primary player stall @".concat(this.timelinePos," bufferedPos: ").concat(this.bufferedPos)),this.onTimeupdate(),this.checkBuffer(!0)}}}]),n}(Sr),md=function(e){T(n,e);var t=P(n);function n(e,r,s){var o;
vendor: 17,358 bytes, line 2
2return A(this,n),(o=t.call(this,e,r,s,"subtitle-stream-controller",gr)).currentTrackId=-1,o.tracksBuffered=[],o.mainDetails=null,o.registerListeners(),o}return I(n,[{key:"onHandlerDestroying",value:function(){this.unregisterListeners(),y(S(n.prototype),"onHandlerDestroying",this).call(this),this.mainDetails=null}},{key:"registerListeners",value:function(){y(S(n.prototype),"registerListeners",this).call(this);var e=this.hls;e.on(cr.LEVEL_LOADED,this.onLevelLoaded,this),e.on(cr.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(cr.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(cr.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(cr.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(cr.BUFFER_FLUSHING,this.onBufferFlushing,this)}},{key:"unregisterListeners",value:function(){y(S(n.prototype),"unregisterListeners",this).call(this);var e=this.hls;e.off(cr.LEVEL_LOADED,this.onLevelLoaded,this),e.off(cr.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(cr.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(cr.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(cr.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(cr.BUFFER_FLUSHING,this.onBufferFlushing,this)}},{key:"startLoad",value:function(e,t){this.stopLoad(),this.state=Os,this.setInterval(500),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}},{key:"onManifestLoading",value:function(){y(S(n.prototype),"onManifestLoading",this).call(this),this.mainDetails=null}},{key:"onMediaDetaching",value:function(e,t){this.tracksBuffered=[],y(S(n.prototype),"onMediaDetaching",this).call(this,e,t)}},{key:"onLevelLoaded",value:function(e,t){this.mainDetails=t.details}},{key:"onSubtitleFragProcessed",value:function(e,t){var s=t.frag,n=t.success;if(this.fragContextChanged(s)||(Kr(s)&&(this.fragPrevious=s),this.state=Os),n){var r=this.tracksBuffered[this.currentTrackId];if(r){for(var a,o=s.start,c=0;c<r.length;c++)if(o>=r[c].start&&o<=r[c].end){a=r[c];break}var l=s.start+s.duration;a?a.end=l:(a={start:o,end:l},r.push(a)),this.fragmentTracker.fragBuffered(s),this.fragBufferedComplete(s,null),this.media&&this.tick()}}}},{key:"onBufferFlushing",value:function(e,t){var s=t.startOffset,n=t.endOffset;if(0===s&&n!==Number.POSITIVE_INFINITY){var r=n-1;if(r<=0)return;t.endOffsetSubtitles=Math.max(0,r),this.tracksBuffered.forEach((function(a){for(var e=0;e<a.length;)if(a[e].end<=r)a.shift();else{if(!(a[e].start<r))break;a[e].start=r,e++}})),this.fragmentTracker.removeFragmentsInRange(s,r,gr)}}},{key:"onError",value:function(e,t){var s=t.frag;(null==s?void 0:s.type)===gr&&(t.details===ur.FRAG_GAP&&this.fragmentTracker.fragBuffered(s,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Rs&&(this.state=Os))}},{key:"onSubtitleTracksUpdated",value:function(e,t){var n=this,r=t.subtitleTracks;this.levels&&Tc(this.levels,r)?this.levels=r.map((function(s){return new na(s)})):(this.tracksBuffered=[],this.levels=r.map((function(s){var e=new na(s);return n.tracksBuffered[e.id]=[],e})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,gr),this.fragPrevious=null,this.mediaBuffer=null)}},{key:"onSubtitleTrackSwitch",value:function(e,t){var s;if(this.currentTrackId=t.id,null!=(s=this.levels)&&s.length&&-1!==this.currentTrackId){var n=this.levels[this.currentTrackId];null!=n&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.state!==Rs&&this.setInterval(500)}else this.clearInterval()}},{key:"onSubtitleTrackLoaded",value:function(e,t){var s,n=this.currentTrackId,r=this.levels,a=t.details,o=t.id;if(r){var c=r[o];if(!(o>=r.length)&&c){this.log("Subtitle track ".concat(o," loaded [").concat(a.startSN,",").concat(a.endSN,"]").concat(a.lastPartSn?"[part-".concat(a.lastPartSn,"-").concat(a.lastPartIndex,"]"):"",",duration:").concat(a.totalduration)),this.mediaBuffer=this.mediaBufferTimeRanges;var l=0;if(a.live||null!=(s=c.details)&&s.live){if(a.deltaUpdateFailed)return;var d=this.mainDetails;if(!d)return void(this.startFragRequested=!1);var u,h=d.fragments[0];if(c.details)0===(l=this.alignPlaylists(a,c.details,null==(u=this.levelLastLoaded)?void 0:u.details))&&h&&hs(a,l=h.start);else a.hasProgramDateTime&&d.hasProgramDateTime?(ws(a,d),l=a.fragmentStart):h&&hs(a,l=h.start);d&&!this.startFragRequested&&this.setStartPosition(d,l)}c.details=a,this.levelLastLoaded=c,o===n&&(this.hls.trigger(cr.SUBTITLE_TRACK_UPDATED,{details:a,id:o,groupId:t.groupId}),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===Os&&(ma(null,a.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),c.details=void 0)))}}else this.warn("Subtitle tracks were reset while loading level ".concat(o))}},{key:"_handleFragmentLoadComplete",value:function(e){var t=this,n=e.frag,s=e.payload,r=n.decryptdata,o=this.hls;if(!this.fragContextChanged(n)&&s&&s.byteLength>0&&null!=r&&r.key&&r.iv&&wo(r.method)){var a=performance.now();this.decrypter.decrypt(new Uint8Array(s),r.key.buffer,r.iv.buffer,So(r.method)).catch((function(e){throw o.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:n}),e})).then((function(e){var t=performance.now();o.trigger(cr.FRAG_DECRYPTED,{frag:n,payload:e,stats:{tstart:a,tdecrypt:t}})})).catch((function(e){t.warn("".concat(e.name,": ").concat(e.message)),t.state=Os}))}}},{key:"doTick",value:function(){if(this.media){if(this.state===Os){var e=this.currentTrackId,t=this.levels,s=null==t?void 0:t[e];if(!s||!t.length||!s.details||this.waitForLive(s))return;var n=this.config,r=this.getLoadPosition(),a=uo.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],r,n.maxBufferHole),o=a.end,c=a.len,l=s.details;if(c>this.hls.maxBufferLength+l.levelTargetDuration)return;var d=l.fragments,h=d.length,f=l.edge,v=null,p=this.fragPrevious;if(o<f){var m=n.maxFragLookUpTolerance,y=o>f-m?0:m;!(v=ma(p,d,Math.max(d[0].start,o),y))&&p&&p.start<d[0].start&&(v=d[0])}else v=d[h-1];if(!(v=this.filterReplacedPrimary(v,s.details)))return;var E=d[v.sn-l.startSN-1];if(E&&E.cc===v.cc&&this.fragmentTracker.getState(E)===Ba&&(v=E),this.fragmentTracker.getState(v)===Ba){var _=this.mapToInitFragWhenRequired(v);_&&this.loadFragment(_,s,o)}}}else this.state=Os}},{key:"loadFragment",value:function(e,t,s){Kr(e)?y(S(n.prototype),"loadFragment",this).call(this,e,t,s):this._loadInitSegment(e,t)}},{key:"mediaBufferTimeRanges",get:function(){return new gd(this.tracksBuffered[this.currentTrackId]||[])}}]),n}(js),gd=I((function e(t){A(this,e),this.buffered=void 0;var n=function(s,e,n){if((e>>>=0)>n-1)throw new DOMException("Failed to execute '".concat(s,"' on 'TimeRanges': The index provided (").concat(e,") is greater than the maximum bound (").concat(n,")"));return t[e][s]};this.buffered={get length(){return t.length},end:function(s){return n("end",s,t.length)},start:function(s){return n("start",s,t.length)}}})),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},bd=function(i){return String.fromCharCode(yd[i]||i)},Ed=15,_d=100,kd={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Td={17:2,18:4,21:6,22:8,23:10,19:13,20:15},wd={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Sd={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ad=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Id=function(){function e(){A(this,e),this.time=null,this.verboseLevel=0}return I(e,[{key:"log",value:function(e,t){if(this.verboseLevel>=e){var s="function"==typeof t?t():t;xr.log("".concat(this.time," [").concat(e,"] ").concat(s))}}}]),e}(),Rd=function(e){for(var t=[],s=0;s<e.length;s++)t.push(e[s].toString(16));return t},Od=function(){function e(){A(this,e),this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}return I(e,[{key:"reset",value:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}},{key:"setStyles",value:function(e){for(var t=["foreground","underline","italics","background","flash"],s=0;s<t.length;s++){var n=t[s];e.hasOwnProperty(n)&&(this[n]=e[n])}}},{key:"isDefault",value:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}},{key:"equals",value:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}},{key:"copy",value:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}},{key:"toString",value:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}]),e}(),Ld=function(){function e(){A(this,e),this.uchar=" ",this.penState=new Od}return I(e,[{key:"reset",value:function(){this.uchar=" ",this.penState.reset()}},{key:"setChar",value:function(e,t){this.uchar=e,this.penState.copy(t)}},{key:"setPenState",value:function(e){this.penState.copy(e)}},{key:"equals",value:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}},{key:"copy",value:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)}},{key:"isEmpty",value:function(){return" "===this.uchar&&this.penState.isDefault()}}]),e}(),Dd=function(){function e(t){A(this,e),this.chars=[],this.pos=0,this.currPenState=new Od,this.cueStartTime=null,this.logger=void 0;for(var n=0;n<_d;n++)this.chars.push(new Ld);this.logger=t}return I(e,[{key:"equals",value:function(e){for(var t=0;t<_d;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}},{key:"copy",value:function(e){for(var t=0;t<_d;t++)this.chars[t].copy(e.chars[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<_d;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}},{key:"setCursor",value:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>_d&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=_d)}},{key:"moveCursor",value:function(e){var t=this.pos+e;if(e>1)for(var s=this.pos+1;s<t+1;s++)this.chars[s].setPenState(this.currPenState);this.setCursor(t)}},{key:"backSpace",value:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}},{key:"insertChar",value:function(e){var t=this;e>=144&&this.backSpace();var n=bd(e);this.pos>=_d?this.logger.log(0,(function(){return"Cannot insert "+e.toString(16)+" ("+n+") at position "+t.pos+". Skipping it!"})):(this.chars[this.pos].setChar(n,this.currPenState),this.moveCursor(1))}},{key:"clearFromPos",value:function(e){var t;for(t=e;t<_d;t++)this.chars[t].reset()}},{key:"clear",value:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}},{key:"clearToEndOfRow",value:function(){this.clearFromPos(this.pos)}},{key:"getTextString",value:function(){for(var e=[],t=!0,s=0;s<_d;s++){var n=this.chars[s].uchar;" "!==n&&(t=!1),e.push(n)}return t?"":e.join("")}},{key:"setPenStyles",value:function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}]),e}(),xd=function(){function e(t){A(this,e),this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(var n=0;n<Ed;n++)this.rows.push(new Dd(t));this.logger=t}return I(e,[{key:"reset",value:function(){for(var e=0;e<Ed;e++)this.rows[e].clear();this.currRow=14}},{key:"equals",value:function(e){for(var t=!0,s=0;s<Ed;s++)if(!this.rows[s].equals(e.rows[s])){t=!1;break}return t}},{key:"copy",value:function(e){for(var t=0;t<Ed;t++)this.rows[t].copy(e.rows[t])}},{key:"isEmpty",value:function(){for(var e=!0,t=0;t<Ed;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}},{key:"backSpace",value:function(){this.rows[this.currRow].backSpace()}},{key:"clearToEndOfRow",value:function(){this.rows[this.currRow].clearToEndOfRow()}},{key:"insertChar",value:function(e){this.rows[this.currRow].insertChar(e)}},{key:"setPen",value:function(e){this.rows[this.currRow].setPenStyles(e)}},{key:"moveCursor",value:function(e){this.rows[this.currRow].moveCursor(e)}},{key:"setCursor",value:function(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}},{key:"setPAC",value:function(e){this.logger.log(2,(function(){return"pacData = "+aa(e)}));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<Ed;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){var o=a.rows[r].cueStartTime,c=this.logger.time;if(null!==o&&null!==c&&o<c)for(var l=0;l<this.nrRollUpRows;l++)this.rows[t-this.nrRollUpRows+l+1].copy(a.rows[r+l])}}this.currRow=t;var s=this.rows[this.currRow];if(null!==e.indent){var d=e.indent,h=Math.max(d-1,0);s.setCursor(e.indent),e.color=s.chars[h].penState.foreground}var f={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(f)}},{key:"setBkgData",value:function(e){this.logger.log(2,(function(){return"bkgData = "+aa(e)})),this.backSpace(),this.setPen(e),this.insertChar(32)}},{key:"setRollUpRows",value:function(e){this.nrRollUpRows=e}},{key:"rollUp",value:function(){var e=this;if(null!==this.nrRollUpRows){this.logger.log(1,(function(){return e.getDisplayText()}));var t=this.currRow+1-this.nrRollUpRows,n=this.rows.splice(t,1)[0];n.clear(),this.rows.splice(this.currRow,0,n),this.logger.log(2,"Rolling up")}else this.logger.log(3,"roll_up but nrRollUpRows not set yet")}},{key:"getDisplayText",value:function(e){e=e||!1;for(var t=[],s="",n=-1,r=0;r<Ed;r++){var a=this.rows[r].getTextString();a&&(n=r+1,e?t.push("Row "+n+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(s=e?"["+t.join(" | ")+"]":t.join("\n")),s}},{key:"getTextAndFormat",value:function(){return this.rows}}]),e}(),Cd=function(){function e(t,n,s){A(this,e),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.logger=void 0,this.chNr=t,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new xd(s),this.nonDisplayedMemory=new xd(s),this.lastOutputScreen=new xd(s),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=s}return I(e,[{key:"reset",value:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}},{key:"getHandler",value:function(){return this.outputFilter}},{key:"setHandler",value:function(e){this.outputFilter=e}},{key:"setPAC",value:function(e){this.writeScreen.setPAC(e)}},{key:"setBkgData",value:function(e){this.writeScreen.setBkgData(e)}},{key:"setMode",value:function(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(function(){return"MODE="+e})),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}},{key:"insertChars",value:function(e){for(var t=this,s=0;s<e.length;s++)this.writeScreen.insertChar(e[s]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(function(){return n+": "+t.writeScreen.getDisplayText(!0)})),("MODE_PAINT-ON"===this.mode||"MODE_ROLL-UP"===this.mode)&&(this.logger.log(1,(function(){return"DISPLAYED: "+t.displayedMemory.getDisplayText(!0)})),this.outputDataUpdate())}},{key:"ccRCL",value:function(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}},{key:"ccBS",value:function(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}},{key:"ccAOF",value:function(){}},{key:"ccAON",value:function(){}},{key:"ccDER",value:function(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}},{key:"ccRU",value:function(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}},{key:"ccFON",value:function(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}},{key:"ccRDC",value:function(){this.logger.log(2,"RDC - Resume Direct 
2Captioning"),this.setMode("MODE_PAINT-ON")}},{key:"ccTR",value:function(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}},{key:"ccRTD",value:function(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}},{key:"ccEDM",value:function(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}},{key:"ccCR",value:function(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}},{key:"ccENM",value:function(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}},{key:"ccEOC",value:function(){var e=this;if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(function(){return"DISP: "+e.displayedMemory.getDisplayText()}))}this.outputDataUpdate(!0)}},{key:"ccTO",value:function(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}},{key:"ccMIDROW",value:function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var s=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][s]}this.logger.log(2,"MIDROW: "+aa(t)),this.writeScreen.setPen(t)}},{key:"outputDataUpdate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}},{key:"cueSplitAtTime",value:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}]),e}(),Md=function(){function e(t,n,s){A(this,e),this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;var r=this.logger=new Id;this.channels=[null,new Cd(t,n,r),new Cd(t+1,s,r)]}return I(e,[{key:"getHandler",value:function(e){return this.channels[e].getHandler()}},{key:"setHandler",value:function(e,t){this.channels[e].setHandler(t)}},{key:"addData",value:function(e,t){var n=this;this.logger.time=e;for(var r=function(s){var e=127&t[s],r=127&t[s+1],a=!1,o=null;if(0===e&&0===r)return"continue";n.logger.log(3,(function(){return"["+Rd([t[s],t[s+1]])+"] -> ("+Rd([e,r])+")"}));var c=n.cmdHistory;if(e>=16&&e<=31){if(function(i,e,t){return t.a===i&&t.b===e}(e,r,c))return Pd(null,null,c),n.logger.log(3,(function(){return"Repeated command ("+Rd([e,r])+") is dropped"})),"continue";Pd(e,r,n.cmdHistory),(a=n.parseCmd(e,r))||(a=n.parseMidrow(e,r)),a||(a=n.parsePAC(e,r)),a||(a=n.parseBackgroundAttributes(e,r))}else Pd(null,null,c);if(!a&&(o=n.parseChars(e,r))){var u=n.currentChannel;u&&u>0?n.channels[u].insertChars(o):n.logger.log(2,"No channel found yet. TEXT-MODE?")}!a&&!o&&n.logger.log(2,(function(){return"Couldn't parse cleaned data "+Rd([e,r])+" orig: "+Rd([t[s],t[s+1]])}))},s=0;s<t.length;s+=2)r(s)}},{key:"parseCmd",value:function(e,t){if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=33&&t<=35))return!1;var n=20===e||21===e||23===e?1:2,a=this.channels[n];return 20===e||21===e||28===e||29===e?32===t?a.ccRCL():33===t?a.ccBS():34===t?a.ccAOF():35===t?a.ccAON():36===t?a.ccDER():37===t?a.ccRU(2):38===t?a.ccRU(3):39===t?a.ccRU(4):40===t?a.ccFON():41===t?a.ccRDC():42===t?a.ccTR():43===t?a.ccRTD():44===t?a.ccEDM():45===t?a.ccCR():46===t?a.ccENM():47===t&&a.ccEOC():a.ccTO(t-32),this.currentChannel=n,!0}},{key:"parseMidrow",value:function(e,t){var s=0;if((17===e||25===e)&&t>=32&&t<=47){if((s=17===e?1:2)!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;var n=this.channels[s];return!!n&&(n.ccMIDROW(t),this.logger.log(3,(function(){return"MIDROW ("+Rd([e,t])+")"})),!0)}return!1}},{key:"parsePAC",value:function(e,t){var s;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127)&&!((16===e||24===e)&&t>=64&&t<=95))return!1;var a=e<=23?1:2;s=t>=64&&t<=95?1===a?kd[e]:wd[e]:1===a?Td[e]:Sd[e];var n=this.channels[a];return!!n&&(n.setPAC(this.interpretPAC(s,t)),this.currentChannel=a,!0)}},{key:"interpretPAC",value:function(e,t){var s,n={color:null,italics:!1,indent:null,underline:!1,row:e};return s=t>95?t-96:t-64,n.underline=1==(1&s),s<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(s/2)]:s<=15?(n.italics=!0,n.color="white"):n.indent=4*Math.floor((s-16)/2),n}},{key:"parseChars",value:function(e,t){var s,a,n=null,r=null;(e>=25?(s=2,r=e-8):(s=1,r=e),r>=17&&r<=19)?(a=17===r?t+80:18===r?t+112:t+144,this.logger.log(2,(function(){return"Special char '"+bd(a)+"' in channel "+s})),n=[a]):e>=32&&e<=127&&(n=0===t?[e]:[e,t]);return n&&this.logger.log(3,(function(){return"Char codes =  "+Rd(n).join(",")})),n}}
vendor: 43,516 bytes, line 2
2,{key:"parseBackgroundAttributes",value:function(e,t){if(!((16===e||24===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=45&&t<=47))return!1;var n,a={};16===e||24===e?(n=Math.floor((t-32)/2),a.background=Ad[n],t%2==1&&(a.background=a.background+"_semi")):45===t?a.background="transparent":(a.foreground="black",47===t&&(a.underline=!0));var r=e<=23?1:2;return this.channels[r].setBkgData(a),!0}},{key:"reset",value:function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}Pd(null,null,this.cmdHistory)}},{key:"cueSplitAtTime",value:function(e){for(var t=0;t<this.channels.length;t++){var s=this.channels[t];s&&s.cueSplitAtTime(e)}}}]),e}();function Pd(i,e,t){t.a=i,t.b=e}var Nd=function(){if(null!=Lo&&Lo.VTTCue)return self.VTTCue;var i=["","lr","rl"],e=["start","middle","end","left","right"];function t(e,t){if("string"!=typeof t||!Array.isArray(e))return!1;var n=t.toLowerCase();return!!~e.indexOf(n)&&n}function n(n){return t(e,n)}function r(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=1;o<arguments.length;o++){var u=arguments[o];for(var c in u)e[c]=u[c]}return e}function a(e,o,c){var u=this,l={enumerable:!0};u.hasBeenReset=!1;var d="",h=!1,f=e,p=o,g=c,v=null,m="",y=!0,b="auto",E="start",_=50,k="middle",T=50,w="middle";Object.defineProperty(u,"id",r({},l,{get:function(){return d},set:function(e){d=""+e}})),Object.defineProperty(u,"pauseOnExit",r({},l,{get:function(){return h},set:function(e){h=!!e}})),Object.defineProperty(u,"startTime",r({},l,{get:function(){return f},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(u,"endTime",r({},l,{get:function(){return p},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(u,"text",r({},l,{get:function(){return g},set:function(e){g=""+e,this.hasBeenReset=!0}})),Object.defineProperty(u,"region",r({},l,{get:function(){return v},set:function(e){v=e,this.hasBeenReset=!0}})),Object.defineProperty(u,"vertical",r({},l,{get:function(){return m},set:function(e){var n=function(e){return t(i,e)}(e);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");m=n,this.hasBeenReset=!0}})),Object.defineProperty(u,"snapToLines",r({},l,{get:function(){return y},set:function(e){y=!!e,this.hasBeenReset=!0}})),Object.defineProperty(u,"line",r({},l,{get:function(){return b},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(u,"lineAlign",r({},l,{get:function(){return E},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");E=t,this.hasBeenReset=!0}})),Object.defineProperty(u,"position",r({},l,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(u,"positionAlign",r({},l,{get:function(){return k},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");k=t,this.hasBeenReset=!0}})),Object.defineProperty(u,"size",r({},l,{get:function(){return T},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(u,"align",r({},l,{get:function(){return w},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),u.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}(),Ud=function(){function e(){A(this,e)}return I(e,[{key:"decode",value:function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}]),e}();function Fd(i){function e(s,e,t,a){return 3600*(0|s)+60*(0|e)+(0|t)+parseFloat(a||0)}var t=i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}var Bd=function(){function e(){A(this,e),this.values=Object.create(null)}return I(e,[{key:"set",value:function(e,t){!this.get(e)&&""!==t&&(this.values[e]=t)}},{key:"get",value:function(e,t,s){return s?this.has(e)?this.values[e]:t[s]:this.has(e)?this.values[e]:t}},{key:"has",value:function(e){return e in this.values}},{key:"alt",value:function(e,t,s){for(var n=0;n<s.length;++n)if(t===s[n]){this.set(e,t);break}}},{key:"integer",value:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}},{key:"percent",value:function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var s=parseFloat(t);if(s>=0&&s<=100)return this.set(e,s),!0}return!1}}]),e}();function jd(i,e,t,s){var n=s?i.split(s):[i];for(var r in n)if("string"==typeof n[r]){var a=n[r].split(t);if(2===a.length)e(a[0],a[1])}}var Vd=new Nd(0,0,""),Hd="middle"===Vd.align?"middle":"center";function Wd(i,e,t){var s=i;function n(){var e=Fd(i);if(null===e)throw new Error("Malformed timestamp: "+s);return i=i.replace(/^[^\sa-zA-Z-]+/,""),e}function a(){i=i.replace(/^\s+/,"")}if(a(),e.startTime=n(),a(),"--\x3e"!==i.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);i=i.slice(3),a(),e.endTime=n(),a(),function(e,n){var r=new Bd;jd(e,(function(e,n){var o;switch(e){case"region":for(var p=t.length-1;p>=0;p--)if(t[p].id===n){r.set(e,t[p].region);break}break;case"vertical":r.alt(e,n,["rl","lr"]);break;case"line":o=n.split(","),r.integer(e,o[0]),r.percent(e,o[0])&&r.set("snapToLines",!1),r.alt(e,o[0],["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start",Hd,"end"]);break;case"position":o=n.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start",Hd,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,n);break;case"align":r.alt(e,n,["start",Hd,"end","left","right"])}}),/:/,/\s/),n.region=r.get("region",null),n.vertical=r.get("vertical","");var u=r.get("line","auto");"auto"===u&&-1===Vd.line&&(u=-1),n.line=u,n.lineAlign=r.get("lineAlign","start"),n.snapToLines=r.get("snapToLines",!0),n.size=r.get("size",100),n.align=r.get("align",Hd);var o=r.get("position","auto");"auto"===o&&50===Vd.position&&(o="start"===n.align||"left"===n.align?0:"end"===n.align||"right"===n.align?100:50),n.position=o}(i,e)}function qd(i){return i.replace(/<br(?: \/)?>/gi,"\n")}var Gd=function(){function e(){A(this,e),this.state="INITIAL",this.buffer="",this.decoder=new Ud,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}return I(e,[{key:"parse",value:function(e){var t=this;function s(){var e=t.buffer,a=0;for(e=qd(e);a<e.length&&"\r"!==e[a]&&"\n"!==e[a];)++a;var n=e.slice(0,a);return"\r"===e[a]&&++a,"\n"===e[a]&&++a,t.buffer=e.slice(a),n}function n(e){jd(e,(function(a,e){}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var o=(r=s()).match(/^()?WEBVTT([ \t].*)?$/);if(null==o||!o[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:r=s(),t.state){case"HEADER":/:/.test(r)?n(r):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;if(t.cue=new Nd(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Wd(r,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var c=-1!==r.indexOf("--\x3e");if(!r||c&&(a=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r;continue;case"BADCUE":r||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this}},{key:"flush",value:function(){var e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}]),e}(),Kd=/\r\n|\n\r|\n|\r/g,Yd=function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e.slice(s,s+t.length)===t};function $d(i,e,t){return Jl(i.toString())+Jl(e.toString())+Jl(t)}function Qd(i,e,t,s,n,r,a){var o,c=new Gd,l=Pr(new Uint8Array(i)).trim().replace(Kd,"\n").split("\n"),d=[],u=e?function(i){return Zu(i,Ju,1/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1))}(e.baseTime,e.timescale):0,h="00:00.000",f=0,v=0,p=!0;c.oncue=function(g){var r=t[s],c=t.ccOffset,l=(f-u)/9e4;if(null!=r&&r.new&&(void 0!==v?c=t.ccOffset=r.start:function(e,t,s){var n=e[t],r=e[n.prevCC];if(!r||!r.new&&n.new)return e.ccOffset=e.presentationOffset=n.start,void(n.new=!1);for(;null!=(a=r)&&a.new;){var a;e.ccOffset+=n.start-r.start,n.new=!1,r=e[(n=r).prevCC]}e.presentationOffset=s}(t,s,l)),l){if(!e)return void(o=new Error("Missing initPTS for VTT MPEGTS"));c=l-t.presentationOffset}var b=g.endTime-g.startTime,h=oc(9e4*(g.startTime+c-v),9e4*n)/9e4;g.startTime=Math.max(h,0),g.endTime=Math.max(h+b,0);var m=g.text.trim();g.text=decodeURIComponent(encodeURIComponent(m)),g.id||(g.id=$d(g.startTime,g.endTime,m)),g.endTime>0&&d.push(g)},c.onparsingerror=function(g){o=g},c.onflush=function(){o?a(o):r(d)},l.forEach((function(g){if(p){if(Yd(g,"X-TIMESTAMP-MAP=")){p=!1,g.slice(16).split(",").forEach((function(e){Yd(e,"LOCAL:")?h=e.slice(6):Yd(e,"MPEGTS:")&&(f=parseInt(e.slice(7)))}));try{v=function(e){var t=parseInt(e.slice(-3)),s=parseInt(e.slice(-6,-4)),n=parseInt(e.slice(-9,-7)),r=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(ir(t)&&ir(s)&&ir(n)&&ir(r)))throw Error("Malformed X-TIMESTAMP-MAP: Local:".concat(e));return t+=1e3*s,t+=6e4*n,t+36e5*r}(h)/1e3}catch(e){o=e}return}""===g&&(p=!1)}c.parse(g+"\n")})),c.flush()}var zd="stpp.ttml.im1t",Xd=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Jd=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Zd={left:"start",center:"center",right:"end",start:"start",end:"end"};function eh(i,e,t,s){var n=ii(new Uint8Array(i),["mdat"]);if(0!==n.length){var r=n.map((function(e){return Pr(e)})),a=function(i,e){return Zu(i,e,1/(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1),arguments.length>3&&void 0!==arguments[3]&&arguments[3])}(e.baseTime,1,e.timescale);try{r.forEach((function(e){return t(function(i,e){var t=(new DOMParser).parseFromString(i,"text/xml").getElementsByTagName("tt")[0];if(!t)throw new Error("Invalid ttml");var n={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(n).reduce((function(e,r){return e[r]=t.getAttribute("ttp:".concat(r))||n[r],e}),{}),r="preserve"!==t.getAttribute("xml:space"),o=rh(nh(t,"styling","style")),c=rh(nh(t,"layout","region")),u=nh(t,"body","[begin]");return[].map.call(u,(function(t){var n=ih(t,r);if(!n||!t.hasAttribute("begin"))return null;var l=sh(t.getAttribute("begin"),a),d=sh(t.getAttribute("dur"),a),p=sh(t.getAttribute("end"),a);if(null===l)throw oh(t);if(null===p){if(null===d)throw oh(t);p=l+d}var g=new Nd(l-e,p-e,n);g.id=$d(g.startTime,g.endTime,g.text);var h=function(i,e,t){var s="http://www.w3.org/ns/ttml#styling",n=null,r=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=null!=i&&i.hasAttribute("style")?i.getAttribute("style"):null;return a&&t.hasOwnProperty(a)&&(n=t[a]),r.reduce((function(t,r){var o=ah(e,s,r)||ah(i,s,r)||ah(n,s,r);return o&&(t[r]=o),t}),{})}(c[t.getAttribute("region")],o[t.getAttribute("style")],o),b=h.textAlign;if(b){var f=Zd[b];f&&(g.lineAlign=f),g.align=b}return kr(g,h),g})).filter((function(e){return null!==e}))}(e,a))}))}catch(e){s(e)}}else s(new Error("Could not parse IMSC1 mdat"))}function nh(i,e,t){var s=i.getElementsByTagName(e)[0];return s?[].slice.call(s.querySelectorAll(t)):[]}function rh(i){return i.reduce((function(e,t){var s=t.getAttribute("xml:id");return s&&(e[s]=t),e}),{})}function ih(i,e){return[].slice.call(i.childNodes).reduce((function(t,s,n){var r;return"br"===s.nodeName&&n?t+"\n":null!=(r=s.childNodes)&&r.length?ih(s,e):e?t+s.textContent.trim().replace(/\s+/g," "):t+s.textContent}),"")}function ah(i,e,t){return i&&i.hasAttributeNS(e,t)?i.getAttributeNS(e,t):null}function oh(i){return new Error("Could not parse ttml timestamp ".concat(i))}function sh(i,e){if(!i)return null;var t=Fd(i);return null===t&&(Xd.test(i)?t=function(i,e){var t=Xd.exec(i),s=(0|t[4])+(0|t[5])/e.subFrameRate;return 3600*(0|t[1])+60*(0|t[2])+(0|t[3])+s/e.frameRate}(i,e):Jd.test(i)&&(t=function(i,e){var t=Jd.exec(i),s=Number(t[1]);switch(t[2]){case"h":return 3600*s;case"m":return 60*s;case"ms":return 1e3*s;case"f":return s/e.frameRate;case"t":return s/e.tickRate}return s}(i,e))),t}var uh=function(){function e(t,n){A(this,e),this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=t,this.trackName=n}return I(e,[{key:"dispatchCue",value:function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}},{key:"newCue",value:function(e,t,s){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=s,this.timelineController.createCaptionsTrack(this.trackName)}},{key:"reset",value:function(){this.cueRanges=[],this.startTime=null}}]),e}(),ch=function(){function e(t){A(this,e),this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},t.on(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(cr.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),t.on(cr.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(cr.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(cr.FRAG_LOADING,this.onFragLoading,this),t.on(cr.FRAG_LOADED,this.onFragLoaded,this),t.on(cr.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(cr.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(cr.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(cr.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(cr.BUFFER_FLUSHING,this.onBufferFlushing,this)}return I(e,[{key:"destroy",value:function(){var e=this.hls;e.off(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(cr.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(cr.FRAG_LOADING,this.onFragLoading,this),e.off(cr.FRAG_LOADED,this.onFragLoaded,this),e.off(cr.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(cr.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(cr.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(cr.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(cr.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}},{key:"initCea608Parsers",value:function(){var e=new uh(this,"textTrack1"),t=new uh(this,"textTrack2"),s=new uh(this,"textTrack3"),n=new uh(this,"textTrack4");this.cea608Parser1=new Md(1,e,t),this.cea608Parser2=new Md(3,s,n)}},{key:"addCues",value:function(e,t,s,n,r){for(var a=!1,o=r.length;o--;){var c=r[o],l=hh(c[0],c[1],t,s);if(l>=0&&(c[0]=Math.min(c[0],t),c[1]=Math.max(c[1],s),a=!0,l/(s-t)>.5))return}if(a||r.push([t,s]),this.config.renderTextTracksNatively){var d=this.captionsTracks[e];this.Cues.newCue(d,t,s,n)}else{var h=this.Cues.newCue(null,t,s,n);this.hls.trigger(cr.CUES_PARSED,{type:"captions",cues:h,track:e})}}},{key:"onInitPtsFound",value:function(e,t){var n=this,r=t.frag,s=t.id,o=t.initPTS,c=t.timescale,a=t.trackId,l=this.unparsedVttFrags;s===vr&&(this.initPTS[r.cc]={baseTime:o,timescale:c,trackId:a}),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.initPTS[e.frag.cc]?n.onFragLoaded(cr.FRAG_LOADED,e):n.hls.trigger(cr.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e.frag,error:new Error("Subtitle discontinuity domain does not match main")})})))}},{key:"getExistingTrack",value:function(e,t){var s=this.media;if(s)for(var n=0;n<s.textTracks.length;n++){var r=s.textTracks[n];if(dh(r,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return r}return null}},{key:"createCaptionsTrack",value:function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}},{key:"createNativeTrack",value:function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,s=this.captionsTracks,n=this.media,r=t[e],o=r.label,a=r.languageCode,c=this.getExistingTrack(o,a);if(c)s[e]=c,$l(s[e]),Kl(s[e],n);else{var l=this.createTextTrack("captions",o,a);l&&(l[e]=!0,s[e]=l)}}}},{key:"createNonNativeTrack",value:function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var n={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(cr.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}}}},{key:"createTextTrack",value:function(e,t,s){var n=this.media;if(n)return n.addTextTrack(e,t,s)}},{key:"onMediaAttaching",value:function(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}},{key:"onMediaDetaching",value:function(e,t){var s=!!t.transferMedia;if(this.media=null,!s){var n=this.captionsTracks;Object.keys(n).forEach((function(e){$l(n[e]),delete n[e]})),this.nonNativeCaptionsTracks={}}}},{key:"onManifestLoading",value:function(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}},{key:"_cleanTracks",value:function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var s=0;s<t.length;s++)$l(t[s])}}},{key:"onSubtitleTracksUpdated",value:function(e,t){var n=this,s=t.subtitleTracks||[],r=s.some((function(e){return e.textCodec===zd}));if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(Tc(this.tracks,s))return void(this.tracks=s);if(this.textTracks=[],this.tracks=s,this.config.renderTextTracksNatively){var a=this.media,o=a?zl(a.textTracks):null;if(this.tracks.forEach((function(e,t){var u;if(o){for(var r=null,c=0;c<o.length;c++)if(o[c]&&dh(o[c],e)){r=o[c],o[c]=null;break}r&&(u=r)}if(u)$l(u);else{var l=lh(e);(u=n.createTextTrack(l,e.name,e.lang))&&(u.mode="disabled")}u&&n.textTracks.push(u)})),null!=o&&o.length){var c=o.filter((function(e){return null!==e})).map((function(e){return e.label}));c.length&&this.hls.logger.warn("Media element contains unused subtitle tracks: ".concat(c.join(", "),". Replace media element for each source to clear TextTracks and captions menu."))}}else if(this.tracks.length){var l=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(cr.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:l})}}}},{key:"onManifestLoaded",value:function(e,t){var n=this;this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((function(s){var e=/(?:CC|SERVICE)([1-4])/.exec(s.instreamId);if(e){var t="textTrack".concat(e[1]),a=n.captionsProperties[t];a&&(a.label=s.name,s.lang&&(a.languageCode=s.lang),a.media=s)}}))}},{key:"closedCaptionsForLevel",value:function(e){var t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]}},{key:"onFragLoading",value:function(e,t){if(this.enabled&&t.frag.type===vr){var s,n,r=this.cea608Parser1,a=this.cea608Parser2,o=this.lastSn,c=t.frag,l=c.cc,d=c.sn,u=null!=(s=null==(n=t.part)?void 0:n.index)?s:-1;r&&a&&(d!==o+1||d===o&&u!==this.lastPartIndex+1||l!==this.lastCc)&&(r.reset(),a.reset()),this.lastCc=l,this.lastSn=d,this.lastPartIndex=u}}},{key:"onFragLoaded",value:function(e,t){var s=t.frag,n=t.payload;if(s.type===gr)if(n.byteLength){var r=s.decryptdata,a="stats"in t;if(null==r||!r.encrypted||a){var o=this.tracks[s.level],c=this.vttCCs;c[s.cc]||(c[s.cc]={start:s.start,prevCC:this.prevCC,new:!0},this.prevCC=s.cc),o&&o.textCodec===zd?this._parseIMSC1(s,n):this._parseVTTs(t)}}else this.hls.trigger(cr.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:new Error("Empty subtitle payload")})}},{key:"_parseIMSC1",value:function(e,t){var n=this,s=this.hls;eh(t,this.initPTS[e.cc],(function(t){n._appendCues(t,e.level),s.trigger(cr.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){s.logger.log("Failed to parse IMSC1: ".concat(t)),s.trigger(cr.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))}},{key:"_parseVTTs",value:function(e){var t,n=this,s=e.frag,r=e.payload,o=this.initPTS,a=this.unparsedVttFrags,c=o.length-1;if(o[s.cc]||-1!==c){var l=this.hls;Qd(null!=(t=s.initSegment)&&t.data?vi(s.initSegment.data,new Uint8Array(r)).buffer:r,this.initPTS[s.cc],this.vttCCs,s.cc,s.start,(function(u){n._appendCues(u,s.level),l.trigger(cr.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})}),(function(u){var t="Missing initPTS for VTT MPEGTS"===u.message;t?a.push(e):n._fallbackToIMSC1(s,r),l.logger.log("Failed to parse VTT cue: ".concat(u)),!(t&&c>s.cc)&&l.trigger(cr.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:u})}))}else a.push(e)}},{key:"_fallbackToIMSC1",value:function(e,t){var n=this,s=this.tracks[e.level];s.textCodec||eh(t,this.initPTS[e.cc],(function(){s.textCodec=zd,n._parseIMSC1(e,t)}),(function(){s.textCodec="wvtt"}))}},{key:"_appendCues",value:function(e,t){var s=this.hls;if(this.config.renderTextTracksNatively){var n=this.textTracks[t];if(!n||"disabled"===n.mode)return;e.forEach((function(e){return Yl(n,e)}))}else{var r=this.tracks[t];if(!r)return;var o=r.default?"default":"subtitles"+t;s.trigger(cr.CUES_PARSED,{type:"subtitles",cues:e,track:o})}}},{key:"onFragDecrypted",value:function(e,t){t.frag.type===gr&&this.onFragLoaded(cr.FRAG_LOADED,t)}},{key:"onSubtitleTracksCleared",value:function(){this.tracks=[],this.captionsTracks={}}},{key:"onFragParsingUserdata",value:function(e,t){if(this.enabled&&this.config.enableCEA708Captions){var s=t.frag,n=t.samples;if(s.type!==vr||"NONE"!==this.closedCaptionsForLevel(s))for(var r=0;r<n.length;r++){var a=n[r].bytes;if(a){this.cea608Parser1||this.initCea608Parsers();var o=this.extractCea608Data(a);this.cea608Parser1.addData(n[r].pts,o[0]),this.cea608Parser2.addData(n[r].pts,o[1])}}}}},{key:"onBufferFlushing",value:function(e,t){var n=t.startOffset,s=t.endOffset,r=t.endOffsetSubtitles,o=t.type,a=this.media;if(a&&!(a.currentTime<s)){if(!o||"video"===o){var c=this.captionsTracks;Object.keys(c).forEach((function(e){return Ql(c[e],n,s)}))}if(this.config.renderTextTracksNatively&&0===n&&void 0!==r){var l=this.textTracks;Object.keys(l).forEach((function(e){return Ql(l[e],n,r)}))}}}},{key:"extractCea608Data",value:function(e){for(var t=[[],[]],s=31&e[0],n=2,r=0;r<s;r++){var a=e[n++],o=127&e[n++],c=127&e[n++];if((0!==o||0!==c)&&0!=(4&a)){var u=3&a;(0===u||1===u)&&(t[u].push(o),t[u].push(c))}}return t}}]),e}();function lh(i){return i.characteristics&&/transcribes-spoken-dialog/gi.test(i.characteristics)&&/describes-music-and-sound/gi.test(i.characteristics)?"captions":"subtitles"}function dh(i,e){return!!i&&i.kind===lh(e)&&Sc(e,i)}function hh(i,e,t,s){return Math.min(e,s)-Math.max(i,t)}var fh=/\s/,ph={newCue:function(i,e,t,s){for(var n,a,r,o,c,l=[],u=self.VTTCue||self.TextTrackCue,d=0;d<s.rows.length;d++)if(r=!0,o=0,c="",!(n=s.rows[d]).isEmpty()){for(var h,p=0;p<n.chars.length;p++)fh.test(n.chars[p].uchar)&&r?o++:(c+=n.chars[p].uchar,r=!1);n.cueStartTime=e,e===t&&(t+=1e-4),o>=16?o--:o++;var f=qd(c.trim()),v=$d(e,t,f);null!=i&&null!=(h=i.cues)&&h.getCueById(v)||((a=new u(e,t,f)).id=v,a.line=d+1,a.align="left",a.position=10+Math.min(80,10*Math.floor(8*o/32)),l.push(a))}return i&&l.length&&(l.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),l.forEach((function(e){return Yl(i,e)}))),l}};var vh=/(\d+)-(\d+)\/(\d+)/,mh=function(){function e(t){A(this,e),this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=t.fetchSetup||gh,this.controller=new self.AbortController,this.stats=new Vr}return I(e,[{key:"destroy",value:function(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}},{key:"abortInternal",value:function(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}},{key:"abort",value:function(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}},{key:"load",value:function(e,t,s){var n=this,r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();var o=function(i,e){var t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(kr({},i.headers))};return i.rangeEnd&&t.headers.set("Range","bytes="+i.rangeStart+"-"+String(i.rangeEnd-1)),t}(e,this.controller.signal),a="arraybuffer"===e.responseType,c=a?"byteLength":"length",l=t.loadPolicy,d=l.maxTimeToFirstByteMs,h=l.maxLoadTimeMs;this.context=e,this.config=t,this.callbacks=s,this.request=this.fetchSetup(e,o),self.clearTimeout(this.requestTimeout),t.timeout=d&&ir(d)?d:h,this.requestTimeout=self.setTimeout((function(){n.callbacks&&(n.abortInternal(),n.callbacks.onTimeout(r,e,n.response))}),t.timeout),(mc(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then((function(o){var c;n.response=n.loader=o;var l=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(n.requestTimeout),t.timeout=h,n.requestTimeout=self.setTimeout((function(){n.callbacks&&(n.abortInternal(),n.callbacks.onTimeout(r,e,n.response))}),h-(l-r.loading.start)),!o.ok){var p=o.status,g=o.statusText;throw new yh(g||"fetch, bad network response",p,o)}r.loading.first=l,r.total=function(i){var e=i.get("Content-Range");if(e){var s=function(i){var e=vh.exec(i);if(e)return parseInt(e[2])-parseInt(e[1])+1}(e);if(ir(s))return s}var t=i.get("Content-Length");if(t)return parseInt(t)}(o.headers)||r.total;var d=null==(c=n.callbacks)?void 0:c.onProgress;return d&&ir(t.highWaterMark)?n.loadProgressively(o,r,e,t.highWaterMark,d):a?o.arrayBuffer():"json"===e.responseType?o.json():o.text()})).then((function(o){var l,d,h=n.response;if(!h)throw new Error("loader destroyed");self.clearTimeout(n.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);var p=o[c];p&&(r.loaded=r.total=p);var g={url:h.url,data:o,code:h.status},f=null==(l=n.callbacks)?void 0:l.onProgress;f&&!ir(t.highWaterMark)&&f(r,e,o,h),null==(d=n.callbacks)||d.onSuccess(g,r,e,h)})).catch((function(t){var o;if(self.clearTimeout(n.requestTimeout),!r.aborted){var c=t&&t.code||0,l=t?t.message:null;null==(o=n.callbacks)||o.onError({code:c,text:l},e,t?t.details:null,r)}}))}},{key:"getCacheAge",value:function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}},{key:"getResponseHeader",value:function(e){return this.response?this.response.headers.get(e):null}},{key:"loadProgressively",value:function(e,t,s){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0,a=new Hs,o=e.body.getReader(),c=function c(){return o.read().then((function(o){if(o.done)return a.dataLength&&r(t,s,a.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));var u=o.value,l=u.length;return t.loaded+=l,l<n||a.dataLength?(a.push(u),a.dataLength>=n&&r(t,s,a.flush().buffer,e)):r(t,s,u.buffer,e),c()})).catch((function(){return Promise.reject()}))};return c()}}]),e}();function gh(i,e){return new self.Request(i.url,e)}var yh=function(e){T(n,e);var t=P(n);function n(e,r,s){var o;return A(this,n),(o=t.call(this,e)).code=void 0,o.details=void 0,o.code=r,o.details=s,o}return I(n)}(E(Error)),bh=/^age:\s*[\d.]+\s*$/im,Eh=function(){function e(t){A(this,e),this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=t&&t.xhrSetup||null,this.stats=new Vr,this.retryDelay=0}return I(e,[{key:"destroy",value:function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}},{key:"abortInternal",value:function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))}},{key:"abort",value:function(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}},{key:"load",value:function(e,t,s){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=s,this.loadInternal()}},{key:"loadInternal",value:function(){var e=this,t=this.config,n=this.context;if(t&&n){var s=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;var o=this.xhrSetup;o?Promise.resolve().then((function(){if(e.loader===s&&!e.stats.aborted)return o(s,n.url)})).catch((function(a){if(e.loader===s&&!e.stats.aborted)return s.open("GET",n.url,!0),o(s,n.url)})).then((function(){e.loader!==s||e.stats.aborted||e.openAndSendXhr(s,n,t)})).catch((function(a){var t;null==(t=e.callbacks)||t.onError({code:s.status,text:a.message},n,s,r)})):this.openAndSendXhr(s,n,t)}}},{key:"openAndSendXhr",value:function(e,t,s){e.readyState||e.open("GET",t.url,!0);var n=t.headers,r=s.loadPolicy,o=r.maxTimeToFirstByteMs,a=r.maxLoadTimeMs;if(n)for(var c in n)e.setRequestHeader(c,n[c]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),s.timeout=o&&ir(o)?o:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout),e.send()}},{key:"readystatechange",value:function(){var e=this.context,t=this.loader,s=this.stats;if(e&&t){var n=t.readyState,r=this.config;if(!s.aborted&&n>=2&&(0===s.loading.first&&(s.loading.first=Math.max(self.performance.now(),s.loading.start),r.timeout!==r.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),r.timeout=r.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.loadPolicy.maxLoadTimeMs-(s.loading.first-s.loading.start)))),4===n)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;var o=t.status,u="text"===t.responseType?t.responseText:null;if(o>=200&&o<300){var c=null!=u?u:t.response;if(null!=c){var a,l;s.loading.end=Math.max(self.performance.now(),s.loading.first);var p="arraybuffer"===t.responseType?c.byteLength:c.length;s.loaded=s.total=p,s.bwEstimate=8e3*s.total/(s.loading.end-s.loading.first);var g=null==(a=this.callbacks)?void 0:a.onProgress;g&&g(s,e,c,t);var d={url:t.responseURL,data:c,code:o};return void(null==(l=this.callbacks)||l.onSuccess(d,s,e,t))}}var h,f=r.loadPolicy.errorRetry;if(Ia(f,s.retry,!1,{url:e.url,data:void 0,code:o}))this.retry(f);else xr.error("".concat(o," while loading ").concat(e.url)),null==(h=this.callbacks)||h.onError({code:o,text:t.statusText},e,t,s)}}}},{key:"loadtimeout",value:function(){if(this.config){var e=this.config.loadPolicy.timeoutRetry;if(Ia(e,this.stats.retry,!0))this.retry(e);else{var s;xr.warn("timeout while loading ".concat(null==(s=this.context)?void 0:s.url));var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))}}}},{key:"retry",value:function(e){var t=this.context,s=this.stats;this.retryDelay=Sa(e,s.retry),s.retry++,xr.warn("".concat(status?"HTTP Status "+status:"Timeout"," while loading ").concat(null==t?void 0:t.url,", retrying ").concat(s.retry,"/").concat(e.maxNumRetry," in ").concat(this.retryDelay,"ms")),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}},{key:"loadprogress",value:function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}},{key:"getCacheAge",value:function(){var e=null;if(this.loader&&bh.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}},{key:"getResponseHeader",value:function(e){return this.loader&&new RegExp("^".concat(e,":\\s*[\\d.]+\\s*$"),"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}]),e}(),_h=wr(wr({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,startOnSegmentBoundary:!1,maxBufferSize:6e7,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:Eh,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:pa,bufferController:Dc,capLevelController:Mc,errorController:Ua,fpsController:Gl,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Bo,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:ph,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:md,subtitleTrackController:Xl,timelineController:ch,audioStreamController:_c,audioTrackController:Ac,emeController:jl,cmcdController:Nl,contentSteeringController:Ul,interstitialsController:vd});function kh(i,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==e.liveMaxLatencyDurationCount&&(void 0===e.liveSyncDurationCount||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==e.liveMaxLatencyDuration&&(void 0===e.liveSyncDuration||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');var s=Th(i),n=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((function(a){var r="".concat("level"===a?"playlist":a,"LoadPolicy"),o=void 0===e[r],c=[];n.forEach((function(u){var t="".concat(a,"Loading").concat(u),n=e[t];if(void 0!==n&&o){c.push(t);var l=s[r].default;switch(e[r]={default:l},u){case"TimeOut":l.maxLoadTimeMs=n,l.maxTimeToFirstByteMs=n;break;case"MaxRetry":l.errorRetry.maxNumRetry=n,l.timeoutRetry.maxNumRetry=n;break;case"RetryDelay":l.errorRetry.retryDelayMs=n,l.timeoutRetry.retryDelayMs=n;break;case"MaxRetryTimeout":l.errorRetry.maxRetryDelayMs=n,l.timeoutRetry.maxRetryDelayMs=n}}})),c.length&&t.warn('hls.js config: "'.concat(c.join('", "'),'" setting(s) are deprecated, use "').concat(r,'": ').concat(aa(e[r])))})),wr(wr({},s),e)}function Th(i){return i&&"object"==R(i)?Array.isArray(i)?i.map(Th):Object.keys(i).reduce((function(e,t){return e[t]=Th(i[t]),e}),{}):i}function wh(i,e){var t=i.loader;t!==mh&&t!==Eh?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),i.progressive=!1):function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}()&&(i.loader=mh,i.progressive=!0,i.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}var Sh=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this,"gap-controller",e.logger)).hls=void 0,o.fragmentTracker=void 0,o.media=null,o.mediaSource=void 0,o.nudgeRetry=0,o.stallReported=!1,o.stalled=null,o.moved=!1,o.seeking=!1,o.buffered={},o.lastCurrentTime=0,o.ended=0,o.waiting=0,o.onMediaPlaying=function(){o.ended=0,o.waiting=0},o.onMediaWaiting=function(){var s;null!=(s=o.media)&&s.seeking||(o.waiting=self.performance.now(),o.tick())},o.onMediaEnded=function(){var s;o.hls&&(o.ended=(null==(s=o.media)?void 0:s.currentTime)||1,o.hls.trigger(cr.MEDIA_ENDED,{stalled:!1}))},o.hls=e,o.fragmentTracker=r,o.registerListeners(),o}return I(n,[{key:"registerListeners",value:function(){var e=this.hls;e&&(e.on(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(cr.BUFFER_APPENDED,this.onBufferAppended,this))}},{key:"unregisterListeners",value:function(){var e=this.hls;e&&(e.off(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(cr.BUFFER_APPENDED,this.onBufferAppended,this))}},{key:"destroy",value:function(){y(S(n.prototype),"destroy",this).call(this),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}},{key:"onMediaAttached",value:function(e,t){this.setInterval(100),this.mediaSource=t.mediaSource;var s=this.media=t.media;Ss(s,"playing",this.onMediaPlaying),Ss(s,"waiting",this.onMediaWaiting),Ss(s,"ended",this.onMediaEnded)}},{key:"onMediaDetaching",value:function(e,t){this.clearInterval();var s=this.media;s&&(As(s,"playing",this.onMediaPlaying),As(s,"waiting",this.onMediaWaiting),As(s,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}},{key:"onBufferAppended",value:function(e,t){this.buffered=t.timeRanges}},{key:"hasBuffered",get:function(){return Object.keys(this.buffered).length>0}},{key:"tick",value:function(){var e;if(null!=(e=this.media)&&e.readyState&&this.hasBuffered){var t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}}},{key:"poll",value:function(e,t){var s,n,r=null==(s=this.hls)?void 0:s.config;if(r){var a=this.media;if(a){var o=a.seeking,c=this.seeking&&!o,l=!this.seeking&&o,u=a.paused&&!o||a.ended||0===a.playbackRate;if(this.seeking=o,e!==t)return t&&(this.ended=0),this.moved=!0,o||(this.nudgeRetry=0,r.nudgeOnVideoHole&&!u&&e>t&&this.nudgeOnVideoHole(e,t)),void(0===this.waiting&&this.stallResolved(e));if(l||c)c&&this.stallResolved(e);else{if(u)return this.nudgeRetry=0,this.stallResolved(e),void(!this.ended&&a.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(cr.MEDIA_ENDED,{stalled:!1})));if(uo.getBuffered(a).length){var d=uo.bufferInfo(a,e,0),h=d.nextStart||0,f=this.fragmentTracker;if(o&&f&&this.hls){var v=Ah(this.hls.inFlightFragments,e),m=d.len>2,y=!h||v||h-e>2&&!f.getPartialFragment(e);if(m||y)return;this.moved=!1}var E=null==(n=this.hls)?void 0:n.latestLevelDetails;if(!this.moved&&null!==this.stalled&&f){if(!(d.len>0||h))return;
vendor: 6,102 bytes, line 2
2var _=Math.max(h,d.start||0)-e,k=null!=E&&E.live?2*E.targetduration:2,T=Rh(e,f);if(_>0&&(_<=k||T))return void(a.paused||this._trySkipBufferHole(T))}var p=r.detectStallWithCurrentTimeMs,g=self.performance.now(),w=this.waiting,S=this.stalled;if(null===S){if(!(w>0&&g-w<p))return void(this.stalled=g);S=this.stalled=w}var A=g-S;if(!o&&(A>=p||w)&&this.hls){var b;if("ended"===(null==(b=this.mediaSource)?void 0:b.readyState)&&(null==E||!E.live)&&Math.abs(e-((null==E?void 0:E.edge)||0))<1){if(this.ended)return;return this.ended=e||1,void this.hls.trigger(cr.MEDIA_ENDED,{stalled:!0})}if(this._reportStall(d),!this.media||!this.hls)return}var I=uo.bufferInfo(a,e,r.maxBufferHole);this._tryFixBufferStall(I,A,e)}else this.nudgeRetry=0}}}}},{key:"stallResolved",value:function(e){var t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){var s=self.performance.now()-t;this.log("playback not stuck anymore @".concat(e,", after ").concat(Math.round(s),"ms")),this.stallReported=!1,this.waiting=0,this.hls.trigger(cr.STALL_RESOLVED,{})}}},{key:"nudgeOnVideoHole",value:function(e,t){var s,n=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&null!=(s=this.buffered.audio)&&s.length&&n&&n.length>1&&e>n.end(0)){var r=uo.bufferedInfo(uo.timeRangesToArray(this.buffered.audio),e,0);if(r.len>1&&t>=r.start){var a=uo.timeRangesToArray(n),o=uo.bufferedInfo(a,t,0).bufferedIndex;if(o>-1&&o<a.length-1){var c=uo.bufferedInfo(a,e,0).bufferedIndex,l=a[o].end,u=a[o+1].start;if((-1===c||c>o)&&u-l<1&&e-l<2){var d=new Error("nudging playhead to flush pipeline after video hole. currentTime: ".concat(e," hole: ").concat(l," -> ").concat(u," buffered index: ").concat(c));this.warn(d.message),this.media.currentTime+=1e-6;var h=Rh(e,this.fragmentTracker);h&&"fragment"in h?h=h.fragment:h||(h=void 0);var f=uo.bufferInfo(this.media,e,0);this.hls.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:d,reason:d.message,frag:h,buffer:f.len,bufferInfo:f})}}}}}},{key:"_tryFixBufferStall",value:function(e,t,s){var n,r,a=this.fragmentTracker,o=this.media,c=null==(n=this.hls)?void 0:n.config;if(o&&a&&c){var l=null==(r=this.hls)?void 0:r.latestLevelDetails,u=Rh(s,a);if(!(u||null!=l&&l.live&&s<l.fragmentStart)||!this._trySkipBufferHole(u)&&this.media){var d=e.buffered,h=this.adjacentTraversal(e,s);(d&&d.length>1&&e.len>c.maxBufferHole||e.nextStart&&(e.nextStart-s<c.maxBufferHole||h))&&(t>1e3*c.highBufferWatchdogPeriod||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}}}},{key:"adjacentTraversal",value:function(e,t){var s=this.fragmentTracker,n=e.nextStart;if(s&&n){var r=s.getFragAtPos(t,vr),a=s.getFragAtPos(n,vr);if(r&&a)return a.sn-r.sn<2}return!1}},{key:"_reportStall",value:function(e){var t=this.hls,s=this.media,n=this.stallReported,r=this.stalled;if(!n&&null!==r&&s&&t){this.stallReported=!0;var a=new Error("Playback stalling at @".concat(s.currentTime," due to low buffer (").concat(aa(e),")"));this.warn(a.message),t.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.BUFFER_STALLED_ERROR,fatal:!1,error:a,buffer:e.len,bufferInfo:e,stalled:{start:r}})}}},{key:"_trySkipBufferHole",value:function(e){var t,s=this.fragmentTracker,n=this.media,r=null==(t=this.hls)?void 0:t.config;if(!n||!s||!r)return 0;var a=n.currentTime,o=uo.bufferInfo(n,a,0),c=a<o.start?o.start:o.nextStart;if(c&&this.hls){var u=o.len<=r.maxBufferHole,l=o.len>0&&o.len<1&&n.readyState<3,d=c-a;if(d>0&&(u||l)){if(d>r.maxBufferHole){var h=!1;if(0===a){var p=s.getAppendedFrag(0,vr);p&&c<p.end&&(h=!0)}if(!h&&e){var f;if(null==(f=this.hls.loadLevelObj)||!f.details||Ah(this.hls.inFlightFragments,c))return 0;for(var g=!1,v=e.end;v<c;){var m=Rh(v,s);if(!m){g=!0;break}v+=m.duration}if(g)return 0}}var y=Math.max(c+.05,a+.1);if(this.warn("skipping hole, adjusting currentTime from ".concat(a," to ").concat(y)),this.moved=!0,n.currentTime=y,null==e||!e.gap){var E=new Error("fragment loaded with buffer holes, seeking from ".concat(a," to ").concat(y)),_={type:sr.MEDIA_ERROR,details:ur.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:E,reason:E.message,buffer:o.len,bufferInfo:o};e&&("fragment"in e?_.part=e:_.frag=e),this.hls.trigger(cr.ERROR,_)}return y}}return 0}},{key:"_tryNudgeBuffer",value:function(e){var t=this.hls,s=this.media,n=this.nudgeRetry,r=null==t?void 0:t.config;if(!s||!r)return 0;var a=s.currentTime;if(this.nudgeRetry++,n<r.nudgeMaxRetry){var o=a+(n+1)*r.nudgeOffset,c=new Error("Nudging 'currentTime' from ".concat(a," to ").concat(o));this.warn(c.message),s.currentTime=o,t.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.BUFFER_NUDGE_ON_STALL,error:c,fatal:!1,buffer:e.len,bufferInfo:e})}else{var l=new Error("Playhead still not moving while enough data buffered @".concat(a," after ").concat(r.nudgeMaxRetry," nudges"));this.error(l.message),t.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.BUFFER_STALLED_ERROR,error:l,fatal:!0,buffer:e.len,bufferInfo:e})}}}]),n}(ao);function Ah(i,e){var t=Ih(i.main);if(t&&t.start<=e)return t;var s=Ih(i.audio);return s&&s.start<=e?s:null}function Ih(i){if(!i)return null;switch(i.state){case Os:case Rs:case Ns:case Us:return null}return i.frag}function Rh(i,e){return e.getAppendedFrag(i,vr)||e.getPartialFragment(i)}function Oh(){if("undefined"!=typeof self)return self.VTTCue||self.TextTrackCue}function Lh(i,e,t,s,n){var r=new i(e,t,"");try{r.value=s,n&&(r.type=n)}catch(o){r=new i(e,t,aa(n?wr({type:n},s):s))}return r}var Dh=function(){var i=Oh();try{i&&new i(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}(),xh=function(){function e(t){var n=this;A(this,e),this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.assetCue=void 0,this.onEventCueEnter=function(){n.hls&&n.hls.trigger(cr.EVENT_CUE_ENTER,{})},this.hls=t,this._registerListeners()}return I(e,[{key:"destroy",value:function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}},{key:"_registerListeners",value:function(){var e=this.hls;
2e&&(e.on(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(cr.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(cr.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(cr.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}},{key:"_unregisterListeners",value:function(){var e=this.hls;e&&(e.off(cr.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(cr.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(cr.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(cr.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}},{key:"onMediaAttaching",value:function(e,t){var s;this.media=t.media,!1===(null==(s=t.overrides)?void 0:s.cueRemoval)&&(this.removeCues=!1)}},{key:"onMediaAttached",value:function(){var e,t=null==(e=this.hls)?void 0:e.latestLevelDetails;t&&this.updateDateRangeCues(t)}},{key:"onMediaDetaching",value:function(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&$l(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}},{key:"onManifestLoading",value:function(){this.dateRangeCuesAppended={}}},{key:"createTrack",value:function(e){var t=this.getID3Track(e.textTracks);return t.mode="hidden",t}},{key:"getID3Track",value:function(e){if(this.media){for(var t=0;t<e.length;t++){var s=e[t];if("metadata"===s.kind&&"id3"===s.label)return Kl(s,this.media),s}return this.media.addTextTrack("metadata","id3")}}},{key:"onFragParsingMetadata",value:function(e,t){if(this.media&&this.hls){var n=this.hls.config,s=n.enableEmsgMetadataCues,r=n.enableID3MetadataCues;if(s||r){var o=t.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));var a=Oh();if(a)for(var c=0;c<o.length;c++){var l=o[c].type;if((l!==li.emsg||s)&&r){var d=hu(o[c].data),u=o[c].pts,h=u+o[c].duration;h>Dh&&(h=Dh),h-u<=0&&(h=u+.25);for(var f=0;f<d.length;f++){var v=d[f];if(!fu(v)){this.updateId3CueEnds(u,l);var p=Lh(a,u,h,v,l);p&&this.id3Track.addCue(p)}}}}}}}},{key:"updateId3CueEnds",value:function(e,t){var s,n=null==(s=this.id3Track)?void 0:s.cues;if(n)for(var r=n.length;r--;){var a=n[r];a.type===t&&a.startTime<e&&a.endTime===Dh&&(a.endTime=e)}}},{key:"onBufferFlushing",value:function(e,t){var n=t.startOffset,s=t.endOffset,r=t.type,o=this.id3Track,a=this.hls;if(a){var c=a.config,l=c.enableEmsgMetadataCues,d=c.enableID3MetadataCues;if(o&&(l||d))Ql(o,n,s,"audio"===r?function(u){return u.type===li.audioId3&&d}:"video"===r?function(u){return u.type===li.emsg&&l}:function(u){return u.type===li.audioId3&&d||u.type===li.emsg&&l})}}},{key:"onLevelUpdated",value:function(e,t){var n=t.details;this.updateDateRangeCues(n,!0)}},{key:"onLevelPtsUpdated",value:function(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}},{key:"updateDateRangeCues",value:function(e,t){var n=this;if(this.hls&&this.media){var r=this.hls.config,s=r.assetPlayerId,o=r.timelineOffset,c=r.enableDateRangeMetadataCues,a=r.interstitialsController;if(c){var l=Oh();if(s&&o&&!a){var p=e.fragmentStart,g=e.fragmentEnd,d=this.assetCue;d?(d.startTime=p,d.endTime=g):l&&((d=this.assetCue=Lh(l,p,g,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"))&&(d.id=s,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(d),d.addEventListener("enter",this.onEventCueEnter)))}if(e.hasProgramDateTime){var h,f=this.id3Track,v=e.dateRanges,u=Object.keys(v),m=this.dateRangeCuesAppended;if(f&&t)if(null!=(h=f.cues)&&h.length)for(var y=Object.keys(m).filter((function(g){return!u.includes(g)})),E=function(){var e=y[_],t=null==(k=m[e])?void 0:k.cues;delete m[e],t&&Object.keys(t).forEach((function(e){var b=t[e];if(b){b.removeEventListener("enter",n.onEventCueEnter);try{f.removeCue(b)}catch(e){}}}))},_=y.length;_--;){var k;E()}else m=this.dateRangeCuesAppended={};var T=e.fragments[e.fragments.length-1];if(0!==u.length&&ir(null==T?void 0:T.programDateTime)){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var w=function(){var g=u[S],e=v[g],t=e.startTime,r=m[g],b=(null==r?void 0:r.cues)||{}
vendor: 37,593 bytes, line 2
2,o=(null==r?void 0:r.durationKnown)||!1,c=Dh,d=e.duration;if(e.endDate&&null!==d)c=t+d,o=!0;else if(e.endOnNext&&!o){var h=u.reduce((function(t,n){if(n!==e.id){var r=v[n];if(r.class===e.class&&r.startDate>e.startDate&&(!t||e.startDate<t.startDate))return r}return t}),null);h&&(c=h.startTime,o=!0)}for(var f=Object.keys(e.attr),y=0;y<f.length;y++){var E=f[y];if(yo(E)){var _=b[E];if(_)!o||null!=r&&r.durationKnown?Math.abs(_.startTime-t)>.01&&(_.startTime=t,_.endTime=c):_.endTime=c;else if(l){var k=e.attr[E];bo(E)&&(k=Ur(k));var T=Lh(l,t,c,{key:E,data:k},li.dateRange);T&&(T.id=g,n.id3Track.addCue(T),b[E]=T,a&&("X-ASSET-LIST"===E||"X-ASSET-URL"===E)&&T.addEventListener("enter",n.onEventCueEnter))}}}m[g]={cues:b,dateRange:e,durationKnown:o}},S=0;S<u.length;S++)w()}}}}}}]),e}(),Ch=function(){function e(t){var n=this;A(this,e),this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=function(){var e=n.media,s=n.levelDetails;if(e&&s){n.currentTime=e.currentTime;var t=n.computeLatency();if(null!==t){n._latency=t;var r=n.config,o=r.lowLatencyMode,a=r.maxLiveSyncPlaybackRate;if(o&&1!==a&&s.live){var c=n.targetLatency;if(null!==c){var l=t-c;if(l<Math.min(n.maxLatency,c+s.targetduration)&&l>.05&&n.forwardBufferLength>1){var d=Math.min(2,Math.max(1,a)),h=Math.round(2/(1+Math.exp(-.75*l-n.edgeStalled))*20)/20,f=Math.min(d,Math.max(1,h));n.changeMediaPlaybackRate(e,f)}else 1!==e.playbackRate&&0!==e.playbackRate&&n.changeMediaPlaybackRate(e,1)}}}}},this.hls=t,this.config=t.config,this.registerListeners()}return I(e,[{key:"levelDetails",get:function(){var e;return(null==(e=this.hls)?void 0:e.latestLevelDetails)||null}},{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config;if(void 0!==e.liveMaxLatencyDuration)return e.liveMaxLatencyDuration;var t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e||null===this.hls)return null;var t=e.holdBack,s=e.partHoldBack,n=e.targetduration,r=this.config,o=r.liveSyncDuration,a=r.liveSyncDurationCount,c=r.lowLatencyMode,l=this.hls.userConfig,d=c&&s||t;(this._targetLatencyUpdated||l.liveSyncDuration||l.liveSyncDurationCount||0===d)&&(d=void 0!==o?o:a*n);var u=n;return d+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,u)},set:function(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency;if(null===e||null===t)return null;var s=this.levelDetails;if(null===s)return null;var n=s.edge,r=e-t-this.edgeStalled,a=n-s.totalduration,o=n-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(a,r),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var s=e.buffered.length;return(s?e.buffered.end(s-1):t.edge)-this.currentTime}},{key:"destroy",value:function(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}},{key:"registerListeners",value:function(){var e=this.hls;e&&(e.on(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(cr.ERROR,this.onError,this))}},{key:"unregisterListeners",value:function(){var e=this.hls;e&&(e.off(cr.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(cr.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(cr.ERROR,this.onError,this))}},{key:"onMediaAttached",value:function(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}},{key:"onMediaDetaching",value:function(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}},{key:"onManifestLoading",value:function(){this._latency=null,this.stallCount=0}},{key:"onLevelUpdated",value:function(e,t){var n=t.details;n.advanced&&this.onTimeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}},{key:"onError",value:function(e,t){var s;t.details===ur.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&null!=(s=this.levelDetails)&&s.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}},{key:"changeMediaPlaybackRate",value:function(e,t){var s,n;e.playbackRate!==t&&(null==(s=this.hls)||s.logger.debug("[latency-controller]: latency=".concat(this.latency.toFixed(3),", targetLatency=").concat(null==(n=this.targetLatency)?void 0:n.toFixed(3),", forwardBufferLength=").concat(this.forwardBufferLength.toFixed(3),": adjusting playback rate from ").concat(e.playbackRate," to ").concat(t)),e.playbackRate=t)}},{key:"estimateLiveEdge",value:function(){var e=this.levelDetails;return null===e?null:e.edge+e.age}},{key:"computeLatency",value:function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime}}]),e}(),Mh=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this,e,"level-controller"))._levels=[],o._firstLevel=-1,o._maxAutoLevel=-1,o._startLevel=void 0,o.currentLevel=null,o.currentLevelIndex=-1,o.manualLevelIndex=-1,o.steering=void 0,o.onParsedComplete=void 0,o.steering=r,o._registerListeners(),o}return I(n,[{key:"_registerListeners",value:function(){var e=this.hls;e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(cr.LEVEL_LOADED,this.onLevelLoaded,this),e.on(cr.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(cr.FRAG_BUFFERED,this.onFragBuffered,this),e.on(cr.ERROR,this.onError,this)}},{key:"_unregisterListeners",value:function(){var e=this.hls;e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(cr.LEVEL_LOADED,this.onLevelLoaded,this),e.off(cr.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(cr.FRAG_BUFFERED,this.onFragBuffered,this),e.off(cr.ERROR,this.onError,this)}},{key:"destroy",value:function(){this._unregisterListeners(),this.steering=null,this.resetLevels(),y(S(n.prototype),"destroy",this).call(this)}},{key:"stopLoad",value:function(){this._levels.forEach((function(e){e.loadError=0,e.fragmentError=0})),y(S(n.prototype),"stopLoad",this).call(this)}},{key:"resetLevels",value:function(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}},{key:"onManifestLoading",value:function(e,t){this.resetLevels()}},{key:"onManifestLoaded",value:function(e,t){var n=this,s=this.hls.config.preferManagedMediaSource,r=[],o={},a={},c=!1,l=!1,d=!1;t.levels.forEach((function(u){var e=u.attrs,t=u.audioCodec,h=u.videoCodec;t&&(u.audioCodec=t=Mi(t,s)||void 0),h&&(h=u.videoCodec=function(i){for(var e=i.split(","),t=0;t<e.length;t++){var s=e[t].split(".");s.length>2&&"avc1"===s[0]&&(e[t]="avc1.".concat(parseInt(s[1]).toString(16)).concat(("000"+parseInt(s[2]).toString(16)).slice(-4)))}return e.join(",")}(h));var f=u.width,p=u.height,g=u.unknownCodecs,v=(null==g?void 0:g.length)||0;if(c||(c=!(!f||!p)),l||(l=!!h),d||(d=!!t),v||t&&!n.isAudioSupported(t)||h&&!n.isVideoSupported(h))n.log('Some or all CODECS not supported "'.concat(e.CODECS,'"'));else{var m=e.CODECS,y=e["FRAME-RATE"],b=e["HDCP-LEVEL"],E=e["PATHWAY-ID"],_=e.RESOLUTION,k=e["VIDEO-RANGE"],T="".concat("".concat(E||".","-"),u.bitrate,"-").concat(_,"-").concat(y,"-").concat(m,"-").concat(k,"-").concat(b);if(o[T])if(o[T].uri===u.url||u.attrs["PATHWAY-ID"])o[T].addGroupId("audio",e.AUDIO),o[T].addGroupId("text",e.SUBTITLES);else{var w=a[T]+=1;u.attrs["PATHWAY-ID"]=new Array(w+1).join(".");var S=n.createLevel(u);o[T]=S,r.push(S)}else{var A=n.createLevel(u);o[T]=A,a[T]=1,r.push(A)}}})),this.filterAndSortMediaOptions(r,t,c,l,d)}},{key:"createLevel",value:function(e){var t=new na(e),s=e.supplemental;if(null!=s&&s.videoCodec&&!this.isVideoSupported(s.videoCodec)){var n=new Error('SUPPLEMENTAL-CODECS not supported "'.concat(s.videoCodec,'"'));this.log(n.message),t.supportedResult=Hi(n,[])}return t}},{key:"isAudioSupported",value:function(e){return Ai(e,"audio",this.hls.config.preferManagedMediaSource)}},{key:"isVideoSupported",value:function(e){return Ai(e,"video",this.hls.config.preferManagedMediaSource)}},{key:"filterAndSortMediaOptions",value:function(e,t,s,n,r){var a,o=this,c=[],l=[],d=e,u=(null==(a=t.stats)?void 0:a.parsing)||{};if((s||n)&&r&&(d=d.filter((function(e){var t=e.videoCodec,n=e.videoRange,b=e.width,r=e.height;return(!!t||!(!b||!r))&&function(i){return!!i&&zi.indexOf(i)>-1}(n)}))),0===d.length)return Promise.resolve().then((function(){if(o.hls){var e="no level with compatible codecs found in manifest",n=e;t.levels.length&&(n="one or more CODECS in variant not supported: ".concat(aa(t.levels.map((function(e){return e.attrs.CODECS})).filter((function(e,t,n){return n.indexOf(e)===t})))),o.warn(n),e+=" (".concat(n,")"));var b=new Error(e);o.hls.trigger(cr.ERROR,{type:sr.MEDIA_ERROR,details:ur.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:b,reason:n})}})),void(u.end=performance.now());t.audioTracks&&Ph(c=t.audioTracks.filter((function(e){return!e.audioCodec||o.isAudioSupported(e.audioCodec)}))),t.subtitles&&Ph(l=t.subtitles);var h=d.slice(0);d.sort((function(e,t){if(e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"])return(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1;if(s&&e.height!==t.height)return e.height-t.height;if(e.frameRate!==t.frameRate)return e.frameRate-t.frameRate;if(e.videoRange!==t.videoRange)return zi.indexOf(e.videoRange)-zi.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){var b=Oi(e.videoCodec),n=Oi(t.videoCodec);if(b!==n)return n-b}if(e.uri===t.uri&&e.codecSet!==t.codecSet){var r=Li(e.codecSet),o=Li(t.codecSet);if(r!==o)return o-r}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0}));var f=h[0];if(this.steering&&(d=this.steering.filterParsedLevels(d)).length!==h.length)for(var v=0;v<h.length;v++)if(h[v].pathwayId===d[0].pathwayId){f=h[v];break}this._levels=d;for(var m=0;m<d.length;m++)if(d[m]===f){var y;this._firstLevel=m;var E=f.bitrate,b=this.hls.bandwidthEstimate;if(this.log("manifest loaded, ".concat(d.length," level(s) found, first bitrate: ").concat(E)),void 0===(null==(y=this.hls.userConfig)?void 0:y.abrEwmaDefaultEstimate)){var _=Math.min(E,this.hls.config.abrEwmaDefaultEstimateMax);_>b&&b===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=_)}break}var k=r&&!n,p=this.hls.config,g=!(!p.audioStreamController||!p.audioTrackController),T={levels:d,audioTracks:c,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:r,video:n,altAudio:g&&!k&&c.some((function(e){return!!e.url}))};u.end=performance.now(),this.hls.trigger(cr.MANIFEST_PARSED,T)}},{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"loadLevelObj",get:function(){return this.currentLevel}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;if(0!==t.length){if(e<0||e>=t.length){var u=new Error("invalid level idx"),n=e<0;if(this.hls.trigger(cr.ERROR,{type:sr.OTHER_ERROR,details:ur.LEVEL_SWITCH_ERROR,level:e,fatal:n,error:u,reason:u.message}),n)return;e=Math.min(e,t.length-1)}var s=this.currentLevelIndex,r=this.currentLevel,o=r?r.attrs["PATHWAY-ID"]:void 0,a=t[e],c=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=a,s!==e||!r||o!==c){this.log("Switching to level ".concat(e," (").concat(a.height?a.height+"p ":"").concat(a.videoRange?a.videoRange+" ":"").concat(a.codecSet?a.codecSet+" ":"","@").concat(a.bitrate,")").concat(c?" with Pathway "+c:""," from level ").concat(s).concat(o?" with Pathway "+o:""));var l={level:e,attrs:a.attrs,details:a.details,bitrate:a.bitrate,averageBitrate:a.averageBitrate,maxBitrate:a.maxBitrate,realBitrate:a.realBitrate,width:a.width,height:a.height,codecSet:a.codecSet,audioCodec:a.audioCodec,videoCodec:a.videoCodec,audioGroups:a.audioGroups,subtitleGroups:a.subtitleGroups,loaded:a.loaded,loadError:a.loadError,fragmentError:a.fragmentError,name:a.name,id:a.id,uri:a.uri,url:a.url,urlId:0,audioGroupIds:a.audioGroupIds,textGroupIds:a.textGroupIds};this.hls.trigger(cr.LEVEL_SWITCHING,l);var d=a.details;if(!d||d.live){var h=this.switchParams(a.uri,null==r?void 0:r.details,d);this.loadPlaylist(h)}}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"pathways",get:function(){return this.steering?this.steering.pathways():[]}},{key:"pathwayPriority",get:function(){return this.steering?this.steering.pathwayPriority:null},set:function(e){if(this.steering){var t=this.steering.pathways(),s=e.filter((function(e){return-1!==t.indexOf(e)}));if(e.length<1)return void this.warn("pathwayPriority ".concat(e," should contain at least one pathway from list: ").concat(t));this.steering.pathwayPriority=s}}},{key:"onError",value:function(e,t){t.fatal||!t.context||t.context.type===dr&&t.context.level===this.level&&this.checkRetry(t)}},{key:"onFragBuffered",value:function(e,t){var n=t.frag;if(void 0!==n&&n.type===vr){var s=n.elementaryStreams;if(!Object.keys(s).some((function(e){return!!s[e]})))return;var r=this._levels[n.level];null!=r&&r.loadError&&(this.log("Resetting level error count of ".concat(r.loadError," on frag buffered")),r.loadError=0)}}},{key:"onLevelLoaded",value:function(e,t){var s,n,r=t.level,o=t.details,a=t.levelInfo;if(!a)return this.warn("Invalid level index ".concat(r)),void(null!=(n=t.deliveryDirectives)&&n.skip&&(o.deltaUpdateFailed=!0));if(a===this.currentLevel||t.withoutMultiVariant){0===a.fragmentError&&(a.loadError=0);var c=a.details;c===t.details&&c.advanced&&(c=void 0),this.playlistLoaded(r,t,c)}else null!=(s=t.deliveryDirectives)&&s.skip&&(o.deltaUpdateFailed=!0)}},{key:"loadPlaylist",value:function(e){y(S(n.prototype),"loadPlaylist",this).call(this),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}},{key:"loadingPlaylist",value:function(e,t){y(S(n.prototype),"loadingPlaylist",this).call(this,e,t);var s=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,o=e.attrs["PATHWAY-ID"],a=e.details,c=null==a?void 0:a.age;this.log("Loading level index ".concat(r).concat(void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:"").concat(o?" Pathway "+o:"").concat(c&&a.live?" age "+c.toFixed(1)+(a.type&&" "+a.type||""):""," ").concat(s)),this.hls.trigger(cr.LEVEL_LOADING,{url:s,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}},{key:"removeLevel",value:function(e){var t,n=this;if(1!==this._levels.length){var s=this._levels.filter((function(t,a){return a!==e||(n.steering&&n.steering.removeLevel(t),t===n.currentLevel&&(n.currentLevel=null,n.currentLevelIndex=-1,t.details&&t.details.fragments.forEach((function(e){return e.level=-1}))),!1)}));gs(s),this._levels=s,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);var r=s.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(cr.LEVELS_UPDATED,{levels:s})}}},{key:"onLevelsUpdated",value:function(e,t){var n=t.levels;this._levels=n}},{key:"checkMaxAutoUpdated",value:function(){var e=this.hls,t=e.autoLevelCapping,n=e.maxAutoLevel,s=e.maxHdcpLevel;this._maxAutoLevel!==n&&(this._maxAutoLevel=n,this.hls.trigger(cr.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:t,levels:this.levels,maxAutoLevel:n,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:s}))}}]),n}(kc);function Ph(i){var e={};i.forEach((function(t){var s=t.groupId||"";t.id=e[s]=e[s]||0,e[s]++}))}function Nh(){return self.SourceBuffer||self.WebKitSourceBuffer}function Uh(){if(!Cr())return!1;var e=Nh();return!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove}var Fh=function(e){T(n,e);var t=P(n);function n(e,r,s){var o;return A(this,n),(o=t.call(this,e,r,s,"stream-controller",vr)).audioCodecSwap=!1,o.level=-1,o._forceStartLoad=!1,o._hasEnoughToStart=!1,o.altAudio=0,o.audioOnly=!1,o.fragPlaying=null,o.fragLastKbps=0,o.couldBacktrack=!1,o.backtrackFragment=null,o.audioCodecSwitch=!1,o.videoBuffer=null,o.onMediaPlaying=function(){o.tick()},o.onMediaSeeked=function(){var e=o.media,t=e?e.currentTime:null;if(null!==t&&ir(t)&&(o.log("Media seeked to ".concat(t.toFixed(3))),o.getBufferedFrag(t))){var a=o.getFwdBufferInfoAtPos(e,t,vr,0);null!==a&&0!==a.len?o.tick():o.warn("Main forward buffer length at ".concat(t,' on "seeked" event ').concat(a?a.len:"empty",")"))}},o.registerListeners(),o}return I(n,[{key:"registerListeners",value:function(){y(S(n.prototype),"registerListeners",this).call(this);var e=this.hls;e.on(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.on(cr.LEVEL_LOADING,this.onLevelLoading,this),e.on(cr.LEVEL_LOADED,this.onLevelLoaded,this),e.on(cr.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(cr.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(cr.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(cr.BUFFER_CREATED,this.onBufferCreated,this),e.on(cr.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(cr.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(cr.FRAG_BUFFERED,this.onFragBuffered,this)}},{key:"unregisterListeners",value:function(){y(S(n.prototype),"unregisterListeners",this).call(this);var e=this.hls;e.off(cr.MANIFEST_PARSED,this.onManifestParsed,this),e.off(cr.LEVEL_LOADED,this.onLevelLoaded,this),e.off(cr.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(cr.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(cr.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(cr.BUFFER_CREATED,this.onBufferCreated,this),e.off(cr.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(cr.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(cr.FRAG_BUFFERED,this.onFragBuffered,this)}},{key:"onHandlerDestroying",value:function(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),y(S(n.prototype),"onHandlerDestroying",this).call(this)}},{key:"startLoad",value:function(e,t){if(this.levels){var s=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,!this.startFragRequested){var r=n.startLevel;-1===r&&(n.config.testBandwidth&&this.levels.length>1?(r=0,this.bitrateTest=!0):r=n.firstAutoLevel),n.nextLoadLevel=r,this.level=n.loadLevel,this._hasEnoughToStart=!!t}s>0&&-1===e&&!t&&(this.log("Override startPosition with lastCurrentTime @".concat(s.toFixed(3))),e=s),this.state=Os,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Rs}},{key:"stopLoad",value:function(){this._forceStartLoad=!1,y(S(n.prototype),"stopLoad",this).call(this)}},{key:"doTick",value:function(){switch(this.state){case Bs:var e=this.levels,t=this.level,s=null==e?void 0:e[t],n=null==s?void 0:s.details;if(n&&(!n.live||this.levelLastLoaded===s&&!this.waitForLive(s))){if(this.waitForCdnTuneIn(n))break;this.state=Os;break}if(this.hls.nextLoadLevel!==this.level){this.state=Os;break}break;case xs:this.checkRetryDate()}this.state===Os&&this.doTickIdle(),this.onTickEnd()}},{key:"onTickEnd",value:function(){var e;y(S(n.prototype),"onTickEnd",this).call(this),null!=(e=this.media)&&e.readyState&&!1===this.media.seeking&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}},{key:"doTickIdle",value:function(){var e=this.hls,t=this.levelLastLoaded,s=this.levels,n=this.media;if(null!==t&&(n||this.primaryPrefetch||!this.startFragRequested&&e.config.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)){var r=this.buffering?e.nextLoadLevel:e.loadLevel;if(null!=s&&s[r]){var a=s[r],o=this.getMainFwdBufferInfo();if(null!==o){var c=this.getLevelDetails();if(c&&this._streamEnded(o,c)){var p={};return 2===this.altAudio&&(p.type="video"),this.hls.trigger(cr.BUFFER_EOS,p),void(this.state=Ns)}if(this.buffering){e.loadLevel!==r&&-1===e.manualLevel&&this.log("Adapting to level ".concat(r," from level ").concat(this.level)),this.level=e.nextLoadLevel=r;var l=a.details;if(!l||this.state===Bs||this.waitForLive(a))return this.level=r,this.state=Bs,void(this.startFragRequested=!1);var u=o.len,d=this.getMaxBufferLength(a.maxBitrate);if(!(u>=d)){this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);var h=this.backtrackFragment?this.backtrackFragment.start:o.end,f=this.getNextFragment(h,l);if(this.couldBacktrack&&!this.fragPrevious&&f&&Kr(f)&&this.fragmentTracker.getState(f)!==Ha){var v,g=(null!=(v=this.backtrackFragment)?v:f).sn-l.startSN,m=l.fragments[g-1];m&&f.cc===m.cc&&(f=m,this.fragmentTracker.removeFragment(m))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(f&&this.isLoopLoading(f,h)){if(!f.gap){var y=this.audioOnly&&!this.altAudio?Hr:Wr,E=(y===Wr?this.videoBuffer:this.mediaBuffer)||this.media;E&&this.afterBufferFlushed(E,y,vr)}f=this.getNextFragmentLoopLoading(f,l,o,vr,d)}f&&(f.initSegment&&!f.initSegment.data&&!this.bitrateTest&&(f=f.initSegment),this.loadFragment(f,a,h))}}}}}}},{key:"loadFragment",value:function(e,t,s){var r=this.fragmentTracker.getState(e);r===Ba||r===Va?Kr(e)?this.bitrateTest?(this.log("Fragment ".concat(e.sn," of level ").concat(e.level," is being downloaded to test bitrate and will not be buffered")),this._loadBitrateTestFrag(e,t)):y(S(n.prototype),"loadFragment",this).call(this,e,t,s):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}},{key:"getBufferedFrag",value:function(e){return this.fragmentTracker.getBufferedFrag(e,vr)}},{key:"followingBufferedFrag",value:function(e){return e?this.getBufferedFrag(e.end+.5):null}},{key:"immediateLevelSwitch",value:function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}},{key:"nextLevelSwitch",value:function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var s,n=this.getAppendedFrag(t.currentTime);n&&n.start>1&&this.flushMainBuffer(0,n.start-1);var r=this.getLevelDetails();if(null!=r&&r.live){var o=this.getMainFwdBufferInfo();if(!o||o.len<2*r.targetduration)return}if(!t.paused&&e){var c=e[this.hls.nextLoadLevel],l=this.fragLastKbps;s=l&&this.fragCurrent?this.fragCurrent.duration*c.maxBitrate/(1e3*l)+1:0}else s=0;var a=this.getBufferedFrag(t.currentTime+s);if(a){var d=this.followingBufferedFrag(a);if(d){this.abortCurrentFrag();var h=d.maxStartPTS?d.maxStartPTS:d.start,f=d.duration,u=Math.max(a.end,h+Math.min(Math.max(f-this.config.maxFragLookUpTolerance,f*(this.couldBacktrack?.5:.125)),f*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}}},{key:"abortCurrentFrag",value:function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Ls:case Ds:case xs:case Ms:case Ps:this.state=Os}this.nextLoadPosition=this.getLoadPosition()}},{key:"flushMainBuffer",value:function(e,t){y(S(n.prototype),"flushMainBuffer",this).call(this,e,t,2===this.altAudio?"video":null)}},{key:"onMediaAttached",value:function(e,t){y(S(n.prototype),"onMediaAttached",this).call(this,e,t);var s=t.media;Ss(s,"playing",this.onMediaPlaying),Ss(s,"seeked",this.onMediaSeeked)}},{key:"onMediaDetaching",value:function(e,t){var s=this.media;s&&(As(s,"playing",this.onMediaPlaying),As(s,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,y(S(n.prototype),"onMediaDetaching",this).call(this,e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}},{key:"onManifestLoading",value:function(){y(S(n.prototype),"onManifestLoading",this).call(this),this.log("Trigger BUFFER_RESET"),this.hls.trigger(cr.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}},{key:"onManifestParsed",value:function(e,t){for(var s=!1,n=!1,r=0;r<t.levels.length;r++){var a=t.levels[r].audioCodec;a&&(s=s||-1!==a.indexOf("mp4a.40.2"),n=n||-1!==a.indexOf("mp4a.40.5"))}this.audioCodecSwitch=s&&n&&!function(){var i,e=Nh();return"function"==typeof(null==e||null==(i=e.prototype)?void 0:i.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}},{key:"onLevelLoading",value:function(e,t){if(this.levels&&this.state===Os){var n=t.levelInfo;(!n.details||n.details.live&&(this.levelLastLoaded!==n||n.details.expired)||this.waitForCdnTuneIn(n.details))&&(this.state=Bs)}}},{key:"onLevelLoaded",value:function(e,t){var s,n=this.levels,r=this.startFragRequested,a=t.level,o=t.details,c=o.totalduration;if(n){this.log("Level ".concat(a," loaded [").concat(o.startSN,",").concat(o.endSN,"]").concat(o.lastPartSn?"[part-".concat(o.lastPartSn,"-").concat(o.lastPartIndex,"]"):"",", cc [").concat(o.startCC,", ").concat(o.endCC,"] duration:").concat(c));var l=t.levelInfo,u=this.fragCurrent;u&&(this.state===Ds||this.state===xs)&&u.level!==t.level&&u.loader&&this.abortCurrentFrag();var d=0;if(o.live||null!=(s=l.details)&&s.live){var h;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;d=this.alignPlaylists(o,l.details,null==(h=this.levelLastLoaded)?void 0:h.details)}if(l.details=o,this.levelLastLoaded=l,r||this.setStartPosition(o,d),this.hls.trigger(cr.LEVEL_UPDATED,{details:o,level:a}),this.state===Bs){if(this.waitForCdnTuneIn(o))return;this.state=Os}r&&o.live&&this.synchronizeToLiveEdge(o),this.tick()}else this.warn("Levels were reset while loading level ".concat(a))}},{key:"synchronizeToLiveEdge",value:function(e){var t=this.config,s=this.media;if(s){var n=this.hls.liveSyncPosition,r=this.getLoadPosition(),a=e.fragmentStart,o=e.edge,c=r>=a-t.maxFragLookUpTolerance&&r<=o;if(null!==n&&s.duration>n&&(r<n||!c)){var u=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!c&&s.readyState<4||r<o-u)&&(this._hasEnoughToStart||(this.nextLoadPosition=n),s.readyState))if(this.warn("Playback: ".concat(r.toFixed(3)," is located too far from the end of live sliding playlist: ").concat(o,", reset currentTime to : ").concat(n.toFixed(3))),"buffered"===this.config.liveSyncMode){var l,d=uo.bufferInfo(s,n,0);if(null==(l=d.buffered)||!l.length)return void(s.currentTime=n);if(d.start<=r)return void(s.currentTime=n);var h=uo.bufferedInfo(d.buffered,r,0).nextStart;h&&(s.currentTime=h)}else s.currentTime=n}}}},{key:"_handleFragmentLoadProgress",value:function(e){var t,s=e.frag,n=e.part,r=e.payload,a=this.levels;if(a){var o=a[s.level];if(o){var c=o.details;if(!c)return this.warn("Dropping fragment ".concat(s.sn," of level ").concat(s.level," after level details were reset")),void this.fragmentTracker.removeFragment(s);var l=o.videoCodec,u=c.PTSKnown||!c.live,d=null==(t=s.initSegment)?void 0:t.data,h=this._getAudioCodec(o),f=this.transmuxer=this.transmuxer||new Ec(this.hls,vr,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),v=n?n.index:-1,p=-1!==v,g=new oo(s.level,s.sn,s.stats.chunkCount,r.byteLength,v,p),m=this.initPTS[s.cc];f.push(r,d,h,l,s,n,c.totalduration,u,g,m)}else this.warn("Level ".concat(s.level," not found on progress"))}else this.warn("Levels were reset while fragment load was in progress. Fragment ".concat(s.sn," of level ").concat(s.level," will not be buffered"))}},{key:"onAudioTrackSwitching",value:function(e,t){var n=this,s=this.hls,r=0!==this.altAudio;if(fa(t.url,s))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;a&&(this.log("Switching to main audio track, cancel main fragment load"),a.abortRequests(),this.fragmentTracker.removeFragment(a)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r)return this.altAudio=0,this.fragmentTracker.removeAllFragments(),s.once(cr.BUFFER_FLUSHED,(function(){n.hls&&n.hls.trigger(cr.AUDIO_TRACK_SWITCHED,t)})),void s.trigger(cr.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});s.trigger(cr.AUDIO_TRACK_SWITCHED,t)}}},{key:"onAudioTrackSwitched",value:function(e,t){var s=fa(t.url,this.hls);if(s){var n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=s?2:0,this.tick()}},{key:"onBufferCreated",value:function(e,t){var n,r,s=t.tracks,a=!1;for(var o in s){var c=s[o];if("main"===c.id){if(r=o,n=c,"video"===o){var l=s[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use ".concat(r,".buffered to schedule main fragment loading")),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}},{key:"onFragBuffered",value:function(e,t){var s=t.frag,n=t.part,r=s.type===vr;if(r){if(this.fragContextChanged(s))return this.warn("Fragment ".concat(s.sn).concat(n?" p: "+n.index:""," of level ").concat(s.level," finished buffering, but was aborted. state: ").concat(this.state)),void(this.state===Ps&&(this.state=Os));var o=n?n.stats:s.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),Kr(s)&&(this.fragPrevious=s),this.fragBufferedComplete(s,n)}var a=this.media;a&&(!this._hasEnoughToStart&&uo.getBuffered(a).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),r&&this.tick())}},{key:"hasEnoughToStart",get:function(){return this._hasEnoughToStart}},{key:"onError",value:function(e,t){var s;if(t.fatal)this.state=Us;else switch(t.details){case ur.FRAG_GAP:case ur.FRAG_PARSING_ERROR:case ur.FRAG_DECRYPT_ERROR:case ur.FRAG_LOAD_ERROR:case ur.FRAG_LOAD_TIMEOUT:case ur.KEY_LOAD_ERROR:case ur.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(vr,t);break;case ur.LEVEL_LOAD_ERROR:case ur.LEVEL_LOAD_TIMEOUT:case ur.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Bs&&(null==(s=t.context)?void 0:s.type)===dr&&(this.state=Os);break;case ur.BUFFER_ADD_CODEC_ERROR:case ur.BUFFER_APPEND_ERROR:if("main"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case ur.BUFFER_FULL_ERROR:if("main"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&(!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case ur.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}},{key:"onFragLoadEmergencyAborted",value:function(){this.state=Os,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}},{key:"onBufferFlushed",value:function(e,t){var n=t.type;if(n!==Hr||!this.altAudio){var s=(n===Wr?this.videoBuffer:this.mediaBuffer)||this.media;s&&(this.afterBufferFlushed(s,n,vr),this.tick())}}},{key:"onLevelsUpdated",value:function(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,-1===this.level&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}},{key:"swapAudioCodec",value:function(){this.audioCodecSwap=!this.audioCodecSwap}},{key:"seekToStartPos",value:function(){var e=this.media;if(e){var t=e.currentTime,s=this.startPosition;if(s>=0&&t<s){if(e.seeking)return void this.log("could not seek to ".concat(s,", already seeking at ").concat(t));var n=this.timelineOffset;n&&s&&(s+=n);var r=this.getLevelDetails(),a=uo.getBuffered(e),o=a.length?a.start(0):0,c=o-s,l=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||c>0&&(c<l||this.loadingParts&&c<2*((null==r?void 0:r.partTarget)||0)))&&(this.log("adjusting start position by ".concat(c," to match buffer start")),s+=c,this.startPosition=s),t<s&&(this.log("seek to target start position ".concat(s," from current time ").concat(t," buffer start ").concat(o)),e.currentTime=s)}}}},{key:"_getAudioCodec",value:function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t}},{key:"_loadBitrateTestFrag",value:function(e,t){var n=this;e.bitrateTest=!0,this._doFragLoad(e,t).then((function(s){var e=n.hls,r=null==s?void 0:s.frag;if(r&&!n.fragContextChanged(r)){t.fragmentError=0,n.state=Os,n.startFragRequested=!1,n.bitrateTest=!1;var a=r.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),e.trigger(cr.FRAG_LOADED,s),r.bitrateTest=!1}})).catch((function(s){n.state===Rs||n.state===Us||(n.warn(s),n.resetFragmentLoading(e))}))}},{key:"_handleTransmuxComplete",value:function(e){var t=this.playlistType,s=this.hls,n=e.remuxResult,r=e.chunkMeta,a=this.getCurrentContext(r);if(a){var o=a.frag,c=a.part,l=a.level,u=n.video,d=n.text,h=n.id3,f=n.initSegment,v=l.details,p=this.altAudio?void 0:n.audio;if(this.fragContextChanged(o))this.fragmentTracker.removeFragment(o);else{if(this.state=Ms,f){var g=f.tracks;if(g){var b=o.initSegment||o;if(this.unhandledEncryptionError(f,o))return;this._bufferInitSegment(l,g,b,r),s.trigger(cr.FRAG_PARSING_INIT_SEGMENT,{frag:b,id:t,tracks:g})}var m=f.initPTS,y=f.timescale,E=this.initPTS[o.cc];if(ir(m)&&(!E||E.baseTime!==m||E.timescale!==y)){var _=f.trackId;this.initPTS[o.cc]={baseTime:m,timescale:y,trackId:_},s.trigger(cr.INIT_PTS_FOUND,{frag:o,id:t,initPTS:m,timescale:y,trackId:_})}}if(u&&v){p&&"audiovideo"===u.type&&this.logMuxedErr(o);var k=v.fragments[o.sn-1-v.startSN],T=o.sn===v.startSN,w=!k||o.cc>k.cc;if(!1!==n.independent){var S=u.startPTS,A=u.endPTS,I=u.startDTS,R=u.endDTS;if(c)c.elementaryStreams[u.type]={startPTS:S,endPTS:A,startDTS:I,endDTS:R};else if(u.firstKeyFrame&&u.independent&&1===r.id&&!w&&(this.couldBacktrack=!0),u.dropped&&u.independent){var O=this.getMainFwdBufferInfo(),L=(O?O.end:this.getLoadPosition())+this.config.maxBufferHole,D=u.firstKeyFramePTS?u.firstKeyFramePTS:S;if(!T&&L<D-this.config.maxBufferHole&&!w)return void this.backtrack(o);w&&(o.gap=!0),o.setElementaryStreamInfo(u.type,o.start,A,o.start,R,!0)}else T&&S-(v.appliedTimelineOffset||0)>2&&(o.gap=!0);o.setElementaryStreamInfo(u.type,S,A,I,R),this.backtrackFragment&&(this.backtrackFragment=o),this.bufferFragmentData(u,o,c,r,T||w)}else{if(!T&&!w)return void this.backtrack(o);o.gap=!0}}if(p){var x=p.startPTS,C=p.endPTS,M=p.startDTS,P=p.endDTS;c&&(c.elementaryStreams[Hr]={startPTS:x,endPTS:C,startDTS:M,endDTS:P}),o.setElementaryStreamInfo(Hr,x,C,M,P),this.bufferFragmentData(p,o,c,r)}if(v&&null!=h&&h.samples.length){var N={id:t,frag:o,details:v,samples:h.samples};s.trigger(cr.FRAG_PARSING_METADATA,N)}if(v&&d){var U={id:t,frag:o,details:v,samples:d.samples};s.trigger(cr.FRAG_PARSING_USERDATA,U)}}}else this.resetWhenMissingContext(r)}},{key:"logMuxedErr",value:function(e){this.warn("".concat(Kr(e)?"Media":"Init"," segment with muxed audiovideo where only video expected: ").concat(e.url))}},{key:"_bufferInitSegment",value:function(e,t,s,n){var r=this;if(this.state===Ms){this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(s));var o=t.audio,a=t.video,c=t.audiovideo;if(o){var l=e.audioCodec,u=Pi(o.codec,l);"mp4a"===u&&(u="mp4a.40.5");var d=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5");var h=o.metadata;h&&"channelCount"in h&&1!==(h.channelCount||1)&&-1===d.indexOf("firefox")&&(u="mp4a.40.5")}u&&-1!==u.indexOf("mp4a.40.5")&&-1!==d.indexOf("android")&&"audio/mpeg"!==o.container&&(u="mp4a.40.2",this.log("Android: force audio codec to ".concat(u))),l&&l!==u&&this.log('Swapping manifest audio codec "'.concat(l,'" for "').concat(u,'"')),o.levelCodec=u,o.id=vr,this.log("Init audio buffer, container:".concat(o.container,", codecs[selected/level/parsed]=[").concat(u||"","/").concat(l||"","/").concat(o.codec,"]")),delete t.audiovideo}if(a){a.levelCodec=e.videoCodec,a.id=vr;var f=a.codec;if(4===(null==f?void 0:f.length))switch(f){case"hvc1":case"hev1":a.codec="hvc1.1.6.L120.90";break;case"av01":a.codec="av01.0.04M.08";break;case"avc1":a.codec="avc1.42e01e"}this.log("Init video buffer, container:".concat(a.container,", codecs[level/parsed]=[").concat(e.videoCodec||"","/").concat(f,"]").concat(a.codec!==f?" parsed-corrected="+a.codec:"").concat(a.supplemental?" supplemental="+a.supplemental:"")),delete t.audiovideo}c&&(this.log("Init audiovideo buffer, container:".concat(c.container,", codecs[level/parsed]=[").concat(e.codecs,"/").concat(c.co
2dec,"]")),delete t.video,delete t.audio);var v=Object.keys(t);if(v.length){if(this.hls.trigger(cr.BUFFER_CODECS,t),!this.hls)return;v.forEach((function(e){var o=t[e].initSegment;null!=o&&o.byteLength&&r.hls.trigger(cr.BUFFER_APPENDING,{type:e,data:o,frag:s,part:null,chunkMeta:n,parent:s.type})}))}this.tickImmediate()}}},{key:"getMainFwdBufferInfo",value:function(){var e=this.mediaBuffer&&2===this.altAudio?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,vr)}},{key:"maxBufferLength",get:function(){var e=this.levels,t=this.level,s=null==e?void 0:e[t];return s?this.getMaxBufferLength(s.maxBitrate):this.config.maxBufferLength}},{key:"backtrack",value:function(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Os}},{key:"checkFragmentChanged",value:function(){var e=this.media,t=null;if(e&&e.readyState>1&&!1===e.seeking){var s=e.currentTime;if(uo.isBuffered(e,s)?t=this.getAppendedFrag(s):uo.isBuffered(e,s+.1)&&(t=this.getAppendedFrag(s+.1)),t){this.backtrackFragment=null;var n=this.fragPlaying,r=t.level;(!n||t.sn!==n.sn||n.level!==r)&&(this.fragPlaying=t,this.hls.trigger(cr.FRAG_CHANGED,{frag:t}),(!n||n.level!==r)&&this.hls.trigger(cr.LEVEL_SWITCHED,{level:r}))}}}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentFrag",get:function(){var e;if(this.fragPlaying)return this.fragPlaying;var t=(null==(e=this.media)?void 0:e.currentTime)||this.lastCurrentTime;return ir(t)?this.getAppendedFrag(t):null}},{key:"currentProgramDateTime",get:function(){var e,t=(null==(e=this.media)?void 0:e.currentTime)||this.lastCurrentTime;if(ir(t)){var s=this.getLevelDetails(),n=this.currentFrag||(s?ma(null,s.fragments,t):null);if(n){var r=n.programDateTime;if(null!==r){var a=r+1e3*(t-n.start);return new Date(a)}}}return null}},{key:"currentLevel",get:function(){var e=this.currentFrag;return e?e.level:-1}},{key:"nextBufferedFrag",get:function(){var e=this.currentFrag;return e?this.followingBufferedFrag(e):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),n}(js),Bh=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),(o=t.call(this,"key-loader",r)).config=void 0,o.keyIdToKeyInfo={},o.emeController=null,o.config=e,o}return I(n,[{key:"abort",value:function(e){for(var s in this.keyIdToKeyInfo){var t=this.keyIdToKeyInfo[s].loader;if(t){var n;if(e&&e!==(null==(n=t.context)?void 0:n.frag.type))return;t.abort()}}}},{key:"detach",value:function(){for(var e in this.keyIdToKeyInfo){var t=this.keyIdToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}}},{key:"destroy",value:function(){for(var e in this.detach(),this.keyIdToKeyInfo){var t=this.keyIdToKeyInfo[e].loader;t&&t.destroy()}this.keyIdToKeyInfo={}}},{key:"createKeyLoadError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ur.KEY_LOAD_ERROR,s=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return new io({type:sr.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:r,error:s,networkDetails:n})}},{key:"loadClear",value:function(e,t,s){var n=this;if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(var r=function(){var a=t[o];if(e.cc<=a.cc&&(!Kr(e)||!Kr(a)||e.sn<a.sn)||!s&&o==c-1)return{v:n.emeController.selectKeySystemFormat(a).then((function(e){if(n.emeController){a.setKeyFormat(e);var t=No(e);return t?n.emeController.getKeySystemAccess([t]):void 0}}))}},o=0,c=t.length;o<c;o++){var l=r();if("object"===R(l))return l.v}if(this.config.requireKeySystemAccessOnStart){var d=Fo(this.config);if(d.length)return this.emeController.getKeySystemAccess(d)}}return null}},{key:"load",value:function(e){var t=this;return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then((function(n){return t.loadInternal(e,n)})):this.loadInternal(e)}},{key:"loadInternal",value:function(e,t){var s,n;t&&e.setKeyFormat(t);var r=e.decryptdata;if(!r){var o=new Error(t?"Expected frag.decryptdata to be defined after setting format ".concat(t):"Missing decryption data on fragment in onKeyLoading (emeEnabled with controller: ".concat(this.emeController&&this.config.emeEnabled,")"));return Promise.reject(this.createKeyLoadError(e,ur.KEY_LOAD_ERROR,o))}var a=r.uri;if(!a)return Promise.reject(this.createKeyLoadError(e,ur.KEY_LOAD_ERROR,new Error('Invalid key URI: "'.concat(a,'"'))));var c=jh(r),l=this.keyIdToKeyInfo[c];if(null!=(s=l)&&s.decryptdata.key)return r.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if(this.emeController&&null!=(n=l)&&n.keyLoadPromise)switch(this.emeController.getKeyStatus(l.decryptdata)){case"usable":case"usable-in-future":return l.keyLoadPromise.then((function(u){var t=u.keyInfo;return r.key=t.decryptdata.key,{frag:e,keyInfo:t}}))}switch(this.log("".concat(this.keyIdToKeyInfo[c]?"Rel":"L","oading").concat(r.keyId?" keyId: "+Nr(r.keyId):""," URI: ").concat(r.uri," from ").concat(e.type," ").concat(e.level)),l=this.keyIdToKeyInfo[c]={decryptdata:r,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},r.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===r.keyFormat?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,ur.KEY_LOAD_ERROR,new Error('Key supplied with unsupported METHOD: "'.concat(r.method,'"'))))}}},{key:"loadKeyEME",value:function(e,t){var s={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var n;if(!e.decryptdata.keyId&&null!=(n=t.initSegment)&&n.data){var a=function(i){var e=[];return fi(i,(function(t){return e.push(t.subarray(8,24))})),e}(t.initSegment.data);if(a.length){var r=a[0];r.some((function(e){return 0!==e}))?(this.log("Using keyId found in init segment ".concat(Nr(r))),Ho.setKeyIdForUri(e.decryptdata.uri,r)):(r=Ho.addKeyIdForUri(e.decryptdata.uri),this.log("Generating keyId to patch media ".concat(Nr(r)))),e.decryptdata.keyId=r}}if(!e.decryptdata.keyId&&!Kr(t))return Promise.resolve(s);var o=this.emeController.loadKey(s);
vendor: 8,415 bytes, line 2
2return(e.keyLoadPromise=o.then((function(a){return e.mediaKeySessionContext=a,s}))).catch((function(a){throw e.keyLoadPromise=null,"data"in a&&(a.data.frag=t),a}))}return Promise.resolve(s)}},{key:"loadKeyHTTP",value:function(e,t){var n=this,s=this.config,r=new(0,s.loader)(s);return t.keyLoader=e.loader=r,e.keyLoadPromise=new Promise((function(a,o){var c={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},l=s.keyLoadPolicy.default,u={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:function(e,t,r,p){var g=r.frag,c=r.keyInfo,l=jh(c.decryptdata);if(!g.decryptdata||c!==n.keyIdToKeyInfo[l])return o(n.createKeyLoadError(g,ur.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),p));c.decryptdata.key=g.decryptdata.key=new Uint8Array(e.data),g.keyLoader=null,c.loader=null,a({frag:g,keyInfo:c})},onError:function(e,r,l,p){n.resetLoader(r),o(n.createKeyLoadError(t,ur.KEY_LOAD_ERROR,new Error("HTTP Error ".concat(e.code," loading key ").concat(e.text)),l,wr({url:c.url,data:void 0},e)))},onTimeout:function(e,r,c){n.resetLoader(r),o(n.createKeyLoadError(t,ur.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),c))},onAbort:function(e,r,c){n.resetLoader(r),o(n.createKeyLoadError(t,ur.INTERNAL_ABORTED,new Error("key loading aborted"),c))}};r.load(c,u,d)}))}},{key:"resetLoader",value:function(e){var t=e.frag,s=e.keyInfo,n=e.url,r=s.loader;t.keyLoader===r&&(t.keyLoader=null,s.loader=null);var a=jh(s.decryptdata)||n;delete this.keyIdToKeyInfo[a],r&&r.destroy()}}]),n}(Sr);function jh(i){if(i.keyFormat!==Co){var e=i.keyId;if(e)return Nr(e)}return i.uri}function Vh(i){switch(i.type){case fr:return mr;case pr:return gr;default:return vr}}function Hh(i,e){var t=i.url;return(void 0===t||0===t.indexOf("data:"))&&(t=e.url),t}var Wh=function(){function e(t){A(this,e),this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=t,this.registerListeners()}return I(e,[{key:"startLoad",value:function(e){}},{key:"stopLoad",value:function(){this.destroyInternalLoaders()}},{key:"registerListeners",value:function(){var e=this.hls;e.on(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.on(cr.LEVEL_LOADING,this.onLevelLoading,this),e.on(cr.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(cr.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(cr.LEVELS_UPDATED,this.onLevelsUpdated,this)}},{key:"unregisterListeners",value:function(){var e=this.hls;e.off(cr.MANIFEST_LOADING,this.onManifestLoading,this),e.off(cr.LEVEL_LOADING,this.onLevelLoading,this),e.off(cr.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(cr.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(cr.LEVELS_UPDATED,this.onLevelsUpdated,this)}},{key:"createInternalLoader",value:function(e){var t=this.hls.config,s=t.pLoader,n=t.loader,a=new(s||n)(t);return this.loaders[e.type]=a,a}},{key:"getInternalLoader",value:function(e){return this.loaders[e.type]}},{key:"resetInternalLoader",value:function(e){this.loaders[e]&&delete this.loaders[e]}},{key:"destroyInternalLoaders",value:function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}},{key:"destroy",value:function(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}},{key:"onManifestLoading",value:function(e,t){var s=t.url;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:lr,url:s,deliveryDirectives:null,levelOrTrack:null})}},{key:"onLevelLoading",value:function(e,t){var s=t.id,n=t.level,r=t.pathwayId,a=t.url,o=t.deliveryDirectives,c=t.levelInfo;this.load({id:s,level:n,pathwayId:r,responseType:"text",type:dr,url:a,deliveryDirectives:o,levelOrTrack:c})}},{key:"onAudioTrackLoading",value:function(e,t){var s=t.id,n=t.groupId,r=t.url,a=t.deliveryDirectives,o=t.track;this.load({id:s,groupId:n,level:null,responseType:"text",type:fr,url:r,deliveryDirectives:a,levelOrTrack:o})}},{key:"onSubtitleTrackLoading",value:function(e,t){var s=t.id,n=t.groupId,r=t.url,a=t.deliveryDirectives,o=t.track;this.load({id:s,groupId:n,level:null,responseType:"text",type:pr,url:r,deliveryDirectives:a,levelOrTrack:o})}},{key:"onLevelsUpdated",value:function(e,t){var s=this.loaders[dr];if(s){var n=s.context;n&&!t.levels.some((function(e){return e===n.levelOrTrack}))&&(s.abort(),delete this.loaders[dr])}}},{key:"load",value:function(e){var t,n,r,o=this,s=this.hls.config,c=this.getInternalLoader(e);if(c){var l=this.hls.logger,u=c.context;if(u&&u.levelOrTrack===e.levelOrTrack&&(u.url===e.url||u.deliveryDirectives&&!e.deliveryDirectives))return void(u.url===e.url?l.log("[playlist-loader]: ignore ".concat(e.url," ongoing request")):l.log("[playlist-loader]: ignore ".concat(e.url," in favor of ").concat(u.url)));l.log("[playlist-loader]: aborting previous loader for type: ".concat(e.type)),c.abort()}if((n=e.type===lr?s.manifestLoadPolicy.default:kr({},s.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),c=this.createInternalLoader(e),ir(null==(t=e.deliveryDirectives)?void 0:t.part))&&(e.type===dr&&null!==e.level?r=this.hls.levels[e.level].details:e.type===fr&&null!==e.id?r=this.hls.audioTracks[e.id].details:e.type===pr&&null!==e.id&&(r=this.hls.subtitleTracks[e.id].details),r)){var d=r.partTarget,h=r.targetduration;if(d&&h){var f=1e3*Math.max(3*d,.8*h);n=kr({},n,{maxTimeToFirstByteMs:Math.min(f,n.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(f,n.maxTimeToFirstByteMs)})}}var a=n.errorRetry||n.timeoutRetry||{},v={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},m={onSuccess:function(e,u,t,n){var r=o.getInternalLoader(t);o.resetInternalLoader(t.type);var c=e.data;u.parsing.start=performance.now(),Qo.isMediaPlaylist(c)||t.type!==lr?o.handleTrackOrLevelPlaylist(e,u,t,n||null,r):o.handleMasterPlaylist(e,u,t,n)},onError:function(e,u,t,n){o.handleNetworkError(u,t,!1,e,n)},onTimeout:function(e,u,t){o.handleNetworkError(u,t,!0,void 0,e)}};c.load(e,v,m)}},{key:"checkAutostartLoad",value:function(){if(this.hls){var e=this.hls,t=e.config,n=t.autoStartLoad,r=t.startPosition,s=e.forceStartLoad;(n||s)&&(this.hls.logger.log("".concat(n?"auto":"force"," startLoad with configured startPosition ").concat(r)),this.hls.startLoad(r))}}},{key:"handleMasterPlaylist",value:function(e,t,s,n){var r=this,o=this.hls,a=e.data,c=Hh(e,s),l=Qo.parseMasterPlaylist(a,c);if(l.playlistParsingError)return t.parsing.end=performance.now(),void this.handleManifestParsingError(e,s,l.playlistParsingError,n,t);var d=l.contentSteering,u=l.levels,h=l.sessionData,f=l.sessionKeys,v=l.startTimeOffset,m=l.variableList;this.variableList=m,u.forEach((function(e){var t=e.unknownCodecs;if(t)for(var b=r.hls.config.preferManagedMediaSource,n=e.audioCodec,o=e.videoCodec,c=t.length;c--;){var l=t[c];Ai(l,"audio",b)?(e.audioCodec=n=n?"".concat(n,",").concat(l):l,wi.audio[n.substring(0,4)]=2,t.splice(c,1)):Ai(l,"video",b)&&(e.videoCodec=o=o?"".concat(o,",").concat(l):l,wi.video[o.substring(0,4)]=2,t.splice(c,1))}}));var y=Qo.parseMasterPlaylistMedia(a,c,l),E=y.AUDIO,p=void 0===E?[]:E,g=y.SUBTITLES,_=y["CLOSED-CAPTIONS"];p.length&&!p.some((function(e){return!e.url}))&&u[0].audioCodec&&!u[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),p.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new go({}),bitrate:0,url:""})),o.trigger(cr.MANIFEST_LOADED,{levels:u,audioTracks:p,subtitles:g,captions:_,contentSteering:d,url:c,stats:t,networkDetails:n,sessionData:h,sessionKeys:f,startTimeOffset:v,variableList:m})}},{key:"handleTrackOrLevelPlaylist",value:function(e,t,s,n,r){var a=this.hls,o=s.id,c=s.level,l=s.type,u=Hh(e,s),d=ir(c)?c:ir(o)?o:0,h=Vh(s),f=Qo.parseLevelPlaylist(e.data,u,d,h,0,this.variableList);if(l===lr){var v={attrs:new go({}),bitrate:0,details:f,name:"",url:u};f.requestScheduled=t.loading.start+fs(f,0),a.trigger(cr.MANIFEST_LOADED,{levels:[v],audioTracks:[],url:u,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),s.levelDetails=f,this.handlePlaylistLoaded(f,e,t,s,n,r)}},{key:"handleManifestParsingError",value:function(e,t,s,n,r){this.hls.trigger(cr.ERROR,{type:sr.NETWORK_E
2RROR,details:ur.MANIFEST_PARSING_ERROR,fatal:t.type===lr,url:e.url,err:s,error:s,reason:s.message,response:e,context:t,networkDetails:n,stats:r})}},{key:"handleNetworkError",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,a="A network ".concat(s?"timeout":"error"+(n?" (status "+n.code+")":"")," occurred while loading ").concat(e.type);e.type===dr?a+=": ".concat(e.level," id: ").concat(e.id):(e.type===fr||e.type===pr)&&(a+=" id: ".concat(e.id,' group-id: "').concat(e.groupId,'"'));var o=new Error(a);this.hls.logger.warn("[playlist-loader]: ".concat(a));var c=ur.UNKNOWN,l=!1,u=this.getInternalLoader(e);switch(e.type){case lr:c=s?ur.MANIFEST_LOAD_TIMEOUT:ur.MANIFEST_LOAD_ERROR,l=!0;break;case dr:c=s?ur.LEVEL_LOAD_TIMEOUT:ur.LEVEL_LOAD_ERROR,l=!1;break;case fr:c=s?ur.AUDIO_TRACK_LOAD_TIMEOUT:ur.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case pr:c=s?ur.SUBTITLE_TRACK_LOAD_TIMEOUT:ur.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(e.type);var d={type:sr.NETWORK_ERROR,details:c,fatal:l,url:e.url,loader:u,context:e,error:o,networkDetails:t,stats:r};if(n){var h=(null==t?void 0:t.url)||e.url;d.response=wr({url:h,data:void 0},n)}this.hls.trigger(cr.ERROR,d)}},{key:"handlePlaylistLoaded",value:function(e,t,s,n,r,a){var o=this.hls,c=n.type,l=n.level,u=n.levelOrTrack,d=n.id,h=n.groupId,f=n.deliveryDirectives,v=Hh(t,n),p=Vh(n),g="number"==typeof n.level&&p===vr?l:void 0,m=e.playlistParsingError;if(m){if(this.hls.logger.warn("".concat(m," ").concat(e.url)),!o.config.ignorePlaylistParsingErrors)return void o.trigger(cr.ERROR,{type:sr.NETWORK_ERROR,details:ur.LEVEL_PARSING_ERROR,fatal:!1,url:v,error:m,reason:m.message,response:t,context:n,level:g,parent:p,networkDetails:r,stats:s});e.playlistParsingError=null}if(e.fragments.length)switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),(!a.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),c){case lr:case dr:if(g)if(u){if(u!==o.levels[g]){var y=o.levels.indexOf(u);y>-1&&(g=y)}}else g=0;o.trigger(cr.LEVEL_LOADED,{details:e,levelInfo:u||o.levels[0],level:g||0,id:d||0,stats:s,networkDetails:r,deliveryDirectives:f,withoutMultiVariant:c===lr});break;case fr:o.trigger(cr.AUDIO_TRACK_LOADED,{details:e,track:u,id:d||0,groupId:h||"",stats:s,networkDetails:r,deliveryDirectives:f});break;case pr:o.trigger(cr.SUBTITLE_TRACK_LOADED,{details:e,track:u,id:d||0,groupId:h||"",stats:s,networkDetails:r,deliveryDirectives:f})}else{var E=e.playlistParsingError=new Error("No Segments found in Playlist");o.trigger(cr.ERROR,{type:sr.NETWORK_ERROR,details:ur.LEVEL_EMPTY_ERROR,fatal:!1,url:v,error:E,reason:E.message,response:t,context:n,level:g,parent:p,networkDetails:r,stats:s})}}}]),e}(),qh=function(){function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};A(this,i),this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new Gs,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;var t=this.logger=Dr(e.debug||!1,"Hls instance",e.assetPlayerId),s=this.config=kh(i.DefaultConfig,e,t);this.userConfig=e,s.progressive&&wh(s,t);var n=s.abrController,r=s.bufferController,a=s.capLevelController,o=s.errorController,c=s.fpsController,l=new o(this),u=this.abrController=new n(this),d=new Wa(this),h=s.interstitialsController,f=h?this.interstitialsController=new h(this,i):null,v=this.bufferController=new r(this,d),p=this.capLevelController=new a(this),g=new c(this),m=new Wh(this),y=s.contentSteeringController,E=y?new y(this):null,b=this.levelController=new Mh(this,E),_=new xh(this),k=new Bh(this.config,this.logger),T=this.streamController=new Fh(this,d,k),w=this.gapController=new Sh(this,d);p.setStreamController(T),g.setStreamController(T);var S=[m,b,T];f&&S.splice(1,0,f),E&&S.splice(1,0,E),this.networkControllers=S;var I=[u,v,w,p,g,_,d];this.audioTrackController=this.createController(s.audioTrackController,S);var R=s.audioStreamController;R&&S.push(this.audioStreamController=new R(this,d,k)),this.subtitleTrackController=this.createController(s.subtitleTrackController,S);var O=s.subtitleStreamController;O&&S.push(this.subtititleStreamController=new O(this,d,k)),this.createController(s.timelineController,I),k.emeController=this.emeController=this.createController(s.emeController,I),this.cmcdController=this.createController(s.cmcdController,I),this.latencyController=this.createController(Ch,I),this.coreComponents=I,S.push(l);var L=l.onErrorOut;"function"==typeof L&&this.on(cr.ERROR,L,l),this.on(cr.MANIFEST_LOADED,m.onManifestLoaded,m)}return I(i,[{key:"createController",value:function(e,t){if(e){var s=new e(this);return t&&t.push(s),s}return null}},{key:"on",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._emitter.on(e,t,s)}},{key:"once",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._emitter.once(e,t,s)}},{key:"removeAllListeners",value:function(e){this._emitter.removeAllListeners(e)}},{key:"off",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,n=arguments.length>3?arguments[3]:void 0;this._emitter.off(e,t,s,n)}},{key:"listeners",value:function(e){return this._emitter.listeners(e)}},{key:"emit",value:function(e,t,s){return this._emitter.emit(e,t,s)}},{key:"trigger",value:function(e,t){if(this.config.debug)return this.emit
vendor: 9,323 bytes, line 2
2(e,e,t);try{return this.emit(e,e,t)}catch(t){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),!this.triggeringException){this.triggeringException=!0;var n=e===cr.ERROR;this.trigger(cr.ERROR,{type:sr.OTHER_ERROR,details:ur.INTERNAL_EXCEPTION,fatal:n,event:e,error:t}),this.triggeringException=!1}}return!1}},{key:"listenerCount",value:function(e){return this._emitter.listenerCount(e)}},{key:"destroy",value:function(){this.logger.log("destroy"),this.trigger(cr.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach((function(e){return e.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(e){return e.destroy()})),this.coreComponents.length=0;var e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}},{key:"attachMedia",value:function(e){if(!e||"media"in e&&!e.media){var t=new Error("attachMedia failed: invalid argument (".concat(e,")"));this.trigger(cr.ERROR,{type:sr.OTHER_ERROR,details:ur.ATTACH_MEDIA_ERROR,fatal:!0,error:t})}else{this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());var n="media"in e,s=n?e.media:e,r=n?e:{media:s};this._media=s,this.trigger(cr.MEDIA_ATTACHING,r)}}},{key:"detachMedia",value:function(){this.logger.log("detachMedia"),this.trigger(cr.MEDIA_DETACHING,{}),this._media=null}},{key:"transferMedia",value:function(){this._media=null;var e=this.bufferController.transferMedia();return this.trigger(cr.MEDIA_DETACHING,{transferMedia:e}),e}},{key:"loadSource",value:function(e){this.stopLoad();var t=this.media,s=this._url,n=this._url=jr.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log("loadSource:".concat(n)),t&&s&&(s!==n||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(cr.MANIFEST_LOADING,{url:e})}},{key:"url",get:function(){return this._url}},{key:"hasEnoughToStart",get:function(){return this.streamController.hasEnoughToStart}},{key:"startPosition",get:function(){return this.streamController.startPositionValue}},{key:"startLoad",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=arguments.length>1?arguments[1]:void 0;this.logger.log("startLoad(".concat(e+(t?", <skip seek to start>":""),")")),this.started=!0,this.resumeBuffering();for(var s=0;s<this.networkControllers.length&&(this.networkControllers[s].startLoad(e,t),this.started&&this.networkControllers);s++);}},{key:"stopLoad",value:function(){this.logger.log("stopLoad"),this.started=!1;for(var e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!this.started&&this.networkControllers);e++);}},{key:"loadingEnabled",get:function(){return this.started}},{key:"bufferingEnabled",get:function(){return this.streamController.bufferingEnabled}},{key:"resumeBuffering",value:function(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach((function(e){e.resumeBuffering&&e.resumeBuffering()})))}},{key:"pauseBuffering",value:function(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach((function(e){e.pauseBuffering&&e.pauseBuffering()})))}},{key:"inFlightFragments",get:function(){var e=k({},vr,this.streamController.inFlightFrag);return this.audioStreamController&&(e[mr]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[gr]=this.subtititleStreamController.inFlightFrag),e}},{key:"swapAudioCodec",value:function(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}},{key:"recoverMediaError",value:function(){this.logger.log("recoverMediaError");var e=this._media,t=null==e?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}},{key:"removeLevel",value:function(e){this.levelController.removeLevel(e)}},{key:"sessionId",get:function(){var e=this._sessionId;return e||(e=this._sessionId=function(){try{return crypto.randomUUID()}catch(r){try{var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"==e?t:3&t|8).toString(16)}))}}}()),e}},{key:"levels",get:function(){return this.levelController.levels||[]}},{key:"latestLevelDetails",get:function(){return this.streamController.getLevelDetails()||null}},{key:"loadLevelObj",get:function(){return this.levelController.loadLevelObj}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){this.logger.log("set currentLevel:".concat(e)),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){this.logger.log("set nextLevel:".concat(e)),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){this.logger.log("set loadLevel:".concat(e)),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){this.logger.log("set firstLevel:".concat(e)),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){var e=this.levelController.startLevel;return-1===e&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e},set:function(e){this.logger.log("set startLevel:".concat(e)),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(this.logger.log("set autoLevelCapping:".concat(e)),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN},set:function(e){this.abrController.resetEstimator(e)}},{key:"abrEwmaDefaultEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.defaultEstimate:NaN}},{key:"ttfbEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimateTTFB():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(e){(function(i){return Qi.indexOf(i)>-1})(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var s=e.length,n=0;n<s;n++)if(e[n].maxBitrate>=t)return n;return 0}},{key:"maxAutoLevel",get:function(){var e,t=this.levels,n=this.autoLevelCapping,s=this.maxHdcpLevel;if(e=-1===n&&null!=t&&t.length?t.length-1:n,s)for(var r=e;r--;){var a=t[r].attrs["HDCP-LEVEL"];if(a&&a<=s)return r}return e}},{key:"firstAutoLevel",get:function(){return this.abrController.firstAutoLevel}},{key:"nextAutoLevel",get:function(){return this.abrController.nextAutoLevel},set:function(e){this.abrController.nextAutoLevel=e}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"maxBufferLength",get:function(){return this.streamController.maxBufferLength}},{key:"setAudioOption",value:function(e){var t;return(null==(t=this.audioTrackController)?void 0:t.setAudioOption(e))||null}},{key:"setSubtitleOption",value:function(e){var t;return(null==(t=this.subtitleTrackController)?void 0:t.setSubtitleOption(e))||null}},{key:"allAudioTracks",get:function(){var e=this.audioTrackController;return e?e.allAudioTracks:[]}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"allSubtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}
2,set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency},set:function(e){this.latencyController.targetLatency=e}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}},{key:"pathways",get:function(){return this.levelController.pathways}},{key:"pathwayPriority",get:function(){return this.levelController.pathwayPriority},set:function(e){this.levelController.pathwayPriority=e}},{key:"bufferedToEnd",get:function(){var e;return!(null==(e=this.bufferController)||!e.bufferedToEnd)}},{key:"interstitialsManager",get:function(){var e;return(null==(e=this.interstitialsController)?void 0:e.interstitialsManager)||null}},{key:"getMediaDecodingInfo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.allAudioTracks,s=sa(t);return Wi(e,s,navigator.mediaCapabilities)}}],[{key:"version",get:function(){return Ks}},{key:"isMSESupported",value:function(){return Uh()}},{key:"isSupported",value:function(){return function(){if(!Uh())return!1;var i=Cr();return"function"==typeof(null==i?void 0:i.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some((function(e){return i.isTypeSupported(Ri(e,"video"))}))||["mp4a.40.2","fLaC"].some((function(e){return i.isTypeSupported(Ri(e,"audio"))})))}()}},{key:"getMediaSource",value:function(){return Cr()}},{key:"Events",get:function(){return cr}},{key:"MetadataSchema",get:function(){return li}},{key:"ErrorTypes",get:function(){return sr}},{key:"ErrorDetails",get:function(){return ur}},{key:"DefaultConfig",get:function(){return i.defaultConfig?i.defaultConfig:_h},set:function(e){i.defaultConfig=e}}]),i}();qh.defaultConfig=void 0;var Gh=qh,Kh="video",Yh="drm",$h={NOT_AN_ERROR:0,NETWORK_OFFLINE:2000002,NETWORK_RECONNECTING:2000003,NETWORK_UNKNOWN_ERROR:2e6,NETWORK_NO_STATUS:2000001,NETWORK_INVALID_URL:24e5,NETWORK_NOT_FOUND:2404e3,NETWORK_NOT_READY:2412e3,NETWORK_GENERIC_SERVER_FAIL:25e5,NETWORK_TOKEN_MISSING:2403201,NETWORK_TOKEN_MALFORMED:2412202,NETWORK_TOKEN_EXPIRED:2403210,NETWORK_TOKEN_AUD_MISSING:2403221,NETWORK_TOKEN_AUD_MISMATCH:2403222,NETWORK_TOKEN_SUB_MISMATCH:2403232,ENCRYPTED_ERROR:5e6,ENCRYPTED_UNSUPPORTED_KEY_SYSTEM:5000001,ENCRYPTED_GENERATE_REQUEST_FAILED:5000002,ENCRYPTED_UPDATE_LICENSE_FAILED:5000003,ENCRYPTED_UPDATE_SERVER_CERT_FAILED:5000004,ENCRYPTED_CDM_ERROR:5000005,ENCRYPTED_OUTPUT_RESTRICTED:5000006,ENCRYPTED_MISSING_TOKEN:5000002},Qh=function(i){return i===Kh?"playback":i},zh=function(e){T(n,e);var t=P(n);function n(e){var r,o,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.MEDIA_ERR_CUSTOM,s=arguments.length>2?arguments[2]:void 0,l=arguments.length>3?arguments[3]:void 0;return A(this,n),(r=t.call(this,e)).name="MediaError",r.code=c,r.context=l,r.fatal=null!=s?s:c>=n.MEDIA_ERR_NETWORK&&c<=n.MEDIA_ERR_ENCRYPTED,r.message||(r.message=null!=(o=n.defaultMessages[r.code])?o:""),r}return I(n)}(E(Error));zh.MEDIA_ERR_ABORTED=1,zh.MEDIA_ERR_NETWORK=2,zh.MEDIA_ERR_DECODE=3,zh.MEDIA_ERR_SRC_NOT_SUPPORTED=4,zh.MEDIA_ERR_ENCRYPTED=5,zh.MEDIA_ERR_CUSTOM=100,zh.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail.",3:"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.",4:"An unsupported error occurred. The server or network failed, or your browser does not support this format.",5:"The media is encrypted and there are no keys to decrypt it."};var Xh=zh,Jh=function(i,e){return!function(i){return null==i}(e)&&i in e},Zh={ANY:"any",MUTED:"muted"},ef={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},tf="mse",nf="native",rf={HEADER:"header",QUERY:"query",NONE:"none"},af=Object.values(rf),of={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},sf={HLS:of.M3U8},uf=(Object.keys(sf),[].concat(v(Object.values(of)),["hls","HLS"]),{co
2de:"en"}),cf=function(i,e,t,s){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:i;n.addEventListener(e,t,s),i.addEventListener("teardown",(function(){n.removeEventListener(e,t)}),{once:!0})};var lf=function(i){var e=i.indexOf("?");return e<0?[i]:[i.slice(0,e),i.slice(e)]},df=function(i){var e=i.type;if(e){var t=e.toUpperCase();return Jh(t,sf)?sf[t]:e}return pf(i)},hf=function(i){return"VOD"===i?ef.ON_DEMAND:ef.LIVE},ff=function(i){return"EVENT"===i?Number.POSITIVE_INFINITY:"VOD"===i?Number.NaN:0},pf=function(i){var e=i.src;if(!e)return"";var t="";try{t=mf(e).pathname}catch(t){console.error("Invalid url when trying to infer mime type",e)}var s=t.lastIndexOf(".");if(s<0)return gf(i)?of.M3U8:"";var n=t.slice(s+1).toUpperCase();return Jh(n,of)?of[n]:""},vf=function(i){try{return new URL(i),!1}catch(e){return!0}},mf=function(i,e){var t;if(!vf(i))return new URL(i);var s=null==(t=null==window?void 0:window.location)?void 0:t.href,n=null!=e?e:s;return e&&vf(e.toString())&&(n=new URL(e,s)),new URL(i,n)},gf=function(e){var t,i=e.src,n=e.customDomain,r=void 0===n?"mux.com":n;try{t=new URL("".concat(i))}catch(e){return!1}var s="https:"===t.protocol,o=t.hostname==="stream.".concat(r).toLowerCase(),c=t.pathname.split("/"),a=2===c.length,l=!(null!=c&&c[1].includes("."));return s&&o&&a&&l},yf=function(i){var e=(null!=i?i:"").split(".")[1];if(e)try{var t=e.replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(s)}catch(e){return}},bf=function(e){var i=e.exp,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();return!i||1e3*i<t},Ef=function(e,t){return e.sub!==t},_f=function(e,t){return!e.aud},kf=function(e,t){return e.aud!==t},Tf="en";function wf(i){var e,s,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t&&null!=(s=null==(e=uf)?void 0:e[i])?s:i,r=t?uf.code:Tf;return new Sf(n,r)}var Sf=function(){function e(i){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null!=(t=uf)?t:Tf;A(this,e),this.message=i,this.locale=n}return I(e,[{key:"format",value:function(i){return this.message.replace(/\{(\w+)\}/g,(function(e,t){var s;return null!=(s=i[t])?s:""}))}},{key:"toString",value:function(){return this.message}}]),e}(),Af=Object.values(Zh),If=function(i){return"boolean"==typeof i||"string"==typeof i&&Af.includes(i)},Rf=function(i,e){if(e){var t=i.muted,s=function(){return i.muted=t};switch(e){case Zh.ANY:i.play().catch((function(){i.muted=!0,i.play().catch(s)}));break;case Zh.MUTED:i.muted=!0,i.play().catch(s);break;default:i.play().catch((function(){}))}}};function Of(i,e){var t;if("videoTracks"in i){var s=new WeakMap;e.on(Gh.Events.MANIFEST_PARSED,(function(e,u){c();var t=i.addVideoTrack("main");t.selected=!0;var n,r=C(u.levels.entries());try{for(r.s();!(n=r.n()).done;){var o=m(n.value,2),l=o[0],d=o[1],h=t.addRendition(d.url[0],d.width,d.height,d.videoCodec,d.bitrate);s.set(d,"".concat(l)),h.id="".concat(l)}}catch(e){r.e(e)}finally{r.f()}})),e.on(Gh.Events.AUDIO_TRACKS_UPDATED,(function(e,u){o();var t,n=C(u.audioTracks);try{for(n.s();!(t=n.n()).done;){var r=t.value,c=r.default?"main":"alternative",l=i.addAudioTrack(c,r.name,r.lang);l.id="".concat(r.id),r.default&&(l.enabled=!0)}}catch(e){n.e(e)}finally{n.f()}}));var n=function(){var t,u=+(null==(t=v(i.audioTracks).find((function(e){return e.enabled})))?void 0:t.id),n=e.audioTracks.map((function(e){return e.id}));u!=e.audioTrack&&n.includes(u)&&(e.audioTrack=u)};i.audioTracks.addEventListener("change",n),e.on(Gh.Events.LEVELS_UPDATED,(function(e,u){var t,n=i.videoTracks[null!=(t=i.videoTracks.selectedIndex)?t:0];if(n){var r,o=u.levels.map((function(e){return s.get(e)})),c=C(i.videoRenditions);try{for(c.s();!(r=c.n()).done;){var l=r.value;l.id&&!o.includes(l.id)&&n.removeRendition(l)}}catch(e){c.e(e)}finally{c.f()}}}));var r=function(t){var u=t.target.selectedIndex;u!=e.nextLevel&&(e.nextLevel=u)};null==(t=i.videoRenditions)||t.addEventListener("change",r);var o=function(){var e,t=C(i.audioTracks);try{for(t.s();!(e=t.n()).done;){var n=e.value;i.removeAudioTrack(n)}}catch(e){t.e(e)}finally{t.f()}},c=function(){(function(){var e,t=C(i.videoTracks);try{for(t.s();!(e=t.n()).done;){var n=e.value;i.removeVideoTrack(n)}}catch(e){t.e(e)}finally{t.f()}})(),o()};e.once(Gh.Events.DESTROYING,(function(){var e,u;c(),null==(e=i.audioTracks)||e.removeEventListener("change",n),null==(u=i.videoRenditions)||u.removeEventListener("change",r)}))}}var Lf=function(i){return"time"in i?i.time:i.startTime};function Df(i,e,t,s,n,r){var a=document.createElement("track");return a.kind=e,a.label=t,s&&(a.srclang=s),n&&(a.id=n),r&&(a.default=!0),a.track.mode=["subtitles","captions"].includes(e)?"disabled":"hidden",a.setAttribute("data-removeondestroy",""),i.append(a),a.track}function xf(i,e,t){var s;return null==(s=Array.from(i.querySelectorAll("track")).find((function(n){return n.track.label===e&&n.track.kind===t})))?void 0:s.track}function Cf(e,t,n,r){return Mf.apply(this,arguments)}function Mf(){return(Mf=f(regeneratorRuntime.mark((function e(i,t,n,s){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=xf(i,n,s),e.t0=r,e.t0){e.next=7;break}return(r=Df(i,s,n)).mode="hidden",e.next=7,new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}));case 7:return"hidden"!==r.mode&&(r.mode="hidden"),v(t).sort((function(e,a){return Lf(a)-Lf(e)}
2)).forEach((function(e){var a,t,n=e.value,o=Lf(e);if("endTime"in e&&null!=e.endTime)null==r||r.addCue(new VTTCue(o,e.endTime,"chapters"===s?n:JSON.stringify(null!=n?n:null)));else{var u=Array.prototype.findIndex.call(null==r?void 0:r.cues,(function(e){return e.startTime>=o})),c=null==(a=null==r?void 0:r.cues)?void 0:a[u],l=c?c.startTime:Number.isFinite(i.duration)?i.duration:Number.MAX_SAFE_INTEGER,d=null==(t=null==r?void 0:r.cues)?void 0:t[u-1];d&&(d.endTime=o),null==r||r.addCue(new VTTCue(o,l,"chapters"===s?n:JSON.stringify(null!=n?n:null)))}})),i.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e.abrupt("return",r);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Pf="cuepoints",Nf=Object.freeze({label:Pf});function Uf(e,t){return Ff.apply(this,arguments)}function Ff(){return(Ff=f(regeneratorRuntime.mark((function e(i,t){var n,r=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>2&&void 0!==r[2]?r[2]:Nf,e.abrupt("return",Cf(i,t,n.label,"metadata"));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Bf=function(i){return{time:i.startTime,value:JSON.parse(i.text)}};function jf(i){var e,s,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{label:Pf},n=xf(i,t.label,"metadata");if(null!=(e=null==n?void 0:n.activeCues)&&e.length){if(1===n.activeCues.length)return Bf(n.activeCues[0]);var r=i.currentTime,a=Array.prototype.find.call(null!=(s=n.activeCues)?s:[],(function(e){var t=e.startTime,n=e.endTime;return t<=r&&n>r}));return Bf(a||n.activeCues[0])}}function Vf(){return(Vf=f(regeneratorRuntime.mark((function e(i){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:Nf,e.abrupt("return",new Promise((function(e){cf(i,"loadstart",f(regeneratorRuntime.mark((function n(){var s;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Uf(i,[],t);
2case 2:s=n.sent,cf(i,"cuechange",(function(){var e=jf(i);if(e){var t=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:e});i.dispatchEvent(t)}}),{},s),e(s);case 4:case"end":return n.stop()}}),n)}))))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Hf="chapters",Wf=Object.freeze({label:Hf}),qf=function(i){return{startTime:i.startTime,endTime:i.endTime,value:i.text}};function Gf(e,t){return Kf.apply(this,arguments)}function Kf(){return(Kf=f(regeneratorRuntime.mark((function e(i,t){var n,r=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>2&&void 0!==r[2]?r[2]:Wf,e.abrupt("return",Cf(i,t,n.label,"chapters"));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Yf(i){var e,s,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{label:Hf},n=xf(i,t.label,"chapters");if(null!=(e=null==n?void 0:n.activeCues)&&e.length){if(1===n.activeCues.length)return qf(n.activeCues[0]);var r=i.currentTime,a=Array.prototype.find.call(null!=(s=n.activeCues)?s:[],(function(e){var t=e.startTime,n=e.endTime;return t<=r&&n>r}));return qf(a||n.activeCues[0])}}function $f(){return($f=f(regeneratorRuntime.mark((function e(i){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:Wf,e.abrupt("return",new Promise((function(e){cf(i,"loadstart",f(regeneratorRuntime.mark((function n(){var s;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Gf(i,[],t);
2case 2:s=n.sent,cf(i,"cuechange",(function(){var e=Yf(i);if(e){var t=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:e});i.dispatchEvent(t)}}),{},s),e(s);case 4:case"end":return n.stop()}}),n)}))))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Qf="v",zf="t",Xf="s",Jf="d",Zf=function(i){return i===Kh?Qf:i===Yh?Jf:void 0},ep=function(i,e){var t,s,n=Qh(i),r="".concat(n,"Token");return null!=(t=e.tokens)&&t[n]?null==(s=e.tokens)?void 0:s[n]:Jh(r,e)?e[r]:void 0},tp=function(i,e,t,s){var a,n,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:!function(a){return null==(a=globalThis.navigator)?void 0:a.onLine}();if(o){var c,l=wf("Your device appears to be offline",r),d=Xh.MEDIA_ERR_NETWORK,b=new Xh(l,d,!1,c);return b.errorCategory=e,b.muxCode=$h.NETWORK_OFFLINE,b.data=i,b}var h="status"in i?i.status:i.code,f=Date.now(),u=Xh.MEDIA_ERR_NETWORK;if(200!==h){var v=Qh(e),y=ep(e,t),E=Zf(e),_=lf(null!=(a=t.playbackId)?a:""),k=m(_,1),T=k[0];if(h&&T){var p=yf(y);if(y&&!p){var w=wf("The {tokenNamePrefix}-token provided is invalid or malformed.",r).format({tokenNamePrefix:v}),S=wf("Compact JWT string: {token}",r).format({token:y}),A=new Xh(w,u,!0,S);return A.errorCategory=e,A.muxCode=$h.NETWORK_TOKEN_MALFORMED,A.data=i,A}if(h>=500){var I=new Xh("",u,null==s||s);return I.errorCategory=e,I.muxCode=$h.NETWORK_UNKNOWN_ERROR,I}if(403===h){if(!p){var R=wf("Authorization error trying to access this {category} URL. If this is a signed URL, you might need to provide a {tokenNamePrefix}-token.",r).format({tokenNamePrefix:v,category:e}),O=wf("Specified playback ID: {playbackId}",r).format({playbackId:T}),L=new Xh(R,u,null==s||s,O);return L.errorCategory=e,L.muxCode=$h.NETWORK_TOKEN_MISSING,L.data=i,L}if(bf(p,f)){var D={timeStyle:"medium",dateStyle:"medium"},x=wf("The video’s secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:v}),C=wf("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat("en",D).format(null!=(n=p.exp)?n:0),currentDate:new Intl.DateTimeFormat("en",D).format(f)}),M=new Xh(x,u,!0,C);return M.errorCategory=e,M.muxCode=$h.NETWORK_TOKEN_EXPIRED,M.data=i,M}if(Ef(p,T)){var P=wf("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:v}),N=wf("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:v,playbackId:T,tokenPlaybackId:p.sub}),U=new Xh(P,u,!0,N);return U.errorCategory=e,U.muxCode=$h.NETWORK_TOKEN_SUB_MISMATCH,U.data=i,U}if(_f(p)){var F=wf("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:v}),B=wf("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:v,expectedAud:E}),j=new Xh(F,u,!0,B);return j.errorCategory=e,j.muxCode=$h.NETWORK_TOKEN_AUD_MISSING,j.data=i,j}if(kf(p,E)){var V=wf("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:v}),H=wf("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:v,expectedAud:E,aud:p.aud}),W=new Xh(V,u,!0,H);return W.errorCategory=e,W.muxCode=$h.NETWORK_TOKEN_AUD_MISMATCH,W.data=i,W}}if(412===h){var G=wf("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),K=wf("Specified playback ID: {playbackId}",r).format({playbackId:T}),Y=new Xh(G,u,null==s||s,K);return Y.errorCategory=e,Y.muxCode=$h.NETWORK_NOT_READY,Y.streamType=t.streamType===ef.LIVE?"live":t.streamType===ef.ON_DEMAND?"on-demand":"unknown",Y.data=i,Y}if(404===h){var $=wf("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),Q=wf("Specified playback ID: {playbackId}",r).format({playbackId:T}),z=new Xh($,u,null==s||s,Q);return z.errorCategory=e,z.muxCode=$h.NETWORK_NOT_FOUND,z.data=i,z}
2if(400===h){var X=wf("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),J=wf("Specified playback ID: {playbackId}",r).format({playbackId:T}),Z=new Xh(X,u,null==s||s,J);return Z.errorCategory=e,Z.muxCode=$h.NETWORK_INVALID_URL,Z.data=i,Z}var g=new Xh("",u,null==s||s);return g.errorCategory=e,g.muxCode=$h.NETWORK_UNKNOWN_ERROR,g.data=i,g}}},np=Gh.DefaultConfig.capLevelController,ip={"720p":921600,"1080p":2073600,"1440p":4194304,"2160p":8294400};var ap=function(e){T(n,e);var t=P(n);function n(e){return A(this,n),t.call(this,e)}return I(n,[{key:"getMaxAutoResolution",value:function(){var e,t=this.hls;return null!=(e=n.maxAutoResolution.get(t))?e:void 0}},{key:"levels",get:function(){var e;return null!=(e=this.hls.levels)?e:[]}},{key:"getValidLevels",value:function(e){var t=this;return this.levels.filter((function(n,s){return t.isLevelAllowed(n)&&s<=e}))}},{key:"getMaxLevelCapped",value:function(e){var t=this.getValidLevels(e),s=this.getMaxAutoResolution();if(!s)return y(S(n.prototype),"getMaxLevel",this).call(this,e);var r=function(i){var e=i.toLowerCase().trim();return ip[e]}(s);if(!r)return y(S(n.prototype),"getMaxLevel",this).call(this,e);var o=t.filter((function(e){return e.width*e.height<=r})),a=o.findIndex((function(e){return e.width*e.height===r}));if(-1!==a){var c=o[a];return t.findIndex((function(e){return e===c}))}if(0===o.length)return 0;var l=o[o.length-1];return t.findIndex((function(e){return e===l}))}},{key:"getMaxLevel",value:function(e){if(void 0!==this.getMaxAutoResolution())return this.getMaxLevelCapped(e);var t=y(S(n.prototype),"getMaxLevel",this).call(this,e),s=this.getValidLevels(e);if(!s[t])return t;var r=Math.min(s[t].width,s[t].height),o=n.minMaxResolution;return r>=o?t:np.getMaxLevelByMediaSize(s,o*(16/9),o)}}],[{key:"setMaxAutoResolution",value:function(e,t){t?n.maxAutoResolution.set(e,t):n.maxAutoResolution.delete(e)}}]),n}(np);ap.minMaxResolution=720,ap.maxAutoResolution=new WeakMap;var op=ap,sp=function(i,e){var t=function(i){for(var e=new ArrayBuffer(2*i.length),t=new DataView(e),s=0;s<i.length;
2s++)t.setUint16(2*s,i.charCodeAt(s),!0);return e}(up(i)),s=new Uint8Array(i),n=new Uint8Array(t),r=new Uint8Array(e),a=s.byteLength+4+r.byteLength+4+n.byteLength,o=new Uint8Array(a),c=0,l=function(e){o.set(e,c),c+=e.byteLength},u=function(e){var t=new DataView(o.buffer),n=e.byteLength;t.setUint32(c,n,!0),c+=4,l(e)};return l(s),u(n),u(r),o},up=function(i){return new TextDecoder("utf-16le").decode(i).replace("skd://","").slice(1)};var cp=function(e){var i=e.mediaEl,t=e.getAppCertificate,n=e.getLicenseKey,s=e.saveAndDispatchError,r=e.drmTypeCb,o=e.fallbackToWebkitFairplay,a=null,c=function(){var e=f(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"skd"===(n=t.initDataType)){e.next=5;break}return console.error('Received unexpected initialization data type "'.concat(n,'"')),e.abrupt("return");case 5:if(e.t0=i.mediaKeys,e.t0){e.next=9;break}return e.next=9,l(n);case 9:if(null!=(r=t.initData)){e.next=13;break}return console.error("Could not start encrypted playback due to missing initData in ".concat(t.type," event")),e.abrupt("return");case 13:return e.next=15,d(n,r);case 15:e.next=21;break;case 17:return e.prev=17,e.t1=e.catch(0),s(i,e.t1),e.abrupt("return");case 21:case"end":return e.stop()}}),e,null,[[0,17]])})));return function(t){return e.apply(this,arguments)}}(),l=function(){var e=f(regeneratorRuntime.mark((function e(n){var o,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[n],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then((function(e){return r(),e})).catch((function(){var e=wf("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),p=new Xh(e,Xh.MEDIA_ERR_ENCRYPTED,!0);p.errorCategory=Yh,p.muxCode=$h.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,s(i,p)}));case 2:if(o=e.sent){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,o.createMediaKeys();case 7:return c=e.sent,e.prev=8,e.next=11,t();case 11:return l=e.sent,e.next=14,c.setServerCertificate(l).catch((function(){var p=wf("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),g=new Xh(p,Xh.MEDIA_ERR_ENCRYPTED,!0);return g.errorCategory=Yh,g.muxCode=$h.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(g)}));case 14:e.next=20;break;case 16:return e.prev=16,e.t0=e.catch(8),s(i,e.t0),e.abrupt("return");case 20:return e.next=22,i.setMediaKeys(c);case 22:case"end":return e.stop()}}),e,null,[[8,16]])})));return function(t){return e.apply(this,arguments)}}(),d=function(){var e=f(regeneratorRuntime.mark((function e(t,r){var c,l,p,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=i.mediaKeys.createSession(),l=function(){var e=f(regeneratorRuntime.mark((function e(t){var r,o,b,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.message,e.next=3,n(r);case 3:return o=e.sent,e.prev=4,e.next=7,c.update(o);case 7:e.next=13;break;case 9:e.prev=9,e.t0=e.catch(4),b=wf("Failed to update DRM license. This may be an issue with the player or your protected content."),(l=new Xh(b,Xh.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=Yh,l.muxCode=$h.ENCRYPTED_UPDATE_LICENSE_FAILED,s(i,l);case 13:case"end":return e.stop()}}),e,null,[[4,9]])})));return function(t){return e.apply(this,arguments)}}(),p=function(){c.keyStatuses.forEach((function(e){return function(e){var t;if("internal-error"===e){var b=wf("The DRM Content Decryption Module system had an internal failure. Try reloading the page, updating your browser, or playing in another browser.");(t=new Xh(b,Xh.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=Yh,t.muxCode=$h.ENCRYPTED_CDM_ERROR}else if("output-restricted"===e||"output-downscaled"===e){var n=wf("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");(t=new Xh(n,Xh.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=Yh,t.muxCode=$h.ENCRYPTED_OUTPUT_RESTRICTED}t&&s(i,t)}(e)}))},c.addEventListener("keystatuseschange",p),c.addEventListener("message",l),g=function(){var e=f(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c.removeEventListener("keystatuseschange",p),c.removeEventListener("message",l),"webkitCurrentPlaybackTargetIsWireless"in i&&i.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",g),i.removeEventListener("teardown",g),e.next=6,c.close().catch((function(e){console.warn("There was an error when closing EME session",e)}));case 6:a=null;case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),"webkitCurrentPlaybackTargetIsWireless"in i&&i.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",g,{once:!0}),i.addEventListener("teardown",g,{once:!0}),a=g,e.next=8,c.generateRequest(t,r).catch(function(){var e=f(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("NotSupportedError"!==t.name||!("webkitCurrentPlaybackTargetIsWireless"in i)||!i.webkitCurrentPlaybackTargetIsWireless){e.next=4;break}console.warn("Failed to generate a DRM license request. Attempting to fallback to Webkit DRM"),null==o||o(),e.next=6;break;case 4:return n=wf("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),r=new Xh(n,Xh.MEDIA_ERR_ENCRYPTED,!0),e.abrupt("return",(r.errorCategory=Yh,r.muxCode=$h.ENCRYPTED_GENERATE_REQUEST_FAILED,console.error("Failed to generate license request",t),Promise.reject(r)));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),u=function(){var e=f(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.removeEventListener("encrypted",c),i.removeEventListener("teardown",u),e.t0=a,!e.t0){e.next=6;break}return e.next=6,a();
2case 6:return e.next=8,i.setMediaKeys(null).catch((function(){}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return i.addEventListener("encrypted",c),i.addEventListener("teardown",u,{once:!0}),u},lp=function(e){var a,t,i=e.hls,n=e.mediaEl,r=e.src,s=e.muxMediaState,o=e.saveAndDispatchError,c=e.maxRetries,l=0,d=!1,u=!1,h=!1,f=function(){null!=t&&(clearTimeout(t),t=void 0)},v=function(e){return(null==e?void 0:e.muxCode)===$h.NETWORK_RECONNECTING},g=function(){h||!r?i.startLoad(n.currentTime):i.loadSource(r)},m=function(){if(null==t&&!d)if(l>=c)!function(){d=!1,u=!0,f();var e=new Xh(wf("Network error, try reloading."),Xh.MEDIA_ERR_NETWORK,!0);e.errorCategory=Kh,e.reload=!0,o(n,e)}();else{d=!0;var e=Math.min(1e3*Math.pow(2,l),3e4);t=setTimeout((function(){t=void 0,l+=1,g()}),e)}},y=function(){var e=s.get(n);null==e||!e.networkError||u||!n.paused&&n.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&(function(){var e=s.get(n);if(!v(null==e?void 0:e.error)){var t=new Xh(wf("Attempting to reconnect..."),Xh.MEDIA_ERR_NETWORK,!1);t.errorCategory=Kh,t.muxCode=$h.NETWORK_RECONNECTING,e&&(e.error=t),n.dispatchEvent(new CustomEvent("error",{detail:t}))}}(),m())},E=function(){var e=s.get(n);null!=e&&e.networkError&&(l=0,u=!1,f(),d=!0,g())};null==(a=globalThis.addEventListener)||a.call(globalThis,"online",E);return i.on(Gh.Events.FRAG_BUFFERED,(function(){var e=s.get(n);e&&(!e.networkError&&!v(e.error)||(e.networkError=!1,d=!1,l=0,u=!1,f(),e.error&&(e.error=null,n.dispatchEvent(new Event("emptied")))))})),cf(n,"playing",(function(){var e=s.get(n);null!=e&&e.networkError&&(d=!1,l=0,u=!1,f(),e.error&&(e.error=null))})),cf(n,"waiting",y),n.addEventListener("teardown",(function(){var e;null==(e=globalThis.removeEventListener)||e.call(globalThis,"online",E),f()}),{once:!0}),{handleHlsError:function(e,t){var r,o;if(e.type!==Gh.ErrorTypes.NETWORK_ERROR)return!1;var c=null!=(o=null==(r=e.response)?void 0:r.code)?o:0;return!(!(t.muxCode===$h.NETWORK_OFFLINE||0===c||c>=500)||!e.fatal)&&(function(){var e=s.get(n);e&&(e.networkError=!0),d=!1,y()}(),!0)},onManifestLoaded:function(){h=!0,d=!1,f()}}},dp="fairplay",hp="playready",fp="widevine",pp=function(i,e){var s,t=function(i){return i.split("\n").find((function(e,t,s){return t>0&&s[t-1].startsWith("#EXT-X-STREAM-INF")}))}(i);if(!t)return Promise.reject(new Error("No media playlist URL found in multivariant playlist"));if(vf(t)&&!e)return Promise.reject(new Error("masterPlaylistUrl is required to resolve relative media playlist URL"));try{s=mf(t,e)}catch(e){return Promise.reject(e)}return fetch(s).then((function(e){return 200!==e.status?Promise.reject(e):e.text()}))},vp=function(i){var e=i.split("\n").filter((function(s){return s.startsWith("#EXT-X-SESSION-DATA")}));if(!e.length)return{};var t,n={},r=C(e);try{for(r.s();!(t=r.n()).done;){var o=gp(t.value),c=o["DATA-ID"];c&&(n[c]=x({},o))}}catch(e){r.e(e)}finally{r.f()}return{sessionData:n}},mp=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g;function gp(i){var e=v(i.matchAll(mp));return Object.fromEntries(e.map((function(e){var t=m(e,3);return[t[1],t[2]]})))}var yp,bp,Ep,_p,kp,Tp,wp,Sp=function(i){var e,t,s,n,r=i.split("\n"),o=null==(t=(null!=(e=r.find((function(e){return e.startsWith("#EXT-X-PLAYLIST-TYPE")})))?e:"").split(":")[1])?void 0:t.trim(),a=hf(o),c=ff(o);if(a===ef.LIVE){var l=r.find((function(u){return u.startsWith("#EXT-X-PART-INF")}));if(l)n=2*+l.split(":")[1].split("=")[1];else{var u=r.find((function(e){return e.startsWith("#EXT-X-TARGETDURATION")})),d=null==(s=null==u?void 0:u.split(":"))?void 0:s[1];n=3*+(null!=d?d:6)}}return{streamType:a,targetLiveWindow:c,liveEdgeStartOffset:n}},Ap=function(){var e=f(regeneratorRuntime.mark((function e(i,t){var n,s,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==of.MP4){e.next=2;break}return e.abrupt("return",{streamType:ef.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0,sessionData:void 0});case 2:if(t!==of.M3U8){e.next=15;break}return e.next=5,fetch(i);case 5:if((n=e.sent).ok){e.next=8;break}return e.abrupt("return",Promise.reject(n));case 8:return e.next=10,n.text();case 10:return s=e.sent,e.next=13,pp(s,n.url);case 13:return r=e.sent,e.abrupt("return",x(x({},vp(s)),Sp(r)));case 15:return e.abrupt("return",(console.error("Media type ".concat(t," is an unrecognized or unsupported type for src ").concat(i,".")),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0,sessionData:void 0}));case 16:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ip=function(){var e=f(regeneratorRuntime.mark((function e(i,t){var n,s,r,o,a,c,l,d,h,u,f,v=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=v.length>2&&void 0!==v[2]?v[2]:df({src:i}),e.next=3,Ap(i,n);case 3:c=e.sent,l=c.streamType,d=c.targetLiveWindow,h=c.liveEdgeStartOffset,u=c.sessionData,(null!=(f=null==u?void 0:u["com.apple.hls.chapters"])&&f.URI||null!=f&&f.VALUE.toLocaleLowerCase().startsWith("http"))&&Rp(null!=(s=f.URI)?s:f.VALUE,t),(null!=(r=C
2p.get(t))?r:{}).liveEdgeStartOffset=h,(null!=(o=Cp.get(t))?o:{}).targetLiveWindow=d,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(a=Cp.get(t))?a:{}).streamType=l,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Rp=function(){var e=f(regeneratorRuntime.mark((function e(i,t){var n,s,r,o,a,c,l,d,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(i);case 3:if((r=e.sent).ok){e.next=6;break}throw new Error("Failed to fetch Mux metadata: ".concat(r.status," ").concat(r.statusText));case 6:return e.next=8,r.json();case 8:if(o=e.sent,a={},null!=(n=null==o?void 0:o[0])&&n.metadata){e.next=12;break}return e.abrupt("return");case 12:c=C(o[0].metadata);try{for(c.s();!(l=c.n()).done;)(d=l.value).key&&d.value&&(a[d.key]=d.value)}catch(e){c.e(e)}finally{c.f()}(null!=(s=Cp.get(t))?s:{}).metadata=a,h=new CustomEvent("muxmetadata"),t.dispatchEvent(h),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(0),console.error(e.t0);case 22:case"end":return e.stop()}}),e,null,[[0,19]])})));return function(t,n){return e.apply(this,arguments)}}(),Op=function(i,e,t){var s,n,r,a,o,c,l,u,d=function(i){var e,t,n=i.type,s=hf(n),r=ff(n),a=!(null==(e=i.partList)||!e.length);return s===ef.LIVE&&(t=a?2*i.partTarget:3*i.targetduration),{streamType:s,targetLiveWindow:r,liveEdgeStartOffset:t,lowLatency:a}}(i),h=d.streamType,f=d.targetLiveWindow,v=d.liveEdgeStartOffset,m=d.lowLatency;if(h===ef.LIVE){m?(t.config.backBufferLength=null!=(s=t.userConfig.backBufferLength)?s:4,t.config.maxFragLookUpTolerance=null!=(n=t.userConfig.maxFragLookUpTolerance)?n:.001,t.config.abrBandWidthUpFactor=null!=(r=t.userConfig.abrBandWidthUpFactor)?r:t.config.abrBandWidthFactor):t.config.backBufferLength=null!=(a=t.userConfig.backBufferLength)?a:8;var p=Object.freeze({get length(){return e.seekable.length},start:function(g){return e.seekable.start(g)},end:function(g){var n;return g>this.length||g<0||Number.isFinite(e.duration)?e.seekable.end(g):null!=(n=t.liveSyncPosition)?n:e.seekable.end(g)}});(null!=(o=Cp.get(e))?o:{}).seekable=p}(null!=(c=Cp.get(e))?c:{}).liveEdgeStartOffset=v,(null!=(l=Cp.get(e))?l:{}).targetLiveWindow=f,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(u=Cp.get(e))?u:{}).streamType=h,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Lp=null!=(bp=null==(yp=null==globalThis?void 0:globalThis.navigator)?void 0:yp.userAgent)?bp:"",Dp=null!=(kp=null==(_p=null==(Ep=null==globalThis?void 0:globalThis.navigator)?void 0:Ep.userAgentData)?void 0:_p.platform)?kp:"",xp=Lp.toLowerCase().includes("android")||["x11","android"].some((function(i){return Dp.toLowerCase().includes(i)})),Cp=new WeakMap,Mp="mux.com",Pp=null==(wp=(Tp=Gh).isSupported)?void 0:wp.call(Tp),Np=function(i){return xp||!function(i){return/^((?!chrome|android).)*safari/i.test(Lp)&&!!i.canPlayType("application/vnd.apple.mpegurl")}(i)},Up=function(){if("undefined"!=typeof window)return rr.utils.now()},Fp=rr.utils.generateUUID,Bp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.playbackId,t=e.customDomain,n=void 0===t?Mp:t,r=e.maxResolution,s=e.minResolution,o=e.renditionOrder,c=e.programStartTime,a=e.programEndTime,l=e.assetStartTime,d=e.assetEndTime,h=e.playbackToken,f=e.tokens,v=void 0===f?{}:f,y=v.playback,u=void 0===y?h:y,E=e.extraSourceParams,_=void 0===E?{}:E;if(i){var k=lf(i),T=m(k,2),w=T[0],S=T[1],A=void 0===S?"":S,I=new URL("https://stream.".concat(n,"/").concat(w,".m3u8").concat(A));return u||I.searchParams.has("token")?(I.searchParams.forEach((function(p,g){"token"!=g&&I.searchParams.delete(g)})),u&&I.searchParams.set("token",u)):(r&&I.searchParams.set("max_resolution",r),s&&(I.searchParams.set("min_resolution",s),r&&+r.slice(0,-1)<+s.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",s,"maxResolution",r)),o&&I.searchParams.set("rendition_order",o),c&&I.searchParams.set("program_start_time","".concat(c)),a&&I.searchParams.set("program_end_time","".concat(a)),l&&I.searchParams.set("asset_start_time","".concat(l)),d&&I.searchParams.set("asset_end_time","".concat(d)),Object.entries(_).forEach((function(e){var t=m(e,2),p=t[0],g=t[1];null!=g&&I.searchParams.set(p,g)}))),I.toString()}},jp=function(i){if(i){var e=i.split("?");return m(e,1)[0]||void 0}},Vp=function(i){if(i&&i.startsWith("https://stream.")){var e=new URL(i).pathname.slice(1).split(/\.m3u8|\//);return m(e,1)[0]||void 0}},Hp=function(i){var e;return null==(e=Cp.get(i))?void 0:e.error},Wp=function(i){var e,t;return null!=(t=null==(e=Cp.get(i))?void 0:e.streamType)?t:ef.UNKNOWN},qp=function(i){var e,t;return null!=(t=null==(e=Cp.get(i))?void 0:e.seekable)?t:i.seekable},Gp=.034,Kp=function(i,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Gp;return Math.abs(i-e)<=t},Yp=function(i,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Gp;return i>e||Kp(i,e,t)},$p=function(i,e){var t,s,n;if(e&&i.buffered.length){if(i.readyState>2)return!1;var r=e.currentLevel>=0?null==(s=null==(t=e.levels)?void 0:t[e.currentLevel])?void 0:s.details:null==(n=e.levels.find((function(e){return!!e.details})))?void 0:n.details;if(r&&!r.live){var a=r.fragments;if(null!=a&&a.length){if(i.currentTime<i.duration-(r.targetduration+.5))return!1;var o=a[a.length-1];if(i.currentTime<=o.start)return!1;var c=o.start+o.duration/2,l=i.buffered.start(i.buffered.length-1),u=i.buffered.end(i.buffered.length-1);return c>l&&c<u}}}},Qp=function(i,e){return i.ended||i.loop?i.ended:!(!e||!$p(i,e))||function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Gp;return i.paused&&Yp(i.currentTime,i.duration,e)}(i)},zp=function e(i,t,n){Xp(t,n,i);var r=i.metadata,s=void 0===r?{}:r,o=s.view_session_id,c=void 0===o?Fp():o,l=function(i){var e,t,s;return null!=(e=null==i?void 0:i.metadata)&&e.video_id?i.metadata.video_id:sv(i)&&null!=(s=null!=(t=jp(i.playbackId))?t:Vp(i.src
2))?s:i.src}(i);s.view_session_id=c,s.video_id=l,i.metadata=s;i.drmTypeCb=function(e){var n;null==(n=t.mux)||n.emit("hb",{view_drm_type:e})},i.fallbackToWebkitFairplay=f(regeneratorRuntime.mark((function n(){var r,o,c,p,g;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=!t.paused,c=t.currentTime,i.useWebkitFairplay=!0,p=i.muxDataKeepSession,i.muxDataKeepSession=!0,g=null==(r=Cp.get(t))?void 0:r.coreReference,e(i,t,g),i.muxDataKeepSession=p,i.useWebkitFairplay=!1,n.t0=o,!n.t0){n.next=12;break}return n.next=12,t.play().then((function(){t.currentTime=c})).catch((function(){}));case 12:t.currentTime=c;case 13:case"end":return n.stop()}}),n)}))),Cp.set(t,{retryCount:0});var d=Zp(i,t),h=function(e,t,s){var i=e.preload,n=e.src,r=function(e){null!=e&&["","none","metadata","auto"].includes(e)?t.setAttribute("preload",e):t.removeAttribute("preload")};if(!s)return r(i),r;var o=!1,a=!1,c=s.config.maxBufferLength,l=s.config.maxBufferSize,d=function(e){r(e);var n=null!=e?e:t.preload;a||"none"===n||("metadata"===n?(s.config.maxBufferLength=1,s.config.maxBufferSize=1):(s.config.maxBufferLength=c,s.c
2onfig.maxBufferSize=l),u())},u=function(){!o&&n&&(o=!0,s.loadSource(n))};return cf(t,"play",(function(){a=!0,s.config.maxBufferLength=c,s.config.maxBufferSize=l,u()}),{once:!0}),d(i),d}(i,t,d);null!=i&&i.muxDataKeepSession&&null!=t&&t.mux&&!t.mux.deleted?d&&t.mux.addHLSJS({hlsjs:d,Hls:d?Gh:void 0}):cv(i,t,d),lv(i,t,d),function(e){Vf.apply(this,arguments)}(t),function(e){$f.apply(this,arguments)}(t);var v=function(i,e,t){var s=i.autoplay,n=!1,r=!1,a=If(s)?s:!!s,o=function(){n||cf(e,"playing",(function(){n=!0}),{once:!0})};if(o(),cf(e,"loadstart",(function(){n=!1,o(),Rf(e,a)}),{once:!0}),cf(e,"loadstart",(function(){t||(r=i.streamType&&i.streamType!==ef.UNKNOWN?i.streamType===ef.LIVE:!Number.isFinite(e.duration)),Rf(e,a)}),{once:!0}),t&&t.once(Gh.Events.LEVEL_LOADED,(function(e,t){var u;r=i.streamType&&i.streamType!==ef.UNKNOWN?i.streamType===ef.LIVE:null!=(u=t.details.live)&&u})),!a){var c=function(){!r||Number.isFinite(i.startTime)||(null!=t&&t.liveSyncPosition?e.currentTime=t.liveSyncPosition:Number.isFinite(e.seekable.end(0))&&(e.currentTime=e.seekable.end(0)))};t&&cf(e,"play",(function(){"metadata"===e.preload?t.once(Gh.Events.LEVEL_UPDATED,c):c()}),{once:!0})}return function(t){n||(a=If(t)?t:!!t,Rf(e,a))}}(i,t,d);(function(i,e,t){var s=i.minPreloadSegments;if(!(null==s||s<=0)&&t){var n=0,r=!1,a=e.playbackRate||1,o=function(){0!==e.playbackRate&&(a=e.playbackRate,e.playbackRate=0)};e.playbackRate=0,cf(e,"ratechange",o);var c=function(t,c){var u=c.frag;r||"main"!==u.type||++n>=s&&(r=!0,e.removeEventListener("ratechange",o),e.playbackRate=a)};t.on(Gh.Events.FRAG_BUFFERED,c),e.addEventListener("teardown",(function(){r||(r=!0,t.off(Gh.Events.FRAG_BUFFERED,c),e.playbackRate=a)}),{once:!0})}})(i,t,d),function(i,e,t){var s=i.initialEstimateSegments;if(!(null==s||s<=0)&&t){var n=0;t.on(Gh.Events.FRAG_BUFFERED,(function(e,r){"main"===r.frag.type&&++n<s&&t.abrController.resetEstimator(t.config.abrEwmaDefaultEstimate)}))}}(i,0,d);var u={engine:d,setAutoplay:v,setPreload:h},m=Cp.get(t);return m&&(m.coreReference=u),u},Xp=function(i,e,t){var s=null==e?void 0:e.engine;null!=i&&i.mux&&!i.mux.deleted&&(null!=t&&t.muxDataKeepSession?s&&i.mux.removeHLSJS():(i.mux.destroy(),delete i.mux)),s&&(s.detachMedia(),s.destroy()),i&&(i.hasAttribute("src")&&(i.removeAttribute("src"),i.load()),i.removeEventListener("error",hv),i.removeEventListener("error",vv),i.removeEventListener("durationchange",dv),Cp.delete(i),i.dispatchEvent(new Event("teardown")))};function Jp(i,e){var t,s=df(i);if(s!==of.M3U8)return!0;var n=!s||null==(t=e.canPlayType(s))||t,r=i.preferPlayback,o=r===nf,c=Pp&&(r===tf||Np(e));return n&&(o||!c)}var Zp=function(i,e){var t=i.debug,s=i.streamType,n=i.startTime,r=void 0===n?-1:n,o=i.metadata,a=i.preferCmcd,c=i._hlsConfig,l=void 0===c?{}:c,d=i.maxAutoResolution,h=i.initialBandwidthEstimateKbps,u=df(i)===of.M3U8,v=Jp(i,e);if(u&&!v&&Pp){var m=x({backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelOnFPSDrop:!0},null!=h?{abrEwmaDefaultEstimate:1e3*h}:{}),y=ev(s),E=tv(i),p=[rf.QUERY,rf.HEADER].includes(a)?{useHeaders:a===rf.HEADER,sessionId:null==o?void 0:o.view_session_id,contentId:null==o?void 0:o.video_id}:void 0,g=uv(i,l),_=new Gh(x(x(x(x(x({debug:t,startPosition:r,cmcd:p,xhrSetup:function(e,t){var b,n;if(!a||a===rf.QUERY){var r=mf(t);if(r.searchParams.has("CMCD")){var o=(null!=(n=null==(b=r.searchParams.get("CMCD"))?void 0:b.split(","))?n:[]).filter((function(e){return e.startsWith("sid")||e.startsWith("cid")})).join(",");r.searchParams.set("CMCD",o),e.open("GET",r)}}}},m),g),y),E),l));return g.capLevelController===op&&void 0!==d&&op.setMaxAutoResolution(_,d),_.on(Gh.Events.MANIFEST_PARSED,function(){var t=f(regeneratorRuntime.mark((function t(n,r){var b,o,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(null!=(c=null==(b=r.sessionData)?void 0:b["com.apple.hls.chapters"])&&c.URI||null!=c&&c.VALUE.toLocaleLowerCase().startsWith("http"))&&Rp(null!=(o=null==c?void 0:c.URI)?o:null==c?void 0:c.VALUE,e);case 2:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()),_}},ev=function(i){return i===ef.LIVE?{backBufferLength:8}:{}},tv=function(i){var e=i.tokens,t=(void 0===e?{}:e).drm,n=i.playbackId,s=i.drmTypeCb,r=jp(n);return t&&r?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:av(i,"fairplay"),serverCertificateUrl:ov(i,"fairplay")},"com.widevine.alpha":{licenseUrl:av(i,"widevine")},"com.microsoft.playready":{licenseUrl:av(i,"playready")}},requestMediaKeySystemAccessFunc:function(e,a){return"com.widevine.alpha"===e&&(a=[].concat(v(a.map((function(e){var t,n=null==(t=e.videoCapabilities)?void 0:t.map((function(u){return x(x({},u),{},{robustness:"HW_SECURE_ALL"})}));return x(x({},e),{},{videoCapabilities:n})}))),v(a))),navigator.requestMediaKeySystemAccess(e,a).then((function(t){var n=function(i){return i.includes("fps")?dp:i.includes("playready")?hp:i.includes("widevine")?fp:void 0}(e);return null==s||s(n),t}))}}:{}},nv=function(){var e=f(regeneratorRuntime.mark((function e(i){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i);case 2:if(200===(t=e.sent).status){e.next=7;break}e.t0=Promise.reject(t),e.next=10;break;case 7:return e.next=9,t.arrayBuffer();case 9:e.t0=e.sent;case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),rv=function(){var e=f(regeneratorRuntime.mark((function e(i,t){var n,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:i});case 2:if(200===(n=e.sent).status){e.next=5;break}return e.abrupt("return",Promise.reject(n));case 5:return e.next=7,n.arrayBuffer();case 7:return s=e.sent,e.abrupt("return",new Uint8Array(s));case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),iv=function(i,e){var t,n={mediaEl:e,getAppCertificate:function(){return nv(ov(i,"fairplay")).catch((function(s){if(s instanceof Response){var e=tp(s,Yh,i);return console.error("mediaError",null==e?void 0:e.message,null==e?void 0:e.context),e?Promise.reject(e):Promise.reject(new Error("Unexpected error in app cert request"))}return Promise.reject(s)}))},getLicenseKey:function(s){return rv(s,av(i,"fairplay")).catch((function(e){if(e instanceof Response){var t=tp(e,Yh,i);return console.error("mediaError",null==t?void 0:t.message,null==t?void 0:t.context),t?Promise.reject(t):Prom
2ise.reject(new Error("Unexpected error in license key request"))}return Promise.reject(e)}))},saveAndDispatchError:pv,drmTypeCb:function(){var s;null==(s=i.drmTypeCb)||s.call(i,dp)}};if(i.useWebkitFairplay)!function(e){var i=e.mediaEl,t=e.getAppCertificate,n=e.getLicenseKey,s=e.saveAndDispatchError,r=e.drmTypeCb;if(!window.WebKitMediaKeys||!("onwebkitneedkey"in i)){console.error("No WebKitMediaKeys. FairPlay may not be supported");var o=wf("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),c=new Xh(o,Xh.MEDIA_ERR_ENCRYPTED,!0);return c.errorCategory=Yh,c.muxCode=$h.ENCRYPTED_CDM_ERROR,s(i,c),function(){}}var l=i,a=t(),d=null,h=function(e){f(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,l.webkitKeys||v(),t.next=4,a;case 4:if(n=t.sent,null!==e.initData&&null!=n){t.next=7;break}return t.abrupt("return");case 7:r=sp(e.initData,n),u(r),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),console.error("Could not start encrypted playback due to exception",t.t0),s(l,t.t0);case 14:case"end":return t.stop()}}),t,null,[[0,11]])})))()},v=function(){try{var e=new WebKitMediaKeys("com.apple.fps.1_0");l.webkitSetMediaKeys(e),r()}catch(e){var t=new Xh("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.",Xh.MEDIA_ERR_ENCRYPTED,!0);throw t.errorCategory=Yh,t.muxCode=$h.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,t}},u=function(e){var t=l.webkitKeys.createSession("application/vnd.apple.mpegurl",e),r=function(){var e=f(regeneratorRuntime.mark((function e(r){var o,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=r.message,e.next=4,n(o);case 4:c=e.sent,t.update(c),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.error("Error on FairPlay session message",e.t0),s(i,e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),p=function(e){var t=e.target.error;if(t){console.error("Internal Webkit Key Session Error - sysCode: ".concat(t.systemCode," code: ").concat(t.code));var n=wf("The DRM Content Decryption Module system had an internal failure. Try reloading the page, updating your browser, or playing in another browser."),b=new Xh(n,Xh.MEDIA_ERR_ENCRYPTED,!0);b.errorCategory=Yh,b.muxCode=$h.ENCRYPTED_CDM_ERROR,s(i,b)}},g=function g(){t.removeEventListener("webkitkeymessage",r),t.removeEventListener("webkitkeyerror",p),i.removeEventListener("teardown",g),"webkitCurrentPlaybackTargetIsWireless"in i&&i.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",g),d=null;try{t.close()}catch(e){}};"webkitCurrentPlaybackTargetIsWireless"in i&&i.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",g,{once:!0}),t.addEventListener("webkitkeymessage",r),t.addEventListener("webkitkeyerror",p),i.addEventListener("teardown",g),d=g},m=function e(){i.removeEventListener("webkitneedkey",h),i.removeEventListener("teardown",e),null==d||d();try{l.webkitSetMediaKeys(null)}catch(e){}};i.addEventListener("webkitneedkey",h),i.addEventListener("teardown",m,{once:!0})}(n);else var s=x({fallbackToWebkitFairplay:(t=f(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:null==(t=i.fallbackToWebkitFairplay)||t.call(i);case 3:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},n),r=cp(s)},av=function(e,s){var i=e.playbackId,t=e.tokens,n=(void 0===t?{}:t).drm,r=e.customDomain,o=void 0===r?Mp:r,c=jp(i);return"https://license.".concat(o.toLocaleLowerCase().endsWith(Mp)?o:Mp,"/license/").concat(s,"/").concat(c,"?token=").concat(n)},ov=function(e,s){var i=e.playbackId,t=e.tokens,n=(void 0===t?{}:t).drm,r=e.customDomain,o=void 0===r?Mp:r,c=jp(i);return"https://license.".concat(o.toLocaleLowerCase().endsWith(Mp)?o:Mp,"/appcert/").concat(s,"/").concat(c,"?token=").concat(n)},sv=function(e){var i=e.playbackId,t=e.src,n=e.customDomain;if(i)return!0;
2if("string"!=typeof t)return!1;var s=null==window?void 0:window.location.href,r=new URL(t,s).hostname.toLocaleLowerCase();return r.includes(Mp)||!!n&&r.includes(n.toLocaleLowerCase())},uv=function(i,e){var t={};return t.capLevelToPlayerSize=i.capRenditionToPlayerSize,null==t.capLevelToPlayerSize?(t.capLevelController=op,t.capLevelToPlayerSize=!0):t.capLevelController=Mc,t},cv=function(i,e,t){var s,n=i.envKey,r=i.disableTracking,o=i.muxDataSDK,a=void 0===o?rr:o,c=i.muxDataSDKOptions,l=void 0===c?{}:c,d=sv(i);if(!r&&(n||d)){var h=i.playerInitTime,u=i.playerSoftwareName,f=i.playerSoftwareVersion,v=i.beaconCollectionDomain,m=i.debug,y=i.disableCookies,p=x(x({},i.metadata),{},{video_title:(null==(s=null==i?void 0:i.metadata)?void 0:s.video_title)||void 0});a.monitor(e,x(x({debug:m,beaconCollectionDomain:v,hlsjs:t,Hls:t?Gh:void 0,automaticErrorTracking:!1,errorTranslator:function(e){return"string"!=typeof e.player_error_code&&("function"==typeof i.errorTranslator?i.errorTranslator(e):e)},disableCookies:y},l),{},{data:x(x({},n?{env_key:n}:{}),{},{player_software_name:u,player_software:u,player_software_version:f,player_init_time:h},p)}))}},lv=function(i,e,t){var s,n,r,u,o,a=Jp(i,e),c=i.src,l=i.customDomain,d=void 0===l?Mp:l,h=function(){e.ended||i.disablePseudoEnded||!Qp(e,t)||($p(e,t)?e.currentTime=e.buffered.end(e.buffered.length-1):e.dispatchEvent(new Event("ended")))},v=function(){var t,p,n=qp(e);n.length>0&&(t=n.start(0),p=n.end(0)),(o!==p||u!==t)&&e.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),u=t,o=p};if(cf(e,"durationchange",v),e&&a){var m=df(i);if("string"==typeof c){if(c.endsWith(".mp4")&&c.includes(d)){var g=Vp(c),y=new URL("https://stream.".concat(d,"/").concat(g,"/metadata.json"));Rp(y.toString(),e)}var E=function(){if(Wp(e)===ef.LIVE&&!Number.isFinite(e.duration)){var g=setInterval(v,1e3);e.addEventListener("teardown",(function(){clearInterval(g)}),{once:!0}),cf(e,"durationchange",(function(){Number.isFinite(e.duration)&&clearInterval(g)}))}},p=function(){var t=f(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Ip(c,e,m).then(E).catch((function(g){if(g instanceof Response){var t=tp(g,Kh,i);if(t)return void pv(e,t)}else Error})));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if("none"===e.preload){var _=function(){p(),e.removeEventListener("loadedmetadata",k)},k=function(){p(),e.removeEventListener("play",_)};cf(e,"play",_,{once:!0}),cf(e,"loadedmetadata",k,{once:!0})}else p();null!=(s=i.tokens)&&s.drm?iv(i,e):cf(e,"encrypted",(function(){var g=wf("Attempting to play DRM-protected content without providing a DRM token."),t=new Xh(g,Xh.MEDIA_ERR_ENCRYPTED,!0);t.errorCategory=Yh,t.muxCode=$h.ENCRYPTED_MISSING_TOKEN,pv(e,t)}),{once:!0}),e.setAttribute("src",c),i.startTime&&((null!=(n=Cp.get(e))?n:{}).startTime=i.startTime,e.addEventListener("durationchange",dv,{once:!0}))}else e.removeAttribute("src");e.addEventListener("error",hv),e.addEventListener("error",vv),e.addEventListener("emptied",(function(){e.querySelectorAll("track[data-removeondestroy]").forEach((function(e){e.remove()}))}),{once:!0}),cf(e,"pause",h),cf(e,"seeked",h),cf(e,"play",(function(){e.ended||Yp(e.currentTime,e.duration)&&(e.currentTime=e.seekable.length?e.seekable.start(0):0)}))}else if(t&&c){t.once(Gh.Events.LEVEL_LOADED,(function(p,g){Op(g.details,e,t),v(),Wp(e)===ef.LIVE&&!Number.isFinite(e.duration)&&(t.on(Gh.Events.LEVEL_UPDATED,v),cf(e,"durationchange",(function(){Number.isFinite(e.duration)&&t.off(Gh.Events.LEVELS_UPDATED,v)})))}));var T=null!=(r=i.maxReconnectRetries)?r:0,w=T>0?lp({hls:t,mediaEl:e,src:c,muxMediaState:Cp,saveAndDispatchError:pv,maxRetries:T}):void 0;t.on(Gh.Events.ERROR,(function(p,g){var n,r,o=mv(g,i);if(o.muxCode===$h.NETWORK_NOT_READY){var b=null!=(n=Cp.get(e))?n:{},c=null!=(r=b.retryCount)?r:0;if(c<6){var l=0===c?5e3:6e4,d=new Xh("Retrying in ".concat(l/1e3," seconds..."),o.code,o.fatal);Object.assign(d,o),pv(e,d);var h=setTimeout((function(){b.retryCount=c+1,"manifestLoadError"===g.details&&g.url&&t.loadSource(g.url)}),l);return void e.addEventListener("teardown",(function(){return clearTimeout(h)}),{once:!0})}b.retryCount=0;var f=new Xh("Network error, try reloading.",o.code,o.fatal);return Object.assign(f,o),f.reload=!0,void pv(e,f)}null!=w&&w.handleHlsError(g,o)||pv(e,o)})),t.on(Gh.Events.MANIFEST_LOADED,(function(){null==w||w.onManifestLoaded();var p=Cp.get(e);null!=p&&p.networkError||p&&p.error&&(p.error=null,p.retryCount=0,e.dispatchEvent(new Event("emptied")),e.dispatchEvent(new Event("loadstart")))})),e.addEventListener("error",vv),cf(e,"waiting",h),Of(i,t),function(i,e){e.on(Gh.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(function(t,n){n.tracks.forEach((function(a){var t,n,r=null!=(t=a.subtitleTrack)?t:a.closedCaptions,u=e.subtitleTracks.findIndex((function(e){var t=e.lang,n=e.name,o=e.type;return t==(null==r?void 0:r.lang)&&n===a.label&&o.toLowerCase()===a.kind})),o=(null!=(n=a._id)?n:a.default)?"default":"".concat(a.kind).concat(u);Df(i,a.kind,a.label,null==r?void 0:r.lang,o,a.default)}))}));var t=function(){if(e.subtitleTracks.length){var t=Array.from(i.textTracks).find((function(e){return e.id&&"showing"===e.mode&&["subtitles","captions"].includes(e.kind)}));
2if(t){var n=e.subtitleTracks[e.subtitleTrack],a=n?n.default?"default":"".concat(e.subtitleTracks[e.subtitleTrack].type.toLowerCase()).concat(e.subtitleTrack):void 0;if(e.subtitleTrack<0||(null==t?void 0:t.id)!==a){var r=e.subtitleTracks.findIndex((function(e){var n=e.lang,r=e.name,u=e.type,o=e.default;return"default"===t.id&&o||n==t.language&&r===t.label&&u.toLowerCase()===t.kind}));e.subtitleTrack=r}(null==t?void 0:t.id)===a&&t.cues&&Array.from(t.cues).forEach((function(e){t.addCue(e)}))}}};i.textTracks.addEventListener("change",t),e.on(Gh.Events.CUES_PARSED,(function(e,t){var n=t.track,a=t.cues,r=i.textTracks.getTrackById(n);if(r){var o="disabled"===r.mode;o&&(r.mode="hidden"),a.forEach((function(e){var u;null!=(u=r.cues)&&u.getCueById(e.id)||r.addCue(e)})),o&&(r.mode="disabled")}})),e.once(Gh.Events.DESTROYING,(function(){i.textTracks.removeEventListener("change",t),i.querySelectorAll("track[data-removeondestroy]").forEach((function(e){e.remove()}))}));var s=function(){Array.from(i.textTracks).forEach((function(e){var t,a;if(!["subtitles","caption"].includes(e.kind)&&("thumbnails"===e.label||"chapters"===e.kind)){if(null==(t=e.cues)||!t.length){var n="track";e.kind&&(n+='[kind="'.concat(e.kind,'"]')),e.label&&(n+='[label="'.concat(e.label,'"]'));var r=i.querySelector(n),o=null!=(a=null==r?void 0:r.getAttribute("src"))?a:"";null==r||r.removeAttribute("src"),setTimeout((function(){null==r||r.setAttribute("src",o)}),0)}"hidden"!==e.mode&&(e.mode="hidden")}}))};e.once(Gh.Events.MANIFEST_LOADED,s),e.once(Gh.Events.MEDIA_ATTACHED,s)}(e,t),t.attachMedia(e)}else console.error("It looks like the video you're trying to play will not work on this system! If possible, try upgrading to the newest versions of your browser or software.")};function dv(i){var e,t=i.target,s=null==(e=Cp.get(t))?void 0:e.startTime;if(s&&function(i,e,t){e&&t>e&&(t=e);for(var s=0;s<i.length;s++)if(i.start(s)<=t&&i.end(s)>=t)return!0;return!1}(t.seekable,t.duration,s)){var n="auto"===t.preload;n&&(t.preload="none"),t.currentTime=s,n&&(t.preload="auto")}}function hv(e){return fv.apply(this,arguments)}function fv(){return(fv=f(regeneratorRuntime.mark((function e(i){var t,n,r,s,o,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.isTrusted){e.next=2;break}return e.abrupt("return");case 2:if(i.stopImmediatePropagation(),null!=(t=i.target)&&t.error){e.next=6;break}return e.abrupt("return");case 6:if(n=t.error,r=n.message,s=n.code,o=new Xh(r,s),!t.src||s!==Xh.MEDIA_ERR_SRC_NOT_SUPPORTED||t.readyState!==HTMLMediaElement.HAVE_NOTHING){e.next=10;break}return setTimeout((function(){var e,a=null!=(e=Hp(t))?e:t.error;(null==a?void 0:a.code)===Xh.MEDIA_ERR_SRC_NOT_SUPPORTED&&pv(t,o)}),500),e.abrupt("return");case 10:if(!t.src||s===Xh.MEDIA_ERR_DECODE&&void 0===s){e.next=21;break}return e.prev=11,e.next=14,fetch(t.src);case 14:c=e.sent,l=c.status,o.data={response:{code:l}},e.next=21;break;case 19:e.prev=19,e.t0=e.catch(11);case 21:pv(t,o);case 22:case"end":return e.stop()}}),e,null,[[11,19]])})))).apply(this,arguments)}function pv(i,e){var t;e.fatal&&((null!=(t=Cp.get(i))?t:{}).error=e,i.dispatchEvent(new CustomEvent("error",{detail:e})))}function vv(i){var e,t;if(i instanceof CustomEvent&&i.detail instanceof Xh){var s=i.target,n=i.detail;!n||!n.fatal||((null!=(e=Cp.get(s))?e:{}).error=n,null==(t=s.mux)||t.emit("error",{player_error_code:n.code,player_error_message:n.message,player_error_context:n.context}))}}var mv=function(i,e){var t,n,s,r;i.fatal?console.error("getErrorFromHlsErrorData()",i):e.debug&&console.warn("getErrorFromHlsErrorData() (non-fatal)",i);var o,c=(k(t={},Gh.ErrorTypes.NETWORK_ERROR,Xh.MEDIA_ERR_NETWORK),k(t,Gh.ErrorTypes.MEDIA_ERROR,Xh.MEDIA_ERR_DECODE),k(t,Gh.ErrorTypes.KEY_SYSTEM_ERROR,Xh.MEDIA_ERR_ENCRYPTED),t),l=function(u){return[Gh.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,Gh.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(u.details)?Xh.MEDIA_ERR_NETWORK:c[u.type]}(i);if(l===Xh.MEDIA_ERR_NETWORK&&i.response){var u=null!=(n=function(u){return u.type===Gh.ErrorTypes.KEY_SYSTEM_ERROR?Yh:u.type===Gh.ErrorTypes.NETWORK_E
2RROR?Kh:void 0}(i))?n:Kh;o=null!=(s=tp(i.response,u,e,i.fatal))?s:new Xh("",l,i.fatal)}else if(l===Xh.MEDIA_ERR_ENCRYPTED)if(i.details===Gh.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE){var d=wf("Attempting to play DRM-protected content without providing a DRM token.");(o=new Xh(d,Xh.MEDIA_ERR_ENCRYPTED,i.fatal)).errorCategory=Yh,o.muxCode=$h.ENCRYPTED_MISSING_TOKEN}else if(i.details===Gh.ErrorDetails.KEY_SYSTEM_NO_ACCESS){var h=wf("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.");(o=new Xh(h,Xh.MEDIA_ERR_ENCRYPTED,i.fatal)).errorCategory=Yh,o.muxCode=$h.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM}else if(i.details===Gh.ErrorDetails.KEY_SYSTEM_NO_SESSION){var f=wf("Failed to generate a DRM license request. This may be an issue with the player or your protected content.");(o=new Xh(f,Xh.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=Yh,o.muxCode=$h.ENCRYPTED_GENERATE_REQUEST_FAILED}else if(i.details===Gh.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED){var v=wf("Failed to update DRM license. This may be an issue with the player or your protected content.");(o=new Xh(v,Xh.MEDIA_ERR_ENCRYPTED,i.fatal)).errorCategory=Yh,o.muxCode=$h.ENCRYPTED_UPDATE_LICENSE_FAILED}else if(i.details===Gh.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED){var m=wf("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate.");(o=new Xh(m,Xh.MEDIA_ERR_ENCRYPTED,i.fatal)).errorCategory=Yh,o.muxCode=$h.ENCRYPTED_UPDATE_SERVER_CERT_FAILED}else if(i.details===Gh.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR){var y=wf("The DRM Content Decryption Module system had an internal failure. Try reloading the page, updating your browser, or playing in another browser.");(o=new Xh(y,Xh.MEDIA_ERR_ENCRYPTED,i.fatal)).errorCategory=Yh,o.muxCode=$h.ENCRYPTED_CDM_ERROR}else if(i.details===Gh.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED){var E=wf("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");(o=new Xh(E,Xh.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=Yh,o.muxCode=$h.ENCRYPTED_OUTPUT_RESTRICTED}else(o=new Xh(i.error.message,Xh.MEDIA_ERR_ENCRYPTED,i.fatal)).errorCategory=Yh,o.muxCode=$h.ENCRYPTED_ERROR;else o=new Xh("",l,i.fatal);return o.context||(o.context="".concat(i.url?"url: ".concat(i.url,"\n"):"").concat(i.response&&(i.response.code||i.response.text)?"response: ".concat(i.response.code,", ").concat(i.response.text,"\n"):"").concat(i.reason?"failure reason: ".concat(i.reason,"\n"):"").concat(i.level?"level: ".concat(i.level,"\n"):"").concat(i.parent?"parent stream controller: ".concat(i.parent,"\n"):"").concat(i.buffer?"buffer length: ".concat(i.buffer,"\n"):"").concat(i.error?"error: ".concat(i.error,"\n"):"").concat(i.event?"event: ".concat(i.event,"\n"):"").concat(i.err?"error message: ".concat(null==(r=i.err)?void 0:r.message,"\n"):"")),o.data=i,o},gv=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"],yv=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function bv(i){return'\n    <style>\n      :host {\n        display: inline-flex;\n        line-height: 0;\n        flex-direction: column;\n        justify-content: end;\n      }\n\n      audio {\n        width: 100%;\n      }\n    </style>\n    <slot name="media">\n      <audio'.concat(kv(i),"></audio>\n    </slot>\n    <slot></slot>\n  ")}function Ev(i){return'\n    <style>\n      :host {\n        display: inline-block;\n        line-height: 0;\n      }\n\n      video {\n        max-width: 100%;\n        max-height: 100%;\n        min-width: 100%;\n        min-height: 100%;\n        object-fit: var(--media-object-fit, contain);\n        object-position: var(--media-object-position, 50% 50%);\n      }\n\n      video::-webkit-media-text-track-container {\n        transform: var(--media-webkit-text-track-transform);\n        transition: var(--media-webkit-text-track-transition);\n      }\n    </style>\n    <slot name="media">\n      <video'.concat(kv(i),"></video>\n    </slot>\n    <slot></slot>\n  ")}function _v(i,e){var t,a,n,r,o,c,l,d,h,f,p,g,m,y,E,k,w,S,R,O=e.tag,L=e.is,s=null==(a=null==(t=globalThis.document)?void 0:t.createElement)?void 0:a.call(t,O,{is:L}),D=s?function(i){for(var e=[],t=Object.getPrototypeOf(i);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){var s=Object.getOwnPropertyNames(t);e.push.apply(e,v(s))}return e}(s):[];return n=function(e){T(r,e);var t=P(r);function r(){var e;return A(this,r),e=t.apply(this,arguments),W(_(e),g),W(_(e),l,!1),W(_(e),d,null),W(_(e),h,new Map),W(_(e),f),W(_(e),p),j(_(e),"get"),j(_(e),"set"),j(_(e),"call"),e}return I(r,[{key:"nativeEl",get:function(){var e,t,n,r,o;return K(this,g,m).call(this),null!=(o=null!=(r=null!=(t=null!=(e=H(this,d))?e:this.querySelector(":scope > [slot=media]"))?t:this.querySelector(O))?r:null==(n=this.shadowRoot)?void 0:n.querySelector(O))?o:null},set:function(e){G(this,d,e)}},{key:"defaultMuted",get:function(){return this.hasAttribute("muted")},set:function(e){this.toggleAttribute("muted",e)}},{key:"src",get:function(){return this.getAttribute("src")},set:function(e){this.setAttribute("src","".concat(e))}},{key:"preload",get:function(){var e,t;return null!=(t=this.getAttribute("preload"))?t:null==(e=this.nativeEl)?void 0:e.preload},set:function(e){this.setAttribute("preload","".concat(e))}},{key:"init",value:function(){if(!this.shadowRoot){this.attachShadow({mode:"open"});var e=function(i){var e,t={},n=C(i);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r.name]=r.value}}catch(e){n.e(e)}finally{n.f()}return t}(this.attributes);L&&(e.is=L),O&&(e.part=O),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.nativeEl.muted=this.hasAttribute("muted");var t,n=C(D);try{for(n.s();!(t=n.n()).done;){var r=t.value;K(this,g,S).call(this,r)}}catch(e){n.e(e)}finally{n.f()}K(this,g,y).call(this)}},{key:"handleEvent",value:function(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail}))}},{key:"attributeChangedCallback",value:function(e,t,n){K(this,g,m).call(this),K(this,g,R).call(this,e,t,n)}},{key:"connectedCallback",value:function(){K(this,g,m).call(this),H(this,p)||K(this,g,y).call(this)}},{key:"disconnectedCallback",value:function(){var e,t,n;null==(e=H(this,f))||e.disconnect(),G(this,f,void 0),H(this,p)&&(null==(t=this.shadowRoot)||t.removeEventListener("slotchange",H(this,p)),G(this,p,void 0));var r,o=C(this.constructor.Events);try{for(o.s();!(r=o.n()).done;){var c=r.value;null==(n=this.shadowRoot)||n.removeEventListener(c,this,!0)}}catch(e){o.e(e)}finally{o.f()}
2H(this,h).forEach((function(e){return e.remove()})),H(this,h).clear(),G(this,d,null)}}],[{key:"observedAttributes",get:function(){var e,t,r;return K(e=n,o,c).call(e),[].concat(v(null!=(r=null==(t=null==s?void 0:s.constructor)?void 0:t.observedAttributes)?r:[]),yv)}}]),r}(i),r=new WeakMap,o=new WeakSet,c=function(){var e=this;if(!H(this,r)){G(this,r,!0);var t=new Set(this.observedAttributes);t.delete("muted");var n,o=C(D);try{var c=function(){var r=n.value;if(!(r in e.prototype))if("function"==typeof s[r])e.prototype[r]=function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return K(this,g,m).call(this),function(){var t;if(e.call)return e.call.apply(e,[r].concat(n));var o=null==(t=e.nativeEl)?void 0:t[r];return null==o?void 0:o.apply(e.nativeEl,n)}()};else{var o={get:function(){var e,n,o;K(this,g,m).call(this);var c=r.toLowerCase();if(t.has(c)){var l=this.getAttribute(c);return null!==l&&(""===l||l)}return null!=(o=null==(e=this.get)?void 0:e.call(this,r))?o:null==(n=this.nativeEl)?void 0:n[r]}};r!==r.toUpperCase()&&(o.set=function(e){K(this,g,m).call(this);var n=r.toLowerCase();t.has(n)?!0===e||!1===e||null==e?this.toggleAttribute(n,!!e):this.setAttribute(n,e):this.set?this.set(r,e):this.nativeEl&&(this.nativeEl[r]=e)}),Object.defineProperty(e.prototype,r,o)}};for(o.s();!(n=o.n()).done;)c()}catch(e){o.e(e)}finally{o.f()}}},l=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakSet,m=function(){H(this,l)||(G(this,l,!0),this.init())},y=function(){var e,t,n=this;G(this,f,new MutationObserver(K(this,g,k).bind(this))),G(this,p,(function(){return K(n,g,E).call(n)})),null==(e=this.shadowRoot)||e.addEventListener("slotchange",H(this,p)),K(this,g,E).call(this);var r,o=C(this.constructor.Events);try{for(o.s();!(r=o.n()).done;){var c=r.value;null==(t=this.shadowRoot)||t.addEventListener(c,this,!0)}}catch(e){o.e(e)}finally{o.f()}},E=function(){var e,t=this,n=new Map(H(this,h)),r=null==(e=this.shadowRoot)?void 0:e.querySelector("slot:not([name])");(null==r?void 0:r.assignedElements({flatten:!0}).filter((function(e){return["track","source"].includes(e.localName)}))).forEach((function(e){var r,o;n.delete(e);var c=H(t,h).get(e);c||(c=e.cloneNode(),H(t,h).set(e,c),null==(r=H(t,f))||r.observe(e,{attributes:!0})),null==(o=t.nativeEl)||o.append(c),K(t,g,w).call(t,c)})),n.forEach((function(e,n){e.remove(),H(t,h).delete(n)}))},k=function(e){var t,n,r=C(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if("attributes"===o.type){var c=o.target,l=o.attributeName,d=H(this,h).get(c);d&&l&&(d.setAttribute(l,null!=(t=c.getAttribute(l))?t:""),K(this,g,w).call(this,d))}}}catch(e){r.e(e)}finally{r.f()}},w=function(e){e&&"track"===e.localName&&e.default&&("chapters"===e.kind||"metadata"===e.kind)&&"disabled"===e.track.mode&&(e.track.mode="hidden")},S=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){var t=this[e];delete this[e],this[e]=t}},R=function(e,t,r){var o,c,l;["id","class"].includes(e)||!n.observedAttributes.includes(e)&&this.constructor.observedAttributes.includes(e)||(null===r?null==(o=this.nativeEl)||o.removeAttribute(e):(null==(c=this.nativeEl)?void 0:c.getAttribute(e))!==r&&(null==(l=this.nativeEl)||l.setAttribute(e,r)))},W(n,o),j(n,"getTemplateHTML",O.endsWith("audio")?bv:Ev),j(n,"shadowRootOptions",{mode:"open"}),j(n,"Events",gv),W(n,r,!1),n}function kv(i){var e="";for(var t in i)if(yv.includes(t)){var s=i[t];e+=""===s?" ".concat(t):" ".concat(t,'="').concat(s,'"')}return e}var Tv,wv,Sv,Av,Iv,Rv,Ov,Lv,Dv,xv,ol,Cv,Mv,Pv,Nv,Uv,Fv=_v(null!=(Tv=globalThis.HTMLElement)?Tv:function(){return I((function e(){A(this,e)}))}(),{tag:"video"}),Bv=(_v(null!=(wv=globalThis.HTMLElement)?wv:function(){return I((function e(){A(this,e)}))}(),{tag:"audio"}),function(i){throw TypeError(i)}),jv=function(i,e,t){return e.has(i)||Bv("Cannot "+t)},Vv=function(i,e,t){return jv(i,e,"read from private field"),t?t.call(i):e.get(i)},Hv=function(i,e,t){return e.has(i)?Bv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t)},Wv=function(i,e,t,s){return jv(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},qv=function(i,e,t){return jv(i,e,"access private method"),t},Gv=function(){try{return"0.31.2"}catch(e){}return"UNKNOWN"}(),Kv={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",MAX_RECONNECT_RETRIES:"max-reconnect-retries",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type",LOGO:"logo",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size",INITIAL_BANDWIDTH_ESTIMATE_KBPS:"initial-bandwidth-estimate-kbps",INITIAL_ESTIMATE_SEGMENTS:"initial-estimate-segments",MIN_PRELOAD_SEGMENTS:"min-preload-segments"},Yv=Object.values(Kv),$v=Gv,Qv="mux-video",zv=function(e){T(o,e);var t,n,r=P(o);function o(){var e;return A(this,o),e=r.call(this),Hv(_(e),Mv),Hv(_(e),Sv),Hv(_(e),Av),Hv(_(e),Iv,{}),Hv(_(e),Rv,{}),Hv(_(e),Ov),Hv(_(e),Lv),Hv(_(e),Dv),Hv(_(e),xv),Hv(_(e),ol,""),Hv(_(e),Cv,(function(i){var t,n=function(i){var e;return null==(e=Cp.get(i))?void 0:e.metadata}(e.nativeEl),s=null!=(t=e.metadata)?t:{};e.metadata=x(x({},n),s),"mux-free-plan"===(null==n?void 0:n["com.mux.video.branding"])&&(Wv(_(e),ol,"default"),e.updateLogo())})),Hv(_(e),Nv),Wv(_(e),Av,Up()),e}return I(o,[{key:"preferCmcd",get:function(){var i;return null!=(i=this.getAttribute(Kv.PREFER_CMCD))?i:void 0},set:function(i){i!==this.preferCmcd&&(i?af.includes(i)?this.setAttribute(Kv.PREFER_CMCD,i):console.warn("Invalid value for preferCmcd. Must be one of ".concat(af.join())):this.removeAttribute(Kv.PREFER_CMCD))}},{key:"playerInitTime",get:function(){return this.hasAttribute(Kv.PLAYER_INIT_TIME)?+this.getAttribute(Kv.PLAYER_INIT_TIME):Vv(this,Av)},set:function(i){i!=this.playerInitTime&&(null==i?this.removeAttribute(Kv.PLAYER_INIT_TIME):this.setAttribute(Kv.PLAYER_INIT_TIME,"".concat(+i)))}},{key:"playerSoftwareName",get:function(){var i;return null!=(i=Vv(this,Dv))?i:Qv},set:function(i){Wv(this,Dv,i)}},{key:"playerSoftwareVersion",get:function(){var i;return null!=(i=Vv(this,Lv))?i:$v},set:function(i){Wv(this,Lv,i)}},{key:"_hls",get:function(){var i;return null==(i=Vv(this,Mv,Pv))?void 0:i.engine}},{key:"mux",get:function(){var i;return null==(i=this.nativeEl)?void 0:i.mux}},{key:"error",get:function(){var i;return null!=(i=Hp(this.nativeEl))?i:null}},{key:"errorTranslator",get:function(){return Vv(this,xv)},set:function(i){Wv(this,xv,i)}},{key:"src",get:function(){return this.getAttribute("src")},set:function(i){i!==this.src&&(null==i?this.removeAttribute("src"):this.setAttribute("src",i))}},{key:"type",get:function(){var i;return null!=(i=this.getAttribute(Kv.TYPE))?i:void 0},set:function(i){i!==this.type&&(i?this.setAttribute(Kv.TYPE,i):this.removeAttribute(Kv.TYPE))}},{key:"preload",get:function(){var i=this.getAttribute("preload");return""===i?"auto":["none","metadata","auto"].includes(i)?i:y(S(o.prototype),"preload",this)},set:function(i){i!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(i)?this.setAttribute("preload",i):this.removeAttribute("preload"))}},{key:"debug",get:function(){return null!=this.getAttribute(Kv.DEBUG)},set:function(i){i!==this.debug&&(i?this.setAttribute(Kv.DEBUG,""):this.removeAttribute(Kv.DEBUG))}},{key:"disableTracking",get:function(){return this.hasAttribute(Kv.DISABLE_TRACKING)},set:function(i){i!==this.disableTracking&&this.toggleAttribute(Kv.DISABLE_TRACKING,!!i)}},{key:"disableCookies",get:function(){return this.hasAttribute(Kv.DISABLE_COOKIES)},set:function(i){i!==this.disableCookies&&(i?this.setAttribute(Kv.DISABLE_COOKIES,""):this.removeAttribute(Kv.DISABLE_COOKIES))}},{key:"disablePseudoEnded",get:function(){return this.hasAttribute(Kv.DISABLE_PSEUDO_ENDED)},set:function(i){i!==this.disablePseudoEnded&&(i?this.setAttribute(Kv.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(Kv.DISABLE_PSEUDO_ENDED))}},{key:"maxReconnectRetries",get:function(){var i=this.getAttribute(Kv.MAX_RECONNECT_RETRIES);if(null!=i){var e=+i;return Number.isNaN(e)?void 0:e}},set:function(i){i!==this.maxReconnectRetries&&(null==i?this.removeAttribute(Kv.MAX_RECONNECT_RETRIES):this.setAttribute(Kv.MAX_RECONNECT_RETRIES,"".concat(i)))}},{key:"startTime",get:function(){var i=this.getAttribute(Kv.START_TIME);if(null!=i){var e=+i;return Number.isNaN(e)?void 0:e}},set:function(i){i!==this.startTime&&(null==i?this.removeAttribute(Kv.START_TIME):this.setAttribute(Kv.START_TIME,"".concat(i)))}},{key:"initialBandwidthEstimateKbps",get:function(){var i=this.getAttribute(Kv.INITIAL_BANDWIDTH_ESTIMATE_KBPS);if(null!=i){var e=+i;return Number.isNaN(e)?void 0:e}},set:function(i){i!==this.initialBandwidthEstimateKbps&&(null==i?this.removeAttribute(Kv.INITIAL_BANDWIDTH_ESTIMATE_KBPS):this.setAttribute(Kv.INITIAL_BANDWIDTH_ESTIMATE_KBPS,"".concat(i)))}},{key:"initialEstimateSegments",get:function(){var i=this.getAttribute(Kv.INITIAL_ESTIMATE_SEGMENTS);if(null!=i){var e=+i;return Number.isNaN(e)?void 0:e}},set:function(i){i!==this.initialEstimateSegments&&(null==i?this.removeAttribute(Kv.INITIAL_ESTIMATE_SEGMENTS):this.setAttribute(Kv.INITIAL_ESTIMATE_SEGMENTS,"".concat(i)))}},{key:"minPreloadSegments",get:function(){var i=this.getAttribute(Kv.MIN_PRELOAD_SEGMENTS);if(null!=i){var e=+i;return Number.isNaN(e)?void 0:e}},set:function(i){i!==this.minPreloadSegments&&(null==i?this.removeAttribute(Kv.MIN_PRELOAD_SEGMENTS):this.setAttribute(Kv.MIN_PRELOAD_SEGMENTS,"".concat(i)))}},{key:"playbackId",get:function(){var i;return this.hasAttribute(Kv.PLAYBACK_ID)?this.getAttribute(Kv.PLAYBACK_ID):null!=(i=Vp(this.src))?i:void 0},set:function(i){i!==this.playbackId&&(i?this.setAttribute(Kv.PLAYBACK_ID,i):this.removeAttribute(Kv.PLAYBACK_ID))}},{key:"maxResolution",get:function(){var i;return null!=(i=this.getAttribute(Kv.MAX_RESOLUTION))?i:void 0},set:function(i){i!==this.maxResolution&&(i?this.setAttribute(Kv.MAX_RESOLUTION,i):this.removeAttribute(Kv.MAX_RESOLUTION))}},{key:"minResolution",get:function(){var i;return null!=(i=this.getAttribute(Kv.MIN_RESOLUTION))?i:void 0},set:function(i){i!==this.minResolution&&(i?this.setAttribute(Kv.MIN_RESOLUTION,i):this.removeAttribute(Kv.MIN_RESOLUTION))}},{key:"maxAutoResolution",get:function(){var i;return null!=(i=this.getAttribute(Kv.MAX_AUTO_RESOLUTION))?i:void 0},set:function(i){null==i?this.removeAttribute(Kv.MAX_AUTO_RESOLUTION):this.setAttribute(Kv.MAX_AUTO_RESOLUTION,i)}},{key:"renditionOrder",get:function(){var i;return null!=(i=this.getAttribute(Kv.RENDITION_ORDER))?i:void 0},set:function(i){i!==this.renditionOrder&&(i?this.setAttribute(Kv.RENDITION_ORDER,i):this.removeAttribute(Kv.RENDITION_ORDER))}},{key:"programStartTime",get:function(){var i=this.getAttribute(Kv.PROGRAM_START_TIME);if(null!=i){var e=+i;return Number.isNaN(e)?void 0:e}},set:function(i){null==i?this.removeAttribute(Kv.PROGRAM_START_TIME):this.setAttribute(Kv.PROGRAM_START_TIME,"".concat(i))}},{key:"programEndTime",get:function(){var i=this.getAttribute(Kv.PROGRAM_END_TIME);if(null!=i){var e=+i;return Number.isNaN(e)?void 0:e}},set:function(i){null==i?this.removeAttribute(Kv.PROGRAM_END_TIME):this.setAttribute(Kv.PROGRAM_END_TIME,"".concat(i))}},{key:"assetStartTime",get:function(){var i=this.getAttribute(Kv.ASSET_START_TIME);if(null!=i){var e=+i;return Number.isNaN(e)?void 0:e}},set:function(i){null==i?this.removeAttribute(Kv.ASSET_START_TIME):this.setAttribute(Kv.ASSET_START_TIME,"".concat(i))}},{key:"assetEndTime",get:function(){var i=this.getAttribute(Kv.ASSET_END_TIME);if(null!=i){var e=+i;return Number.isNaN(e)?void 0:e}},set:function(i){null==i?this.removeAttribute(Kv.ASSET_END_TIME):this.setAttribute(Kv.ASSET_END_TIME,"".concat(i))}},{key:"customDomain",get:function(){var i;return null!=(i=this.getAttribute(Kv.CUSTOM_DOMAIN))?i:void 0},set:function(i){i!==this.customDomain&&(i?this.setAttribute(Kv.CUSTOM_DOMAIN,i):this.removeAttribute(Kv.CUSTOM_DOMAIN))}},{key:"capRenditionToPlayerSize",get:function(){var i;return null!=(null==(i=this._hlsConfig)?void 0:i.capLevelToPlayerSize)?this._hlsConfig.capLevelToPlayerSize:Vv(this,Nv)}
2,set:function(i){Wv(this,Nv,i)}},{key:"drmToken",get:function(){var i;return null!=(i=this.getAttribute(Kv.DRM_TOKEN))?i:void 0},set:function(i){i!==this.drmToken&&(i?this.setAttribute(Kv.DRM_TOKEN,i):this.removeAttribute(Kv.DRM_TOKEN))}},{key:"playbackToken",get:function(){var i,e,t,s;if(this.hasAttribute(Kv.PLAYBACK_TOKEN))return null!=(i=this.getAttribute(Kv.PLAYBACK_TOKEN))?i:void 0;if(this.hasAttribute(Kv.PLAYBACK_ID)){var n=lf(null!=(e=this.playbackId)?e:""),r=m(n,2)[1];return null!=(t=new URLSearchParams(r).get("token"))?t:void 0}return this.src&&null!=(s=new URLSearchParams(this.src).get("token"))?s:void 0},set:function(i){i!==this.playbackToken&&(i?this.setAttribute(Kv.PLAYBACK_TOKEN,i):this.removeAttribute(Kv.PLAYBACK_TOKEN))}},{key:"tokens",get:function(){var i=this.getAttribute(Kv.PLAYBACK_TOKEN),e=this.getAttribute(Kv.DRM_TOKEN);return x(x(x({},Vv(this,Rv)),null!=i?{playback:i}:{}),null!=e?{drm:e}:{})},set:function(i){Wv(this,Rv,null!=i?i:{})}},{key:"ended",get:function(){return Qp(this.nativeEl,this._hls)}},{key:"envKey",get:function(){var i;return null!=(i=this.getAttribute(Kv.ENV_KEY))?i:void 0},set:function(i){i!==this.envKey&&(i?this.setAttribute(Kv.ENV_KEY,i):this.removeAttribute(Kv.ENV_KEY))}},{key:"beaconCollectionDomain",get:function(){var i;return null!=(i=this.getAttribute(Kv.BEACON_COLLECTION_DOMAIN))?i:void 0},set:function(i){i!==this.beaconCollectionDomain&&(i?this.setAttribute(Kv.BEACON_COLLECTION_DOMAIN,i):this.removeAttribute(Kv.BEACON_COLLECTION_DOMAIN))}},{key:"streamType",get:function(){var i;return null!=(i=this.getAttribute(Kv.STREAM_TYPE))?i:Wp(this.nativeEl)},set:function(i){i!==this.streamType&&(i?this.setAttribute(Kv.STREAM_TYPE,i):this.removeAttribute(Kv.STREAM_TYPE))}},{key:"targetLiveWindow",get:function(){return this.hasAttribute(Kv.TARGET_LIVE_WINDOW)?+this.getAttribute(Kv.TARGET_LIVE_WINDOW):function(i){var e,t;return null!=(t=null==(e=Cp.get(i))?void 0:e.targetLiveWindow)?t:Number.NaN}(this.nativeEl)},set:function(i){i!=this.targetLiveWindow&&(null==i?this.removeAttribute(Kv.TARGET_LIVE_WINDOW):this.setAttribute(Kv.TARGET_LIVE_WINDOW,"".concat(+i)))}},{key:"liveEdgeStart",get:function(){var i,e;if(this.hasAttribute(Kv.LIVE_EDGE_OFFSET)){var t=this.liveEdgeOffset,s=null!=(i=this.nativeEl.seekable.end(0))?i:0,n=null!=(e=this.nativeEl.seekable.start(0))?e:0;return Math.max(n,s-t)}return function(i){var e,t=null==(e=Cp.get(i))?void 0:e.liveEdgeStartOffset;if("number"!=typeof t)return Number.NaN;var s=qp(i);return s.length?s.end(s.length-1)-t:Number.NaN}(this.nativeEl)}},{key:"liveEdgeOffset",get:function(){if(this.hasAttribute(Kv.LIVE_EDGE_OFFSET))return+this.getAttribute(Kv.LIVE_EDGE_OFFSET)},set:function(i){i!=this.liveEdgeOffset&&(null==i?this.removeAttribute(Kv.LIVE_EDGE_OFFSET):this.setAttribute(Kv.LIVE_EDGE_OFFSET,"".concat(+i)))}},{key:"seekable",get:function(){return qp(this.nativeEl)}},{key:"addCuePoints",value:(n=f(regeneratorRuntime.mark((function e(i){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(this.nativeEl.currentSrc||console.warn("addCuePoints() was called before the media element has loaded. Wait for the loadstart event before calling addCuePoints()."),Uf(this.nativeEl,i)));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"activeCuePoint",get:function(){return jf(this.nativeEl)}},{key:"cuePoints",get:function(){return function(i){var e=xf(i,(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{label:Pf}).label,"metadata");return null!=e&&e.cues?Array.from(e.cues,(function(s){return Bf(s)})):[]}(this.nativeEl)}},{key:"addChapters",value:(t=f(regeneratorRuntime.mark((function e(i){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(this.nativeEl.currentSrc||console.warn("addChapters() was called before the media element has loaded. Wait for the loadstart event before calling addChapters()."),Gf(this.nativeEl,i)));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"activeChapter",get:function(){return Yf(this.nativeEl)}},{key:"chapters",get:function(){return function(i){var e,s=xf(i,(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{label:Hf}).label,"chapters");return null!=(e=null==s?void 0:s.cues)&&e.length?Array.from(s.cues,(function(e){return qf(e)})):[]}(this.nativeEl)}},{key:"getStartDate",value:function(){return function(i,e){if(e){var t=e.playingDate;
2if(null!=t)return new Date(t.getTime()-1e3*i.currentTime)}return"function"==typeof i.getStartDate?i.getStartDate():new Date(NaN)}(this.nativeEl,this._hls)}},{key:"currentPdt",get:function(){return function(i,e){if(e&&e.playingDate)return e.playingDate;if("function"==typeof i.getStartDate){var t=i.getStartDate();return new Date(t.getTime()+1e3*i.currentTime)}return new Date(NaN)}(this.nativeEl,this._hls)}},{key:"preferPlayback",get:function(){var i=this.getAttribute(Kv.PREFER_PLAYBACK);if(i===tf||i===nf)return i},set:function(i){i!==this.preferPlayback&&(i===tf||i===nf?this.setAttribute(Kv.PREFER_PLAYBACK,i):this.removeAttribute(Kv.PREFER_PLAYBACK))}},{key:"metadata",get:function(){var e=this;return x(x({},this.getAttributeNames().filter((function(i){return i.startsWith("metadata-")&&![Kv.METADATA_URL].includes(i)})).reduce((function(i,t){var n=e.getAttribute(t);return null!=n&&(i[t.replace(/^metadata-/,"").replace(/-/g,"_")]=n),i}),{})),Vv(this,Iv))},set:function(i){Wv(this,Iv,null!=i?i:{}),this.mux&&this.mux.emit("hb",Vv(this,Iv))}},{key:"_hlsConfig",get:function(){return Vv(this,Ov)},set:function(i){Wv(this,Ov,i)}},{key:"logo",get:function(){var i;return null!=(i=this.getAttribute(Kv.LOGO))?i:Vv(this,ol)},set:function(i){i?this.setAttribute(Kv.LOGO,i):this.removeAttribute(Kv.LOGO)}},{key:"load",value:function(){zp(this,this.nativeEl,Vv(this,Mv,Pv))}},{key:"unload",value:function(){Xp(this.nativeEl,Vv(this,Mv,Pv),this)}},{key:"attributeChangedCallback",value:function(i,e,t){var s,n,r=this;switch(Fv.observedAttributes.includes(i)&&!["src","autoplay","preload"].includes(i)&&y(S(o.prototype),"attributeChangedCallback",this).call(this,i,e,t),i){case Kv.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=null!=t?t:void 0;break;case Kv.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=null!=t?t:void 0;break;case"src":var c=!!e,a=!!t;!c&&a?qv(this,Mv,Uv).call(this):c&&!a?this.unload():c&&a&&(this.unload(),qv(this,Mv,Uv).call(this));break;case"autoplay":if(t===e)break;null==(s=Vv(this,Mv,Pv))||s.setAutoplay(this.autoplay);break;case"preload":if(t===e)break;null==(n=Vv(this,Mv,Pv))||n.setPreload(t);break;case Kv.PLAYBACK_ID:case Kv.CUSTOM_DOMAIN:case Kv.MAX_RESOLUTION:case Kv.MIN_RESOLUTION:case Kv.RENDITION_ORDER:case Kv.PROGRAM_START_TIME:case Kv.PROGRAM_END_TIME:case Kv.ASSET_START_TIME:case Kv.ASSET_END_TIME:case Kv.PLAYBACK_TOKEN:this.src=Bp(this);break;case Kv.DEBUG:var l=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=l);break;case Kv.METADATA_URL:t&&fetch(t).then((function(e){return e.json()})).then((function(e){return r.metadata=e})).catch((function(){return console.error("Unable to load or parse metadata JSON from metadata-url ".concat(t,"!"))}));break;case Kv.STREAM_TYPE:(null==t||t!==e)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case Kv.TARGET_LIVE_WINDOW:(null==t||t!==e)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case Kv.LOGO:(null==t||t!==e)&&this.updateLogo();break;case Kv.DISABLE_TRACKING:if(null==t||t!==e){var d=this.currentTime,h=this.paused;this.unload(),qv(this,Mv,Uv).call(this).then((function(){r.currentTime=d,h||r.play()}))}break;case Kv.DISABLE_COOKIES:(null==t||t!==e)&&this.disableCookies&&document.cookie.split(";").forEach((function(e){e.trim().startsWith("muxData")&&(document.cookie=e.replace(/^ +/,"").replace(/=.*/,"=;expires="+(new Date).toUTCString()+";path=/"))}));break;case Kv.CAP_RENDITION_TO_PLAYER_SIZE:(null==t||t!==e)&&(this.capRenditionToPlayerSize=null!=t||void 0)}}},{key:"updateLogo",value:function(){if(this.shadowRoot){var i=this.shadowRoot.querySelector('slot[name="logo"]');if(i){var e=this.constructor.getLogoHTML(Vv(this,ol)||this.logo);i.innerHTML=e}}}},{key:"connectedCallback",value:function(){var i,e;null==(i=y(S(o.prototype),"connectedCallback",this))||i.call(this),null==(e=this.nativeEl)||e.addEventListener("muxmetadata",Vv(this,Cv)),this.nativeEl&&this.src&&!Vv(this,Mv,Pv)&&qv(this,Mv,Uv).call(this)}},{key:"disconnectedCallback",value:function(){var i,e;null==(i=this.nativeEl)||i.removeEventListener("muxmetadata",Vv(this,Cv)),this.unload(),null==(e=y(S(o.prototype),"disconnectedCallback",this))||e.call(this)}},{key:"handleEvent",value:function(i){i.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(i.type,{composed:!0,detail:i.detail}))}}],[{key:"NAME",get:function(){return Qv}},{key:"VERSION",get:function(){return $v}},{key:"observedAttributes",get:function(){var i;return[].concat(Yv,v(null!=(i=Fv.observedAttributes)?i:[]))}},{key:"getLogoHTML",value:function(i){return i&&"false"!==i?"default"===i?'\n<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.12
21 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>':'<img part="logo" src="'.concat(i,'" />'):""}},{key:"getTemplateHTML",value:function(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"\n      ".concat(Fv.getTemplateHTML(i),'\n      <style>\n        :host {\n          position: relative;\n        }\n        slot[name="logo"] {\n          display: flex;\n          justify-content: end;\n          position: absolute;\n          top: 1rem;\n          right: 1rem;\n          opacity: 0;\n          transition: opacity 0.25s ease-in-out;\n          z-index: 1;\n        }\n        slot[name="logo"]:has([part="logo"]) {\n          opacity: 1;\n        }\n        slot[name="logo"] [part="logo"] {\n          width: 5rem;\n          pointer-events: none;\n          user-select: none;\n        }\n      </style>\n      <slot name="logo">\n        ').concat(this.getLogoHTML(null!=(e=i[Kv.LOGO])?e:""),"\n      </slot>\n    ")}}]),o}(Fv);Sv=new WeakMap,Av=new WeakMap,Iv=new WeakMap,Rv=new WeakMap,Ov=new WeakMap,Lv=new WeakMap,Dv=new WeakMap,xv=new WeakMap,ol=new WeakMap,Cv=new WeakMap,Mv=new WeakSet,Pv=function(){return function(i){var e;return null==(e=Cp.get(i))?void 0:e.coreReference}(this.nativeEl)},Nv=new WeakMap,Uv=function(){var e=f(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=Vv(this,Sv),e.t0){e.next=6;break}return e.next=4,Wv(this,Sv,Promise.resolve());case 4:Wv(this,Sv,null),this.load();case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}();var Xv=new WeakMap,Jv=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(E(Error)),Zv=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(E(Error)),tm=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"];function nm(){var i,e;return null==(e=null==(i=globalThis.cast)?void 0:i.framework)?void 0:e.CastContext.getInstance()}function dl(){var i;return null==(i=nm())?void 0:i.getCurrentSession()}function rm(){var i;return null==(i=dl())?void 0:i.getSessionObj().media[0]}function im(i){return new Promise((function(e,t){rm().editTracksInfo(i,e,t)}))}function am(i){return new Promise((function(e,t){rm().getStatus(i,e,t)}))}function om(i){return nm().setOptions(x(x({},{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}),i))}function sm(i){if(i){var e=i.match(/\.([a-zA-Z0-9]+)(?:\?.*)?$/);return e?e[1]:null}}function um(i){for(var e=i.split("\n"),t=[],s=0;s<e.length;s++)if(e[s].trim().startsWith("#EXT-X-STREAM-INF")){var n=e[s+1]?e[s+1].trim():"";n&&!n.startsWith("#")&&t.push(n)}return t}function cm(i){return i.split("\n").find((function(s){return!s.trim().startsWith("#")&&""!==s.trim()}))}function lm(e){return dm.apply(this,arguments)}function dm(){return(dm=f(regeneratorRuntime.mark((function e(i){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i){e.next=2;break}return e.abrupt("return",!1);
2case 2:if(!/\.m3u8?(\?.*)?$/i.test(i)){e.next=4;break}return e.abrupt("return",!0);case 4:if(!i.startsWith("blob:")){e.next=6;break}return e.abrupt("return",!1);case 6:return e.prev=6,e.next=9,fetch(i,{method:"HEAD"});case 9:return t=e.sent.headers.get("Content-Type"),e.abrupt("return",tm.some((function(s){return t===s})));case 13:return e.prev=13,e.t0=e.catch(6),e.abrupt("return",(console.error("Error while trying to get the Content-Type of the manifest",e.t0),!1));case 16:case"end":return e.stop()}}),e,null,[[6,13]])})))).apply(this,arguments)}function hm(e){return fm.apply(this,arguments)}function fm(){return(fm=f(regeneratorRuntime.mark((function e(i){var t,n,s,a,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i||i.startsWith("blob:")){e.next=24;break}return e.prev=1,e.next=4,fetch(i);case 4:return e.next=6,e.sent.text();case 6:if(t=e.sent,n=t,!((s=um(t)).length>0)){e.next=16;break}return a=new URL(s[0],i).toString(),e.next=13,fetch(a);case 13:return e.next=15,e.sent.text();case 15:n=e.sent;case 16:return r=cm(n),e.abrupt("return",sm(r));case 20:return e.prev=20,e.t0=e.catch(1),console.error("Error while trying to parse the manifest playlist",e.t0),e.abrupt("return");case 24:case"end":return e.stop()}}),e,null,[[1,20]])})))).apply(this,arguments)}var pm,vm=new(globalThis.WeakRef?function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"add",value:function(i){y(S(n.prototype),"add",this).call(this,new WeakRef(i))}},{key:"forEach",value:function(i){y(S(n.prototype),"forEach",this).call(this,(function(e){var t=e.deref();t&&i(t)}))}}]),n}(E(Set)):Set),mm=new WeakSet;!function(i){var e,t,s;null!=(t=null==(e=globalThis.chrome)?void 0:e.cast)&&t.isAvailable?null!=(s=globalThis.cast)&&s.framework?i():customElements.whenDefined("google-cast-button").then(i):globalThis.__onGCastApiAvailable=function(){customElements.whenDefined("google-cast-button").then(i)}}((function(){var i,e,t,s;null!=(e=null==(i=globalThis.chrome)?void 0:i.cast)&&e.isAvailable?pm||(pm=cast.framework,nm().addEventListener(pm.CastContextEventType.CAST_STATE_CHANGED,(function(e){vm.forEach((function(t){var a,n;return null==(n=(a=Xv.get(t)).onCastStateChanged)?void 0:n.call(a,e)}))})),nm().addEventListener(pm.CastContextEventType.SESSION_STATE_CHANGED,(function(e){vm.forEach((function(t){var a,n;return null==(n=(a=Xv.get(t)).onSessionStateChanged)?void 0:n.call(a,e)}))})),vm.forEach((function(e){var t,a;return null==(a=(t=Xv.get(e)).init)?void 0:a.call(t)}))):console.debug("chrome.cast.isAvailable",null==(s=null==(t=globalThis.chrome)?void 0:t.cast)?void 0:s.isAvailable)}));var gm,ym,bm,Em,_m,km,Tm,wm,ul,Sm,Am,Im,Rm,Om,Lm,Dm,xm,Cm,Mm=0,Pm=function(e){T(c,e);var t,n,r,o=P(c);function c(e){var t;return A(this,c),t=o.call(this),W(_(t),Sm),W(_(t),gm),W(_(t),ym),W(_(t),bm),W(_(t),Em),W(_(t),_m,"disconnected"),W(_(t),km,!1),W(_(t),Tm,new Set),W(_(t),wm,new WeakMap),W(_(t),ul,(function(){return K(_(t),Sm,Cm).call(_(t))})),G(_(t),gm,e),vm.add(_(t)),Xv.set(_(t),{init:function(){return K(_(t),Sm,Dm).call(_(t))},onCastStateChanged:function(){return K(_(t),Sm,Om).call(_(t))},onSessionStateChanged:function(){return K(_(t),Sm,Lm).call(_(t))},getCastPlayer:function(){return H(_(t),Sm,Am)}}),K(_(t),Sm,Dm).call(_(t)),t}return I(c,[{key:"destroy",value:function(){var e,s,t,n=this;null==(s=null==(e=H(this,gm))?void 0:e.textTracks)||s.removeEventListener("change",H(this,ul)),H(this,Em)&&null!=(t=H(this,bm))&&t.controller&&Object.entries(H(this,Em)).forEac
2h((function(e){var t=m(e,2),r=t[0],a=t[1];H(n,bm).controller.removeEventListener(r,a)})),H(this,gm)&&mm.delete(H(this,gm)),G(this,ym,!1)}},{key:"state",get:function(){return H(this,_m)}},{key:"watchAvailability",value:(r=f(regeneratorRuntime.mark((function e(t){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!H(this,gm).disableRemotePlayback){e.next=2;break}throw new Jv("disableRemotePlayback attribute is present.");case 2:return e.abrupt("return",(H(this,wm).set(t,++Mm),H(this,Tm).add(t),queueMicrotask((function(){return t(K(n,Sm,Rm).call(n))})),Mm));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"cancelWatchAvailability",value:(n=f(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!H(this,gm).disableRemotePlayback){e.next=2;break}throw new Jv("disableRemotePlayback attribute is present.");case 2:t?H(this,Tm).delete(t):H(this,Tm).clear();case 3:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"prompt",value:(t=f(regeneratorRuntime.mark((function e(){var s,t,n,a,r,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!H(this,gm).disableRemotePlayback){e.next=2;break}throw new Jv("disableRemotePlayback attribute is present.");case 2:if(null!=(t=null==(s=globalThis.chrome)?void 0:s.cast)&&t.isAvailable){e.next=4;break}throw new Zv("The RemotePlayback API is disabled on this platform.");case 4:return r=mm.has(H(this,gm)),mm.add(H(this,gm)),om(H(this,gm).castOptions),Object.entries(H(this,Em)).forEac
2h((function(e){var t=m(e,2),n=t[0],r=t[1];H(o,bm).controller.addEventListener(n,r)})),e.prev=6,e.next=9,nm().requestSession();case 9:e.next=16;break;case 11:if(e.prev=11,e.t0=e.catch(6),r||mm.delete(H(this,gm)),"cancel"!==e.t0){e.next=15;break}return e.abrupt("return");case 15:throw new Error(e.t0);case 16:null==(a=null==(n=Xv.get(H(this,gm)))?void 0:n.loadOnPrompt)||a.call(n);case 17:case"end":return e.stop()}}),e,this,[[6,11]])}))),function(){return t.apply(this,arguments)})}]),c}(E(EventTarget));gm=new WeakMap,ym=new WeakMap,bm=new WeakMap,Em=new WeakMap,_m=new WeakMap,km=new WeakMap,Tm=new WeakMap,wm=new WeakMap,ul=new WeakMap,Sm=new WeakSet,Am=function(){if(mm.has(H(this,gm)))return H(this,bm)},Im=function(){var e=this;mm.has(H(this,gm))&&(Object.entries(H(this,Em)).forEach((function(t){var n=m(t,2),r=n[0],s=n[1];H(e,bm).controller.removeEventListener(r,s)})),mm.delete(H(this,gm)),H(this,gm).muted=H(this,bm).isMuted,H(this,gm).currentTime=H(this,bm).savedPlayerState.currentTime,!1===H(this,bm).savedPlayerState.isPaused&&H(this,gm).play())},Rm=function(){var s,e=null==(s=nm())?void 0:s.getCastState();return e&&"NO_DEVICES_AVAILABLE"!==e},Om=function(){var e=nm().getCastState();if(mm.has(H(this,gm))&&"CONNECTING"===e&&(G(this,_m,"connecting"),this.dispatchEvent(new Event("connecting"))),!H(this,km)&&null!=e&&e.includes("CONNECT")){G(this,km,!0);var t,n=C(H(this,Tm));try{for(n.s();!(t=n.n()).done;){(0,t.value)(!0)}}catch(e){n.e(e)}finally{n.f()}}else if(H(this,km)&&(!e||"NO_DEVICES_AVAILABLE"===e)){G(this,km,!1);var r,o=C(H(this,Tm));try{for(o.s();!(r=o.n()).done;){(0,r.value)(!1)}}catch(e){o.e(e)}finally{o.f()}}},Lm=function(){var e=f(regeneratorRuntime.mark((function e(){var s,t,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=pm.SessionState.SESSION_RESUMED,nm().getSessionState()!==t||H(this,gm).castSrc!==(null==(s=rm())?void 0:s.media.contentId)){e.next=12;break}
2return mm.add(H(this,gm)),Object.entries(H(this,Em)).forEach((function(e){var t=m(e,2),r=t[0],o=t[1];H(n,bm).controller.addEventListener(r,o)})),e.prev=3,e.next=6,am(new chrome.cast.media.GetStatusRequest);case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(3),console.error(e.t0);case 11:H(this,Em)[pm.RemotePlayerEventType.IS_PAUSED_CHANGED](),H(this,Em)[pm.RemotePlayerEventType.PLAYER_STATE_CHANGED]();case 12:case"end":return e.stop()}}),e,this,[[3,8]])})));return function(){return e.apply(this,arguments)}}(),Dm=function(){var e,t=this;!pm||H(this,ym)||(G(this,ym,!0),om(H(this,gm).castOptions),H(this,gm).textTracks.addEventListener("change",H(this,ul)),K(this,Sm,Om).call(this),G(this,bm,new pm.RemotePlayer),new pm.RemotePlayerController(H(this,bm)),G(this,Em,(k(e={},pm.RemotePlayerEventType.IS_CONNECTED_CHANGED,(function(e){!0===e.value?(G(t,_m,"connected"),t.dispatchEvent(new Event("connect"))):(K(t,Sm,Im).call(t),G(t,_m,"disconnected"),t.dispatchEvent(new Event("disconnect")))})),k(e,pm.RemotePlayerEventType.DURATION_CHANGED,(function(){H(t,gm).dispatchEvent(new Event("durationchange"))})),k(e,pm.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,(function(){H(t,gm).dispatchEvent(new Event("volumechange"))})),k(e,pm.RemotePlayerEventType.IS_MUTED_CHANGED,(function(){H(t,gm).dispatchEvent(new Event("volumechange"))})),k(e,pm.RemotePlayerEventType.CURRENT_TIME_CHANGED,(function(){var e;null!=(e=H(t,Sm,Am))&&e.isMediaLoaded&&H(t,gm).dispatchEvent(new Event("timeupdate"))})),k(e,pm.RemotePlayerEventType.VIDEO_INFO_CHANGED,(function(){H(t,gm).dispatchEvent(new Event("resize"))})),k(e,pm.RemotePlayerEventType.IS_PAUSED_CHANGED,(function(){H(t,gm).dispatchEvent(new Event(t.paused?"pause":"play"))})),k(e,pm.RemotePlayerEventType.PLAYER_STATE_CHANGED,(function(){var e,n,s;(null==(n=H(t,Sm,Am))?void 0:n.playerState)!==chrome.cast.media.PlayerState.PAUSED&&H(t,gm).dispatchEvent(new Event((e={},k(e,chrome.cast.media.PlayerState.PLAYING,"playing"),k(e,chrome.cast.media.PlayerState.BUFFERING,"waiting"),k(e,chrome.cast.media.PlayerState.IDLE,"emptied"),e)[null==(s=H(t,Sm,Am))?void 0:s.playerState]))})),k(e,pm.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED,f(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=null!=(n=H(t,Sm,Am))&&n.isMediaLoaded,!e.t0){e.next=5;break}return e.next=4,Promise.resolve();case 4:K(t,Sm,xm).call(t);case 5:case"end":return e.stop()}}),e)})))),e)))},xm=function(){K(this,Sm,Cm).call(this)},Cm=function(){var e=f(regeneratorRuntime.mark((function e(){var t,n,r,p,g,s,o,c,l,d,h,u,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(H(this,Sm,Am)){e.next=2;break}return e.abrupt("return");case 2:if(s=(null!=(n=null==(t=H(this,bm).mediaInfo)?void 0:t.tracks)?n:[]).filter((function(e){return e.type===chrome.cast.media.TrackType.TEXT})),o=v(H(this,gm).textTracks).filter((function(e){var t=e.kind;return"subtitles"===t||"captions"===t})),c=s.map((function(e){var t,n=e.language,r=e.name,c=e.trackId,b=(null!=(t=o.find((function(e){return e.language===n&&e.label===r})))?t:{}).mode;return!!b&&{mode:b,trackId:c}})).filter(Boolean),l=c.filter((function(e){return"showing"!==e.mode})).map((function(e){return e.trackId})),d=c.find((function(e){return"showing"===e.mode})),h=null!=(g=null==(p=null==(r=dl())?void 0:r.getSessionObj().media[0])?void 0:p.activeTrackIds)?g:[],u=h,h.length&&(u=u.filter((function(e){return!l.includes(e)}))),null!=d&&d.trackId&&(u=[].concat(v(u),[d.trackId])),u=v(new Set(u)),function(e,t){return e.length===t.length&&e.every((function(e){return t.includes(e)}))}(h,u)){e.next=13;break}return e.prev=4,f=new chrome.cast.media.EditTracksInfoRequest(u),e.next=8,im(f);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),console.error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[4,10]])})));return function(){return e.apply(this,arguments)}}();var Nm=function(e){T(n,e);var t=P(n);function n(e,s){var r;return A(this,n),r=t.call(this,e),j(_(r),"track"),r.track=s.track,r}return I(n)}(E(Event)),Um=new WeakMap;function Fm(i){var e;return null!=(e=Um.get(i))?e:function(i,e){var t=Um.get(i);return t||Um.set(i,t={}),Object.assign(t,e)}(i,{})}function Bm(i,e){var t=i.videoTracks;Fm(e).media=new WeakRef(i),Fm(e).renditionSet||(Fm(e).renditionSet=new Set);var s=Fm(t).trackSet;s.add(e);var n=s.size-1;
2n in Gm.prototype||Object.defineProperty(Gm.prototype,n,{get:function(){return v(Fm(this).trackSet)[n]}}),queueMicrotask((function(){t.dispatchEvent(new Nm("addtrack",{track:e}))}))}function jm(i){var s,e,t=null==(e=null==(s=Fm(i).media)?void 0:s.deref())?void 0:e.videoTracks;t&&(Fm(t).trackSet.delete(i),queueMicrotask((function(){t.dispatchEvent(new Nm("removetrack",{track:i}))})))}var Vm,hr,Hm,Wm,qm,Gm=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.call(this),W(_(e),Wm),W(_(e),Vm),W(_(e),hr),W(_(e),Hm),Fm(_(e)).trackSet=new Set,e}return I(n,[{key:Symbol.iterator,value:function(){return H(this,Wm,qm).values()}},{key:"length",get:function(){return H(this,Wm,qm).size}},{key:"getTrackById",value:function(e){var s;return null!=(s=v(H(this,Wm,qm)).find((function(t){return t.id===e})))?s:null}},{key:"selectedIndex",get:function(){return v(H(this,Wm,qm)).findIndex((function(e){return e.selected}))}},{key:"onaddtrack",get:function(){return H(this,Vm)}},{key:"onaddtrack",set:function(e){H(this,Vm)&&(this.removeEventListener("addtrack",H(this,Vm)),G(this,Vm,void 0)),"function"==typeof e&&(G(this,Vm,e),this.addEventListener("addtrack",e))}},{key:"onremovetrack",get:function(){return H(this,hr)}},{key:"onremovetrack",set:function(e){H(this,hr)&&(this.removeEventListener("removetrack",H(this,hr)),G(this,hr,void 0)),"function"==typeof e&&(G(this,hr,e),this.addEventListener("removetrack",e))}},{key:"onchange",get:function(){return H(this,Hm)}},{key:"onchange",set:function(e){H(this,Hm)&&(this.removeEventListener("change",H(this,Hm)),G(this,Hm,void 0)),"function"==typeof e&&(G(this,Hm,e),this.addEventListener("change",e))}}]),n}(E(EventTarget));Vm=new WeakMap,hr=new WeakMap,Hm=new WeakMap,Wm=new WeakSet,qm=function(){return Fm(this).trackSet};var Km=function(e){T(n,e);var t=P(n);function n(e,s){var r;return A(this,n),r=t.call(this,e),j(_(r),"rendition"),r.rendition=s.rendition,r}return I(n)}(E(Event));function Ym(i){var e,t=null==(e=Fm(i).media)?void 0:e.deref();return t?v(t.videoTracks).filter((function(s){return s.selected})).flatMap((function(s){return v(Fm(s).renditionSet)})):[]}var $m,Qm,zm,Xm=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.apply(this,arguments),W(_(e),$m),W(_(e),Qm),W(_(e),zm),e}return I(n,[{key:Symbol.iterator,value:function(){return Ym(this).values()}},{key:"length",get:function(){return Ym(this).length}},{key:"getRenditionById",value:function(e){var s;return null!=(s=Ym(this).find((function(t){return"".concat(t.id)=="".concat(e)})))?s:null}},{key:"selectedIndex",get:function(){return Ym(this).findIndex((function(e){return e.selected}))}},{key:"selectedIndex",set:function(e){var t,n=C(Ym(this).entries());try{for(n.s();!(t=n.n()).done;){var r=m(t.value,2),s=r[0];r[1].selected=s===e}}catch(e){n.e(e)}finally{n.f()}}},{key:"onaddrendition",get:function(){return H(this,$m)}},{key:"onaddrendition",set:function(e){H(this,$m)&&(this.removeEventListener("addrendition",H(this,$m)),G(this,$m,void 0)),"function"==typeof e&&(G(this,$m,e),this.addEventListener("addrendition",e))}},{key:"onremoverendition",get:function(){return H(this,Qm)}},{key:"onremoverendition",set:function(e){H(this,Qm)&&(this.removeEventListener("removerendition",H(this,Qm)),G(this,Qm,void 0)),"function"==typeof e&&(G(this,Qm,e),this.addEventListener("removerendition",e))}},{key:"onchange",get:function(){return H(this,zm)}},{key:"onchange",set:function(e){H(this,zm)&&(this.removeEventListener("change",H(this,zm)),G(this,zm,void 0)),"function"==typeof e&&(G(this,zm,e),this.addEventListener("change",e))}}]),n}(E(EventTarget));$m=new WeakMap,Qm=new WeakMap,zm=new WeakMap;var Jm,Zm=function(){function e(){A(this,e),j(this,"src"),j(this,"id"),j(this,"width"),j(this,"height"),j(this,"bitrate"),j(this,"frameRate"),j(this,"codec"),W(this,Jm,!1)}return I(e,[{key:"selected",get:function(){return H(this,Jm)},set:function(e){H(this,Jm)!==e&&(G(this,Jm,e),function(i){var e,s,t=null==(s=null==(e=Fm(i).media)?void 0:e.deref())?void 0:s.videoRenditions;!t||Fm(t).changeRequested||(Fm(t).changeRequested=!0,queueMicrotask((function(){delete Fm(t).changeRequested,Fm(i).track.selected&&t.dispatchEvent(new Event("change"))})))}(this))}}]),e}();Jm=new WeakMap;var eg,tg=function(){function e(){A(this,e),j(this,"id"),j(this,"kind"),j(this,"label",""),j(this,"language",""),j(this,"sourceBuffer"),W(this,eg,!1)}return I(e,[{key:"addRendition",value:function(e,t,s,n,r,a){var o=new Zm;return o.src=e,o.width=t,o.height=s,o.frameRate=a,o.bitrate=r,o.co
2dec=n,function(i,e){var t,a,n=null==(a=null==(t=Fm(i).media)?void 0:t.deref())?void 0:a.videoRenditions;Fm(e).media=Fm(i).media,Fm(e).track=i;var s=Fm(i).renditionSet;s.add(e);var r=s.size-1;r in Xm.prototype||Object.defineProperty(Xm.prototype,r,{get:function(){return Ym(this)[r]}}),queueMicrotask((function(){!n||!i.selected||n.dispatchEvent(new Km("addrendition",{rendition:e}))}))}(this,o),o}},{key:"removeRendition",value:function(e){!function(i){var e,t,n=null==(t=null==(e=Fm(i).media)?void 0:e.deref())?void 0:t.videoRenditions,r=Fm(i).track;Fm(r).renditionSet.delete(i),queueMicrotask((function(){var a=Fm(i).track;!n||!a.selected||n.dispatchEvent(new Km("removerendition",{rendition:i}))}))}(e)}},{key:"selected",get:function(){return H(this,eg)},set:function(e){H(this,eg)!==e&&(G(this,eg,e),!0===e&&function(i){var s,e,t,n,r=null!=(t=null==(e=null==(s=Fm(i).media)?void 0:s.deref())?void 0:e.videoTracks)?t:[],o=!1,c=C(r);try{for(c.s();!(n=c.n()).done;){var a=n.value;a!==i&&(a.selected=!1,o=!0)}}catch(e){c.e(e)}finally{c.f()}if(o){if(Fm(r).changeRequested)return;Fm(r).changeRequested=!0,queueMicrotask((function(){delete Fm(r).changeRequested,r.dispatchEvent(new Event("change"))}))}}(this))}}]),e}();function ng(i){var e,t=null==(e=Fm(i).media)?void 0:e.deref();return t?v(t.audioTracks).filter((function(s){return s.enabled})).flatMap((function(s){return v(Fm(s).renditionSet)})):[]}eg=new WeakMap;var rg,ig,ag,og=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.apply(this,arguments),W(_(e),rg),W(_(e),ig),W(_(e),ag),e}return I(n,[{key:Symbol.iterator,value:function(){return ng(this).values()}},{key:"length",get:function(){return ng(this).length}},{key:"getRenditionById",value:function(e){var s;return null!=(s=ng(this).find((function(t){return"".concat(t.id)=="".concat(e)})))?s:null}},{key:"selectedIndex",get:function(){return ng(this).findIndex((function(e){return e.selected}))}},{key:"selectedIndex",set:function(e){var t,n=C(ng(this).entries());try{for(n.s();!(t=n.n()).done;){var r=m(t.value,2),s=r[0];r[1].selected=s===e}}catch(e){n.e(e)}finally{n.f()}}},{key:"onaddrendition",get:function(){return H(this,rg)}},{key:"onaddrendition",set:function(e){H(this,rg)&&(this.removeEventListener("addrendition",H(this,rg)),G(this,rg,void 0)),"function"==typeof e&&(G(this,rg,e),this.addEventListener("addrendition",e))}},{key:"onremoverendition",get:function(){return H(this,ig)}},{key:"onremoverendition",set:function(e){H(this,ig)&&(this.removeEventListener("removerendition",H(this,ig)),G(this,ig,void 0)),"function"==typeof e&&(G(this,ig,e),this.addEventListener("removerendition",e))}},{key:"onchange",get:function(){return H(this,ag)}},{key:"onchange",set:function(e){H(this,ag)&&(this.removeEventListener("change",H(this,ag)),G(this,ag,void 0)),"function"==typeof e&&(G(this,ag,e),this.addEventListener("change",e))}}]),n}(E(EventTarget));rg=new WeakMap,ig=new WeakMap,ag=new WeakMap;var sg,ug=function(){function e(){A(this,e),j(this,"src"),j(this,"id"),j(this,"bitrate"),j(this,"codec"),W(this,sg,!1)}return I(e,[{key:"selected",get:function(){return H(this,sg)},set:function(e){H(this,sg)!==e&&(G(this,sg,e),function(i){var e,s,t=null==(s=null==(e=Fm(i).media)?void 0:e.deref())?void 0:s.audioRenditions;!t||Fm(t).changeRequested||(Fm(t).changeRequested=!0,queueMicrotask((function(){delete Fm(t).changeRequested,Fm(i).track.enabled&&t.dispatchEvent(new Event("change"))})))}(this))}}]),e}();function cg(i,e){var t=i.audioTracks;Fm(e).media=new WeakRef(i),Fm(e).renditionSet||(Fm(e).renditionSet=new Set);var s=Fm(t).trackSet;s.add(e);var n=s.size-1;n in vg.prototype||Object.defineProperty(vg.prototype,n,{get:function(){return v(Fm(this).trackSet)[n]}}),queueMicrotask((function(){t.dispatchEvent(new Nm("addtrack",{track:e}))}))}function lg(i){var s,e,t=null==(e=null==(s=Fm(i).media)?void 0:s.deref())?void 0:e.audioTracks;t&&(Fm(t).trackSet.delete(i),queueMicrotask((function(){t.dispatchEvent(new Nm("removetrack",{track:i}))})))}sg=new WeakMap;var dg,br,hg,fg,pg,vg=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.call(this),W(_(e),fg),W(_(e),dg),W(_(e),br),W(_(e),hg),Fm(_(e)).trackSet=new Set,e}return I(n,[{key:Symbol.iterator,value:function(){return H(this,fg,pg).values()}},{key:"length",get:function(){return H(this,fg,pg).size}},{key:"getTrackById",value:function(e){var s;return null!=(s=v(H(this,fg,pg)).find((function(t){return t.id===e})))?s:null}},{key:"onaddtrack",get:function(){return H(this,dg)}},{key:"onaddtrack",set:function(e){H(this,dg)&&(this.removeEventListener("addtrack",H(this,dg)),G(this,dg,void 0)),"function"==typeof e&&(G(this,dg,e),this.addEventListener("addtrack",e))}},{key:"onremovetrack",get:function(){return H(this,br)}},{key:"onremovetrack",set:function(e){H(this,br)&&(this.removeEventListener("removetrack",H(this,br)),G(this,br,void 0)),"function"==typeof e&&(G(this,br,e),this.addEventListener("removetrack",e))}},{key:"onchange",get:function(){return H(this,hg)}},{key:"onchange",set:function(e){H(this,hg)&&(this.removeEventListener("change",H(this,hg)),G(this,hg,void 0)),"function"==typeof e&&(G(this,hg,e),this.addEventListener("change",e))}}]),n}(E(EventTarget));dg=new WeakMap,br=new WeakMap,hg=new WeakMap,fg=new WeakSet,pg=function(){return Fm(this).trackSet};var mg,gg=function(){function e(){A(this,e),j(this,"id"),j(this,"kind"),j(this,"label",""),j(this,"language",""),j(this,"sourceBuffer"),W(this,mg,!1)}return I(e,[{key:"addRendition",value:function(e,t,s){var n=new ug;return n.src=e,n.codec=t,n.bitrate=s,function(i,e){var t,a,n=null==(a=null==(t=Fm(i).media)?void 0:t.deref())?void 0:a.audioRenditions;Fm(e).media=Fm(i).media,Fm(e).track=i;var s=Fm(i).renditionSet;s.add(e);var r=s.size-1;
2r in og.prototype||Object.defineProperty(og.prototype,r,{get:function(){return ng(this)[r]}}),queueMicrotask((function(){!n||!i.enabled||n.dispatchEvent(new Km("addrendition",{rendition:e}))}))}(this,n),n}},{key:"removeRendition",value:function(e){!function(i){var e,t,n=null==(t=null==(e=Fm(i).media)?void 0:e.deref())?void 0:t.audioRenditions,r=Fm(i).track;Fm(r).renditionSet.delete(i),queueMicrotask((function(){var a=Fm(i).track;!n||!a.enabled||n.dispatchEvent(new Km("removerendition",{rendition:i}))}))}(e)}},{key:"enabled",get:function(){return H(this,mg)},set:function(e){H(this,mg)!==e&&(G(this,mg,e),function(i){var e,s,t=null==(s=null==(e=Fm(i).media)?void 0:e.deref())?void 0:s.audioTracks;!t||Fm(t).changeRequested||(Fm(t).changeRequested=!0,queueMicrotask((function(){delete Fm(t).changeRequested,t.dispatchEvent(new Event("change"))})))}(this))}}]),e}();mg=new WeakMap;var yg=Eg(globalThis.HTMLMediaElement,"video"),bg=Eg(globalThis.HTMLMediaElement,"audio");function Eg(i,e){var t;if(null!=i&&i.prototype)return null==(t=Object.getOwnPropertyDescriptor(i.prototype,"".concat(e,"Tracks")))?void 0:t.get}var _g=function(i){throw TypeError(i)},kg=function(i,e,t){return e.has(i)||_g("Cannot "+t)},Tg=function(i,e,t){return kg(i,e,"read from private field"),t?t.call(i):e.get(i)},wg=function(i,e,t){return e.has(i)?_g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t)},Sg=function(i,e,t,s){return kg(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},Ag=function(){function e(){A(this,e)}return I(e,[{key:"addEventListener",value:function(){}},{key:"removeEventListener",value:function(){}},{key:"dispatchEvent",value:function(i){return!0}}]),e}();if("undefined"==typeof DocumentFragment){var Ig=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(Ag);globalThis.DocumentFragment=Ig}var Rg,Og=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(Ag),Lg=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(Ag),Dg={get:function(i){},define:function(i,e,t){},getName:function(i){return null},upgrade:function(i){},whenDefined:function(i){return Promise.resolve(Og)}},xg=function(){function e(i){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};A(this,e),wg(this,Rg),Sg(this,Rg,null==t?void 0:t.detail)}return I(e,[{key:"detail",get:function(){return Tg(this,Rg)}},{key:"initCustomEvent",value:function(){}}]),e}();Rg=new WeakMap;var Cg,Mg={document:{createElement:function(i,e){return new Og}},DocumentFragment:DocumentFragment,customElements:Dg,CustomEvent:xg,EventTarget:Ag,HTMLElement:Og,HTMLVideoElement:Lg},Pg="undefined"==typeof window||void 0===globalThis.customElements,Ng=Pg?Mg:globalThis,Ug=(Pg||globalThis.document,function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.apply(this,arguments),wg(_(e),Cg),e}return I(n,[{key:"autoplay",get:function(){var i=this.getAttribute("autoplay");return null!==i&&(""===i||i)},set:function(i){i!==this.autoplay&&(i?this.setAttribute("autoplay","string"==typeof i?i:""):this.removeAttribute("autoplay"))}},{key:"muxCastCustomData",get:function(){return{mux:{playbackId:this.playbackId,minResolution:this.minResolution,maxResolution:this.maxResolution,renditionOrder:this.renditionOrder,customDomain:this.customDomain,tokens:{drm:this.drmToken},envKey:this.envKey,metadata:this.metadata,disableCookies:this.disableCookies,disableTracking:this.disableTracking,beaconCollectionDomain:this.beaconCollectionDomain,startTime:this.startTime,preferCmcd:this.preferCmcd}}}},{key:"castCustomData",get:function(){var i;return null!=(i=Tg(this,Cg))?i:this.muxCastCustomData},set:function(i){Sg(this,Cg,i)}}]),n}(function(i){var e,t,s,n,r,a,o,c,l;return t=function(e){T(m,e);var t,d=P(m);function m(){var e;return A(this,m),e=d.apply(this,arguments),W(_(e),o),W(_(e),s,{paused:!1}),W(_(e),n,{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}),W(_(e),r),W(_(e),a),e}return I(m,[{key:"remote",get:function(){var e=this;return H(this,a)?H(this,a):globalThis.chrome?this.isConnected?(this.disableRemotePlayback||function(){var e,i="https://www.gstatic.
2com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(!(null!=(e=globalThis.chrome)&&e.cast||document.querySelector('script[src="'.concat(i,'"]')))){var t=document.createElement("script");t.src=i,document.head.append(t)}}(),Xv.set(this,{loadOnPrompt:function(){return K(e,o,l).call(e)}}),G(this,a,new Pm(this))):void 0:y(S(m.prototype),"remote",this)}},{key:"disconnectedCallback",value:function(){var e,t;null==(e=H(this,a))||e.destroy(),G(this,a,null),Xv.delete(this),null==(t=y(S(m.prototype),"disconnectedCallback",this))||t.call(this)}},{key:"attributeChangedCallback",value:function(e,t,r){if(y(S(m.prototype),"attributeChangedCallback",this).call(this,e,t,r),"cast-receiver"===e&&r)H(this,n).receiverApplicationId=r;else if(H(this,o,c))switch(e){case"cast-stream-type":case"cast-src":this.load()}}},{key:"load",value:(t=f(regeneratorRuntime.mark((function e(){var t,n,r,l,d,p,b,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(H(this,o,c)){e.next=2;break}return e.abrupt("return",y(S(m.prototype),"load",this).call(this));case 2:return(r=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType)).customData=this.castCustomData,l=v(this.querySelectorAll("track")).filter((function(e){var b=e.kind;return e.src&&("subtitles"===b||"captions"===b)})),d=[],p=0,l.length&&(r.tracks=l.map((function(b){var e=++p;0===d.length&&"showing"===b.track.mode&&d.push(e);var t=new chrome.cast.media.Track(e,chrome.cast.media.TrackType.TEXT);return t.trackContentId=b.src,t.trackContentType="text/vtt",t.subtype="captions"===b.kind?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,t.name=b.label,t.language=b.srclang,t}))),"live"===this.castStreamType?r.streamType=chrome.cast.media.StreamType.LIVE:r.streamType=chrome.cast.media.StreamType.BUFFERED,r.metadata=new chrome.cast.media.GenericMediaMetadata,r.metadata.title=this.title,r.metadata.images=[{url:this.poster}],e.next=12,lm(this.castSrc);case 12:if(!e.sent){e.next=18;break}return r.contentType||(r.contentType="application/x-mpegURL"),e.next=16,hm(this.castSrc);case 16:(null==(b=e.sent)?void 0:b.includes("m4s"))||(null==b?void 0:b.includes("mp4"))?(r.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,r.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):null!=b&&b.includes("ts")&&(r.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,r.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.TS);case 18:return(h=new chrome.cast.media.LoadRequest(r)).currentTime=null!=(t=y(S(m.prototype),"currentTime",this))?t:0,h.autoplay=!H(this,s).paused,h.activeTrackIds=d,e.next=24,null==(n=dl())?void 0:n.loadMedia(h);case 24:this.dispatchEvent(new Event("volumechange"));case 25:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"play",value:function(){var e;if(!H(this,o,c))return y(S(m.prototype),"play",this).call(this);H(this,o,c).isPaused&&(null==(e=H(this,o,c).controller)||e.playOrPause())}},{key:"pause",value:function(){var e;H(this,o,c)?H(this,o,c).isPaused||null==(e=H(this,o,c).controller)||e.playOrPause():y(S(m.prototype),"pause",this).call(this)}},{key:"castOptions",get:function(){return H(this,n)}},{key:"castReceiver",get:function(){var e;return null!=(e=this.getAttribute("cast-receiver"))?e:void 0},set:function(e){this.castReceiver!=e&&this.setAttribute("cast-receiver","".concat(e))}},{key:"castSrc",get:function(){var e,p,g,t,n,r=this.currentSrc,o=null!=r&&r.startsWith("blob:")?void 0:r;return null!=(n=null!=(t=null!=(g=null!=(p=this.getAttribute("cast-src"))?p:null==(e=this.querySelector("source"))?void 0:e.src)?g:o)?t:this.getAttribute("src"))?n:void 0},set:function(e){this.castSrc!=e&&this.setAttribute("cast-src","".concat(e))}},{key:"castContentType",get:function(){var e;return null!=(e=this.getAttribute("cast-content-type"))?e:void 0},set:function(e){this.setAttribute("cast-content-type","".concat(e))}},{key:"castStreamType",get:function(){var e,t;return null!=(t=null!=(e=this.getAttribute("cast-stream-type"))?e:this.streamType)?t:void 0},set:function(e){this.setAttribute("cast-stream-type","".concat(e))}},{key:"castCustomData",get:function(){return H(this,r)},set:function(e){var t=R(e);["object","undefined"].includes(t)?G(this,r,e):console.error("castCustomData must be nullish or an object but value was of type ".concat(t))}},{key:"readyState",get:function(){if(H(this,o,c))switch(H(this,o,c).playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return y(S(m.prototype),"readyState",this)}},{key:"paused",get:function(){return H(this,o,c)?H(this,o,c).isPaused:y(S(m.prototype),"paused",this)}},{key:"muted",get:function(){var e;return H(this,o,c)?null==(e=H(this,o,c))?void 0:e.isMuted:y(S(m.prototype),"muted",this)},set:function(e){var t;H(this,o,c)?(e&&!H(this,o,c).isMuted||!e&&H(this,o,c).isMuted)&&(null==(t=H(this,o,c).controller)||t.muteOrUnmute()):h(S(m.prototype),"muted",e,this,!0)}},{key:"volume",get:function(){var e,t;return H(this,o,c)?null!=(t=null==(e=H(this,o,c))?void 0:e.volumeLevel)?t:1:y(S(m.prototype),"volume",this)},set:function(e){var t;if(H(this,o,c))return H(this,o,c).volumeLevel=+e,void(null==(t=H(this,o,c).controller)||t.setVolumeLevel());h(S(m.prototype),"volume",e,this,!0)}},{key:"duration",get:function(){var e,t,n;return H(this,o,c)&&null!=(e=H(this,o,c))&&e.isMediaLoaded?null!=(n=null==(t=H(this,o,c))?void 0:t.duration)?n:NaN:y(S(m.prototype),"duration",this)}},{key:"currentTime",get:function(){var e,t,n;return H(this,o,c)&&null!=(e=H(this,o,c))&&e.isMediaLoaded?null!=(n=null==(t=H(this,o,c))?void 0:t.currentTime)?n:0:y(S(m.prototype),"currentTime",this)},set:function(e){var t;if(H(this,o,c))return H(this,o,c).currentTime=e,void(null==(t=H(this,o,c).controller)||t.seek());h(S(m.prototype),"currentTime",e,this,!0)}}]),m}(i),s=new WeakMap,n=new WeakMap,r=new WeakMap,a=new WeakMap,o=new WeakSet,c=function(){var e,t;return null==(t=null==(e=Xv.get(this.remote))?void 0:e.getCastPlayer)?void 0:t.call(e)},l=function(){var e=f(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return H(this,s).paused=Y(t.prototype,this,"paused"),Y(t.prototype,this,"pause").call(this),this.muted=Y(t.prototype,this,"muted"),e.prev=1,e.next=4,this.load();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.error(e.t0);case 9:case"end":return e.stop()}}),e,this,[[1,6]])})));return function(){return e.apply(this,arguments)}}(),j(t,"observedAttributes",[].concat(v(null!=(e=i.observedAttributes)?e:[]),["cast-src","cast-content-type","cast-stream-type","cast-receiver"])),t}(function(i){if(null==i||!i.prototype)return i;var e=Eg(i,"video");(!e||"".concat(e).includes("[native code]"))&&Object.defineProperty(i.prototype,"videoTracks",{get:function(){return function(i){var e,t=Fm(i).videoTracks;
2if(!t&&(t=new Gm,Fm(i).videoTracks=t,yg)){var n,s=yg.call(null!=(e=i.nativeEl)?e:i),r=C(s);try{for(r.s();!(n=r.n()).done;){var o=n.value;Bm(i,o)}}catch(e){r.e(e)}finally{r.f()}var c=function(){t.dispatchEvent(new Event("change"))},l=function(e){if(v(t).some((function(e){return e instanceof tg}))){var n,r=C(s);try{for(r.s();!(n=r.n()).done;){jm(n.value)}}catch(e){r.e(e)}finally{r.f()}}else Bm(i,e.track)},a=function(e){jm(e.track)};s.addEventListener("change",c),s.addEventListener("addtrack",l),s.addEventListener("removetrack",a)}return t}(this)}});var t=Eg(i,"audio");(!t||"".concat(t).includes("[native code]"))&&Object.defineProperty(i.prototype,"audioTracks",{get:function(){return function(i){var e,t=Fm(i).audioTracks;if(!t&&(t=new vg,Fm(i).audioTracks=t,bg)){var n,s=bg.call(null!=(e=i.nativeEl)?e:i),r=C(s);try{for(r.s();!(n=r.n()).done;){var o=n.value;cg(i,o)}}catch(e){r.e(e)}finally{r.f()}var c=function(){t.dispatchEvent(new Event("change"))},l=function(e){if(v(t).some((function(e){return e instanceof gg}))){var n,r=C(s);try{for(r.s();!(n=r.n()).done;){lg(n.value)}}catch(e){r.e(e)}finally{r.f()}}else cg(i,e.track)},a=function(e){lg(e.track)};s.addEventListener("change",c),s.addEventListener("addtrack",l),s.addEventListener("removetrack",a)}return t}(this)}}),"addVideoTrack"in i.prototype||(i.prototype.addVideoTrack=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=new tg;return n.kind=e,n.label=a,n.language=t,Bm(this,n),n}),"removeVideoTrack"in i.prototype||(i.prototype.removeVideoTrack=jm),"addAudioTrack"in i.prototype||(i.prototype.addAudioTrack=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=new gg;return n.kind=e,n.label=a,n.language=t,cg(this,n),n}),"removeAudioTrack"in i.prototype||(i.prototype.removeAudioTrack=lg),"videoRenditions"in i.prototype||Object.defineProperty(i.prototype,"videoRenditions",{get:function(){return s(this)}});var s=function(e){var a=Fm(e).videoRenditions;return a||(Fm(a=new Xm).media=new WeakRef(e),Fm(e).videoRenditions=a),a};"audioRenditions"in i.prototype||Object.defineProperty(i.prototype,"audioRenditions",{get:function(){return n(this)}});var n=function(e){var a=Fm(e).audioRenditions;return a||(Fm(a=new og).media=new WeakRef(e),Fm(e).audioRenditions=a),a};return i}(zv))));Cg=new WeakMap,Ng.customElements.get("mux-video")||(Ng.customElements.define("mux-video",Ug),Ng.MuxVideoElement=Ug);var Fg={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},Bg="mediachromeattributes",jg="mediacontroller",Vg={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChapter
2sCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_LOOP:"mediaLoop",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},Hg=Object.entries(Vg),Wg=Hg.reduce((function(i,e){var t=m(e,2),n=t[0],r=t[1];return i[n]=r.toLowerCase(),i}),{}),qg=Hg.reduce((function(i,e){var t=m(e,2),n=t[0],r=t[1];return i[n]=r.toLowerCase(),i}),x({},{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"})),Gg=(Object.entries(qg).reduce((function(i,e){var t=m(e,2),n=t[0],r=t[1],s=Wg[n];return s&&(i[r]=s),i}),{userinactivechange:"userinactive"}),Object.entries(Wg).reduce((function(i,e){var t=m(e,2),n=t[0],r=t[1],s=qg[n];return s&&(i[r]=s),i}),{userinactive:"userinactivechange"})),Kg={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Yg="disabled",$g="showing",Qg="mouse",zg="pen",Xg="touch",Jg="unavailable",Zg="unsupported",ey={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},ty="fullscreen";function ny(i){if(i)return[i.id,i.width,i.height].filter((function(e){return null!=e})).join(":")}function ry(i){if(i){var e=i.split(":"),t=m(e,3);return{id:t[0],width:+t[1],height:+t[2]}}}function iy(i){if(i)return[i.id,i.kind,i.language,i.label].filter((function(e){return null!=e})).join(":")}function ay(i){if(i){var e=i.split(":"),t=m(e,4);return{id:t[0],kind:t[1],language:t[2],label:t[3]}}}function oy(i){return i.replace(/[-_]([a-z])/g,(function(e,t){return t.toUpperCase()}))}function sy(i){return"number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i)}function uy(i){return"string"==typeof i&&(!isNaN(i)&&!isNaN(parseFloat(i)))}var cy,ly=function(i){return new Promise((function(e){return setTimeout(e,i)}))},dy={en:{"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","S
2ource Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it.",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds","{time} remaining":"{time} remaining","{currentTime} of {totalTime}":"{currentTime} of {totalTime}","video not loaded, unknown time.":"video not loaded, unknown time."}},hy=(null==(cy=globalThis.navigator)?void 0:cy.language)||"en",fy=function(i){var e,t,s,n=hy.split("-"),r=m(n,1)[0];return(null==(e=dy[hy])?void 0:e[i])||(null==(t=dy[r])?void 0:t[i])||(null==(s=dy.en)?void 0:s[i])||i},py=function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return fy(i).replace(/\{(\w+)\}/g,(function(t,s){return s in e?String(e[s]):"{".concat(s,"}")}))},vy=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],my=function(i){if(!sy(i))return"";var e=Math.abs(i),t=e!==i,s=new Date(0,0,0,0,0,e,0),n=[s.getHours(),s.getMinutes(),s.getSeconds()].map((function(a,e){return a&&function(i,e){var t=py(1===i?vy[e].singular:vy[e].plural);return"".concat(i," ").concat(t)}(a,e)})).filter((function(a){return a})).join(", ");return t?py("{time} remaining",{time:n}):n};function gy(i,e){var t=!1;i<0&&(t=!0,i=0-i),i=i<0?0:i;var s=Math.floor(i%60),n=Math.floor(i/60%60),r=Math.floor(i/3600),a=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(i)||i===1/0)&&(r=n=s="0"),(t?"-":"")+(r=r>0||o>0?r+":":"")+(n=((r||a>=10)&&n<10?"0"+n:n)+":")+(s=s<10?"0"+s:s)}Object.freeze({length:0,start:function(i){var e=i>>>0;if(e>=this.length)throw new DOMException("Failed to execute 'start' on 'TimeRanges': The index provided (".concat(e,") is greater than or equal to the maximum bound (").concat(this.length,")."));return 0},end:function(i){var e=i>>>0;if(e>=this.length)throw new DOMException("Failed to execute 'end' on 'TimeRanges': The index provided (".concat(e,") is greater than or equal to the maximum bound (").concat(this.length,")."));return 0}});var yy=function(){function e(){A(this,e)}return I(e,[{key:"addEventListener",value:function(){}},{key:"removeEventListener",value:function(){}},{key:"dispatchEvent",value:function(){return!0}}]),e}(),by=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(yy),Ey=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),(e=t.apply(this,arguments)).role=null,e}return I(n)}(by),_y={createElement:function(){return new ky.HTMLElement},createElementNS:function(){return new ky.HTMLElement},addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(i){return!1}},ky={ResizeObserver:function(){function e(){A(this,e)}return I(e,[{key:"observe",value:function(){}},{key:"unobserve",value:function(){}},{key:"disconnect",value:function(){}}]),e}(),document:_y,Node:by,Element:Ey,HTMLElement:function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),(e=t.apply(this,arguments)).innerHTML="",e}return I(n,[{key:"content",get:function(){return new ky.DocumentFragment}}]),n}(Ey),DocumentFragment:function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(yy),customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem:function(i){return null},setItem:function(i,e){},removeItem:function(i){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia:function(i){return{matches:!1,media:i}},DOMParser:function(){function e(){A(this,e)}return I(e,[{key:"parseFromString",value:function(e,t){return{body:{textContent:e}}}}]),e}()},Ty="global"in globalThis&&(null==globalThis?void 0:globalThis.global)===globalThis||"undefined"==typeof window||void 0===window.customElements,wy=Object.keys(ky).every((function(i){return i in globalThis})),Sy=Ty&&!wy?ky:globalThis,Ay=Ty&&!wy?_y:globalThis.document,Iy=new WeakMap,Ry=function(i){var e=Iy.get(i);return e||Iy.set(i,e=new Set),e},Oy=new Sy.ResizeObserver((function(i){var e,t=C(i);try{for(t.s();!(e=t.n()).done;){var n,r=e.value,o=C(Ry(r.target));try{for(o.s();!(n=o.n()).done;){(0,n.value)(r)}}catch(e){o.e(e)}finally{o.f()}}}catch(e){t.e(e)}finally{t.f()}}));function Ly(i,e){Ry(i).add(e),Oy.observe(i)}function Dy(i,e){var t=Ry(i);t.delete(e),t.size||Oy.unobserve(i)}function xy(i){var e,t={},n=C(i);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r.name]=r.value}}catch(e){n.e(e)}finally{n.f()}return t}function Cy(i){var e;return null!=(e=My(i))?e:Fy(i,"media-controller")}function My(i){var e,t=jg,s=i.getAttribute(t);if(s)return null==(e=jy(i))?void 0:e.getElementById(s)}var Py=function(i,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".value",s=i.querySelector(t);s&&(s.textContent=e)},Ny=function(i,e){return function(i,e){var t='slot[name="'.concat(e,'"]'),s=i.shadowRoot.querySelector(t);return s?s.children:[]}(i,e)[0]},Uy=function e(i,t){return!(!i||!t)&&(!(null==i||!i.contains(t))||e(i,t.getRootNode().host))},Fy=function e(i,t){return i?i.closest(t)||e(i.getRootNode().host,t):null};function By(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=null==i?void 0:i.activeElement;return t?null!=(e=By(t.shadowRoot))?e:t:null}function jy(i){var e,t=null==(e=null==i?void 0:i.getRootNode)?void 0:e.call(i);return t instanceof ShadowRoot||t instanceof Document?t:null}function Vy(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.depth,n=void 0===t?3:t,r=e.checkOpacity,o=void 0===r||r,c=e.checkVisibilityCSS,s=void 0===c||c;if(i.checkVisibility)return i.checkVisibility({checkOpacity:o,checkVisibilityCSS:s});for(var l=i;l&&n>0;){var d=getComputedStyle(l);
2if(o&&"0"===d.opacity||s&&"hidden"===d.visibility||"none"===d.display)return!1;l=l.parentElement,n--}return!0}function Hy(i,e){return function(i,e){var t,s,n,r,o=C(null!=(t=i.querySelectorAll("style:not([media])"))?t:[]);try{for(o.s();!(r=o.n()).done;){n=r.value;var c=void 0;try{c=null==(s=n.sheet)?void 0:s.cssRules}catch(e){continue}var l,d=C(null!=c?c:[]);try{for(d.s();!(l=d.n()).done;){var a=l.value;if(e(a.selectorText))return a}}catch(e){d.e(e)}finally{d.f()}}}catch(e){o.e(e)}finally{o.f()}}(i,(function(s){return s===e}))||Wy(i,e)}function Wy(i,e){var t,s,n=null!=(t=i.querySelectorAll("style:not([media])"))?t:[],r=null==n?void 0:n[n.length-1];if(null==r||!r.sheet)return console.warn("Media Chrome: No style sheet found on style tag of",i),{style:{setProperty:function(){},removeProperty:function(){return""},getPropertyValue:function(){return""}}};var a=null==r?void 0:r.sheet.insertRule("".concat(e,"{}"),r.sheet.cssRules.length);return null==(s=r.sheet.cssRules)?void 0:s[a]}function qy(i,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,s=i.getAttribute(e);return null!=s?+s:t}function Gy(i,e,t){var s=+t;null==t||Number.isNaN(s)?i.hasAttribute(e)&&i.removeAttribute(e):qy(i,e,void 0)!==s&&i.setAttribute(e,"".concat(s))}function Ky(i,e){return i.hasAttribute(e)}function Yy(i,e,t){null!=t?Ky(i,e)!=t&&i.toggleAttribute(e,t):i.hasAttribute(e)&&i.removeAttribute(e)}function $y(i,e){var s,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return null!=(s=i.getAttribute(e))?s:t}function Qy(i,e,t){if(null!=t){var s="".concat(t);$y(i,e,void 0)!==s&&i.setAttribute(e,s)}else i.hasAttribute(e)&&i.removeAttribute(e)}var zy,Xy=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},Jy=function(i,e,t){return Xy(i,e,"read from private field"),t?t.call(i):e.get(i)},Zy=function(i,e,t,s){return Xy(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t};var eb=function(e){T(n,e);var t=P(n);function n(){var e;if(A(this,n),e=t.call(this),function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)}(_(e),zy,void 0),!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var r=xy(e.attributes);e.shadowRoot.innerHTML=e.constructor.getTemplateHTML(r)}return w(e)}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){var n,r,a,o,c;e===jg&&(t&&(null==(r=null==(n=Jy(this,zy))?void 0:n.unassociateElement)||r.call(n,this),Zy(this,zy,null)),s&&this.isConnected&&(Zy(this,zy,null==(a=this.getRootNode())?void 0:a.getElementById(s)),null==(c=null==(o=Jy(this,zy))?void 0:o.associateElement)||c.call(o,this)))}},{key:"connectedCallback",value:function(){var e,t;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),Zy(this,zy,function(i){var e,t=i.getAttribute(jg);return t?null==(e=i.getRootNode())?void 0:e.getElementById(t):Fy(i,"media-controller")}(this)),this.getAttribute(jg)&&(null==(t=null==(e=Jy(this,zy))?void 0:e.associateElement)||t.call(e,this)),Jy(this,zy)&&(Jy(this,zy).addEventListener("pointerdown",this),Jy(this,zy).addEventListener("click",this),Jy(this,zy).hasAttribute("tabindex")||(Jy(this,zy).tabIndex=0))}},{key:"disconnectedCallback",value:function(){var e,t,s,n;this.getAttribute(jg)&&(null==(t=null==(e=Jy(this,zy))?void 0:e.unassociateElement)||t.call(e,this)),null==(s=Jy(this,zy))||s.removeEventListener("pointerdown",this),null==(n=Jy(this,zy))||n.removeEventListener("click",this),Zy(this,zy,null)}},{key:"handleEvent",value:function(e){var t,s=null==(t=e.composedPath())?void 0:t[0];if(["video","media-controller"].includes(null==s?void 0:s.localName))if("pointerdown"===e.type)this._pointerType=e.pointerType;else if("click"===e.type){var n=e.clientX,a=e.clientY,r=this.getBoundingClientRect(),o=r.left,c=r.top,l=r.width,u=r.height,d=n-o,h=a-c;if(d<0||h<0||d>l||h>u||0===l&&0===u)return;var f=this._pointerType||"mouse";if(this._pointerType=void 0,f===Xg)return void this.handleTap(e);if(f===Qg||f===zg)return void this.handleMouseClick(e)}}},{key:"mediaPaused",get:function(){return Ky(this,Wg.MEDIA_PAUSED)},set:function(e){Yy(this,Wg.MEDIA_PAUSED,e)}},{key:"handleTap",value:function(e){}},{key:"handleMouseClick",value:function(e){var t=this.mediaPaused?Fg.MEDIA_PLAY_REQUEST:Fg.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new Sy.CustomEvent(t,{composed:!0,bubbles:!0}))}}],[{key:"observedAttributes",get:function(){return[jg,Wg.MEDIA_PAUSED]}}]),n}(Sy.HTMLElement);zy=new WeakMap,eb.shadowRootOptions={mode:"open"},eb.getTemplateHTML=function(i){return"\n    <style>\n      :host {\n        display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));\n        box-sizing: border-box;\n      }\n    </style>\n  "},Sy.customElements.get("media-gesture-receiver")||Sy.customElements.define("media-gesture-receiver",eb);var tb,nb,rb,ib,ab,ob,sb,ub,cb,lb,db,hb,fb,pb,vb,mb,gb,yb,bb,Eb,_b=eb,kb=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},Tb=function(i,e,t){return kb(i,e,"read from private field"),t?t.call(i):e.get(i)},wb=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Sb=function(i,e,t,s){return kb(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},Ab=function(i,e,t){return kb(i,e,"access private method"),t},Ib={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};var Rb=Object.values(Wg);function Ob(i,e){var t;if(i.isConnected){var n=function(i){var e=i.split(/\s+/);return Object.fromEntries(e.map((function(e){return e.split(":")})))}(null!=(t=i.getAttribute(Ib.BREAKPOINTS))?t:"sm:384 md:576 lg:768 xl:960"),r=function(i,e){return Object.keys(i).filter((function(t){return e>=parseInt(i[t])}))}(n,e),a=!1;
2if(Object.keys(n).forEach((function(e){r.includes(e)?i.hasAttribute("breakpoint".concat(e))||(i.setAttribute("breakpoint".concat(e),""),a=!0):i.hasAttribute("breakpoint".concat(e))&&(i.removeAttribute("breakpoint".concat(e)),a=!0)})),a){var o=new CustomEvent(qg.BREAKPOINTS_CHANGE,{detail:r});i.dispatchEvent(o)}i.breakpointsComputed||(i.breakpointsComputed=!0,i.dispatchEvent(new CustomEvent(qg.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}}var Lb=function(e){T(r,e);var t,n=P(r);function r(){var e;if(A(this,r),e=n.call(this),wb(_(e),cb),wb(_(e),db),wb(_(e),fb),wb(_(e),vb),wb(_(e),gb),wb(_(e),tb,void 0),wb(_(e),nb,0),wb(_(e),rb,null),wb(_(e),ib,null),wb(_(e),ab,void 0),e.breakpointsComputed=!1,wb(_(e),ob,(function(t){var n,r=e.media,o=C(t);try{for(o.s();!(n=o.n()).done;){var s=n.value;if("childList"===s.type){var c,l=C(s.removedNodes);try{for(l.s();!(c=l.n()).done;){var d=c.value;if("media"==d.slot&&s.target==_(e)){var a=s.previousSibling&&s.previousSibling.previousElementSibling;if(a&&r){for(var h="media"!==a.slot;null!==(a=a.previousSibling);)"media"==a.slot&&(h=!1);h&&e.mediaUnsetCallback(d)}else e.mediaUnsetCallback(d)}}}catch(e){l.e(e)}finally{l.f()}if(r){var f,v=C(s.addedNodes);try{for(v.s();!(f=v.n()).done;){f.value===r&&e.handleMediaUpdated(r)}}catch(e){v.e(e)}finally{v.f()}}}}}catch(e){o.e(e)}finally{o.f()}})),wb(_(e),sb,!1),wb(_(e),ub,(function(t){Tb(_(e),sb)||(setTimeout((function(){(function(i){Ob(i.target,i.contentRect.width)})(t),Sb(_(e),sb,!1)}),0),Sb(_(e),sb,!0))})),wb(_(e),bb,void 0),wb(_(e),Eb,(function(){Tb(_(e),bb).assignedElements({flatten:!0}).length?e.handleMediaUpdated(e.media):Tb(_(e),rb)&&e.mediaUnsetCallback(Tb(_(e),rb))})),!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var t=xy(e.attributes),o=e.constructor.getTemplateHTML(t);e.shadowRoot.setHTMLUnsafe?e.shadowRoot.setHTMLUnsafe(o):e.shadowRoot.innerHTML=o}return Sb(_(e),tb,new MutationObserver(Tb(_(e),ob))),w(e)}return I(r,[{key:"attributeChangedCallback",value:function(e,t,s){e.toLowerCase()==Ib.AUTOHIDE&&(this.autohide=s)}},{key:"media",get:function(){var e=this.querySelector(":scope > [slot=media]");return"SLOT"==(null==e?void 0:e.nodeName)&&(e=e.assignedElements({flatten:!0})[0]),e}},{key:"handleMediaUpdated",value:(t=f(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t,!e.t0){e.next=8;break}if(Sb(this,rb,t),e.t1=t.localName.includes("-"),!e.t1){e.next=7;break}return e.next=7,Sy.customElements.whenDefined(t.localName);case 7:this.mediaSetCallback(t);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"connectedCallback",value:function(){var e;Tb(this,tb).observe(this,{childList:!0,subtree:!0}),Ly(this,Tb(this,ub));var s=null!=this.getAttribute(Ib.AUDIO)?py("audio player"):py("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",s),this.handleMediaUpdated(this.media),this.setAttribute(Ib.USER_INACTIVE,""),Ob(this,this.getBoundingClientRect().width);var t=this.querySelector(":scope > slot[slot=media]");t&&(Sb(this,bb,t),Tb(this,bb).addEventListener("slotchange",Tb(this,Eb))),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=Sy.window)||e.addEventListener("mouseup",this)}},{key:"disconnectedCallback",value:function(){var e;Dy(this,Tb(this,ub)),clearTimeout(Tb(this,ib)),Tb(this,tb).disconnect(),this.media&&this.mediaUnsetCallback(this.media),null==(e=Sy.window)||e.removeEventListener("mouseup",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointermove",this),this.removeEventListener("pointerup",this),this.removeEventListener("mouseleave",this),this.removeEventListener("keyup",this),Tb(this,bb)&&(Tb(this,bb).removeEventListener("slotchange",Tb(this,Eb)),Sb(this,bb,null)),Sb(this,sb,!1)}},{key:"mediaSetCallback",value:function(e){}},{key:"mediaUnsetCallback",value:function(e){Sb(this,rb,null)}},{key:"handleEvent",value:function(e){switch(e.type){case"pointerdown":Sb(this,nb,e.timeStamp);break;case"pointermove":Ab(this,cb,lb).call(this,e);break;case"pointerup":Ab(this,db,hb).call(this,e);break;case"mouseleave":Ab(this,fb,pb).call(this);break;case"mouseup":this.removeAttribute(Ib.KEYBOARD_CONTROL);break;case"keyup":Ab(this,gb,yb).call(this),this.setAttribute(Ib.KEYBOARD_CONTROL,"")}}},{key:"autohide",get:function(){return(void 0===Tb(this,ab)?2:Tb(this,ab)).toString()},set:function(e){var t=Number(e);Sb(this,ab,isNaN(t)?0:t)}},{key:"breakpoints",get:function(){return $y(this,Ib.BREAKPOINTS)},set:function(e){Qy(this,Ib.BREAKPOINTS,e)}},{key:"audio",get:function(){return Ky(this,Ib.AUDIO)},set:function(e){Yy(this,Ib.AUDIO,e)}},{key:"gesturesDisabled",get:function(){return Ky(this,Ib.GESTURES_DISABLED)},set:function(e){Yy(this,Ib.GESTURES_DISABLED,e)}},{key:"keyboardControl",get:function(){return Ky(this,Ib.KEYBOARD_CONTROL)},set:function(e){Yy(this,Ib.KEYBOARD_CONTROL,e)}},{key:"noAutohide",get:function(){return Ky(this,Ib.NO_AUTOHIDE)},set:function(e){Yy(this,Ib.NO_AUTOHIDE,e)}},{key:"autohideOverControls",get:function(){return Ky(this,Ib.AUTOHIDE_OVER_CONTROLS)},set:function(e){Yy(this,Ib.AUTOHIDE_OVER_CONTROLS,e)}},{key:"userInteractive",get:function(){return Ky(this,Ib.USER_INACTIVE)},set:function(e){Yy(this,Ib.USER_INACTIVE,e)}}],[{key:"observedAttributes",get:function(){return[Ib.AUTOHIDE,Ib.GESTURES_DISABLED].concat(Rb).filter((function(e){return![Wg.MEDIA_RENDITION_LIST,Wg.MEDIA_AUDIO_TRACK_LIST,Wg.MEDIA_CHAPTERS_CUES,Wg.MEDIA_WIDTH,Wg.MEDIA_HEIGHT,Wg.MEDIA_ERROR,Wg.MEDIA_ERROR_MESSAGE].includes(e)}))}}]),r}(Sy.HTMLElement);tb=new WeakMap,nb=new WeakMap,rb=new WeakMap,ib=new WeakMap,ab=new WeakMap,ob=new WeakMap,sb=new WeakMap,ub=new WeakMap,cb=ne
2w WeakSet,lb=function(i){if(!("mouse"!==i.pointerType&&i.timeStamp-Tb(this,nb)<250)){Ab(this,vb,mb).call(this),clearTimeout(Tb(this,ib));var e=this.hasAttribute(Ib.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(i.target)||e)&&Ab(this,gb,yb).call(this)}},db=new WeakSet,hb=function(i){if("touch"===i.pointerType){var e=!this.hasAttribute(Ib.USER_INACTIVE);[this,this.media].includes(i.target)&&e?Ab(this,fb,pb).call(this):Ab(this,gb,yb).call(this)}else i.composedPath().some((function(e){return["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName)}))&&Ab(this,gb,yb).call(this)},fb=new WeakSet,pb=function(){if(!(Tb(this,ab)<0||this.hasAttribute(Ib.USER_INACTIVE))){this.setAttribute(Ib.USER_INACTIVE,"");var i=new Sy.CustomEvent(qg.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(i)}},vb=new WeakSet,mb=function(){if(this.hasAttribute(Ib.USER_INACTIVE)){this.removeAttribute(Ib.USER_INACTIVE);var i=new Sy.CustomEvent(qg.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(i)}},gb=new WeakSet,yb=function(){var e=this;Ab(this,vb,mb).call(this),clearTimeout(Tb(this,ib));var i=parseInt(this.autohide);i<0||Sb(this,ib,setTimeout((function(){Ab(e,fb,pb).call(e)}),1e3*i))},bb=new WeakMap,Eb=new WeakMap,Lb.shadowRootOptions={mode:"open"},Lb.getTemplateHTML=function(i){return"\n    <style>\n      \n      :host([".concat(Wg.MEDIA_IS_FULLSCREEN,"]) ::slotted([slot=media]) {\n        outline: none;\n      }\n\n      :host {\n        box-sizing: border-box;\n        position: relative;\n        display: inline-block;\n        line-height: 0;\n        background-color: var(--media-background-color, #000);\n        overflow: hidden;\n      }\n\n      :host(:not([").concat(Ib.AUDIO,"])) [part~=layer]:not([part~=media-layer]) {\n        position: absolute;\n        top: 0;\n        left: 0;\n        bottom: 0;\n        right: 0;\n        display: flex;\n        flex-flow: column nowrap;\n        align-items: start;\n        pointer-events: none;\n        background: none;\n      }\n\n      slot[name=media] {\n        display: var(--media-slot-display, contents);\n      }\n\n      \n      :host([").concat(Ib.AUDIO,"]) slot[name=media] {\n        display: var(--media-slot-display, none);\n      }\n\n      \n      :host([").concat(Ib.AUDIO,"]) [part~=layer][part~=gesture-layer] {\n        height: 0;\n        display: block;\n      }\n\n      \n      :host(:not([").concat(Ib.AUDIO,"])[").concat(Ib.GESTURES_DISABLED,"]) ::slotted([slot=gestures-chrome]),\n          :host(:not([").concat(Ib.AUDIO,"])[").concat(Ib.GESTURES_DISABLED,"]) media-gesture-receiver[slot=gestures-chrome] {\n        display: none;\n      }\n\n      \n      ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) {\n        pointer-events: auto;\n      }\n\n      :host(:not([").concat(Ib.AUDIO,"])) *[part~=layer][part~=centered-layer] {\n        align-items: center;\n        justify-content: center;\n      }\n\n      :host(:not([").concat(Ib.AUDIO,"])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),\n      :host(:not([").concat(Ib.AUDIO,"])) media-gesture-receiver[slot=gestures-chrome] {\n        align-self: stretch;\n        flex-grow: 1;\n      }\n\n      slot[name=middle-chrome] {\n        display: inline;\n        flex-grow: 1;\n        pointer-events: none;\n        background: none;\n      }\n\n      \n      ::slotted([slot=media]),\n      ::slotted([slot=poster]) {\n        width: 100%;\n        height: 100%;\n      }\n\n      \n      :host(:not([").concat(Ib.AUDIO,"])) .spacer {\n        flex-grow: 1;\n      }\n\n      \n      :host(:-webkit-full-screen) {\n        \n        width: 100% !important;\n        height: 100% !important;\n      }\n\n      \n      ::slotted(:not([slot=media]):not([slot=poster]):not([").concat(Ib.NO_AUTOHIDE,"]):not([hidden]):not([role=dialog])) {\n        opacity: 1;\n        transition: var(--media-control-transition-in, opacity 0.25s);\n      }\n\n      \n      :host([").concat(Ib.USER_INACTIVE,"]:not([").concat(Wg.MEDIA_PAUSED,"]):not([").concat(Wg.MEDIA_IS_AIRPLAYING,"]):not([").concat(Wg.MEDIA_IS_CASTING,"]):not([").concat(Ib.AUDIO,"])) ::slotted(:not([slot=media]):not([slot=poster]):not([").concat(Ib.NO_AUTOHIDE,"]):not([role=dialog])) {\n        opacity: 0;\n        transition: var(--media-control-transition-out, opacity 1s);\n      }\n\n      :host([").concat(Ib.USER_INACTIVE,"]:not([").concat(Ib.NO_AUTOHIDE,"]):not([").concat(Wg.MEDIA_PAUSED,"]):not([").concat(Wg.MEDIA_IS_CASTING,"]):not([").concat(Ib.AUDIO,"])) ::slotted([slot=media]) {\n        cursor: n
2one;\n      }\n\n      :host([").concat(Ib.USER_INACTIVE,"][").concat(Ib.AUTOHIDE_OVER_CONTROLS,"]:not([").concat(Ib.NO_AUTOHIDE,"]):not([").concat(Wg.MEDIA_PAUSED,"]):not([").concat(Wg.MEDIA_IS_CASTING,"]):not([").concat(Ib.AUDIO,"])) * {\n        --media-cursor: none;\n        cursor: none;\n      }\n\n\n      ::slotted(media-control-bar)  {\n        align-self: stretch;\n      }\n\n      \n      :host(:not([").concat(Ib.AUDIO,"])[").concat(Wg.MEDIA_HAS_PLAYED,']) slot[name=poster] {\n        display: none;\n      }\n\n      ::slotted([role=dialog]) {\n        width: 100%;\n        height: 100%;\n        align-self: center;\n      }\n\n      ::slotted([role=menu]) {\n        align-self: end;\n      }\n    </style>\n\n    <slot name="media" part="layer media-layer"></slot>\n    <slot name="poster" part="layer poster-layer"></slot>\n    <slot name="gestures-chrome" part="layer gesture-layer">\n      <media-gesture-receiver slot="gestures-chrome">\n        <template shadowrootmode="').concat(_b.shadowRootOptions.mode,'">\n          ').concat(_b.getTemplateHTML({}),'\n        </template>\n      </media-gesture-receiver>\n    </slot>\n    <span part="layer vertical-layer">\n      <slot name="top-chrome" part="top chrome"></slot>\n      <slot name="middle-chrome" part="middle chrome"></slot>\n      <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>\n      \n      <slot part="bottom chrome"></slot>\n    </span>\n    <slot name="dialog" part="layer dialog-layer"></slot>\n  ')},Sy.customElements.get("media-container")||Sy.customElements.define("media-container",Lb);var Db,xb,Cb,Mb,Pb,Nb,Ub=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},Fb=function(i,e,t){return Ub(i,e,"read from private field"),t?t.call(i):e.get(i)},Bb=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},jb=function(i,e,t,s){return Ub(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},Vb=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{defaultValue:void 0},s=r.defaultValue;A(this,e),Bb(this,Pb),Bb(this,Db,void 0),Bb(this,xb,void 0),Bb(this,Cb,void 0),Bb(this,Mb,new Set),jb(this,Db,t),jb(this,xb,n),jb(this,Cb,new Set(s))}return I(e,[{key:Symbol.iterator,value:function(){return Fb(this,Pb,Nb).values()}},{key:"length",get:function(){return Fb(this,Pb,Nb).size}},{key:"value",get:function(){var e;return null!=(e=v(Fb(this,Pb,Nb)).join(" "))?e:""}},{key:"value",set:function(e){var t;e!==this.value&&(jb(this,Mb,new Set),this.add.apply(this,v(null!=(t=null==e?void 0:e.split(" "))?t:[])))}},{key:"toString",value:function(){return this.value}},{key:"item",value:function(e){return v(Fb(this,Pb,Nb))[e]}},{key:"values",value:function(){return Fb(this,Pb,Nb).values()}},{key:"forEach",value:function(e,t){Fb(this,Pb,Nb).forEach(e,t)}},{key:"add",value:function(){for(var e,s,t=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];r.forEach((function(e){return Fb(t,Mb).add(e)})),(""!==this.value||null!=(e=Fb(this,Db))&&e.hasAttribute("".concat(Fb(this,xb))))&&(null==(s=Fb(this,Db))||s.setAttribute("".concat(Fb(this,xb)),"".concat(this.value)))}},{key:"remove",value:function(){for(var e,t=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];r.forEach((function(s){return Fb(t,Mb).delete(s)})),null==(e=Fb(this,Db))||e.setAttribute("".concat(Fb(this,xb)),"".concat(this.value))}},{key:"contains",value:function(e){return Fb(this,Pb,Nb).has(e)}},{key:"toggle",value:function(e,t){return void 0!==t?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}},{key:"replace",value:function(e,t){return this.remove(e),this.add(t),e===t}}]),e}();Db=new WeakMap,xb=new WeakMap,Cb=new WeakMap,Mb=new WeakMap,Pb=new WeakSet,Nb=function(){return Fb(this,Mb).size?Fb(this,Mb):Fb(this,Cb)};var Hb,Wb,qb,Gb,Kb,Yb,$b,Qb,zb,Xb,Jb,Zb,eE,tE,nE,rE,iE,aE=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return i.split(/\s+/)},oE=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=i.split(":"),t=m(e,3),n=t[0],r=t[1],s=t[2],o=s?decode
2URIComponent(s):void 0;return{kind:"cc"===n?Kg.CAPTIONS:Kg.SUBTITLES,language:r,label:o}},sE=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return aE(i).map((function(t){var s=oE(t);return x(x({},e),s)}))},uE=function(i){return i?Array.isArray(i)?i.map((function(e){return"string"==typeof e?oE(e):e})):"string"==typeof i?sE(i):[i]:[]},cE=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{kind:"subtitles"},i=e.kind,t=e.label,n=e.language;return t?"".concat("captions"===i?"cc":"sb",":").concat(n,":").concat(encodeURIComponent(t)):n},lE=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.prototype.map.call(i,cE).join(" ")},dE=function(i){var e=Object.entries(i).map((function(e){var t=m(e,2);return function(i,e){return function(t){return t[i]===e}}(t[0],t[1])}));return function(t){return e.every((function(s){return s(t)}))}},hE=function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=uE(t).map(dE),n=function(e){return s.some((function(a){return a(e)}))};Array.from(e).filter(n).forEach((function(e){e.mode=i}))},fE=function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(null==i||!i.textTracks)return[];var t="function"==typeof e?e:dE(e);return Array.from(i.textTracks).filter(t)},pE=function(i){var e;return!(null==(e=i.mediaSubtitlesShowing)||!e.length)||i.hasAttribute(Wg.MEDIA_SUBTITLES_SHOWING)},vE="exitFullscreen"in Ay?"exitFullscreen":"webkitExitFullscreen"in Ay?"webkitExitFullscreen":"webkitCancelFullScreen"in Ay?"webkitCancelFullScreen":void 0,mE="fullscreenElement"in Ay?"fullscreenElement":"webkitFullscreenElement"in Ay?"webkitFullscreenElement":void 0,gE=function(i){var e,t=i.media,s=i.documentElement,n=i.fullscreenElement,r=void 0===n?t:n;if(!t||!s)return!1;var o=function(i){var e=i.documentElement,t=i.media,s=null==e?void 0:e[mE];return!s&&"webkitDisplayingFullscreen"in t&&"webkitPresentationMode"in t&&t.webkitDisplayingFullscreen&&t.webkitPresentationMode===ty?t:s}(i);if(!o)return!1;if(o===r||o===t)return!0;if(o.localName.includes("-")){var a=o.shadowRoot;if(!(mE in a))return Uy(o,r);for(;null!=a&&a[mE];){if(a[mE]===r)return!0;a=null==(e=a[mE])?void 0:e.shadowRoot}}return!1},yE="fullscreenEnabled"in Ay?"fullscreenEnabled":"webkitFullscreenEnabled"in Ay?"webkitFullscreenEnabled":void 0,bE=function(i){var e=i.documentElement,t=i.media;return!(null==e||!e[yE])||t&&"webkitSupportsFullscreen"in t},EE=function(){var i,e;return Hb||(Hb=null==(e=null==(i=Ay)?void 0:i.createElement)?void 0:e.call(i,"video"))},_E=function(){var e=f(regeneratorRuntime.mark((function e(){var i,t,n,s,r=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=r.length>0&&void 0!==r[0]?r[0]:EE()){e.next=3;break}return e.abrupt("return",!1);case 3:return t=i.volume,i.volume=t/2+.1,n=new AbortController,e.next=8,Promise.race([kE(i,n.signal),TE(i,t)]);case 8:return s=e.sent,e.abrupt("return",(n.abort(),s));case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),kE=function(i,e){return new Promise((function(t){i.addEventListener("volumechange",(function(){return t(!0)}),{signal:e})}))},TE=function(){var e=f(regeneratorRuntime.mark((function e(i,t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<10)){e.next=9;break}if(i.volume!==t){e.next=4;break}return e.abrupt("return",!1);case 4:return e.next=6,ly(10);case 6:n++,e.next=1;break;case 9:return e.abrupt("return",i.volume!==t);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),wE=/.*Version\/.*Safari\/.*/.test(Sy.navigator.userAgent),SE=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:EE();return(!Sy.matchMedia("(display-mode: standalone)").matches||!wE)&&"function"==typeof(null==i?void 0:i.requestPictureInPicture)},AE=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:EE();return bE({documentElement:Ay,media:i})}
2,IE=AE(),RE=SE(),OE=!!Sy.WebKitPlaybackTargetAvailabilityEvent,LE=!!Sy.chrome,DE=function(i){return fE(i.media,(function(e){return[Kg.SUBTITLES,Kg.CAPTIONS].includes(e.kind)})).sort((function(e,t){return e.kind>=t.kind?1:-1}))},xE=function(i){return fE(i.media,(function(e){return e.mode===$g&&[Kg.SUBTITLES,Kg.CAPTIONS].includes(e.kind)}))},CE=function(i,e){var t=DE(i),s=xE(i),n=!!s.length;if(t.length)if(!1===e||n&&!0!==e)hE(Yg,t,s);else if(!0===e||!n&&!1!==e){var r=t[0],a=i.options;if(null==a||!a.noSubtitlesLangPref){var u=Sy.localStorage.getItem("media-chrome-pref-subtitles-lang"),o=u?[u].concat(v(Sy.navigator.languages)):Sy.navigator.languages,c=t.filter((function(e){return o.some((function(t){return e.language.toLowerCase().startsWith(t.split("-")[0])}))})).sort((function(e,t){return o.findIndex((function(t){return e.language.toLowerCase().startsWith(t.split("-")[0])}))-o.findIndex((function(e){return t.language.toLowerCase().startsWith(e.split("-")[0])}))}));c[0]&&(r=c[0])}var l=r,d=l.language,h=l.label,f=l.kind;hE(Yg,t,s),hE($g,t,[{language:d,label:h,kind:f}])}},ME=function e(i,t){return i===t||null!=i&&null!=t&&R(i)==R(t)&&(!("number"!=typeof i||!Number.isNaN(i)||!Number.isNaN(t))||"object"==R(i)&&(Array.isArray(i)?PE(i,t):Object.entries(i).every((function(n){var r=m(n,2),o=r[0],s=r[1];return o in t&&e(s,t[o])}))))},PE=function(i,e){var t=Array.isArray(i),s=Array.isArray(e);return t===s&&(!t&&!s||i.length===e.length&&i.every((function(t,n){return ME(t,e[n])})))},NE=Object.values(ey),UE=_E().then((function(i){return Wb=i})),FE=function(){var e=f(regeneratorRuntime.mark((function e(){var t,i,n,r=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=r.length,i=new Array(t),n=0;n<t;n++)i[n]=r[n];return e.next=3,Promise.all(i.filter((function(e){return e})).map(function(){var e=f(regeneratorRuntime.mark((function e(t){var n,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("localName"in t&&t instanceof Sy.HTMLElement){e.next=2;break}return e.abrupt("return");case 2:if((n=t.localName).includes("-")){e.next=5;break}return e.abrupt("return");case 5:if(s=Sy.customElements.get(n),e.t0=s&&t instanceof s,e.t0){e.next=11;break}return e.next=10,Sy.customElements.whenDefined(n);case 10:Sy.customElements.upgrade(t);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),BE=new Sy.DOMParser,jE=function(i){return i&&(BE.parseFromString(i,"text/html").body.textContent||i)},VE={mediaError:{get:function(i,e){var t=i.media;if("playing"!==(null==e?void 0:e.type))return null==t?void 0:t.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get:function(i,e){var t,s=i.media;if("playing"!==(null==e?void 0:e.type))return null==(t=null==s?void 0:s.error)?void 0:t.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get:function(i,e){var t,s,n=i.media;if("playing"!==(null==e?void 0:e.type))return null!=(s=null==(t=null==n?void 0:n.error)?void 0:t.message)?s:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get:function(i){var e,t=i.media;return null!=(e=null==t?void 0:t.videoWidth)?e:0},mediaEvents:["resize"]},mediaHeight:{get:function(i){var e,t=i.media;return null!=(e=null==t?void 0:t.videoHeight)?e:0},mediaEvents:["resize"]},mediaPaused:{get:function(i){var e,t=i.media;return null==(e=null==t?void 0:t.paused)||e},set:function(i,e){var t,s=e.media;s&&(i?s.pause():null==(t=s.play())||t.catch((function(){})))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get:function(i,e){var t=i.media;return!!t&&(e?"playing"===e.type:!t.paused)},mediaEvents:["playing","emptied"]},mediaEnded:{get:function(i){var e,t=i.media;return null!=(e=null==t?void 0:t.ended)&&e},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get:function(i){var e,t=i.media;return null!=(e=null==t?void 0:t.playbackRate)?e:1}
2,set:function(i,e){var t=e.media;t&&Number.isFinite(+i)&&(t.playbackRate=+i)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get:function(i){var e,t=i.media;return null!=(e=null==t?void 0:t.muted)&&e},set:function(i,e){var t=e.media,n=e.options,s=(void 0===n?{}:n).noMutedPref;if(t){t.muted=i;try{var r=null!==Sy.localStorage.getItem("media-chrome-pref-muted"),o=t.hasAttribute("muted");if(s)return void(r&&Sy.localStorage.removeItem("media-chrome-pref-muted"));if(o&&!r)return;Sy.localStorage.setItem("media-chrome-pref-muted",i?"true":"false")}catch(r){console.debug("Error setting muted pref",r)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[function(i,e){var t=e.options.noMutedPref,s=e.media;if(s&&!s.muted&&!t)try{var n="true"===Sy.localStorage.getItem("media-chrome-pref-muted");VE.mediaMuted.set(n,e),i(n)}catch(n){console.debug("Error getting muted pref",n)}}]},mediaLoop:{get:function(i){var e=i.media;return null==e?void 0:e.loop},set:function(i,e){var t=e.media;t&&(t.loop=i)},mediaEvents:["medialooprequest"]},mediaVolume:{get:function(i){var e,t=i.media;return null!=(e=null==t?void 0:t.volume)?e:1}
2,set:function(i,e){var t=e.media,n=e.options,s=(void 0===n?{}:n).noVolumePref;if(t){try{null==i?Sy.localStorage.removeItem("media-chrome-pref-volume"):!t.hasAttribute("muted")&&!s&&Sy.localStorage.setItem("media-chrome-pref-volume",i.toString())}catch(e){console.debug("Error setting volume pref",e)}Number.isFinite(+i)&&(t.volume=+i)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[function(i,e){if(!e.options.noVolumePref)try{var s;if(!e.media)return;var t=Sy.localStorage.getItem("media-chrome-pref-volume");if(null==t)return;VE.mediaVolume.set(+t,e),i(+t)}catch(s){console.debug("Error getting volume pref",s)}}]},mediaVolumeLevel:{get:function(i){var e=i.media;return void 0===(null==e?void 0:e.volume)?"high":e.muted||0===e.volume?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get:function(i){var e,t=i.media;return null!=(e=null==t?void 0:t.currentTime)?e:0},set:function(i,e){var t=e.media;!t||!sy(i)||(t.currentTime=i)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get:function(i){var e=i.media,t=i.options,n=(void 0===t?{}:t).defaultDuration;return!n||e&&e.duration&&!Number.isNaN(e.duration)&&Number.isFinite(e.duration)?Number.isFinite(null==e?void 0:e.duration)?e.duration:Number.NaN:n},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get:function(i){var e=i.media;return(null==e?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get:function(i){var e,t=i.media;if(null!=(e=null==t?void 0:t.seekable)&&e.length){var s=t.seekable.start(0),n=t.seekable.end(t.seekable.length-1);return s||n?[Number(s.toFixed(3)),Number(n.toFixed(3))]:void 0}},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get:function(i){var e,t=i.media,s=null!=(e=null==t?void 0:t.buffered)?e:[];return Array.from(s).map((function(e,t){return[Number(s.start(t).toFixed(3)),Number(s.end(t).toFixed(3))]}))},mediaEvents:["progress","emptied"]},mediaStreamType:{get:function(i){var e=i.media,t=i.options,n=(void 0===t?{}:t).defaultStreamType,s=[ey.LIVE,ey.ON_DEMAND].includes(n)?n:void 0;if(!e)return s;var r=e.streamType;if(NE.includes(r))return r===ey.UNKNOWN?s:r;var o=e.duration;return o===1/0?ey.LIVE:Number.isFinite(o)?ey.ON_DEMAND:s},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get:function(i){var e=i.media;if(!e)return Number.NaN;var t=e.targetLiveWindow,s=VE.mediaStreamType.get(i);return null!=t&&!Number.isNaN(t)||s!==ey.LIVE?t:0},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get:function(i){var e=i.media,t=i.options,n=(void 0===t?{}:t).liveEdgeOffset,r=void 0===n?10:n;if(!e)return!1;if("number"==typeof e.liveEdgeStart)return!Number.isNaN(e.liveEdgeStart)&&e.currentTime>=e.liveEdgeStart;if(VE.mediaStreamType.get(i)!==ey.LIVE)return!1;var o=e.seekable;if(!o)return!0;if(!o.length)return!1;var c=o.end(o.length-1)-r;return e.currentTime>=c},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get:function(i){return DE(i).map((function(e){return{kind:e.kind,label:e.label,language:e.language}}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:function(i){return xE(i).map((function(e){return{kind:e.kind,label:e.label,language:e.language}}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[function(i,e){var t,s,n=e.media,r=e.options;if(n){var a=function(t){var n;!r.defaultSubtitles||t&&![Kg.CAPTIONS,Kg.SUBTITLES].includes(null==(n=null==t?void 0:t.track)?void 0:n.kind)||CE(e,!0)};return n.addEventListener("loadstart",a),null==(t=n.textTracks)||t.addEventListener("addtrack",a),null==(s=n.textTracks)||s.addEventListener("removetrack",a),function(){var e,t;n.removeEventListener("loadstart",a),null==(e=n.textTracks)||e.removeEventListener("addtrack",a),null==(t=n.textTracks)||t.removeEventListener("removetrack",a)}}}]},mediaChaptersCues:{get:function(i){var e,t=i.media;if(!t)return[];var n=fE(t,{kind:Kg.CHAPTERS}),s=m(n,1)[0];return Array.from(null!=(e=null==s?void 0:s.cues)?e:[]).map((function(e){var t=e.text,n=e.startTime,a=e.endTime;return{text:jE(t),startTime:n,endTime:a}}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[function(i,e){var t,s=e.media;if(s){var n=s.querySelector('track[kind="chapters"][default][src]'),r=null==(t=s.shadowRoot)?void 0:t.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return null==n||n.addEventListener("load",i),null==r||r.addEventListener("load",i),function(){null==n||n.removeEventListener("load",i),null==r||r.removeEventListener("load",i)}}}]},mediaIsPip:{get:function(i){var e,t,s=i.media,n=i.documentElement;if(!s||!n||!n.pictureInPictureElement)return!1;if(n.pictureInPictureElement===s)return!0;
2if(n.pictureInPictureElement instanceof HTMLMediaElement)return!(null==(e=s.localName)||!e.includes("-"))&&Uy(s,n.pictureInPictureElement);if(n.pictureInPictureElement.localName.includes("-"))for(var r=n.pictureInPictureElement.shadowRoot;null!=r&&r.pictureInPictureElement;){if(r.pictureInPictureElement===s)return!0;r=null==(t=r.pictureInPictureElement)?void 0:t.shadowRoot}return!1},set:function(i,e){var t=e.media;if(t)if(i){if(!Ay.pictureInPictureEnabled)return void console.warn("MediaChrome: Picture-in-picture is not enabled");if(!t.requestPictureInPicture)return void console.warn("MediaChrome: The current media does not support picture-in-picture");var s=function(){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};t.requestPictureInPicture().catch((function(e){if(11!==e.code)throw e;if(t.src){if(0!==t.readyState||"none"!==t.preload)throw e;var n=function(){t.removeEventListener("loadedmetadata",a),t.preload="none"},a=function(){t.requestPictureInPicture().catch(s),n()};t.addEventListener("loadedmetadata",a),t.preload="metadata",setTimeout((function(){0===t.readyState&&s(),n()}),1e3)}else console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.")}))}else Ay.pictureInPictureElement&&Ay.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get:function(i){var e,t=i.media;return v(null!=(e=null==t?void 0:t.videoRenditions)?e:[]).map((function(s){return x({},s)}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get:function(i){var e,t,s,n=i.media;return null==(s=null==(t=null==n?void 0:n.videoRenditions)?void 0:t[null==(e=n.videoRenditions)?void 0:e.selectedIndex])?void 0:s.id},set:function(i,e){var t=e.media;if(null!=t&&t.videoRenditions){var s=i,n=Array.prototype.findIndex.call(t.videoRenditions,(function(e){return e.id==s}));t.videoRenditions.selectedIndex!=n&&(t.videoRenditions.selectedIndex=n)}else console.warn("MediaController: Rendition selection not supported by this media.")},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get:function(i){var e,t=i.media;return v(null!=(e=null==t?void 0:t.audioTracks)?e:[])},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get:function(i){var e,t,s=i.media;return null==(t=v(null!=(e=null==s?void 0:s.audioTracks)?e:[]).find((function(e){return e.enabled})))?void 0:t.id},set:function(i,e){var t=e.media;if(null!=t&&t.audioTracks){var n,s=i,r=C(t.audioTracks);try{for(r.s();!(n=r.n()).done;){var o=n.value;o.enabled=s==o.id}}catch(e){r.e(e)}finally{r.f()}}else console.warn("MediaChrome: Audio track selection not supported by this media.")},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get:function(i){return gE(i)},set:function(i,e,t){var s,n;i?(function(i){var e,t=i.media,s=i.fullscreenElement;try{var n=s&&"requestFullscreen"in s?"requestFullscreen":s&&"webkitRequestFullScreen"in s?"webkitRequestFullScreen":void 0;if(n){var r=null==(e=s[n])?void 0:e.call(s);if(r instanceof Promise)r.catch((function(){}))}else null!=t&&t.webkitEnterFullscreen?t.webkitEnterFullscreen():null!=t&&t.requestFullscreen&&t.requestFullscreen()}catch(n){console.error(n)}}(e),t.detail&&(null==(s=e.media)||!s.inert)&&(null==(n=e.media)||n.focus())):function(i){var e,t=i.documentElement;if(vE){var s=null==(e=null==t?void 0:t[vE])?void 0:e.call(t);if(s instanceof Promise)s.catch((function(){}))}}(e)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get:function(i){var e,t=i.media;return!(null==t||!t.remote||"disconnected"===(null==(e=t.remote)?void 0:e.state))&&!!t.remote.state},set:function(i,e){var t,s,n=e.media;if(n&&(!i||"disconnected"===(null==(t=n.remote)?void 0:t.state))&&(i||"connected"===(null==(s=n.remote)?void 0:s.state))){if("function"!=typeof n.remote.prompt)return void console.warn("MediaChrome: Casting is not supported in this environment");n.remote.prompt().catch((function(){}))}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get:function(){return!1},set:function(i,e){var t=e.media;if(t){if(!t.webkitShowPlaybackTargetPicker||!Sy.WebKitPlaybackTargetAvailabilityEvent)return void console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");t.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get:function(i){var e=i.media;if(!IE||!AE(e))return Zg}},mediaPipUnavailable:{get:function(i){var e=i.media;return RE&&SE(e)?null!=e&&e.disablePictureInPicture?Jg:void 0:Zg}},mediaVolumeUnavailable:{get:function(i){var e=i.media;if(!1===Wb||null==(null==e?void 0:e.volume))return Zg},stateOwnersUpdateHandlers:[function(i){null==Wb&&UE.then((function(e){return i(e?void 0:Zg)}))}]},mediaCastUnavailable:{get:function(i){var e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.availability,r=void 0===n?"not-available":n,s=i.media;return LE&&null!=(e=null==s?void 0:s.remote)&&e.state?null!=r&&"available"!==r?Jg:void 0:Zg},stateOwnersUpdateHandlers:[function(i,e){var t,s=e.media;return s?(s.disableRemotePlayback||s.hasAttribute("disableremoteplayback")||null==(t=null==s?void 0:s.remote)||t.watchAvailability((function(e){i({availability:e?"available":"not-available"})})).catch((function(e){"NotSupportedError"===e.name?i({availability:null}):i({availability:"not-available"})})),function(){var e;null==(e=null==s?void 0:s.remote)||e.cancelWatchAvailability().catch((function(){}))}):void 0}]},mediaAirplayUnavailable:{get:function(i,e){return OE?"not-available"===(null==e?void 0:e.availability)?Jg:void 0:Zg},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[function(i,e){var t,s=e.media;return s?(s.disableRemotePlayback||s.hasAttribute("disableremoteplayback")||null==(t=null==s?void 0:s.remote)||t.watchAvailability((function(e){i({availability:e?"available":"not-available"})})).catch((function(e){"NotSupportedError"===e.name?i({availability:null}):i({availability:"not-available"})})),function(){var e;null==(e=null==s?void 0:s.remote)||e.cancelWatchAvailability().catch((function(){}))}):void 0}]},mediaRenditionUnavailable:{get:function(i){var e,t=i.media;return null!=t&&t.videoRenditions?null!=(e=t.videoRenditions)&&e.length?void 0:Jg:Zg},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get:function(i){var e,t,s=i.media;return null!=s&&s.audioTracks?(null!=(t=null==(e=s.audioTracks)?void 0:e.length)?t:0)<=1?Jg:void 0:Zg},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get:function(i){var e=i.options,t=(void 0===e?{}:e).mediaLang;return null!=t?t:"en"}}},HE=(k(D={},Fg.MEDIA_PREVIEW_REQUEST,(function(i,e,t){var s,n,r,o,c,l=t.detail,a=e.media,d=null!=l?l:void 0;if(a&&null!=d){var h=fE(a,{kind:Kg.METADATA,label:"thumbnails"}),f=m(h,1)[0],v=Array.prototype.find.call(null!=(s=null==f?void 0:f.cues)?s:[],(function(p,g,e){return 0===g?p.endTime>d:g===e.length-1?p.startTime<=d:p.startTime<=d&&p.endTime>d}));if(v){var p=/'^(?:[a-z]+:)?\/\//i.test(v.text)||null==(n=null==a?void 0:a.querySelector('track[label="thumbnails"]'))?void 0:n.src,g=new URL(v.text,p);c=new URLSearchParams(g.hash).get("#xywh").split(",").map((function(e){return+e})),o=g.href}}
2var u=i.mediaDuration.get(e),y=null==(r=i.mediaChaptersCues.get(e).find((function(e,t,p){return t===p.length-1&&u===e.endTime?e.startTime<=d&&e.endTime>=d:e.startTime<=d&&e.endTime>d})))?void 0:r.text;return null!=l&&null==y&&(y=""),{mediaPreviewTime:d,mediaPreviewImage:o,mediaPreviewCoords:c,mediaPreviewChapter:y}})),k(D,Fg.MEDIA_PAUSE_REQUEST,(function(i,e){i.mediaPaused.set(!0,e)})),k(D,Fg.MEDIA_PLAY_REQUEST,(function(i,e){var t,s,n,r,o=i.mediaStreamType.get(e)===ey.LIVE,c=!(null!=(t=e.options)&&t.noAutoSeekToLive),u=i.mediaTargetLiveWindow.get(e)>0;if(o&&c&&!u){var l=null==(s=i.mediaSeekable.get(e))?void 0:s[1];if(l){var d=l-(null!=(r=null==(n=e.options)?void 0:n.seekToLiveOffset)?r:0);i.mediaCurrentTime.set(d,e)}}i.mediaPaused.set(!1,e)})),k(D,Fg.MEDIA_PLAYBACK_RATE_REQUEST,(function(i,e,t){var n=t.detail;i.mediaPlaybackRate.set(n,e)})),k(D,Fg.MEDIA_MUTE_REQUEST,(function(i,e){i.mediaMuted.set(!0,e)})),k(D,Fg.MEDIA_UNMUTE_REQUEST,(function(i,e){i.mediaVolume.get(e)||i.mediaVolume.set(.25,e),i.mediaMuted.set(!1,e)})),k(D,Fg.MEDIA_LOOP_REQUEST,(function(i,e,t){var n=!!t.detail;return i.mediaLoop.set(n,e),{mediaLoop:n}})),k(D,Fg.MEDIA_VOLUME_REQUEST,(function(i,e,t){var n=t.detail;n&&i.mediaMuted.get(e)&&i.mediaMuted.set(!1,e),i.mediaVolume.set(n,e)})),k(D,Fg.MEDIA_SEEK_REQUEST,(function(i,e,t){var n=t.detail;i.mediaCurrentTime.set(n,e)})),k(D,Fg.MEDIA_SEEK_TO_LIVE_REQUEST,(function(i,e){var t,s,n,a=null==(t=i.mediaSeekable.get(e))?void 0:t[1];if(!Number.isNaN(Number(a))){var r=a-(null!=(n=null==(s=e.options)?void 0:s.seekToLiveOffset)?n:0);i.mediaCurrentTime.set(r,e)}})),k(D,Fg.MEDIA_SHOW_SUBTITLES_REQUEST,(function(i,e,t){var s,n=t.detail,r=e.options,o=DE(e),a=uE(n),c=null==(s=a[0])?void 0:s.language;c&&!r.noSubtitlesLangPref&&Sy.localStorage.setItem("media-chrome-pref-subtitles-lang",c),hE($g,o,a)})),k(D,Fg.MEDIA_DISABLE_SUBTITLES_REQUEST,(function(i,e,t){var n=t.detail,s=DE(e);hE(Yg,s,null!=n?n:[])})),k(D,Fg.MEDIA_TOGGLE_SUBTITLES_REQUEST,(function(i,e,t){var n=t.detail;CE(e,n)})),k(D,Fg.MEDIA_RENDITION_REQUEST,(function(i,e,t){var n=t.detail;i.mediaRenditionSelected.set(n,e)})),k(D,Fg.MEDIA_AUDIO_TRACK_REQUEST,(function(i,e,t){var n=t.detail;i.mediaAudioTrackEnabled.set(n,e)})),k(D,Fg.MEDIA_ENTER_PIP_REQUEST,(function(i,e){i.mediaIsFullscreen.get(e)&&i.mediaIsFullscreen.set(!1,e),i.mediaIsPip.set(!0,e)})),k(D,Fg.MEDIA_EXIT_PIP_REQUEST,(function(i,e){i.mediaIsPip.set(!1,e)})),k(D,Fg.MEDIA_ENTER_FULLSCREEN_REQUEST,(function(i,e,t){i.mediaIsPip.get(e)&&i.mediaIsPip.set(!1,e),i.mediaIsFullscreen.set(!0,e,t)})),k(D,Fg.MEDIA_EXIT_FULLSCREEN_REQUEST,(function(i,e){i.mediaIsFullscreen.set(!1,e)})),k(D,Fg.MEDIA_ENTER_CAST_REQUEST,(function(i,e){i.mediaIsFullscreen.get(e)&&i.mediaIsFullscreen.set(!1,e),i.mediaIsCasting.set(!0,e)})),k(D,Fg.MEDIA_EXIT_CAST_REQUEST,(function(i,e){i.mediaIsCasting.set(!1,e)})),k(D,Fg.MEDIA_AIRPLAY_REQUEST,(function(i,e){i.mediaIsAirplaying.set(!0,e)})),D),WE=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},qE=function(i,e,t){return WE(i,e,"read from private field"),t?t.call(i):e.get(i)},GE=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},KE=function(i,e,t,s){return WE(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},YE=function(i,e,t){return WE(i,e,"access private method"),t},$E=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],QE="defaultsubtitles",zE="defaultstreamtype",XE="defaultduration",JE="fullscreenelement",ZE="hotkeys",e_="keyboardbackwardseekoffset",t_="keyboardforwardseekoffset",n_="keyboarddownvolumestep",r_="keyboardupvolumestep",i_="keysused",a_="lang",o_="loop",s_="liveedgeoffset",u_="noautoseektolive",c_="nodefaultstore",l_="nohotkeys",d_="nomutedpref",h_="nosubtitleslangpref",f_="novolumepref",p_="seektoliveoffset",v_=function(e){T(n,e);var t=P(n);function n(){var e;A(this,n),e=t.call(this),GE(_(e),Jb),GE(_(e),tE),GE(_(e),rE),e.mediaStateReceivers=[],e.associatedElementSubscriptions=new Map,GE(_(e),qb,new Vb(_(e),ZE)),GE(_(e),Gb,void 0),GE(_(e),Kb,void 0),GE(_(e),Yb,null),GE(_(e),$b,void 0),GE(_(e),Qb,void 0),GE(_(e),zb,(function(t){var s;null==(s=qE(_(e),Kb))||s.dispatch(t)})),GE(_(e),Xb,void 0),GE(_(e),eE,(function(t){var s=t.key;t.shiftKey&&("/"===s||"?"===s)||$E.includes(s)?e.keyboardShortcutHandler(t):e.removeEventListener("keyup",qE(_(e),eE))})),e.associateElement(_(e));var r={};return KE(_(e),$b,(function(t){Object.entries(t).forEach((function(t){var n=m(t,2),s=n[0],o=n[1];if(!(s in r)||r[s]!==o){e.propagateMediaState(s,o);var c=s.toLowerCase(),a=new Sy.CustomEvent(Gg[c],{composed:!0,detail:o});e.dispatchEvent(a)}})),r=t})),e}return I(n,[{key:"mediaStore",get:function(){return qE(this,Kb)},set:function(e){var t,s;qE(this,Kb)&&(null==(t=qE(this,Qb))||t.call(this),KE(this,Qb,void 0)),KE(this,Kb,e),qE(this,Kb)||this.hasAttribute(c_)?KE(this,Qb,null==(s=qE(this,Kb))?void 0:s.subscribe(qE(this,$b))):YE(this,Jb,Zb).call(this)}},{key:"fullscreenElement",get:function(){var e;return null!=(e=qE(this,Gb))?e:this},set:function(e){var t;this.hasAttribute(JE)&&this.removeAttribute(JE),KE(this,Gb,e),null==(t=qE(this,Kb))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}},{key:"defaultSubtitles",get:function(){return Ky(this,QE)},set:function(e){Yy(this,QE,e)}},{key:"defaultStreamType",get:function(){return $y(this,zE)},set:function(e){Qy(this,zE,e)}},{key:"defaultDuration",get:function(){return qy(this,XE)},set:function(e){Gy(this,XE,e)}},{key:"noHotkeys",get:function(){return Ky(this,l_)},set:function(e){Yy(this,l_,e)}},{key:"keysUsed",get:function(){return $y(this,i_)}
2,set:function(e){Qy(this,i_,e)}},{key:"liveEdgeOffset",get:function(){return qy(this,s_)},set:function(e){Gy(this,s_,e)}},{key:"noAutoSeekToLive",get:function(){return Ky(this,u_)},set:function(e){Yy(this,u_,e)}},{key:"noVolumePref",get:function(){return Ky(this,f_)},set:function(e){Yy(this,f_,e)}},{key:"noMutedPref",get:function(){return Ky(this,d_)},set:function(e){Yy(this,d_,e)}},{key:"noSubtitlesLangPref",get:function(){return Ky(this,h_)},set:function(e){Yy(this,h_,e)}},{key:"noDefaultStore",get:function(){return Ky(this,c_)},set:function(e){Yy(this,c_,e)}},{key:"attributeChangedCallback",value:function(e,t,s){var r,o,a,c,l,d,u,h,f,v,m,p;if(y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===l_)s!==t&&""===s?(this.hasAttribute(ZE)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):s!==t&&null===s&&this.enableHotkeys();else if(e===ZE)qE(this,qb).value=s;else if(e===QE&&s!==t)null==(r=qE(this,Kb))||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(QE)}});else if(e===zE)null==(a=qE(this,Kb))||a.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(o=this.getAttribute(zE))?o:void 0}});else if(e===s_&&s!==t)null==(c=qE(this,Kb))||c.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(s_)?+this.getAttribute(s_):void 0,seekToLiveOffset:this.hasAttribute(p_)?+this.getAttribute(p_):this.hasAttribute(s_)?+this.getAttribute(s_):void 0}});else if(e===p_&&s!==t)null==(l=qE(this,Kb))||l.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(p_)?+this.getAttribute(p_):this.hasAttribute(s_)?+this.getAttribute(s_):void 0}});else if(e===u_)null==(d=qE(this,Kb))||d.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(u_)}});else if(e===JE){var g=s?null==(u=this.getRootNode())?void 0:u.getElementById(s):void 0;KE(this,Gb,g),null==(h=qE(this,Kb))||h.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===a_&&s!==t?(function(i){hy=i}(s),null==(f=qE(this,Kb))||f.dispatch({type:"optionschangerequest",detail:{mediaLang:s}})):e===o_&&s!==t?null==(v=qE(this,Kb))||v.dispatch({type:Fg.MEDIA_LOOP_REQUEST,detail:null!=s}):e===f_&&s!==t?null==(m=qE(this,Kb))||m.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(f_)}}):e===d_&&s!==t&&(null==(p=qE(this,Kb))||p.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(d_)}}))}},{key:"connectedCallback",value:function(){var e,t,s,r=this;this.associateElement(this),!qE(this,Kb)&&!this.hasAttribute(c_)&&YE(this,Jb,Zb).call(this),null==(e=qE(this,Kb))||e.dispatch({type:"documentelementchangerequest",detail:Ay}),null==(t=qE(this,Kb))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement}),y(S(n.prototype),"connectedCallback",this).call(this),qE(this,Kb)&&!qE(this,Qb)&&KE(this,Qb,null==(s=qE(this,Kb))?void 0:s.subscribe(qE(this,$b))),void 0!==qE(this,Xb)&&qE(this,Kb)&&this.media&&setTimeout((function(){var e,t,a;null!=(t=null==(e=r.media)?void 0:e.textTracks)&&t.length&&(null==(a=qE(r,Kb))||a.dispatch({type:Fg.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:qE(r,Xb)}))}),0),this.hasAttribute(l_)?this.disableHotkeys():this.enableHotkeys()}},{key:"disconnectedCallback",value:function(){var e,t,s,r,o,a;if(null==(e=y(S(n.prototype),"disconnectedCallback",this))||e.call(this),this.disableHotkeys(),qE(this,Kb)){var c=qE(this,Kb).getState();KE(this,Xb,!(null==(t=c.mediaSubtitlesShowing)||!t.length)),null==(s=qE(this,Kb))||s.dispatch({type:"fullscreenelementchangerequest",detail:void 0}),null==(r=qE(this,Kb))||r.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(o=qE(this,Kb))||o.dispatch({type:Fg.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}qE(this,Qb)&&(null==(a=qE(this,Qb))||a.call(this),KE(this,Qb,void 0)),this.unassociateElement(this),qE(this,Yb)&&(qE(this,Yb).remove(),KE(this,Yb,null))}},{key:"mediaSetCallback",value:function(e){var t;y(S(n.prototype),"mediaSetCallback",this).call(this,e),null==(t=qE(this,Kb))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}},{key:"mediaUnsetCallback",value:function(e){var t;y(S(n.prototype),"mediaUnsetCallback",this).call(this,e),null==(t=qE(this,Kb))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}},{key:"propagateMediaState",value:function(e,t){w_(this.mediaStateReceivers,e,t)}},{key:"associateElement",value:function(e){var t=this;if(e){var n=this.associatedElementSubscriptions;if(!n.has(e)){var s=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),o=S_(e,s,r);Object.values(Fg).forEach((function(a){e.addEventListener(a,qE(t,zb))})),n.set(e,o)}}}},{key:"unassociateElement",value:function(e){var t=this;if(e){var n=this.associatedElementSubscriptions;n.has(e)&&(n.get(e)(),n.delete(e),Object.values(Fg).forEach((function(n){e.removeEventListener(n,qE(t,zb))})))}}},{key:"registerMediaStateReceiver",value:function(e){if(e){var t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),qE(this,Kb)&&Object.entries(qE(this,Kb).getState()).forEac
2h((function(t){var n=m(t,2),r=n[0],o=n[1];w_([e],r,o)})))}}},{key:"unregisterMediaStateReceiver",value:function(e){var t=this.mediaStateReceivers,s=t.indexOf(e);s<0||t.splice(s,1)}},{key:"enableHotkeys",value:function(){this.addEventListener("keydown",YE(this,tE,nE))}},{key:"disableHotkeys",value:function(){this.removeEventListener("keydown",YE(this,tE,nE)),this.removeEventListener("keyup",qE(this,eE))}},{key:"hotkeys",get:function(){return qE(this,qb)},set:function(e){Qy(this,ZE,e)}},{key:"keyboardShortcutHandler",value:function(e){var t,s,n,r,a,o,c,l,u,d,h,p,f=e.target;if(!(null!=(n=null!=(s=null==(t=f.getAttribute(i_))?void 0:t.split(" "))?s:null==f?void 0:f.keysUsed)?n:[]).map((function(e){return"Space"===e?" ":e})).filter(Boolean).includes(e.key)&&!(qE(this,qb).contains("no".concat(e.key.toLowerCase()))||" "===e.key&&qE(this,qb).contains("nospace")||e.shiftKey&&("/"===e.key||"?"===e.key)&&qE(this,qb).contains("noshift+/")))switch(e.key){case" ":case"k":d=qE(this,Kb).getState().mediaPaused?Fg.MEDIA_PLAY_REQUEST:Fg.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new Sy.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"m":d="off"===this.mediaStore.getState().mediaVolumeLevel?Fg.MEDIA_UNMUTE_REQUEST:Fg.MEDIA_MUTE_REQUEST,this.dispatchEvent(new Sy.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"f":d=this.mediaStore.getState().mediaIsFullscreen?Fg.MEDIA_EXIT_FULLSCREEN_REQUEST:Fg.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new Sy.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new Sy.CustomEvent(Fg.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":var v=this.hasAttribute(e_)?+this.getAttribute(e_):10;h=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-v,0),p=new Sy.CustomEvent(Fg.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(p);break;case"ArrowRight":case"l":var m=this.hasAttribute(t_)?+this.getAttribute(t_):10;h=Math.max((null!=(a=this.mediaStore.getState().mediaCurrentTime)?a:0)+m,0),p=new Sy.CustomEvent(Fg.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(p);break;case"ArrowUp":var y=this.hasAttribute(r_)?+this.getAttribute(r_):.025;h=Math.min((null!=(o=this.mediaStore.getState().mediaVolume)?o:1)+y,1),p=new Sy.CustomEvent(Fg.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(p);break;case"ArrowDown":var E=this.hasAttribute(n_)?+this.getAttribute(n_):.025;h=Math.max((null!=(c=this.mediaStore.getState().mediaVolume)?c:1)-E,0),p=new Sy.CustomEvent(Fg.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(p);break;case"<":var _=null!=(l=this.mediaStore.getState().mediaPlaybackRate)?l:1;h=Math.max(_-.25,.25).toFixed(2),p=new Sy.CustomEvent(Fg.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(p);break;case">":var k=null!=(u=this.mediaStore.getState().mediaPlaybackRate)?u:1;h=Math.min(k+.25,2).toFixed(2),p=new Sy.CustomEvent(Fg.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(p);break;case"/":case"?":e.shiftKey&&YE(this,rE,iE).call(this);break;case"p":d=this.mediaStore.getState().mediaIsPip?Fg.MEDIA_EXIT_PIP_REQUEST:Fg.MEDIA_ENTER_PIP_REQUEST,p=new Sy.CustomEvent(d,{composed:!0,bubbles:!0}),this.dispatchEvent(p)}}}],[{key:"observedAttributes",get:function(){return y(S(n),"observedAttributes",this).concat(l_,ZE,zE,QE,XE,d_,f_,a_,o_,s_,p_,u_)}}]),n}(Lb);qb=new WeakMap,Gb=new WeakMap,Kb=new WeakMap,Yb=new WeakMap,$b=new WeakMap,Qb=new WeakMap,zb=new WeakMap,Xb=new WeakMap,Jb=new WeakSet,Zb=function(){var i;this.mediaStore=function(e){var t,i=e.media,n=e.fullscreenElement,r=e.documentElement,o=e.stateMediator,s=void 0===o?VE:o,c=e.requestMap,l=void 0===c?HE:c,d=e.options,h=void 0===d?{}:d,y=e.monitorStateOwnersOnlyWithSubscriptions,a=void 0===y||y,E=[],_={options:x({},h)},T=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),u=function(p){null!=p&&(ME(p,T)||(T=Object.freeze(x(x({},T),p)),E.forEach((function(g){return g(T)}))))},w=function(){var p=Object.entries(s).reduce((function(g,e){var t=m(e,2),n=t[0],r=t[1].get;return g[n]=r(_),g}),{});u(p)},S={},A=function(){var e=f(regeneratorRuntime.mark((function e(p,g){var n,r,o,b,c,l,d,h,f,y,T,A,I,R,O,L,D,q,C,M,P,N,U,F,B,j,V,H,W,G,K,Y,$,Q,z,X,J,Z,ee;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(D=!!t,t=x(x(x({},_),null!=t?t:{}),p),!D){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,FE.apply(void 0,v(Object.values(p)));case 5:if(q=E.length>0&&0===g&&a,C=_.media!==t.media,M=(null==(n=_.media)?void 0:n.textTracks)!==(null==(r=t.media)?void 0:r.textTracks),P=(null==(o=_.media)?void 0:o.videoRenditions)!==(null==(b=t.media)?void 0:b.videoRenditions),N=(null==(c=_.media)?void 0:c.audioTracks)!==(null==(l=t.media)?void 0:l.audioTracks),U=(null==(d=_.media)?void 0:d.remote)!==(null==(h=t.media)?void 0:h.remote),F=_.documentElement!==t.documentElement,B=!!_.media&&(C||q),j=!(null==(f=_.media)||!f.textTracks)&&(M||q),V=!(null==(y=_.media)||!y.videoRenditions)&&(P||q),H=!(null==(T=_.media)||!T.audioTracks)&&(N||q),W=!(null==(A=_.media)||!A.remote)&&(U||q),G=!!_.documentElement&&(F||q),K=B||j||V||H||W||G,Y=0===E.length&&1===g&&a,$=!!t.media&&(C||Y),Q=!(null==(I=t.media)||!I.textTracks)&&(M||Y),z=!(null==(R=t.media)||!R.videoRenditions)&&(P||Y),X=!(null==(O=t.media)||!O.audioTracks)&&(N||Y),J=!(null==(L=t.media)||!L.remote)&&(U||Y),Z=!!t.documentElement&&(F||Y),ee=$||Q||z||X||J||Z,K||ee){e.next=9;break}return Object.entries(t).forEach((function(e){var t=m(e,2),n=t[0],r=t[1];_[n]=r})),w(),t=void 0,e.abrupt("return");
2case 9:Object.entries(s).forEach((function(e){var n=m(e,2),r=n[0],o=n[1],c=o.get,l=o.mediaEvents,d=void 0===l?[]:l,h=o.textTracksEvents,f=void 0===h?[]:h,v=o.videoRenditionsEvents,y=void 0===v?[]:v,E=o.audioTracksEvents,T=void 0===E?[]:E,w=o.remoteEvents,A=void 0===w?[]:w,I=o.rootEvents,R=void 0===I?[]:I,O=o.stateOwnersUpdateHandlers,L=void 0===O?[]:O;S[r]||(S[r]={});var D,x=function(e){var t=c(_,e);u(k({},r,t))};D=S[r].mediaEvents,d.forEach((function(e){D&&B&&(_.media.removeEventListener(e,D),S[r].mediaEvents=void 0),$&&(t.media.addEventListener(e,x),S[r].mediaEvents=x)})),D=S[r].textTracksEvents,f.forEach((function(e){var n,o;D&&j&&(null==(n=_.media.textTracks)||n.removeEventListener(e,D),S[r].textTracksEvents=void 0),Q&&(null==(o=t.media.textTracks)||o.addEventListener(e,x),S[r].textTracksEvents=x)})),D=S[r].videoRenditionsEvents,y.forEach((function(e){var n,o;D&&V&&(null==(n=_.media.videoRenditions)||n.removeEventListener(e,D),S[r].videoRenditionsEvents=void 0),z&&(null==(o=t.media.videoRenditions)||o.addEventListener(e,x),S[r].videoRenditionsEvents=x)})),D=S[r].audioTracksEvents,T.forEach((function(e){var n,o;D&&H&&(null==(n=_.media.audioTracks)||n.removeEventListener(e,D),S[r].audioTracksEvents=void 0),X&&(null==(o=t.media.audioTracks)||o.addEventListener(e,x),S[r].audioTracksEvents=x)})),D=S[r].remoteEvents,A.forEach((function(e){var n,o;D&&W&&(null==(n=_.media.remote)||n.removeEventListener(e,D),S[r].remoteEvents=void 0),J&&(null==(o=t.media.remote)||o.addEventListener(e,x),S[r].remoteEvents=x)})),D=S[r].rootEvents,R.forEach((function(e){D&&G&&(_.documentElement.removeEventListener(e,D),S[r].rootEvents=void 0),Z&&(t.documentElement.addEventListener(e,x),S[r].rootEvents=x)}));var C=S[r].stateOwnersUpdateHandlers;if(C&&K&&(Array.isArray(C)?C:[C]).forEach((function(e){"function"==typeof e&&e()})),ee){var M=L.map((function(e){return e(x,t)})).filter((function(e){return"function"==typeof e}));S[r].stateOwnersUpdateHandlers=1===M.length?M[0]:M}else K&&(S[r].stateOwnersUpdateHandlers=void 0)})),Object.entries(t).forEach((function(e){var t=m(e,2),n=t[0],r=t[1];_[n]=r})),w(),t=void 0;case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return A({media:i,fullscreenElement:n,documentElement:r,options:h}),{dispatch:function(p){var g=p.type,e=p.detail;l[g]&&null==T.mediaErrorCode?u(l[g](s,_,p)):"mediaelementchangerequest"===g?A({media:e}):"fullscreenelementchangerequest"===g?A({fullscreenElement:e}):"documentelementchangerequest"===g?A({documentElement:e}):"optionschangerequest"===g&&(Object.entries(null!=e?e:{}).forEach((function(e){var t=m(e,2),n=t[0],r=t[1];_.options[n]=r})),w())},getState:function(){return T},subscribe:function(p){return A({},E.length+1),E.push(p),p(T),function(){var g=E.indexOf(p);g>=0&&(A({},E.length-1),E.splice(g,1))}}}}({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(QE),defaultDuration:this.hasAttribute(XE)?+this.getAttribute(XE):void 0,defaultStreamType:null!=(i=this.getAttribute(zE))?i:void 0,liveEdgeOffset:this.hasAttribute(s_)?+this.getAttribute(s_):void 0,seekToLiveOffset:this.hasAttribute(p_)?+this.getAttribute(p_):this.hasAttribute(s_)?+this.getAttribute(s_):void 0,noAutoSeekToLive:this.hasAttribute(u_),noVolumePref:this.hasAttribute(f_),noMutedPref:this.hasAttribute(d_),noSubtitlesLangPref:this.hasAttribute(h_)}})},eE=new WeakMap,tE=new WeakSet,nE=function(i){var e,t=i.metaKey,s=i.altKey,n=i.key,a=i.shiftKey&&("/"===n||"?"===n);if(a&&null!=(e=qE(this,Yb))&&e.open)this.removeEventListener("keyup",qE(this,eE));else if(t||s||!a&&!$E.includes(n))this.removeEventListener("keyup",qE(this,eE));else{var r=i.target,o=r instanceof HTMLElement&&("media-volume-range"===r.tagName.toLowerCase()||"media-time-range"===r.tagName.toLowerCase());[" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(n)&&!(qE(this,qb).contains("no".concat(n.toLowerCase()))||" "===n&&qE(this,qb).contains("nospace"))&&!o&&i.preventDefault(),this.addEventListener("keyup",qE(this,eE),{once:!0})}},rE=new WeakSet,iE=function(){qE(this,Yb)||(KE(this,Yb,Ay.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(qE(this,Yb))),qE(this,Yb).open=!0};var m_=Object.values(Wg),g_=Object.values(Vg),y_=function(i){var e,t,s,n,r=i.constructor.observedAttributes;!r&&null!=(e=i.nodeName)&&e.includes("-")&&(Sy.customElements.upgrade(i),r=i.constructor.observedAttributes);var a=null==(n=null==(s=null==(t=null==i?void 0:i.getAttribute)?void 0:t.call(i,Bg))?void 0:s.split)?void 0:n.call(s,/\s+/);return Array.isArray(r||a)?(r||a).filter((function(e){return m_.includes(e)})):[]},b_=function(i){return function(i){var e,t;return null!=(e=i.nodeName)&&e.includes("-")&&Sy.customElements.get(null==(t=i.nodeName)?void 0:t.toLowerCase())&&!(i instanceof Sy.customElements.get(i.nodeName.toLowerCase()))&&Sy.customElements.upgrade(i),g_.some((function(s){return s in i}))}(i)||!!y_(i).length},E_=function(i){var e;return null==(e=null==i?void 0:i.join)?void 0:e.call(i,":")},__=(k(M={},Wg.MEDIA_SUBTITLES_LIST,lE),k(M,Wg.MEDIA_SUBTITLES_SHOWING,lE),k(M,Wg.MEDIA_SEEKABLE,E_),k(M,Wg.MEDIA_BUFFERED,(function(i){return null==i?void 0:i.map(E_).join(" ")})),k(M,Wg.MEDIA_PREVIEW_COORDS,(function(i){return null==i?void 0:i.join(" ")})),k(M,Wg.MEDIA_RENDITION_LIST,(function(i){return null==i?void 0:i.map(ny).join(" ")})),k(M,Wg.MEDIA_AUDIO_TRACK_LIST,(function(i){return null==i?void 0:i.map(iy).join(" ")})),M),k_=function(){var e=f(regeneratorRuntime.mark((function e(i,t,n){var s,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=i.isConnected,e.t0){e.next=4;break}return e.next=4,ly(0);case 4:if("boolean"!=typeof n&&null!=n){e.next=6;break}return e.abrupt("return",Yy(i,t,n));case 6:if("number"!=typeof n){e.next=8;break}return e.abrupt("return",Gy(i,t,n));case 8:if("string"!=typeof n){e.next=10;break}return e.abrupt("return",Qy(i,t,n));case 10:if(!Array.isArray(n)||n.length){e.next=12;break}return e.abrupt("return",i.removeAttribute(t));case 12:return o=null!=(r=null==(s=__[t])?void 0:s.call(__,n))?r:n,e.abrupt("return",i.setAttribute(t,o));case 14:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),T_=function e(i,t){if(!function(i){var e;return!(null==(e=i.closest)||!e.call(i,'*[slot="media"]'))}(i)){var n=function(t,n){var a,r;b_(t)&&n(t);var o=(null!=t?t:{}).children,c=void 0===o?[]:o,l=null!=(r=null==(a=null==t?void 0:t.shadowRoot)?void 0:a.children)?r:[];
2[].concat(v(c),v(l)).forEach((function(t){return e(t,n)}))},s=null==i?void 0:i.nodeName.toLowerCase();!s.includes("-")||b_(i)?n(i,t):Sy.customElements.whenDefined(s).then((function(){n(i,t)}))}},w_=function(i,e,t){i.forEach((function(s){if(e in s)s[e]=t;else{var n=y_(s),r=e.toLowerCase();n.includes(r)&&k_(s,r,t)}}))},S_=function(i,e,t){T_(i,e);var s=function(u){var t,n=null!=(t=null==u?void 0:u.composedPath()[0])?t:u.target;e(n)},n=function(u){var e,n=null!=(e=null==u?void 0:u.composedPath()[0])?e:u.target;t(n)};i.addEventListener(Fg.REGISTER_MEDIA_STATE_RECEIVER,s),i.addEventListener(Fg.UNREGISTER_MEDIA_STATE_RECEIVER,n);var a=[],r=function(u){var n=u.target;"media"!==n.name&&(a.forEach((function(e){return T_(e,t)})),(a=v(n.assignedElements({flatten:!0}))).forEach((function(t){return T_(t,e)})))};i.addEventListener("slotchange",r);var o=new MutationObserver((function(u){u.forEach((function(n){var r=n.addedNodes,o=void 0===r?[]:r,c=n.removedNodes,l=void 0===c?[]:c,d=n.type,p=n.target,g=n.attributeName;"childList"===d?(Array.prototype.forEach.call(o,(function(t){return T_(t,e)})),Array.prototype.forEach.call(l,(function(e){return T_(e,t)}))):"attributes"===d&&g===Bg&&(b_(p)?e(p):t(p))}))}));return o.observe(i,{childList:!0,attributes:!0,subtree:!0}),function(){T_(i,t),i.removeEventListener("slotchange",r),o.disconnect(),i.removeEventListener(Fg.REGISTER_MEDIA_STATE_RECEIVER,s),i.removeEventListener(Fg.UNREGISTER_MEDIA_STATE_RECEIVER,n)}};Sy.customElements.get("media-controller")||Sy.customElements.define("media-controller",v_);var A_=v_,I_="placement",R_="bounds";var O_=function(e){T(n,e);var t=P(n);function n(){var e;if(A(this,n),(e=t.call(this)).updateXOffset=function(){var t;if(Vy(_(e),{checkOpacity:!1,checkVisibilityCSS:!1})){var n=e.placement;if("left"!==n&&"right"!==n){var s=getComputedStyle(_(e)),r=null!=(t=Fy(_(e),"#"+e.bounds))?t:Cy(_(e));if(r){var o=r.getBoundingClientRect(),c=o.x,a=o.width,l=e.getBoundingClientRect(),d=l.x,h=d+l.width,u=c+a,f=s.getPropertyValue("--media-tooltip-offset-x"),v=f?parseFloat(f.replace("px","")):0,m=s.getPropertyValue("--media-tooltip-container-margin"),y=m?parseFloat(m.replace("px","")):0,p=d-c+v-y,g=h-u+v+y;p<0?e.style.setProperty("--media-tooltip-offset-x","".concat(p,"px")):g>0?e.style.setProperty("--media-tooltip-offset-x","".concat(g,"px")):e.style.removeProperty("--media-tooltip-offset-x")}}else e.style.removeProperty("--media-tooltip-offset-x")}},!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var r=xy(e.attributes);e.shadowRoot.innerHTML=e.constructor.getTemplateHTML(r)}if(e.arrowEl=e.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(_(e),"placement")){var o=e.placement;delete e.placement,e.placement=o}return w(e)}return I(n,[{key:"placement",get:function(){return $y(this,I_)},set:function(e){Qy(this,I_,e)}},{key:"bounds",get:function(){return $y(this,R_)},set:function(e){Qy(this,R_,e)}}],[{key:"observedAttributes",get:function(){return[I_,R_]}}]),n}(Sy.HTMLElement);O_.shadowRootOptions={mode:"open"},O_.getTemplateHTML=function(i){return'\n    <style>\n      :host {\n        --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));\n        --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));\n        --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);\n        --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);\n        --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));\n        position: relative;\n        pointer-events: none;\n        display: var(--media-tooltip-display, inline-flex);\n        justify-content: center;\n        align-items: center;\n        box-sizing: border-box;\n        z-index: var(--media-tooltip-z-index, 1);\n        background: var(--_tooltip-background);\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        font: var(--media-font,\n          var(--media-font-weight, 400)\n          var(--media-font-size, 13px) /\n          var(--media-text-content-height, var(--media-control-height, 18px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        padding: var(--media-tooltip-padding, .35em .7em);\n        border: var(--media-tooltip-border, none);\n        border-radius: var(--media-tooltip-border-radius, 5px);\n        filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));\n        white-space: var(--media-tooltip-white-space, nowrap);\n      }\n\n      :host([hidden]) {\n        display: none;\n      }\n\n      img, svg {\n        display: inline-block;\n      }\n\n      #arrow {\n        position: absolute;\n        width: 0px;\n        height: 0px;\n        border-style: solid;\n        display: var(--media-tooltip-arrow-display, block);\n      }\n\n      :host(:not([placement])),\n      :host([placement="top"]) {\n        position: absolute;\n        bottom: calc(100% + var(--media-tooltip-distance, 12px));\n        left: 50%;\n        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
2);\n      }\n      :host(:not([placement])) #arrow,\n      :host([placement="top"]) #arrow {\n        top: 100%;\n        left: 50%;\n        border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);\n        border-color: var(--_tooltip-arrow-background) transparent transparent transparent;\n        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);\n      }\n\n      :host([placement="right"]) {\n        position: absolute;\n        left: calc(100% + var(--media-tooltip-distance, 12px));\n        top: 50%;\n        transform: translate(0, -50%);\n      }\n      :host([placement="right"]) #arrow {\n        top: 50%;\n        right: 100%;\n        border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;\n        border-color: transparent var(--_tooltip-arrow-background) transparent transparent;\n        transform: translate(0, -50%);\n      }\n\n      :host([placement="bottom"]) {\n        position: absolute;\n        top: calc(100% + var(--media-tooltip-distance, 12px));\n        left: 50%;\n        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);\n      }\n      :host([placement="bottom"]) #arrow {\n        bottom: 100%;\n        left: 50%;\n        border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);\n        border-color: transparent transparent var(--_tooltip-arrow-background) transparent;\n        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);\n      }\n\n      :host([placement="left"]) {\n        position: absolute;\n        right: calc(100% + var(--media-tooltip-distance, 12px));\n        top: 50%;\n        transform: translate(0, -50%);\n      }\n      :host([placement="left"]) #arrow {\n        top: 50%;\n        left: 100%;\n        border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);\n        border-color: transparent transparent transparent var(--_tooltip-arrow-background);\n        transform: translate(0, -50%);\n      }\n      \n      :host([placement="none"]) #arrow {\n        display: none;\n      }\n    </style>\n    <slot></slot>\n    <div id="arrow"></div>\n  '},Sy.customElements.get("media-tooltip")||Sy.customElements.define("media-tooltip",O_);var L_,D_,x_,C_,M_,P_,N_,U_=O_,F_=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},B_=function(i,e,t){return F_(i,e,"read from private field"),t?t.call(i):e.get(i)},j_=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},V_=function(i,e,t,s){return F_(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},H_="tooltipplacement",W_="disabled",q_="notooltip";var G_=function(e){T(n,e);var t=P(n);function n(){var e;if(A(this,n),e=t.call(this),j_(_(e),P_),j_(_(e),L_,void 0),e.preventClick=!1,e.tooltipEl=null,j_(_(e),D_,(function(t){e.preventClick||e.handleClick(t),setTimeout(B_(_(e),x_),0)})),j_(_(e),x_,(function(){var t,n;null==(n=null==(t=e.tooltipEl)?void 0:t.updateXOffset)||n.call(t)})),j_(_(e),C_,(function(t){var n=t.key;e.keysUsed.includes(n)?e.preventClick||e.handleClick(t):e.removeEventListener("keyup",B_(_(e),C_))})),j_(_(e),M_,(function(t){var n=t.metaKey,s=t.altKey,r=t.key;n||s||!e.keysUsed.includes(r)?e.removeEventListener("keyup",B_(_(e),C_)):e.addEventListener("keyup",B_(_(e),C_),{once:!0})})),!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var r=xy(e.attributes),o=e.constructor.getTemplateHTML(r);e.shadowRoot.setHTMLUnsafe?e.shadowRoot.setHTMLUnsafe(o):e.shadowRoot.innerHTML=o}return e.tooltipEl=e.shadowRoot.querySelector("media-tooltip"),w(e)}return I(n,[{key:"enable",value:function(){this.addEventListener("click",B_(this,D_)),this.addEventListener("keydown",B_(this,M_)),this.tabIndex=0}},{key:"disable",value:function(){this.removeEventListener("click",B_(this,D_)),this.removeEventListener("keydown",B_(this,M_)),this.removeEventListener("keyup",B_(this,C_)),this.tabIndex=-1}},{key:"attributeChangedCallback",value:function(e,t,s){var n,r,a,o,c;e===jg?(t&&(null==(r=null==(n=B_(this,L_))?void 0:n.unassociateElement)||r.call(n,this),V_(this,L_,null)),s&&this.isConnected&&(V_(this,L_,null==(a=this.getRootNode())?void 0:a.getElementById(s)),null==(c=null==(o=B_(this,L_))?void 0:o.associateElement)||c.call(o,this))):"disabled"===e&&s!==t?null==s?this.enable():this.disable():e===H_&&this.tooltipEl&&s!==t?this.tooltipEl.placement=s:e===Wg.MEDIA_LA
2NG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),B_(this,x_).call(this)}},{key:"connectedCallback",value:function(){var e,t,s,n=this;Hy(this.shadowRoot,":host").style.setProperty("display","var(--media-control-display, var(--".concat(this.localName,"-display, inline-flex))")),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");var r=this.getAttribute(jg);r&&(V_(this,L_,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(s=null==(t=B_(this,L_))?void 0:t.associateElement)||s.call(t,this)),Sy.customElements.whenDefined("media-tooltip").then((function(){return function(i,e,t){return F_(i,e,"access private method"),t}(n,P_,N_).call(n)}))}},{key:"disconnectedCallback",value:function(){var e,t;this.disable(),null==(t=null==(e=B_(this,L_))?void 0:e.unassociateElement)||t.call(e,this),V_(this,L_,null),this.removeEventListener("mouseenter",B_(this,x_)),this.removeEventListener("focus",B_(this,x_)),this.removeEventListener("click",B_(this,D_))}},{key:"keysUsed",get:function(){return["Enter"," "]}},{key:"tooltipPlacement",get:function(){return $y(this,H_)},set:function(e){Qy(this,H_,e)}},{key:"mediaController",get:function(){return $y(this,jg)},set:function(e){Qy(this,jg,e)}},{key:"disabled",get:function(){return Ky(this,W_)},set:function(e){Yy(this,W_,e)}},{key:"noTooltip",get:function(){return Ky(this,q_)},set:function(e){Yy(this,q_,e)}},{key:"handleClick",value:function(e){}}],[{key:"observedAttributes",get:function(){return["disabled",H_,jg,Wg.MEDIA_LANG]}}]),n}(Sy.HTMLElement);L_=new WeakMap,D_=new WeakMap,x_=new WeakMap,C_=new WeakMap,M_=new WeakMap,P_=new WeakSet,N_=function(){this.addEventListener("mouseenter",B_(this,x_)),this.addEventListener("focus",B_(this,x_)),this.addEventListener("click",B_(this,D_));var i=this.tooltipPlacement;i&&this.tooltipEl&&(this.tooltipEl.placement=i)},G_.shadowRootOptions={mode:"open"},G_.getTemplateHTML=function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return'\n    <style>\n      :host {\n        position: relative;\n        font: var(--media-font,\n          var(--media-font-weight, bold)\n          var(--media-font-size, 14px) /\n          var(--media-text-content-height, var(--media-control-height, 24px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n        padding: var(--media-button-padding, var(--media-control-padding, 10px));\n        justify-content: var(--media-button-justify-content, center);\n        display: inline-flex;\n        align-items: center;\n        vertical-align: middle;\n        box-sizing: border-box;\n        transition: background .15s linear;\n        pointer-events: auto;\n        cursor: var(--media-cursor, pointer);\n        -webkit-tap-highlight-color: transparent;\n      }\n\n      \n      :host(:focus-visible) {\n        box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n        outline: 0;\n      }\n      \n      :host(:where(:focus)) {\n        box-shadow: none;\n        outline: 0;\n      }\n\n      :host(:hover) {\n        background: var(--media-control-hover-background, rgba(50 50 70 / .7));\n      }\n\n      svg, img, ::slotted(svg), ::slotted(img) {\n        width: var(--media-button-icon-width);\n        height: var(--media-button-icon-height, var(--media-control-height, 24px));\n        transform: var(--media-button-icon-transform);\n        transition: var(--media-button-icon-transition);\n        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n        vertical-align: middle;\n        max-width: 100%;\n        max-height: 100%;\n        min-width: 100%;\n      }\n\n      media-tooltip {\n        \n        max-width: 0;\n        overflow-x: clip;\n        opacity: 0;\n        transition: opacity .3s, max-width 0s 9s;\n      }\n\n      :host(:hover) media-tooltip,\n      :host(:focus-visible) media-tooltip {\n        max-width: 100vw;\n        opacity: 1;\n        transition: opacity .3s;\n      }\n\n      :host([notooltip]) slot[name="tooltip"] {\n        display: none;\n      }\n    </style>\n\n    '.concat(this.getSlotTemplateHTML(i,e),'\n\n    <slot name="tooltip">\n      <media-tooltip part="tooltip" aria-hidden="true">\n        <template shadowrootmode="').concat(U_.shadowRootOptions.mode,'">\n          ').concat(U_.getTemplateHTML({}),'\n        </template>\n        <slot name="tooltip-content">\n          ').concat(this.getTooltipContentHTML(i),"\n        </slot>\n      </media-tooltip>\n    </slot>\n  ")},G_.getSlotTemplateHTML=function(i,e){return"\n    <slot></slot>\n  "},G_.getTooltipContentHTML=function(){return""},Sy.customElements.get("media-chrome-button")||Sy.customElements.define("media-chrome-button",G_);var K_='<svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>\n</svg>\n';var Y_=function(i){var e=i.mediaIsAirplaying?py("stop airplay"):py("start airplay");
2i.setAttribute("aria-label",e)},$_=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),Y_(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_IS_AIRPLAYING&&Y_(this)}},{key:"mediaIsAirplaying",get:function(){return Ky(this,Wg.MEDIA_IS_AIRPLAYING)},set:function(e){Yy(this,Wg.MEDIA_IS_AIRPLAYING,e)}},{key:"mediaAirplayUnavailable",get:function(){return $y(this,Wg.MEDIA_AIRPLAY_UNAVAILABLE)},set:function(e){Qy(this,Wg.MEDIA_AIRPLAY_UNAVAILABLE,e)}},{key:"handleClick",value:function(){var e=new Sy.CustomEvent(Fg.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_IS_AIRPLAYING,Wg.MEDIA_AIRPLAY_UNAVAILABLE])}}]),n}(G_);$_.getSlotTemplateHTML=function(i){return"\n    <style>\n      :host([".concat(Wg.MEDIA_IS_AIRPLAYING,"]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      \n      :host(:not([").concat(Wg.MEDIA_IS_AIRPLAYING,"])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([").concat(Wg.MEDIA_IS_AIRPLAYING,"]) slot[name=tooltip-enter],\n      :host(:not([").concat(Wg.MEDIA_IS_AIRPLAYING,'])) slot[name=tooltip-exit] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="enter">').concat(K_,'</slot>\n      <slot name="exit">').concat(K_,"</slot>\n    </slot>\n  ")},$_.getTooltipContentHTML=function(){return'\n    <slot name="tooltip-enter">'.concat(py("start airplay"),'</slot>\n    <slot name="tooltip-exit">').concat(py("stop airplay"),"</slot>\n  ")},Sy.customElements.get("media-airplay-button")||Sy.customElements.define("media-airplay-button",$_);var Q_=function(i){i.setAttribute("aria-checked",pE(i).toString())},z_=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.setAttribute("role","button"),this.setAttribute("aria-label",py("closed captions")),Q_(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_SUBTITLES_SHOWING&&Q_(this)}},{key:"mediaSubtitlesList",get:function(){return X_(this,Wg.MEDIA_SUBTITLES_LIST)},set:function(e){J_(this,Wg.MEDIA_SUBTITLES_LIST,e)}},{key:"mediaSubtitlesShowing",get:function(){return X_(this,Wg.MEDIA_SUBTITLES_SHOWING)},set:function(e){J_(this,Wg.MEDIA_SUBTITLES_SHOWING,e)}},{key:"handleClick",value:function(){this.dispatchEvent(new Sy.CustomEvent(Fg.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_SUBTITLES_LIST,Wg.MEDIA_SUBTITLES_SHOWING])}}]),n}(G_);z_.getSlotTemplateHTML=function(i){return'\n    <style>\n      :host([aria-checked="true"]) slot[name=off] {\n        display: none !important;\n      }\n\n      \n      :host(:not([aria-checked="true"])) slot[name=on] {\n        display: none !important;\n      }\n\n      :host([aria-checked="true"]) slot[name=tooltip-enable],\n      :host(:not([aria-checked="true"])) slot[name=tooltip-disable] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="on">'.concat('<svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 
20 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>\n</svg>','</slot>\n      <slot name="off">').concat('<svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>\n</svg>',"</slot>\n    </slot>\n  ")},z_.getTooltipContentHTML=function(){return'\n    <slot name="tooltip-enable">'.concat(py("Enable captions"),'</slot>\n    <slot name="tooltip-disable">').concat(py("Disable captions"),"</slot>\n  ")};var X_=function(i,e){var t=i.getAttribute(e);return t?sE(t):[]},J_=function(i,e,t){if(null!=t&&t.length){var s=lE(t);i.getAttribute(e)!==s&&i.setAttribute(e,s)}else i.removeAttribute(e)};Sy.customElements.get("media-captions-button")||Sy.customElements.define("media-captions-button",z_);var Z_=function(i){var e=i.mediaIsCasting?py("stop casting"):py("start casting");i.setAttribute("aria-label",e)},ek=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),Z_(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_IS_CASTING&&Z_(this)}},{key:"mediaIsCasting",get:function(){return Ky(this,Wg.MEDIA_IS_CASTING)},set:function(e){Yy(this,Wg.MEDIA_IS_CASTING,e)}},{key:"mediaCastUnavailable",get:function(){return $y(this,Wg.MEDIA_CAST_UNAVAILABLE)},set:function(e){Qy(this,Wg.MEDIA_CAST_UNAVAILABLE,e)}},{key:"handleClick",value:function(){var e=this.mediaIsCasting?Fg.MEDIA_EXIT_CAST_REQUEST:Fg.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new Sy.CustomEvent(e,{composed:!0,bubbles:!0}))}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_IS_CASTING,Wg.MEDIA_CAST_UNAVAILABLE])}}]),n}(G_);ek.getSlotTemplateHTML=function(i){return"\n    <style>\n      :host([".concat(Wg.MEDIA_IS_CASTING,"]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      \n      :host(:not([").concat(Wg.MEDIA_IS_CASTING,"])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([").concat(Wg.MEDIA_IS_CASTING,"]) slot[name=tooltip-enter],\n      :host(:not([").concat(Wg.MEDIA_IS_CASTING,'])) slot[name=tooltip-exit] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="enter">').concat('<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg>','</slot>\n      <slot name="exit">').concat('<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>',"</slot>\n    </slot>\n  ")},ek.getTooltipContentHTML=function(){return'\n    <slot name="tooltip-enter">'.concat(py("Start casting"),'</slot>\n    <slot name="tooltip-exit">').concat(py("Stop casting"),"</slot>\n  ")},Sy.customElements.get("media-cast-button")||Sy.customElements.define("media-cast-button",ek);var tk,nk,rk,ik,ak,ok,sk,uk,ck,lk,dk,hk,fk,pk,vk,mk=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},gk=function(i,e,t){return mk(i,e,"read from private field"),t?t.call(i):e.get(i)},yk=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},bk=function(i,e,t,s){return mk(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},Ek=function(i,e,t){return mk(i,e,"access private method"),t};var _k="open",kk="anchor",Tk=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.call(this),yk(_(e),ik),yk(_(e),ok),yk(_(e),uk),yk(_(e),lk),yk(_(e),hk),yk(_(e),pk),yk(_(e),tk,!1),yk(_(e),nk,null),yk(_(e),rk,null),e}return I(n,[{key:"open",get:function(){return Ky(this,_k)},set:function(e){Yy(this,_k,e)}},{key:"handleEvent",value:function(e){switch(e.type){case"invoke":Ek(this,lk,dk).call(this,e);break;case"focusout":Ek(this,hk,fk).call(this,e);break;case"keydown":Ek(this,pk,vk).call(this,e)}}},{key:"connectedCallback",value:function(){Ek(this,ik,ak).call(this),this.role||(this.role="dialog"),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}},{key:"disconnectedCallback",value:function(){this.removeEventListener("invoke",this),this.removeEventListener("focusout",this),this.removeEventListener("keydown",this)}},{key:"attributeChangedCallback",value:function(e,t,s){Ek(this,ik,ak).call(this),e===_k&&s!==t&&(this.open?Ek(this,ok,sk).call(this):Ek(this,uk,ck).call(this))}},{key:"focus",value:function(){bk(this,nk,By());var e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),t=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(!e&&!t){var s=this.querySelector('[autofocus], [tabindex]:not
2([tabindex="-1"]), [role="menu"]');null==s||s.focus()}}},{key:"keysUsed",get:function(){return["Escape","Tab"]}}],[{key:"observedAttributes",get:function(){return[_k,kk]}}]),n}(Sy.HTMLElement);tk=new WeakMap,nk=new WeakMap,rk=new WeakMap,ik=new WeakSet,ak=function(){var e=this;if(!gk(this,tk)&&(bk(this,tk,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);var t=xy(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t),queueMicrotask((function(){Hy(e.shadowRoot,":host").style.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")}))}},ok=new WeakSet,sk=function(){var i,e=this;null==(i=gk(this,rk))||i.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",(function(){return e.focus()}),{once:!0})},uk=new WeakSet,ck=function(){var i;null==(i=gk(this,rk))||i.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},lk=new WeakSet,dk=function(i){bk(this,rk,i.relatedTarget),Uy(this,i.relatedTarget)||(this.open=!this.open)},hk=new WeakSet,fk=function(i){var e;Uy(this,i.relatedTarget)||(null==(e=gk(this,nk))||e.focus(),gk(this,rk)&&gk(this,rk)!==i.relatedTarget&&this.open&&(this.open=!1))},pk=new WeakSet,vk=function(i){var e,t,s,n,r,a=i.key,o=i.ctrlKey,c=i.altKey,l=i.metaKey;o||c||l||this.keysUsed.includes(a)&&(i.preventDefault(),i.stopPropagation(),"Tab"===a?(i.shiftKey?null==(t=null==(e=this.previousElementSibling)?void 0:e.focus)||t.call(e):null==(n=null==(s=this.nextElementSibling)?void 0:s.focus)||n.call(s),this.blur()):"Escape"===a&&(null==(r=gk(this,nk))||r.focus(),this.open=!1))},Tk.shadowRootOptions={mode:"open"},Tk.getTemplateHTML=function(i){return"\n    <style>\n      :host {\n        font: var(--media-font,\n          var(--media-font-weight, normal)\n          var(--media-font-size, 14px) /\n          var(--media-text-content-height, var(--media-control-height, 24px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        display: var(--media-dialog-display, inline-flex);\n        justify-content: center;\n        align-items: center;\n        \n        transition-behavior: allow-discrete;\n        visibility: hidden;\n        opacity: 0;\n        transform: translateY(2px) scale(.99);\n        pointer-events: none;\n      }\n\n      :host([open]) {\n        transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;\n        visibility: visible;\n        opacity: 1;\n        transform: translateY(0) scale(1);\n        pointer-events: auto;\n      }\n\n      #content {\n        display: flex;\n        position: relative;\n        box-sizing: border-box;\n        width: min(320px, 100%);\n        word-wrap: break-word;\n        max-height: 100%;\n        overflow: auto;\n        text-align: center;\n        line-height: 1.4;\n      }\n    </style>\n    ".concat(this.getSlotTemplateHTML(i),"\n  ")},Tk.getSlotTemplateHTML=function(i){return'\n    <slot id="content"></slot>\n  '},Sy.customElements.get("media-chrome-dialog")||Sy.customElements.define("media-chrome-dialog",Tk);var wk,Sk,Ak,Ik,Rk,Ok,th,Lk,Dk,xk,Ck,Mk,Pk,Nk,Uk,Fk,Bk,jk,Vk,Hk,Wk,qk,Gk,Kk,Yk,$k=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},Qk=function(i,e,t){return $k(i,e,"read from private field"),t?t.call(i):e.get(i)},zk=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Xk=function(i,e,t,s){return $k(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},Jk=function(i,e,t){return $k(i,e,"access private method"),t};var Zk=function(e){T(n,e);var t=P(n);function n(){var e;if(A(this,n),e=t.call(this),zk(_(e),xk),zk(_(e),Mk),zk(_(e),Nk),zk(_(e),Fk),zk(_(e),jk),zk(_(e),Hk),zk(_(e),qk),zk(_(e),Kk),zk(_(e),wk,void 0),zk(_(e),Sk,void 0),zk(_(e),Ak,void 0),zk(_(e),Ik,void 0),zk(_(e),Rk,{}),zk(_(e),Ok,[]),zk(_(e),th,(function(){e.range.matches(":focus-visible")&&Hy(e.shadowRoot,":host").style.setProperty("--_focus-visible-box-shadow","var(--_focus-box-sha
2dow)")})),zk(_(e),Lk,(function(){Hy(e.shadowRoot,":host").style.removeProperty("--_focus-visible-box-shadow")})),zk(_(e),Dk,(function(){var t=e.shadowRoot.querySelector("#segments-clipping");t&&t.parentNode.append(t)})),!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var r=xy(e.attributes),o=e.constructor.getTemplateHTML(r);e.shadowRoot.setHTMLUnsafe?e.shadowRoot.setHTMLUnsafe(o):e.shadowRoot.innerHTML=o}return e.container=e.shadowRoot.querySelector("#container"),Xk(_(e),Ak,e.shadowRoot.querySelector("#startpoint")),Xk(_(e),Ik,e.shadowRoot.querySelector("#endpoint")),e.range=e.shadowRoot.querySelector("#range"),e.appearance=e.shadowRoot.querySelector("#appearance"),w(e)}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){var n,r,a,o,c;e===jg?(t&&(null==(r=null==(n=Qk(this,wk))?void 0:n.unassociateElement)||r.call(n,this),Xk(this,wk,null)),s&&this.isConnected&&(Xk(this,wk,null==(a=this.getRootNode())?void 0:a.getElementById(s)),null==(c=null==(o=Qk(this,wk))?void 0:o.associateElement)||c.call(o,this))):("disabled"===e||"aria-disabled"===e&&t!==s)&&(null==s?(this.range.removeAttribute(e),Jk(this,Mk,Pk).call(this)):(this.range.setAttribute(e,s),Jk(this,Nk,Uk).call(this)))}},{key:"connectedCallback",value:function(){var e,t,s;Hy(this.shadowRoot,":host").style.setProperty("display","var(--media-control-display, var(--".concat(this.localName,"-display, inline-flex))")),Qk(this,Rk).pointer=Hy(this.shadowRoot,"#pointer"),Qk(this,Rk).progress=Hy(this.shadowRoot,"#progress"),Qk(this,Rk).thumb=Hy(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),Qk(this,Rk).activeSegment=Hy(this.shadowRoot,"#segments-clipping rect:nth-child(0)");var n=this.getAttribute(jg);n&&(Xk(this,wk,null==(e=this.getRootNode())?void 0:e.getElementById(n)),null==(s=null==(t=Qk(this,wk))?void 0:t.associateElement)||s.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",Qk(this,th)),this.shadowRoot.addEventListener("focusout",Qk(this,Lk)),Jk(this,Mk,Pk).call(this),Ly(this.container,Qk(this,Dk))}},{key:"disconnectedCallback",value:function(){var e,t;Jk(this,Nk,Uk).call(this),null==(t=null==(e=Qk(this,wk))?void 0:e.unassociateElement)||t.call(e,this),Xk(this,wk,null),this.shadowRoot.removeEventListener("focusin",Qk(this,th)),this.shadowRoot.removeEventListener("focusout",Qk(this,Lk)),Dy(this.container,Qk(this,Dk))}},{key:"updatePointerBar",value:function(e){var t;null==(t=Qk(this,Rk).pointer)||t.style.setProperty("width","".concat(100*this.getPointerRatio(e),"%"))}},{key:"updateBar",value:function(){var e,t,s=100*this.range.valueAsNumber;null==(e=Qk(this,Rk).progress)||e.style.setProperty("width","".concat(s,"%")),null==(t=Qk(this,Rk).thumb)||t.style.setProperty("left","".concat(s,"%"))}},{key:"updateSegments",value:function(e){var t=this.shadowRoot.querySelector("#segments-clipping");if(t.textContent="",this.container.classList.toggle("segments",!(null==e||!e.length)),null!=e&&e.length){var s=v(new Set([+this.range.min].concat(v(e.flatMap((function(e){return[e.start,e.end]}))),[+this.range.max])));Xk(this,Ok,v(s));var n,r=s.pop(),o=C(s.entries());try{for(o.s();!(n=o.n()).done;){var c=m(n.value,2),l=c[0],a=c[1],d=0===l,h=l===s.length-1,f=d?"calc(var(--segments-gap) / -1)":"".concat(100*a,"%"),y="calc(".concat(100*((h?r:s[l+1])-a),"%").concat(d||h?"":" - var(--segments-gap)",")"),E=Ay.createElementNS("http://www.w3.org/2000/svg","rect"),_=Wy(this.shadowRoot,"#segments-clipping rect:nth-child(".concat(l+1,")"));_.style.setProperty("x",f),_.style.setProperty("width",y),t.append(E)}}catch(e){o.e(e)}finally{o.f()}}}},{key:"getPointerRatio",value:function(e){return function(i,e,t,s){var n=s.x-t.x,r=s.y-t.y,a=n*n+r*r;if(0===a)return 0;var o=((i-t.x)*n+(e-t.y)*r)/a;return Math.max(0,Math.min(1,o))}(e.clientX,e.clientY,Qk(this,Ak).getBoundingClientRect(),Qk(this,Ik).getBoundingClientRect())}},{key:"dragging",get:function(){return this.hasAttribute("dragging")}},{key:"handleEvent",value:function(e){switch(e.type){case"pointermove":Jk(this,Kk,Yk).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":Jk(this,jk,Vk).call(this,e);break;case"pointerdown":Jk(this,Fk,Bk).call(this,e);break;case"pointerup":Jk(this,Hk,Wk).call(this);break;case"pointerleave":Jk(this,qk,Gk).call(this)}}},{key:"keysUsed",get:function(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}],[{key:"observedAttributes",get:function(){return["disabled","aria-disabled",jg]}}]),n}(Sy.HTMLElement);wk=new WeakMap,Sk=new WeakMap,Ak=new WeakMap,Ik=new WeakMap,Rk=new WeakMap,Ok=new WeakMap,th=new WeakMap,Lk=new WeakMap,Dk=new WeakMap,xk=new WeakSet,Ck=function(i){var e=Qk(this,Rk).activeSegment;
2if(e){var t=this.getPointerRatio(i),n="#segments-clipping rect:nth-child(".concat(Qk(this,Ok).findIndex((function(e,a,n){var r=n[a+1];return null!=r&&t>=e&&t<=r}))+1,")");(e.selectorText!=n||!e.style.transform)&&(e.selectorText=n,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))}},Mk=new WeakSet,Pk=function(){this.hasAttribute("disabled")||!this.isConnected||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},Nk=new WeakSet,Uk=function(){var i,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),this.removeEventListener("pointerleave",this),null==(i=Sy.window)||i.removeEventListener("pointerup",this),null==(e=Sy.window)||e.removeEventListener("pointermove",this)},Fk=new WeakSet,Bk=function(i){var e;Xk(this,Sk,i.composedPath().includes(this.range)),null==(e=Sy.window)||e.addEventListener("pointerup",this,{once:!0})},jk=new WeakSet,Vk=function(i){var e;"mouse"!==i.pointerType&&Jk(this,Fk,Bk).call(this,i),this.addEventListener("pointerleave",this,{once:!0}),null==(e=Sy.window)||e.addEventListener("pointermove",this)},Hk=new WeakSet,Wk=function(){var i;null==(i=Sy.window)||i.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},qk=new WeakSet,Gk=function(){var i,e;this.removeEventListener("pointerleave",this),null==(i=Sy.window)||i.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(e=Qk(this,Rk).activeSegment)||e.style.removeProperty("transform")},Kk=new WeakSet,Yk=function(i){"pen"===i.pointerType&&0===i.buttons||(this.toggleAttribute("dragging",1===i.buttons||"mouse"!==i.pointerType),this.updatePointerBar(i),Jk(this,xk,Ck).call(this,i),this.dragging&&("mouse"!==i.pointerType||!Qk(this,Sk))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(i),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))},Zk.shadowRootOptions={mode:"open"},Zk.getTemplateHTML=function(i){return'\n    <style>\n      :host {\n        --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n        --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px));\n\n        box-shadow: var(--_focus-visible-box-shadow, none);\n        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n        height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding));\n        display: inline-flex;\n        align-items: center;\n        \n        vertical-align: middle;\n        box-sizing: border-box;\n        position: relative;\n        width: 100px;\n        transition: background .15s linear;\n        cursor: var(--media-cursor, pointer);\n        pointer-events: auto;\n        touch-action: none; \n      }\n\n      \n      input[type=range]:focus {\n        outline: 0;\n      }\n      input[type=range]:focus::-webkit-slider-runnable-track {\n        outline: 0;\n      }\n\n      :host(:hover) {\n        background: var(--media-control-hover-background, rgb(50 50 70 / .7));\n      }\n\n      #leftgap {\n        padding-left: var(--media-range-padding-left, var(--_media-range-padding));\n      }\n\n      #rightgap {\n        padding-right: var(--media-range-padding-right, var(--_media-range-padding));\n      }\n\n      #startpoint,\n      #endpoint {\n        position: absolute;\n      }\n\n      #endpoint {\n        right: 0;\n      }\n\n      #container {\n        \n        width: var(--media-range-track-width, 100%);\n        transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));\n        position: relative;\n        height: 100%;\n        display: flex;\n        align-items: center;\n        min-width: 40px;\n      }\n\n      #range {\n        \n        display: var(--media-time-range-hover-display, block);\n        bottom: var(--media-time-range-hover-bottom, -7px);\n        height: var(--media-time-range-hover-height, max(100% + 7px, 25px));\n        width: 100%;\n        position: absolute;\n        cursor: var(--media-cursor, pointer);\n\n        -webkit-appearance: none; \n        -webkit-tap-highlight-color: transparent;\n        background: transparent; \n        margin: 0;\n        z-index: 1;\n      }\n\n      @media (hover: hover) {\n        #range {\n          bottom: var(--media-time-range-hover-bottom, -5px);\n          height: var(--media-time-range-hover-height, max(100% + 5px, 20px));\n        }\n      }\n\n      \n      \n      #range::-webkit-slider-thumb {\n        -webkit-appearance: none;\n        background: transparent;\n        width: .1px;\n        height: .1px;\n      }\n\n      \n      #range::-moz-range-thumb {\n        background: transparent;\n        border: transparent;\n        width: .1px;\n        height: .1px;\n      }\n\n      #appearance {\n        height: var(--media-range-track-height, 4px);\n        display: flex;\n        flex-direction: column;\n        justify-content: center;\n        width: 100%;\n        position: absolute;\n        \n        will-change: transform;\n      }\n\n      #track {\n        background: var(--media-range-track-background, rgb(255 255 255 / .2));\n        border-radius: var(--media-range-track-border-radius, 1px);\n        border: var(--media-range-track-border, none);\n        outline: var(--media-range-track-outline);\n        outline-offset: var(--media-range-track-outline-offset);\n        backdrop-filter: var(--media-range-track-backdrop-filter);\n        -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
2\n        box-shadow: var(--media-range-track-box-shadow, none);\n        position: absolute;\n        width: 100%;\n        height: 100%;\n        overflow: hidden;\n      }\n\n      #progress,\n      #pointer {\n        position: absolute;\n        height: 100%;\n        will-change: width;\n      }\n\n      #progress {\n        background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)));\n        transition: var(--media-range-track-transition);\n      }\n\n      #pointer {\n        background: var(--media-range-track-pointer-background);\n        border-right: var(--media-range-track-pointer-border-right);\n        transition: visibility .25s, opacity .25s;\n        visibility: hidden;\n        opacity: 0;\n      }\n\n      @media (hover: hover) {\n        :host(:hover) #pointer {\n          transition: visibility .5s, opacity .5s;\n          visibility: visible;\n          opacity: 1;\n        }\n      }\n\n      #thumb,\n      ::slotted([slot=thumb]) {\n        width: var(--media-range-thumb-width, 10
2px);\n        height: var(--media-range-thumb-height, 10px);\n        transition: var(--media-range-thumb-transition);\n        transform: var(--media-range-thumb-transform, none);\n        opacity: var(--media-range-thumb-opacity, 1);\n        translate: -50%;\n        position: absolute;\n        left: 0;\n        cursor: var(--media-cursor, pointer);\n      }\n\n      #thumb {\n        border-radius: var(--media-range-thumb-border-radius, 10px);\n        background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238)));\n        box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);\n        border: var(--media-range-thumb-border, none);\n      }\n\n      :host([disabled]) #thumb {\n        background-color: #777;\n      }\n\n      .segments #appearance {\n        height: var(--media-range-segment-hover-height, 7px);\n      }\n\n      #track {\n        clip-path: url(#segments-clipping);\n      }\n\n      #segments {\n        --segments-gap: var(--media-range-segments-gap, 2px);\n        position: absolute;\n        width: 100%;\n        height: 100%;\n      }\n\n      #segments-clipping {\n        transform: translateX(calc(var(--segments-gap) / 2));\n      }\n\n      #segments-clipping:empty {\n        display: none;\n      }\n\n      #segments-clipping rect {\n        height: var(--media-range-track-height, 4px);\n        y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2);\n        transition: var(--media-range-segment-transition, transform .1s ease-in-out);\n        transform: var(--media-range-segment-transform, scaleY(1));\n        transform-origin: center;\n      }\n\n      /* Visible label for accessibility - positioned off-screen but technically visible (Firefox requires visible labels) */\n      #range-label {\n        position: absolute;\n        left: -10000px;\n        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n        pointer-events: none;\n      }\n    </style>\n    <div id="leftgap"></div>\n    <div id="container">\n      <div id="startpoint"></div>\n      <div id="endpoint"></div>\n      <div id="appearance">\n        <div id="track" part="track">\n          <div id="pointer"></div>\n          <div id="progress" part="progress"></div>\n        </div>\n        <slot name="thumb">\n          <div id="thumb" part="thumb"></div>\n        </slot>\n        <svg id="segments" aria-hidden="true"><clipPath id="segments-clipping"></clipPath></svg>\n      </div>
2\n        <input id="range" type="range" min="0" max="1" step="any" value="0">\n        <label for="range" id="range-label"></label>\n\n      '.concat(this.getContainerTemplateHTML(i),'\n    </div>\n    <div id="rightgap"></div>\n  ')},Zk.getContainerTemplateHTML=function(i){return""},Sy.customElements.get("media-chrome-range")||Sy.customElements.define("media-chrome-range",Zk);var eT,tT=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},nT=function(i,e,t){return tT(i,e,"read from private field"),t?t.call(i):e.get(i)},rT=function(i,e,t,s){return tT(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t};var iT=function(e){T(n,e);var t=P(n);function n(){var e;if(A(this,n),e=t.call(this),function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)}(_(e),eT,void 0),!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var r=xy(e.attributes);e.shadowRoot.innerHTML=e.constructor.getTemplateHTML(r)}return w(e)}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){var n,r,a,o,c;e===jg&&(t&&(null==(r=null==(n=nT(this,eT))?void 0:n.unassociateElement)||r.call(n,this),rT(this,eT,null)),s&&this.isConnected&&(rT(this,eT,null==(a=this.getRootNode())?void 0:a.getElementById(s)),null==(c=null==(o=nT(this,eT))?void 0:o.associateElement)||c.call(o,this)))}},{key:"connectedCallback",value:function(){var e,t,s,n=this.getAttribute(jg);n&&(rT(this,eT,null==(e=this.getRootNode())?void 0:e.getElementById(n)),null==(s=null==(t=nT(this,eT))?void 0:t.associateElement)||s.call(t,this))}},{key:"disconnectedCallback",value:function(){var e,t;null==(t=null==(e=nT(this,eT))?void 0:e.unassociateElement)||t.call(e,this),rT(this,eT,null)}}],[{key:"observedAttributes",get:function(){return[jg]}}]),n}(Sy.HTMLElement);eT=new WeakMap,iT.shadowRootOptions={mode:"open"},iT.getTemplateHTML=function(i){return'\n    <style>\n      :host {\n        \n        box-sizing: border-box;\n        display: var(--media-control-display, var(--media-control-bar-display, inline-flex));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        --media-loading-indicator-icon-height: 44px;\n      }\n\n      ::slotted(media-time-range),\n      ::slotted(media-volume-range) {\n        min-height: 100%;\n      }\n\n      ::slotted(media-time-range),\n      ::slotted(media-clip-selector) {\n        flex-grow: 1;\n      }\n\n      ::slotted([role="menu"]) {\n        position: absolute;\n      }\n    </style>\n\n    <slot></slot>\n  '},Sy.customElements.get("media-control-bar")||Sy.customElements.define("media-control-bar",iT);var aT,oT=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},sT=function(i,e,t){return oT(i,e,"read from private field"),t?t.call(i):e.get(i)},uT=function(i,e,t,s){return oT(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t};var cT=function(e){T(n,e);var t=P(n);function n(){var e;if(A(this,n),e=t.call(this),function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)}(_(e),aT,void 0),!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var r=xy(e.attributes);e.shadowRoot.innerHTML=e.constructor.getTemplateHTML(r)}return w(e)}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){var n,r,a,o,c;e===jg&&(t&&(null==(r=null==(n=sT(this,aT))?void 0:n.unassociateElement)||r.call(n,this),uT(this,aT,null)),s&&this.isConnected&&(uT(this,aT,null==(a=this.getRootNode())?void 0:a.getElementById(s)),null==(c=null==(o=sT(this,aT))?void 0:o.associateElement)||c.call(o,this)))}},{key:"connectedCallback",value:function(){var e,t,s;Hy(this.shadowRoot,":host").style.setProperty("display","var(--media-control-display, var(--".concat(this.localName,"-display, inline-flex))"));var n=this.getAttribute(jg);n&&(uT(this,aT,null==(e=this.getRootNode())?void 0:e.getElementById(n)),null==(s=null==(t=sT(this,aT))?void 0:t.associateElement)||s.call(t,this))}},{key:"disconnectedCallback",value:function(){var e,t;null==(t=null==(e=sT(this,aT))?void 0:e.unassociateElement)||t.call(e,this),uT(this,aT,null)}}],[{key:"observedAttributes",get:function(){return[jg]}}]),n}(Sy.HTMLElement);aT=new WeakMap,cT.shadowRootOptions={mode:"open"},cT.getTemplateHTML=function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"\n    <style>\n      :host {\n        font: var(--media-font,\n          var(--media-font-weight, normal)\n          var(--media-font-size, 14px) /\n          var(--media-text-content-height, var(--media-control-height, 24px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))));\n        padding: var(--media-control-padding, 10px);\n        display: inline-flex;\n        justify-content: center;\n        align-items: center;\n        vertical-align: middle;\n        box-sizing: border-box;\n        text-align: center;\n        pointer-events: auto;\n      }\n\n      \n      :host(:focus-visible) {\n        box-shadow: var(--media-focus-box-sha
2dow, inset 0 0 0 2px rgb(27 127 204 / .9));\n        outline: 0;\n      }\n\n      \n      :host(:where(:focus)) {\n        box-shadow: none;\n        outline: 0;\n      }\n    </style>\n\n    ".concat(this.getSlotTemplateHTML(i,e),"\n  ")},cT.getSlotTemplateHTML=function(i,e){return"\n    <slot></slot>\n  "},Sy.customElements.get("media-text-display")||Sy.customElements.define("media-text-display",cT);var lT,dT=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},hT=function(i,e,t){return dT(i,e,"read from private field"),t?t.call(i):e.get(i)};var fT=function(e){T(n,e);var t=P(n);function n(){var e,r;return A(this,n),e=t.call(this),function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)}(_(e),lT,void 0),function(i,e,t,s){dT(i,e,"write to private field"),s?s.call(i,t):e.set(i,t)}(_(e),lT,e.shadowRoot.querySelector("slot")),hT(_(e),lT).textContent=gy(null!=(r=e.mediaDuration)?r:0),e}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){e===Wg.MEDIA_DURATION&&(hT(this,lT).textContent=gy(+s)),y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s)}},{key:"mediaDuration",get:function(){return qy(this,Wg.MEDIA_DURATION)},set:function(e){Gy(this,Wg.MEDIA_DURATION,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_DURATION])}}]),n}(cT);lT=new WeakMap,fT.getSlotTemplateHTML=function(i,e){return"\n    <slot>".concat(gy(e.mediaDuration),"</slot>\n  ")},Sy.customElements.get("media-duration-display")||Sy.customElements.define("media-duration-display",fT);var pT,vT={2:py("Network Error"),3:py("Decode Error"),4:py("Source Not Supported"),5:py("Encryption 
2Error")},mT={2:py("A network error caused the media download to fail."),3:py("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:py("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:py("The media is encrypted and there are no keys to decrypt it.")},gT=function(i){var e,t;return 1===i.code?null:{title:null!=(e=vT[i.code])?e:"Error ".concat(i.code),message:null!=(t=mT[i.code])?t:i.message}},yT=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},bT=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)};function ET(i){var e,t=null!=(e=gT(i))?e:{},n=t.title,s=t.message,r="";return n&&(r+='<slot name="error-'.concat(i.code,'-title"><h3>').concat(n,"</h3></slot>")),s&&(r+='<slot name="error-'.concat(i.code,'-message"><p>').concat(s,"</p></slot>")),r}var _T=[Wg.MEDIA_ERROR_CODE,Wg.MEDIA_ERROR_MESSAGE],kT=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.apply(this,arguments),bT(_(e),pT,null),e}return I(n,[{key:"formatErrorMessage",value:function(e){return this.constructor.formatErrorMessage(e)}},{key:"attributeChangedCallback",value:function(e,t,s){var r;if(y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),_T.includes(e)){var o=null!=(r=this.mediaError)?r:{code:this.mediaErrorCode,message:this.mediaErrorMessage};if(this.open=function(i){return i.code&&null!==gT(i)}(o),this.open&&(this.shadowRoot.querySelector("slot").name="error-".concat(this.mediaErrorCode),this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(o),!this.hasAttribute("aria-label"))){var a=gT(o).title;a&&this.setAttribute("aria-label",a)}}}},{key:"mediaError",get:function(){return function(i,e,t){return yT(i,e,"read from private field"),t?t.call(i):e.get(i)}(this,pT)},set:function(e){!function(i,e,t,s){yT(i,e,"write to private field"),s?s.call(i,t):e.set(i,t)}(this,pT,e)}},{key:"mediaErrorCode",get:function(){return qy(this,"mediaerrorcode")},set:function(e){Gy(this,"mediaerrorcode",e)}},{key:"mediaErrorMessage",get:function(){return $y(this,"mediaerrormessage")},set:function(e){Qy(this,"mediaerrormessage",e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),_T)}}]),n}(Tk);pT=new WeakMap,kT.getSlotTemplateHTML=function(i){return'\n    <style>\n      :host {\n        background: rgb(20 20 30 / .8);\n      }\n\n      #content {\n        display: block;\n        padding: 1.2em 1.5em;\n      }\n\n      h3,\n      p {\n        margin-block: 0 .3em;\n      }\n    </style>\n    <slot name="error-'.concat(i.mediaerrorcode,'" id="content">\n      ').concat(ET({code:+i.mediaerrorcode,message:i.mediaerrormessage}),"\n    </slot>\n  ")},kT.formatErrorMessage=ET,Sy.customElements.get("media-error-dialog")||Sy.customElements.define("media-error-dialog",kT);var TT,wT,ST=kT,AT=function(i,e,t){return function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)}(i,e,"read from private field"),t?t.call(i):e.get(i)},IT=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)};var RT=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.apply(this,arguments),IT(_(e),TT,(function(t){var n;if(e.open){var s=null==(n=e.shadowRoot)?void 0:n.querySelector("#content");if(s){var r=t.composedPath(),o=r[0]===_(e)||r.includes(_(e)),a=r.includes(s);o&&!a&&(e.open=!1)}}})),IT(_(e),wT,(function(t){if(e.open){var n=t.shiftKey&&("/"===t.key||"?"===t.key);("Escape"===t.key||n)&&!t.ctrlKey&&!t.altKey&&!t.metaKey&&(e.open=!1,t.preventDefault(),t.stopPropagation())}})),e}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.open&&(this.addEventListener("click",AT(this,TT)),document.addEventListener("keydown",AT(this,wT)))}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",AT(this,TT)),document.removeEventListener("keydown",AT(this,wT))}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),"open"===e&&(this.open?(this.addEventListener("click",AT(this,TT)),document.addEventListener("keydown",AT(this,wT))):(this.removeEventListener("click",AT(this,TT)),document.removeEventListener("keydown",AT(this,wT)))
2)}}]),n}(Tk);TT=new WeakMap,wT=new WeakMap,RT.getSlotTemplateHTML=function(i){return"\n    <style>\n      :host {\n        position: fixed;\n        top: 0;\n        left: 0;\n        z-index: 9999;\n        background: rgb(20 20 30 / .8);\n        backdrop-filter: blur(10px);\n      }\n\n      #content {\n        display: block;\n        width: clamp(400px, 40vw, 700px);\n        max-width: 90vw;\n        text-align: left;\n      }\n\n      h2 {\n        margin: 0 0 1.5rem 0;\n        font-size: 1.5rem;\n        font-weight: 500;\n        text-align: center;\n      }\n\n      .shortcuts-table {\n        width: 100%;\n        border-collapse: collapse;\n      }\n\n      .shortcuts-table tr {\n        border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n      }\n\n      .shortcuts-table tr:last-child {\n        border-bottom: none;\n      }\n\n      .shortcuts-table td {\n        padding: 0.75rem 0.5rem;\n      }\n\n      .shortcuts-table td:first-child {\n        text-align: right;\n        padding-right: 1rem;\n        width: 40%;\n        min-width: 120px;\n      }\n\n      .shortcuts-table td:last-child {\n        padding-left: 1rem;\n      }\n\n      .key {\n        display: inline-block;\n        background: rgba(255, 255, 255, 0.15);\n        border: 1px solid rgba(255, 255, 255, 0.2);\n        border-radius: 4px;\n        padding: 0.25rem 0.5rem;\n        font-family: 'Courier New', monospace;\n        font-size: 0.9rem;\n        font-weight: 500;\n        min-width: 1.5rem;\n        text-align: center;\n        margin: 0 0.2rem;\n      }\n\n      .description {\n        color: rgba(255, 255, 255, 0.9);\n        font-size: 0.95rem;\n      }\n\n      .key-combo {\n        display: flex;\n        align-items: center;\n        justify-content: flex-end;\n        gap: 0.3rem;\n      }\n\n      .key-separator {\n        color: rgba(255, 255, 255, 0.5);\n        font-size: 0.9rem;\n      }\n    </style>\n    <slot id=\"content\">\n      ".concat('\n    <h2>Keyboard Shortcuts</h2>\n    <table class="shortcuts-table">'.concat([{keys:["Space","k"],description:"Toggle Playback"},{keys:["m"],description:"Toggle mute"},{keys:["f"],description:"Toggle fullscreen"},{keys:["c"],description:"Toggle captions or subtitles, if available"},{keys:["p"],description:"Toggle Picture in Picture"},{keys:["←","j"],description:"Seek back 10s"},{keys:["→","l"],description:"Seek forward 10s"},{keys:["↑"],description:"Turn volume up"},{keys:["↓"],description:"Turn volume down"},{keys:["< (SHIFT+,)"],description:"Decrease playback rate"},{keys:["> (SHIFT+.)"],description:"Increase playback rate"}].map((function(e){var t=e.keys,s=e.description;return'\n      <tr>\n        <td>\n          <div class="key-combo">'.concat(t.map((function(e,a){return a>0?'<span class="key-separator">or</span><span class="key">'.concat(e,"</span>"):'<span class="key">'.concat(e,"</span>")})).join(""),'</div>\n        </td>\n        <td class="description">').concat(s,"</td>\n      </tr>\n    ")})).join(""),"</table>\n  "),"\n    </slot>\n  ")},Sy.customElements.get("media-keyboard-shortcuts-dialog")||Sy.customElements.define("media-keyboard-shortcuts-dialog",RT);var OT,LT=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},DT=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)};var xT=function(i){var e=i.mediaIsFullscreen?py("exit fullscreen mode"):py("enter fullscreen mode");i.setAttribute("aria-label",e)},CT=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.apply(this,arguments),DT(_(e),OT,null),e}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),xT(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_IS_FULLSCREEN&&xT(this)}},{key:"mediaFullscreenUnavailable",get:function(){return $y(this,Wg.MEDIA_FULLSCREEN_UNAVAILABLE)},set:function(e){Qy(this,Wg.MEDIA_FULLSCREEN_UNAVAILABLE,e)}},{key:"mediaIsFullscreen",get:function(){return Ky(this,Wg.MEDIA_IS_FULLSCREEN)},set:function(e){Yy(this,Wg.MEDIA_IS_FULLSCREEN,e)}},{key:"handleClick",value:function(e){!function(i,e,t,s){LT(i,e,"write to private field"),s?s.call(i,t):e.set(i,t)}(this,OT,e);var t=function(i,e,t){return LT(i,e,"read from private field"),t?t.call(i):e.get(i)}(this,OT)instanceof PointerEvent,s=this.mediaIsFullscreen?new Sy.CustomEvent(Fg.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new Sy.CustomEvent(Fg.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(s)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_IS_FULLSCREEN,Wg.MEDIA_FULLSCREEN_UNAVAILABLE])}}]),n}(G_);OT=new WeakMap,CT.getSlotTemplateHTML=function(i){return"\n    <style>\n      :host([".concat(Wg.MEDIA_IS_FULLSCREEN,"]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      \n      :host(:not([").concat(Wg.MEDIA_IS_FULLSCREEN,"])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([").concat(Wg.MEDIA_IS_FULLSCREEN,"]) slot[name=tooltip-enter],\n      :host(:not([").concat(Wg.MEDIA_IS_FULLSCREEN,'])) slot[name=tooltip-exit] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="enter">').concat('<svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>\n</svg>','</slot>\n      <slot name="exit">').concat('<svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>\n</svg>',"</slot>\n    </slot>\n  ")},CT.getTooltipContentHTML=function(){return'\n    <slot name="tooltip-enter">'.concat(py("Enter fullscreen mode"),'</slot>\n    <slot name="tooltip-exit">
2').concat(py("Exit fullscreen mode"),"</slot>\n  ")},Sy.customElements.get("media-fullscreen-button")||Sy.customElements.define("media-fullscreen-button",CT);var MT=Wg.MEDIA_TIME_IS_LIVE,PT=Wg.MEDIA_PAUSED,NT=Fg.MEDIA_SEEK_TO_LIVE_REQUEST,UT=Fg.MEDIA_PLAY_REQUEST;var FT=function(i){var e,t=i.mediaPaused||!i.mediaTimeIsLive,s=py(t?"seek to live":"playing live");i.setAttribute("aria-label",s);var n=null==(e=i.shadowRoot)?void 0:e.querySelector('slot[name="text"]');n&&(n.textContent=py("live")),t?i.removeAttribute("aria-disabled"):i.setAttribute("aria-disabled","true")},BT=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),FT(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),FT(this)}},{key:"mediaPaused",get:function(){return Ky(this,Wg.MEDIA_PAUSED)},set:function(e){Yy(this,Wg.MEDIA_PAUSED,e)}},{key:"mediaTimeIsLive",get:function(){return Ky(this,Wg.MEDIA_TIME_IS_LIVE)},set:function(e){Yy(this,Wg.MEDIA_TIME_IS_LIVE,e)}},{key:"handleClick",value:function(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new Sy.CustomEvent(NT,{composed:!0,bubbles:!0})),this.hasAttribute(PT)&&this.dispatchEvent(new Sy.CustomEvent(UT,{composed:!0,bubbles:!0})))}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[MT,PT])}}]),n}(G_);BT.getSlotTemplateHTML=function(i){return"\n    <style>\n      :host { --media-tooltip-display: none; }\n      \n      slot[name=indicator] > *,\n      :host ::slotted([slot=indicator]) {\n        \n        min-width: auto;\n        fill: var(--media-live-button-icon-color, rgb(140, 140, 140));\n        color: var(--media-live-button-icon-color, rgb(140, 140, 140));\n      }\n\n      :host([".concat(MT,"]:not([").concat(PT,"])) slot[name=indicator] > *,\n      :host([").concat(MT,"]:not([").concat(PT,"])) ::slotted([slot=indicator]) {\n        fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));\n        color: var(--media-live-button-indicator-color, rgb(255, 0, 0));\n      }\n\n      :host([").concat(MT,"]:not([").concat(PT,'])) {\n        cursor: var(--media-cursor, not-allowed);\n      }\n\n      slot[name=text]{\n        text-transform: uppercase;\n      }\n\n    </style>\n\n    <slot name="indicator">').concat('<svg viewBox="0 0 6 12" aria-hidden="true"><circle cx="3" cy="6" r="2"></circle></svg>','</slot>\n    \n    <slot name="spacer">&nbsp;</slot><slot name="text">').concat(py("live"),"</slot>\n  ")},Sy.customElements.get("media-live-button")||Sy.customElements.define("media-live-button",BT);var jT,VT,HT=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},WT=function(i,e,t){return HT(i,e,"read from private field"),t?t.call(i):e.get(i)},qT=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},GT=function(i,e,t,s){return HT(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},KT="loadingdelay",YT="noautohide";var $T=function(e){T(n,e);var t=P(n);function n(){var e;if(A(this,n),e=t.call(this),qT(_(e),jT,void 0),qT(_(e),VT,500),!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var r=xy(e.attributes);e.shadowRoot.innerHTML=e.constructor.getTemplateHTML(r)}return w(e)}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){var n,r,a,o,c;e===KT&&t!==s?this.loadingDelay=Number(s):e===jg&&(t&&(null==(r=null==(n=WT(this,jT))?void 0:n.unassociateElement)||r.call(n,this),GT(this,jT,null)),s&&this.isConnected&&(GT(this,jT,null==(a=this.getRootNode())?void 0:a.getElementById(s)),null==(c=null==(o=WT(this,jT))?void 0:o.associateElement)||c.call(o,this)))}},{key:"connectedCallback",value:function(){var e,t,s,n=this.getAttribute(jg);n&&(GT(this,jT,null==(e=this.getRootNode())?void 0:e.getElementById(n)),null==(s=null==(t=WT(this,jT))?void 0:t.associateElement)||s.call(t,this))}},{key:"disconnectedCallback",value:function(){var e,t;null==(t=null==(e=WT(this,jT))?void 0:e.unassociateElement)||t.call(e,this),GT(this,jT,null)}},{key:"loadingDelay",get:function(){return WT(this,VT)}
2,set:function(e){GT(this,VT,e),Hy(this.shadowRoot,":host").style.setProperty("--_loading-indicator-delay","var(--media-loading-indicator-transition-delay, ".concat(e,"ms)"))}},{key:"mediaPaused",get:function(){return Ky(this,Wg.MEDIA_PAUSED)},set:function(e){Yy(this,Wg.MEDIA_PAUSED,e)}},{key:"mediaLoading",get:function(){return Ky(this,Wg.MEDIA_LOADING)},set:function(e){Yy(this,Wg.MEDIA_LOADING,e)}},{key:"mediaController",get:function(){return $y(this,jg)},set:function(e){Qy(this,jg,e)}},{key:"noAutohide",get:function(){return Ky(this,YT)},set:function(e){Yy(this,YT,e)}}],[{key:"observedAttributes",get:function(){return[jg,Wg.MEDIA_PAUSED,Wg.MEDIA_LOADING,KT]}}]),n}(Sy.HTMLElement);jT=new WeakMap,VT=new WeakMap,$T.shadowRootOptions={mode:"open"},$T.getTemplateHTML=function(i){return"\n    <style>\n      :host {\n        display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));\n        vertical-align: middle;\n        box-sizing: border-box;\n        --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ".concat(500,"ms);\n      }\n\n      #status {\n        color: rgba(0,0,0,0);\n        width: 0px;\n        height: 0px;\n      }\n\n      :host slot[name=icon] > *,\n      :host ::slotted([slot=icon]) {\n        opacity: var(--media-loading-indicator-opacity, 0);\n        transition: opacity 0.15s;\n      }\n\n      :host([").concat(Wg.MEDIA_LOADING,"]:not([").concat(Wg.MEDIA_PAUSED,"])) slot[name=icon] > *,\n      :host([").concat(Wg.MEDIA_LOADING,"]:not([").concat(Wg.MEDIA_PAUSED,"])) ::slotted([slot=icon]) {\n        opacity: var(--media-loading-indicator-opacity, 1);\n        transition: opacity 0.15s var(--_loading-indicator-delay);\n      }\n\n      :host #status {\n        visibility: var(--media-loading-indicator-opacity, hidden);\n        transition: visibility 0.15s;\n      }\n\n      :host([").concat(Wg.MEDIA_LOADING,"]:not([").concat(Wg.MEDIA_PAUSED,'])) #status {\n        visibility: var(--media-loading-indicator-opacity, visible);\n        transition: visibility 0.15s var(--_loading-indicator-delay);\n      }\n\n      svg, img, ::slotted(svg), ::slotted(img) {\n        width: var(--media-loading-indicator-icon-width);\n        height: var(--media-loading-indicator-icon-height, 100px);\n        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n        vertical-align: middle;\n      }\n    </style>\n\n    <slot name="icon">').concat('\n<svg aria-hidden="true" viewBox="0 0 100 100">\n  <path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">\n    <animateTransform\n       attributeName="transform"\n       attributeType="XML"\n       type="rotate"\n       dur="1s"\n       from="0 50 50"\n       to="360 50 50"\n       repeatCount="indefinite" />\n  </path>\n</svg>\n','</slot>\n    <div id="status" role="status" aria-live="polite">').concat(py("media loading"),"</div>\n  ")},Sy.customElements.get("media-loading-indicator")||Sy.customElements.define("media-loading-indicator",$T);var QT='<svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4Z"/>\n</svg>';var zT=function(i){var e="off"===i.mediaVolumeLevel?py("unmute"):py("mute");i.setAttribute("aria-label",e)},XT=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),zT(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_VOLUME_LEVEL&&zT(this)}},{key:"mediaVolumeLevel",get:function(){return $y(this,Wg.MEDIA_VOLUME_LEVEL)},set:function(e){Qy(this,Wg.MEDIA_VOLUME_LEVEL,e)}},{key:"handleClick",value:function(){var e="off"===this.mediaVolumeLevel?Fg.MEDIA_UNMUTE_REQUEST:Fg.MEDIA_MUTE_REQUEST;this.dispatchEvent(new Sy.CustomEvent(e,{composed:!0,bubbles:!0}))}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_VOLUME_LEVEL])}}]),n}(G_);XT.getSlotTemplateHTML=function(i){return"\n    <style>\n      :host(:not([".concat(Wg.MEDIA_VOLUME_LEVEL,"])) slot[name=icon] slot:not([name=high]),\n      :host([").concat(Wg.MEDIA_VOLUME_LEVEL,"=high]) slot[name=icon] slot:not([name=high]) {\n        display: none !important;\n      }\n\n      :host([").concat(Wg.MEDIA_VOLUME_LEVEL,"=off]) slot[name=icon] slot:not([name=off]) {\n        display: none !important;\n      }\n\n      :host([").concat(Wg.MEDIA_VOLUME_LEVEL,"=low]) slot[name=icon] slot:not([name=low]) {\n        display: none !important;\n      }\n\n      :host([").concat(Wg.MEDIA_VOLUME_LEVEL,"=medium]) slot[name=icon] slot:not([name=medium]) {\n        display: none !important;\n      }\n\n      :host(:not([").concat(Wg.MEDIA_VOLUME_LEVEL,"=off])) slot[name=tooltip-unmute],\n      :host([").concat(Wg.MEDIA_VOLUME_LEVEL,'=off]) slot[name=tooltip-mute] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="off">').concat('<svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/>\n</svg>','</slot>\n      <slot name="low">').concat(QT,'</slot>\n      <slot name="medium">').concat(QT,'</slot>\n      <slot name="high">').concat('<svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4ZM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54Z"/>\n</svg>',"</slot>\n    </slot>\n  ")},XT.getTooltipContentHTML=function(){return'\n    <slot name="tooltip-mute">'.concat(py("Mute"),'</slot>\n    <slot name="tooltip-unmute">').concat(py("Unmute"),"</slot>\n  ")},Sy.customElements.get("media-mute-button")||Sy.customElements.define("media-mute-button",XT);var JT='<svg aria-hidden="true" viewBox="0 0 28 24">\n  <path d="M24 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Zm-1 16H5V5h18v14Zm-3-8h-7v5h7v-5Z"/>\n</svg>';var ZT=function(i){var e=i.mediaIsPip?py("exit picture in picture mode"):py("enter picture in picture mode");i.setAttribute("aria-label",e)},ew=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}
2return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),ZT(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_IS_PIP&&ZT(this)}},{key:"mediaPipUnavailable",get:function(){return $y(this,Wg.MEDIA_PIP_UNAVAILABLE)},set:function(e){Qy(this,Wg.MEDIA_PIP_UNAVAILABLE,e)}},{key:"mediaIsPip",get:function(){return Ky(this,Wg.MEDIA_IS_PIP)},set:function(e){Yy(this,Wg.MEDIA_IS_PIP,e)}},{key:"handleClick",value:function(){var e=this.mediaIsPip?Fg.MEDIA_EXIT_PIP_REQUEST:Fg.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new Sy.CustomEvent(e,{composed:!0,bubbles:!0}))}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_IS_PIP,Wg.MEDIA_PIP_UNAVAILABLE])}}]),n}(G_);ew.getSlotTemplateHTML=function(i){return"\n    <style>\n      :host([".concat(Wg.MEDIA_IS_PIP,"]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      :host(:not([").concat(Wg.MEDIA_IS_PIP,"])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([").concat(Wg.MEDIA_IS_PIP,"]) slot[name=tooltip-enter],\n      :host(:not([").concat(Wg.MEDIA_IS_PIP,'])) slot[name=tooltip-exit] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="enter">').concat(JT,'</slot>\n      <slot name="exit">').concat(JT,"</slot>\n    </slot>\n  ")},ew.getTooltipContentHTML=function(){return'\n    <slot name="tooltip-enter">'.concat(py("Enter picture in picture mode"),'</slot>\n    <slot name="tooltip-exit">').concat(py("Exit picture in picture mode"),"</slot>\n  ")},Sy.customElements.get("media-pip-button")||Sy.customElements.define("media-pip-button",ew);var tw,nw=function(i,e,t){return function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)}(i,e,"read from private field"),t?t.call(i):e.get(i)},rw="rates",iw=[1,1.2,1.5,1.7,2];var aw=function(e){T(n,e);var t=P(n);function n(){var e,r;return A(this,n),e=t.call(this),function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)}(_(e),tw,new Vb(_(e),rw,{defaultValue:iw})),e.container=e.shadowRoot.querySelector('slot[name="icon"]'),e.container.innerHTML="".concat(null!=(r=e.mediaPlaybackRate)?r:1,"x"),e}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){if(y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===rw&&(nw(this,tw).value=s),e===Wg.MEDIA_PLAYBACK_RATE){var r=s?+s:Number.NaN,o=Number.isNaN(r)?1:r;this.container.innerHTML="".concat(o,"x"),this.setAttribute("aria-label",py("Playback rate {playbackRate}",{playbackRate:o}))}}},{key:"rates",get:function(){return nw(this,tw)},set:function(e){e?Array.isArray(e)?nw(this,tw).value=e.join(" "):"string"==typeof e&&(nw(this,tw).value=e):nw(this,tw).value=""}},{key:"mediaPlaybackRate",get:function(){return qy(this,Wg.MEDIA_PLAYBACK_RATE,1)},set:function(e){Gy(this,Wg.MEDIA_PLAYBACK_RATE,e)}},{key:"handleClick",value:function(){var e,t,n=this,s=Array.from(nw(this,tw).values(),(function(a){return+a})).sort((function(a,e){return a-e})),r=null!=(t=null!=(e=s.find((function(a){return a>n.mediaPlaybackRate})))?e:s[0])?t:1,o=new Sy.CustomEvent(Fg.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(o)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_PLAYBACK_RATE,rw])}}]),n}(G_);tw=new WeakMap,aw.getSlotTemplateHTML=function(i){return'\n    <style>\n      :host {\n        min-width: 5ch;\n        padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n      }\n    </style>\n    <slot name="icon">'.concat(i.mediaplaybackrate||1,"x</slot>\n  ")},aw.getTooltipContentHTML=function(){return py("Playback rate")},Sy.customElements.get("media-playback-rate-button")||Sy.customElements.define("media-playback-rate-button",aw);var ow=function(i){var e=i.mediaPaused?py("play"):py("pause");i.setAttribute("aria-label",e)},sw=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}
2return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),ow(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),(e===Wg.MEDIA_PAUSED||e===Wg.MEDIA_LANG)&&ow(this)}},{key:"mediaPaused",get:function(){return Ky(this,Wg.MEDIA_PAUSED)},set:function(e){Yy(this,Wg.MEDIA_PAUSED,e)}},{key:"handleClick",value:function(){var e=this.mediaPaused?Fg.MEDIA_PLAY_REQUEST:Fg.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new Sy.CustomEvent(e,{composed:!0,bubbles:!0}))}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_PAUSED,Wg.MEDIA_ENDED])}}]),n}(G_);sw.getSlotTemplateHTML=function(i){return"\n    <style>\n      :host([".concat(Wg.MEDIA_PAUSED,"]) slot[name=pause],\n      :host(:not([").concat(Wg.MEDIA_PAUSED,"])) slot[name=play] {\n        display: none !important;\n      }\n\n      :host([").concat(Wg.MEDIA_PAUSED,"]) slot[name=tooltip-pause],\n      :host(:not([").concat(Wg.MEDIA_PAUSED,'])) slot[name=tooltip-play] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="play">').concat('<svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="m6 21 15-9L6 3v18Z"/>\n</svg>','</slot>\n      <slot name="pause">').concat('<svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>\n</svg>',"</slot>\n    </slot>\n  ")},sw.getTooltipContentHTML=function(){return'\n    <slot name="tooltip-play">'.concat(py("Play"),'</slot>\n    <slot name="tooltip-pause">').concat(py("Pause"),"</slot>\n  ")},Sy.customElements.get("media-play-button")||Sy.customElements.define("media-play-button",sw);var uw="placeholdersrc",cw="src";var lw=function(e){T(n,e);var t=P(n);function n(){var e;if(A(this,n),!(e=t.call(this)).shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var r=xy(e.attributes);e.shadowRoot.innerHTML=e.constructor.getTemplateHTML(r)}return e.image=e.shadowRoot.querySelector("#image"),w(e)}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){e===cw&&(null==s?this.image.removeAttribute(cw):this.image.setAttribute(cw,s)),e===uw&&(null==s?function(i){i.style.removeProperty("background-image")}(this.image):function(i,e){i.style["background-image"]="url('".concat(e,"')")}(this.image,s))}},{key:"placeholderSrc",get:function(){return $y(this,uw)},set:function(e){Qy(this,cw,e)}},{key:"src",get:function(){return $y(this,cw)},set:function(e){Qy(this,cw,e)}}],[{key:"observedAttributes",get:function(){return[uw,cw]}}]),n}(Sy.HTMLElement);lw.shadowRootOptions={mode:"open"},lw.getTemplateHTML=function(i){return'\n    <style>\n      :host {\n        pointer-events: none;\n        display: var(--media-poster-image-display, inline-block);\n        box-sizing: border-box;\n      }\n\n      img {\n        max-width: 100%;\n        max-height: 100%;\n        min-width: 100%;\n        min-height: 100%;\n        background-repeat: no-repeat;\n        background-position: var(--media-poster-image-background-position, var(--media-object-position, center));\n        background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain));\n        object-fit: var(--media-object-fit, contain);\n        object-position: var(--media-object-position, center);\n      }\n    </style>\n\n    <img part="poster img" aria-hidden="true" id="image"/>\n  '},Sy.customElements.get("media-poster-image")||Sy.customElements.define("media-poster-image",lw);var dw,hw=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},fw=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.call(this),function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)}(_(e),dw,void 0),function(i,e,t,s){hw(i,e,"write to private field"),s?s.call(i,t):e.set(i,t)}(_(e),dw,e.shadowRoot.querySelector("slot")),e}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){if(y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),(e===Wg.MEDIA_PREVIEW_CHAPTER||e===Wg.MEDIA_LA
2NG)&&s!==t&&null!=s)if((function(i,e,t){return hw(i,e,"read from private field"),t?t.call(i):e.get(i)}(this,dw)).textContent=s,""!==s){var r=py("chapter: {chapterName}",{chapterName:s});this.setAttribute("aria-valuetext",r)}else this.removeAttribute("aria-valuetext")}},{key:"mediaPreviewChapter",get:function(){return $y(this,Wg.MEDIA_PREVIEW_CHAPTER)},set:function(e){Qy(this,Wg.MEDIA_PREVIEW_CHAPTER,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_PREVIEW_CHAPTER,Wg.MEDIA_LANG])}}]),n}(cT);dw=new WeakMap,Sy.customElements.get("media-preview-chapter-display")||Sy.customElements.define("media-preview-chapter-display",fw);var pw,vw=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},mw=function(i,e,t){return vw(i,e,"read from private field"),t?t.call(i):e.get(i)},gw=function(i,e,t,s){return vw(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t};var yw=function(e){T(n,e);var t=P(n);function n(){var e;if(A(this,n),e=t.call(this),function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)}(_(e),pw,void 0),!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var r=xy(e.attributes);e.shadowRoot.innerHTML=e.constructor.getTemplateHTML(r)}return w(e)}return I(n,[{key:"connectedCallback",value:function(){var e,t,s,n=this.getAttribute(jg);n&&(gw(this,pw,null==(e=this.getRootNode())?void 0:e.getElementById(n)),null==(s=null==(t=mw(this,pw))?void 0:t.associateElement)||s.call(t,this))}},{key:"disconnectedCallback",value:function(){var e,t;null==(t=null==(e=mw(this,pw))?void 0:e.unassociateElement)||t.call(e,this),gw(this,pw,null)}},{key:"attributeChangedCallback",value:function(e,t,s){var n,r,a,o,c;[Wg.MEDIA_PREVIEW_IMAGE,Wg.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===jg&&(t&&(null==(r=null==(n=mw(this,pw))?void 0:n.unassociateElement)||r.call(n,this),gw(this,pw,null)),s&&this.isConnected&&(gw(this,pw,null==(a=this.getRootNode())?void 0:a.getElementById(s)),null==(c=null==(o=mw(this,pw))?void 0:o.associateElement)||c.call(o,this)))}},{key:"mediaPreviewImage",get:function(){return $y(this,Wg.MEDIA_PREVIEW_IMAGE)},set:function(e){Qy(this,Wg.MEDIA_PREVIEW_IMAGE,e)}},{key:"mediaPreviewCoords",get:function(){var e=this.getAttribute(Wg.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map((function(e){return+e}))},set:function(e){e?this.setAttribute(Wg.MEDIA_PREVIEW_COORDS,e.join(" ")):this.removeAttribute(Wg.MEDIA_PREVIEW_COORDS)}},{key:"update",value:function(){var e=this,t=this.mediaPreviewCoords,n=this.mediaPreviewImage;if(t&&n){var r,p,o=m(t,4),s=o[0],c=o[1],l=o[2],a=o[3],d=n.split("#")[0],h=getComputedStyle(this),f=h.maxWidth,u=h.maxHeight,v=h.minWidth,y=h.minHeight;if("fill"===(h.getPropertyValue("--media-preview-thumbnail-object-fit").trim()||"contain")){var E=parseInt(f)/l,_=parseInt(u)/a,k=parseInt(v)/l,T=parseInt(y)/a;r=E<1?E:Math.max(E,k),p=_<1?_:Math.max(_,T)}else{var w=Math.min(parseInt(f)/l,parseInt(u)/a),S=Math.max(parseInt(v)/l,parseInt(y)/a),A=w<1?w:S>1?S:1;r=A,p=A}var g=Hy(this.shadowRoot,":host").style,I=Hy(this.shadowRoot,"img").style,R=this.shadowRoot.querySelector("img"),b=Math.min(r,p)<1?"min":"max";g.setProperty("".concat(b,"-width"),"initial","important"),g.setProperty("".concat(b,"-height"),"initial","important"),g.width="".concat(l*r,"px"),g.height="".concat(a*p,"px");var O=function(){I.width="".concat(e.imgWidth*r,"px"),I.height="".concat(e.imgHeight*p,"px"),I.display="block"};R.src!==d&&(R.onload=function(){e.imgWidth=R.naturalWidth,e.imgHeight=R.naturalHeight,O(),R.onload=null},R.src=d,O()),O(),I.transform="translate(-".concat(s*r,"px, -").concat(c*p,"px)")}}}],[{key:"observedAttributes",get:function(){return[jg,Wg.MEDIA_PREVIEW_IMAGE,Wg.MEDIA_PREVIEW_COORDS]}}]),n}(Sy.HTMLElement);pw=new WeakMap,yw.shadowRootOptions={mode:"open"},yw.getTemplateHTML=function(i){return'\n    <style>\n      :host {\n        box-sizing: border-box;\n        display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block));\n        overflow: hidden;\n      }\n\n      img {\n        display: none;\n        position: relative;\n      }\n    </style>\n    <img crossorigin loading="eager" decoding="async">\n  '}
2,Sy.customElements.get("media-preview-thumbnail")||Sy.customElements.define("media-preview-thumbnail",yw);var bw,Ew=yw,_w=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},kw=function(i,e,t){return _w(i,e,"read from private field"),t?t.call(i):e.get(i)},Tw=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.call(this),function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)}(_(e),bw,void 0),function(i,e,t,s){_w(i,e,"write to private field"),s?s.call(i,t):e.set(i,t)}(_(e),bw,e.shadowRoot.querySelector("slot")),kw(_(e),bw).textContent=gy(0),e}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_PREVIEW_TIME&&null!=s&&(kw(this,bw).textContent=gy(parseFloat(s)))}},{key:"mediaPreviewTime",get:function(){return qy(this,Wg.MEDIA_PREVIEW_TIME)},set:function(e){Gy(this,Wg.MEDIA_PREVIEW_TIME,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_PREVIEW_TIME])}}]),n}(cT);bw=new WeakMap,Sy.customElements.get("media-preview-time-display")||Sy.customElements.define("media-preview-time-display",Tw);var ww="seekoffset";var Sw=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.seekOffset=qy(this,ww,30)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),function(i,e){i.setAttribute("aria-label",py("seek back {seekOffset} seconds",{seekOffset:e}))}(this,this.seekOffset),e===ww&&(this.seekOffset=qy(this,ww,30))}},{key:"seekOffset",get:function(){return qy(this,ww,30)},set:function(e){Gy(this,ww,e),this.setAttribute("aria-label",py("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),Py(Ny(this,"icon"),this.seekOffset)}},{key:"mediaCurrentTime",get:function(){return qy(this,Wg.MEDIA_CURRENT_TIME,0)},set:function(e){Gy(this,Wg.MEDIA_CURRENT_TIME,e)}},{key:"handleClick",value:function(){var e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new Sy.CustomEvent(Fg.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_CURRENT_TIME,ww])}}]),n}(G_);Sw.getSlotTemplateHTML=function(i,e){return'\n    <slot name="icon">'.concat(function(i){return'\n  <svg aria-hidden="true" viewBox="0 0 20 24">\n    <defs>\n      <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>\n    </defs>\n    <text class="text value" transform="translate(2.18 19.87)">'.concat(i,'</text>\n    <path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/>\n  </svg>')}(e.seekOffset),"</slot>\n  ")},Sw.getTooltipContentHTML=function(){return py("Seek backward")},Sy.customElements.get("media-seek-backward-button")||Sy.customElements.define("media-seek-backward-button",Sw);var Aw="seekoffset";var Iw=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.seekOffset=qy(this,Aw,30)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),function(i,e){i.setAttribute("aria-label",py("seek forward {seekOffset} seconds",{seekOffset:e}))}(this,this.seekOffset),e===Aw&&(this.seekOffset=qy(this,Aw,30))}},{key:"seekOffset",get:function(){return qy(this,Aw,30)},set:function(e){Gy(this,Aw,e),this.setAttribute("aria-label",py("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),Py(Ny(this,"icon"),this.seekOffset)}},{key:"mediaCurrentTime",get:function(){return qy(this,Wg.MEDIA_CURRENT_TIME,0)},set:function(e){Gy(this,Wg.MEDIA_CURRENT_TIME,e)}},{key:"handleClick",value:function(){var e=this.mediaCurrentTime+this.seekOffset,t=new Sy.CustomEvent(Fg.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_CURRENT_TIME,Aw])}}]),n}(G_);Iw.getSlotTemplateHTML=function(i,e){return'\n    <slot name="icon">'.concat(function(i){return'\n  <svg aria-hidden="true" viewBox="0 0 20 24">\n    <defs>\n      <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>\n    </defs>\n    <text class="text value" transform="translate(8.9 19.87)">'.concat(i,'</text>\n    <path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/>\n  </svg>')}(e.seekOffset),"</slot>\n  ")},Iw.getTooltipContentHTML=function(){return py("Seek forward")},Sy.customElements.get("media-seek-forward-button")||Sy.customElements.define("media-seek-forward-button",Iw);var Rw,Ow,Lw,Dw,xw,Cw,Mw,Pw,Nw,Uw,Fw,Bw=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},jw=function(i,e,t){return Bw(i,e,"read from private field"),t?t.call(i):e.get(i)},Vw=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Hw=function(i,e,t,s){return Bw(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},Ww=function(i,e,t){return Bw(i,e,"access private method"),t},qw={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Gw=[].concat(v(Object.values(qw)),[Wg.MEDIA_CURRENT_TIME,Wg.MEDIA_DURATION,Wg.MEDIA_SEEKABLE]),Kw=["Enter"," "],Yw="&nbsp;/&nbsp;",$w=function(i){var e,s,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.timesSep,r=void 0===n?Yw:n,o=null!=(e=i.mediaCurrentTime)?e:0,c=null!=(s=i.mediaSeekable)?s:[],l=m(c,2),d=l[1],a=0;Number.isFinite(i.mediaDuration)?a=i.mediaDuration:Number.isFinite(d)&&(a=d);
2var h=i.remaining?gy(0-(a-o)):gy(o);return i.showDuration?"".concat(h).concat(r).concat(gy(a)):h};var Qw=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.call(this),Vw(_(e),Dw),Vw(_(e),Cw),Vw(_(e),Pw),Vw(_(e),Uw),Vw(_(e),Rw,void 0),Vw(_(e),Ow,null),Vw(_(e),Lw,(function(t){var n=t.metaKey,s=t.altKey,r=t.key;n||s||!Kw.includes(r)?e.removeEventListener("keyup",jw(_(e),Ow)):e.addEventListener("keyup",jw(_(e),Ow))})),Hw(_(e),Rw,e.shadowRoot.querySelector("slot")),jw(_(e),Rw).innerHTML="".concat($w(_(e))),e}return I(n,[{key:"connectedCallback",value:function(){var e=Hy(this.shadowRoot,":host(:hover:not([notoggle]))").style;e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.setAttribute("aria-label",py("playback time")),Ww(this,Pw,Nw).call(this),y(S(n.prototype),"connectedCallback",this).call(this)}},{key:"toggleTimeDisplay",value:function(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}},{key:"disconnectedCallback",value:function(){this.disable(),Ww(this,Cw,Mw).call(this),y(S(n.prototype),"disconnectedCallback",this).call(this)}},{key:"attributeChangedCallback",value:function(e,t,s){(function(i){i.setAttribute("aria-label",py("playback time"))})(this),Gw.includes(e)?this.update():"disabled"===e&&s!==t?null==s?Ww(this,Pw,Nw).call(this):Ww(this,Uw,Fw).call(this):e===qw.NO_TOGGLE&&s!==t&&(this.noToggle?Ww(this,Uw,Fw).call(this):Ww(this,Pw,Nw).call(this)),y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s)}},{key:"enable",value:function(){this.noToggle||(this.tabIndex=0)}},{key:"disable",value:function(){this.tabIndex=-1}},{key:"remaining",get:function(){return Ky(this,qw.REMAINING)},set:function(e){Yy(this,qw.REMAINING,e)}},{key:"showDuration",get:function(){return Ky(this,qw.SHOW_DURATION)},set:function(e){Yy(this,qw.SHOW_DURATION,e)}},{key:"noToggle",get:function(){return Ky(this,qw.NO_TOGGLE)},set:function(e){Yy(this,qw.NO_TOGGLE,e)}},{key:"mediaDuration",get:function(){return qy(this,Wg.MEDIA_DURATION)},set:function(e){Gy(this,Wg.MEDIA_DURATION,e)}},{key:"mediaCurrentTime",get:function(){return qy(this,Wg.MEDIA_CURRENT_TIME)},set:function(e){Gy(this,Wg.MEDIA_CURRENT_TIME,e)}},{key:"mediaSeekable",get:function(){var e=this.getAttribute(Wg.MEDIA_SEEKABLE);if(e)return e.split(":").map((function(e){return+e}))},set:function(e){null!=e?this.setAttribute(Wg.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(Wg.MEDIA_SEEKABLE)}},{key:"update",value:function(){var e=$w(this);(function(i){var e,t=i.mediaCurrentTime,n=null!=(e=i.mediaSeekable)?e:[],s=m(n,2)[1],r=null;if(Number.isFinite(i.mediaDuration)?r=i.mediaDuration:Number.isFinite(s)&&(r=s),null!=t&&null!==r){var o=i.remaining?my(0-(r-t)):my(t);if(i.showDuration){var a=my(r),c=py("{currentTime} of {totalTime}",{currentTime:o,totalTime:a});i.setAttribute("aria-description",c)}else i.setAttribute("aria-description",o)}else i.setAttribute("aria-description",py("video not loaded, unknown time."))})(this),e!==jw(this,Rw).innerHTML&&(jw(this,Rw).innerHTML=e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),v(Gw),["disabled"])}}]),n}(cT);Rw=new WeakMap,Ow=new WeakMap,Lw=new WeakMap,Dw=new WeakSet,xw=function(){var e=this;jw(this,Ow)||(Hw(this,Ow,(function(i){var t=i.key;Kw.includes(t)?e.toggleTimeDisplay():e.removeEventListener("keyup",jw(e,Ow))})),this.addEventListener("keydown",jw(this,Lw)),this.addEventListener("click",this.toggleTimeDisplay))},Cw=new WeakSet,Mw=function(){jw(this,Ow)&&(this.removeEventListener("keyup",jw(this,Ow)),this.removeEventListener("keydown",jw(this,Lw)),this.removeEventListener("click",this.toggleTimeDisplay),Hw(this,Ow,null))},Pw=new WeakSet,Nw=function(){!this.noToggle&&!this.hasAttribute("disabled")&&(this.setAttribute("role","button"),this.enable(),Ww(this,Dw,xw).call(this))},Uw=new WeakSet,Fw=function(){this.removeAttribute("role"),this.disable(),Ww(this,Cw,Mw).call(this)},Qw.getSlotTemplateHTML=function(i,e){return"\n    <slot>".concat($w(e),"</slot>\n  ")},Sy.customElements.get("media-time-display")||Sy.customElements.define("media-time-display",Qw);var zw,Xw,Jw,Zw,eS,tS,nS,rS,iS,aS,oS=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},sS=function(i,e,t){return oS(i,e,"read from private field"),t?t.call(i):e.get(i)},uS=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},cS=function(i,e,t,s){return oS(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},lS=function(i,e,t,s){return{set _(n){cS(i,e,n,t)},get _(){return sS(i,e,s)}}},dS=function(){function e(t,n,s){var r=this;A(this,e),uS(this,zw,void 0),uS(this,Xw,void 0),uS(this,Jw,void 0),uS(this,Zw,void 0),uS(this,eS,void 0),uS(this,tS,void 0),uS(this,nS,void 0),uS(this,rS,void 0),uS(this,iS,0),uS(this,aS,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now();cS(r,iS,requestAnimationFrame(sS(r,aS))),cS(r,Zw,performance.now()-sS(r,Jw));var t=1e3/r.fps;if(sS(r,Zw)>t){cS(r,Jw,e-sS(r,Zw)%t);var a=1e3/((e-sS(r,Xw))/++lS(r,eS)._),n=(e-sS(r,tS))/1e3/r.duration,o=sS(r,nS)+n*r.playbackRate;o-sS(r,zw).valueAsNumber>0?cS(r,rS,r.playbackRate/r.duration/a):(cS(r,rS,.995*sS(r,rS)),o=sS(r,zw).valueAsNumber+sS(r,rS)),r.callback(o)}})),cS(this,zw,t),this.callback=n,this.fps=s}return I(e,[{key:"start",value:function(){0===sS(this,iS)&&(cS(this,Jw,performance.now()),cS(this,Xw,sS(this,Jw)),cS(this,eS,0),sS(this,aS).call(this))}},{key:"stop",value:function(){0!==sS(this,iS)&&(cancelAnimationFrame(sS(this,iS)),cS(this,iS,0))}},{key:"update",value:function(e){var t=e.start,n=e.duration,s=e.playbackRate,r=t-sS(this,zw).valueAsNumber,o=Math.abs(n-this.duration);(r>0||r<-.03||o>=.5)&&this.callback(t),cS(this,nS,t),cS(this,tS,performance.now()),this.duration=n,this.playbackRate=s}}]),e}();zw=new WeakMap,Xw=new WeakMap,Jw=new WeakMap,Zw=new WeakMap,eS=new WeakMap,tS=new WeakMap,nS=new WeakMap,rS=new WeakMap,iS=new WeakMap,aS=new WeakMap;var hS,fS,pS,vS,mS,gS,yS,bS,ES,_S,kS,TS,wS,SS,AS,IS,RS,OS,LS,DS,xS,CS,MS,PS,NS,US,FS=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},BS=function(i,e,t){return FS(i,e,"read from private field"),t?t.call(i):e.get(i)},jS=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},VS=function(i,e,t,s){return FS(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},HS=function(i,e,t){return FS(i,e,"access private method"),t};var WS=function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.mediaCurrentTime,t=Number.isFinite(i.mediaSeekableStart)?i.mediaSeekableStart:0,s=Number.isFinite(i.mediaDuration)?i.mediaDuration:i.mediaSeekableEnd;if(Number.isNaN(s))return 0;var n=(e-t)/(s-t);return Math.max(0,Math.min(n,1))},qS=function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.range.valueAsNumber,t=Number.isFinite(i.mediaSeekableStart)?i.mediaSeekableStart:0,s=Number.isFinite(i.mediaDuration)?i.mediaDuration:i.mediaSeekableEnd;return Number.isNaN(s)?0:e*(s-t)+t},GS=function(e){T(n,e);var t=P(n);function n(){var e;A(this,n),e=t.call(this),jS(_(e),TS),jS(_(e),AS),jS(_(e),RS),jS(_(e),LS),jS(_(e),xS),jS(_(e),MS),jS(_(e),NS),jS(_(e),hS,null),jS(_(e),fS,void 0),jS(_(e),pS,void 0),jS(_(e),vS,void 0),jS(_(e),mS,void 0),jS(_(e),gS,void 0),jS(_(e),yS,void 0),jS(_(e),bS,void 0),jS(_(e),ES,void 0),jS(_(e),_S,void 0),jS(_(e),kS,(function(){HS(_(e),TS,wS).call(_(e))?BS(_(e),fS).start():BS(_(e),fS).stop()})),jS(_(e),SS,(function(s){e.dragging||(sy(s)&&(e.range.valueAsNumber=s),BS(_(e),_S)||e.updateBar())})),e.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),VS(_(e),pS,e.shadowRoot.querySelectorAll('[part~="box"]')),VS(_(e),mS,e.shadowRoot.querySelector('[part~="preview-box"]')),VS(_(e),gS,e.shadowRoot.querySelector('[part~="current-box"]'));var r=getComputedStyle(_(e));return VS(_(e),yS,parseInt(r.getPropertyValue("--media-box-padding-left"))),VS(_(e),bS,parseInt(r.getPropertyValue("--media-box-padding-right"))),VS(_(e),fS,new dS(e.range,BS(_(e),SS),60)),e}
2return I(n,[{key:"connectedCallback",value:function(){var e;y(S(n.prototype),"connectedCallback",this).call(this),this.range.setAttribute("aria-label",py("seek")),BS(this,kS).call(this),VS(this,hS,this.getRootNode()),null==(e=BS(this,hS))||e.addEventListener("transitionstart",this)}},{key:"disconnectedCallback",value:function(){var e;y(S(n.prototype),"disconnectedCallback",this).call(this),BS(this,fS).stop(),null==(e=BS(this,hS))||e.removeEventListener("transitionstart",this),VS(this,hS,null)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),t!=s&&(e===Wg.MEDIA_CURRENT_TIME||e===Wg.MEDIA_PAUSED||e===Wg.MEDIA_ENDED||e===Wg.MEDIA_LOADING||e===Wg.MEDIA_DURATION||e===Wg.MEDIA_SEEKABLE?(BS(this,fS).update({start:WS(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),BS(this,kS).call(this),function(i){var e=i.range,t=my(+qS(i)),s=my(+i.mediaSeekableEnd),n=t&&s?py("{currentTime} of {totalTime}",{currentTime:t,totalTime:s}):py("video not loaded, unknown time.");e.setAttribute("aria-valuetext",n)}(this)):e===Wg.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===Wg.MEDIA_DURATION||e===Wg.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=BS(this,ES),this.updateBar()))}},{key:"mediaChaptersCues",get:function(){return BS(this,ES)},set:function(e){var t,n=this;VS(this,ES,e),this.updateSegments(null==(t=BS(this,ES))?void 0:t.map((function(s){return{start:WS(n,s.startTime),end:WS(n,s.endTime)}})))}},{key:"mediaPaused",get:function(){return Ky(this,Wg.MEDIA_PAUSED)},set:function(e){Yy(this,Wg.MEDIA_PAUSED,e)}},{key:"mediaLoading",get:function(){return Ky(this,Wg.MEDIA_LOADING)},set:function(e){Yy(this,Wg.MEDIA_LOADING,e)}},{key:"mediaDuration",get:function(){return qy(this,Wg.MEDIA_DURATION)},set:function(e){Gy(this,Wg.MEDIA_DURATION,e)}},{key:"mediaCurrentTime",get:function(){return qy(this,Wg.MEDIA_CURRENT_TIME)},set:function(e){Gy(this,Wg.MEDIA_CURRENT_TIME,e)}},{key:"mediaPlaybackRate",get:function(){return qy(this,Wg.MEDIA_PLAYBACK_RATE,1)},set:function(e){Gy(this,Wg.MEDIA_PLAYBACK_RATE,e)}},{key:"mediaBuffered",get:function(){var e=this.getAttribute(Wg.MEDIA_BUFFERED);return e?e.split(" ").map((function(e){return e.split(":").map((function(s){return+s}))})):[]},set:function(e){if(e){var t=e.map((function(s){return s.join(":")})).join(" ");this.setAttribute(Wg.MEDIA_BUFFERED,t)}else this.removeAttribute(Wg.MEDIA_BUFFERED)}},{key:"mediaSeekable",get:function(){var e=this.getAttribute(Wg.MEDIA_SEEKABLE);if(e)return e.split(":").map((function(e){return+e}))},set:function(e){null!=e?this.setAttribute(Wg.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(Wg.MEDIA_SEEKABLE)}},{key:"mediaSeekableEnd",get:function(){var e,t=null!=(e=this.mediaSeekable)?e:[],n=m(t,2)[1];return void 0===n?this.mediaDuration:n}},{key:"mediaSeekableStart",get:function(){var e,t=null!=(e=this.mediaSeekable)?e:[],n=m(t,1)[0];return void 0===n?0:n}},{key:"mediaPreviewImage",get:function(){return $y(this,Wg.MEDIA_PREVIEW_IMAGE)},set:function(e){Qy(this,Wg.MEDIA_PREVIEW_IMAGE,e)}},{key:"mediaPreviewTime",get:function(){return qy(this,Wg.MEDIA_PREVIEW_TIME)},set:function(e){Gy(this,Wg.MEDIA_PREVIEW_TIME,e)}},{key:"mediaEnded",get:function(){return Ky(this,Wg.MEDIA_ENDED)},set:function(e){Yy(this,Wg.MEDIA_ENDED,e)}},{key:"updateBar",value:function(){y(S(n.prototype),"updateBar",this).call(this),this.updateBufferedBar(),this.updateCurrentBox()}},{key:"updateBufferedBar",value:function(){var e,t=this.mediaBuffered;if(t.length){var s;if(this.mediaEnded)s=1;else{var n=this.mediaCurrentTime,r=null!=(e=t.find((function(e){var t=m(e,2),r=t[0],o=t[1];return r<=n&&n<=o})))?e:[],o=m(r,2)[1],a=void 0===o?this.mediaSeekableStart:o;s=WS(this,a)}Hy(this.shadowRoot,"#buffered").style.setProperty("width","".concat(100*s,"%"))}}},{key:"updateCurrentBox",value:function(){if(this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length){var e=Hy(this.shadowRoot,"#current-rail"),s=Hy(this.shadowRoot,'[part~="current-box"]'),t=HS(this,AS,IS).call(this,BS(this,gS)),n=HS(this,RS,OS).call(this,t,this.range.valueAsNumber),a=HS(this,LS,DS).call(this,t,this.range.valueAsNumber);e.style.transform="translateX(".concat(n,")"),e.style.setProperty("--_range-width","".concat(t.range.width)),s.style.setProperty("--_box-shift","".concat(a)),s.style.setProperty("--_box-width","".concat(t.box.width,"px")),s.style.setProperty("visibility","initial")}}},{key:"handleEvent",value:function(e){var t=this;switch(y(S(n.prototype),"handleEvent",this).call(this,e),e.type){case"input":HS(this,NS,US).call(this);break;case"pointermove":HS(this,xS,CS).call(this,e);break;case"pointerup":BS(this,_S)&&VS(this,_S,!1);break;case"pointerdown":VS(this,_S,!0);break;case"pointerleave":HS(this,MS,PS).call(this,null);break;case"transitionstart":Uy(e.target,this)&&setTimeout((function(){return BS(t,kS).call(t)}),0)}}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_PAUSED,Wg.MEDIA_DURATION,Wg.MEDIA_SEEKABLE,Wg.MEDIA_CURRENT_TIME,Wg.MEDIA_PREVIEW_IMAGE,Wg.MEDIA_PREVIEW_TIME,Wg.MEDIA_PREVIEW_CHAPTER,Wg.MEDIA_BUFFERED,Wg.MEDIA_PLAYBACK_RATE,Wg.MEDIA_LOADING,Wg.MEDIA_ENDED])}}]),n}(Zk);hS=new WeakMap,fS=new WeakMap,pS=new WeakMap,vS=new WeakMap,mS=new WeakMap,gS=new WeakMap,yS=new WeakMap,bS=new WeakMap,ES=new WeakMap,_S=new WeakMap,kS=new WeakMap,TS=new WeakSet,wS=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&Vy(this)},SS=new WeakMap,AS=new WeakSet,IS=function(i){var e,s=(null!=(e=this.getAttribute("bounds")?Fy(this,"#".concat(this.getAttribute("bounds"))):this.parentElement)?e:this).getBoundingClientRect(),t=this.range.getBoundingClientRect(),n=i.offsetWidth;return{box:{width:n,min:-(t.left-s.left-n/2),max:s.right-t.left-n/2},bounds:s,range:t}},RS=new WeakSet,OS=function(i,e){var t="".concat(100*e,"%"),n=i.box,s=n.width,r=n.min,o=n.max;if(!s)return t;if(Number.isNaN(r)||(t="max(".concat("calc(1 / var(--_range-width) * 100 * ".concat(r,"% + var(--media-box-padding-left))"),", ",t,")")),!Number.isNaN(o)){var c="calc(1 / var(--_range-width) * 100 * ".concat(o,"% - var(--media-box-padding-right))");t="min(".concat(t,", ").concat(c,")")}return t},LS=new WeakSet,DS=function(i,e){var t=i.box,n=t.width,s=t.min,r=t.max,o=e*i.range.width;if(o<s+BS(this,yS)){var a=i.range.left-i.bounds.left-BS(this,yS);return"".concat(o-n/2+a,"px")}if(o>r-BS(this,bS)){var c=i.bounds.right-i.range.right-BS(this,bS);return"".concat(o+n/2-c-i.range.width,"px")}
2return 0},xS=new WeakSet,CS=function(i){var e=v(BS(this,pS)).some((function(u){return i.composedPath().includes(u)}));if(this.dragging||!e&&i.composedPath().includes(this)){var t=this.mediaSeekableEnd;if(t){var s=Hy(this.shadowRoot,"#preview-rail"),n=Hy(this.shadowRoot,'[part~="preview-box"]'),r=HS(this,AS,IS).call(this,BS(this,mS)),a=(i.clientX-r.range.left)/r.range.width;a=Math.max(0,Math.min(1,a));var o=HS(this,RS,OS).call(this,r,a),c=HS(this,LS,DS).call(this,r,a);s.style.transform="translateX(".concat(o,")"),s.style.setProperty("--_range-width","".concat(r.range.width)),n.style.setProperty("--_box-shift","".concat(c)),n.style.setProperty("--_box-width","".concat(r.box.width,"px"));var l=Math.round(BS(this,vS))-Math.round(a*t);Math.abs(l)<1&&a>.01&&a<.99||(VS(this,vS,a*t),HS(this,MS,PS).call(this,BS(this,vS)))}}else HS(this,MS,PS).call(this,null)},MS=new WeakSet,PS=function(i){this.dispatchEvent(new Sy.CustomEvent(Fg.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:i}))},NS=new WeakSet,US=function(){BS(this,fS).stop();var i=qS(this);this.dispatchEvent(new Sy.CustomEvent(Fg.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:i}))},GS.shadowRootOptions={mode:"open"},GS.getContainerTemplateHTML=function(i){return'\n    <style>\n      :host {\n        --media-box-border-radius: 4px;\n        --media-box-padding-left: 10px;\n        --media-box-padding-right: 10px;\n        --media-preview-border-radius: var(--media-box-border-radius);\n        --media-box-arrow-offset: var(--media-box-border-radius);\n        --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n        --_preview-background: var(--media-preview-background, var(--_control-background));\n\n        \n        contain: layout;\n      }\n\n      #buffered {\n        background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));\n        position: absolute;\n        height: 100%;\n        will-change: width;\n      }\n\n      #preview-rail,\n      #current-rail {\n        width: 100%;\n        position: absolute;\n        left: 0;\n        bottom: 100%;\n        pointer-events: none;\n        will-change: transform;\n      }\n\n      [part~="box"] {\n        width: min-content;\n        \n        position: absolute;\n        bottom: 100%;\n        flex-direction: column;\n        align-items: center;\n        transform: translateX(-50%);\n      }\n\n      [part~="current-box"] {\n        display: var(--media-current-box-display, var(--media-box-display, flex));\n        margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));\n        visibility: hidden;\n      }\n\n      [part~="preview-box"] {\n        display: var(--media-preview-box-display, var(--media-box-display, flex));\n        margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));\n        transition-property: var(--media-preview-transition-property, visibility, opacity);\n        transition-duration: var(--media-preview-transition-duration-out, .25s);\n        transition-delay: var(--media-preview-transition-delay-out, 0s);\n        visibility: hidden;\n        opacity: 0;\n      }\n\n      :host(:is(['.concat(Wg.MEDIA_PREVIEW_IMAGE,"], [").concat(Wg.MEDIA_PREVIEW_TIME,'])[dragging]) [part~="preview-box"] {\n        transition-duration: var(--media-preview-transition-duration-in, .5s);\n        transition-delay: var(--media-preview-transition-delay-in, .25s);\n        visibility: visible;\n        opacity: 1;\n      }\n\n      @media (hover: hover) {\n        :host(:is([').concat(Wg.MEDIA_PREVIEW_IMAGE,"], [").concat(Wg.MEDIA_PREVIEW_TIME,']):hover) [part~="preview-box"] {\n          transition-duration: var(--media-preview-transition-duration-in, .5s);\n          transition-delay: var(--media-preview-transition-delay-in, .25s);\n          visibility: visible;\n          opacity: 1;\n        }\n      }\n\n      media-preview-thumbnail,\n      ::slotted(media-preview-thumbnail) {\n        visibility: hidden;\n        \n        transition: visibility 0s .25s;\n        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
2\n        background: var(--media-preview-thumbnail-background, var(--_preview-background));\n        box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));\n        max-width: var(--media-preview-thumbnail-max-width, 180px);\n        max-height: var(--media-preview-thumbnail-max-height, 160px);\n        min-width: var(--media-preview-thumbnail-min-width, 120px);\n        min-height: var(--media-preview-thumbnail-min-height, 80px);\n        border: var(--media-preview-thumbnail-border);\n        border-radius: var(--media-preview-thumbnail-border-radius,\n          var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);\n      }\n\n      :host([').concat(Wg.MEDIA_PREVIEW_IMAGE,"][dragging]) media-preview-thumbnail,\n      :host([").concat(Wg.MEDIA_PREVIEW_IMAGE,"][dragging]) ::slotted(media-preview-thumbnail) {\n        transition-delay: var(--media-preview-transition-delay-in, .25s);\n        visibility: visible;\n      }\n\n      @media (hover: hover) {\n        :host([").concat(Wg.MEDIA_PREVIEW_IMAGE,"]:hover) media-preview-thumbnail,\n        :host([").concat(Wg.MEDIA_PREVIEW_IMAGE,"]:hover) ::slotted(media-preview-thumbnail) {\n          transition-delay: var(--media-preview-transition-delay-in, .25s);\n          visibility: visible;\n        }\n\n        :host([").concat(Wg.MEDIA_PREVIEW_TIME,"]:hover) {\n          --media-time-range-hover-display: block;\n        }\n      }\n\n      media-preview-chapter-display,\n      ::slotted(media-preview-chapter-display) {\n        font-size: var(--media-font-size, 13px);\n        line-height: 17px;\n        min-width: 0;\n        visibility: hidden;\n        \n        transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;\n        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n        background: var(--media-preview-chapter-background, var(--_preview-background));\n        border-radius: var(--media-preview-chapter-border-radius,\n          var(--media-preview-border-radius) var(--media-preview-border-radius)\n          var(--media-preview-border-radius) var(--media-preview-border-radius));\n        padding: var(--media-preview-chapter-padding, 3.5px 9px);\n        margin: var(--media-preview-chapter-margin, 0 0 5px);\n        text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));\n      }\n\n      :host([").concat(Wg.MEDIA_PREVIEW_IMAGE,"]) media-preview-chapter-display,\n      :host([").concat(Wg.MEDIA_PREVIEW_IMAGE,"]) ::slotted(media-preview-chapter-display) {\n        transition-delay: var(--media-preview-transition-delay-in, .25s);\n        border-radius: var(--media-preview-chapter-border-radius, 0);\n        padding: var(--media-preview-chapter-padding, 3.5px 9px 0);\n        margin: var(--media-preview-chapter-margin, 0);\n        min-width: 100%;\n      }\n\n      media-preview-chapter-display[").concat(Wg.MEDIA_PREVIEW_CHAPTER,"],\n      ::slotted(media-preview-chapter-display[").concat(Wg.MEDIA_PREVIEW_CHAPTER,"]) {\n        visibility: visible;\n      }\n\n      media-preview-chapter-display:not([aria-valuetext]),\n      ::slotted(media-preview-chapter-display:not([aria-valuetext])) {\n        display: none;\n      }\n\n      media-preview-time-display,\n      ::slotted(media-preview-time-display),\n      media-time-display,\n      ::slotted(media-time-display) {\n        font-size: var(--media-font-size, 13px);\n        line-height: 17px;\n        min-width: 0;\n        \n        transition: min-width 0s, border-radius 0s;\n        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n        background: var(--media-preview-time-background, var(--_preview-background));\n        border-radius: var(--media-preview-time-border-radius,\n          var(--media-preview-border-radius) var(--media-preview-border-radius)\n          var(--media-preview-border-radius) var(--media-preview-border-radius));\n        padding: var(--media-preview-time-padding, 3.5px 9px);\n        margin: var(--media-preview-time-margin, 0);\n        text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));\n        transform: translateX(min(\n          max(calc(50% - var(--_box-width) / 2),\n          calc(var(--_box-shift, 0))),\n          calc(var(--_box-width) / 2 - 50%)\n        ));\n      }\n\n      :host([").concat(Wg.MEDIA_PREVIEW_IMAGE,"]) media-preview-time-display,\n      :host([").concat(Wg.MEDIA_PREVIEW_IMAGE,"]) ::slotted(media-preview-time-display) {\n        transition-delay: var(--media-preview-transition-delay-in, .25s);\n        border-radius: var(--media-preview-time-border-radius,\n          0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));\n        min-width: 100%;\n      }\n\n      :host([").concat(Wg.MEDIA_PREVIEW_TIME,']:hover) {\n        --media-time-range-hover-display: block;\n      }\n\n      [part~="arrow"],\n      ::slotted([part~="arrow"]) {\n        display: var(--media-box-arrow-display, inline-block);\n        transform: translateX(min(\n          max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),\n          calc(var(--_box-shift, 0))),\n          calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))\n        ));\n        \n        border-color: transparent;\n        border-top-color: var(--media-box-arrow-background, var(--_control-background));\n        border-width: var(--media-box-arrow-border-width,\n          var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);\n        border-style: solid;\n        justify-content: center;\n        height: 0;\n      }\n    </style>\n    <div id="preview-rail">\n      <slot name="preview" part="box preview-box">
2\n        <media-preview-thumbnail>\n          <template shadowrootmode="').concat(Ew.shadowRootOptions.mode,'">\n            ').concat(Ew.getTemplateHTML({}),'\n          </template>\n        </media-preview-thumbnail>\n        <media-preview-chapter-display></media-preview-chapter-display>\n        <media-preview-time-display></media-preview-time-display>\n        <slot name="preview-arrow"><div part="arrow"></div></slot>\n      </slot>\n    </div>\n    <div id="current-rail">\n      <slot name="current" part="box current-box">\n        \n      </slot>\n    </div>\n  ')},Sy.customElements.get("media-time-range")||Sy.customElements.define("media-time-range",GS);var KS,YS=function(i,e,t){return function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)}(i,e,"read from private field"),t?t.call(i):e.get(i)},$S=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},QS=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.apply(this,arguments),$S(_(e),KS,(function(){var t=e.range.value,n=new Sy.CustomEvent(Fg.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(n)})),e}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.range.setAttribute("aria-label",py("volume")),this.range.addEventListener("input",YS(this,KS))}},{key:"disconnectedCallback",value:function(){this.range.removeEventListener("input",YS(this,KS)),y(S(n.prototype),"disconnectedCallback",this).call(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),(e===Wg.MEDIA_VOLUME||e===Wg.MEDIA_MUTED)&&(this.range.valueAsNumber=function(i){return i.mediaMuted?0:i.mediaVolume}(this),this.range.setAttribute("aria-valuetext",function(i){return"".concat(Math.round(100*i),"%")}(this.range.valueAsNumber)),this.updateBar())}},{key:"mediaVolume",get:function(){return qy(this,Wg.MEDIA_VOLUME,
21)},set:function(e){Gy(this,Wg.MEDIA_VOLUME,e)}},{key:"mediaMuted",get:function(){return Ky(this,Wg.MEDIA_MUTED)},set:function(e){Yy(this,Wg.MEDIA_MUTED,e)}},{key:"mediaVolumeUnavailable",get:function(){return $y(this,Wg.MEDIA_VOLUME_UNAVAILABLE)},set:function(e){Qy(this,Wg.MEDIA_VOLUME_UNAVAILABLE,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_VOLUME,Wg.MEDIA_MUTED,Wg.MEDIA_VOLUME_UNAVAILABLE])}}]),n}(Zk);KS=new WeakMap,Sy.customElements.get("media-volume-range")||Sy.customElements.define("media-volume-range",QS);var zS=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),(e=t.apply(this,arguments)).container=null,e}return I(n,[{key:"connectedCallback",value:function(){var e;y(S(n.prototype),"connectedCallback",this).call(this),this.container=(null==(e=this.shadowRoot)?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=py("Loop"))}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}},{key:"mediaLoop",get:function(){return Ky(this,Wg.MEDIA_LOOP)},set:function(e){Yy(this,Wg.MEDIA_LOOP,e)}},{key:"handleClick",value:function(){var e=!this.mediaLoop,t=new Sy.CustomEvent(Fg.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_LOOP])}}]),n}(G_);zS.getSlotTemplateHTML=function(i){return"\n      <style>\n        :host {\n          min-width: 4ch;\n          padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n          width: 100%;\n          display: grid;\n          grid-template-columns: 1fr auto;\n          gap: 1rem;\n          font-weight: var(--media-button-font-weight, normal);\n        }\n\n        #checked-indicator {\n          display: none;\n        }\n\n        :host([".concat(Wg.MEDIA_LOOP,']) #checked-indicator {\n          display: block;\n        }\n      </style>\n      \n      <span id="icon">\n     </span>\n\n      <div id="checked-indicator">\n        <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">\n          <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>\n        </svg>\n      </div>\n    ')},zS.getTooltipContentHTML=function(){return py("Loop")},Sy.customElements.get("media-loop-button")||Sy.customElements.define("media-loop-button",zS);var XS,JS,ZS,td,eA,tA,nA,rA,iA,aA,oA,sA=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},uA=function(i,e,t){return sA(i,e,"read from private field"),t?t.call(i):e.get(i)},cA=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},lA=function(i,e,t,s){return sA(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},dA={processCallback:function(i,e,t){if(t){var n,r=C(e);try{for(r.s();!(n=r.n()).done;){var o=m(n.value,2),s=o[0],c=o[1];if(s in t){var l=t[s];"boolean"==typeof l&&c instanceof bA&&"boolean"==typeof c.element[c.attributeName]?c.booleanValue=l:"function"==typeof l&&c instanceof bA?c.element[c.attributeName]=l:c.value=l}}}catch(e){r.e(e)}finally{r.f()}}}},hA=function(e){T(n,e);var t=P(n);function n(e,r){var o,c,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dA;return A(this,n),o=t.call(this),cA(_(o),XS,void 0),cA(_(o),JS,void 0),o.append(e.content.cloneNode(!0)),lA(_(o),XS,fA(_(o))),lA(_(o),JS,s),null==(c=s.createCallback)||c.call(s,_(o),uA(_(o),XS),r),s.processCallback(_(o),uA(_(o),XS),r),o}return I(n,[{key:"update",value:function(e){uA(this,JS).processCallback(this,uA(this,XS),e)}}]),n}(Sy.DocumentFragment);XS=new WeakMap,JS=new WeakMap;var fA=function e(i){var t,s,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=C(i.attributes||[]);try{for(o.s();!(n=o.n()).done;){var c=n.value;if(c.value.includes("{{")){var l,d=new yA,h=C(vA(c.value));try{for(h.s();!(l=h.n()).done;){var f=m(l.value,2);if(t=f[0],s=f[1],t){var a=new bA(i,c.name,c.namespaceURI);d.append(a),r.push([s,a])}else d.append(s)}}catch(e){h.e(e)}finally{h.f()}c.value=d.toString()}}}catch(e){o.e(e)}finally{o.f()}var y,E=C(i.childNodes);try{for(E.s();!(y=E.n()).done;){var _=y.value;if(1!==_.nodeType||_ instanceof HTMLTemplateElement){var k=_.data;if(1===_.nodeType||k.includes("{{")){var T=[];
2if(k){var w,S=C(vA(k));try{for(S.s();!(w=S.n()).done;){var A=m(w.value,2);if(t=A[0],s=A[1],t){var I=new EA(i);T.push(I),r.push([s,I])}else T.push(new Text(s))}}catch(e){S.e(e)}finally{S.f()}}else if(_ instanceof HTMLTemplateElement){var R=new _A(i,_);T.push(R),r.push([R.expression,R])}_.replaceWith.apply(_,v(T.flatMap((function(e){return e.replacementNodes||[e]}))))}}else e(_,r)}}catch(e){E.e(e)}finally{E.f()}return r},pA={},vA=function(i){var e,t="",n=0,s=pA[i],r=0;if(s)return s;for(s=[];e=i[r];r++)"{"===e&&"{"===i[r+1]&&"\\"!==i[r-1]&&i[r+2]&&1==++n?(t&&s.push([0,t]),t="",r++):"}"!==e||"}"!==i[r+1]||"\\"===i[r-1]||--n?t+=e||"":(s.push([1,t.trim()]),t="",r++);return t&&s.push([0,(n>0?"{{":"")+t]),pA[i]=s},mA=function(){function e(){A(this,e)}return I(e,[{key:"value",get:function(){return""},set:function(e){}},{key:"toString",value:function(){return this.value}}]),e}(),gA=new WeakMap,yA=function(){function e(){A(this,e),cA(this,ZS,[])}return I(e,[{key:Symbol.iterator,value:function(){return uA(this,ZS).values()}},{key:"length",get:function(){return uA(this,ZS).length}},{key:"item",value:function(e){return uA(this,ZS)[e]}},{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,o=t;r<o.length;r++){var c=o[r];c instanceof bA&&gA.set(c,this),uA(this,ZS).push(c)}}},{key:"toString",value:function(){return uA(this,ZS).join("")}}]),e}();ZS=new WeakMap;var bA=function(e){T(n,e);var t=P(n);function n(e,r,s){var o;return A(this,n),o=t.call(this),cA(_(o),rA),cA(_(o),td,""),cA(_(o),eA,void 0),cA(_(o),tA,void 0),cA(_(o),nA,void 0),lA(_(o),eA,e),lA(_(o),tA,r),lA(_(o),nA,s),o}return I(n,[{key:"attributeName",get:function(){return uA(this,tA)}},{key:"attributeNamespace",get:function(){return uA(this,nA)}},{key:"element",get:function(){return uA(this,eA)}},{key:"value",get:function(){return uA(this,td)},set:function(e){uA(this,td)!==e&&(lA(this,td,e),uA(this,rA,iA)&&1!==uA(this,rA,iA).length?uA(this,eA).setAttributeNS(uA(this,nA),uA(this,tA),uA(this,rA,iA).toString()):null==e?uA(this,eA).removeAttributeNS(uA(this,nA),uA(this,tA)):uA(this,eA).setAttributeNS(uA(this,nA),uA(this,tA),e))}},{key:"booleanValue",get:function(){return uA(this,eA).hasAttributeNS(uA(this,nA),uA(this,tA))},set:function(e){if(uA(this,rA,iA)&&1!==uA(this,rA,iA).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}]),n}(mA);td=new WeakMap,eA=new WeakMap,tA=new WeakMap,nA=new WeakMap,rA=new WeakSet,iA=function(){return gA.get(this)};var EA=function(e){T(n,e);var t=P(n);function n(e,r){var o;return A(this,n),o=t.call(this),cA(_(o),aA,void 0),cA(_(o),oA,void 0),lA(_(o),aA,e),lA(_(o),oA,r?v(r):[new Text]),o}return I(n,[{key:"replacementNodes",get:function(){return uA(this,oA)}},{key:"parentNode",get:function(){return uA(this,aA)}},{key:"nextSibling",get:function(){return uA(this,oA)[uA(this,oA).length-1].nextSibling}},{key:"previousSibling",get:function(){return uA(this,oA)[0].previousSibling}},{key:"value",get:function(){return uA(this,oA).map((function(e){return e.textContent})).join("")},set:function(e){this.replace(e)}},{key:"replace",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.flat().flatMap((function(s){return null==s?[new Text]:s.forEach?v(s):11===s.nodeType?v(s.childNodes):s.nodeType?[s]:[new Text(s)]}));r.length||r.push(new Text),lA(this,oA,kA(uA(this,oA)[0].parentNode,uA(this,oA),r,this.nextSibling))}}]),n}(mA);aA=new WeakMap,oA=new WeakMap;var _A=function(e){T(n,e);var t=P(n);function n(e,r){var o;A(this,n);var s=r.getAttribute("directive")||r.getAttribute("type"),c=r.getAttribute("expression")||r.getAttribute(s)||"";return c.startsWith("{{")&&(c=c.trim().slice(2,-2).trim()),(o=t.call(this,e)).expression=c,o.template=r,o.directive=s,o}return I(n)}(EA);function kA(i,e,t){for(var n,a,r,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=0,c=t.length,l=e.length;o<c&&o<l&&e[o]==t[o];)o++;for(;o<c&&o<l&&t[c-1]==e[l-1];)s=t[(--l,--c)];if(o==l)for(;o<c;)i.insertBefore(t[o++],s);if(o==c)for(;o<l;)i.removeChild(e[o++]);else{for(n=e[o];o<c;)r=t[o++],a=n?n.nextSibling:s,n==r?n=a:o<c&&t[o]==a?(i.replaceChild(r,n),n=a):i.insertBefore(r,n);for(;n!=s;)a=n.nextSibling,i.removeChild(n),n=a}return t}var TA={string:function(i){return String(i)}},wA=I((function e(t){A(this,e),this.template=t,this.state=void 0})),SA=new WeakMap,AA=new WeakMap,IA={partial:function(i,e){e[i.expression]=new wA(i.template)},if:function(i,e){var t;if(xA(i.expression,e))if(SA.get(i)!==i.template){SA.set(i,i.template);var s=new hA(i.template,e,OA);i.replace(s),AA.set(i,s)}else null==(t=AA.get(i))||t.update(e);else i.replace(""),SA.delete(i),AA.delete(i)}},RA=Object.keys(IA),OA={processCallback:function(i,e,t){var s,n;if(t){var r,o=C(e);try{var c=function(){var e=m(r.value,2),o=e[0],a=e[1];if(a instanceof _A){if(!a.directive){var c=RA.find((function(e){return a.template.hasAttribute(e)}));c&&(a.directive=c,a.expression=a.template.getAttribute(c))}return null==(s=IA[a.directive])||s.call(IA,a,t),"continue"}var l=xA(o,t);if(l instanceof wA)return SA.get(a)!==l.template?(SA.set(a,l.template),l=new hA(l.template,l.state,OA),a.value=l,AA.set(a,l)):null==(n=AA.get(a))||n.update(l.state),"continue";l?(a instanceof bA&&a.attributeName.startsWith("aria-")&&(l=String(l)),a instanceof bA?"boolean"==typeof l?a.booleanValue=l:"function"==typeof l?a.element[a.attributeName]=l:a.value=l:(a.value=l,SA.delete(a),AA.delete(a))):a instanceof bA?a.value=void 0:(a.value=void 0,SA.delete(a),AA.delete(a))};for(o.s();!(r=o.n()).done;)c()}catch(e){o.e(e)}finally{o.f()}}}},LA={"!":function(i){return!i},"!!":function(i){return!!i},"==":function(i,e){return i==e},"!=":function(i,e){return i!=e},">":function(i,e){return i>e},">=":function(i,e){return i>=e},"<":function(i,e){return i<e},"<=":function(i,e){return i<=e},"??":function(i,e){return null!=i?i:e},"|":function(i,e){var t;return null==(t=TA[e])?void 0:t.call(TA,i)}};function DA(i){return function(i,e){for(var t,s,n,r=[];i;){for(var a in n=null,t=i.length,e)(s=e[a].exec(i))&&s.index<t&&(n={token:s[0],type:a,matches:s.slice(1)},t=s.index);t&&r.push({token:i.substr(0,t),type:void 0}),n&&r.push(n),i=i.substr(t+(n?n.token.length:0))}return r}(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter((function(e){return"ws"!==e.type}))}function xA(i){var e,s,t,n,a,r,o,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=DA(i);if(0===l.length||l.some((function(e){return!e.type})))return CA(i);if(">"===(null==(e=l[0])?void 0:e.token)){var u=c[null==(s=l[1])?void 0:s.token];if(!u)return CA(i);var d=x({},c);u.state=d;for(var h=l.slice(2),f=0;f<h.length;f+=3){var v=null==(t=h[f])?void 0:t.token,p=null==(n=h[f+1])?void 0:n.token,g=null==(a=h[f+2])?void 0:a.token;
2v&&"="===p&&(d[v]=PA(g,c))}return u}if(1===l.length)return MA(l[0])?PA(l[0].token,c):CA(i);if(2===l.length){var m=null==(r=l[0])?void 0:r.token,y=LA[m];if(!y||!MA(l[1]))return CA(i);var E=PA(l[1].token,c);return y(E)}if(3===l.length){var _=null==(o=l[1])?void 0:o.token,k=LA[_];if(!k||!MA(l[0])||!MA(l[2]))return CA(i);var T=PA(l[0].token,c);if("|"===_)return k(T,l[2].token);var w=PA(l[2].token,c);return k(T,w)}}function CA(i){return console.warn("Warning: invalid expression `".concat(i,"`")),!1}function MA(e){var i=e.type;return["number","boolean","string","param"].includes(i)}function PA(i,e){var t=i[0],s=i.slice(-1);return"true"===i||"false"===i?"true"===i:t===s&&["'",'"'].includes(t)?i.slice(1,-1):uy(i)?parseFloat(i):e[i]}var NA,UA,FA,BA,jA,VA,HA,WA,qA,GA=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},KA=function(i,e,t){return GA(i,e,"read from private field"),t?t.call(i):e.get(i)},YA=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},$A=function(i,e,t,s){return GA(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},QA=function(i,e,t){return GA(i,e,"access private method"),t},zA={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},XA=Ay.createElement("template");
2XA.innerHTML="\n  <style>\n    :host {\n      display: inline-block;\n      line-height: 0;\n    }\n\n    media-controller {\n      width: 100%;\n      height: 100%;\n    }\n\n    media-captions-button:not([mediasubtitleslist]),\n    media-captions-menu:not([mediasubtitleslist]),\n    media-captions-menu-button:not([mediasubtitleslist]),\n    media-audio-track-menu[mediaaudiotrackunavailable],\n    media-audio-track-menu-button[mediaaudiotrackunavailable],\n    media-rendition-menu[mediarenditionunavailable],\n    media-rendition-menu-button[mediarenditionunavailable],\n    media-volume-range[mediavolumeunavailable],\n    media-airplay-button[mediaairplayunavailable],\n    media-fullscreen-button[mediafullscreenunavailable],\n    media-cast-button[mediacastunavailable],\n    media-pip-button[mediapipunavailable] {\n      display: none;\n    }\n  </style>\n";var JA=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.call(this),YA(_(e),jA),YA(_(e),HA),YA(_(e),NA,void 0),YA(_(e),UA,void 0),YA(_(e),FA,void 0),YA(_(e),BA,void 0),YA(_(e),qA,void 0),e.shadowRoot?e.renderRoot=e.shadowRoot:(e.renderRoot=e.attachShadow({mode:"open"}),e.createRenderer()),$A(_(e),BA,new MutationObserver((function(t){var n;e.mediaController&&(null==(n=e.mediaController)||!n.breakpointsComputed)||t.some((function(s){var t=s.target;return t===_(e)||"media-controller"===t.localName&&!(!zA[s.attributeName]&&!s.attributeName.startsWith("breakpoint"))}))&&e.render()}))),$A(_(e),qA,e.render.bind(_(e))),QA(_(e),jA,VA).call(_(e),"template"),e}return I(n,[{key:"mediaController",get:function(){return this.renderRoot.querySelector("media-controller")}},{key:"template",get:function(){var e;return null!=(e=KA(this,NA))?e:this.constructor.template},set:function(e){null!==e?"string"==typeof e?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&($A(this,NA,e),$A(this,FA,null),this.createRenderer()):this.removeAttribute("template")}},{key:"props",get:function(){var e,t,s,n,r={},o=C([].concat(v(Array.from(null!=(t=null==(e=this.mediaController)?void 0:e.attributes)?t:[]).filter((function(e){var a=e.name;return zA[a]||a.startsWith("breakpoint")}))),v(Array.from(this.attributes))));try{for(o.s();!(n=o.n()).done;){var a=n.value,c=null!=(s=zA[a.name])?s:oy(a.name),l=a.value;null!=l?(uy(l)&&(l=parseFloat(l)),r[c]=""===l||l):r[c]=!1}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"attributeChangedCallback",value:function(e,t,s){"template"===e&&t!=s&&QA(this,HA,WA).call(this)}},{key:"connectedCallback",value:function(){this.addEventListener(qg.BREAKPOINTS_COMPUTED,KA(this,qA)),KA(this,BA).observe(this,{attributes:!0}),KA(this,BA).observe(this.renderRoot,{attributes:!0,subtree:!0}),QA(this,HA,WA).call(this)}},{key:"disconnectedCallback",value:function(){this.removeEventListener(qg.BREAKPOINTS_COMPUTED,KA(this,qA)),KA(this,BA).disconnect()}},{key:"createRenderer",value:function(){this.template instanceof HTMLTemplateElement&&this.template!==KA(this,UA)&&($A(this,UA,this.template),this.renderer=new hA(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(XA.content.cloneNode(!0),this.renderer))}},{key:"render",value:function(){var e;null==(e=this.renderer)||e.update(this.props)}}]),n}(Sy.HTMLElement);function ZA(){return(ZA=f(regeneratorRuntime.mark((function e(i){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i);case 2:if(200===(t=e.sent).status){e.next=5;break}throw new Error("Failed to load resource: the server responded with a status of ".concat(t.status));case 5:return e.abrupt("return",t.text());case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function eI(e){var i=e.anchor,t=e.floating,n=e.placement,r=function(e,t){var n,i=e.anchor,r=e.floating,s="x"===function(i){return["top","bottom"].includes(nI(i))?"y":"x"}(t)?"y":"x",o="y"===s?"height":"width",c=nI(t),a=i.x+i.width/2-r.width/2,l=i.y+i.height/2-r.height/2,d=i[o]/2-r[o]/2;switch(c){case"top":n={x:a,y:i.y-r.height};break;case"bottom":n={x:a,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:l};break;case"left":n={x:i.x-r.width,y:l};break;default:n={x:i.x,y:i.y}}switch(t.split("-")[1]){case"start":n[s]-=d;break;case"end":n[s]+=d}return n}(function(e){var i=e.anchor,t=e.floating;return{anchor:tI(i,t.offsetParent),floating:{x:0,y:0,width:t.offsetWidth,height:t.offsetHeight}}}({anchor:i,floating:t}),n);return{x:r.x,y:r.y}}function tI(i,e){var t,s=i.getBoundingClientRect(),n=null!=(t=null==e?void 0:e.getBoundingClientRect())?t:{x:0,y:0};return{x:s.x-n.x,y:s.y-n.y,width:s.width,height:s.height}}function nI(i){return i.split("-")[0]}NA=new WeakMap,UA=new WeakMap,FA=new WeakMap,BA=new WeakMap,jA=new WeakSet,VA=function(i){if(Object.prototype.hasOwnProperty.call(this,i)){var e=this[i];delete this[i],this[i]=e}},HA=new WeakSet,WA=function(){var i,e=this,t=this.getAttribute("template");if(t&&t!==KA(this,FA)){var n=this.getRootNode(),s=null==(i=null==n?void 0:n.getElementById)?void 0:i.call(n,t);if(s)return $A(this,FA,t),$A(this,NA,s),void this.createRenderer();(function(i){if(!/^(\/|\.\/|https?:\/\/)/.test(i))return!1;var e=/^https?:\/\//.test(i)?void 0:location.origin;try{new URL(i,e)}catch(e){return!1}return!0})(t)&&($A(this,FA,t),function(e){return ZA.apply(this,arguments)}(t).then((function(t){var n=Ay.createElement("template");n.innerHTML=t,$A(e,NA,n),e.createRenderer()})).catch(console.error))}},qA=new WeakMap,JA.observedAttributes=["template"],JA.processor=OA,Sy.customElements.get("media-theme")||Sy.customElements.define("media-theme",JA);var rI,iI,aI,oI,sI,uI,dd,cI,lI,dI,hI,fI,pI,vI,mI,gI,yI,bI,EI,_I,kI,TI,wI,SI,AI,II,RI,OI,LI,DI,xI,CI,MI,PI,NI,UI,FI,BI,jI,VI,HI,WI,qI,GI,KI,YI,$I=function(e){T(n,e);var t=P(n);function n(e){var r,o=e.action,c=void 0===o?"auto":o,l=e.relatedTarget,s=d(e,O);return A(this,n),(r=t.call(this,"invoke",s)).action=c,r.relatedTarget=l,r}return I(n)}(E(Event)),QI=function(e){T(n,e);var t=P(n);function n(e){var r,o=e.newState,c=e.oldState,s=d(e,L);return A(this,n),(r=t.call(this,"toggle",s)).newState=o,r.oldState=c,r}return I(n)}(E(Event)),zI=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},XI=function(i,e,t){return zI(i,e,"read from private field"),t?t.call(i):e.get(i)},JI=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ZI=function(i,e,t,s){return zI(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},eR=function(i,e,t){return zI(i,e,"access private method"),t};function tR(e){var i=e.type,t=e.text,n=e.value,s=e.checked,r=Ay.createElement("media-chrome-menu-item");r.type=null!=i?i:"",r.part.add("menu-item"),i&&r.part.add(i),r.value=n,r.checked=s;var o=Ay.createElement("span");return o.textContent=t,r.append(o),r}function nR(i,e){var t=i.querySelector(':scope > [slot="'.concat(e,'"]'));if("SLOT"==(null==t?void 0:t.nodeName)&&(t=t.assignedElements({flatten:!0})[0]),t)return t=t.cloneNode(!0);var s=i.shadowRoot.querySelector('[name="'.concat(e,'"] > svg'));return s?s.cloneNode(!0):""}var rR="style",iR="hidden",aR="disabled",oR="anchor",dt=function(e){T(dt,e);var t=P(dt);function dt(){var e;if(A(this,dt),e=t.call(this),JI(_(e),cI),JI(_(e),dI),JI(_(e),pI),JI(_(e),mI),JI(_(e),yI),JI(_(e),EI),JI(_(e),wI),JI(_(e),AI),JI(_(e),RI),JI(_(e),LI),JI(_(e),xI),JI(_(e),MI),JI(_(e),NI),JI(_(e),FI),JI(_(e),jI),JI(_(e),HI),JI(_(e),qI),JI(_(e),KI),JI(_(e),rI,null),JI(_(e),iI,null),JI(_(e),aI,null),JI(_(e),oI,new Set),JI(_(e),sI,void 0),JI(_(e),uI,!1),JI(_(e),dd,null),JI(_(e),fI,(function(){var t,n=XI(_(e),oI),r=new Set(e.items),o=C(n);try{for(o.s();!(t=o.n()).done;){var s=t.value;r.has(s)||e.dispatchEvent(new CustomEvent("removemenuitem",{detail:s}))}}catch(e){o.e(e)}finally{o.f()}var c,l=C(r);try{for(l.s();!(c=l.n()).done;){var d=c.value;n.has(d)||e.dispatchEvent(new CustomEvent("addmenuitem",{detail:d}))}}catch(e){l.e(e)}finally{l.f()}ZI(_(e),oI,r)})),JI(_(e),kI,(function(){eR(_(e),wI,SI).call(_(e)),eR(_(e),AI,II).call(_(e),!1)})),JI(_(e),TI,(function(){eR(_(e),wI,SI).call(_(e))})),!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var n=xy(e.attributes);e.shadowRoot.innerHTML=e.constructor.getTemplateHTML(n)}return e.container=e.shadowRoot.querySelector("#container"),e.defaultSlot=e.shadowRoot.querySelector("slot:not([name])"),ZI(_(e),sI,new MutationObserver(XI(_(e),fI))),w(e)}return I(dt,[{key:"enable",value:function(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}},{key:"disable",value:function(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}},{key:"handleEvent",value:function(e){switch(e.type){case"slotchange":eR(this,cI,lI).call(this,e);break;case"invoke":eR(this,mI,gI).call(this,e);break;case"click":eR(this,RI,OI).call(this,e);break;case"toggle":eR(this,xI,CI).call(this,e);break;
2case"focusout":eR(this,NI,UI).call(this,e);break;case"keydown":eR(this,FI,BI).call(this,e)}}},{key:"connectedCallback",value:function(){var e,t;XI(this,sI).observe(this.defaultSlot,{childList:!0}),ZI(this,dd,Wy(this.shadowRoot,":host")),eR(this,pI,vI).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),ZI(this,rI,My(this)),null==(t=null==(e=XI(this,rI))?void 0:e.associateElement)||t.call(e,this),this.hidden||(Ly(uR(this),XI(this,kI)),Ly(this,XI(this,TI))),eR(this,dI,hI).call(this),this.shadowRoot.addEventListener("slotchange",this)}},{key:"disconnectedCallback",value:function(){var e,t;XI(this,sI).disconnect(),Dy(uR(this),XI(this,kI)),Dy(this,XI(this,TI)),this.disable(),null==(t=null==(e=XI(this,rI))?void 0:e.unassociateElement)||t.call(e,this),ZI(this,rI,null),ZI(this,iI,null),ZI(this,aI,null),this.shadowRoot.removeEventListener("slotchange",this)}},{key:"attributeChangedCallback",value:function(e,t,s){var n,r,a,o;e===iR&&s!==t?(XI(this,uI)||ZI(this,uI,!0),this.hidden?eR(this,EI,_I).call(this):eR(this,yI,bI).call(this),this.dispatchEvent(new QI({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===jg?(t&&(null==(r=null==(n=XI(this,rI))?void 0:n.unassociateElement)||r.call(n,this),ZI(this,rI,null)),s&&this.isConnected&&(ZI(this,rI,My(this)),null==(o=null==(a=XI(this,rI))?void 0:a.associateElement)||o.call(a,this))):e===aR&&s!==t?null==s?this.enable():this.disable():e===rR&&s!==t&&eR(this,pI,vI).call(this)}},{key:"formatMenuItemText",value:function(e,t){return this.constructor.formatMenuItemText(e,t)}},{key:"anchor",get:function(){return this.getAttribute("anchor")},set:function(e){this.setAttribute("anchor","".concat(e))}},{key:"anchorElement",get:function(){var e;return this.anchor?null==(e=jy(this))?void 0:e.querySelector("#".concat(this.anchor)):null}},{key:"items",get:function(){return this.defaultSlot.assignedElements({flatten:!0}).filter(sR)}},{key:"radioGroupItems",get:function(){return this.items.filter((function(e){return"menuitemradio"===e.role}))}},{key:"checkedItems",get:function(){return this.items.filter((function(e){return e.checked}))}},{key:"value",get:function(){var e,t;return null!=(t=null==(e=this.checkedItems[0])?void 0:e.value)?t:""},set:function(e){var t=this.items.find((function(s){return s.value===e}));t&&eR(this,KI,YI).call(this,t)}},{key:"focus",value:function(){if(ZI(this,iI,By()),this.items.length)return eR(this,qI,GI).call(this,this.items[0]),void this.items[0].focus();var e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==e||e.focus()}},{key:"handleSelect",value:function(e){var t,s=eR(this,jI,VI).call(this,e);s&&(eR(this,KI,YI).call(this,s,"checkbox"===s.type),XI(this,aI)&&!this.hidden&&(null==(t=XI(this,iI))||t.focus(),this.hidden=!0))}},{key:"keysUsed",get:function(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}},{key:"handleMove",value:function(e){var t,s,n=e.key,r=this.items,a=null!=(s=null!=(t=eR(this,jI,VI).call(this,e))?t:eR(this,HI,WI).call(this))?s:r[0],o=r.indexOf(a),c=Math.max(0,o);"ArrowDown"===n?c++:"ArrowUp"===n?c--:"Home"===e.key?c=0:"End"===e.key&&(c=r.length-1),c<0&&(c=r.length-1),c>r.length-1&&(c=0),eR(this,qI,GI).call(this,r[c]),r[c].focus()}}],[{key:"observedAttributes",get:function(){return[aR,iR,rR,oR,jg]}},{key:"formatMenuItemText",value:function(e,t){return e}}]),dt}(Sy.HTMLElement);function sR(i){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==i?void 0:i.role)}function uR(i){var e;return null!=(e=i.getAttribute("bounds")?Fy(i,"#".concat(i.getAttribute("bounds"))):Cy(i)||i.parentElement)?e:i}rI=new WeakMap,iI=new WeakMap,aI=new WeakMap,oI=new WeakMap,sI=new WeakMap,uI=new WeakMap,dd=new WeakMap,cI=new WeakSet,lI=function(i){var e,t=i.target,n=C(t.assignedNodes({flatten:!0}));try{for(n.s();!(e=n.n()).done;){var r=e.value;3===r.nodeType&&""===r.textContent.trim()&&r.remove()}}catch(e){n.e(e)}finally{n.f()}["header","title"].includes(t.name)&&eR(this,dI,hI).call(this),t.name||XI(this,fI).call(this)},dI=new WeakSet,hI=function(){var i=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');i.hidden=0===e.assignedNodes().length&&0===i.assignedNodes().length},fI=new WeakMap,pI=new WeakSet,vI=function(){var i,e=this.shadowRoot.querySelector("#layout-row"),t=null==(i=getComputedStyle(this).getPropertyValue("--media-menu-layout"))?void 0:i.trim();e.setAttribute("media","row"===t?"":"width:0")},mI=new WeakSet,gI=function(i){ZI(this,aI,i.relatedTarget),Uy(this,i.relatedTarget)||(this.hidden=!this.hidden)},yI=new WeakSet,bI=function(){var i,e=this;null==(i=XI(this,aI))||i.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",(function(){return e.focus()}),{once:!0}),Ly(uR(this),XI(this,kI)),Ly(this,XI(this,TI))},EI=new WeakSet,_I=function(){var i;
2null==(i=XI(this,aI))||i.setAttribute("aria-expanded","false"),Dy(uR(this),XI(this,kI)),Dy(this,XI(this,TI))},kI=new WeakMap,TI=new WeakMap,wI=new WeakSet,SI=function(i){if(!(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden)&&this.anchorElement){var e=eI({anchor:this.anchorElement,floating:this,placement:"top-start"}),t=e.x,n=e.y;null!=i||(i=this.offsetWidth);var r=uR(this).getBoundingClientRect(),o=r.width-t-i,a=r.height-n-this.offsetHeight,c=XI(this,dd).style;c.setProperty("position","absolute"),c.setProperty("right","".concat(Math.max(0,o),"px")),c.setProperty("--_menu-bottom","".concat(a,"px"));var l=getComputedStyle(this),u=c.getPropertyValue("--_menu-bottom")===l.bottom?a:parseFloat(l.bottom),d=r.height-u-parseFloat(l.marginBottom);this.style.setProperty("--_menu-max-height","".concat(d,"px"))}},AI=new WeakSet,II=function(i){var e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),t=null==e?void 0:e.querySelector('[role="menu"]'),s=XI(this,dd).style;if(i||s.setProperty("--media-menu-transition-in","none"),t){var n=t.offsetHeight,r=Math.max(t.offsetWidth,e.offsetWidth);this.style.setProperty("min-width","".concat(r,"px")),this.style.setProperty("min-height","".concat(n,"px")),eR(this,wI,SI).call(this,r)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),eR(this,wI,SI).call(this);s.removeProperty("--media-menu-transition-in")},RI=new WeakSet,OI=function(i){var e;if(i.stopPropagation(),i.composedPath().includes(XI(this,LI,DI)))return null==(e=XI(this,iI))||e.focus(),void(this.hidden=!0);var t=eR(this,jI,VI).call(this,i);!t||t.hasAttribute("disabled")||(eR(this,qI,GI).call(this,t),this.handleSelect(i))},LI=new WeakSet,DI=function(){var i;return null==(i=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))?void 0:i.find((function(e){return e.matches('button[part~="back"]')}))},xI=new WeakSet,CI=function(i){if(i.target!==this){eR(this,MI,PI).call(this);for(var e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]')),t=0,n=e;t<n.length;t++){var r=n[t];r.invokeTargetElement!=i.target&&"open"==i.newState&&"true"==r.getAttribute("aria-expanded")&&!r.invokeTargetElement.hidden&&r.invokeTargetElement.dispatchEvent(new $I({relatedTarget:r}))}for(var o=0,c=e;o<c.length;o++){var l=c[o];l.setAttribute("aria-expanded","".concat(!l.submenuElement.hidden))}eR(this,AI,II).call(this,!0)}},MI=new WeakSet,PI=function(){var e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},NI=new WeakSet,UI=function(i){var e;Uy(this,i.relatedTarget)||(XI(this,uI)&&(null==(e=XI(this,iI))||e.focus()),XI(this,aI)&&XI(this,aI)!==i.relatedTarget&&!this.hidden&&(this.hidden=!0))},FI=new WeakSet,BI=function(i){var e,t,s,n,r,a=i.key,o=i.ctrlKey,c=i.altKey,l=i.metaKey;if(!(o||c||l)&&this.keysUsed.includes(a))if(i.preventDefault(),i.stopPropagation(),"Tab"===a){if(XI(this,uI))return void(this.hidden=!0);i.shiftKey?null==(t=null==(e=this.previousElementSibling)?void 0:e.focus)||t.call(e):null==(n=null==(s=this.nextElementSibling)?void 0:s.focus)||n.call(s),this.blur()}else"Escape"===a?(null==(r=XI(this,iI))||r.focus(),XI(this,uI)&&(this.hidden=!0)):"Enter"===a||" "===a?this.handleSelect(i):this.handleMove(i)},jI=new WeakSet,VI=function(i){return i.composedPath().find((function(e){return["menuitemradio","menuitemcheckbox"].includes(e.role)}))},HI=new WeakSet,WI=function(){return this.items.find((function(i){return 0===i.tabIndex}))},qI=new WeakSet,GI=function(i){var e,t=C(this.items);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.tabIndex=n===i?0:-1}}catch(e){t.e(e)}finally{t.f()}},KI=new WeakSet,YI=function(i,e){var t=v(this.checkedItems);"radio"===i.type&&this.radioGroupItems.forEach((function(s){return s.checked=!1})),i.checked=!e||!i.checked,this.checkedItems.some((function(s,e){return s!=t[e]}))&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},dt.shadowRootOptions={mode:"open"},dt.getTemplateHTML=function(i){return'\n    <style>\n      :host {\n        font: var(--media-font,\n          var(--media-font-weight, normal)\n          var(--media-font-size, 14px) /\n          var(--media-text-content-height, var(--media-control-height, 24px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        --_menu-bg: rgb(20 20 30 / .8);\n        background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg))));\n        border-radius: var(--media-menu-border-radius);\n        border: var(--media-menu-border, none);\n        display: var(--media-menu-display, inline-flex) !important;\n        \n        transition: var(--media-menu-transition-in,\n          visibility 0s,\n          opacity .2s ease-out,\n          transform .15s ease-out,\n          left .2s ease-in-out,\n          min-width .2s ease-in-out,\n          min-height .2s ease-in-out\n        ) !important;\n        \n        visibility: var(--media-menu-visibility, visible);\n        opacity: var(--media-menu-opacity, 1);\n        max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));\n        transform: var(--media-menu-transform-in, translateY(0) scale(1));\n        flex-direction: column;\n        \n        min-height: 0;\n        position: relative;\n        bottom: var(--_menu-bottom);\n        box-sizing: border-box;\n      } \n\n      @-moz-document url-prefix() {\n        :host{\n          --_menu-bg: rgb(20 20 30);\n        }\n      }\n\n      :host([hidden]) {\n        transition: var(--media-menu-transition-out,\n          visibility .15s ease-in,\n          opacity .15s ease-in,\n          transform .15s ease-in\n        ) !important;\n        visibility: var(--media-menu-hidden-visibility, hidden);\n        opacity: var(--media-menu-hidden-opacity, 0);\n        max-height: var(--media-menu-hidden-max-height,\n          var(--media-menu-max-height, var(--_menu-max-height, 300px)));\n        transform: var(--media-menu-transform-out, translateY(2px) scale(.99));\n        pointer-events: none;\n      }
2\n\n      :host([slot="submenu"]) {\n        background: none;\n        width: 100%;\n        min-height: 100%;\n        position: absolute;\n        bottom: 0;\n        right: -100%;\n      }\n\n      #container {\n        display: flex;\n        flex-direction: column;\n        min-height: 0;\n        transition: transform .2s ease-out;\n        transform: translate(0, 0);\n      }\n\n      #container.has-expanded {\n        transition: transform .2s ease-in;\n        transform: translate(-100%, 0);\n      }\n\n      button {\n        background: none;\n        color: inherit;\n        border: none;\n        padding: 0;\n        font: inherit;\n        outline: inherit;\n        display: inline-flex;\n        align-items: center;\n      }\n\n      slot[name="header"][hidden] {\n        display: none;\n      }\n\n      slot[name="header"] > *,\n      slot[name="header"]::slotted(*) {\n        padding: .4em .7em;\n        border-bottom: 1px solid rgb(255 255 255 / .25);\n        cursor: var(--media-cursor, default);\n      }\n\n      slot[name="header"] > button[part~="back"],\n      slot[name="header"]::slotted(button[part~="back"]) {\n        cursor: var(--media-cursor, pointer);\n      }\n\n      svg[part~="back"] {\n        height: var(--media-menu-icon-height, var(--media-control-height, 24px));\n        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n        display: block;\n        margin-right: .5ch;\n      }\n\n      slot:not([name]) {\n        gap: var(--media-menu-gap);\n        flex-direction: var(--media-menu-flex-direction, column);\n        overflow: var(--media-menu-overflow, hidden auto);\n        display: flex;\n        min-height: 0;\n      }\n\n      :host([role="menu"]) slot:not([name]) {\n        padding-block: .4em;\n      }\n\n      slot:not([name])::slotted([role="menu"]) {\n        background: none;\n      }\n\n      media-chrome-menu-item > span {\n        margin-right: .5ch;\n        max-width: var(--media-menu-item-max-width);\n        text-overflow: ellipsis;\n        overflow: hidden;\n      }\n    </style>\n    <style id="layout-row" media="width:0">\n\n      slot[name="header"] > *,\n      slot[name="header"]::slotted(*) {\n        padding: .4em .5em;\n      }\n\n      slot:not([name]) {\n        gap: var(--media-menu-gap, .25em);\n        flex-direction: var(--media-menu-flex-direction, row);\n        padding-inline: .5em;\n      }\n\n      media-chrome-menu-item {\n        padding: .3em .5em;\n      }\n\n      media-chrome-menu-item[aria-checked="true"] {\n        background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));\n      }\n\n      \n      media-chrome-menu-item::part(checked-indicator) {\n        display: var(--media-menu-item-checked-indicator-display, none);\n      }\n    </style>\n    <div id="container" part="container">\n      <slot name="header" hidden>\n        <button part="back button" aria-label="Back to previous menu">\n          <slot name="back-icon">\n            <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">\n              <path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/>\n            </svg>\n          </slot>\n          <slot name="title"></slot>\n        </button>\n      </slot>\n      <slot></slot>\n    </div>\n    <slot name="checked-indicator" hidden></slot>\n  '},Sy.customElements.get("media-chrome-menu")||Sy.customElements.define("media-chrome-menu",dt);var cR,lR,dR,hR,fR,pR,vR,mR,gR,yR,bR,ER,_R,kR=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},TR=function(i,e,t){return kR(i,e,"read from private field"),t?t.call(i):e.get(i)},wR=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},SR=function(i,e,t,s){return kR(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},AR=function(i,e,t){return kR(i,e,"access private method"),t};var IR="type",RR="value",OR="checked",LR="disabled",DR=function(e){T(n,e);var t=P(n);function n(){var e;if(A(this,n),e=t.call(this),wR(_(e),dR),wR(_(e),fR),wR(_(e),vR),wR(_(e),ER),wR(_(e),cR,!1),wR(_(e),lR,void 0),wR(_(e),gR,(function(){var t,n;e.submenuElement.items&&e.setAttribute("submenusize","".concat(e.submenuElement.items.length));var s=e.shadowRoot.querySelector('slot[name="description"]'),r=null==(t=e.submenuElement.checkedItems)?void 0:t[0],o=null!=(n=null==r?void 0:r.dataset.description)?n:null==r?void 0:r.text,a=Ay.createElement("span");a.textContent=null!=o?o:"",s.replaceChildren(a)})),wR(_(e),yR,(function(t){var n=t.key;e.keysUsed.includes(n)?e.handleClick(t):e.removeEventListener("keyup",TR(_(e),yR))})),wR(_(e),bR,(function(t){var n=t.metaKey,s=t.altKey,r=t.key;n||s||!e.keysUsed.includes(r)?e.removeEventListener("keyup",TR(_(e),yR)):e.addEventListener("keyup",TR(_(e),yR),{once:!0})})),!e.shadowRoot){e.attachShadow(e.constructor.shadowRootOptions);var r=xy(e.attributes);e.shadowRoot.innerHTML=e.constructor.getTemplateHTML(r)}return w(e)}return I(n,[{key:"enable",value:function(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),xR(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","fal
2se"),this.addEventListener("click",this),this.addEventListener("keydown",this)}},{key:"disable",value:function(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}},{key:"handleEvent",value:function(e){switch(e.type){case"slotchange":AR(this,dR,hR).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":TR(this,bR).call(this,e);break;case"keyup":TR(this,yR).call(this,e)}}},{key:"attributeChangedCallback",value:function(e,t,s){e===OR&&xR(this)&&!TR(this,cR)?this.setAttribute("aria-checked",null!=s?"true":"false"):e===IR&&s!==t?this.role="menuitem"+s:e===LR&&s!==t&&(null==s?this.enable():this.disable())}},{key:"connectedCallback",value:function(){this.hasAttribute(LR)||this.enable(),this.role="menuitem"+this.type,SR(this,lR,CR(this,this.parentNode)),AR(this,ER,_R).call(this),this.submenuElement&&AR(this,fR,pR).call(this),this.shadowRoot.addEventListener("slotchange",this)}},{key:"disconnectedCallback",value:function(){this.disable(),AR(this,ER,_R).call(this),SR(this,lR,null),this.shadowRoot.removeEventListener("slotchange",this)}},{key:"invokeTarget",get:function(){return this.getAttribute("invoketarget")},set:function(e){this.setAttribute("invoketarget","".concat(e))}},{key:"invokeTargetElement",get:function(){var e;return this.invokeTarget?null==(e=jy(this))?void 0:e.querySelector("#".concat(this.invokeTarget)):this.submenuElement}},{key:"submenuElement",get:function(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}},{key:"type",get:function(){var e;return null!=(e=this.getAttribute(IR))?e:""},set:function(e){this.setAttribute(IR,"".concat(e))}},{key:"value",get:function(){var e;return null!=(e=this.getAttribute(RR))?e:this.text},set:function(e){this.setAttribute(RR,e)}},{key:"text",get:function(){var e;return(null!=(e=this.textContent)?e:"").trim()}},{key:"checked",get:function(){if(xR(this))return"true"===this.getAttribute("aria-checked")},set:function(e){xR(this)&&(SR(this,cR,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}},{key:"handleClick",value:function(e){xR(this)||this.invokeTargetElement&&Uy(this,e.target)&&this.invokeTargetElement.dispatchEvent(new $I({relatedTarget:this}))}},{key:"keysUsed",get:function(){return["Enter"," "]}}],[{key:"observedAttributes",get:function(){return[IR,LR,OR,RR]}}]),n}(Sy.HTMLElement);function xR(i){return"radio"===i.type||"checkbox"===i.type}function CR(i,e){if(!i)return null;var t=i.getRootNode().host;return!e&&t?CR(i,t):null!=e&&e.items?e:CR(e,null==e?void 0:e.parentNode)}cR=new WeakMap,lR=new WeakMap,dR=new WeakSet,hR=function(i){var e=i.target;if(null==e||!e.name){var t,n=C(e.assignedNodes({flatten:!0}));try{for(n.s();!(t=n.n()).done;){var s=t.value;s instanceof Text&&""===s.textContent.trim()&&s.remove()}}catch(e){n.e(e)}finally{n.f()}}"submenu"===e.name&&(this.submenuElement?AR(this,fR,pR).call(this):AR(this,vR,mR).call(this))},fR=new WeakSet,pR=function(){var e=f(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded","".concat(!this.submenuElement.hidden)),this.submenuElement.addEventListener("change",TR(this,gR)),this.submenuElement.addEventListener("addmenuitem",TR(this,gR)),this.submenuElement.addEventListener("removemenuitem",TR(this,gR)),TR(this,gR).call(this);case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),vR=new WeakSet,mR=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",TR(this,gR)),this.submenuElement.removeEventListener("addmenuitem",TR(this,gR)),this.submenuElement.removeEventListener("removemenuitem",TR(this,gR)),TR(this,gR).call(this)},gR=new WeakMap,yR=new WeakMap,bR=new WeakMap,ER=new WeakSet,_R=function(){var i,e=null==(i=TR(this,lR))?void 0:i.radioGroupItems;if(e){var t=e.filter((function(s){return"true"===s.getAttribute("aria-checked")})).pop();t||(t=e[0]);var n,r=C(e);try{for(r.s();!(n=r.n()).done;
2){n.value.setAttribute("aria-checked","false")}}catch(e){r.e(e)}finally{r.f()}null==t||t.setAttribute("aria-checked","true")}},DR.shadowRootOptions={mode:"open"},DR.getTemplateHTML=function(i){return'\n    <style>\n      :host {\n        transition: var(--media-menu-item-transition,\n          background .15s linear,\n          opacity .2s ease-in-out\n        );\n        outline: var(--media-menu-item-outline, 0);\n        outline-offset: var(--media-menu-item-outline-offset, -1px);\n        cursor: var(--media-cursor, pointer);\n        display: flex;\n        align-items: center;\n        align-self: stretch;\n        justify-self: stretch;\n        white-space: nowrap;\n        white-space-collapse: collapse;\n        text-wrap: nowrap;\n        padding: .4em .8em .4em 1em;\n      }\n\n      :host(:focus-visible) {\n        box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n        outline: var(--media-menu-item-hover-outline, 0);\n        outline-offset: var(--media-menu-item-hover-outline-offset,  var(--media-menu-item-outline-offset, -1px));\n      }\n\n      :host(:hover) {\n        cursor: var(--media-cursor, pointer);\n        background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5));\n        outline: var(--media-menu-item-hover-outline);\n        outline-offset: var(--media-menu-item-hover-outline-offset,  var(--media-menu-item-outline-offset, -1px));\n      }\n\n      :host([aria-checked="true"]) {\n        background: var(--media-menu-item-checked-background);\n      }\n\n      :host([hidden]) {\n        display: none;\n      }\n\n      :host([disabled]) {\n        pointer-events: none;\n        color: rgba(255, 255, 255, .3);\n      }\n\n      slot:not([name]) {\n        width: 100%;\n      }\n\n      slot:not([name="submenu"]) {\n        display: inline-flex;\n        align-items: center;\n        transition: inherit;\n        opacity: var(--media-menu-item-opacity, 1);\n      }\n\n      slot[name="description"] {\n        justify-content: end;\n      }\n\n      slot[name="description"] > span {\n        display: inline-block;\n        margin-inline: 1em .2em;\n        max-width: var(--media-menu-item-description-max-width, 100px);\n        text-overflow: ellipsis;\n        overflow: hidden;\n        font-size: .8em;\n        font-weight: 400;\n        text-align: right;\n        position: relative;\n        top: .04em;\n      }\n\n      slot[name="checked-indicator"] {\n        display: none;\n      }\n\n      :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] {\n        display: var(--media-menu-item-checked-indicator-display, inline-block);\n      }\n\n      \n      svg, img, ::slotted(svg), ::slotted(img) {\n        height: var(--media-menu-item-icon-height, var(--media-control-height, 24px));\n        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n        display: block;\n      }\n\n      \n      [part~="indicator"],\n      ::slotted([part~="indicator"]) {\n        fill: var(--media-menu-item-indicator-fill,\n          var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));\n        height: var(--media-menu-item-indicator-height, 1.25em);\n        margin-right: .5ch;\n      }\n\n      [part~="checked-indicator"] {\n        visibility: hidden;\n      }\n\n      :host([aria-checked="true"]) [part~="checked-indicator"] {\n        visibility: visible;\n      }\n    </style>\n    <slot name="checked-indicator">\n      <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">\n        <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>\n      </svg>\n    </slot>\n    <slot name="prefix"></slot>\n    <slot></slot>\n    <slot name="description"></slot>\n    <slot name="suffix">\n      '.concat(this.getSuffixSlotInnerHTML(i),'\n    </slot>\n    <slot name="submenu"></slot>\n  ')},DR.getSuffixSlotInnerHTML=function(i){return""},Sy.customElements.get("media-chrome-menu-item")||Sy.customElements.define("media-chrome-menu-item",DR);var MR=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"anchorElement",get:function(){return"auto"!==this.anchor?y(S(n.prototype),"anchorElement",this):Cy(this).querySelector("media-settings-menu-button")}}]),n}(dt);MR.getTemplateHTML=function(i){return"\n    ".concat(dt.getTemplateHTML(i),'\n    <style>\n      :host {\n        --_menu-bg: rgb(20 20 30 / .8);
2\n        background: var(--media-settings-menu-background,\n            var(--media-menu-background,\n              var(--media-control-background,\n                var(--media-secondary-color, var(--_menu-bg)))));\n        min-width: var(--media-settings-menu-min-width, 170px);\n        border-radius: 2px 2px 0 0;\n        overflow: hidden;\n      }\n\n      @-moz-document url-prefix() {\n        :host{\n          --_menu-bg: rgb(20 20 30);\n        }\n      }\n\n      :host([role="menu"]) {\n        \n        justify-content: end;\n      }\n\n      slot:not([name]) {\n        justify-content: var(--media-settings-menu-justify-content);\n        flex-direction: var(--media-settings-menu-flex-direction, column);\n        overflow: visible;\n      }\n\n      #container.has-expanded {\n        --media-settings-menu-item-opacity: 0;\n      }\n    </style>\n  ')},Sy.customElements.get("media-settings-menu")||Sy.customElements.define("media-settings-menu",MR);var PR=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(DR);PR.shadowRootOptions={mode:"open"},PR.getTemplateHTML=function(i){return"\n    ".concat(DR.getTemplateHTML.call(this,i),'\n    <style>\n      slot:not([name="submenu"]) {\n        opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity));\n      }\n\n      :host([aria-expanded="true"]:hover) {\n        background: transparent;\n      }\n    </style>\n  ')},PR.getSuffixSlotInnerHTML=function(i){return'\n    <svg aria-hidden="true" viewBox="0 0 20 24">\n      <path d="m8.12 17.585-.742-.669 4.2-4.665-4.2-4.666.743-.669 4.803 5.335-4.803 5.334Z"/>\n    </svg>\n  '},Sy.customElements.get("media-settings-menu-item")||Sy.customElements.define("media-settings-menu-item",PR);var NR=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}},{key:"invokeTarget",get:function(){return this.getAttribute("invoketarget")},set:function(e){this.setAttribute("invoketarget","".concat(e))}},{key:"invokeTargetElement",get:function(){var e;return this.invokeTarget?null==(e=jy(this))?void 0:e.querySelector("#".concat(this.invokeTarget)):null}},{key:"handleClick",value:function(){var e;null==(e=this.invokeTargetElement)||e.dispatchEvent(new $I({relatedTarget:this}))}}]),n}(G_);Sy.customElements.get("media-chrome-menu-button")||Sy.customElements.define("media-chrome-menu-button",NR);var UR=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.setAttribute("aria-label",py("settings"))}},{key:"invokeTargetElement",get:function(){return null!=this.invokeTarget?y(S(n.prototype),"invokeTargetElement",this):Cy(this).querySelector("media-settings-menu")}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),["target"])}}]),n}(NR);UR.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n    <slot name="icon">\n      <svg aria-hidden="true" viewBox="0 0 24 24">\n        <path d="M4.5 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/>\n      </svg>\n    </slot>\n  '},UR.getTooltipContentHTML=function(){return py("Settings")},Sy.customElements.get("media-settings-menu-button")||Sy.customElements.define("media-settings-menu-button",UR);var FR,BR,jR,VR,HR,WR,qR=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},GR=function(i,e,t){return qR(i,e,"read from private field"),t?t.call(i):e.get(i)},KR=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},YR=function(i,e,t,s){return qR(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},$R=function(i,e,t){return qR(i,e,"access private method"),t},QR=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.apply(this,arguments),KR(_(e),jR),KR(_(e),HR),KR(_(e),FR,[]),KR(_(e),BR,void 0),e}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_AUDIO_TRACK_ENABLED&&t!==s?this.value=s:e===Wg.MEDIA_AUDIO_TRACK_LIST&&t!==s&&(YR(this,FR,function(i){return null==i?void 0:i.split(/\s+/).map(ay)}
2(null!=s?s:"")),$R(this,jR,VR).call(this))}},{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.addEventListener("change",$R(this,HR,WR))}},{key:"disconnectedCallback",value:function(){y(S(n.prototype),"disconnectedCallback",this).call(this),this.removeEventListener("change",$R(this,HR,WR))}},{key:"anchorElement",get:function(){var e;return"auto"!==this.anchor?y(S(n.prototype),"anchorElement",this):null==(e=Cy(this))?void 0:e.querySelector("media-audio-track-menu-button")}},{key:"mediaAudioTrackList",get:function(){return GR(this,FR)},set:function(e){YR(this,FR,e),$R(this,jR,VR).call(this)}},{key:"mediaAudioTrackEnabled",get:function(){var e;return null!=(e=$y(this,Wg.MEDIA_AUDIO_TRACK_ENABLED))?e:""},set:function(e){Qy(this,Wg.MEDIA_AUDIO_TRACK_ENABLED,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_AUDIO_TRACK_LIST,Wg.MEDIA_AUDIO_TRACK_ENABLED,Wg.MEDIA_AUDIO_TRACK_UNAVAILABLE])}}]),n}(dt);FR=new WeakMap,BR=new WeakMap,jR=new WeakSet,VR=function(){if(GR(this,BR)!==JSON.stringify(this.mediaAudioTrackList)){YR(this,BR,JSON.stringify(this.mediaAudioTrackList));var i=this.mediaAudioTrackList;this.defaultSlot.textContent="",i.sort((function(e,t){return e.id.localeCompare(t.id,void 0,{numeric:!0})}));var e,t=C(i);try{for(t.s();!(e=t.n()).done;){var n=e.value,s=tR({type:"radio",text:this.formatMenuItemText(n.label,n),value:"".concat(n.id),checked:n.enabled});s.prepend(nR(this,"checked-indicator")),this.defaultSlot.append(s)}}catch(e){t.e(e)}finally{t.f()}}},HR=new WeakSet,WR=function(){if(null!=this.value){var i=new Sy.CustomEvent(Fg.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)}},Sy.customElements.get("media-audio-track-menu")||Sy.customElements.define("media-audio-track-menu",QR);var h1=function(i){var e=py("Audio");i.setAttribute("aria-label",e)},zR=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),h1(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_LANG&&h1(this)}},{key:"invokeTargetElement",get:function(){var e;return null!=this.invokeTarget?y(S(n.prototype),"invokeTargetElement",this):null==(e=Cy(this))?void 0:e.querySelector("media-audio-track-menu")}},{key:"mediaAudioTrackEnabled",get:function(){var e;return null!=(e=$y(this,Wg.MEDIA_AUDIO_TRACK_ENABLED))?e:""},set:function(e){Qy(this,Wg.MEDIA_AUDIO_TRACK_ENABLED,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_AUDIO_TRACK_ENABLED,Wg.MEDIA_AUDIO_TRACK_UNAVAILABLE])}}]),n}(NR);zR.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n    <slot name="icon">'.concat('<svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>\n  <path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/>\n</svg>',"</slot>\n  ")},zR.getTooltipContentHTML=function(){return py("Audio")},Sy.customElements.get("media-audio-track-menu-button")||Sy.customElements.define("media-audio-track-menu-button",zR);var XR,JR,ZR,eO,tO,nO=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},rO=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},iO=function(i,e,t){return nO(i,e,"access private method"),t};var aO=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.apply(this,arguments),rO(_(e),JR),rO(_(e),eO),rO(_(e),XR,void 0),e}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_SUBTITLES_LIST&&t!==s?iO(this,JR,ZR).call(this):e===Wg.MEDIA_SUBTITLES_SHOWING&&t!==s&&(this.value=s||"",iO(this,JR,ZR).call(this))}},{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.addEventListener("change",iO(this,eO,tO))}},{key:"disconnectedCallback",value:function(){y(S(n.prototype),"disconnectedCallback",this).call(this),this.removeEventListener("change",iO(this,eO,tO))}},{key:"anchorElement",get:function(){return"auto"!==this.anchor?y(S(n.prototype),"anchorElement",this):Cy(this).querySelector("media-captions-menu-button")}},{key:"mediaSubtitlesList",get:function(){return oO(this,Wg.MEDIA_SUBTITLES_LIST)},set:function(e){sO(this,Wg.MEDIA_SUBTITLES_LIST,e)}},{key:"mediaSubtitlesShowing",get:function(){return oO(this,Wg.MEDIA_SUBTITLES_SHOWING)},set:function(e){sO(this,Wg.MEDIA_SUBTITLES_SHOWING,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_SUBTITLES_LIST,Wg.MEDIA_SUBTITLES_SHOWING])}}]),n}(dt);XR=new WeakMap,JR=new WeakSet,ZR=function(){var i,e=function(i,e,t){return nO(i,e,"read from private field"),t?t.call(i):e.get(i)}(this,XR)!==JSON.stringify(this.mediaSubtitlesList),t=this.value!==this.getAttribute(Wg.MEDIA_SUBTITLES_SHOWING);if(e||t){(function(i,e,t,s){nO(i,e,"write to private field"),s?s.call(i,t):e.set(i,t)})(this,XR,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";
2var s=!this.value,n=tR({type:"radio",text:this.formatMenuItemText(py("Off")),value:"off",checked:s});n.prepend(nR(this,"checked-indicator")),this.defaultSlot.append(n);var r,o=C(this.mediaSubtitlesList);try{for(o.s();!(r=o.n()).done;){var a=r.value,c=tR({type:"radio",text:this.formatMenuItemText(a.label,a),value:cE(a),checked:this.value==cE(a)});c.prepend(nR(this,"checked-indicator")),"captions"===(null!=(i=a.kind)?i:"subs")&&c.append(nR(this,"captions-indicator")),this.defaultSlot.append(c)}}catch(e){o.e(e)}finally{o.f()}}},eO=new WeakSet,tO=function(){var i=this.mediaSubtitlesShowing,e=this.getAttribute(Wg.MEDIA_SUBTITLES_SHOWING),t=this.value!==e;if(null!=i&&i.length&&t&&this.dispatchEvent(new Sy.CustomEvent(Fg.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:i})),this.value&&t){var s=new Sy.CustomEvent(Fg.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(s)}},aO.getTemplateHTML=function(i){return"\n    ".concat(dt.getTemplateHTML(i),'\n    <slot name="captions-indicator" hidden>').concat('\n  <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">\n    <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>\n  </svg>',"</slot>\n  ")};var oO=function(i,e){var t=i.getAttribute(e);return t?sE(t):[]},sO=function(i,e,t){if(null!=t&&t.length){var s=lE(t);i.getAttribute(e)!==s&&i.setAttribute(e,s)}else i.removeAttribute(e)};Sy.customElements.get("media-captions-menu")||Sy.customElements.define("media-captions-menu",aO);var uO=function(i){i.setAttribute("data-captions-enabled",pE(i).toString())},cO=function(i){i.setAttribute("aria-label",py("closed captions"))},lO=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),cO(this),uO(this)}},{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_SUBTITLES_SHOWING?uO(this):e===Wg.MEDIA_LANG&&cO(this)}},{key:"invokeTargetElement",get:function(){var e;return null!=this.invokeTarget?y(S(n.prototype),"invokeTargetElement",this):null==(e=Cy(this))?void 0:e.querySelector("media-captions-menu")}},{key:"mediaSubtitlesList",get:function(){return dO(this,Wg.MEDIA_SUBTITLES_LIST)},set:function(e){hO(this,Wg.MEDIA_SUBTITLES_LIST,e)}},{key:"mediaSubtitlesShowing",get:function(){return dO(this,Wg.MEDIA_SUBTITLES_SHOWING)},set:function(e){hO(this,Wg.MEDIA_SUBTITLES_SHOWING,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_SUBTITLES_LIST,Wg.MEDIA_SUBTITLES_SHOWING,Wg.MEDIA_LANG])}}]),n}(NR);lO.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([data-captions-enabled="true"]) slot[name=off] {\n        display: none !important;\n      }\n\n      \n      :host(:not([data-captions-enabled="true"])) slot[name=on] {\n        display: none !important;\n      }\n\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="on">'.concat('<svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 
20 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>\n</svg>','</slot>\n      <slot name="off">').concat('<svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>\n</svg>',"</slot>\n    </slot>\n  ")},lO.getTooltipContentHTML=function(){return py("Captions")};var dO=function(i,e){var t=i.getAttribute(e);return t?sE(t):[]},hO=function(i,e,t){if(null!=t&&t.length){var s=lE(t);i.getAttribute(e)!==s&&i.setAttribute(e,s)}else i.removeAttribute(e)};Sy.customElements.get("media-captions-menu-button")||Sy.customElements.define("media-captions-menu-button",lO);var fO,pO,vO,mO,gO,yO=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},bO=function(i,e,t){return yO(i,e,"read from private field"),t?t.call(i):e.get(i)},EO=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},_O=function(i,e,t){return yO(i,e,"access private method"),t},kO="rates",TO=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.call(this),EO(_(e),pO),EO(_(e),mO),EO(_(e),fO,new Vb(_(e),kO,{defaultValue:iw})),_O(_(e),pO,vO).call(_(e)),e}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_PLAYBACK_RATE&&t!=s?(this.value=s,_O(this,pO,vO).call(this)):e===kO&&t!=s&&(bO(this,fO).value=s,_O(this,pO,vO).call(this))}},{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.addEventListener("change",_O(this,mO,gO))}},{key:"disconnectedCallback",value:function(){y(S(n.prototype),"disconnectedCallback",this).call(this),this.removeEventListener("change",_O(this,mO,gO))}},{key:"anchorElement",get:function(){return"auto"!==this.anchor?y(S(n.prototype),"anchorElement",this):Cy(this).querySelector("media-playback-rate-menu-button")}},{key:"rates",get:function(){return bO(this,fO)},set:function(e){e?Array.isArray(e)?bO(this,fO).value=e.join(" "):"string"==typeof e&&(bO(this,fO).value=e):bO(this,fO).value="",_O(this,pO,vO).call(this)}},{key:"mediaPlaybackRate",get:function(){return qy(this,Wg.MEDIA_PLAYBACK_RATE,1)},set:function(e){Gy(this,Wg.MEDIA_PLAYBACK_RATE,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_PLAYBACK_RATE,kO])}}]),n}(dt);fO=new WeakMap,pO=new WeakSet,vO=function(){this.defaultSlot.textContent="";var i=this.mediaPlaybackRate,e=new Set(Array.from(bO(this,fO)).map((function(s){return Number(s)})));i>0&&!e.has(i)&&e.add(i);var t,n=C(Array.from(e).sort((function(s,e){return s-e})));try{for(n.s();!(t=n.n()).done;){var s=t.value,r=tR({type:"radio",text:this.formatMenuItemText("".concat(s,"x"),s),value:s.toString(),checked:i===s});r.prepend(nR(this,"checked-indicator")),this.defaultSlot.append(r)}}catch(e){n.e(e)}finally{n.f()}},mO=new WeakSet,gO=function(){if(this.value){var i=new Sy.CustomEvent(Fg.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)}},Sy.customElements.get("media-playback-rate-menu")||Sy.customElements.define("media-playback-rate-menu",TO);var wO=function(e){T(n,e);var t=P(n);function n(){var e,r;return A(this,n),(e=t.call(this)).container=e.shadowRoot.querySelector('slot[name="icon"]'),e.container.innerHTML="".concat(null!=(r=e.mediaPlaybackRate)?r:1,"x"),e}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){if(y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),e===Wg.MEDIA_PLAYBACK_RATE){var r=s?+s:Number.NaN,o=Number.isNaN(r)?1:r;this.container.innerHTML="".concat(o,"x"),this.setAttribute("aria-label",py("Playback rate {playbackRate}",{playbackRate:o}))}}},{key:"invokeTargetElement",get:function(){return null!=this.invokeTarget?y(S(n.prototype),"invokeTargetElement",this):Cy(this).querySelector("media-playback-rate-menu")}},{key:"mediaPlaybackRate",get:function(){return qy(this,Wg.MEDIA_PLAYBACK_RATE,1)},set:function(e){Gy(this,Wg.MEDIA_PLAYBACK_RATE,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_PLAYBACK_RATE])}}]),n}(NR);wO.getSlotTemplateHTML=function(i){return'\n    <style>\n      :host {\n        min-width: 5ch;\n        padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n      }\n      \n      :host([aria-expanded="true"]) slot {\n        display: block;\n      }\n\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n    <slot name="icon">'.concat(i.mediaplaybackrate||1,"x</slot>\n  ")},wO.getTooltipContentHTML=function(){return py("Playback rate")},Sy.customElements.get("media-playback-rate-menu-button")||Sy.customElements.define("media-playback-rate-menu-button",wO);var SO,AO,IO,RO,OO,LO,DO=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},xO=function(i,e,t){return DO(i,e,"read from private field"),t?t.call(i):e.get(i)},CO=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},MO=function(i,e,t,s){return DO(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},PO=function(i,e,t){return DO(i,e,"access private method"),t},NO=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.apply(this,arguments),CO(_(e),IO),CO(_(e),OO),CO(_(e),SO,[]),CO(_(e),AO,{}),e}return I(n,[{key:"attributeChangedCallback",value:function(e,t,s){if(y(S(n.prototype),"attributeChangedCallback",this).call(this,e,t,s),t!==s)switch(e){case Wg.MEDIA_RENDITION_SELECTED:this.value=null!=s?s:"auto",PO(this,IO,RO).call(this);break;case Wg.MEDIA_RENDITION_LIST:MO(this,SO,function(i){return null==i?void 0:i.split(/\s+/).map(ry)}(s)),PO(this,IO,RO).call(this);break;case Wg.MEDIA_HEIGHT:case Wg.MEDIA_WIDTH:PO(this,IO,RO).call(this)}}},{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.addEventListener("change",PO(this,OO,LO))}},{key:"disconnectedCallback",value:function(){y(S(n.prototype),"disconnectedCallback",this).call(this),this.removeEventListener("change",PO(this,OO,LO))}},{key:"anchorElement",get:function(){return"auto"!==this.anchor?y(S(n.prototype),"anchorElement",this):Cy(this).querySelector("media-rendition-menu-button")}},{key:"mediaRenditionList",get:function(){return xO(this,SO)},set:function(e){MO(this,SO,e),PO(this,IO,RO).call(this)}},{key:"mediaRenditionSelected",get:function(){return $y(this,Wg.MEDIA_RENDITION_SELECTED)},set:function(e){Qy(this,Wg.MEDIA_RENDITION_SELECTED,e)}},{key:"mediaHeight",get:function(){return qy(this,Wg.MEDIA_HEIGHT)},set:function(e){Gy(this,Wg.MEDIA_HEIGHT,e)}},{key:"mediaWidth",get:function(){return qy(this,Wg.MEDIA_WIDTH)},set:function(e){Gy(this,Wg.MEDIA_WIDTH,e)}},{key:"compareRendition",value:function(e,t){return this.constructor.compareRendition(e,t)}},{key:"formatMenuItemText",value:function(e,t){return this.constructor.formatMenuItemText(e,t)}},{key:"formatRendition",value:function(e,t){return this.constructor.formatRendition(e,t)}},{key:"showRenditionBitrate",value:function(e){return this.mediaRenditionList.some((function(t){return t!==e&&t.height===e.height&&t.bitrate!==e.bitrate}))}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_RENDITION_LIST,Wg.MEDIA_RENDITION_SELECTED,Wg.MEDIA_RENDITION_UNAVAILABLE,Wg.MEDIA_HEIGHT,Wg.MEDIA_WIDTH])}},{key:"formatMenuItemText",value:function(e,t){return y(S(n),"formatMenuItemText",this).call(this,e,t)}},{key:"formatRendition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.showBitrate,r=void 0!==n&&n,s="".concat(Math.min(e.width,e.height),"p");if(r&&e.bitrate){var o=e.bitrate/1e6,c="".concat(o.toFixed(o<1?1:0)," Mbps");return"".concat(s," (").concat(c,")")}return this.formatMenuItemText(s,e)}},{key:"compareRendition",value:function(e,t){var s,n;return t.height===e.height?(null!=(s=t.bitrate)?s:0)-(null!=(n=e.bitrate)?n:0):t.height-e.height}}]),n}(dt);SO=new WeakMap,AO=new WeakMap,IO=new WeakSet,RO=function(){var e=this,i=!this.mediaRenditionSelected;if(xO(this,AO).mediaRenditionList!==JSON.stringify(this.mediaRenditionList)||xO(this,AO).mediaHeight!==this.mediaHeight||xO(this,AO).mediaWidth!==this.mediaWidth||xO(this,AO).isAuto!==i){xO(this,AO).mediaRenditionList=JSON.stringify(this.mediaRenditionList),xO(this,AO).mediaHeight=this.mediaHeight,xO(this,AO).mediaWidth=this.mediaWidth,xO(this,AO).isAuto=i;var t,n=this.mediaRenditionList.sort(this.compareRendition.bind(this)),r=n.find((function(a){return a.id===e.mediaRenditionSelected})),o=C(n);try{for(o.s();!(t=o.n()).done;){var a=t.value;a.selected=a===r}}catch(e){o.e(e)}finally{o.f()}this.defaultSlot.textContent="";var c,l=C(n);try{for(l.s();!(c=l.n()).done;){var d=c.value,h=tR({type:"radio",text:this.formatRendition(d,{showBitrate:this.showRenditionBitrate(d)}),value:"".concat(d.id),checked:d.selected&&!i});h.prepend(nR(this,"checked-indicator")),this.defaultSlot.append(h)}}catch(e){l.e(e)}finally{l.f()}var f,s=r&&this.showRenditionBitrate(r);i&&(r?f=this.formatMenuItemText("".concat(py("Auto")," • ").concat(this.formatRendition(r,{showBitrate:s})),r):this.mediaHeight>0&&this.mediaWidth>0&&(f=this.formatMenuItemText("".concat(py("Auto")," (").concat(Math.min(this.mediaWidth,this.mediaHeight),"p)")))),f||(f=this.formatMenuItemText(py("Auto")));var v=tR({type:"radio",text:f,value:"auto",checked:i});
2v.dataset.description=f,v.prepend(nR(this,"checked-indicator")),this.defaultSlot.append(v)}},OO=new WeakSet,LO=function(){if(null!=this.value){var i=new Sy.CustomEvent(Fg.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)}},Sy.customElements.get("media-rendition-menu")||Sy.customElements.define("media-rendition-menu",NO);var UO=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),this.setAttribute("aria-label",py("quality"))}},{key:"invokeTargetElement",get:function(){return null!=this.invokeTarget?y(S(n.prototype),"invokeTargetElement",this):Cy(this).querySelector("media-rendition-menu")}},{key:"mediaRenditionSelected",get:function(){return $y(this,Wg.MEDIA_RENDITION_SELECTED)},set:function(e){Qy(this,Wg.MEDIA_RENDITION_SELECTED,e)}},{key:"mediaHeight",get:function(){return qy(this,Wg.MEDIA_HEIGHT)},set:function(e){Gy(this,Wg.MEDIA_HEIGHT,e)}}],[{key:"observedAttributes",get:function(){return[].concat(v(y(S(n),"observedAttributes",this)),[Wg.MEDIA_RENDITION_SELECTED,Wg.MEDIA_RENDITION_UNAVAILABLE,Wg.MEDIA_HEIGHT])}}]),n}(NR);UO.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n    <slot name="icon">'.concat('<svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M13.5 2.5h2v6h-2v-2h-11v-2h11v-2Zm4 2h4v2h-4v-2Zm-12 4h2v6h-2v-2h-3v-2h3v-2Zm4 2h12v2h-12v-2Zm1 4h2v6h-2v-2h-8v-2h8v-2Zm4 2h7v2h-7v-2Z" />\n</svg>',"</slot>\n  ")},UO.getTooltipContentHTML=function(){return py("Quality")},Sy.customElements.get("media-rendition-menu-button")||Sy.customElements.define("media-rendition-menu-button",UO);var FO,BO,jO,VO,HO,WO,qO,GO,KO,YO,$O,QO,zO,XO,JO,ZO=function(i,e,t){if(!e.has(i))throw TypeError("Cannot "+t)},eL=function(i,e,t){return ZO(i,e,"read from private field"),t?t.call(i):e.get(i)},tL=function(i,e,t){if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},nL=function(i,e,t,s){return ZO(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},rL=function(i,e,t){return ZO(i,e,"access private method"),t};var iL=function(e){T(n,e);var t=P(n);function n(){var e;return A(this,n),e=t.call(this),tL(_(e),BO),tL(_(e),VO),tL(_(e),WO),tL(_(e),GO),tL(_(e),$O),tL(_(e),FO,!1),tL(_(e),YO,(function(t){var n=t.target,s="VIDEO"===(null==n?void 0:n.nodeName),r=rL(_(e),GO,KO).call(_(e),n);(s||r)&&(eL(_(e),FO)?rL(_(e),VO,HO).call(_(e)):rL(_(e),$O,QO).call(_(e),t))})),tL(_(e),zO,(function(t){var n=t.target,s=e.contains(n),r=2===t.button,o="VIDEO"===(null==n?void 0:n.nodeName),a=rL(_(e),GO,KO).call(_(e),n);s||r&&(o||a)||rL(_(e),VO,HO).call(_(e))})),tL(_(e),XO,(function(t){"Escape"===t.key&&rL(_(e),VO,HO).call(_(e))})),tL(_(e),JO,(function(t){var n,s,r=t.target;if(null!=(n=r.matches)&&n.call(r,'button[invoke="copy"]')){var o=null==(s=r.closest("media-context-menu-item"))?void 0:s.querySelector('input[slot="copy"]');o&&navigator.clipboard.writeText(o.value)}rL(_(e),VO,HO).call(_(e))})),e.setAttribute("noautohide",""),rL(_(e),BO,jO).call(_(e)),e}return I(n,[{key:"connectedCallback",value:function(){y(S(n.prototype),"connectedCallback",this).call(this),Cy(this).addEventListener("contextmenu",eL(this,YO)),this.addEventListener("click",eL(this,JO))}},{key:"disconnectedCallback",value:function(){y(S(n.prototype),"disconnectedCallback",this).call(this),Cy(this).removeEventListener("contextmenu",eL(this,YO)),this.removeEventListener("click",eL(this,JO)),document.removeEventListener("mousedown",eL(this,zO)),document.removeEventListener("keydown",eL(this,XO))}}]),n}(dt);FO=new WeakMap,BO=new WeakSet,jO=function(){this.hidden=!eL(this,FO)},VO=new WeakSet,HO=function(){nL(this,FO,!1),rL(this,BO,jO).call(this)},WO=new WeakSet,qO=function(){var e=this;document.querySelectorAll("media-context-menu").forEach((function(t){var n;t!==e&&rL(n=t,VO,HO).call(n)}))},GO=new WeakSet,KO=function(i){return!!i&&(!(!i.hasAttribute("slot")||"media"!==i.getAttribute("slot"))||!(!i.nodeName.includes("-")||!i.tagName.includes("-"))&&(i.hasAttribute("src")||i.hasAttribute("poster")||i.hasAttribute("preload")||i.hasAttribute("playsinline")))},YO=new WeakMap,$O=new WeakSet,QO=function(i){i.preventDefault(),rL(this,WO,qO).call(this),nL(this,FO,!0),this.style.position="fixed",this.style.left="".concat(i.clientX,"px"),this.style.top="".concat(i.clientY,"px"),rL(this,BO,jO).call(this),document.addEventListener("mousedown",eL(this,zO),{once:!0}),document.addEventListener("keydown",eL(this,XO),{once:!0})},zO=new WeakMap,XO=new WeakMap,JO=new WeakMap,iL.getTemplateHTML=function(i){return"\n      ".concat(dt.getTemplateHTML(i),"\n      <style>\n        :host {\n          --_menu-bg: rgb(20 20 30 / .8);
2\n          background: var(--media-settings-menu-background,\n            var(--media-menu-background,\n              var(--media-control-background,\n                var(--media-secondary-color, var(--_menu-bg)))));\n          min-width: var(--media-settings-menu-min-width, 170px);\n          border-radius: 2px;\n          overflow: hidden;\n        }\n      </style>\n    ")},Sy.customElements.get("media-context-menu")||Sy.customElements.define("media-context-menu",iL);var aL=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(DR);aL.shadowRootOptions={mode:"open"},aL.getTemplateHTML=function(i){return"\n    ".concat(DR.getTemplateHTML.call(this,i),"\n    <style>\n        ::slotted(*) {\n            color: var(--media-text-color, white);\n            text-decoration: none;\n            border: none;\n            background: none;\n            cursor: pointer;\n            padding: 0;\n            min-height: var(--media-control-height, 24px);\n        }\n    </style>\n  ")},Sy.customElements.get("media-context-menu-item")||Sy.customElements.define("media-context-menu-item",aL);var oL=function(i){throw TypeError(i)},sL=function(i,e,t){return e.has(i)||oL("Cannot "+t)},uL=function(i,e,t){return sL(i,e,"read from private field"),t?t.call(i):e.get(i)},cL=function(i,e,t){return e.has(i)?oL("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t)},lL=function(i,e,t,s){return sL(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t},dL=function(i,e,t){return sL(i,e,"access private method"),t},hL=function(){function e(){A(this,e)}return I(e,[{key:"addEventListener",value:function(){}},{key:"removeEventListener",value:function(){}},{key:"dispatchEvent",value:function(i){return!0}}]),e}();if("undefined"==typeof DocumentFragment){var fL=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(hL);globalThis.DocumentFragment=fL}var pL,vL=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(hL),mL=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(hL),gL={get:function(i){},define:function(i,e,t){},getName:function(i){return null},upgrade:function(i){},whenDefined:function(i){return Promise.resolve(vL)}},yL=function(){function e(i){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};A(this,e),cL(this,pL),lL(this,pL,null==t?void 0:t.detail)}return I(e,[{key:"detail",get:function(){return uL(this,pL)}},{key:"initCustomEvent",value:function(){}}]),e}();pL=new WeakMap;var bL={document:{createElement:function(i,e){return new vL}},DocumentFragment:DocumentFragment,customElements:gL,CustomEvent:yL,EventTarget:hL,HTMLElement:vL,HTMLVideoElement:mL},EL="undefined"==typeof window||void 0===globalThis.customElements,_L=EL?bL:globalThis,kL=EL?bL.document:globalThis.document;function TL(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function wL(i){return i.replace(/[-_]([a-z])/g,(function(e,t){return t.toUpperCase()}))}function SL(i){if(null!=i){var e=+i;return Number.isNaN(e)?void 0:e}}function AL(i){var e=function(i){var e={};for(var t in i)null!=i[t]&&(e[t]=i[t]);return new URLSearchParams(e)}(i).toString();return e?"?"+e:""}var IL=function e(i,t){return!(!i||!t)&&(!!i.contains(t)||e(i,t.getRootNode().host))},RL="mux.com",OL=function(){try{return"3.13.2"}catch(e){}return"UNKNOWN"}(),LL=function(){return OL},DL=function(i){if(i){if([ef.LIVE,ef.ON_DEMAND].includes(i))return i;if(null!=i&&i.includes("live"))return ef.LIVE}},xL={crossorigin:"crossOrigin",playsinline:"playsInline"};var CL,ML,PL,NL=function(){function e(i,t){A(this,e),cL(this,CL),cL(this,ML),cL(this,PL,[]),lL(this,CL,i),lL(this,ML,t)}return I(e,[{key:Symbol.iterator,value:function(){return uL(this,PL).values()}},{key:"length",get:function(){return uL(this,PL).length}},{key:"value",get:function(){var i;return null!=(i=uL(this,PL).join(" "))?i:""}},{key:"value",set:function(i){var e;i!==this.value&&(lL(this,PL,[]),this.add.apply(this,v(null!=(e=null==i?void 0:i.split(" "))?e:[]))
2)}},{key:"toString",value:function(){return this.value}},{key:"item",value:function(i){return uL(this,PL)[i]}},{key:"values",value:function(){return uL(this,PL).values()}},{key:"keys",value:function(){return uL(this,PL).keys()}},{key:"forEach",value:function(i){uL(this,PL).forEach(i)}},{key:"add",value:function(){for(var e,t,n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];i.forEach((function(s){n.contains(s)||uL(n,PL).push(s)})),(""!==this.value||null!=(e=uL(this,CL))&&e.hasAttribute("".concat(uL(this,ML))))&&(null==(t=uL(this,CL))||t.setAttribute("".concat(uL(this,ML)),"".concat(this.value)))}},{key:"remove",value:function(){for(var e,t=this,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];i.forEach((function(e){uL(t,PL).splice(uL(t,PL).indexOf(e),1)})),null==(e=uL(this,CL))||e.setAttribute("".concat(uL(this,ML)),"".concat(this.value))}},{key:"contains",value:function(i){return uL(this,PL).includes(i)}},{key:"toggle",value:function(i,e){return void 0!==e?e?(this.add(i),!0):(this.remove(i),!1):this.contains(i)?(this.remove(i),!1):(this.add(i),!0)}},{key:"replace",value:function(i,e){this.remove(i),this.add(e)}}]),e}();CL=new WeakMap,ML=new WeakMap,PL=new WeakMap;var UL="[mux-player ".concat(LL(),"]");function FL(){for(var e,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];(e=console).warn.apply(e,[UL].concat(i))}function BL(){for(var e,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];(e=console).error.apply(e,[UL].concat(i))}function jL(i){var e,t=null!=(e=i.message)?e:"";i.context&&(t+=" ".concat(i.context)),i.file&&(t+=" ".concat(wf("Read more: "),"\nhttps://github.com/muxinc/elements/blob/main/errors/").concat(i.file)),FL(t)}var VL={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},HL={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},WL=(x(x({},VL),HL),Object.freeze({length:0,start:function(i){var e=i>>>0;if(e>=this.length)throw new DOMException("Failed to execute 'start' on 'TimeRanges': The index provided (".concat(e,") is greater than or equal to the maximum bound (").concat(this.length,")."));return 0},end:function(i){var e=i>>>0;if(e>=this.length)throw new DOMException("Failed to execute 'end' on 'TimeRanges': The index provided (".concat(e,") is greater than or equal to the maximum bound (").concat(this.length,")."));return 0}})),qL=Object.values(VL).filter((function(i){return VL.PLAYSINLINE!==i})),GL=Object.values(HL),KL=[].concat(v(qL),GL);function YL(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var $L=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.call(this)}return I(n,[{key:"attributeChangedCallback",value:function(i,e,t){var s,n;switch(i){case HL.MUTED:return void(this.media&&(this.media.muted=null!=t,this.media.defaultMuted=null!=t));case HL.VOLUME:var r=null!=(s=SL(t))?s:1;return void(this.media&&(this.media.volume=r));case HL.PLAYBACKRATE:var o=null!=(n=SL(t))?n:1;return void(this.media&&(this.media.playbackRate=o,this.media.defaultPlaybackRate=o))}}},{key:"play",value:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.play())?e:Promise.reject()}},{key:"pause",value:function(){var i;null==(i=this.media)||i.pause()}},{key:"load",value:function(){var i;null==(i=this.media)||i.load()}},{key:"media",get:function(){var i;return null==(i=this.shadowRoot)?void 0:i.querySelector("mux-video")}},{key:"audioTracks",get:function(){return this.media.audioTracks}},{key:"videoTracks",get:function(){return this.media.videoTracks}},{key:"audioRenditions",get:function(){return this.media.audioRenditions}},{key:"videoRenditions",get:function(){return this.media.videoRenditions}},{key:"paused",get:function(){var i,e;return null==(e=null==(i=this.media)?void 0:i.paused)||e}},{key:"duration",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.duration)?e:NaN}},{key:"ended",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.ended)&&e}},{key:"buffered",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.buffered)?e:WL}},{key:"seekable",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.seekable)?e:WL}},{key:"readyState",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.readyState)?e:0}},{key:"videoWidth",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.videoWidth)?e:0}},{key:"videoHeight",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.videoHeight)?e:0}},{key:"currentSrc",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.currentSrc)?e:""}},{key:"currentTime",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.currentTime)?e:0}
2,set:function(i){this.media&&(this.media.currentTime=Number(i))}},{key:"volume",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.volume)?e:1},set:function(i){this.media&&(this.media.volume=Number(i))}},{key:"playbackRate",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.playbackRate)?e:1},set:function(i){this.media&&(this.media.playbackRate=Number(i))}},{key:"defaultPlaybackRate",get:function(){var i;return null!=(i=SL(this.getAttribute(HL.PLAYBACKRATE)))?i:1},set:function(i){null!=i?this.setAttribute(HL.PLAYBACKRATE,"".concat(i)):this.removeAttribute(HL.PLAYBACKRATE)}},{key:"crossOrigin",get:function(){return YL(this,VL.CROSSORIGIN)},set:function(i){this.setAttribute(VL.CROSSORIGIN,"".concat(i))}},{key:"autoplay",get:function(){return null!=YL(this,VL.AUTOPLAY)},set:function(i){i?this.setAttribute(VL.AUTOPLAY,"string"==typeof i?i:""):this.removeAttribute(VL.AUTOPLAY)}},{key:"loop",get:function(){return null!=YL(this,VL.LOOP)},set:function(i){i?this.setAttribute(VL.LOOP,""):this.removeAttribute(VL.LOOP)}},{key:"muted",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.muted)&&e},set:function(i){this.media&&(this.media.muted=!!i)}},{key:"defaultMuted",get:function(){return null!=YL(this,VL.MUTED)},set:function(i){i?this.setAttribute(VL.MUTED,""):this.removeAttribute(VL.MUTED)}},{key:"playsInline",get:function(){return null!=YL(this,VL.PLAYSINLINE)},set:function(i){BL("playsInline is set to true by default and is not currently supported as a setter.")}},{key:"preload",get:function(){return this.media?this.media.preload:this.getAttribute("preload")},set:function(i){["","none","metadata","auto"].includes(i)?this.setAttribute(VL.PRELOAD,i):this.removeAttribute(VL.PRELOAD)}}],[{key:"observedAttributes",get:function(){return KL}}]),n}(_L.HTMLElement),QL=new WeakMap,zL=function(){function e(t,n){A(this,e),this.element=t,this.type=n,this.element.addEventListener(this.type,this);var s=QL.get(this.element);s&&s.set(this.type,this)}return I(e,[{key:"set",value:function(e){if("function"==typeof e)this.handleEvent=e.bind(this.element);else if("object"==R(e)&&"function"==typeof e.handleEvent)this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);var t=QL.get(this.element);t&&t.delete(this.type)}}}],[{key:"for",value:function(t){QL.has(t.element)||QL.set(t.element,new Map);var n=t.attributeName.slice(2),s=QL.get(t.element);return s&&s.has(n)?s.get(n):new e(t.element,n)}}]),e}();function XL(i,e){(function(i,e){if(i instanceof bA&&e instanceof Element){var t=i.element;return t[i.attributeName]!==e&&(i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),t[i.attributeName]=e),!0}return!1})(i,e)||function(i,e){if("boolean"==typeof e&&i instanceof bA){var t=i.attributeNamespace;return e!==i.element.hasAttributeNS(t,i.attributeName)&&(i.booleanValue=e),!0}return!1}(i,e)||function(i,e){return!!(i instanceof bA&&i.attributeName.startsWith("on"))&&(zL.for(i).set(e),i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),!0)}(i,e)||function(i,e){return!1===e&&i instanceof EA&&(i.replace(""),!0)}(i,e)||function(i,e){return e instanceof tD&&i instanceof EA&&(e.renderInto(i),!0)}(i,e)||function(i,e){return e instanceof DocumentFragment&&i instanceof EA&&(e.childNodes.length&&i.replace.apply(i,v(e.childNodes)),!0)}(i,e)||function(i,e){if(i instanceof bA){var t=i.attributeNamespace,s=i.element.getAttributeNS(t,i.attributeName);return String(e)!==s&&(i.value=String(e)),!0}i.value=String(e)}(i,e)}var JL=new Map,ZL=new WeakMap,eD=new WeakMap,tD=function(){function e(i,t,n){A(this,e),this.strings=i,this.values=t,this.processor=n,this.stringsKey=this.strings.join("�")}return I(e,[{key:"template",get:function(){if(JL.has(this.stringsKey))return JL.get(this.stringsKey);var e=kL.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((function(e,s,n){return e+s+(n<t?"{{ ".concat(n," }}"):"")}),""),JL.set(this.stringsKey,e),e}},{key:"renderInto",value:function(i){var e,t=this.template;if(ZL.get(i)!==t){ZL.set(i,t);var n=new hA(t,this.values,this.processor);return eD.set(i,n),void(i instanceof EA?i.replace.apply(i,v(n.children)):i.appendChild(n))}var s=eD.get(i);null==(e=null==s?void 0:s.update)||e.call(s,this.values)}}]),e}(),nD={processCallback:function(i,e,t){var s;if(t){var n,r=C(e);try{for(r.s();!(n=r.n()).done;){var o=m(n.value,2),c=o[0],l=o[1];if(c in t)XL(l,null!=(s=t[c])?s:"")}}catch(e){r.e(e)}finally{r.f()}}}};function rD(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return new tD(i,t,nD)}function iD(i,e){i.renderInto(e)}var aD=function(i){return rD(t||(t=l(["\n  <style>\n    ","\n    ","\n  </style>\n  ","\n"])),function(i){return i.tokens.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""}(i),":host {\n  --media-control-display: var(--controls);\n  --media-loading-indicator-display: var(--loading-indicator);\n  --media-dialog-display: var(--dialog);\n  --media-play-button-display: var(--play-button);\n  --media-live-button-display: var(--live-button);\n  --media-seek-backward-button-display: var(--seek-backward-button);\n  --media-seek-forward-button-display: var(--seek-forward-button);\n  --media-mute-button-display: var(--mute-button);\n  --media-captions-button-display: var(--captions-button);\n  --media-captions-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display));\n  --media-rendition-menu-button-display: var(--rendition-menu-button);\n  --media-audio-track-menu-button-display: var(--audio-track-menu-button);\n  --media-airplay-button-display: var(--airplay-button);\n  --media-pip-button-display: var(--pip-button);\n  --media-fullscreen-button-display: var(--fullscreen-button);\n  --media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display));\n  --media-playback-rate-button-display: var(--playback-rate-button);\n  --media-playback-rate-menu-button-display: var(--playback-rate-menu-button);\n  --media-volume-range-display: var(--volume-range);\n  --media-time-range-display: var(--time-range);\n  --media-time-display-display: var(--time-display);\n  --media-duration-display-display: var(--duration-display);\n  --media-title-display-display: var(--title-display);\n\n  display: inline-block;\n  line-height: 0;\n  width: 100%;\n}\n\na {\n  color: #fff;\n  font-size: 0.9em;\n  text-decoration: underline;\n}\n\nmedia-theme {\n  display: inline-block;\n  line-height: 0;\n  width: 100%;\n  height: 100%;\n  direction: ltr;\n}\n\nmedia-poster-image {\n  display: inline-block;\n  line-height: 0;\n  width: 100%;\n  height: 100%;\n}\n\nmedia-poster-image:not([src]):not([placeholdersrc]) {\n  display: none;\n}
2\n\n::part(top),\n[part~='top'] {\n  --media-control-display: var(--controls, var(--top-controls));\n  --media-play-button-display: var(--play-button, var(--top-play-button));\n  --media-live-button-display: var(--live-button, var(--top-live-button));\n  --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button));\n  --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button));\n  --media-mute-button-display: var(--mute-button, var(--top-mute-button));\n  --media-captions-button-display: var(--captions-button, var(--top-captions-button));\n  --media-captions-menu-button-display: var(\n    --captions-menu-button,\n    var(--media-captions-button-display, var(--top-captions-menu-button))\n  );\n  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button));\n  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button));\n  --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button));\n  --media-pip-button-display: var(--pip-button, var(--top-pip-button));\n  --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button));\n  --media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display)));\n  --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button));\n  --media-playback-rate-menu-button-display: var(\n    --captions-menu-button,\n    var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button))\n  );\n  --media-volume-range-display: var(--volume-range, var(--top-volume-range));\n  --media-time-range-display: var(--time-range, var(--top-time-range));\n  --media-time-display-display: var(--time-display, var(--top-time-display));\n  --media-duration-display-display: var(--duration-display, var(--top-duration-display));\n  --media-title-display-display: var(--title-display, var(--top-title-display));\n}\n\n::part(center),\n[part~='center'] {\n  --media-control-display: var(--controls, var(--center-controls));\n  --media-play-button-display: var(--play-button, var(--center-play-button));\n  --media-live-button-display: var(--live-button, var(--center-live-button));\n  --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button));\n  --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button));\n  --media-mute-button-display: var(--mute-button, var(--center-mute-button));\n  --media-captions-button-display: var(--captions-button, var(--center-captions-button));\n  --media-captions-menu-button-display: var(\n    --captions-menu-button,\n    var(--media-captions-button-display, var(--center-captions-menu-button))\n  );\n  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button));\n  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button));\n  --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button));\n  --media-pip-button-display: var(--pip-button, var(--center-pip-button));\n  --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button));\n  --media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display)));\n  --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button));\n  --media-playback-rate-menu-button-display: var(\n    --playback-rate-menu-button,\n    var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button))\n  );\n  --media-volume-range-display: var(--volume-range, var(--center-volume-range));\n  --media-time-range-display: var(--time-range, var(--center-time-range));\n  --media-time-display-display: var(--time-display, var(--center-time-display));\n  --media-duration-display-display: var(--duration-display, var(--center-duration-display));\n}\n\n::part(bottom),\n[part~='bottom'] {\n  --media-control-display: var(--controls, var(--bottom-control
2s));\n  --media-play-button-display: var(--play-button, var(--bottom-play-button));\n  --media-live-button-display: var(--live-button, var(--bottom-live-button));\n  --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button));\n  --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button));\n  --media-mute-button-display: var(--mute-button, var(--bottom-mute-button));\n  --media-captions-button-display: var(--captions-button, var(--bottom-captions-button));\n  --media-captions-menu-button-display: var(\n    --captions-menu-button,\n    var(--media-captions-button-display, var(--bottom-captions-menu-button))\n  );\n  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button));\n  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button));\n  --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button));\n  --media-pip-button-display: var(--pip-button, var(--bottom-pip-button));\n  --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button));\n  --media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display)));\n  --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button));\n  --media-playback-rate-menu-button-display: var(\n    --playback-rate-menu-button,\n    var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button))\n  );\n  --media-volume-range-display: var(--volume-range, var(--bottom-volume-range));\n  --media-time-range-display: var(--time-range, var(--bottom-time-range));\n  --media-time-display-display: var(--time-display, var(--bottom-time-display));\n  --media-duration-display-display: var(--duration-display, var(--bottom-duration-display));\n  --media-title-display-display: var(--title-display, var(--bottom-title-display));\n}\n\n:host([no-tooltips]) {\n  --media-tooltip-display: none;\n}\n",sD(i))},oD=Object.values({TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"}).join(", "),sD=function(i){var e,t,s,n,d,a,h,f,v,u,y,E,_,k,p,g,T,w,S,b,A,I,R,O,L,D,x,C,M,P,N,U,F,q,B,j,V,H,W,G,K,Y;return rD(r||(r=l(['\n  <media-theme\n    template="','"\n    defaultstreamtype="','"\n    hotkeys="','"\n    nohotkeys="','"\n    noautoseektolive="','"\n    novolumepref="','"\n    nomutedpref="','"\n    disabled="','"\n    audio="','"\n    style="','"\n    defaultsubtitles="','"\n    forwardseekoffset="','"\n    backwardseekoffset="','"\n    playbackrates="','"\n    defaultshowremainingtime="','"\n    defaultduration="','"\n    hideduration="','"\n    title="','"\n    videotitle="','"\n    proudlydisplaymuxbadge="','"\n    exportparts="','"\n  >\n    <mux-video\n      slot="media"\n      inert="','"\n      target-live-window="','"\n      stream-type="','"\n      crossorigin="','"\n      playsinline\n      autoplay="','"\n      muted="','"\n      loop="','"\n      preload="','"\n      debug="','"\n      prefer-cmcd="','"\n      disable-tracking="','"\n      disable-cookies="','"\n      prefer-playback="','"\n      start-time="','"\n      initial-bandwidth-estimate-kbps="','"\n      initial-estimate-segments="','"\n      min-preload-segments="','"\n      beacon-collection-domain="','"\n      player-init-time="','"\n      player-software-name="','"\n      player-software-version="','"\n      env-key="','"\n      custom-domain="','"\n      src="','"\n      cast-src="','"\n      cast-receiver="','"\n      drm-token="','"\n      playback-token="','"\n      exportparts="video"\n      disable-pseudo-ended="','"\n      max-reconnect-retries="','"\n      max-auto-resolution="','"\n      cap-rendition-to-player-size="','"\n    >\n      ','\n      <slot></slot>\n    </mux-video>\n    <slot name="poster" slot="poster">\n      <media-poster-image\n        part="poster"\n        exportparts="poster, img"\n        src="','"\n        placeholdersrc="','"\n      ></media-poster-image>\n    </slot>\n  </media-theme>\n'])),i.themeTemplate||!1,null!=(e=i.defaultStreamType)&&e,function(i){var e=i.hotKe
2ys?"".concat(i.hotKeys):"";return"live"===DL(i.streamType)&&(e+=" noarrowleft noarrowright"),e}(i)||!1,i.noHotKeys||!i.hasSrc||!1,!(null==(t=i.streamType)||!t.includes(ef.LIVE))&&0!==i.targetLiveWindow,i.novolumepref||!1,i.nomutedpref||!1,!i.hasSrc||i.isDialogOpen,null!=(s=i.audio)&&s,null!=(n=function(i){var e="";return Object.entries(i).forEach((function(t){var n=m(t,2),r=n[0],s=n[1];null!=s&&(e+="".concat(TL(r),": ").concat(s,"; "))})),e?e.trim():void 0}({"--media-primary-color":i.primaryColor,"--media-secondary-color":i.secondaryColor,"--media-accent-color":i.accentColor}))&&n,!i.defaultHiddenCaptions,null!=(d=i.forwardSeekOffset)&&d,null!=(a=i.backwardSeekOffset)&&a,null!=(h=i.playbackRates)&&h,null!=(f=i.defaultShowRemainingTime)&&f,null!=(v=i.defaultDuration)&&v,null!=(u=i.hideDuration)&&u,null!=(y=i.title)&&y,null!=(E=i.videoTitle)&&E,null!=(_=i.proudlyDisplayMuxBadge)&&_,oD,null!=(k=i.noHotKeys)&&k,null!=(p=i.targetLiveWindow)&&p,null!=(g=DL(i.streamType))&&g,null!=(T=i.crossOrigin)?T:"",null!=(w=i.autoplay)&&w,null!=(S=i.muted)&&S,null!=(b=i.loop)&&b,null!=(A=i.preload)&&A,null!=(I=i.debug)&&I,null!=(R=i.preferCmcd)&&R,null!=(O=i.disableTracking)&&O,null!=(L=i.disableCookies)&&L,null!=(D=i.preferPlayback)&&D,null!=i.startTime&&i.startTime,null!=i.initialBandwidthEstimateKbps&&i.initialBandwidthEstimateKbps,null!=i.initialEstimateSegments&&i.initialEstimateSegments,null!=i.minPreloadSegments&&i.minPreloadSegments,null!=(x=i.beaconCollectionDomain)&&x,null!=(C=i.playerInitTime)&&C,null!=(M=i.playerSoftwareName)&&M,null!=(P=i.playerSoftwareVersion)&&P,null!=(N=i.envKey)&&N,null!=(U=i.customDomain)&&U,i.src?i.src:!!i.playbackId&&Bp(i),i.src?i.src:!!i.playbackId&&Bp(i),null!=(F=i.castReceiver)&&F,null!=(B=null==(q=i.tokens)?void 0:q.drm)&&B,null!=(V=null==(j=i.tokens)?void 0:j.playback)&&V,null!=(H=i.disablePseudoEnded)&&H,null!=(W=i.maxReconnectRetries)&&W,null!=(G=i.maxAutoResolution)&&G,null!=(K=i.capRenditionToPlayerSize)&&K,i.storyboard?rD(o||(o=l(['<track label="thumbnails" default kind="metadata" src="','" />'])),i.storyboard):rD(c||(c=l([""]))),!!i.poster&&i.poster,null!=(Y=i.placeholder)&&Y)},uD=function(i){return i.charAt(0).toUpperCase()+i.slice(1)},cD=function(i){var e,s,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i.muxCode){var n=uD(null!=(e=i.errorCategory)?e:"video"),r=Qh(null!=(s=i.errorCategory)?s:Kh);if(i.muxCode===$h.NETWORK_OFFLINE)return wf("Your device appears to be offline",t);if(i.muxCode===$h.NETWORK_RECONNECTING)return wf("Reconnecting...",t);if(i.muxCode===$h.NETWORK_TOKEN_EXPIRED)return wf("{category} URL has expired",t).format({category:n});if([$h.NETWORK_TOKEN_SUB_MISMATCH,$h.NETWORK_TOKEN_AUD_MISMATCH,$h.NETWORK_TOKEN_AUD_MISSING,$h.NETWORK_TOKEN_MALFORMED].includes(i.muxCode))return wf("{category} URL is formatted incorrectly",t).format({category:n});if(i.muxCode===$h.NETWORK_TOKEN_MISSING)return wf("Invalid {categoryName} URL",t).format({categoryName:r});if(i.muxCode===$h.NETWORK_NOT_FOUND)return wf("{category} does not exist",t).format({category:n});if(i.muxCode===$h.NETWORK_NOT_READY){var a="live"===i.streamType?"Live stream":"Video";return wf("{mediaType} is not currently available",t).format({mediaType:a})}}if(i.code){if(i.code===Xh.MEDIA_ERR_NETWORK)return wf("Network Error",t);if(i.code===Xh.MEDIA_ERR_DECODE)return wf("Media Error",t);if(i.code===Xh.MEDIA_ERR_SRC_NOT_SUPPORTED)return wf("Source Not Supported",t)}return wf("Error",t)},lD=function(i){var e,s,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i.reload)return'Try again later or <a href="#" data-mux-reload style="color: #4a90e2;">click here to retry</a>';if(i.muxCode){var n=uD(null!=(e=i.errorCategory)?e:"video"),r=Qh(null!=(s=i.errorCategory)?s:Kh);return i.muxCode===$h.NETWORK_OFFLINE?wf("Check your internet connection and try reloading this video.",t):i.muxCode===$h.NETWORK_RECONNECTING?wf("Your connection was interrupted. Attempting to resume playback...",t):i.muxCode===$h.NETWORK_TOKEN_EXPIRED?wf("The video’s secured {tokenNamePrefix}-token has expired.",t).format({tokenNamePrefix:r}):i.muxCode===$h.NETWORK_TOKEN_SUB_MISMATCH?wf("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",t).format({tokenNamePrefix:r}):i.muxCode===$h.NETWORK_TOKEN_MALFORMED?wf("{category} URL is formatted incorrectly",t).format({category:n}):[$h.NETWORK_TOKEN_AUD_MISMATCH,$h.NETWORK_TOKEN_AUD_MISSING].includes(i.muxCode)?wf
2("The {tokenNamePrefix}-token is formatted with incorrect information.",t).format({tokenNamePrefix:r}):[$h.NETWORK_TOKEN_MISSING,$h.NETWORK_INVALID_URL].includes(i.muxCode)?wf("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",t).format({tokenNamePrefix:r}):i.muxCode===$h.NETWORK_NOT_FOUND?"":i.message}return i.code&&(i.code===Xh.MEDIA_ERR_NETWORK||i.code===Xh.MEDIA_ERR_DECODE||(i.code,Xh.MEDIA_ERR_SRC_NOT_SUPPORTED)),i.message},dD=function(i,e){var t=function(i){if(i.muxCode){if(i.muxCode===$h.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(i.muxCode===$h.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([$h.NETWORK_TOKEN_AUD_MISMATCH,$h.NETWORK_TOKEN_AUD_MISSING].includes(i.muxCode))return"403-incorrect-aud-value.md";if(i.muxCode===$h.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(i.muxCode===$h.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(i.muxCode===$h.NETWORK_NOT_FOUND)return"404-not-found.md";if(i.muxCode===$h.NETWORK_NOT_READY)return"412-not-playable.md"}if(i.code){if(i.code===Xh.MEDIA_ERR_NETWORK)return"";if(i.code===Xh.MEDIA_ERR_DECODE)return"media-decode-error.md";if(i.code===Xh.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""}(i);return{message:i.message,context:i.context,file:t}},hD=kL.createElement("template");"innerHTML"in hD&&(hD.innerHTML='<template id="media-theme-gerwig">\n  <style>\n    @keyframes pre-play-hide {\n      0% {\n        transform: scale(1);\n        opacity: 1;\n      }\n\n      30% {\n        transform: scale(0.7);\n      }\n\n      100% {\n        transform: scale(1.5);\n        opacity: 0;\n      }\n    }\n\n    :host {\n      --_primary-color: var(--media-primary-color, #fff);\n      --_secondary-color: var(--media-secondary-color, transparent);\n      --_accent-color: var(--media-accent-color, #fa50b5);\n      --_text-color: var(--media-text-color, #000);\n\n      --media-icon-color: var(--_primary-color);\n      --media-control-background: var(--_secondary-color);\n      --media-control-hover-background: var(--_accent-color);\n      --media-time-buffered-color: rgba(255, 255, 255, 0.4);\n      --media-preview-time-text-shadow: none;\n      --media-control-height: 14px;\n      --media-control-padding: 6px;\n      --media-tooltip-container-margin: 6px;\n      --media-tooltip-distance: 18px;\n\n      color: var(--_primary-color);\n      display: inline-block;\n      width: 100%;\n      height: 100%;\n    }\n\n    :host([audio]) {\n      --_secondary-color: var(--media-secondary-color, black);\n      --media-preview-time-text-shadow: none;\n    }\n\n    :host([audio]) ::slotted([slot=\'media\']) {\n      height: 0px;\n    }\n\n    :host([audio]) media-loading-indicator {\n      display: none;\n    }\n\n    :host([audio]) media-controller {\n      background: transparent;\n    }\n\n    :host([audio]) media-controller::part(vertical-layer) {\n      background: transparent;\n    }\n\n    :host([audio]) media-control-bar {\n      width: 100%;\n      background-color: var(--media-control-background);\n    }\n\n    /*\n     * 0.433s is the transition duration for VTT Regions.\n     * Borrowed here, so the captions don\'t move too fast.\n     */\n    media-controller {\n      --media-webkit-text-track-transform: translateY(0) scale(0.98);\n      --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s;\n    }\n    media-controller:is([mediapaused], :not([userinactive])) {\n      --media-webkit-text-track-transform: translateY(-50px) scale(0.98);\n      --media-webkit-text-track-transition: transform 0.15s ease;\n    }\n\n    /*\n     * CSS specific to iOS devices.\n     * See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757\n     */\n    @supports (-webkit-touch-callout: none) {\n      /* Disable subtitle adjusting for iOS Safari */\n      media-controller[mediaisfullscreen] {\n        --media-webkit-text-track-transform: unset;\n        --media-webkit-text-track-transition: unset;\n      }\n    }\n\n    media-time-range {\n      --media-box-padding-left: 6px;\n      --media-box-padding-right: 6px;\n      --media-range-bar-color: var(--_accent-color);\n      --media-time-range-buffered-color: var(--_primary-color);\n      --media-range-track-color: transparent;\n      --media-range-track-background: rgba(255, 255, 255, 0.4);\n      --media-range-thumb-background: radial-gradient(\n        circle,\n        #000 0%,\n        #000 25%,\n        var(--_accent-color) 25%,\n        var(--_accent-color)\n      );\n      --media-range-thumb-width: 12px;\n      --media-range-thumb-height: 12px;\n      --media-range-thumb-transform: scale(0);\n      --media-range-thumb-transition: transform 0.3s;\n      --media-range-thumb-opacity: 1;\n      --media-preview-background: var(--_primary-color);\n      --media-box-arrow-background: var(--_primary-color);
2\n      --media-preview-thumbnail-border: 5px solid var(--_primary-color);\n      --media-preview-border-radius: 5px;\n      --media-text-color: var(--_text-color);\n      --media-control-hover-background: transparent;\n      --media-preview-chapter-text-shadow: none;\n      color: var(--_accent-color);\n      padding: 0 6px;\n    }\n\n    :host([audio]) media-time-range {\n      --media-preview-time-padding: 1.5px 6px;\n      --media-preview-box-margin: 0 0 -5px;\n    }\n\n    media-time-range:hover {\n      --media-range-thumb-transform: scale(1);\n    }\n\n    media-preview-thumbnail {\n      border-bottom-width: 0;\n    }\n\n    [part~=\'menu\'] {\n      border-radius: 2px;\n      border: 1px solid rgba(0, 0, 0, 0.1);\n      bottom: 50px;\n      padding: 2.5px 10px;\n    }\n\n    [part~=\'menu\']::part(indicator) {\n      fill: var(--_accent-color);\n    }\n\n    [part~=\'menu\']::part(menu-item) {\n      box-sizing: border-box;\n      display: flex;\n      align-items: center;\n      padding: 6px 10px;\n      min-height: 34px;\n    }\n\n    [part~=\'menu\']::part(checked) {\n      font-weight: 700;\n    }\n\n    media-captions-menu,\n    media-rendition-menu,\n    media-audio-track-menu,\n    media-playback-rate-menu {\n      position: absolute; /* ensure they don\'t take up space in DOM on load */\n      --media-menu-background: var(--_primary-color);\n      --media-menu-item-checked-background: transparent;\n      --media-text-color: var(--_text-color);\n      --media-menu-item-hover-background: transparent;\n      --media-menu-item-hover-outline: var(--_accent-color) solid 1px;\n    }\n\n    media-rendition-menu {\n      min-width: 140px;\n    }\n\n    /* The icon is a circle so make it 16px high instead of 14px for more balance. */\n    media-audio-track-menu-button {\n      --media-control-padding: 5px;\n      --media-control-height: 16px;\n    }\n\n    media-playback-rate-menu-button {\n      --media-control-padding: 6px 3px;\n      min-width: 4.4ch;\n    }\n\n    media-playback-rate-menu {\n      --media-menu-flex-direction: row;\n      --media-menu-item-checked-background: var(--_accent-color);\n      --media-menu-item-checked-indicator-display: none;\n      margin-right: 6px;\n      padding: 0;\n      --media-menu-gap: 0.25em;\n    }\n\n    media-playback-rate-menu[part~=\'menu\']::part(menu-item) {\n      padding: 6px 6px 6px 8px;\n    }\n\n    media-playback-rate-menu[part~=\'menu\']::part(checked) {\n      color: #fff;\n    }\n\n    :host(:not([audio])) media-time-range {\n      /* Adding px is required here for calc() */\n      --media-range-padding: 0px;\n      background: transparent;\n      z-index: 10;\n      height: 10px;\n      bottom: -3px;\n      width: 100%;\n    }\n\n    media-control-bar :is([role=\'button\'], [role=\'switch\'], button) {\n      line-height: 0;\n    }\n\n    media-control-bar :is([part*=\'button\'], [part*=\'range\'], [part*=\'display\']) {\n      border-radius: 3px;\n    }\n\n    .spacer {\n      flex-grow: 1;\n      background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));\n    }\n\n    media-control-bar[slot~=\'top-chrome\'] {\n      min-height: 42px;\n      pointer-events: none;\n    }\n\n    media-control-bar {\n      --gradient-steps:\n        hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.013) 8.1%, hsl(0 0% 0% / 0.049) 15.5%, hsl(0 0% 0% / 0.104) 22.5%,\n        hsl(0 0% 0% / 0.175) 29%, hsl(0 0% 0% / 0.259) 35.3%, hsl(0 0% 0% / 0.352) 41.2%, hsl(0 0% 0% / 0.45) 47.1%,\n        hsl(0 0% 0% / 0.55) 52.9%, hsl(0 0% 0% / 0.648) 58.8%, hsl(0 0% 0% / 0.741) 64.7%, hsl(0 0% 0% / 0.825) 71%,\n        hsl(0 0% 0% / 0.896) 77.5%, hsl(0 0% 0% / 0.951) 84.5%, hsl(0 0% 0% / 0.987) 91.9%, hsl(0 0% 0%) 100%;\n    }\n\n    :host([title]) media-control-bar[slot=\'top-chrome\']::before,\n    :host([videotitle]) media-control-bar[slot=\'top-chrome\']::before {\n      content: \'\';\n      position: absolute;\n      width: 100%;\n      padding-bottom: min(100px, 25%);\n      background: linear-gradient(to top, var(--gradient-steps));\n      opacity: 0.8;\n      pointer-events: none;\n    }\n\n    :host(:not([audio])) media-control-bar[part~=\'bottom\']::before {\n      content: \'\';\n      position: absolute;\n      width: 100%;\n      bottom: 0;\n      left: 0;\n      padding-bottom: min(100px, 25%);\n      background: linear-gradient(to bottom, var(--gradient-steps));\n      opacity: 0.8;\n      z-index: 1;\n      pointer-events: none;\n    }\n\n    media-control-bar[part~=\'bottom\'] > * {\n      z-index: 20;\n    }\n\n    media-control-bar[part~=\'bottom\'] {\n      padding: 6px 6px;\n    }\n\n    media-control-bar[slot~=\'top-chrome\'] > * {\n      --media-control-background: transparent;\n      --media-control-hover-background: transparent;\n      position: relative;\n    }\n\n    media-controller::part(vertical-layer) {\n      transition: background-color 1s;\n    }\n\n    media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) {\n      background-color: var(--controls-backdrop-color, var(--controls, transparent));\n      transition: background-color 0.25s;\n    }
2\n\n    .center-controls {\n      --media-button-icon-width: 100%;\n      --media-button-icon-height: auto;\n      --media-tooltip-display: none;\n      pointer-events: none;\n      width: 100%;\n      display: flex;\n      flex-flow: row;\n      align-items: center;\n      justify-content: center;\n      paint-order: stroke;\n      stroke: rgba(102, 102, 102, 1);\n      stroke-width: 0.3px;\n      text-shadow:\n        0 0 2px rgb(0 0 0 / 0.25),\n        0 0 6px rgb(0 0 0 / 0.25);\n      filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));\n    }\n\n    .center-controls media-play-button {\n      --media-control-background: transparent;\n      --media-control-hover-background: transparent;\n      --media-control-padding: 0;\n      width: 40px;\n    }\n\n    [breakpointsm] .center-controls media-play-button {\n      width: 90px;\n      height: 90px;\n      border-radius: 50%;\n      transition: background 0.4s;\n      padding: 24px;\n      --media-control-background: #000;\n      --media-control-hover-background: var(--_accent-color);\n    }\n\n    .center-controls media-seek-backward-button,\n    .center-controls media-seek-forward-button {\n      --media-control-background: transparent;\n      --media-control-hover-background: transparent;\n      padding: 0;\n      margin: 0 20px;\n      width: max(33px, min(8%, 40px));\n      text-shadow:\n        0 0 2px rgb(0 0 0 / 0.25),\n        0 0 6px rgb(0 0 0 / 0.25);\n    }\n\n    [breakpointsm]:not([audio]) .center-controls.pre-playback {\n      display: grid;\n      align-items: initial;\n      justify-content: initial;\n      height: 100%;\n      overflow: hidden;\n    }\n\n    [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button {\n      place-self: var(--_pre-playback-place, center);\n      grid-area: 1 / 1;\n      margin: 16px;\n    }\n\n    /* Show and hide controls or pre-playback state */\n\n    [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio])\n      .center-controls.pre-playback\n      media-play-button {\n      /* Using `forwards` would lead to a laggy UI after the animation got in the end state */\n      animation: 0.3s linear pre-play-hide;\n      opacity: 0;\n      pointer-events: none;\n    }\n\n    .autoplay-unmute {\n      --media-control-hover-background: transparent;\n      width: 100%;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));\n    }\n\n    .autoplay-unmute-btn {\n      --media-control-height: 16px;\n      border-radius: 8px;\n      background: #000;\n      color: var(--_primary-color);\n      display: flex;\n      align-items: center;\n      padding: 8px 16px;\n      font-size: 18px;\n      font-weight: 500;\n      cursor: pointer;\n    }\n\n    .autoplay-unmute-btn:hover {\n      background: var(--_accent-color);\n    }\n\n    [breakpointsm] .autoplay-unmute-btn {\n      --media-control-height: 30px;\n      padding: 14px 24px;\n      font-size: 26px;\n    }\n\n    .autoplay-unmute-btn svg {\n      margin: 0 6px 0 0;\n    }\n\n    [breakpointsm] .autoplay-unmute-btn svg {\n      margin: 0 10px 0 0;\n    }\n\n    media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) {\n      display: none;\n    }\n\n    media-error-dialog:not([mediaerrorcode]) {\n      opacity: 0;\n    }\n\n    media-loading-indicator {\n      --media-loading-icon-width: 100%;\n      --media-button-icon-height: auto;\n      display: var(--media-control-display, var(--media-loading-indicator-display, flex));\n      pointer-events: none;\n      position: absolute;\n      width: min(15%, 150px);\n      flex-flow: row;\n      align-items: center;\n      justify-content: center;\n    }\n\n    /* Intentionally don\'t target the div for transition but the children\n     of the div. Prevents messing with media-chrome\'s autohide feature. */\n    media-loading-indicator + div * {\n      transition: opacity 0.15s;\n      opacity: 1;\n    }\n\n    media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * {\n      opacity: 0;\n      transition-delay: 400ms;\n    }\n\n    media-volume-range {\n      width: min(100%, 100px);\n      --media-range-padding-left: 10px;\n      --media-range-padding-right: 10px;\n      --media-range-thumb-width: 12px;\n      --media-range-thumb-height: 12px;\n      --media-range-thumb-background: radial-gradient(\n        circle,\n        #000 0%,\n        #000 25%,\n        var(--_primary-color) 25%,\n        var(--_primary-color)\n      );\n      --media-control-hover-background: none;\n    }\n\n    media-time-display {\n      white-space: nowrap;\n    }\n\n    /* Generic style for explicitly disabled controls */\n    media-control-bar[part~=\'bottom\'] [disabled],\n    media-control-bar[part~=\'bottom\'] [aria-disabled=\'true\'] {\n      opacity: 60%;
2\n      cursor: not-allowed;\n    }\n\n    media-text-display {\n      --media-font-size: 16px;\n      --media-control-padding: 14px;\n      font-weight: 500;\n    }\n\n    media-play-button.animated *:is(g, path) {\n      transition: all 0.3s;\n    }\n\n    media-play-button.animated[mediapaused] .pause-icon-pt1 {\n      opacity: 0;\n    }\n\n    media-play-button.animated[mediapaused] .pause-icon-pt2 {\n      transform-origin: center center;\n      transform: scaleY(0);\n    }\n\n    media-play-button.animated[mediapaused] .play-icon {\n      clip-path: inset(0 0 0 0);\n    }\n\n    media-play-button.animated:not([mediapaused]) .play-icon {\n      clip-path: inset(0 0 0 100%);\n    }\n\n    media-seek-forward-button,\n    media-seek-backward-button {\n      --media-font-weight: 400;\n    }\n\n    .mute-icon {\n      display: inline-block;\n    }\n\n    .mute-icon :is(path, g) {\n      transition: opacity 0.5s;\n    }\n\n    .muted {\n      opacity: 0;\n    }\n\n    media-mute-button[mediavolumelevel=\'low\'] :is(.volume-medium, .volume-high),\n    media-mute-button[mediavolumelevel=\'medium\'] :is(.volume-high) {\n      opacity: 0;\n    }\n\n    media-mute-button[mediavolumelevel=\'off\'] .unmuted {\n      opacity: 0;\n    }\n\n    media-mute-button[mediavolumelevel=\'off\'] .muted {\n      opacity: 1;\n    }\n\n    /**\n     * Our defaults for these buttons are to hide them at small sizes\n     * users can override this with CSS\n     */\n    media-controller:not([breakpointsm]):not([audio]) {\n      --bottom-play-button: none;\n      --bottom-seek-backward-button: none;\n      --bottom-seek-forward-button: none;\n      --bottom-time-display: none;\n      --bottom-playback-rate-menu-button: none;\n      --bottom-pip-button: none;\n    }\n\n    [part=\'mux-badge\'] {\n      position: absolute;\n      bottom: 10px;\n      right: 10px;\n      z-index: 2;\n      opacity: 0.6;\n      transition:\n        opacity 0.2s ease-in-out,\n        bottom 0.2s ease-in-out;\n    }\n\n    [part=\'mux-badge\']:hover {\n      opacity: 1;\n    }\n\n    [part=\'mux-badge\'] a {\n      font-size: 14px;\n      font-family: var(--_font-family);\n      color: var(--_primary-color);\n      text-decoration: none;\n      display: flex;\n      align-items: center;\n      gap: 5px;\n    }\n\n    [part=\'mux-badge\'] .mux-badge-text {\n      transition: opacity 0.5s ease-in-out;\n      opacity: 0;\n    }\n\n    [part=\'mux-badge\'] .mux-badge-logo {\n      width: 40px;\n      height: auto;\n      display: inline-block;\n    }\n\n    [part=\'mux-badge\'] .mux-badge-logo svg {\n      width: 100%;\n      height: 100%;\n      fill: white;\n    }\n\n    media-controller:not([userinactive]):not([mediahasplayed]) [part=\'mux-badge\'],\n    media-controller:not([userinactive]) [part=\'mux-badge\'],\n    media-controller[mediahasplayed][mediapaused] [part=\'mux-badge\'] {\n      transition: bottom 0.1s ease-in-out;\n    }\n\n    media-controller[userinactive]:not([mediapaused]) [part=\'mux-badge\'] {\n      transition: bottom 0.2s ease-in-out 0.62s;\n    }\n\n    media-controller:not([userinactive]) [part=\'mux-badge\'] .mux-badge-text,\n    media-controller[mediahasplayed][mediapaused] [part=\'mux-badge\'] .mux-badge-text {\n      opacity: 1;\n    }\n\n    media-controller[userinactive]:not([mediapaused]) [part=\'mux-badge\'] .mux-badge-text {\n      opacity: 0;\n    }\n\n    media-controller[userinactive]:not([mediapaused]) [part=\'mux-badge\'] {\n      bottom: 10px;\n    }\n\n    media-controller:not([userinactive]):not([mediahasplayed]) [part=\'mux-badge\'] {\n      bottom: 10px;\n    }\n\n    media-controller:not([userinactive])[mediahasplayed] [part=\'mux-badge\'],\n    media-controller[mediahasplayed][mediapaused] [part=\'mux-badge\'] {\n      bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2);\n    }\n  </style>\n\n  <template partial="TitleDisplay">\n    <template if="videotitle">\n      <template if="videotitle != true">\n        <media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display>\n      </template>\n    </template>\n    <template if="!videotitle">\n      <template if="title">\n        <media-text-display part="top title display" class="title-display">{{title}}</media-text-display>\n      </template>\n    </template>\n  </template>\n\n  <template partial="PlayButton">\n    <media-play-button\n      part="{{section ?? \'bottom\'}} play button"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n      class="animated"\n    >\n      <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon">\n        <g class="play-icon">\n          <path\n            d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"\n          />\n        </g>
2\n        <g class="pause-icon">\n          <path\n            class="pause-icon-pt1"\n            d="M5.90709 0H2.96889C2.46857 0 2.06299 0.405585 2.06299 0.9059V13.0941C2.06299 13.5944 2.46857 14 2.96889 14H5.90709C6.4074 14 6.81299 13.5944 6.81299 13.0941V0.9059C6.81299 0.405585 6.4074 0 5.90709 0Z"\n          />\n          <path\n            class="pause-icon-pt2"\n            d="M15.1571 0H12.2189C11.7186 0 11.313 0.405585 11.313 0.9059V13.0941C11.313 13.5944 11.7186 14 12.2189 14H15.1571C15.6574 14 16.063 13.5944 16.063 13.0941V0.9059C16.063 0.405585 15.6574 0 15.1571 0Z"\n          />\n        </g>\n      </svg>\n    </media-play-button>\n  </template>\n\n  <template partial="PrePlayButton">\n    <media-play-button\n      part="{{section ?? \'center\'}} play button pre-play"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n    >\n      <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)">\n        <path\n          d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"\n        />\n      </svg>\n    </media-play-button>\n  </template>\n\n  <template partial="SeekBackwardButton">\n    <media-seek-backward-button\n      seekoffset="{{backwardseekoffset}}"\n      part="{{section ?? \'bottom\'}} seek-backward button"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n    >\n      <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">\n        <path\n          d="M3.65 2.07888L0.0864 6.7279C-0.0288 6.87812 -0.0288 7.12188 0.0864 7.2721L3.65 11.9211C3.7792 12.0896 4 11.9703 4 11.7321V2.26787C4 2.02968 3.7792 1.9104 3.65 2.07888Z"\n        />\n        <text transform="translate(6 12)" style="font-size: 14px; font-family: \'ArialMT\', \'Arial\'">\n          {{backwardseekoffset}}\n        </text>\n      </svg>\n    </media-seek-backward-button>\n  </template>\n\n  <template partial="SeekForwardButton">\n    <media-seek-forward-button\n      seekoffset="{{forwardseekoffset}}"\n      part="{{section ?? \'bottom\'}} seek-forward button"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n    >\n      <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">\n        <g>\n          <text transform="translate(-1 12)" style="font-size: 14px; font-family: \'ArialMT\', \'Arial\'">\n            {{forwardseekoffset}}\n          </text>\n          <path\n            d="M18.35 11.9211L21.9136 7.2721C22.0288 7.12188 22.0288 6.87812 21.9136 6.7279L18.35 2.07888C18.2208 
21.91041 18 2.02968 18 2.26787V11.7321C18 11.9703 18.2208 12.0896 18.35 11.9211Z"\n          />\n        </g>\n      </svg>\n    </media-seek-forward-button>\n  </template>\n\n  <template partial="MuteButton">\n    <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n      <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true">\n        <g class="unmuted">\n          <path\n            d="M6.76786 1.21233L3.98606 3.98924H1.19937C0.593146 3.98924 0.101743 4.51375 0.101743 5.1607V6.96412L0 6.99998L0.101743 7.03583V8.83926C0.101743 9.48633 0.593146 10.0108 1.19937 10.0108H3.98606L6.76773 12.7877C7.23561 13.2547 8 12.9007 8 12.2171V1.78301C8 1.09925 7.23574 0.745258 6.76786 1.21233Z"\n          />\n          <path\n            class="volume-low"\n            d="M10 3.54781C10.7452 4.55141 11.1393 5.74511 11.1393 6.99991C11.1393 8.25471 10.7453 9.44791 10 10.4515L10.7988 11.0496C11.6734 9.87201 12.1356 8.47161 12.1356 6.99991C12.1356 5.52821 11.6735 4.12731 10.7988 2.94971L10 3.54781Z"\n          />\n          <path\n            class="volume-medium"\n            d="M12.3778 2.40086C13.2709 3.76756 13.7428 5.35806 13.7428 7.00026C13.7428 8.64246 13.2709 10.233 12.3778 11.5992L13.2106 12.1484C14.2107 10.6185 14.739 8.83796 14.739 7.00016C14.739 5.16236 14.2107 3.38236 13.2106 1.85156L12.3778 2.40086Z"\n          />\n          <path\n            class="volume-high"\n            d="M15.5981 0.75L14.7478 1.2719C15.7937 2.9919 16.3468 4.9723 16.3468 7C16.3468 9.0277 15.7937 11.0082 14.7478 12.7281L15.5981 13.25C16.7398 11.3722 17.343 9.211 17.343 7C17.343 4.789 16.7398 2.6268 15.5981 0.75Z"\n          />\n        </g>\n        <g class="muted">\n          <path\n            fill-rule="evenodd"\n            clip-rule="evenodd"\n            d="M4.39976 4.98924H1.19937C1.19429 4.98924 1.17777 4.98961 1.15296 5.01609C1.1271 5.04369 1.10174 5.09245 1.10174 5.1607V8.83926C1.10174 8.90761 1.12714 8.95641 1.15299 8.984C1.17779 9.01047 1.1943 9.01084 1.19937 9.01084H4.39977L7 11.6066V2.39357L4.39976 4.98924ZM7.47434 1.92006C7.4743 1.9201 7.47439 1.92002 7.47434 1.92006V1.92006ZM6.76773 12.7877L3.98606 10.0108H1.19937C0.593146 10.0108 0.101743 9.48633 0.101743 8.83926V7.03583L0 6.99998L0.101743 6.96412V5.1607C0.101743 4.51375 0.593146 3.98924 1.19937 3.98924H3.98606L6.76786 1.21233C7.23574 0.745258 8 1.09925 8 1.78301V12.2171C8 12.9007 7.23561 13.2547 6.76773 12.7877Z"\n          />\n          <path\n            fill-rule="evenodd"\n            clip-rule="evenodd"\n            d="M15.2677 9.30323C15.463 9.49849 15.7796 9.49849 15.9749 9.30323C16.1701 9.10796 16.1701 8.79138 15.9749 8.59612L14.2071 6.82841L15.9749 5.06066C16.1702 4.8654 16.1702 4.54882 15.9749 4.35355C15.7796 4.15829 15.4631 4.15829 15.2678 4.35355L13.5 6.1213L11.7322 4.35348C11.537 4.15822 11.2204 4.15822 11.0251 4.35348C10.8298 4.54874 10.8298 4.86532 11.0251 5.06058L12.7929 6.82841L11.0251 8.59619C10.8299 8.79146 10.8299 9.10804 11.0251 9.3033C11.2204 9.49856 11.537 9.49856 11.7323 9.3033L13.5 7.53552L15.2677 9.30323Z"\n          />\n        </g>\n      </svg>\n    </media-mute-button>\n  </template>\n\n  <template partial="PipButton">\n    <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n      <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">\n        <path\n          d="M15.9891 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.989C0 13.0996 0.9004 14 2.011 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0ZM17 11.9891C17 12.5465 16.5465 13 15.9891 13H2.011C1.4536 13 1.0001 12.5465 1.0001 11.9891V2.0109C1.0001 1.4535 1.4536 0.9999 2.011 0.9999H15.9891C16.5465 0.9999 17 1.4535 17 2.0109V11.9891Z"\n        />\n        <path\n          d="M15.356 5.67822H8.19523C8.03253 5.67822 7.90063 5.81012 7.90063 5.97282V11.3836C7.90063 11.5463 8.03253 11.6782 8.19523 11.6782H15.356C15.5187 11.6782 15.6506 11.5463 15.6506 11.3836V5.97282C15.6506 5.81012 15.5187 5.67822 15.356 5.67822Z"\n        />\n      </svg>\n    </media-pip-button>\n  </template>\n\n  <template partial="CaptionsMenu">\n    <media-captions-menu-button part="bottom captions button">\n      <svg aria-hidden="true" viewBox="0 0 18 14" slot="on">\n        <path\n          d="M15.989 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9004 14 2.011 14H15.989C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.989 0ZM4.2292 8.7639C4.5954 9.1902 5.0935 9.4031 5.7233 9.4031C6.1852 9.4031 6.5544 9.301 6.8302 9.0969C7.1061 8.8933 7.2863 8.614 7.3702 8.26H8.4322C8.3062 8.884 8.0093 9.3733 7.5411 9.7273C7.0733 10.0813 6.4703 10.2581 5.732 10.2581C5.108 10.2581 4.5699 10.1219 4.1168 9.8489C3.6637 9.5759 3.3141 9.1946 3.0685 8.7058C2.8224 8.2165 2.6994 7.6511 2.6994 7.009C2.6994 6.3611 2.8224 5.7927 3.0685 5.3034C3.3141 4.8146 3.6637 4.4323 4.1168 4.1559C4.5699 3.88 5.108 3.7418 5.732 3.7418C6.4703 3.7418 7.0733 3.922 7.5411 4.2818C8.0094 4.6422 8.3062 5.1461 8.4322 5.794H7.3702C7.2862 5.4283 7.106 5.1368 6.8302 4.921C6.5544 4.7052 6.1852 4.5968 5.7233 4.5968C5.0934 4.5968 4.5954 4.8116 4.2292 5.2404C3.8635 5.6696 3.6804 6.259 3.6804 7.
2009C3.6804 7.7531 3.8635 8.3381 4.2292 8.7639ZM11.0974 8.7639C11.4636 9.1902 11.9617 9.4031 12.5915 9.4031C13.0534 9.4031 13.4226 9.301 13.6984 9.0969C13.9743 8.8933 14.1545 8.614 14.2384 8.26H15.3004C15.1744 8.884 14.8775 9.3733 14.4093 9.7273C13.9415 10.0813 13.3385 10.2581 12.6002 10.2581C11.9762 10.2581 11.4381 10.1219 10.985 9.8489C10.5319 9.5759 10.1823 9.1946 9.9367 8.7058C9.6906 8.2165 9.5676 7.6511 9.5676 7.009C9.5676 6.3611 9.6906 5.7927 9.9367 5.3034C10.1823 4.8146 10.5319 4.4323 10.985 4.1559C11.4381 3.88 11.9762 3.7418 12.6002 3.7418C13.3385 3.7418 13.9415 3.922 14.4093 4.2818C14.8776 4.6422 15.1744 5.1461 15.3004 5.794H14.2384C14.1544 5.4283 13.9742 5.1368 13.6984 4.921C13.4226 4.7052 13.0534 4.5968 12.5915 4.5968C11.9616 4.5968 11.4636 4.8116 11.0974 5.2404C10.7317 5.6696 10.5486 6.259 10.5486 7.009C10.5486 7.7531 10.7317 8.3381 11.0974 8.7639Z"\n        />\n      </svg>\n      <svg aria-hidden="true" viewBox="0 0 18 14" slot="off">\n        <path\n          d="M5.73219 10.258C5.10819 10.258 4.57009 10.1218 4.11699 9.8488C3.66389 9.5758 3.31429 9.1945 3.06869 8.7057C2.82259 8.2164 2.69958 7.651 2.69958 7.0089C2.69958 6.361 2.82259 5.7926 3.06869 5.3033C3.31429 4.8145 3.66389 4.4322 4.11699 4.1558C4.57009 3.8799 5.10819 3.7417 5.73219 3.7417C6.47049 3.7417 7.07348 3.9219 7.54128 4.2817C8.00958 4.6421 8.30638 5.146 8.43238 5.7939H7.37039C7.28639 5.4282 7.10618 5.1367 6.83039 4.9209C6.55459 4.7051 6.18538 4.5967 5.72348 4.5967C5.09358 4.5967 4.59559 4.8115 4.22939 5.2403C3.86369 5.6695 3.68058 6.2589 3.68058 7.0089C3.68058 7.753 3.86369 8.338 4.22939 8.7638C4.59559 9.1901 5.09368 9.403 5.72348 9.403C6.18538 9.403 6.55459 9.3009 6.83039 9.0968C7.10629 8.8932 7.28649 8.6139 7.37039 8.2599H8.43238C8.30638 8.8839 8.00948 9.3732 7.54128 9.7272C7.07348 10.0812 6.47049 10.258 5.73219 10.258Z"\n        />\n        <path\n          d="M12.6003 10.258C11.9763 10.258 11.4382 10.1218 10.9851 9.8488C10.532 9.5758 10.1824 9.1945 9.93685 8.7057C9.69075 8.2164 9.56775 7.651 9.56775 7.0089C9.56775 6.361 9.69075 5.7926 9.93685 5.3033C10.1824 4.8145 10.532 4.4322 10.9851 4.1558C11.4382 3.8799 11.9763 3.7417 12.6003 3.7417C13.3386 3.7417 13.9416 3.9219 14.4094 4.2817C14.8777 4.6421 15.1745 5.146 15.3005 5.7939H14.2385C14.1545 5.4282 13.9743 5.1367 13.6985 4.9209C13.4227 4.7051 13.0535 4.5967 12.5916 4.5967C11.9617 4.5967 11.4637 4.8115 11.0975 5.2403C10.7318 5.6695 10.5487 6.2589 10.5487 7.0089C10.5487 7.753 10.7318 8.338 11.0975 8.7638C11.4637 9.1901 11.9618 9.403 12.5916 9.403C13.0535 9.403 13.4227 9.3009 13.6985 9.0968C13.9744 8.8932 14.1546 8.6139 14.2385 8.2599H15.3005C15.1745 8.8839 14.8776 9.3732 14.4094 9.7272C13.9416 10.0812 13.3386 10.258 12.6003 10.258Z"\n        />\n        <path\n          d="M15.9891 1C16.5465 1 17 1.4535 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H2.0109C1.4535 13 1 12.5465 1 11.9891V2.0109C1 1.4535 1.4535 0.9999 2.0109 0.9999L15.9891 1ZM15.9891 0H2.0109C0.9003 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9003 14 2.0109 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0Z"\n        />\n      </svg>\n    </media-captions-menu-button>\n    <media-captions-menu\n      hidden\n      anchor="auto"\n      part="bottom captions menu"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n      exportparts="menu-item"\n    >\n      <div slot="checked-indicator">\n        <style>\n          .indicator {\n            position: relative;\n            top: 1px;\n            width: 0.9em;\n            height: auto;\n            fill: var(--_accent-color);\n            margin-right: 5px;\n          }\n\n          [aria-checked=\'false\'] .indicator {\n            display: none;\n          }\n        </style>\n        <svg viewBox="0 0 14 18" class="indicator">\n          <path\n            d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"\n            fill-rule="evenodd"\n          />\n        </svg></div\n    ></media-captions-menu>\n  </template>\n\n  <template partial="AirplayButton">\n    <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n      <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">\n        <path\n          d="M16.1383 0H1.8618C0.8335 0 0 0.8335 0 1.8617V10.1382C0 11.1664 0.8335 12 1.8618 12H3.076C3.1204 11.9433 3.1503 11.8785 3.2012 11.826L4.004 11H1.8618C1.3866 11 1 10.6134 1 10.1382V1.8617C1 1.3865 1.3866 0.9999 1.8618 0.9999H16.1383C16.6135 0.9999 17.0001 1.3865 17.0001 1.8617V10.1382C17.0001 10.6134 16.6135 11 16.1383 11H13.9961L14.7989 11.826C14.8499 11.8785 14.8798 11.9432 14.9241 12H16.1383C17.1665 12 18.0001 11.1664 18.0001 10.1382V1.8617C18 0.8335 17.1665 0 16.1383 0Z"\n        />\n        <path\n          d="M9.55061 8.21903C9.39981 8.06383 9.20001 7.98633 9.00011 7.98633C8.80021 7.98633 8.60031 8.06383 8.44951 8.21903L4.09771 12.697C3.62471 13.1838 3.96961 13.9998 4.64831 13.9998H13.3518C14.0304 13.9998 14.3754 13.1838 13.9023 12.697L9.55061 8.21903Z"\n        />\n      </svg>\n    </media-airplay-button>\n  </template>\n\n  <template partial="FullscreenButton">\n    <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n      <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">\n        <path\n          d="M1.00745 4.39539L1.01445 1.98789C1.01605 1.43049 1.47085 0.978289 2.02835 0.979989L6.39375 0.992589L6.39665 -0.007411L2.03125 -0.020011C0.920646 -0.023211 0.0176463 0.874489 0.0144463 1.98509L0.00744629 4.39539H1.00745Z"\n        />\n        <path\n          d="M17.0144 2.03431L17.0076 4.39541H18.0076L18.0144 2.03721C18.0176 0.926712 17.1199 0.0237125 16.0093 0.0205125L11.6439 0.0078125L11.641 1.00781L16.0064 1.02041C16.5638 1.02201 17.016 1.47681 17.0144 2.03431Z"\n        />\n        <path\n          d="M16.9925 9.60498L16.9855 12.0124C16.9839 12.5698 16.5291 13.022 15.9717 13.0204L11.6063 13.0078L11.6034 14.0078L15.9688 14.0204C17.0794 14.0236 17.9823 13.1259 17.9855 12.0153L1
27.9925 9.60498H16.9925Z"\n        />\n        <path\n          d="M0.985626 11.9661L0.992426 9.60498H-0.0074737L-0.0142737 11.9632C-0.0174737 13.0738 0.880226 13.9767 1.99083 13.98L6.35623 13.9926L6.35913 12.9926L1.99373 12.98C1.43633 12.9784 0.983926 12.5236 0.985626 11.9661Z"\n        />\n      </svg>\n      <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">\n        <path\n          d="M5.39655 -0.0200195L5.38955 2.38748C5.38795 2.94488 4.93315 3.39708 4.37565 3.39538L0.0103463 3.38278L0.00744629 4.38278L4.37285 4.39538C5.48345 4.39858 6.38635 3.50088 6.38965 2.39028L6.39665 -0.0200195H5.39655Z"\n        />\n        <path\n          d="M12.6411 2.36891L12.6479 0.0078125H11.6479L11.6411 2.36601C11.6379 3.47651 12.5356 4.37951 13.6462 4.38271L18.0116 4.39531L18.0145 3.39531L13.6491 3.38271C13.0917 3.38111 12.6395 2.92641 12.6411 2.36891Z"\n        />\n        <path\n          d="M12.6034 14.0204L12.6104 11.613C12.612 11.0556 13.0668 10.6034 13.6242 10.605L17.9896 10.6176L17.9925 9.61759L13.6271 9.60499C12.5165 9.60179 11.6136 10.4995 11.6104 11.6101L11.6034 14.0204H12.6034Z"\n        />\n        <path\n          d="M5.359 11.6315L5.3522 13.9926H6.3522L6.359 11.6344C6.3622 10.5238 5.4645 9.62088 4.3539 9.61758L-0.0115043 9.60498L-0.0144043 10.605L4.351 10.6176C4.9084 10.6192 5.3607 11.074 5.359 11.6315Z"\n        />\n      </svg>\n    </media-fullscreen-button>\n  </template>\n\n  <template partial="CastButton">\n    <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">\n      <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">\n        <path\n          d="M16.0072 0H2.0291C0.9185 0 0.0181 0.9003 0.0181 2.011V5.5009C0.357 5.5016 0.6895 5.5275 1.0181 5.5669V2.011C1.0181 1.4536 1.4716 1 2.029 1H16.0072C16.5646 1 17.0181 1.4536 17.0181 2.011V11.9891C17.0181 12.5465 16.5646 13 16.0072 13H8.4358C8.4746 13.3286 8.4999 13.6611 8.4999 13.9999H16.0071C17.1177 13.9999 18.018 13.0996 18.018 11.989V2.011C18.0181 0.9003 17.1178 0 16.0072 0ZM0 6.4999V7.4999C3.584 7.4999 6.5 10.4159 6.5 13.9999H7.5C7.5 9.8642 4.1357 6.4999 0 6.4999ZM0 8.7499V9.7499C2.3433 9.7499 4.25 11.6566 4.25 13.9999H5.25C5.25 11.1049 2.895 8.7499 0 8.7499ZM0.0181 11V14H3.0181C3.0181 12.3431 1.675 11 0.0181 11Z"\n        />\n      </svg>\n      <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">\n        <path\n          d="M15.9891 0H2.01103C0.900434 0 3.35947e-05 0.9003 3.35947e-05 2.011V5.5009C0.338934 5.5016 0.671434 5.5275 1.00003 5.5669V2.011C1.00003 1.4536 1.45353 1 2.01093 1H15.9891C16.5465 1 17 1.4536 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H8.41773C8.45653 13.3286 8.48183 13.6611 8.48183 13.9999H15.989C17.0996 13.9999 17.9999 13.0996 17.9999 11.989V2.011C18 0.9003 17.0997 0 15.9891 0ZM-0.0180664 6.4999V7.4999C3.56593 7.4999 6.48193 10.4159 6.48193 13.9999H7.48193C7.48193 9.8642 4.11763 6.4999 -0.0180664 6.4999ZM-0.0180664 8.7499V9.7499C2.32523 9.7499 4.23193 11.6566 4.23193 13.9999H5.23193C5.23193 11.1049 2.87693 8.7499 -0.0180664 8.7499ZM3.35947e-05 11V14H3.00003C3.00003 12.3431 1.65693 11 3.35947e-05 11Z"\n        />\n        <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" />\n      </svg>\n    </media-cast-button>\n  </template>\n\n  <template partial="LiveButton">\n    <media-live-button part="{{section ?? \'top\'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2\n      <span slot="text">Live</span>\n    </media-live-button>\n  </template>\n\n  <template partial="PlaybackRateMenu">\n    <media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button>\n    <media-playback-rate-menu\n      hidden\n      anchor="auto"\n      rates="{{playbackrates}}"\n      exportparts="menu-item"\n      part="bottom playback-rate menu"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n    ></media-playback-rate-menu>\n  </template>\n\n  <template partial="VolumeRange">\n    <media-volume-range\n      part="bottom volume range"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n    ></media-volume-range>\n  </template>\n\n  <template partial="TimeDisplay">\n    <media-time-display\n      remaining="{{defaultshowremainingtime}}"\n      showduration="{{!hideduration}}"\n      part="bottom time display"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n    ></media-time-display>\n  </template>\n\n  <template partial="TimeRange">\n    <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}" exportparts="thumb">\n      <media-preview-thumbnail slot="preview"></media-preview-thumbnail>\n      <media-preview-chapter-display slot="preview"></media-preview-chapter-display>\n      <media-preview-time-display slot="preview"></media-preview-time-display>\n      <div slot="preview" part="arrow"></div>\n    </media-time-range>\n  </template>\n\n  <template partial="AudioTrackMenu">\n    <media-audio-track-menu-button part="bottom audio-track button">\n      <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16">\n        <path d="M9 15A7 7 0 1 1 9 1a7 7 0 0 1 0 14Zm0 1A8 8 0 1 0 9 0a8 8 0 0 0 0 16Z" />\n        <path\n          d="M5.2 6.3a.5.5 0 0 1 .5.5v2.4a.5.5 0 1 1-1 0V6.8a.5.5 0 0 1 .5-.5Zm2.4-2.4a.5.5 0 0 1 .5.5v7.2a.5.5 0 0 1-1 0V4.4a.5.5 0 0 1 .5-.5ZM10 5.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.4-.8a.5.5 0 0 1 .5.5v5.6a.5.5 0 0 1-1 0V5.2a.5.5 0 0 1 .5-.5Z"\n        />\n      </svg>\n    </media-audio-track-menu-button>\n    <media-audio-track-menu\n      hidden\n      anchor="auto"\n      part="bottom audio-track menu"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n      exportparts="menu-item"\n    >\n      <div slot="checked-indicator">\n        <style>\n          .indicator {\n            position: relative;\n            top: 1px;\n            width: 0.9em;\n            height: auto;\n            fill: var(--_accent-color);\n            margin-right: 5px;\n          }\n\n          [aria-checked=\'false\'] .indicator {\n            display: none;\n          }\n        </style>\n        <svg viewBox="0 0 14 18" class="indicator">\n          <path\n            d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"\n            fill-rule="evenodd"\n          />\n        </svg>\n      </div>\n    </media-audio-track-menu>\n  </template>\n\n  <template partial="RenditionMenu">\n    <media-rendition-menu-button part="bottom rendition button">\n      <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14">\n        <path\n          d="M2.25 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM9 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6.75 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"\n        />\n      </svg>\n    </media-rendition-menu-button>\n    <media-rendition-menu\n      hidden\n      anchor="auto"\n      part="bottom rendition menu"\n      disabled="{{disabled}}"\n      aria-disabled="{{disabled}}"\n    >\n      <div slot="checked-indicator">\n        <style>\n          .indicator {\n            position: relative;\n            top: 1px;\n            width: 0.9em;\n            height: auto;\n            fill: var(--_accent-color);\n            margin-right: 5px;\n          }\n\n          [aria-checked=\'false\'] .indicator {\n            opacity: 0;\n          }\n        </style>\n        <svg viewBox="0 0 14 18" class="indicator">\n          <path\n            d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"\n            fill-rule="evenodd"\n          />\n        </svg>\n      </div>\n    </media-rendition-menu>\n  </template>\n\n  <template partial="MuxBadge">\n    <div part="mux-badge">\n      <a href="https://www.mux.com/player" target="_blank">
2\n        <span class="mux-badge-text">Powered by</span>\n        <div class="mux-badge-logo">\n          <svg\n            viewBox="0 0 1600 500"\n            style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2"\n          >\n            <g>\n              <path\n                d="M994.287,93.486c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m0,-93.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,68.943 -56.09,125.033 -125.032,125.033c-68.942,-0 -125.03,-56.09 -125.03,-125.033l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,137.853 112.149,250.003 249.999,250.003c137.851,-0 250.001,-112.15 250.001,-250.003l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486"\n                style="fill-rule: nonzero"\n              ></path>\n              <path\n                d="M1537.51,468.511c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m-275.883,-218.509l-143.33,143.329c-24.402,24.402 -24.402,63.966 0,88.368c24.402,24.402 63.967,24.402 88.369,-0l143.33,-143.329l143.328,143.329c24.402,24.4 63.967,24.402 88.369,-0c24.403,-24.402 24.403,-63.966 0.001,-88.368l-143.33,-143.329l0.001,-0.004l143.329,-143.329c24.402,-24.402 24.402,-63.965 0,-88.367c-24.402,-24.402 -63.967,-24.402 -88.369,-0l-143.329,143.328l-143.329,-143.328c-24.402,-24.401 -63.967,-24.402 -88.369,-0c-24.402,24.402 -24.402,63.965 0,88.367l143.329,143.329l0,0.004Z"\n                style="fill-rule: nonzero"\n              ></path>\n              <path\n                d="M437.511,468.521c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m23.915,-463.762c-23.348,-9.672 -50.226,-4.327 -68.096,13.544l-143.331,143.329l-143.33,-143.329c-17.871,-17.871 -44.747,-23.216 -68.096,-13.544c-23.349,9.671 -38.574,32.455 -38.574,57.729l0,375.026c0,34.51 27.977,62.486 62.487,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-224.173l80.843,80.844c24.404,24.402 63.965,24.402 88.369,-0l80.843,-80.844l0,224.173c0,34.51 27.976,62.486 62.486,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-375.026c0,-25.274 -15.224,-48.058 -38.573,-57.729"\n                style="fill-rule: nonzero"\n              ></path>\n            </g>\n          </svg>\n        </div>\n      </a>\n    </div>\n  </template>\n\n  <media-controller\n    part="controller"\n    defaultstreamtype="{{defaultstreamtype ?? \'on-demand\'}}"\n    breakpoints="sm:470"\n    gesturesdisabled="{{disabled}}"\n    hotkeys="{{hotkeys}}"\n    nohotkeys="{{nohotkeys}}"\n    novolumepref="{{novolumepref}}"\n    audio="{{audio}}"\n    noautoseektolive="{{noautoseektolive}}"\n    defaultsubtitles="{{defaultsubtitles}}"\n    defaultduration="{{defaultduration ?? false}}"\n    keyboardforwardseekoffset="{{forwardseekoffset}}"\n    keyboardbackwardseekoffset="{{backwardseekoffset}}"\n    exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"\n    style="--_pre-playback-place:{{preplaybackplace ?? \'center\'}}"\n  >\n    <slot name="media" slot="media"></slot>\n    <slot name="poster" slot="poster"></slot>\n\n    <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>\n\n    <template if="!audio">\n      <media-error-dialog slot="dialog" noautohide></media-error-dialog>\n      \x3c!-- Pre-playback UI --\x3e\n      \x3c!-- same for both on-demand and live --\x3e\n      <div slot="centered-chrome" class="center-controls pre-playback">\n        <template if="!breakpointsm">{{>PlayButton section="center"}}</template>\n        <template if="breakpointsm">{{>PrePlayButton section="center"}}</template>\n      </div>\n\n      \x3c!-- Mux Badge --\x3e\n      <template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template>\n\n      \x3c!-- Autoplay centered unmute button --\x3e\n      \x3c!--\n        todo: figure out how show this with available state variables\n        needs to show when:\n        - autoplay is enabled\n        - playback has been successful\n        - audio is muted\n        - in place / instead of the pre-plaback play button\n        - not to show again after user has interacted with this button\n          - OR user has interacted with the mute button in the control bar\n      --\x3e\n      \x3c!--\n        There should be a >MuteButton to the left of the "Unmute" text, but a templating bug\n        makes it appear even if commented out in the markup, add it back when code is un-commented\n      --\x3e\n      \x3c!-- <div slot="centered-chrome" class="autoplay-unmute">\n        <div role="button" class="autoplay-unmute-btn">Unmute</div>\n      </div> --\x3e\n\n      <template if="streamtype == \'on-demand\'">\n        <template if="breakpointsm">\n          <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar>\n        </template>\n        {{>TimeRange}}\n        <media-control-bar part="control-bar bottom">\n          {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}}\n          {{>VolumeRange}}\n          <div class="spacer"></div>\n          {{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}}\n          {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}\n        </media-control-bar>\n      </template>\n\n      <template if="streamtype == \'live\'">\n        <media-control-bar part="control-bar top" slot="top-chrome">\n          {{>LiveButton}}\n          <template if="breakpointsm"> {{>TitleDisplay}} </template>\n        </media-control-bar>\n        <template if="targetlivewindow > 0">{{>TimeRange}}</template>\n        <media-control-bar part="control-bar bottom">\n          {{>PlayButton}}\n          <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template>\n          {{>MuteButton}} {{>VolumeRange}}\n          <div class="spacer"></div>\n          {{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}}\n          {{>FullscreenButton}}\n        </media-control-bar>\n      </template>\n    </template>\n\n    <template if="audio">\n      <template if="streamtype == \'on-demand\'">\n        <template if="title">\n          <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>\n        </template>\n        <media-control-bar part="control-bar bottom">\n          {{>PlayButton}}\n          <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>\n          {{>MuteButton}}\n          <template if="breakpointsm">{{>VolumeRange}}</template>\n          {{>TimeDisplay}} {{>TimeRange}}\n          <template if="breakpointsm">{{>PlaybackRateMenu}}</template>\n          {{>AirplayButton}} {{>CastButton}}\n        </media-control-bar>\n      </template>\n\n      <template if="streamtype == \'live\'">\n        <template if="title">\n          <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>\n        </template>\n        <media-control-bar part="control-bar bottom">\n          {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}}\n          <template if="breakpointsm">\n            {{>VolumeRange}}\n            <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>\n          </template>\n          <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template>\n          <template if="!targetlivewindow"><div class="spacer"></div></template>\n          {{>AirplayButton}} {{>CastButton}}\n        </media-control-bar>\n      </template>\n    </template>\n\n    <slot></slot>\n  </media-controller>\n</template>\n');var fD,pD,vD=function(e){T(n,e);var t=P(n);function n(){return A(this,n),t.apply(this,arguments)}return I(n)}(JA);vD.template=null==(pD=null==(fD=hD.content)?void 0:fD.children)?void 0:pD[0],_L.customElements.get("media-theme-gerwig")||_L.customElements.define("media-theme-gerwig",vD);var mD={SRC:"src",POSTER:"poster"},gD={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",P
2LAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",FULLSCREEN_ELEMENT:"fullscreen-element",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",VIDEO_TITLE:"video-title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref",NO_MUTED_PREF:"no-muted-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended"},yD=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"];function bD(i,e){var t,s,n;return x(x({src:!i.playbackId&&i.src,playbackId:i.playbackId,hasSrc:!!i.playbackId||!!i.src||!!i.currentSrc,poster:i.poster,storyboard:(null==(t=i.media)?void 0:t.currentSrc)&&i.storyboard,storyboardSrc:i.getAttribute(gD.STORYBOARD_SRC),fullscreenElement:i.getAttribute(gD.FULLSCREEN_ELEMENT),placeholder:i.getAttribute("placeholder"),themeTemplate:_D(i),thumbnailTime:!i.tokens.thumbnail&&i.thumbnailTime,autoplay:i.autoplay,crossOrigin:i.crossOrigin,loop:i.loop,noHotKeys:i.hasAttribute(gD.NOHOTKEYS),hotKeys:i.getAttribute(gD.HOTKEYS),muted:i.muted,paused:i.paused,preload:i.preload,envKey:i.envKey,preferCmcd:i.preferCmcd,debug:i.debug,disableTracking:i.disableTracking,disableCookies:i.disableCookies,tokens:i.tokens,beaconCollectionDomain:i.beaconCollectionDomain,maxResolution:i.maxResolution,minResolution:i.minResolution,maxAutoResolution:i.maxAutoResolution,programStartTime:i.programStartTime,programEndTime:i.programEndTime,assetStartTime:i.assetStartTime,assetEndTime:i.assetEndTime,renditionOrder:i.renditionOrder,metadata:i.metadata,playerInitTime:i.playerInitTime,playerSoftwareName:i.playerSoftwareName,playerSoftwareVersion:i.playerSoftwareVersion,startTime:i.startTime,initialBandwidthEstimateKbps:i.initialBandwidthEstimateKbps,initialEstimateSegments:i.initialEstimateSegments,minPreloadSegments:i.minPreloadSegments,preferPlayback:i.preferPlayback,audio:i.audio,defaultStreamType:i.defaultStreamType,targetLiveWindow:i.getAttribute(Kv.TARGET_LIVE_WINDOW),streamType:DL(i.getAttribute(Kv.STREAM_TYPE)),primaryColor:i.getAttribute(gD.PRIMARY_COLOR),secondaryColor:i.getAttribute(gD.SECONDARY_COLOR),accentColor:i.getAttribute(gD.ACCENT_COLOR),forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultDuration:i.defaultDuration,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:h2(i),playbackRates:i.getAttribute(gD.PLAYBACK_RATES),customDomain:null!=(s=i.getAttribute(Kv.CUSTOM_DOMAIN))?s:void 0,title:i.getAttribute(gD.TITLE),videoTitle:null!=(n=i.getAttribute(gD.VIDEO_TITLE))?n:i.getAttribute(gD.TITLE),novolumepref:i.hasAttribute(gD.NO_VOLUME_PREF),nomutedpref:i.hasAttribute(gD.NO_MUTED_PREF),proudlyDisplayMuxBadge:i.hasAttribute(gD.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:i.castReceiver,disablePseudoEnded:i.hasAttribute(gD.DISABLE_PSEUDO_ENDED),maxReconnectRetries:i.maxReconnectRetries,capRenditionToPlayerSize:i.capRenditionToPlayerSize},e),{},{extraSourceParams:i.extraSourceParams})}var ED=ST.formatErrorMessage;function _D(i){var e,t,s=i.theme;if(s){var n=null==(t=null==(e=i.getRootNode())?void 0:e.getElementById)?void 0:t.call(e,s);if(n&&n instanceof HTMLTemplateElement)return n;s.startsWith("media-theme-")||(s="media-theme-".concat(s));var r=_L.customElements.get(s);if(null!=r&&r.template)return r.template}}function h2(i){var e,t=null==(e=i.mediaController)?void 0:e.querySelector("media-time-display");
2return t&&"none"===getComputedStyle(t).getPropertyValue("--media-duration-display-display").trim()}function kD(i){var e=i.videoTitle?{video_title:i.videoTitle}:{};return i.getAttributeNames().filter((function(e){return e.startsWith("metadata-")})).reduce((function(e,s){var t=i.getAttribute(s);return null!==t&&(e[s.replace(/^metadata-/,"").replace(/-/g,"_")]=t),e}),e)}ST.formatErrorMessage=function(i){var e,t;if(i instanceof Xh){var s=function(i){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=cD(i,e).toString(),s=lD(i,e).toString();return{title:t,message:s}}(i,!1);return"\n      ".concat(null!=s&&s.title?"<h3>".concat(s.title,"</h3>"):"","\n      ").concat(null!=s&&s.message||null!=s&&s.linkUrl?"<p>\n        ".concat(null==s?void 0:s.message,"\n        ").concat(null!=s&&s.linkUrl?'<a\n              href="'.concat(s.linkUrl,'"\n              target="_blank"\n              rel="external noopener"\n              aria-label="').concat(null!=(e=s.linkText)?e:""," ").concat(wf("(opens in a new window)"),'"\n              >').concat(null!=(t=s.linkText)?t:s.linkUrl,"</a\n            >"):"","\n      </p>"):"","\n    ")}return ED(i)};var TD,wD,SD,AD,ID,RD,OD,LD,DD,xD,CD,MD,PD,ND,UD,rt,FD,BD,jD,VD,HD,WD,qD,GD,KD=Object.values(Kv),YD=Object.values(mD),$D=Object.values(gD),QD=LL(),zD="mux-player",XD={isDialogOpen:!1},JD={redundant_streams:!0},ZD=function(e){T(c,e);var t,n,r,o=P(c);function c(){var e;return A(this,c),e=o.call(this),cL(_(e),rt),cL(_(e),TD),cL(_(e),wD,!1),cL(_(e),SD,{}),cL(_(e),AD,!0),cL(_(e),ID,new NL(_(e),"hotkeys")),cL(_(e),RD),cL(_(e),OD,(function(){return dL(_(e),rt,VD).call(_(e))})),cL(_(e),LD,(function(){return dL(_(e),rt,VD).call(_(e))})),cL(_(e),DD,(function(){return dL(_(e),rt,VD).call(_(e))})),cL(_(e),xD,(function(i){i.composedPath().find((function(e){var t;return null==(t=null==e?void 0:e.hasAttribute)?void 0:t.call(e,"data-mux-reload")}))&&(i.preventDefault(),window.location.reload())})),cL(_(e),CD,(function(i){var t;"media-error-dialog"===(null==(t=i.composedPath()[0])?void 0:t.localName)&&dL(_(e),rt,jD).call(_(e),{isDialogOpen:!1})})),cL(_(e),MD,(function(i){var t;"media-error-dialog"===(null==(t=i.composedPath()[0])?void 0:t.localName)&&(IL(_(e),kL.activeElement)||i.preventDefault())})),cL(_(e),PD),cL(_(e),ND,x({},XD)),cL(_(e),UD,(function(i){var t,n=null==(t=e.media)?void 0:t.error;if(!(n instanceof Xh)){var r=null!=n?n:{},o=r.message,c=r.code;n=new Xh(o,c)}if(null==n||!n.fatal)return FL(n),void(n.data&&FL("".concat(n.name," data:"),n.data));var s=dD(n);s.message&&jL(s),BL(n),n.data&&BL("".concat(n.name," data:"),n.data),dL(_(e),rt,jD).call(_(e),{isDialogOpen:!0})})),lL(_(e),TD,Up()),e.attachShadow({mode:"open"}),dL(_(e),rt,BD).call(_(e)),e.isConnected&&dL(_(e),rt,FD).call(_(e)),e}return I(c,[{key:"setAttribute",value:function(i,e){y(S(c.prototype),"setAttribute",this).call(this,i,e),i.startsWith("metadata-")&&this.media&&(this.media.metadata=kD(this))}},{key:"removeAttribute",value:function(i){y(S(c.prototype),"removeAttribute",this).call(this,i),i.startsWith("metadata-")&&this.media&&(this.media.metadata=kD(this))}},{key:"mediaTheme",get:function(){var i;return null==(i=this.shadowRoot)?void 0:i.querySelector("media-theme")}},{key:"mediaController",get:function(){var i,e;return null==(e=null==(i=this.mediaTheme)?void 0:i.shadowRoot)?void 0:e.querySelector("media-controller")}},{key:"connectedCallback",value:function(){dL(this,rt,FD).call(this);var i=this.media;i&&(i.metadata=kD(this))}},{key:"disconnectedCallback",value:function(){var i,e,t,s,n,r,a,o,c,l;null==(i=uL(this,RD))||i.disconnect(),null==(e=this.media)||e.removeEventListener("streamtypechange",uL(this,OD)),null==(t=this.media)||t.removeEventListener("loadstart",uL(this,LD)),this.removeEventListener("error",uL(this,UD)),this.removeEventListener("click",uL(this,xD)),null==(s=this.mediaTheme)||s.removeEventListener("close",uL(this,CD)),null==(n=this.mediaTheme)||n.removeEventListener("focusin",uL(this,MD)),this.media&&(this.media.errorTranslator=void 0),null==(a=null==(r=this.media)?void 0:r.textTracks)||a.removeEventListener("addtrack",uL(this,DD)),null==(c=null==(o=this.media)?void 0:o.textTracks)||c.removeEventListener("removetrack",uL(this,DD)),null==(l=uL(this,PD))||l.call(this),lL(this,PD,void 0),lL(this,wD,!1)}},{key:"attributeChangedCallback",value:function(i,e,t){switch(dL(this,rt,FD).call(this),y(S(c.prototype),"attributeChangedCallback",this).call(this,i,e,t),i){case gD.HOTKEYS:uL(this,ID).value=t;break;case gD.THUMBNAIL_TIME:null!=t&&this.tokens.thumbnail&&FL(wf("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break;case gD.THUMBNAIL_TOKEN:if(t){var s=yf(t);if(s){var n=s.aud,r=zf;n!==r&&FL(wf("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:n,expectedAud:r,tokenNamePrefix:"thumbnail"}))}}break;case gD.STORYBOARD_TOKEN:if(t){var o=yf(t);if(o){var l=o.aud,d=Xf;l!==d&&FL(wf("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:l,expectedAud:d,tokenNamePrefix:"storyboard"}))}}break;case gD.DRM_TOKEN:if(t){var h=yf(t);if(h){var f=h.aud,v=Jf;f!==v&&FL(wf("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:f,expectedAud:v,tokenNamePrefix:"drm"}))}}break;case Kv.PLAYBACK_ID:null!=t&&t.includes("?token")&&BL(wf("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:t}));break;case Kv.STREAM_TYPE:t&&![ef.LIVE,ef.ON_DEMAND,ef.UNKNOWN].includes(t)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=t.includes("dvr")?Number.POSITIVE_INFINITY:0:jL({file:"invalid-stream-type.md",message:wf("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):t===ef.LIVE?null==this.getAttribute(gD.TARGET_LIVE_WINDOW)&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN;break;case gD.FULLSCREEN_ELEMENT:if(null!=t||t!==e){var m=kL.getElementById(t),E=null==m?void 0:m.querySelector("mux-player");this.mediaController&&m&&E&&(this.mediaController.fullscreenElement=m)}break;case Kv.CAP_RENDITION_TO_PLAYER_SIZE:(null==t||t!==e)&&(this.capRenditionToPlayerSize=null!=t||void 0);break;case Kv.MAX_RECONNECT_RETRIES:(null==t||t!==e)&&(this.maxReconnectRetries=Number(t))}[Kv.PLAYBACK_ID,mD.SRC,gD.PLAYBACK_TOKEN].includes(i)&&e!==t&&lL(this,ND,x(x({},uL(this,ND)),XD)),dL(this,rt,VD).call(this,k({},function(i){var e;return null!=(e=xL[i])?e:wL(i)}(i),t))}},{key:"requestFullscreen",value:(r=f(regeneratorRuntime.mark((function e(i){var t,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.mediaController||this.mediaController.hasAttribute(Wg.MEDIA_IS_FULLSCREEN)){e.next=2;break}return e.abrupt("return",(null==(t=this.mediaController)||t.dispatchEvent(new _L.CustomEvent(Fg.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((function(e,s){var t;null==(t=n.mediaController)||t.addEventListener(qg.MEDIA_IS_FULLSCREEN,(function(){return e()}),{once:!0})}))));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"exitFullscreen",value:(n=f(regeneratorRuntime.mark((function e(){var i,t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.mediaController||!this.mediaController.hasAttribute(Wg.MEDIA_IS_FULLSCREEN)){e.next=2;break}return e.abrupt("return",(null==(i=this.mediaController)||i.dispatchEvent(new _L.CustomEvent(Fg.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((function(e,n){var s;null==(s=t.mediaController)||s.addEventListener(qg.MEDIA_IS_FULLSCREEN,(function(){return e()}),{once:!0})}))));case 2:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"preferCmcd",get:function(){var i;return null!=(i=this.getAttribute(Kv.PREFER_CMCD))?i:void 0},set:function(i){i!==this.preferCmcd&&(i?af.includes(i)?this.setAttribute(Kv.PREFER_CMCD,i):FL("Invalid value for preferCmcd. Must be one of ".concat(af.join())):this.removeAttribute(Kv.PREFER_CMCD))}},{key:"hasPlayed",get:function(){var i,e;return null!=(e=null==(i=this.mediaController)?void 0:i.hasAttribute(Wg.MEDIA_HAS_P
2LAYED))&&e}},{key:"inLiveWindow",get:function(){var i;return null==(i=this.mediaController)?void 0:i.hasAttribute(Wg.MEDIA_TIME_IS_LIVE)}},{key:"_hls",get:function(){var i;return null==(i=this.media)?void 0:i._hls}},{key:"mux",get:function(){var i;return null==(i=this.media)?void 0:i.mux}},{key:"theme",get:function(){var i;return null!=(i=this.getAttribute(gD.THEME))?i:"gerwig"},set:function(i){this.setAttribute(gD.THEME,"".concat(i))}},{key:"themeProps",get:function(){var i=this.mediaTheme;if(i){var e,t={},n=C(i.getAttributeNames());try{for(n.s();!(e=n.n()).done;){var r=e.value;if(!yD.includes(r)){var s=i.getAttribute(r);t[wL(r)]=""===s||s}}}catch(e){n.e(e)}finally{n.f()}return t}},set:function(i){var e,t;dL(this,rt,FD).call(this);var s=x(x({},this.themeProps),i);for(var n in s)if(!yD.includes(n)){var r=null==i?void 0:i[n];"boolean"==typeof r||null==r?null==(e=this.mediaTheme)||e.toggleAttribute(TL(n),!!r):null==(t=this.mediaTheme)||t.setAttribute(TL(n),r)}}},{key:"playbackId",get:function(){var i;return null!=(i=this.getAttribute(Kv.PLAYBACK_ID))?i:void 0},set:function(i){i?this.setAttribute(Kv.PLAYBACK_ID,i):this.removeAttribute(Kv.PLAYBACK_ID)}},{key:"src",get:function(){var i,e;return this.playbackId?null!=(i=ex(this,mD.SRC))?i:void 0:null!=(e=this.getAttribute(mD.SRC))?e:void 0},set:function(i){i?this.setAttribute(mD.SRC,i):this.removeAttribute(mD.SRC)}},{key:"poster",get:function(){var i,e=this.getAttribute(mD.POSTER);if(null!=e)return e;var t=this.tokens;if(!t.playback||t.thumbnail)return this.playbackId&&!this.audio?function(i){var e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.token,r=t.customDomain,o=void 0===r?RL:r,s=t.thumbnailTime,c=t.programTime,a=null==n?s:void 0,l=(null!=(e=yf(n))?e:{}).aud;if(!n||"t"===l)return"https://image.".concat(o,"/").concat(i,"/thumbnail.webp").concat(AL({token:n,time:a,program_time:c}))}(this.playbackId,{customDomain:this.customDomain,thumbnailTime:null!=(i=this.thumbnailTime)?i:this.startTime,programTime:this.programStartTime,token:t.thumbnail}):void 0;FL("Missing expected thumbnail token. No poster image will be shown")},set:function(i){i||""===i?this.setAttribute(mD.POSTER,i):this.removeAttribute(mD.POSTER)}},{key:"storyboardSrc",get:function(){var i;return null!=(i=this.getAttribute(gD.STORYBOARD_SRC))?i:void 0},set:function(i){i?this.setAttribute(gD.STORYBOARD_SRC,i):this.removeAttribute(gD.STORYBOARD_SRC)}},{key:"storyboard",get:function(){var i=this.tokens;return this.storyboardSrc&&!i.storyboard?this.storyboardSrc:this.audio||!this.playbackId||!this.streamType||[ef.LIVE,ef.UNKNOWN].includes(this.streamType)||i.playback&&!i.storyboard?void 0:function(i){var e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.token,r=t.customDomain,o=void 0===r?RL:r,s=t.programStartTime,c=t.programEndTime,a=(null!=(e=yf(n))?e:{}).aud;if(!n||"s"===a)return"https://image.".concat(o,"/").concat(i,"/storyboard.vtt").concat(AL({token:n,format:"webp",program_start_time:s,program_end_time:c}))}(this.playbackId,{customDomain:this.customDomain,token:i.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}},{key:"audio",get:function(){return this.hasAttribute(gD.AUDIO)},set:function(i){i?this.setAttribute(gD.AUDIO,""):this.removeAttribute(gD.AUDIO)}},{key:"hotkeys",get:function(){return uL(this,ID)}},{key:"nohotkeys",get:function(){return this.hasAttribute(gD.NOHOTKEYS)},set:function(i){i?this.setAttribute(gD.NOHOTKEYS,""):this.removeAttribute(gD.NOHOTKEYS)}},{key:"thumbnailTime",get:function(){return SL(this.getAttribute(gD.THUMBNAIL_TIME))},set:function(i){this.setAttribute(gD.THUMBNAIL_TIME,"".concat(i))}},{key:"videoTitle",get:function(){var i,e;return null!=(e=null!=(i=this.getAttribute(gD.VIDEO_TITLE))?i:this.getAttribute(gD.TITLE))?e:""},set:function(i){i!==this.videoTitle&&(i?this.setAttribute(gD.VIDEO_TITLE,i):this.removeAttribute(gD.VIDEO_TITLE))}},{key:"placeholder",get:function(){var i;return null!=(i=ex(this,gD.PLACEHOLDER))?i:""},set:function(i){this.setAttribute(gD.PLACEHOLDER,"".concat(i))}},{key:"primaryColor",get:function(){var i,e,t=this.getAttribute(gD.PRIMARY_COLOR);if(null!=t||this.mediaTheme&&(t=null==(e=null==(i=_L.getComputedStyle(this.mediaTheme))?void 0:i.getPropertyValue("--_primary-color"))?void 0:e.trim()))return t},set:function(i){this.setAttribute(gD.PRIMARY_COLOR,"".concat(i))}},{key:"secondaryColor",get:function(){var i,e,t=this.getAttribute(gD.SECONDARY_COLOR);if(null!=t||this.mediaTheme&&(t=null==(e=null==(i=_L.getComputedStyle(this.mediaTheme))?void 0:i.getPropertyValue("--_secondary-color"))?void 0:e.trim()))return t},set:function(i){this.setAttribute(gD.SECONDARY_COLOR,"".concat(i))}},{key:"accentColor",get:function(){var i,e,t=this.getAttribute(gD.ACCENT_COLOR);if(null!=t||this.mediaTheme&&(t=null==(e=null==(i=_L.getComputedStyle(this.mediaTheme))?void 0:i.getPropertyValue("--_accent-color"))?void 0:e.trim()))return t},set:function(i){this.setAttribute(gD.ACCENT_COLOR,"".concat(i))}},{key:"defaultShowRemainingTime",get:function(){return this.hasAttribute(gD.DEFAULT_SHOW_REMAINING_TIME)},set:function(i){i?this.setAttribute(gD.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(gD.DEFAULT_SHOW_REMAINING_TIME)}},{key:"playbackRates",get:function(){if(this.hasAttribute(gD.PLAYBACK_RATES))return this.getAttribute(gD.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map((function(i){return Number(i)})).filter((function(i){return!Number.isNaN(i)})).sort((function(i,e){return i-e}))},set:function(i){i?this.setAttribute(gD.PLAYBACK_RATES,i.join(" ")):this.removeAttribute(gD.PLAYBACK_RATES)}},{key:"forwardSeekOffset",get:function(){var i;return null!=(i=SL(this.getAttribute(gD.FORWARD_SEEK_OFFSET)))?i:10},set:function(i){this.setAttribute(gD.FORWARD_SEEK_OFFSET,"".concat(i))}},{key:"backwardSeekOffset",get:function(){var i;return null!=(i=SL(this.getAttribute(gD.BACKWARD_SEEK_OFFSET)))?i:10},set:function(i){this.setAttribute(gD.BACKWARD_SEEK_OFFSET,"".concat(i))}},{key:"defaultHiddenCaptions",get:function(){return this.hasAttribute(gD.DEFAULT_HIDDEN_CAPTIONS)},set:function(i){i?this.setAttribute(gD.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(gD.DEFAULT_HIDDEN_CAPTIONS)}},{key:"defaultDuration",get:function(){return SL(this.getAttribute(gD.DEFAULT_DURATION))},set:function(i){null==i?this.removeAttribute(gD.DEFAULT_DURATION):this.setAttribute(gD.DEFAULT_DURATION,"".concat(i))}},{key:"playerInitTime",get:function(){return this.hasAttribute(Kv.PLAYER_INIT_TIME)?SL(this.getAttribute(Kv.PLAYER_INIT_TIME)):uL(this,TD)},set:function(i){i!=this.playerInitTime&&(null==i?this.removeAttribute(Kv.PLAYER_INIT_TIME):this.setAttribute(Kv.PLAYER_INIT_TIME,"".concat(+i)))}},{key:"playerSoftwareName",get:function(){var i;return null!=(i=this.getAttribute(Kv.PLAYER_SOFTWARE_NAME))?i:zD}},{key:"playerSoftwareVersion",get:function(){var i;return null!=(i=this.getAttribute(Kv.PLAYER_SOFTWARE_VERSION))?i:QD}},{key:"beaconCollectionDomain",get:function(){var i;return null!=(i=this.getAttribute(Kv.BEACON_COLLECTION_DOMAIN))?i:void 0},set:function(i){i!==this.beaconCollectionDomain&&(i?this.setAttribute(Kv.BEACON_COLLECTION_DOMAIN,i):this.removeAttribute(Kv.BEACON_COLLECTION_DOMAIN))}},{key:"maxResolution",get:function(){var i;return null!=(i=this.getAttribute(Kv.MAX_RESOLUTION))?i:void 0},set:function(i){i!==this.maxResolution&&(i?this.setAttribute(Kv.MAX_RESOLUTION,i):this.removeAttribute(Kv.MAX_RESOLUTION))}},{key:"minResolution",get:function(){var i;return null!=(i=this.getAttribute(Kv.MIN_RESOLUTION))?i:void 0},set:function(i){i!==this.minResolution&&(i?this.setAttribute(Kv.MIN_RESOLUTION,i):this.removeAttribute(Kv.MIN_RESOLUTION))}},{key:"maxAutoResolution",get:function(){var i;return null!=(i=this.getAttribute(Kv.MAX_AUTO_RESOLUTION))?i:void 0},set:function(i){null==i?this.removeAttribute(Kv.MAX_AUTO_RESOLUTION):this.setAttribute(Kv.MAX_AUTO_RESOLUTION,i)}},{key:"renditionOrder",get:function(){var i;return null!=(i=this.getAttribute(Kv.RENDITION_ORDER))?i:void 0},set:function(i){i!==this.renditionOrder&&(i?this.setAttribute(Kv.RENDITION_ORDER,i):this.removeAttribute(Kv.RENDITION_ORDER))}},{key:"programStartTime",get:function(){return SL(this.getAttribute(Kv.PROGRAM_START_TIME))},set:function(i){null==i?this.removeAttribute(Kv.PROGRAM_START_TIME):this.setAttribute(Kv.PROGRAM_START_TIME,"".concat(i))}},{key:"programEndTime",get:function(){return SL(this.getAttribute(Kv.PROGRAM_END_TIME))},set:function(i){null==i?this.removeAttribute(Kv.PROGRAM_END_TIME):this.setAttribute(Kv.PROGRAM_END_TIME,"".concat(i))}},{key:"assetStartTime",get:function(){return SL(this.getAttribute(Kv.ASSET_START_TIME))},set:function(i){null==i?this.removeAttribute(Kv.ASSET_START_TIME):this.setAttribute(Kv.ASSET_START_TIME,"".concat(i))}},{key:"assetEndTime",get:function(){return SL(this.getAttribute(Kv.ASSET_END_TIME))},set:function(i){null==i?this.removeAttribute(Kv.ASSET_END_TIME):this.setAttribute(Kv.ASSET_END_TIME,"".concat(i))}},{key:"extraSourceParams",get:function(){return this.hasAttribute(gD.EXTRA_SOURCE_PARAMS)?v(new URLSearchParams(this.getAttribute(gD.EXTRA_SOURCE_PARAMS)).entries()).reduce((function(i,e){var t=m(e,2),n=t[0],r=t[1];return i[n]=r,i}),{}):JD}
2,set:function(i){null==i?this.removeAttribute(gD.EXTRA_SOURCE_PARAMS):this.setAttribute(gD.EXTRA_SOURCE_PARAMS,new URLSearchParams(i).toString())}},{key:"customDomain",get:function(){var i;return null!=(i=this.getAttribute(Kv.CUSTOM_DOMAIN))?i:void 0},set:function(i){i!==this.customDomain&&(i?this.setAttribute(Kv.CUSTOM_DOMAIN,i):this.removeAttribute(Kv.CUSTOM_DOMAIN))}},{key:"envKey",get:function(){var i;return null!=(i=ex(this,Kv.ENV_KEY))?i:void 0},set:function(i){this.setAttribute(Kv.ENV_KEY,"".concat(i))}},{key:"noVolumePref",get:function(){return this.hasAttribute(gD.NO_VOLUME_PREF)},set:function(i){i?this.setAttribute(gD.NO_VOLUME_PREF,""):this.removeAttribute(gD.NO_VOLUME_PREF)}},{key:"noMutedPref",get:function(){return this.hasAttribute(gD.NO_MUTED_PREF)},set:function(i){i?this.setAttribute(gD.NO_MUTED_PREF,""):this.removeAttribute(gD.NO_MUTED_PREF)}},{key:"debug",get:function(){return null!=ex(this,Kv.DEBUG)},set:function(i){i?this.setAttribute(Kv.DEBUG,""):this.removeAttribute(Kv.DEBUG)}},{key:"disableTracking",get:function(){return null!=ex(this,Kv.DISABLE_TRACKING)},set:function(i){this.toggleAttribute(Kv.DISABLE_TRACKING,!!i)}},{key:"disableCookies",get:function(){return null!=ex(this,Kv.DISABLE_COOKIES)},set:function(i){i?this.setAttribute(Kv.DISABLE_COOKIES,""):this.removeAttribute(Kv.DISABLE_COOKIES)}},{key:"streamType",get:function(){var i,e,t;return null!=(t=null!=(e=this.getAttribute(Kv.STREAM_TYPE))?e:null==(i=this.media)?void 0:i.streamType)?t:ef.UNKNOWN},set:function(i){this.setAttribute(Kv.STREAM_TYPE,"".concat(i))}},{key:"defaultStreamType",get:function(){var i,e,t;return null!=(t=null!=(e=this.getAttribute(gD.DEFAULT_STREAM_TYPE))?e:null==(i=this.mediaController)?void 0:i.getAttribute(gD.DEFAULT_STREAM_TYPE))?t:ef.ON_DEMAND},set:function(i){i?this.setAttribute(gD.DEFAULT_STREAM_TYPE,i):this.removeAttribute(gD.DEFAULT_STREAM_TYPE)}},{key:"targetLiveWindow",get:function(){var i,e;return this.hasAttribute(gD.TARGET_LIVE_WINDOW)?+this.getAttribute(gD.TARGET_LIVE_WINDOW):null!=(e=null==(i=this.media)?void 0:i.targetLiveWindow)?e:Number.NaN},set:function(i){i==this.targetLiveWindow||Number.isNaN(i)&&Number.isNaN(this.targetLiveWindow)||(null==i?this.removeAttribute(gD.TARGET_LIVE_WINDOW):this.setAttribute(gD.TARGET_LIVE_WINDOW,"".concat(+i)))}},{key:"liveEdgeStart",get:function(){var i;return null==(i=this.media)?void 0:i.liveEdgeStart}},{key:"startTime",get:function(){return SL(ex(this,Kv.START_TIME))},set:function(i){this.setAttribute(Kv.START_TIME,"".concat(i))}},{key:"initialBandwidthEstimateKbps",get:function(){return SL(ex(this,Kv.INITIAL_BANDWIDTH_ESTIMATE_KBPS))},set:function(i){null==i?this.removeAttribute(Kv.INITIAL_BANDWIDTH_ESTIMATE_KBPS):this.setAttribute(Kv.INITIAL_BANDWIDTH_ESTIMATE_KBPS,"".concat(i))}},{key:"initialEstimateSegments",get:function(){return SL(ex(this,Kv.INITIAL_ESTIMATE_SEGMENTS))},set:function(i){null==i?this.removeAttribute(Kv.INITIAL_ESTIMATE_SEGMENTS):this.setAttribute(Kv.INITIAL_ESTIMATE_SEGMENTS,"".concat(i))}},{key:"minPreloadSegments",get:function(){return SL(ex(this,Kv.MIN_PRELOAD_SEGMENTS))},set:function(i){null==i?this.removeAttribute(Kv.MIN_PRELOAD_SEGMENTS):this.setAttribute(Kv.MIN_PRELOAD_SEGMENTS,"".concat(i))}},{key:"preferPlayback",get:function(){var i=this.getAttribute(Kv.PREFER_PLAYBACK);if(i===tf||i===nf)return i},set:function(i){i!==this.preferPlayback&&(i===tf||i===nf?this.setAttribute(Kv.PREFER_PLAYBACK,i):this.removeAttribute(Kv.PREFER_PLAYBACK))}},{key:"metadata",get:function(){var i;return null==(i=this.media)?void 0:i.metadata},set:function(i){dL(this,rt,FD).call(this),this.media?this.media.metadata=x(x({},kD(this)),i):BL("underlying media element missing when trying to set metadata. metadata will not be set.")}},{key:"_hlsConfig",get:function(){var i;return null==(i=this.media)?void 0:i._hlsConfig},set:function(i){dL(this,rt,FD).call(this),this.media?this.media._hlsConfig=i:BL("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.")}},{key:"addCuePoints",value:(t=f(regeneratorRuntime.mark((function e(i){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(dL(this,rt,FD).call(this),this.media){e.next=3;break}return BL("underlying media element missing when trying to addCuePoints. cuePoints will not be added."),e.abrupt("return");case 3:return e.abrupt("return",null==(t=this.media)?void 0:t.addCuePoints(i));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"activeCuePoint",get:function(){var i;return null==(i=this.media)?void 0:i.activeCuePoint}},{key:"cuePoints",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.cuePoints)?e:[]}}
2,{key:"addChapters",value:function(i){var e;if(dL(this,rt,FD).call(this),this.media)return null==(e=this.media)?void 0:e.addChapters(i);BL("underlying media element missing when trying to addChapters. chapters will not be added.")}},{key:"activeChapter",get:function(){var i;return null==(i=this.media)?void 0:i.activeChapter}},{key:"chapters",get:function(){var i,e;return null!=(e=null==(i=this.media)?void 0:i.chapters)?e:[]}},{key:"getStartDate",value:function(){var i;return null==(i=this.media)?void 0:i.getStartDate()}},{key:"currentPdt",get:function(){var i;return null==(i=this.media)?void 0:i.currentPdt}},{key:"tokens",get:function(){var i=this.getAttribute(gD.PLAYBACK_TOKEN),e=this.getAttribute(gD.DRM_TOKEN),t=this.getAttribute(gD.THUMBNAIL_TOKEN),s=this.getAttribute(gD.STORYBOARD_TOKEN);return x(x(x(x(x({},uL(this,SD)),null!=i?{playback:i}:{}),null!=e?{drm:e}:{}),null!=t?{thumbnail:t}:{}),null!=s?{storyboard:s}:{})},set:function(i){lL(this,SD,null!=i?i:{})}},{key:"playbackToken",get:function(){var i;return null!=(i=this.getAttribute(gD.PLAYBACK_TOKEN))?i:void 0},set:function(i){this.setAttribute(gD.PLAYBACK_TOKEN,"".concat(i))}},{key:"drmToken",get:function(){var i;return null!=(i=this.getAttribute(gD.DRM_TOKEN))?i:void 0},set:function(i){this.setAttribute(gD.DRM_TOKEN,"".concat(i))}},{key:"thumbnailToken",get:function(){var i;return null!=(i=this.getAttribute(gD.THUMBNAIL_TOKEN))?i:void 0},set:function(i){this.setAttribute(gD.THUMBNAIL_TOKEN,"".concat(i))}},{key:"storyboardToken",get:function(){var i;return null!=(i=this.getAttribute(gD.STORYBOARD_TOKEN))?i:void 0},set:function(i){this.setAttribute(gD.STORYBOARD_TOKEN,"".concat(i))}},{key:"addTextTrack",value:function(i,e,t,s){var n,r=null==(n=this.media)?void 0:n.nativeEl;if(r)return Df(r,i,e,t,s)}},{key:"removeTextTrack",value:function(i){var e,t=null==(e=this.media)?void 0:e.nativeEl;if(t)return function(i,e){var t=Array.prototype.find.call(i.querySelectorAll("track"),(function(s){return s.track===e}));null==t||t.remove()}(t,i)}},{key:"textTracks",get:function(){var i;return null==(i=this.media)?void 0:i.textTracks}},{key:"castReceiver",get:function(){var i;return null!=(i=this.getAttribute(gD.CAST_RECEIVER))?i:void 0},set:function(i){i!==this.castReceiver&&(i?this.setAttribute(gD.CAST_RECEIVER,i):this.removeAttribute(gD.CAST_RECEIVER))}},{key:"castCustomData",get:function(){var i;return null==(i=this.media)?void 0:i.castCustomData},set:function(i){this.media?this.media.castCustomData=i:BL("underlying media element missing when trying to set castCustomData. castCustomData will not be set.")}},{key:"noTooltips",get:function(){return this.hasAttribute(gD.NO_TOOLTIPS)},set:function(i){i?this.setAttribute(gD.NO_TOOLTIPS,""):this.removeAttribute(gD.NO_TOOLTIPS)}},{key:"proudlyDisplayMuxBadge",get:function(){return this.hasAttribute(gD.PROUDLY_DISPLAY_MUX_BADGE)},set:function(i){i?this.setAttribute(gD.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(gD.PROUDLY_DISPLAY_MUX_BADGE)}},{key:"capRenditionToPlayerSize",get:function(){var i;return null==(i=this.media)?void 0:i.capRenditionToPlayerSize},set:function(i){this.media?this.media.capRenditionToPlayerSize=i:BL("underlying media element missing when trying to set capRenditionToPlayerSize")}},{key:"maxReconnectRetries",get:function(){var i;return null==(i=this.media)?void 0:i.maxReconnectRetries},set:function(i){this.media?this.media.maxReconnectRetries=i:BL("underlying media element missing when trying to set maxReconnectRetries")}}],[{key:"NAME",get:function(){return zD}},{key:"VERSION",get:function(){return QD}},{key:"observedAttributes",get:function(){var i;return[].concat(v(null!=(i=$L.observedAttributes)?i:[]),YD,KD,$D)}}]),c}($L);function ex(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}TD=new WeakMap,wD=new WeakMap,SD=new WeakMap,AD=new WeakMap,ID=new WeakMap,RD=new WeakMap,OD=new WeakMap,LD=new WeakMap,DD=new WeakMap,xD=new WeakMap,CD=new WeakMap,MD=new WeakMap,PD=new WeakMap,ND=new WeakMap,UD=new WeakMap,rt=new WeakSet,FD=function(){var i,e,t,s;if(!uL(this,wD)){lL(this,wD,!0),dL(this,rt,VD).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof _L.HTMLElement))throw""}catch(e){BL("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch(e){BL("underlying media element failed to upgrade!")}
2try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof A_))throw""}catch(e){BL("<media-controller> failed to upgrade!")}dL(this,rt,HD).call(this),dL(this,rt,WD).call(this),dL(this,rt,qD).call(this),lL(this,AD,null==(e=null==(i=this.mediaController)?void 0:i.hasAttribute(Ib.USER_INACTIVE))||e),dL(this,rt,GD).call(this),null==(t=this.media)||t.addEventListener("streamtypechange",uL(this,OD)),null==(s=this.media)||s.addEventListener("loadstart",uL(this,LD)),this.media&&(this.media.metadata=kD(this))}},BD=function(){var i,e;try{null==(i=null==window?void 0:window.CSS)||i.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),null==(e=null==window?void 0:window.CSS)||e.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch(e){}},jD=function(i){Object.assign(uL(this,ND),i),dL(this,rt,VD).call(this)},VD=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};iD(aD(bD(this,x(x({},uL(this,ND)),i))),this.shadowRoot)},HD=function(){var e=this,i=function(t){var n,s;if(null!=t&&t.startsWith("theme-")){var r=t.replace(/^theme-/,"");if(!yD.includes(r)){var o=e.getAttribute(t);null!=o?null==(n=e.mediaTheme)||n.setAttribute(r,o):null==(s=e.mediaTheme)||s.removeAttribute(r)}}};lL(this,RD,new MutationObserver((function(e){var t,n=C(e);try{for(n.s();!(t=n.n()).done;){var r=t.value.attributeName;i(r)}}catch(e){n.e(e)}finally{n.f()}}))),uL(this,RD).observe(this,{attributes:!0}),this.getAttributeNames().forEach(i)},WD=function(){var i,e,t=this;this.addEventListener("error",uL(this,UD)),this.addEventListener("click",uL(this,xD)),null==(i=this.mediaTheme)||i.addEventListener("close",uL(this,CD)),null==(e=this.mediaTheme)||e.addEventListener("focusin",uL(this,MD)),this.media&&(this.media.errorTranslator=function(){var s,e,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!((null==(s=t.media)?void 0:s.error)instanceof Xh))return r;var a=dD(null==(e=t.media)?void 0:e.error);return{player_error_code:null==(n=t.media)?void 0:n.error.code,player_error_message:a.message?String(a.message):r.player_error_message,player_error_context:a.context?String(a.context):r.player_error_context}})},qD=function(){var i,e,t,s;null==(e=null==(i=this.media)?void 0:i.textTracks)||e.addEventListener("addtrack",uL(this,DD)),null==(s=null==(t=this.media)?void 0:t.textTracks)||s.addEventListener("removetrack",uL(this,DD))},GD=function(){var i,e,t=this;if(/Firefox/i.test(navigator.userAgent)){var n,s=new WeakMap,r=function(){return t.streamType===ef.LIVE&&!t.secondaryColor&&t.offsetWidth>=800},o=function(e,u){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r()||Array.from(e&&e.activeCues||[]).forEach((function(e){if(!(!e.snapToLines||e.line<-5||e.line>=0&&e.line<10))if(!u||t.paused){var r=e.text.split("\n").length,o=-3;t.streamType===ef.LIVE&&(o=-2);var p=o-r;if(e.line===p&&!n)return;s.has(e)||s.set(e,e.line),e.line=p}else setTimeout((function(){e.line=s.get(e)||"auto"}),500)}))},a=function(){var e,u;o(n,null!=(u=null==(e=t.mediaController)?void 0:e.hasAttribute(Ib.USER_INACTIVE))&&u)},c=function(){var e,u,r=Array.from((null==(u=null==(e=t.mediaController)?void 0:e.media)?void 0:u.textTracks)||[]).filter((function(e){return["subtitles","captions"].includes(e.kind)&&"showing"===e.mode}))[0];r!==n&&(null==n||n.removeEventListener("cuechange",a)),null==(n=r)||n.addEventListener("cuechange",a),o(n,uL(t,AD))};c(),null==(i=this.textTracks)||i.addEventListener("change",c),null==(e=this.textTracks)||e.addEventListener("addtrack",c);var l=function(){var e,u,r=null==(u=null==(e=t.mediaController)?void 0:e.hasAttribute(Ib.USER_INACTIVE))||u;uL(t,AD)!==r&&(lL(t,AD,r),o(n,uL(t,AD)))};this.addEventListener("userinactivechange",l),lL(this,PD,(function(){var e,u;null==n||n.removeEventListener("cuechange",a),null==(e=t.textTracks)||e.removeEventListener("change",c),null==(u=t.textTracks)||u.removeEventListener("addtrack",c),t.removeEventListener("userinactivechange",l)}))}};var tx=ZD;te.customElements.get("mux-player")||(te.customElements.define("mux-player",tx),te.MuxPlayerElement=tx)}()}).call(this,n(70))},78:function(e,t,n){"use strict";function r(e,source){for(var t=function(t){Object.defineProperty(e,t,{get:function(){return source[t]}})},n=0,r=Object.keys(source||{});n<r.length;n++){t(r[n])}}function o(e){if(!e._vmdModuleName)throw new Error("ERR_GET_MODULE_NAME : Could not get module accessor.\n      Make sure your module has name, we can't make accessors for unnamed modules\n      i.e. @Module({ name: 'something' })");return"vuexModuleDecorators/"+e._vmdModuleName}n.r(t),n.d(t,"Action",(function(){return T})),n.d(t,"Module",(function(){return E})),n.d(t,"Mutation",(function(){return w})),n.d(t,"MutationAction",(function(){return A})),n.d(t,"VuexModule",(function(){return c})),n.d(t,"config",(function(){return _})),n.d(t,"getModule",(function(){return l}));var c=function(e){this.actions=e.actions,this.mutations=e.mutations,this.state=e.state,this.getters=e.getters,this.namespaced=e.namespaced,this.modules=e.modules};function l(e,t){var n=o(e);if(t&&t.getters[n])return t.getters[n];if(e._statics)return e._statics;var r=e._genStatic;if(!r)throw new Error("ERR_GET_MODULE_NO_STATICS : Could not get module accessor.\n      Make sure your module has name, we can't make accessors for unnamed modules\n      i.e. @Module({ name: 'something' })");var c=r(t);return t?t.getters[n]=c:e._statics=c,c}var d=["actions","getters","mutations","modules","state","namespaced","commit"];
2function h(e,t,n,r){return new(n||(n=Promise))((function(o,c){function l(e){try{h(r.next(e))}catch(e){c(e)}}function d(e){try{h(r.throw(e))}catch(e){c(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,d)}h((r=r.apply(e,t||[])).next())}))}function f(e,body){var t,n,r,g,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return g={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function c(c){return function(l){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(6===c[0]&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=body.call(e,o)}catch(e){c=[6,e],n=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}}function v(){for(var s=0,i=0,e=arguments.length;i<e;i++)s+=arguments[i].length;var t=Array(s),n=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,o=a.length;r<o;r++,n++)t[n]=a[r];return t}function m(e,t){Object.getOwnPropertyNames(t.prototype).forEach((function(n){var o=Object.getOwnPropertyDescriptor(t.prototype,n);o.get&&e.getters&&(e.getters[n]=function(e,t,n,c){var l={context:{state:e,getters:t,rootState:n,rootGetters:c}};return r(l,e),r(l,t),o.get.call(l)})}))}function y(e){return function(t){var n=t,r=function(){return function(e){var t=new e.prototype.constructor({}),s={};return Object.keys(t).forEach((function(e){if(-1===d.indexOf(e))t.hasOwnProperty(e)&&"function"!=typeof t[e]&&(s[e]=t[e]);else if(void 0!==t[e])throw new Error("ERR_RESERVED_STATE_KEY_USED: You cannot use the following\n        ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit']\n        as fields in your module. These are reserved as they have special purpose in Vuex")})),s}(n)};n.state||(n.state=e&&e.stateFactory?r:r()),n.getters||(n.getters={}),n.namespaced||(n.namespaced=e&&e.namespaced);for(var o=Object.getPrototypeOf(n);"VuexModule"!==o.name&&""!==o.name;)m(n,o),o=Object.getPrototypeOf(o);m(n,n);var c=e;return c.name&&(Object.defineProperty(t,"_genStatic",{value:function(e){var t={store:e||c.store};if(!t.store)throw new Error("ERR_STORE_NOT_PROVIDED: To use getModule(), either the module\n            should be decorated with store in decorator, i.e. @Module({store: store}) or\n            store should be passed when calling getModule(), i.e. getModule(MyModule, this.$store)");return function(e,t,n){var r=t.stateFactory?e.state():e.state;Object.keys(r).forEach((function(e){r.hasOwnProperty(e)&&-1===["undefined","function"].indexOf(typeof r[e])&&Object.defineProperty(n,e,{get:function(){for(var path=t.name.split("/"),data=n.store.state,r=0,o=path;r<o.length;r++)data=data[o[r]];return data[e]}})}))}(n,c,t),n.getters&&function(e,t,n){Object.keys(e.getters).forEach((function(r){e.namespaced?Object.defineProperty(n,r,{get:function(){return n.store.getters[t.name+"/"+r]}}):Object.defineProperty(n,r,{get:function(){return n.store.getters[r]}})}))}(n,c,t),n.mutations&&function(e,t,n){Object.keys(e.mutations).forEach((function(r){e.namespaced?n[r]=function(){for(var e,o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];(e=n.store).commit.apply(e,v([t.name+"/"+r],o))}:n[r]=function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];(e=n.store).commit.apply(e,v([r],t))}}))}(n,c,t),n.actions&&function(e,t,n){Object.keys(e.actions).forEach((function(r){e.namespaced?n[r]=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return h(this,void 0,void 0,(function(){var o;return f(this,(function(c){return[2,(o=n.store).dispatch.apply(o,v([t.name+"/"+r],e))]}))}))}:n[r]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return h(this,void 0,void 0,(function(){var t;return f(this,(function(o){return[2,(t=n.store).dispatch.apply(t,v([r],e))]}))}))}}))}(n,c,t),t}}),Object.defineProperty(t,"_vmdModuleName",{value:c.name})),c.dynamic&&function(e,t){if(!t.name)throw new Error("Name of module not provided in decorator options");
2if(!t.store)throw new Error("Store not provided in decorator options when using dynamic option");t.store.registerModule(t.name,e,{preserveState:t.preserveState||!1})}(n,c),t}}function E(e){if("function"!=typeof e)return y(e);y({})(e)}var _={};function k(e){var t=e||{},n=t.commit,c=void 0===n?void 0:n,d=t.rawError,v=void 0===d?!!_.rawError:d,m=t.root,y=void 0!==m&&m;return function(e,t,n){var d=e.constructor;d.hasOwnProperty("actions")||(d.actions=Object.assign({},d.actions));var m=n.value,E=function(e,n){return h(this,void 0,void 0,(function(){var h,y,E,_,k;return f(this,(function(f){switch(f.label){case 0:return f.trys.push([0,5,,6]),h=null,d._genStatic?(y=o(d),(E=e.rootGetters[y]?e.rootGetters[y]:l(d)).context=e,[4,m.call(E,n)]):[3,2];case 1:return h=f.sent(),[3,4];case 2:return r(_={context:e},e.state),r(_,e.getters),[4,m.call(_,n)];case 3:h=f.sent(),f.label=4;case 4:return c&&e.commit(c,h),[2,h];case 5:throw k=f.sent(),v?k:new Error('ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access this.someMutation() or this.someGetter inside an @Action? \nThat works only in dynamic modules. \nIf not dynamic use this.context.commit("mutationName", payload) and this.context.getters["getterName"]\n'+new Error("Could not perform action "+t.toString()).stack+"\n"+k.stack);case 6:return[2]}}
vendor: 5,104 bytes, line 2
2))}))};d.actions[t]=y?{root:y,handler:E}:E}}function T(e,t,n){if(!t&&!n)return k(e);k()(e,t,n)}function w(e,t,n){var r=e.constructor;r.hasOwnProperty("mutations")||(r.mutations=Object.assign({},r.mutations));var o=n.value;r.mutations[t]=function(e,t){o.call(e,t)}}function S(e){return function(t,n,r){var o=t.constructor;o.hasOwnProperty("mutations")||(o.mutations=Object.assign({},o.mutations)),o.hasOwnProperty("actions")||(o.actions=Object.assign({},o.actions));var c=r.value,l=function(t,r){return h(this,void 0,void 0,(function(){var o,l;return f(this,(function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),[4,c.call(t,r)];case 1:return o=d.sent(),t.commit(n,o),[3,3];case 2:if(l=d.sent(),e.rawError)throw l;return console.error("Could not perform action "+n.toString()),console.error(l),[2,Promise.reject(l)];case 3:return[2]}}))}))};o.actions[n]=e.root?{root:!0,handler:l}:l,o.mutations[n]=function(t,n){e.mutate||(e.mutate=Object.keys(n));for(var r=0,o=e.mutate;r<o.length;r++){var c=o[r];if(!t.hasOwnProperty(c)||!n.hasOwnProperty(c))throw new Error("ERR_MUTATE_PARAMS_NOT_IN_PAYLOAD\n          In @MutationAction, mutate: ['a', 'b', ...] array keys must\n          match with return type = {a: {}, b: {}, ...} and must\n          also be in state.");t[c]=n[c]}}}}function A(e,t,n){if(!t&&!n)return S(e);S({})(e,t,n)}},8:function(e,t,n){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",l="quarter",d="year",h="date",f="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},E=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:E,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+E(r,2,"0")+":"+E(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,c),s=n-i<0,u=t.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:d,w:o,d:a,D:h,h:u,m:s,s:i,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},_="en",k={};k[_]=y;var p=function(e){return e instanceof A},T=function(e,t,n){var r;if(!e)return _;if("string"==typeof e)k[e]&&(r=e),t&&(k[e]=t,r=e);else{var i=e.name;k[i]=e,r=i}return!n&&r&&(_=r),r||!n&&_},w=function(e,t){if(p(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},S=g;S.l=T,S.i=p,S.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function y(e){this.$L=T(e.locale,null,!0),this.parse(e)}var E=y.prototype;return E.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(v);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},E.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},E.$utils=function(){return S},E.isValid=function(){return!(this.$d.toString()===f)},E.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},E.isAfter=function(e,t){return w(e)<this.startOf(t)},E.isBefore=function(e,t){return this.endOf(t)<w(e)},E.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(e,t){var n=this,r=!!S.u(t)||t,l=S.p(e),f=function(e,t){var i=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(a)},v=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,y=this.$M,E=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case d:return r?f(1,0):f(31,11);case c:return r?f(1,y):f(0,y+1);case o:var _=this.$locale().weekStart||0,k=(m<_?m+7:m)-_;return f(r?E-k:E+(6-k),y);case a:case h:return v(g+"Hours",0);case u:return v(g+"Minutes",1);case s:return v(g+"Seconds",2);case i:return v(g+"Milliseconds",3);default:return this.clone()}},E.endOf=function(e){return this.startOf(e,!1)},E.$set=function(e,t){var n,o=S.p(e),l="set"+(this.$u?"UTC":""),f=(n={},n[a]=l+"Date",n[h]=l+"Date",n[c]=l+"Month",n[d]=l+"FullYear",n[u]=l+"Hours",n[s]=l+"Minutes",n[i]=l+"Seconds",n[r]=l+"Milliseconds",n)[o],v=o===a?this.$D+(t-this.$W):t;if(o===c||o===d){var m=this.clone().set(h,1);
2m.$d[f](v),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](v);return this.init(),this},E.set=function(e,t){return this.clone().$set(e,t)},E.get=function(e){return this[S.p(e)]()},E.add=function(r,l){var h,f=this;r=Number(r);var v=S.p(l),m=function(e){var t=w(f);return S.w(t.date(t.date()+Math.round(e*r)),f)};if(v===c)return this.set(c,this.$M+r);if(v===d)return this.set(d,this.$y+r);if(v===a)return m(1);if(v===o)return m(7);var y=(h={},h[s]=t,h[u]=n,h[i]=e,h)[v]||1,E=this.$d.getTime()+r*y;return S.w(E,this)},E.subtract=function(e,t){return this.add(-1*e,t)},E.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=S.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,l=function(e,n,i,s){return e&&(e[n]||e(t,r))||i[n].substr(0,s)},d=function(e){return S.s(s%12||12,e,"0")},h=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},v={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:S.s(a+1,2,"0"),MMM:l(n.monthsShort,a,c,3),MMMM:l(c,a),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,o,2),ddd:l(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:S.s(s,2,"0"),h:d(1),hh:d(2),a:h(s,u,!0),A:h(s,u,!1),m:String(u),mm:S.s(u,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:i};return r.replace(m,(function(e,t){return t||v[e]||i.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(r,h,f){var v,m=S.p(h),y=w(r),E=(y.utcOffset()-this.utcOffset())*t,g=this-y,_=S.m(this,y);return _=(v={},v[d]=_/12,v[c]=_,v[l]=_/3,v[o]=(g-E)/6048e5,v[a]=(g-E)/864e5,v[u]=g/n,v[s]=g/t,v[i]=g/e,v)[m]||g,f?_:S.a(_)},E.daysInMonth=function(){return this.endOf(c).$D},E.$locale=function(){return k[this.$L]},E.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=T(e,t,!0);return r&&(n.$L=r),n},E.clone=function(){return S.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},y}(),b=A.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",d],["$D",h]].forEach((function(e){b[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,A,w),e.$i=!0),w},w.locale=T,w.isDayjs=p,w.unix=function(e){return w(1e3*e)},w.en=k[_],w.Ls=k,w.p={},w}()},80:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return S})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return v})),n.d(t,"h",(function(){return y})),n.d(t,"i",(function(){return m})),n.d(t,"j",(function(){return _})),n.d(t,"k",(function(){return E})),n.d(t,"l",(function(){return k})),n.d(t,"m",(function(){return w})),n.d(t,"n",(function(){return T}));var r=n(139),o=n(30);function c(e,t){return Object(o.c)().captureException(e,{captureContext:t})}function l(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return Object(o.c)().captureMessage(e,n,r)}function d(e,t){return Object(o.c)().captureEvent(e,t)}function h(e){Object(o.c)().configureScope(e)}function f(e){Object(o.c)().addBreadcrumb(e)}function v(e,t){Object(o.c)().setContext(e,t)}function m(e){Object(o.c)().setExtras(e)}function y(e,t){Object(o.c)().setExtra(e,t)}function E(e){Object(o.c)().setTags(e)}function _(e,t){Object(o.c)().setTag(e,t)}function k(e){Object(o.c)().setUser(e)}function T(e){Object(o.c)().withScope(e)}function w(e,t){return Object(o.c)().startTransaction({...e},t)}function S(e,t){const n=Object(o.c)().getClient();if(n){if(n.captureCheckIn)return n.captureCheckIn(e,t)}else;return Object(r.f)()}},809:function(e,t,n){"use strict";n.r(t),n.d(t,"State",(function(){return c})),n.d(t,"Getter",(function(){return l})),n.d(t,"Action",(function(){return d})),n.d(t,"Mutation",(function(){return h})),n.d(t,"namespace",(function(){return f}));var r=n(46),o=n(125),c=v("computed",o.e),l=v("computed",o.c),d=v("methods",o.b),h=v("methods",o.d);function f(e,t){function n(t){return function(a,b){if("string"==typeof b){var n=b,r=a;return t(n,{namespace:e})(r,n)}var o=a,c=function(a,b){var e={};return[a,b].forEach((function(t){Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}(b||{},{namespace:e});return t(o,c)}}return t?(console.warn("[vuex-class] passing the 2nd argument to `namespace` function is deprecated. pass only namespace string instead."),n(t)):{State:n(c),Getter:n(l),Mutation:n(h),Action:n(d)}}function v(e,t){function n(map,n){return Object(r.createDecorator)((function(r,o){r[e]||(r[e]={});var c,l=((c={})[o]=map,c);r[e][o]=void 0!==n?t(n,l)[o]:t(l)[o]}))}return function(a,b){if("string"==typeof b){var e=b,t=a;return n(e,void 0)(t,e)}return n(a,function(e){var t=e&&e.namespace;if("string"!=typeof t)return;if("/"!==t[t.length-1])return t+"/";return t}(b))}}},810:function(e,t,n){"use strict";n.r(t),n.d(t,"checkFetcher",(function(){return f})),n.d(t,"createSignalIfSupported",(function(){return v})),n.d(t,"fallbackHttpConfig",(function(){return l})),n.d(t,"parseAndCheckHttpResponse",(function(){return h})),n.d(t,"selectHttpOptionsAndBody",(function(){return m})),n.d(t,"selectURI",(function(){return E})),n.d(t,"serializeFetchParameter",(function(){return y}
2)),n.d(t,"throwServerError",(function(){return d}));var r=function(){return(r=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};var o=n(147),c=n(23),l={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},d=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},h=function(e){return function(t){return t.text().then((function(e){try{return JSON.parse(e)}catch(r){var n=r;return n.name="ServerParseError",n.response=t,n.statusCode=t.status,n.bodyText=e,Promise.reject(n)}})).then((function(n){return t.status>=300&&d(t,n,"Response not successful: Received status code "+t.status),Array.isArray(n)||n.hasOwnProperty("data")||n.hasOwnProperty("errors")||d(t,n,"Server response was missing for query '"+(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName)+"'."),n}))}},f=function(e){if(!e&&"undefined"==typeof fetch){throw"undefined"==typeof window&&"node-fetch",new c.a(1)}},v=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}},m=function(e,t){for(var n=[],c=2;c<arguments.length;c++)n[c-2]=arguments[c];var l=r({},t.options,{headers:t.headers,credentials:t.credentials}),d=t.http;n.forEach((function(e){l=r({},l,e.options,{headers:r({},l.headers,e.headers)}),e.credentials&&(l.credentials=e.credentials),d=r({},d,e.http)}));var h=e.operationName,f=e.extensions,v=e.variables,m=e.query,body={operationName:h,variables:v};return d.includeExtensions&&(body.extensions=f),d.includeQuery&&(body.query=Object(o.print)(m)),{options:l,body:body}},y=function(p,label){var e;try{e=JSON.stringify(p)}catch(e){var t=new c.a(2);throw t.parseError=e,t}return e},E=function(e,t){var n=e.getContext().uri;return n||("function"==typeof t?t(e):t||"/graphql")}},815:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return c}));function r(header,e=Date.now()){const t=parseInt(`${header}`,10);if(!isNaN(t))return 1e3*t;const n=Date.parse(`${header}`);return isNaN(n)?6e4:n-e}function o(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function c(e,{statusCode:t,headers:n},o=Date.now()){const c={...e},l=n&&n["x-sentry-rate-limits"],d=n&&n["retry-after"];if(l)for(const e of l.trim().split(",")){const[t,n]=e.split(":",2),r=parseInt(t,10),l=1e3*(isNaN(r)?60:r);if(n)for(const e of n.split(";"))c[e]=o+l;else c.all=o+l}else d?c.all=o+r(d,o):429===t&&(c.all=o+6e4);return c}},816:function(e,t,n){"use strict";function r(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}n.d(t,"a",(function(){return r}))},817:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(49),o=n(137),c=n(65);class l{static __initStatic(){this.id="ExtraErrorData"}__init(){this.name=l.id}constructor(e){l.prototype.__init.call(this),this._options={depth:3,...e}}setupOnce(e,t){e(((e,n)=>{const r=t().getIntegration(l);return r?r.enhanceEventWithErrorData(e,n):e}))}enhanceEventWithErrorData(e,t={}){if(!t.originalException||!Object(r.d)(t.originalException))return e;const n=t.originalException.name||t.originalException.constructor.name,l=this._extractErrorData(t.originalException);if(l){const t={...e.contexts},d=Object(o.a)(l,this._options.depth);return Object(r.i)(d)&&(Object(c.a)(d,"__sentry_skip_normalization__",!0),t[n]=d),{...e,contexts:t}}return e}_extractErrorData(e){try{const t=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],n={};for(const o of Object.keys(e)){if(-1!==t.indexOf(o))continue;const c=e[o];n[o]=Object(r.d)(c)?c.toString():c}if("function"==typeof e.toJSON){const t=e.toJSON();for(const e of Object.keys(t)){const o=t[e];n[e]=Object(r.d)(o)?o.toString():o}}return n}catch(e){}return null}}l.__initStatic()},818:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(57),o=n(315);const c=r.a;class l{static __initStatic(){this.id="ReportingObserver"}__init(){this.name=l.id}constructor(e={types:["crash","deprecation","intervention"]}){this._options=e,l.prototype.__init.call(this)}setupOnce(e,t){if(!Object(o.d)())return;this._getCurrentHub=t;new c.ReportingObserver(this.handler.bind(this),{buffered:!0,types:this._options.types}).observe()}handler(e){const t=this._getCurrentHub&&this._getCurrentHub();if(t&&t.getIntegration(l))for(const n of e)t.withScope((e=>{e.setExtra("url",n.url);const label=`ReportingObserver [${n.type}]`;let details="No details available";if(n.body){const t={};for(const e in n.body)t[e]=n.body[e];if(e.setExtra("body",t),"crash"===n.type){const body=n.body;details=[body.crashId||"",body.reason||""].join(" ").trim()||details}else{details=n.body.message||details}}t.captureMessage(`${label}: ${details}`)}))}}l.__initStatic()},819:function(e,t,n){"use strict";var r,o=new Uint8Array(16);function c(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}var l=/^(?:[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;for(var d=function(e){return"string"==typeof e&&l.test(e)},h=[],f=0;f<256;++f)h.push((f+256).toString(16).substr(1));var v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase();
2if(!d(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||c)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return v(r)}},820:function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(422),o=n(476),c=n(248),l=n(57),d=n(139);const h=["activate","mount","update"];var f=n(30);const v=/(?:^|[-_])(\w)/g,m="<Anonymous>",y=(e,t)=>{if(!e)return m;if(e.$root===e)return"<Root>";if(!e.$options)return m;const n=e.$options;let r=n.name||n._componentTag;const o=n.__file;if(!r&&o){const e=o.match(/([^/\\]+)\.vue$/);e&&(r=e[1])}return(r?`<${c=r,c.replace(v,(e=>e.toUpperCase())).replace(/[-_]/g,"")}>`:m)+(o&&!1!==t?` at ${o}`:"");var c},E=(e,t)=>{const{errorHandler:n,warnHandler:r,silent:o}=e.config;e.config.errorHandler=(c,l,d)=>{const h=y(l,!1),v=l?(e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}n>0&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return`\n\nfound in\n\n${t.map(((e,i)=>{return`${(0===i?"---\x3e ":(t=" ",n=5+2*i,t.repeat?t.repeat(n):t))+(Array.isArray(e)?`${y(e[0])}... (${e[1]} recursive calls)`:y(e))}`;var t,n})).join("\n")}`}return`\n\n(found in ${y(e)})`})(l):"",m={componentName:h,lifecycleHook:d,trace:v};if(t.attachProps&&l&&(l.$options&&l.$options.propsData?m.propsData=l.$options.propsData:l.$props&&(m.propsData=l.$props)),setTimeout((()=>{Object(f.c)().withScope((e=>{e.setContext("vue",m),Object(f.c)().captureException(c)}))})),"function"==typeof n&&n.call(e,c,l,d),t.logErrors){const e="undefined"!=typeof console,t=`Error in ${d}: "${c&&c.toString()}"`;r?r.call(null,t,l,v):e&&!o&&console.error(`[Vue warn]: ${t}${v}`)}}};var time=n(165);const _={activate:["activated","deactivated"],create:["beforeCreate","created"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function k(){const e=Object(f.c)().getScope();return e&&e.getTransaction()}const T=e=>{const t=(e.hooks||[]).concat(h).filter(((e,t,n)=>n.indexOf(e)===t)),n={};for(const r of t){const t=_[r];if(t)for(const o of t)n[o]=function(){const n=this.$root===this;if(n){const e=k();e&&(this.$_sentryRootSpan=this.$_sentryRootSpan||e.startChild({description:"Application Render",op:"ui.vue.render"}))}const c=y(this,!1),l=Array.isArray(e.trackComponents)?e.trackComponents.indexOf(c)>-1:e.trackComponents;var d,h,f;if(n||l)if(this.$_sentrySpans=this.$_sentrySpans||{},o==t[0]){const e=this.$root&&this.$root.$_sentryRootSpan||k();if(e){const t=this.$_sentrySpans[r];t&&!t.endTimestamp&&t.finish(),this.$_sentrySpans[r]=e.startChild({description:`Vue <${c}>`,op:`ui.vue.${r}`})}}else{const span=this.$_sentrySpans[r];if(!span)return;span.finish(),d=this,h=Object(time.b)(),f=e.timeout,d.$_sentryRootSpanTimer&&clearTimeout(d.$_sentryRootSpanTimer),d.$_sentryRootSpanTimer=setTimeout((()=>{d.$root&&d.$root.$_sentryRootSpan&&(d.$root.$_sentryRootSpan.finish(h),d.$root.$_sentryRootSpan=void 0)}),f)}}}return n},w={Vue:l.a.Vue,attachProps:!0,logErrors:!0,hooks:h,timeout:2e3,trackComponents:!1,_metadata:{sdk:{name:"sentry.javascript.vue",packages:[{name:"npm:@sentry/vue",version:r.a}],version:r.a}}};function S(e={}){const t={...w,...e};if(Object(o.init)(t),t.Vue||t.app)if(t.app){Object(d.c)(t.app).forEach((e=>A(e,t)))}else t.Vue&&A(t.Vue,t);else console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured.\nUpdate your `Sentry.init` call with an appropriate config option:\n`app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")}const A=(e,t)=>{const n=e;!0===(n._instance&&n._instance.isMounted)&&console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`."),E(e,t),Object(c.a)(t)&&e.mixin(T({...t,...t.tracingOptions}))}},821:function(e,t,n){"use strict";function r(e,t){let n=0;for(let i=e.length-1;i>=0;i--){const t=e[i];"."===t?e.splice(i,1):".."===t?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}n.d(t,"a",(function(){return h}));const o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function c(e){const t=o.exec(e);return t?t.slice(1):[]}function l(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const path=i>=0?e[i]:"/";path&&(t=`${path}/${t}`,n="/"===path.charAt(0))}return t=r(t.split("/").filter((p=>!!p)),!n).join("/"),(n?"/":"")+t||"."}function d(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}class h{static __initStatic(){this.id="RewriteFrames"}__init(){this.name=h.id}__init2(){this._prefix="app:///"}constructor(e={}){h.prototype.__init.call(this),h.prototype.__init2.call(this),h.prototype.__init3.call(this),e.root&&(this._root=e.root),e.prefix&&(this._prefix=e.prefix),e.iteratee&&(this._iteratee=e.iteratee)}setupOnce(e,t){e((e=>{const n=t().getIntegration(h);return n?n.process(e):e}))}process(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=this._processExceptionsEvent(t)),t}__init3(){this._iteratee=e=>{if(!e.filename)return e;const t=/^[a-zA-Z]:\\/.test(e.filename)||e.filename.includes("\\")&&!e.filename.includes("/"),n=/^\//.test(e.filename);if(t||n){const n=t?e.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):e.filename,base=this._root?function(e,t){e=l(e).slice(1),t=l(t).slice(1);const n=d(e.split("/")),r=d(t.split("/")),o=Math.min(n.length,r.length);let c=o;for(let i=0;i<o;i++)if(n[i]!==r[i]){c=i;break}let h=[];for(let i=c;i<n.length;i++)h.push("..");return h=h.concat(r.slice(c)),h.join("/")}(this._root,n):function(path,e){let t=c(path)[2];return e&&t.slice(-1*e.length)===e&&(t=t.slice(0,t.length-e.length)),t}(n);e.filename=`${this._prefix}${base}`}return e}}_processExceptionsEvent(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map((e=>({...e,...e.stacktrace&&{stacktrace:this._processStacktrace(e.stacktrace)}})))}}}catch(t){return e}}_processStacktrace(e){return{...e,frames:e&&e.frames&&e.frames.map((e=>this._iteratee(e)))}}}h.__initStatic()},822:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return E}));var r=n(49),o=n(134),object=n(65),c=n(315),l=n(57);const d=Object(l.b)();const h=Object(l.b)(),f="__sentry_xhr_v2__",v={},m={};function y(e){if(!m[e])switch(m[e]=!0,e){case"console":!function(){if(!("console"in h))return;o.a.forEach((function(e){e in h.console&&Object(object.e)(h.console,e,(function(t){return function(...n){_("console",{args:n,level:e}),t&&t.apply(h.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in h))return;const e=_.bind(null,"dom"),t=I(e,!0);h.document.addEventListener("click",t,!1),h.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=h[t]&&h[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(object.e)(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this,c=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},l=c[n]=c[n]||{refCount:0};if(!l.handler){const r=I(e);l.handler=r,t.call(this,n,r,o)}l.refCount++}catch(e){}return t.call(this,n,r,o)}})),Object(object.e)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,o=n.__sentry_instrumentation_handlers__||{},c=o[t];c&&(c.refCount--,c.refCount<=0&&(e.call(this,t,c.handler,r),c.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in h))return;const e=XMLHttpRequest.prototype;Object(object.e)(e,"open",(function(e){return function(...t){const n=t[1],o=this[f]={method:Object(r.l)(t[0])?t[0].toUpperCase():t[0],url:t[1],request_headers:{}};
2Object(r.l)(n)&&"POST"===o.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const c=()=>{const e=this[f];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}_("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?Object(object.e)(this,"onreadystatechange",(function(e){return function(...t){return c(),e.apply(this,t)}})):this.addEventListener("readystatechange",c),Object(object.e)(this,"setRequestHeader",(function(e){return function(...t){const[header,n]=t,r=this[f];return r&&(r.request_headers[header.toLowerCase()]=n),e.apply(this,t)}})),e.apply(this,t)}})),Object(object.e)(e,"send",(function(e){return function(...t){const n=this[f];return n&&void 0!==t[0]&&(n.body=t[0]),_("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}();break;case"fetch":!function(){if(!Object(c.c)())return;Object(object.e)(h,"fetch",(function(e){return function(...t){const{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:T(t),method:k(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:T(t),method:k(t,"method")?String(t.method).toUpperCase():"GET"}}(t),o={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return _("fetch",{...o}),e.apply(h,t).then((e=>(_("fetch",{...o,endTimestamp:Date.now(),response:e}),e)),(e=>{throw _("fetch",{...o,endTimestamp:Date.now(),error:e}),e}))}}))}();break;case"history":!function(){if(!function(){const e=d.chrome,t=e&&e.app&&e.app.runtime,n="history"in d&&!!d.history.pushState&&!!d.history.replaceState;return!t&&n}())return;const e=h.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=w,t=String(n);w=t,_("history",{from:e,to:t})}return e.apply(this,t)}}h.onpopstate=function(...t){const n=h.location.href,r=w;if(w=n,_("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},Object(object.e)(h.history,"pushState",t),Object(object.e)(h.history,"replaceState",t)}();break;case"error":R=h.onerror,h.onerror=function(e,t,line,n,r){return _("error",{column:n,error:r,line:line,msg:e,url:t}),!(!R||R.__SENTRY_LOADER__)&&R.apply(this,arguments)},h.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":O=h.onunhandledrejection,h.onunhandledrejection=function(e){return _("unhandledrejection",e),!(O&&!O.__SENTRY_LOADER__)||O.apply(this,arguments)},h.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return}}function E(e,t){v[e]=v[e]||[],v[e].push(t),y(e)}function _(e,data){if(e&&v[e])for(const t of v[e]||[])try{t(data)}catch(e){}}function k(e,t){return!!e&&"object"==typeof e&&!!e[t]}function T(e){return"string"==typeof e?e:e?k(e,"url")?e.url:e.toString?e.toString():"":""}let w;let S,A;function I(e,t=!1){return n=>{if(!n||A===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(e){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===S||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(e){}return!1}(A,n))&&(e({event:n,name:r,global:t}),A=n),clearTimeout(S),S=h.setTimeout((()=>{S=void 0}),1e3)}}let R=null;let O=null},84:function(e,t,n){"use strict";var r=n(467),o=n.n(r).a;t.a=o},85:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var r=function(){return(r=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};function o(){for(var s=0,i=0,e=arguments.length;i<e;i++)s+=arguments[i].length;var t=Array(s),n=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,o=a.length;r<o;r++,n++)t[n]=a[r];return t}},95:function(e,t,n){"use strict";n.r(t),n.d(t,"addTracingExtensions",(function(){return x})),n.d(t,"startIdleTransaction",(function(){return D})),n.d(t,"IdleTransaction",(function(){return I})),n.d(t,"TRACING_DEFAULTS",(function(){return w})),n.d(t,"Span",(function(){return E})),n.d(t,"spanStatusfromHttpCode",(function(){return _})),n.d(t,"Transaction",(function(){return T})),n.d(t,"getActiveTransaction",(function(){return h})),n.d(t,"SpanStatus",(function(){return C})),n.d(t,"trace",(function(){return M})),n.d(t,"addBreadcrumb",(function(){return P.a})),n.d(t,"captureCheckIn",(function(){return P.b})),n.d(t,"captureEvent",(function(){return P.c})),n.d(t,"captureException",(function(){return P.d})),n.d(t,"captureMessage",(function(){return P.e})),n.d(t,"configureScope",(function(){return P.f})),n.d(t,"setContext",(function(){return P.g})),n.d(t,"setExtra",(function(){return P.h})),n.d(t,"setExtras",(function(){return P.i})),n.d(t,"setTag",(function(){return P.j})),n.d(t,"setTags",(function(){return P.k})),n.d(t,"setUser",(function(){return P.l})),n.d(t,"startTransaction",(function(){return P.m})),n.d(t,"withScope",(function(){return P.n})),n.d(t,"Hub",(function(){return c.a})),n.d(t,"ensureHubOnCarrier",(function(){return c.b})),n.d(t,"getCurrentHub",(function(){return c.c})),n.d(t,"getHubFromCarrier",(function(){return c.d})),n.d(t,"getMainCarrier",(function(){return c.e})),n.d(t,"makeMain",(function(){return c.f})),n.d(t,"runWithAsyncContext",(function(){return c.g})),n.d(t,"setAsyncContextStrategy",(function(){return c.h})),n.d(t,"setHubOnCarrier",(function(){return c.i})),n.d(t,"closeSession",(function(){return N.a})),n.d(t,"makeSession",(function(){return N.b})),n.d(t,"updateSession",(function(){return N.c})),n.d(t,"SessionFlusher",(function(){return U})),n.d(t,"Scope",(function(){return F.a})),n.d(t,"addGlobalEventProcessor",(function(){return F.b})),n.d(t,"getEnvelopeEndpointWithUrlEncodedAuth",(function(){return B.a})),n.d(t,"getReportDialogEndpoint",(function(){return B.b})),n.d(t,"BaseClient",(function(){return j.a})),n.d(t,"initAndBind",(function(){return V.a})),n.d(t,"createTransport",(function(){return base.a})),n.d(t,"makeOfflineTransport",(function(){return G})),n.d(t,"makeMultiplexedTransport",(function(){return Y})),n.d(t,"SDK_VERSION",(function(){return $.a})),n.d(t,"getIntegrationsToSetup",(function(){return Q.a})),n.d(t,"Integrations",(function(){return r})),n.d(t,"prepareEvent",(function(){return re.a})),n.d(t,"createCheckInEnvelope",(function(){return ie})),n.d(t,"hasTracingEnabled",(function(){return l.a})),n.d(t,"DEFAULT_ENVIRONMENT",(function(){return k.a})),n.d(t,"FunctionToString",(function(){return X})),n.d(t,"InboundFilters",(function(){return te})),n.d(t,"extractTraceparentData",(function(){return oe}));var r={};
2n.r(r),n.d(r,"FunctionToString",(function(){return X})),n.d(r,"InboundFilters",(function(){return te}));var o=n(49),c=n(30),l=n(248),d=n(822);function h(e){return(e||Object(c.c)()).getScope().getTransaction()}let f=!1;function v(){const e=h();if(e){const t="internal_error";e.setStatus(t)}}v.tag="sentry_tracingErrorCallback";var time=n(165),m=n(139),object=n(65);class y{__init(){this.spans=[]}constructor(e=1e3){y.prototype.__init.call(this),this._maxlen=e}add(span){this.spans.length>this._maxlen?span.spanRecorder=void 0:this.spans.push(span)}}class E{__init2(){this.traceId=Object(m.f)()}__init3(){this.spanId=Object(m.f)().substring(16)}__init4(){this.startTimestamp=Object(time.b)()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(e){if(E.prototype.__init2.call(this),E.prototype.__init3.call(this),E.prototype.__init4.call(this),E.prototype.__init5.call(this),E.prototype.__init6.call(this),E.prototype.__init7.call(this),!e)return this;e.traceId&&(this.traceId=e.traceId),e.spanId&&(this.spanId=e.spanId),e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.data&&(this.data=e.data),e.tags&&(this.tags=e.tags),e.status&&(this.status=e.status),e.startTimestamp&&(this.startTimestamp=e.startTimestamp),e.endTimestamp&&(this.endTimestamp=e.endTimestamp),e.instrumenter&&(this.instrumenter=e.instrumenter)}startChild(e){const t=new E({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});return t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e));const t=_(e);return"unknown_error"!==t&&this.setStatus(t),this}isSuccess(){return"ok"===this.status}finish(e){this.endTimestamp="number"==typeof e?e:Object(time.b)()}toTraceparent(){let e="";return void 0!==this.sampled&&(e=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${e}`}toContext(){return Object(object.c)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return Object(object.c)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Object(object.c)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}function _(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}var k=n(146);class T extends E{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(e,t){super(e),T.prototype.__init.call(this),T.prototype.__init2.call(this),T.prototype.__init3.call(this),this._hub=t||Object(c.c)(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,source="custom"){this._name=e,this.metadata.source=source}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new y(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){if(void 0!==this.endTimestamp)return;
2this.name||(this.name="<unlabeled transaction>"),super.finish(e);const t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this.sampled)return void(t&&t.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((s=>s!==this&&s.endTimestamp)):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce(((e,t)=>e.endTimestamp&&t.endTimestamp?e.endTimestamp>t.endTimestamp?e:t:e)).endTimestamp);const r=this.metadata,o={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source}}};return Object.keys(this._measurements).length>0&&(o.measurements=this._measurements),this._hub.captureEvent(o)}toContext(){const e=super.toContext();return Object(object.c)({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const e=this._hub||Object(c.c)(),t=e&&e.getClient();if(!t)return{};const{environment:n,release:r}=t.getOptions()||{},{publicKey:o}=t.getDsn()||{},l=this.metadata.sampleRate,d=void 0!==l?l.toString():void 0,{segment:h}=e.getScope().getUser()||{},source=this.metadata.source,f=source&&"url"!==source?this.name:void 0,v=Object(object.c)({environment:n||k.a,release:r,transaction:f,user_segment:h,public_key:o,trace_id:this.traceId,sample_rate:d});return t.emit&&t.emit("createDsc",v),v}setHub(e){this._hub=e}}const w={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},S=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class A extends y{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(span){span.spanId!==this.transactionSpanId&&(span.finish=e=>{span.endTimestamp="number"==typeof e?e:Object(time.b)(),this._popActivity(span.spanId)},void 0===span.endTimestamp&&this._pushActivity(span.spanId)),super.add(span)}}class I extends T{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=S[4]}constructor(e,t,n=w.idleTimeout,r=w.finalTimeout,o=w.heartbeatInterval,c=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=o,this._onScope=c,I.prototype.__init.call(this),I.prototype.__init2.call(this),I.prototype.__init3.call(this),I.prototype.__init4.call(this),I.prototype.__init5.call(this),I.prototype.__init6.call(this),c&&t.configureScope((e=>e.setSpan(this))),this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=S[3],this.finish())}),this._finalTimeout)}finish(e=Object(time.b)()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){for(const t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter((span=>{if(span.spanId===this.spanId)return!0;span.endTimestamp||(span.endTimestamp=e,span.setStatus("cancelled"));const t=span.startTimestamp<e;return t}))}if(this._onScope){const e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const t=e=>{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new A(t,n,this.spanId,e),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=S[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=S[1],this.finish(e))}),this._idleTimeout)}
2_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),this.activities[e]=!0}_popActivity(e){if(this.activities[e]&&delete this.activities[e],0===Object.keys(this.activities).length){const e=Object(time.b)();this._idleTimeoutCanceledPermanently?(this._finishReason=S[5],this.finish(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?(this.setStatus("deadline_exceeded"),this._finishReason=S[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function R(){const span=this.getScope().getSpan();return span?{"sentry-trace":span.toTraceparent()}:{}}function O(e,t,n){if(!Object(l.a)(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let r;return"function"==typeof t.tracesSampler?(r=t.tracesSampler(n),e.setMetadata({sampleRate:Number(r)})):void 0!==n.parentSampled?r=n.parentSampled:void 0!==t.tracesSampleRate?(r=t.tracesSampleRate,e.setMetadata({sampleRate:Number(r)})):(r=1,e.setMetadata({sampleRate:r})),function(e){if(Object(o.h)(e)||"number"!=typeof e&&"boolean"!=typeof e)return!1;if(e<0||e>1)return!1;return!0}(r)&&r?(e.sampled=Math.random()<r,e.sampled,e):(e.sampled=!1,e)}function L(e,t){const n=this.getClient(),r=n&&n.getOptions()||{};(r.instrumenter||"sentry")!==(e.instrumenter||"sentry")&&(e.sampled=!1);let o=new T(e,this);return o=O(o,r,{parentSampled:e.parentSampled,transactionContext:e,...t}),o.sampled&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function D(e,t,n,r,o,c,l){const d=e.getClient(),h=d&&d.getOptions()||{};let f=new I(t,e,n,r,l,o);return f=O(f,h,{parentSampled:t.parentSampled,transactionContext:t,...c}),f.sampled&&f.initSpanRecorder(h._experiments&&h._experiments.maxSpans),d&&d.emit&&d.emit("startTransaction",f),f}function x(){const e=Object(c.e)();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=L),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=R),f||(f=!0,Object(d.b)("error",v),Object(d.b)("unhandledrejection",v)))}var C;function M(e,t,n=(()=>{})){const r={...e};void 0!==r.name&&void 0===r.description&&(r.description=r.name);const l=Object(c.c)(),d=l.getScope(),h=d.getSpan(),f=h?h.startChild(r):l.startTransaction(r);function v(){f&&f.finish(),l.getScope().setSpan(h)}let m;d.setSpan(f);try{m=t(f)}catch(e){throw f&&f.setStatus("internal_error"),n(e),v(),e}return Object(o.n)(m)?Promise.resolve(m).then((()=>{v()}),(e=>{f&&f.setStatus("internal_error"),n(e),v()})):v(),m}!function(e){e.Ok="ok";e.DeadlineExceeded="deadline_exceeded";e.Unauthenticated="unauthenticated";e.PermissionDenied="permission_denied";e.NotFound="not_found";e.ResourceExhausted="resource_exhausted";e.InvalidArgument="invalid_argument";e.Unimplemented="unimplemented";e.Unavailable="unavailable";e.InternalError="internal_error";e.UnknownError="unknown_error";e.Cancelled="cancelled";e.AlreadyExists="already_exists";e.FailedPrecondition="failed_precondition";e.Aborted="aborted";e.OutOfRange="out_of_range";e.DataLoss="data_loss"}(C||(C={}));var P=n(80),N=n(102);class U{__init(){this.flushTimeout=60}__init2(){this._pendingAggregates={}}__init3(){this._isEnabled=!0}constructor(e,t){U.prototype.__init.call(this),U.prototype.__init2.call(this),U.prototype.__init3.call(this),this._client=e,this._intervalId=setInterval((()=>this.flush()),1e3*this.flushTimeout),this._sessionAttrs=t}flush(){const e=this.getSessionAggregates();0!==e.aggregates.length&&(this._pendingAggregates={},this._client.sendSession(e))}getSessionAggregates(){const e=Object.keys(this._pendingAggregates).map((e=>this._pendingAggregates[parseInt(e)])),t={attrs:this._sessionAttrs,aggregates:e};return Object(object.c)(t)}close(){clearInterval(this._intervalId),this._isEnabled=!1,this.flush()}incrementSessionStatusCount(){if(!this._isEnabled)return;const e=Object(c.c)().getScope(),t=e.getRequestSession();t&&t.status&&(this._incrementSessionStatusCount(t.status,new Date),e.setRequestSession(void 0))}_incrementSessionStatusCount(e,t){const n=new Date(t).setSeconds(0,0);
2this._pendingAggregates[n]=this._pendingAggregates[n]||{};const r=this._pendingAggregates[n];switch(r.started||(r.started=new Date(n).toISOString()),e){case"errored":return r.errored=(r.errored||0)+1,r.errored;case"ok":return r.exited=(r.exited||0)+1,r.exited;default:return r.crashed=(r.crashed||0)+1,r.crashed}}}var F=n(118),B=n(162),j=n(448),V=n(423),base=n(449),H=n(462),W=n(815);function G(e){return t=>{const n=e(t),r=t.createStore?t.createStore(t):void 0;let o,c=5e3;function l(e){r&&(o&&clearTimeout(o),o=setTimeout((async()=>{o=void 0;const e=await r.pop();e&&h(e).catch((e=>{}))}),e),"number"!=typeof o&&o.unref&&o.unref())}function d(){o||(l(c),c=Math.min(2*c,36e5))}async function h(e){try{const t=await n.send(e);let r=100;if(t)if(t.headers&&t.headers["retry-after"])r=Object(W.b)(t.headers["retry-after"]);else if((t.statusCode||0)>=400)return t;return l(r),c=5e3,t}catch(n){if(r&&await function(e,n,r){return!Object(H.e)(e,["replay_event","replay_recording","client_report"])&&(!t.shouldStore||t.shouldStore(e,n,r))}(e,n,c))return await r.insert(e),d(),{};throw n}}return t.flushAtStartup&&d(),{send:h,flush:e=>n.flush(e)}}}var K=n(261);function Y(e,t){return n=>{const r=e(n),o={};return{send:async function(c){const l=t({envelope:c,getEvent:function(e){const t=e&&e.length?e:["event"];return function(e,t){let n;return Object(H.g)(e,((e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n))),n}(c,t)}}).map((t=>function(t){if(!o[t]){const r=Object(K.a)(t);if(!r)return;const c=Object(B.a)(r);o[t]=e({...n,url:c})}return o[t]}(t))).filter((e=>!!e));return 0===l.length&&l.push(r),(await Promise.all(l.map((e=>e.send(c)))))[0]},flush:async function(e){const t=[...Object.keys(o).map((e=>o[e])),r];return(await Promise.all(t.map((t=>t.flush(e))))).every((e=>e))}}}}var $=n(422),Q=n(213);let z;class X{constructor(){X.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=X.id}setupOnce(){z=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Object(object.f)(this)||this;return z.apply(t,e)}}catch(e){}}}X.__initStatic();var J=n(128);const Z=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],ee=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class te{static __initStatic(){this.id="InboundFilters"}__init(){this.name=te.id}constructor(e={}){this._options=e,te.prototype.__init.call(this)}setupOnce(e,t){const n=e=>{const n=t();if(n){const t=n.getIntegration(te);if(t){const r=n.getClient(),o=r?r.getOptions():{};return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){if(e.message)return[e.message];if(e.exception){const{values:t}=e.exception;try{const{type:e="",value:n=""}=t&&t[t.length-1]||{};return[`${n}`,`${e}: ${n}`]}catch(e){return[]}}return[]}(e).some((e=>Object(J.c)(e,t)))}(e,t.ignoreErrors))return!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Object(J.c)(n,t)}(e,t.ignoreTransactions))return!0;if(function(e,t){if(!t||!t.length)return!1;const n=ne(e);return!!n&&Object(J.c)(n,t)}(e,t.denyUrls))return!0;if(!function(e,t){if(!t||!t.length)return!0;const n=ne(e);return!n||Object(J.c)(n,t)}(e,t.allowUrls))return!0;return!1}(e,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Z],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:ee],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(t._options,o))?null:e}}return e};n.id=this.name,e(n)}}function ne(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let i=e.length-1;i>=0;i--){const t=e[i];if(t&&"<anonymous>"!==t.filename&&"[native code]"!==t.filename)return t.filename||null}return null}(t):null}catch(e){return null}}te.__initStatic();var re=n(249);function ie(e,t,n,r){const o={sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Object(K.b)(r)}},c=function(e){return[{type:"check_in"},e]}(e);return Object(H.c)(o,[c])}const ae=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function oe(e){const t=e.match(ae);if(!e||!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}},99:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n(37),o=n(50),c={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],Float
vendor: 2,818 bytes, line 2
2Value:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},l=Object.freeze({});function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,d=void 0,f=Array.isArray(e),v=[e],m=-1,y=[],E=void 0,_=void 0,k=void 0,path=[],T=[],w=e;do{var S=++m===v.length,A=S&&0!==y.length;if(S){if(_=0===T.length?void 0:path[path.length-1],E=k,k=T.pop(),A){if(f)E=E.slice();else{for(var I={},R=0,O=Object.keys(E);R<O.length;R++){var L=O[R];I[L]=E[L]}E=I}for(var D=0,x=0;x<y.length;x++){var C=y[x][0],M=y[x][1];f&&(C-=D),f&&null===M?(E.splice(C,1),D++):E[C]=M}}m=d.index,v=d.keys,y=d.edits,f=d.inArray,d=d.prev}else{if(_=k?f?m:v[m]:void 0,null==(E=k?k[_]:w))continue;k&&path.push(_)}var P,N=void 0;if(!Array.isArray(E)){if(!Object(o.c)(E))throw new Error("Invalid AST Node: ".concat(Object(r.a)(E),"."));var U=h(t,E.kind,S);if(U){if((N=U.call(t,E,_,k,path,T))===l)break;if(!1===N){if(!S){path.pop();continue}}else if(void 0!==N&&(y.push([_,N]),!S)){if(!Object(o.c)(N)){path.pop();continue}E=N}}}if(void 0===N&&A&&y.push([_,E]),S)path.pop();else d={inArray:f,index:m,keys:v,edits:y,prev:d},v=(f=Array.isArray(E))?E:null!==(P=n[E.kind])&&void 0!==P?P:[],m=-1,y=[],k&&T.push(k),k=E}while(void 0!==d);return 0!==y.length&&(w=y[y.length-1][1]),w}function h(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var o=n?r.leave:r.enter;if("function"==typeof o)return o}else{var c=n?e.leave:e.enter;if(c){if("function"==typeof c)return c;var l=c[t];if("function"==typeof l)return l}}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.