vendor: 20,091 bytes, lines 1-2
1const __vite__fileDeps=["./BjYe2Cdj.js","./BIP-SbCS.js","./TextBlock.Cr26kgiJ.css","./Dlx7vRRw.js","./ImageAndText.JoEf3Fyj.css","./MCKqgE2v.js","./FeaturedGames.fOFOaFGh.css","./CafFJ226.js","./DKJlbNJP.js","./TwoCardsCallToAction.DIl3Mrdk.css","./_EW_0X18.js","./CXiVAAp7.js","./FeaturedNews.BZNaZHrx.css","./D36JQ9TL.js","./BsMmoDih.js","./C4DVoJlo.js","./Bs6Ektdp.js","./CkNsz1up.js","./Carousel.CGv4G832.css","./DXgkQqQO.js","./index.Cpn2xT6J.css","./CI1Y3dyd.js","./_slug_.Dsz-9wrw.css","./dUANrJEL.js","./NafwX7Eg.js","./APGOes5-.js","./JoinUsHomePage.CcRzgWBw.css","./index.Bsj0Kvc4.css","./Co2Od2Zj.js","./_code_.CUzZ155D.css","./Bsz82Kqw.js","./B1Q1Ugif.js","./BWGj2LXU.js","./_slug_.CWQji9sV.css","./DEKft-P7.js","./index.DIaERAKj.css","./Dr6r0ZVe.js","./index.4tLqg0in.css","./Cq9h6rWm.js","./index.DP0ukW8A.css","./B004fdtY.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); 2function makeMap(t,e){const r=Object.create(null),s=t.split(",");for(let o=0;o<s.length;o++)r[s[o]]=!0;return o=>!!r[o]}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,onRE=/^on[^a-z]/,isOn=t=>onRE.test(t),isModelListener=t=>t.startsWith("onUpdate:"),extend=Object.assign,remove$1=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},hasOwnProperty$k=Object.prototype.hasOwnProperty,hasOwn$1=(t,e)=>hasOwnProperty$k.call(t,e),isArray$4=Array.isArray,isMap$2=t=>toTypeString(t)==="[object Map]",isSet$2=t=>toTypeString(t)==="[object Set]",isDate$1=t=>toTypeString(t)==="[object Date]",isRegExp=t=>toTypeString(t)==="[object RegExp]",isFunction$1=t=>typeof t=="function",isString$1=t=>typeof t=="string",isSymbol=t=>typeof t=="symbol",isObject$3=t=>t!==null&&typeof t=="object",isPromise$1=t=>(isObject$3(t)||isFunction$1(t))&&isFunction$1(t.then)&&isFunction$1(t.catch),objectToString$1=Object.prototype.toString,toTypeString=t=>objectToString$1.call(t),toRawType=t=>toTypeString(t).slice(8,-1),isPlainObject$1=t=>toTypeString(t)==="[object Object]",isIntegerKey=t=>isString$1(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(t=>t.replace(camelizeRE,(e,r)=>r?r.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(t=>t.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(t=>t.charAt(0).toUpperCase()+t.slice(1)),toHandlerKey=cacheStringFunction(t=>t?`on${capitalize(t)}`:""),hasChanged=(t,e)=>!Object.is(t,e),invokeArrayFns=(t,e)=>{for(let r=0;r<t.length;r++)t[r](e)},def=(t,e,r)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r})},looseToNumber=t=>{const e=parseFloat(t);return isNaN(e)?t:e},toNumber=t=>{const e=isString$1(t)?Number(t):NaN;return isNaN(e)?t:e};let _globalThis$2;const getGlobalThis=()=>_globalThis$2||(_globalThis$2=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function normalizeStyle(t){if(isArray$4(t)){const e={};for(let r=0;r<t.length;r++){const s=t[r],o=isString$1(s)?parseStringStyle(s):normalizeStyle(s);if(o)for(const d in o)e[d]=o[d]}return e}else if(isString$1(t)||isObject$3(t))return t}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(t){const e={};return t.replace(styleCommentRE,"").split(listDelimiterRE).forEach(r=>{if(r){const s=r.split(propertyDelimiterRE);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function normalizeClass(t){let e="";if(isString$1(t))e=t;else if(isArray$4(t))for(let r=0;r<t.length;r++){const s=normalizeClass(t[r]);s&&(e+=s+" ")}else if(isObject$3(t))for(const r in t)t[r]&&(e+=r+" ");return e.trim()}function normalizeProps(t){if(!t)return null;let{class:e,style:r}=t;return e&&!isString$1(e)&&(t.class=normalizeClass(e)),r&&(t.style=normalizeStyle(r)),t}const specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs);function includeBooleanAttr(t){return!!t||t===""}function looseCompareArrays(t,e){if(t.length!==e.length)return!1;let r=!0;for(let s=0;r&&s<t.length;s++)r=looseEqual(t[s],e[s]);return r}function looseEqual(t,e){if(t===e)return!0;let r=isDate$1(t),s=isDate$1(e);if(r||s)return r&&s?t.getTime()===e.getTime():!1;if(r=isSymbol(t),s=isSymbol(e),r||s)return t===e;if(r=isArray$4(t),s=isArray$4(e),r||s)return r&&s?looseCompareArrays(t,e):!1;if(r=isObject$3(t),s=isObject$3(e),r||s){if(!r||!s)return!1;const o=Object.keys(t).length,d=Object.keys(e).length;if(o!==d)return!1;for(const L in t){const ge=t.hasOwnProperty(L),Mt=e.hasOwnProperty(L);if(ge&&!Mt||!ge&&Mt||!looseEqual(t[L],e[L]))return!1}}return String(t)===String(e)}function looseIndexOf(t,e){return t.findIndex(r=>looseEqual(r,e))}const toDisplayString=t=>isString$1(t)?t:t==null?"":isArray$4(t)||isObject$3(t)&&(t.toString===objectToString$1||!isFunction$1(t.toString))?JSON.stringify(t,replacer,2):String(t),replacer=(t,e)=>e&&e.__v_isRef?replacer(t,e.value):isMap$2(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[s,o])=>(r[`${s} =>`]=o,r),{})}:isSet$2(e)?{[`Set(${e.size})`]:[...e.values()]}:isObject$3(e)&&!isArray$4(e)&&!isPlainObject$1(e)?String(e):e;let activeEffectScope;class EffectScope{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const r=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=r}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(e){if(this._active){let r,s;for(r=0,s=this.effects.length;r<s;r++)this.effects[r].stop();for(r=0,s=this.cleanups.length;r<s;r++)this.cleanups[r]();if(this.scopes)for(r=0,s=this.scopes.length;r<s;r++)this.scopes[r].stop(!0);if(!this.detached&&this.parent&&!e){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function effectScope(t){return new EffectScope(t)}function recordEffectScope(t,e=activeEffectScope){e&&e.active&&e.effects.push(t)}function getCurrentScope(){return activeEffectScope}function onScopeDispose(t){activeEffectScope&&activeEffectScope.cleanups.push(t)}const createDep=t=>{const e=new Set(t);return e.w=0,e.n=0,e},wasTracked=t=>(t.w&trackOpBit)>0,newTracked=t=>(t.n&trackOpBit)>0,initDepMarkers=({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=trackOpBit},finalizeDepMarkers=t=>{const{deps:e}=t;if(e.length){let r=0;for(let s=0;s<e.length;s++){const o=e[s];wasTracked(o)&&!newTracked(o)?o.delete(t):e[r++]=o,o.w&=~trackOpBit,o.n&=~trackOpBit}e.length=r}},targetMap=new WeakMap;let effectTrackDepth=0,trackOpBit=1;const maxMarkerBits=30;let activeEffect;const ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol("");class ReactiveEffect{constructor(e,r=null,s){this.fn=e,this.scheduler=r,this.active=!0,this.deps=[],this.parent=void 0,recordEffectScope(this,s)}run(){if(!this.active)return this.fn();let e=activeEffect,r=shouldTrack;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=activeEffect,activeEffect=this,shouldTrack=!0,trackOpBit=1<<++effectTrackDepth,effectTrackDepth<=maxMarkerBits?initDepMarkers(this):cleanupEffect(this),this.fn()}finally{effectTrackDepth<=maxMarkerBits&&finalizeDepMarkers(this),trackOpBit=1<<--effectTrackDepth,activeEffect=this.parent,shouldTrack=r,this.parent=void 0,this.deferStop&&this.stop()}}stop(){activeEffect===this?this.deferStop=!0:this.active&&(cleanupEffect(this),this.onStop&&this.onStop(),this.active=!1)}}function cleanupEffect(t){const{deps:e}=t;if(e.length){for(let r=0;r<e.length;r++)e[r].delete(t);e.length=0}}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const t=trackStack.pop();shouldTrack=t===void 0?!0:t}function track(t,e,r){if(shouldTrack&&activeEffect){let s=targetMap.get(t);s||targetMap.set(t,s=new Map);let o=s.get(r);o||s.set(r,o=createDep()),trackEffects(o)}}function trackEffects(t,e){let r=!1;effectTrackDepth<=maxMarkerBits?newTracked(t)||(t.n|=trackOpBit,r=!wasTracked(t)):r=!t.has(activeEffect),r&&(t.add(activeEffect),activeEffect.deps.push(t))}function trigger(t,e,r,s,o,d){const L=targetMap.get(t);if(!L)return;let ge=[];if(e==="clear")ge=[...L.values()];else if(r==="length"&&isArray$4(t)){const Mt=Number(s);L.forEach((er,tr)=>{(tr==="length"||!isSymbol(tr)&&tr>=Mt)&&ge.push(er)})}else switch(r!==void 0&&ge.push(L.get(r)),e){case"add":isArray$4(t)?isIntegerKey(r)&&ge.push(L.get("length")):(ge.push(L.get(ITERATE_KEY)),isMap$2(t)&&ge.push(L.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$4(t)||(ge.push(L.get(ITERATE_KEY)),isMap$2(t)&&ge.push(L.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap$2(t)&&ge.push(L.get(ITERATE_KEY));break}if(ge.length===1)ge[0]&&triggerEffects(ge[0]);else{const Mt=[];for(const er of ge)er&&Mt.push(...er);triggerEffects(createDep(Mt))}}function triggerEffects(t,e){const r=isArray$4(t)?t:[...t];for(const s of r)s.computed&&triggerEffect(s);for(const s of r)s.computed||triggerEffect(s)}function triggerEffect(t,e){(t!==activeEffect||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}function getDepFromReactive(t,e){var r;return(r=targetMap.get(t))==null?void 0:r.get(e)}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(isSymbol)),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){const s=toRaw(this);for(let d=0,L=this.length;d<L;d++)track(s,"get",d+"");const o=s[e](...r);return o===-1||o===!1?s[e](...r.map(toRaw)):o}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...r){pauseTracking();const s=toRaw(this)[e].apply(this,r);return resetTracking(),s}}),t}function hasOwnProperty$j(t){const e=toRaw(this);return track(e,"has",t),e.hasOwnProperty(t)}class BaseReactiveHandler{constructor(e=!1,r=!1){this._isReadonly=e,this._shallow=r}get(e,r,s){const o=this._isReadonly,d=this._shallow;if(r==="__v_isReactive")return!o;if(r==="__v_isReadonly")return o;if(r==="__v_isShallow")return d;if(r==="__v_raw"&&s===(o?d?shallowReadonlyMap:readonlyMap:d?shallowReactiveMap:reactiveMap).get(e))return e;const L=isArray$4(e);if(!o){if(L&&hasOwn$1(arrayInstrumentations,r))return Reflect.get(arrayInstrumentations,r,s);if(r==="hasOwnProperty")return hasOwnProperty$j}const ge=Reflect.get(e,r,s);return(isSymbol(r)?builtInSymbols.has(r):isNonTrackableKeys(r))||(o||track(e,"get",r),d)?ge:isRef(ge)?L&&isIntegerKey(r)?ge:ge.value:isObject$3(ge)?o?readonly(ge):reactive(ge):ge}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(e=!1){super(!1,e)}set(e,r,s,o){let d=e[r];if(isReadonly(d)&&isRef(d)&&!isRef(s))return!1;if(!this._shallow&&(!isShallow(s)&&!isReadonly(s)&&(d=toRaw(d),s=toRaw(s)),!isArray$4(e)&&isRef(d)&&!isRef(s)))return d.value=s,!0;const L=isArray$4(e)&&isIntegerKey(r)?Number(r)<e.length:hasOwn$1(e,r),ge=Reflect.set(e,r,s,o);return e===toRaw(o)&&(L?hasChanged(s,d)&&trigger(e,"set",r,s):trigger(e,"add",r,s)),ge}deleteProperty(e,r){const s=hasOwn$1(e,r);e[r];const o=Reflect.deleteProperty(e,r);return o&&s&&trigger(e,"delete",r,void 0),o}has(e,r){const s=Reflect.has(e,r);return(!isSymbol(r)||!builtInSymbols.has(r))&&track(e,"has",r),s}ownKeys(e){return track(e,"iterate",isArray$4(e)?"length":ITERATE_KEY),Reflect.ownKeys(e)}}class ReadonlyReactiveHandler extends BaseReactiveHandler{constructor(e=!1){super(!0,e)}set(e,r){return!0}deleteProperty(e,r){return!0}}const mutableHandlers=new MutableReactiveHandler,readonlyHandlers=new ReadonlyReactiveHandler,shallowReactiveHandlers=new MutableReactiveHandler(!0),toShallow=t=>t,getProto=t=>Reflect.getPrototypeOf(t);function get(t,e,r=!1,s=!1){t=t.__v_raw;const o=toRaw(t),d=toRaw(e);r||(hasChanged(e,d)&&track(o,"get",e),track(o,"get",d));const{has:L}=getProto(o),ge=s?toShallow:r?toReadonly:toReactive;if(L.call(o,e))return ge(t.get(e));if(L.call(o,d))return ge(t.get(d));t!==o&&t.get(e)}function has(t,e=!1){const r=this.__v_raw,s=toRaw(r),o=toRaw(t);return e||(hasChanged(t,o)&&track(s,"has",t),track(s,"has",o)),t===o?r.has(t):r.has(t)||r.has(o)}function size(t,e=!1){return t=t.__v_raw,!e&&track(toRaw(t),"iterate",ITERATE_KEY),Reflect.get(t,"size",t)}function add(t){t=toRaw(t);const e=toRaw(this);return getProto(e).has.call(e,t)||(e.add(t),trigger(e,"add",t,t)),this}function set$1(t,e){e=toRaw(e);const r=toRaw(this),{has:s,get:o}=getProto(r);let d=s.call(r,t);d||(t=toRaw(t),d=s.call(r,t));const L=o.call(r,t);return r.set(t,e),d?hasChanged(e,L)&&trigger(r,"set",t,e):trigger(r,"add",t,e),this}function deleteEntry(t){const e=toRaw(this),{has:r,get:s}=getProto(e);let o=r.call(e,t);o||(t=toRaw(t),o=r.call(e,t)),s&&s.call(e,t);const d=e.delete(t);return o&&trigger(e,"delete",t,void 0),d}function clear(){const t=toRaw(this),e=t.size!==0,r=t.clear();return e&&trigger(t,"clear",void 0,void 0),r}function createForEach(t,e){return function(s,o){const d=this,L=d.__v_raw,ge=toRaw(L),Mt=e?toShallow:t?toReadonly:toReactive;return!t&&track(ge,"iterate",ITERATE_KEY),L.forEach((er,tr)=>s.call(o,Mt(er),Mt(tr),d))}}function createIterableMethod(t,e,r){return function(...s){const o=this.__v_raw,d=toRaw(o),L=isMap$2(d),ge=t==="entries"||t===Symbol.iterator&&L,Mt=t==="keys"&&L,er=o[t](...s),tr=r?toShallow:e?toReadonly:toReactive;return!e&&track(d,"iterate",Mt?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:ir,done:rr}=er.next();return rr?{value:ir,done:rr}:{value:ge?[tr(ir[0]),tr(ir[1])]:tr(ir),done:rr}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(t){return function(...e){return t==="delete"?!1:this}}function createInstrumentations(){const t={get(d){return get(this,d)},get size(){return size(this)},has,add,set:set$1,delete:deleteEntry,clear,forEach:createForEach(!1,!1)},e={get(d){return get(this,d,!1,!0)},get size(){return size(this)},has,add,set:set$1,delete:deleteEntry,clear,forEach:createForEach(!1,!0)},r={get(d){return get(this,d,!0)},get size(){return size(this,!0)},has(d){return has.call(this,d,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},s={get(d){return get(this,d,!0,!0)},get size(){return size(this,!0)},has(d){return has.call(this,d,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(d=>{t[d]=createIterableMethod(d,!1,!1),r[d]=createIterableMethod(d,!0,!1),e[d]=createIterableMethod(d,!1,!0),s[d]=createIterableMethod(d,!0,!0)}),[t,r,e,s]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(t,e){const r=e?t?shallowReadonlyInstrumentations:shallowInstrumentations:t?readonlyInstrumentations:mutableInstrumentations;return(s,o,d)=>o==="__v_isReactive"?!t:o==="__v_isReadonly"?t:o==="__v_raw"?s:Reflect.get(hasOwn$1(r,o)&&o in s?r:s,o,d)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(t){return t.__v_skip||!Object.isExtensible(t)?0:targetTypeMap(toRawType(t))}function reactive(t){return isReadonly(t)?t:createReactiveObject(t,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(t){return createReactiveObject(t,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(t){return createReactiveObject(t,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function createReactiveObject(t,e,r,s,o){if(!isObject$3(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const d=o.get(t);if(d)return d;const L=getTargetType(t);if(L===0)return t;const ge=new Proxy(t,L===2?s:r);return o.set(t,ge),ge}function isReactive(t){return isReadonly(t)?isReactive(t.__v_raw):!!(t&&t.__v_isReactive)}function isReadonly(t){return!!(t&&t.__v_isReadonly)}function isShallow(t){return!!(t&&t.__v_isShallow)}function isProxy(t){return isReactive(t)||isReadonly(t)}function toRaw(t){const e=t&&t.__v_raw;return e?toRaw(e):t}function markRaw(t){return def(t,"__v_skip",!0),t}const toReactive=t=>isObject$3(t)?reactive(t):t,toReadonly=t=>isObject$3(t)?readonly(t):t;function trackRefValue(t){shouldTrack&&activeEffect&&(t=toRaw(t),trackEffects(t.dep||(t.dep=createDep())))}function triggerRefValue(t,e){t=toRaw(t);const r=t.dep;r&&triggerEffects(r)}function isRef(t){return!!(t&&t.__v_isRef===!0)}function ref$2(t){return createRef(t,!1)}function shallowRef(t){return createRef(t,!0)}function createRef(t,e){return isRef(t)?t:new RefImpl(t,e)}class RefImpl{constructor(e,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:toRaw(e),this._value=r?e:toReactive(e)}get value(){return trackRefValue(this),this._value}set value(e){const r=this.__v_isShallow||isShallow(e)||isReadonly(e);e=r?e:toRaw(e),hasChanged(e,this._rawValue)&&(this._rawValue=e,this._value=r?e:toReactive(e),triggerRefValue(this))}}function unref(t){return isRef(t)?t.value:t}function toValue(t){return isFunction$1(t)?t():unref(t)}const shallowUnwrapHandlers={get:(t,e,r)=>unref(Reflect.get(t,e,r)),set:(t,e,r,s)=>{const o=t[e];return isRef(o)&&!isRef(r)?(o.value=r,!0):Reflect.set(t,e,r,s)}};function proxyRefs(t){return isReactive(t)?t:new Proxy(t,shallowUnwrapHandlers)}class CustomRefImpl{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:r,set:s}=e(()=>trackRefValue(this),()=>triggerRefValue(this));this._get=r,this._set=s}get value(){return this._get()}set value(e){this._set(e)}}function customRef(t){return new CustomRefImpl(t)}class ObjectRefImpl{constructor(e,r,s){this._object=e,this._key=r,this._defaultValue=s,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}class GetterRefImpl{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function toRef(t,e,r){return isRef(t)?t:isFunction$1(t)?new GetterRefImpl(t):isObject$3(t)&&arguments.length>1?propertyToRef(t,e,r):ref$2(t)}function propertyToRef(t,e,r){const s=t[e];return isRef(s)?s:new ObjectRefImpl(t,e,r)}class ComputedRefImpl{constructor(e,r,s,o){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new ReactiveEffect(e,()=>{this._dirty||(this._dirty=!0,triggerRefValue(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=s}get value(){const e=toRaw(this);return trackRefValue(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function computed$1(t,e,r=!1){let s,o;const d=isFunction$1(t);return d?(s=t,o=NOOP):(s=t.get,o=t.set),new ComputedRefImpl(s,o,d||!o,r)}function warn(t,...e){}function callWithErrorHandling(t,e,r,s){let o;try{o=s?t(...s):t()}catch(d){handleError$1(d,e,r)}return o}function callWithAsyncErrorHandling(t,e,r,s){if(isFunction$1(t)){const d=callWithErrorHandling(t,e,r,s);return d&&isPromise$1(d)&&d.catch(L=>{handleError$1(L,e,r)}
vendor: 1,250 bytes, line 2
2),d}const o=[];for(let d=0;d<t.length;d++)o.push(callWithAsyncErrorHandling(t[d],e,r,s));return o}function handleError$1(t,e,r,s=!0){const o=e?e.vnode:null;if(e){let d=e.parent;const L=e.proxy,ge=r;for(;d;){const er=d.ec;if(er){for(let tr=0;tr<er.length;tr++)if(er[tr](t,L,ge)===!1)return}d=d.parent}const Mt=e.appContext.config.errorHandler;if(Mt){callWithErrorHandling(Mt,null,10,[t,L,ge]);return}}logError(t,r,o,s)}function logError(t,e,r,s=!0){console.error(t)}let isFlushing=!1,isFlushPending=!1;const queue=[];let flushIndex=0;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick(t){const e=currentFlushPromise||resolvedPromise;return t?e.then(this?t.bind(this):t):e}function findInsertionIndex(t){let e=flushIndex+1,r=queue.length;for(;e<r;){const s=e+r>>>1,o=queue[s],d=getId$1(o);d<t||d===t&&o.pre?e=s+1:r=s}return e}function queueJob(t){(!queue.length||!queue.includes(t,isFlushing&&t.allowRecurse?flushIndex+1:flushIndex))&&(t.id==null?queue.push(t):queue.splice(findInsertionIndex(t.id),0,t),queueFlush())}function queueFlush(){!isFlushing&&!isFlushPending&&(isFlushPending=!0,currentFlushPromise=resolvedPromise.then(flushJobs))}
vendor: 4,177 bytes, line 2
2function invalidateJob(t){const e=queue.indexOf(t);e>flushIndex&&queue.splice(e,1)}function queuePostFlushCb(t){isArray$4(t)?pendingPostFlushCbs.push(...t):(!activePostFlushCbs||!activePostFlushCbs.includes(t,t.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(t),queueFlush()}function flushPreFlushCbs(t,e=isFlushing?flushIndex+1:0){for(;e<queue.length;e++){const r=queue[e];r&&r.pre&&(queue.splice(e,1),e--,r())}}function flushPostFlushCbs(t){if(pendingPostFlushCbs.length){const e=[...new Set(pendingPostFlushCbs)];if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...e);return}for(activePostFlushCbs=e,activePostFlushCbs.sort((r,s)=>getId$1(r)-getId$1(s)),postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++)activePostFlushCbs[postFlushIndex]();activePostFlushCbs=null,postFlushIndex=0}}const getId$1=t=>t.id==null?1/0:t.id,comparator=(t,e)=>{const r=getId$1(t)-getId$1(e);if(r===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return r};function flushJobs(t){isFlushPending=!1,isFlushing=!0,queue.sort(comparator);try{for(flushIndex=0;flushIndex<queue.length;flushIndex++){const e=queue[flushIndex];e&&e.active!==!1&&callWithErrorHandling(e,null,14)}}finally{flushIndex=0,queue.length=0,flushPostFlushCbs(),isFlushing=!1,currentFlushPromise=null,(queue.length||pendingPostFlushCbs.length)&&flushJobs()}}function emit(t,e,...r){if(t.isUnmounted)return;const s=t.vnode.props||EMPTY_OBJ;let o=r;const d=e.startsWith("update:"),L=d&&e.slice(7);if(L&&L in s){const tr=`${L==="modelValue"?"model":L}Modifiers`,{number:ir,trim:rr}=s[tr]||EMPTY_OBJ;rr&&(o=r.map(nr=>isString$1(nr)?nr.trim():nr)),ir&&(o=r.map(looseToNumber))}let ge,Mt=s[ge=toHandlerKey(e)]||s[ge=toHandlerKey(camelize(e))];!Mt&&d&&(Mt=s[ge=toHandlerKey(hyphenate(e))]),Mt&&callWithAsyncErrorHandling(Mt,t,6,o);const er=s[ge+"Once"];if(er){if(!t.emitted)t.emitted={};else if(t.emitted[ge])return;t.emitted[ge]=!0,callWithAsyncErrorHandling(er,t,6,o)}}function normalizeEmitsOptions(t,e,r=!1){const s=e.emitsCache,o=s.get(t);if(o!==void 0)return o;const d=t.emits;let L={},ge=!1;if(!isFunction$1(t)){const Mt=er=>{const tr=normalizeEmitsOptions(er,e,!0);tr&&(ge=!0,extend(L,tr))};!r&&e.mixins.length&&e.mixins.forEach(Mt),t.extends&&Mt(t.extends),t.mixins&&t.mixins.forEach(Mt)}return!d&&!ge?(isObject$3(t)&&s.set(t,null),null):(isArray$4(d)?d.forEach(Mt=>L[Mt]=null):extend(L,d),isObject$3(t)&&s.set(t,L),L)}function isEmitListener(t,e){return!t||!isOn(e)?!1:(e=e.slice(2).replace(/Once$/,""),hasOwn$1(t,e[0].toLowerCase()+e.slice(1))||hasOwn$1(t,hyphenate(e))||hasOwn$1(t,e))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(t){const e=currentRenderingInstance;return currentRenderingInstance=t,currentScopeId=t&&t.type.__scopeId||null,e}function pushScopeId(t){currentScopeId=t}function popScopeId(){currentScopeId=null}function withCtx(t,e=currentRenderingInstance,r){if(!e||t._n)return t;const s=(...o)=>{s._d&&setBlockTracking(-1);const d=setCurrentRenderingInstance(e);let L;try{L=t(...o)}finally{setCurrentRenderingInstance(d),s._d&&setBlockTracking(1)}return L};return s._n=!0,s._c=!0,s._d=!0,s}function markAttrsAccessed(){}function renderComponentRoot(t){const{type:e,vnode:r,proxy:s,withProxy:o,props:d,propsOptions:[L],slots:ge,attrs:Mt,emit:er,render:tr,renderCache:ir,data:rr,setupState:nr,ctx:ar,inheritAttrs:sr}=t;let lr,cr;const ur=setCurrentRenderingInstance(t);try{if(r.shapeFlag&4){const dr=o||s;lr=normalizeVNode(tr.call(dr,dr,ir,d,nr,rr,ar)),cr=Mt}else{const dr=e;lr=normalizeVNode(dr.length>1?dr(d,{attrs:Mt,slots:ge,emit:er}):dr(d,null)),cr=e.props?Mt:getFunctionalFallthrough(Mt)}}catch(dr){blockStack.length=0,handleError$1(dr,t,1),lr=createVNode(Comment)}let or=lr;if(cr&&sr!==!1){const dr=Object.keys(cr),{shapeFlag:hr}=or;dr.length&&hr&7&&(L&&dr.some(isModelListener)&&(cr=filterModelListeners(cr,L)),or=cloneVNode(or,cr))}return r.dirs&&(or=cloneVNode(or),or.dirs=or.dirs?or.dirs.concat(r.dirs):r.dirs),r.transition&&(or.transition=r.transition),lr=or,setCurrentRenderingInstance(ur),lr}function filterSingleRoot(t){let e;for(let r=0;r<t.length;r++){const s=t[r];
vendor: 10,534 bytes, line 2
2if(isVNode(s)){if(s.type!==Comment||s.children==="v-if"){if(e)return;e=s}}else return}return e}const getFunctionalFallthrough=t=>{let e;for(const r in t)(r==="class"||r==="style"||isOn(r))&&((e||(e={}))[r]=t[r]);return e},filterModelListeners=(t,e)=>{const r={};for(const s in t)(!isModelListener(s)||!(s.slice(9)in e))&&(r[s]=t[s]);return r};function shouldUpdateComponent(t,e,r){const{props:s,children:o,component:d}=t,{props:L,children:ge,patchFlag:Mt}=e,er=d.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&Mt>=0){if(Mt&1024)return!0;if(Mt&16)return s?hasPropsChanged(s,L,er):!!L;if(Mt&8){const tr=e.dynamicProps;for(let ir=0;ir<tr.length;ir++){const rr=tr[ir];if(L[rr]!==s[rr]&&!isEmitListener(er,rr))return!0}}}else return(o||ge)&&(!ge||!ge.$stable)?!0:s===L?!1:s?L?hasPropsChanged(s,L,er):!0:!!L;return!1}function hasPropsChanged(t,e,r){const s=Object.keys(e);if(s.length!==Object.keys(t).length)return!0;for(let o=0;o<s.length;o++){const d=s[o];if(e[d]!==t[d]&&!isEmitListener(r,d))return!0}return!1}function updateHOCHostEl({vnode:t,parent:e},r){for(;e&&e.subTree===t;)(t=e.vnode).el=r,e=e.parent}const COMPONENTS="components",DIRECTIVES="directives";function resolveComponent(t,e){return resolveAsset(COMPONENTS,t,!0,e)||t}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveDynamicComponent(t){return isString$1(t)?resolveAsset(COMPONENTS,t,!1)||t:t||NULL_DYNAMIC_COMPONENT}function resolveDirective(t){return resolveAsset(DIRECTIVES,t)}function resolveAsset(t,e,r=!0,s=!1){const o=currentRenderingInstance||currentInstance;if(o){const d=o.type;if(t===COMPONENTS){const ge=getComponentName(d,!1);if(ge&&(ge===e||ge===camelize(e)||ge===capitalize(camelize(e))))return d}const L=resolve(o[t]||d[t],e)||resolve(o.appContext[t],e);return!L&&s?d:L}}function resolve(t,e){return t&&(t[e]||t[camelize(e)]||t[capitalize(camelize(e))])}const isSuspense=t=>t.__isSuspense,SuspenseImpl={name:"Suspense",__isSuspense:!0,process(t,e,r,s,o,d,L,ge,Mt,er){t==null?mountSuspense(e,r,s,o,d,L,ge,Mt,er):patchSuspense(t,e,r,s,o,L,ge,Mt,er)},hydrate:hydrateSuspense,create:createSuspenseBoundary,normalize:normalizeSuspenseChildren},Suspense=SuspenseImpl;function triggerEvent(t,e){const r=t.props&&t.props[e];isFunction$1(r)&&r()}function mountSuspense(t,e,r,s,o,d,L,ge,Mt){const{p:er,o:{createElement:tr}}=Mt,ir=tr("div"),rr=t.suspense=createSuspenseBoundary(t,o,s,e,ir,r,d,L,ge,Mt);er(null,rr.pendingBranch=t.ssContent,ir,null,s,rr,d,L),rr.deps>0?(triggerEvent(t,"onPending"),triggerEvent(t,"onFallback"),er(null,t.ssFallback,e,r,s,null,d,L),setActiveBranch(rr,t.ssFallback)):rr.resolve(!1,!0)}function patchSuspense(t,e,r,s,o,d,L,ge,{p:Mt,um:er,o:{createElement:tr}}){const ir=e.suspense=t.suspense;ir.vnode=e,e.el=t.el;const rr=e.ssContent,nr=e.ssFallback,{activeBranch:ar,pendingBranch:sr,isInFallback:lr,isHydrating:cr}=ir;if(sr)ir.pendingBranch=rr,isSameVNodeType(rr,sr)?(Mt(sr,rr,ir.hiddenContainer,null,o,ir,d,L,ge),ir.deps<=0?ir.resolve():lr&&(Mt(ar,nr,r,s,o,null,d,L,ge),setActiveBranch(ir,nr))):(ir.pendingId++,cr?(ir.isHydrating=!1,ir.activeBranch=sr):er(sr,o,ir),ir.deps=0,ir.effects.length=0,ir.hiddenContainer=tr("div"),lr?(Mt(null,rr,ir.hiddenContainer,null,o,ir,d,L,ge),ir.deps<=0?ir.resolve():(Mt(ar,nr,r,s,o,null,d,L,ge),setActiveBranch(ir,nr))):ar&&isSameVNodeType(rr,ar)?(Mt(ar,rr,r,s,o,ir,d,L,ge),ir.resolve(!0)):(Mt(null,rr,ir.hiddenContainer,null,o,ir,d,L,ge),ir.deps<=0&&ir.resolve()));else if(ar&&isSameVNodeType(rr,ar))Mt(ar,rr,r,s,o,ir,d,L,ge),setActiveBranch(ir,rr);else if(triggerEvent(e,"onPending"),ir.pendingBranch=rr,ir.pendingId++,Mt(null,rr,ir.hiddenContainer,null,o,ir,d,L,ge),ir.deps<=0)ir.resolve();else{const{timeout:ur,pendingId:or}=ir;ur>0?setTimeout(()=>{ir.pendingId===or&&ir.fallback(nr)},ur):ur===0&&ir.fallback(nr)}}function createSuspenseBoundary(t,e,r,s,o,d,L,ge,Mt,er,tr=!1){const{p:ir,m:rr,um:nr,n:ar,o:{parentNode:sr,remove:lr}}=er;let cr;const ur=isVNodeSuspensible(t);ur&&e!=null&&e.pendingBranch&&(cr=e.pendingId,e.deps++);const or=t.props?toNumber(t.props.timeout):void 0,dr={vnode:t,parent:e,parentComponent:r,isSVG:L,container:s,hiddenContainer:o,anchor:d,deps:0,pendingId:0,timeout:typeof or=="number"?or:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:tr,isUnmounted:!1,effects:[],resolve(hr=!1,pr=!1){const{vnode:mr,activeBranch:vr,pendingBranch:Er,pendingId:Cr,effects:Pr,parentComponent:kr,container:Mr}=dr;let Ur=!1;if(dr.isHydrating)dr.isHydrating=!1;else if(!hr){Ur=vr&&Er.transition&&Er.transition.mode==="out-in",Ur&&(vr.transition.afterLeave=()=>{Cr===dr.pendingId&&(rr(Er,Mr,xr,0),queuePostFlushCb(Pr))});let{anchor:xr}=dr;vr&&(xr=ar(vr),nr(vr,kr,dr,!0)),Ur||rr(Er,Mr,xr,0)}setActiveBranch(dr,Er),dr.pendingBranch=null,dr.isInFallback=!1;let $r=dr.parent,yr=!1;for(;$r;){if($r.pendingBranch){$r.effects.push(...Pr),yr=!0;break}$r=$r.parent}!yr&&!Ur&&queuePostFlushCb(Pr),dr.effects=[],ur&&e&&e.pendingBranch&&cr===e.pendingId&&(e.deps--,e.deps===0&&!pr&&e.resolve()),triggerEvent(mr,"onResolve")},fallback(hr){if(!dr.pendingBranch)return;const{vnode:pr,activeBranch:mr,parentComponent:vr,container:Er,isSVG:Cr}=dr;triggerEvent(pr,"onFallback");const Pr=ar(mr),kr=()=>{dr.isInFallback&&(ir(null,hr,Er,Pr,vr,null,Cr,ge,Mt),setActiveBranch(dr,hr))},Mr=hr.transition&&hr.transition.mode==="out-in";Mr&&(mr.transition.afterLeave=kr),dr.isInFallback=!0,nr(mr,vr,null,!0),Mr||kr()},move(hr,pr,mr){dr.activeBranch&&rr(dr.activeBranch,hr,pr,mr),dr.container=hr},next(){return dr.activeBranch&&ar(dr.activeBranch)},registerDep(hr,pr){const mr=!!dr.pendingBranch;mr&&dr.deps++;const vr=hr.vnode.el;hr.asyncDep.catch(Er=>{handleError$1(Er,hr,0)}).then(Er=>{if(hr.isUnmounted||dr.isUnmounted||dr.pendingId!==hr.suspenseId)return;hr.asyncResolved=!0;const{vnode:Cr}=hr;handleSetupResult(hr,Er,!1),vr&&(Cr.el=vr);const Pr=!vr&&hr.subTree.el;pr(hr,Cr,sr(vr||hr.subTree.el),vr?null:ar(hr.subTree),dr,L,Mt),Pr&&lr(Pr),updateHOCHostEl(hr,Cr.el),mr&&--dr.deps===0&&dr.resolve()})},unmount(hr,pr){dr.isUnmounted=!0,dr.activeBranch&&nr(dr.activeBranch,r,hr,pr),dr.pendingBranch&&nr(dr.pendingBranch,r,hr,pr)}};return dr}function hydrateSuspense(t,e,r,s,o,d,L,ge,Mt){const er=e.suspense=createSuspenseBoundary(e,s,r,t.parentNode,document.createElement("div"),null,o,d,L,ge,!0),tr=Mt(t,er.pendingBranch=e.ssContent,r,er,d,L);return er.deps===0&&er.resolve(!1,!0),tr}function normalizeSuspenseChildren(t){const{shapeFlag:e,children:r}=t,s=e&32;t.ssContent=normalizeSuspenseSlot(s?r.default:r),t.ssFallback=s?normalizeSuspenseSlot(r.fallback):createVNode(Comment)}function normalizeSuspenseSlot(t){let e;if(isFunction$1(t)){const r=isBlockTreeEnabled&&t._c;r&&(t._d=!1,openBlock()),t=t(),r&&(t._d=!0,e=currentBlock,closeBlock())}return isArray$4(t)&&(t=filterSingleRoot(t)),t=normalizeVNode(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(r=>r!==t)),t}function queueEffectWithSuspense(t,e){e&&e.pendingBranch?isArray$4(t)?e.effects.push(...t):e.effects.push(t):queuePostFlushCb(t)}function setActiveBranch(t,e){t.activeBranch=e;const{vnode:r,parentComponent:s}=t,o=r.el=e.el;s&&s.subTree===r&&(s.vnode.el=o,updateHOCHostEl(s,o))}function isVNodeSuspensible(t){var e;return((e=t.props)==null?void 0:e.suspensible)!=null&&t.props.suspensible!==!1}function watchEffect(t,e){return doWatch(t,null,e)}const INITIAL_WATCHER_VALUE={};function watch(t,e,r){return doWatch(t,e,r)}function doWatch(t,e,{immediate:r,deep:s,flush:o,onTrack:d,onTrigger:L}=EMPTY_OBJ){var ge;const Mt=getCurrentScope()===((ge=currentInstance)==null?void 0:ge.scope)?currentInstance:null;let er,tr=!1,ir=!1;if(isRef(t)?(er=()=>t.value,tr=isShallow(t)):isReactive(t)?(er=()=>t,s=!0):isArray$4(t)?(ir=!0,tr=t.some(dr=>isReactive(dr)||isShallow(dr)),er=()=>t.map(dr=>{if(isRef(dr))return dr.value;if(isReactive(dr))return traverse(dr);if(isFunction$1(dr))return callWithErrorHandling(dr,Mt,2)})):isFunction$1(t)?e?er=()=>callWithErrorHandling(t,Mt,2):er=()=>{if(!(Mt&&Mt.isUnmounted))return rr&&rr(),callWithAsyncErrorHandling(t,Mt,3,[nr])}:er=NOOP,e&&s){const dr=er;er=()=>traverse(dr())}let rr,nr=dr=>{rr=ur.onStop=()=>{callWithErrorHandling(dr,Mt,4)}},ar;if(isInSSRComponentSetup)if(nr=NOOP,e?r&&callWithAsyncErrorHandling(e,Mt,3,[er(),ir?[]:void 0,nr]):er(),o==="sync"){const dr=useSSRContext();ar=dr.__watcherHandles||(dr.__watcherHandles=[])}else return NOOP;let sr=ir?new Array(t.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const lr=()=>{if(ur.active)if(e){const dr=ur.run();(s||tr||(ir?dr.some((hr,pr)=>hasChanged(hr,sr[pr])):hasChanged(dr,sr)))&&(rr&&rr(),callWithAsyncErrorHandling(e,Mt,3,[dr,sr===INITIAL_WATCHER_VALUE?void 0:ir&&sr[0]===INITIAL_WATCHER_VALUE?[]:sr,nr]),sr=dr)}else ur.run()};lr.allowRecurse=!!e;let cr;o==="sync"?cr=lr:o==="post"?cr=()=>queuePostRenderEffect(lr,Mt&&Mt.suspense):(lr.pre=!0,Mt&&(lr.id=Mt.uid),cr=()=>queueJob(lr));const ur=new ReactiveEffect(er,cr);e?r?lr():sr=ur.run():o==="post"?queuePostRenderEffect(ur.run.bind(ur),Mt&&Mt.suspense):ur.run();const or=()=>{ur.stop(),Mt&&Mt.scope&&remove$1(Mt.scope.effects,ur)};return ar&&ar.push(or),or}function instanceWatch(t,e,r){const s=this.proxy,o=isString$1(t)?t.includes(".")?createPathGetter(s,t):()=>s[t]:t.bind(s,s);let d;isFunction$1(e)?d=e:(d=e.handler,r=e);const L=currentInstance;setCurrentInstance(this);const ge=doWatch(o,d.bind(s),r);return L?setCurrentInstance(L):unsetCurrentInstance(),ge}function createPathGetter(t,e){const r=e.split(".");return()=>{let s=t;for(let o=0;o<r.length&&s;o++)s=s[r[o]];return s}}function traverse(t,e){if(!isObject$3(t)||t.__v_skip||(e=e||new Set,e.has(t)))return t;if(e.add(t),isRef(t))traverse(t.value,e);else if(isArray$4(t))for(let r=0;r<t.length;r++)traverse(t[r],e);else if(isSet$2(t)||isMap$2(t))t.forEach(r=>{traverse(r,e)});else if(isPlainObject$1(t))for(const r in t)traverse(t[r],e);return t}function withDirectives(t,e){const r=currentRenderingInstance;if(r===null)return t;const s=getExposeProxy(r)||r.proxy,o=t.dirs||(t.dirs=[]);for(let d=0;d<e.length;d++){let[L,ge,Mt,er=EMPTY_OBJ]=e[d];L&&(isFunction$1(L)&&(L={mounted:L,updated:L}),L.deep&&traverse(ge),o.push({dir:L,instance:s,value:ge,oldValue:void 0,arg:Mt,modifiers:er}))}return t}function invokeDirectiveHook(t,e,r,s){const o=t.dirs,d=e&&e.dirs;for(let L=0;L<o.length;L++){const ge=o[L];d&&(ge.oldValue=d[L].value);let Mt=ge.dir[s];Mt&&(pauseTracking(),callWithAsyncErrorHandling(Mt,r,8,[t.el,ge,t,e]),resetTracking())}}const leaveCbKey=Symbol("_leaveCb"),enterCbKey=Symbol("_enterCb");function useTransitionState(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leav
vendor: 1,541 bytes, line 2
2ingVNodes:new Map};return onMounted(()=>{t.isMounted=!0}),onBeforeUnmount(()=>{t.isUnmounting=!0}),t}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(t,{slots:e}){const r=getCurrentInstance(),s=useTransitionState();let o;return()=>{const d=e.default&&getTransitionRawChildren(e.default(),!0);if(!d||!d.length)return;let L=d[0];if(d.length>1){for(const sr of d)if(sr.type!==Comment){L=sr;break}}const ge=toRaw(t),{mode:Mt}=ge;if(s.isLeaving)return emptyPlaceholder(L);const er=getKeepAliveChild(L);if(!er)return emptyPlaceholder(L);const tr=resolveTransitionHooks(er,ge,s,r);setTransitionHooks(er,tr);const ir=r.subTree,rr=ir&&getKeepAliveChild(ir);let nr=!1;const{getTransitionKey:ar}=er.type;if(ar){const sr=ar();o===void 0?o=sr:sr!==o&&(o=sr,nr=!0)}if(rr&&rr.type!==Comment&&(!isSameVNodeType(er,rr)||nr)){const sr=resolveTransitionHooks(rr,ge,s,r);if(setTransitionHooks(rr,sr),Mt==="out-in")return s.isLeaving=!0,sr.afterLeave=()=>
vendor: 7,160 bytes, line 2
2{s.isLeaving=!1,r.update.active!==!1&&r.update()},emptyPlaceholder(L);Mt==="in-out"&&er.type!==Comment&&(sr.delayLeave=(lr,cr,ur)=>{const or=getLeavingNodesForType(s,rr);or[String(rr.key)]=rr,lr[leaveCbKey]=()=>{cr(),lr[leaveCbKey]=void 0,delete tr.delayedLeave},tr.delayedLeave=ur})}return L}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(t,e){const{leavingVNodes:r}=t;let s=r.get(e.type);return s||(s=Object.create(null),r.set(e.type,s)),s}function resolveTransitionHooks(t,e,r,s){const{appear:o,mode:d,persisted:L=!1,onBeforeEnter:ge,onEnter:Mt,onAfterEnter:er,onEnterCancelled:tr,onBeforeLeave:ir,onLeave:rr,onAfterLeave:nr,onLeaveCancelled:ar,onBeforeAppear:sr,onAppear:lr,onAfterAppear:cr,onAppearCancelled:ur}=e,or=String(t.key),dr=getLeavingNodesForType(r,t),hr=(vr,Er)=>{vr&&callWithAsyncErrorHandling(vr,s,9,Er)},pr=(vr,Er)=>{const Cr=Er[1];hr(vr,Er),isArray$4(vr)?vr.every(Pr=>Pr.length<=1)&&Cr():vr.length<=1&&Cr()},mr={mode:d,persisted:L,beforeEnter(vr){let Er=ge;if(!r.isMounted)if(o)Er=sr||ge;else return;vr[leaveCbKey]&&vr[leaveCbKey](!0);const Cr=dr[or];Cr&&isSameVNodeType(t,Cr)&&Cr.el[leaveCbKey]&&Cr.el[leaveCbKey](),hr(Er,[vr])},enter(vr){let Er=Mt,Cr=er,Pr=tr;if(!r.isMounted)if(o)Er=lr||Mt,Cr=cr||er,Pr=ur||tr;else return;let kr=!1;const Mr=vr[enterCbKey]=Ur=>{kr||(kr=!0,Ur?hr(Pr,[vr]):hr(Cr,[vr]),mr.delayedLeave&&mr.delayedLeave(),vr[enterCbKey]=void 0)};Er?pr(Er,[vr,Mr]):Mr()},leave(vr,Er){const Cr=String(t.key);if(vr[enterCbKey]&&vr[enterCbKey](!0),r.isUnmounting)return Er();hr(ir,[vr]);let Pr=!1;const kr=vr[leaveCbKey]=Mr=>{Pr||(Pr=!0,Er(),Mr?hr(ar,[vr]):hr(nr,[vr]),vr[leaveCbKey]=void 0,dr[Cr]===t&&delete dr[Cr])};dr[Cr]=t,rr?pr(rr,[vr,kr]):kr()},clone(vr){return resolveTransitionHooks(vr,e,r,s)}};return mr}function emptyPlaceholder(t){if(isKeepAlive(t))return t=cloneVNode(t),t.children=null,t}function getKeepAliveChild(t){return isKeepAlive(t)?t.children?t.children[0]:void 0:t}function setTransitionHooks(t,e){t.shapeFlag&6&&t.component?setTransitionHooks(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function getTransitionRawChildren(t,e=!1,r){let s=[],o=0;for(let d=0;d<t.length;d++){let L=t[d];const ge=r==null?L.key:String(r)+String(L.key!=null?L.key:d);L.type===Fragment$1?(L.patchFlag&128&&o++,s=s.concat(getTransitionRawChildren(L.children,e,ge))):(e||L.type!==Comment)&&s.push(ge!=null?cloneVNode(L,{key:ge}):L)}if(o>1)for(let d=0;d<s.length;d++)s[d].patchFlag=-2;return s}/*! #__NO_SIDE_EFFECTS__ */function defineComponent(t,e){return isFunction$1(t)?extend({name:t.name},e,{setup:t}):t}const isAsyncWrapper=t=>!!t.type.__asyncLoader,isKeepAlive=t=>t.type.__isKeepAlive,KeepAliveImpl={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const r=getCurrentInstance(),s=r.ctx;if(!s.renderer)return()=>{const ur=e.default&&e.default();return ur&&ur.length===1?ur[0]:ur};const o=new Map,d=new Set;let L=null;const ge=r.suspense,{renderer:{p:Mt,m:er,um:tr,o:{createElement:ir}}}=s,rr=ir("div");s.activate=(ur,or,dr,hr,pr)=>{const mr=ur.component;er(ur,or,dr,0,ge),Mt(mr.vnode,ur,or,dr,mr,ge,hr,ur.slotScopeIds,pr),queuePostRenderEffect(()=>{mr.isDeactivated=!1,mr.a&&invokeArrayFns(mr.a);const vr=ur.props&&ur.props.onVnodeMounted;vr&&invokeVNodeHook(vr,mr.parent,ur)},ge)},s.deactivate=ur=>{const or=ur.component;er(ur,rr,null,1,ge),queuePostRenderEffect(()=>{or.da&&invokeArrayFns(or.da);const dr=ur.props&&ur.props.onVnodeUnmounted;dr&&invokeVNodeHook(dr,or.parent,ur),or.isDeactivated=!0},ge)};function nr(ur){resetShapeFlag(ur),tr(ur,r,ge,!0)}function ar(ur){o.forEach((or,dr)=>{const hr=getComponentName(or.type);hr&&(!ur||!ur(hr))&&sr(dr)})}function sr(ur){const or=o.get(ur);!L||!isSameVNodeType(or,L)?nr(or):L&&resetShapeFlag(L),o.delete(ur),d.delete(ur)}watch(()=>[t.include,t.exclude],([ur,or])=>{ur&&ar(dr=>matches(ur,dr)),or&&ar(dr=>!matches(or,dr))},{flush:"post",deep:!0});let lr=null;const cr=()=>{lr!=null&&o.set(lr,getInnerChild(r.subTree))};return onMounted(cr),onUpdated(cr),onBeforeUnmount(()=>{o.forEach(ur=>{const{subTree:or,suspense:dr}=r,hr=getInnerChild(or);if(ur.type===hr.type&&ur.key===hr.key){resetShapeFlag(hr);const pr=hr.component.da;pr&&queuePostRenderEffect(pr,dr);return}nr(ur)})}),()=>{if(lr=null,!e.default)return null;const ur=e.default(),or=ur[0];if(ur.length>1)return L=null,ur;if(!isVNode(or)||!(or.shapeFlag&4)&&!(or.shapeFlag&128))return L=null,or;let dr=getInnerChild(or);const hr=dr.type,pr=getComponentName(isAsyncWrapper(dr)?dr.type.__asyncResolved||{}:hr),{include:mr,exclude:vr,max:Er}=t;if(mr&&(!pr||!matches(mr,pr))||vr&&pr&&matches(vr,pr))return L=dr,or;const Cr=dr.key==null?hr:dr.key,Pr=o.get(Cr);return dr.el&&(dr=cloneVNode(dr),or.shapeFlag&128&&(or.ssContent=dr)),lr=Cr,Pr?(dr.el=Pr.el,dr.component=Pr.component,dr.transition&&setTransitionHooks(dr,dr.transition),dr.shapeFlag|=512,d.delete(Cr),d.add(Cr)):(d.add(Cr),Er&&d.size>parseInt(Er,10)&&sr(d.values().next().value)),dr.shapeFlag|=256,L=dr,isSuspense(or.type)?or:dr}}},KeepAlive=KeepAliveImpl;function matches(t,e){return isArray$4(t)?t.some(r=>matches(r,e)):isString$1(t)?t.split(",").includes(e):isRegExp(t)?t.test(e):!1}function onActivated(t,e){registerKeepAliveHook(t,"a",e)}function onDeactivated(t,e){registerKeepAliveHook(t,"da",e)}function registerKeepAliveHook(t,e,r=currentInstance){const s=t.__wdc||(t.__wdc=()=>{let o=r;for(;o;){if(o.isDeactivated)return;o=o.parent}return t()});if(injectHook(e,s,r),r){let o=r.parent;for(;o&&o.parent;)isKeepAlive(o.parent.vnode)&&injectToKeepAliveRoot(s,e,r,o),o=o.parent}}function injectToKeepAliveRoot(t,e,r,s){const o=injectHook(e,t,s,!0);onUnmounted(()=>{remove$1(s[e],o)},r)}function resetShapeFlag(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function getInnerChild(t){return t.shapeFlag&128?t.ssContent:t}function injectHook(t,e,r=currentInstance,s=!1){if(r){const o=r[t]||(r[t]=[]),d=e.__weh||(e.__weh=(...L)=>{if(r.isUnmounted)return;pauseTracking(),setCurrentInstance(r);const ge=callWithAsyncErrorHandling(e,r,t,L);return unsetCurrentInstance(),resetTracking(),ge});return s?o.unshift(d):o.push(d),d}}const createHook=t=>(e,r=currentInstance)=>(!isInSSRComponentSetup||t==="sp")&&injectHook(t,(...s)=>e(...s),r),onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(t,e=currentInstance){injectHook("ec",t,e)}function renderList(t,e,r,s){let o;const d=r;if(isArray$4(t)||isString$1(t)){o=new Array(t.length);for(let L=0,ge=t.length;L<ge;L++)o[L]=e(t[L],L,void 0,d)}else if(typeof t=="number"){o=new Array(t);for(let L=0;L<t;L++)o[L]=e(L+1,L,void 0,d)}else if(isObject$3(t))if(t[Symbol.iterator])o=Array.from(t,(L,ge)=>e(L,ge,void 0,d));else{const L=Object.keys(t);o=new Array(L.length);for(let ge=0,Mt=L.length;ge<Mt;ge++){const er=L[ge];o[ge]=e(t[er],er,ge,d)}}else o=[];return o}
vendor: 4,238 bytes, line 2
2function renderSlot(t,e,r={},s,o){if(currentRenderingInstance.isCE||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.isCE)return e!=="default"&&(r.name=e),createVNode("slot",r,s&&s());let d=t[e];d&&d._c&&(d._d=!1),openBlock();const L=d&&ensureValidVNode(d(r)),ge=createBlock(Fragment$1,{key:r.key||L&&L.key||`_${e}`},L||(s?s():[]),L&&t._===1?64:-2);return!o&&ge.scopeId&&(ge.slotScopeIds=[ge.scopeId+"-s"]),d&&d._c&&(d._d=!0),ge}function ensureValidVNode(t){return t.some(e=>isVNode(e)?!(e.type===Comment||e.type===Fragment$1&&!ensureValidVNode(e.children)):!0)?t:null}const getPublicInstance=t=>t?isStatefulComponent(t)?getExposeProxy(t)||t.proxy:getPublicInstance(t.parent):null,publicPropertiesMap=extend(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>getPublicInstance(t.parent),$root:t=>getPublicInstance(t.root),$emit:t=>t.emit,$options:t=>resolveMergedOptions(t),$forceUpdate:t=>t.f||(t.f=()=>queueJob(t.update)),$nextTick:t=>t.n||(t.n=nextTick.bind(t.proxy)),$watch:t=>instanceWatch.bind(t)}),hasSetupBinding=(t,e)=>t!==EMPTY_OBJ&&!t.__isScriptSetup&&hasOwn$1(t,e),PublicInstanceProxyHandlers={get({_:t},e){const{ctx:r,setupState:s,data:o,props:d,accessCache:L,type:ge,appContext:Mt}=t;let er;if(e[0]!=="$"){const nr=L[e];if(nr!==void 0)switch(nr){case 1:return s[e];case 2:return o[e];case 4:return r[e];case 3:return d[e]}else{if(hasSetupBinding(s,e))return L[e]=1,s[e];if(o!==EMPTY_OBJ&&hasOwn$1(o,e))return L[e]=2,o[e];if((er=t.propsOptions[0])&&hasOwn$1(er,e))return L[e]=3,d[e];if(r!==EMPTY_OBJ&&hasOwn$1(r,e))return L[e]=4,r[e];shouldCacheAccess&&(L[e]=0)}}const tr=publicPropertiesMap[e];let ir,rr;if(tr)return e==="$attrs"&&track(t,"get",e),tr(t);if((ir=ge.__cssModules)&&(ir=ir[e]))return ir;if(r!==EMPTY_OBJ&&hasOwn$1(r,e))return L[e]=4,r[e];if(rr=Mt.config.globalProperties,hasOwn$1(rr,e))return rr[e]},set({_:t},e,r){const{data:s,setupState:o,ctx:d}=t;return hasSetupBinding(o,e)?(o[e]=r,!0):s!==EMPTY_OBJ&&hasOwn$1(s,e)?(s[e]=r,!0):hasOwn$1(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(d[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:s,appContext:o,propsOptions:d}},L){let ge;return!!r[L]||t!==EMPTY_OBJ&&hasOwn$1(t,L)||hasSetupBinding(e,L)||(ge=d[0])&&hasOwn$1(ge,L)||hasOwn$1(s,L)||hasOwn$1(publicPropertiesMap,L)||hasOwn$1(o.config.globalProperties,L)},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:hasOwn$1(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function normalizePropsOrEmits(t){return isArray$4(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}function withAsyncContext(t){const e=getCurrentInstance();let r=t();return unsetCurrentInstance(),isPromise$1(r)&&(r=r.catch(s=>{throw setCurrentInstance(e),s})),[r,()=>setCurrentInstance(e)]}let shouldCacheAccess=!0;function applyOptions(t){const e=resolveMergedOptions(t),r=t.proxy,s=t.ctx;shouldCacheAccess=!1,e.beforeCreate&&callHook$1(e.beforeCreate,t,"bc");const{data:o,computed:d,methods:L,watch:ge,provide:Mt,inject:er,created:tr,beforeMount:ir,mounted:rr,beforeUpdate:nr,updated:ar,activated:sr,deactivated:lr,beforeDestroy:cr,beforeUnmount:ur,destroyed:or,unmounted:dr,render:hr,renderTracked:pr,renderTriggered:mr,errorCaptured:vr,serverPrefetch:Er,expose:Cr,inheritAttrs:Pr,components:kr,directives:Mr,filters:Ur}=e;if(er&&resolveInjections(er,s,null),L)for(const xr in L){const gr=L[xr];isFunction$1(gr)&&(s[xr]=gr.bind(r))}if(o){const xr=o.call(r,r);isObject$3(xr)&&(t.data=reactive(xr))}if(shouldCacheAccess=!0,d)for(const xr in d){const gr=d[xr],_r=isFunction$1(gr)?gr.bind(r,r):isFunction$1(gr.get)?gr.get.bind(r,r):NOOP,wr=!isFunction$1(gr)&&isFunction$1(gr.set)?gr.set.bind(r):NOOP,Ir=computed({get:_r,set:wr});Object.defineProperty(s,xr,{enumerable:!0,configurable:!0,get:()=>Ir.value,set:Hr=>Ir.value=Hr})}if(ge)for(const xr in ge)createWatcher(ge[xr],s,r,xr);if(Mt){const xr=isFunction$1(Mt)?Mt.call(r):Mt;Reflect.ownKeys(xr).forEach(gr=>{provide(gr,xr[gr])})}tr&&callHook$1(tr,t,"c");function yr(xr,gr){isArray$4(gr)?gr.forEach(_r=>xr(_r.bind(r))):gr&&xr(gr.bind(r))}if(yr(onBeforeMount,ir),yr(onMounted,rr),yr(onBeforeUpdate,nr),yr(onU
vendor: 10,495 bytes, line 2
2pdated,ar),yr(onActivated,sr),yr(onDeactivated,lr),yr(onErrorCaptured,vr),yr(onRenderTracked,pr),yr(onRenderTriggered,mr),yr(onBeforeUnmount,ur),yr(onUnmounted,dr),yr(onServerPrefetch,Er),isArray$4(Cr))if(Cr.length){const xr=t.exposed||(t.exposed={});Cr.forEach(gr=>{Object.defineProperty(xr,gr,{get:()=>r[gr],set:_r=>r[gr]=_r})})}else t.exposed||(t.exposed={});hr&&t.render===NOOP&&(t.render=hr),Pr!=null&&(t.inheritAttrs=Pr),kr&&(t.components=kr),Mr&&(t.directives=Mr)}function resolveInjections(t,e,r=NOOP){isArray$4(t)&&(t=normalizeInject(t));for(const s in t){const o=t[s];let d;isObject$3(o)?"default"in o?d=inject(o.from||s,o.default,!0):d=inject(o.from||s):d=inject(o),isRef(d)?Object.defineProperty(e,s,{enumerable:!0,configurable:!0,get:()=>d.value,set:L=>d.value=L}):e[s]=d}}function callHook$1(t,e,r){callWithAsyncErrorHandling(isArray$4(t)?t.map(s=>s.bind(e.proxy)):t.bind(e.proxy),e,r)}function createWatcher(t,e,r,s){const o=s.includes(".")?createPathGetter(r,s):()=>r[s];if(isString$1(t)){const d=e[t];isFunction$1(d)&&watch(o,d)}else if(isFunction$1(t))watch(o,t.bind(r));else if(isObject$3(t))if(isArray$4(t))t.forEach(d=>createWatcher(d,e,r,s));else{const d=isFunction$1(t.handler)?t.handler.bind(r):e[t.handler];isFunction$1(d)&&watch(o,d,t)}}function resolveMergedOptions(t){const e=t.type,{mixins:r,extends:s}=e,{mixins:o,optionsCache:d,config:{optionMergeStrategies:L}}=t.appContext,ge=d.get(e);let Mt;return ge?Mt=ge:!o.length&&!r&&!s?Mt=e:(Mt={},o.length&&o.forEach(er=>mergeOptions$2(Mt,er,L,!0)),mergeOptions$2(Mt,e,L)),isObject$3(e)&&d.set(e,Mt),Mt}function mergeOptions$2(t,e,r,s=!1){const{mixins:o,extends:d}=e;d&&mergeOptions$2(t,d,r,!0),o&&o.forEach(L=>mergeOptions$2(t,L,r,!0));for(const L in e)if(!(s&&L==="expose")){const ge=internalOptionMergeStrats[L]||r&&r[L];t[L]=ge?ge(t[L],e[L]):e[L]}return t}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions$1,computed:mergeObjectOptions$1,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions$1,directives:mergeObjectOptions$1,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(t,e){return e?t?function(){return extend(isFunction$1(t)?t.call(this,this):t,isFunction$1(e)?e.call(this,this):e)}:e:t}function mergeInject(t,e){return mergeObjectOptions$1(normalizeInject(t),normalizeInject(e))}function normalizeInject(t){if(isArray$4(t)){const e={};for(let r=0;r<t.length;r++)e[t[r]]=t[r];return e}return t}function mergeAsArray(t,e){return t?[...new Set([].concat(t,e))]:e}function mergeObjectOptions$1(t,e){return t?extend(Object.create(null),t,e):e}function mergeEmitsOrPropsOptions(t,e){return t?isArray$4(t)&&isArray$4(e)?[...new Set([...t,...e])]:extend(Object.create(null),normalizePropsOrEmits(t),normalizePropsOrEmits(e??{})):e}function mergeWatchOptions(t,e){if(!t)return e;if(!e)return t;const r=extend(Object.create(null),t);for(const s in e)r[s]=mergeAsArray(t[s],e[s]);return r}function createAppContext(){return{app:null,config:{isNativeTag:NO,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let uid$1=0;function createAppAPI(t,e){return function(s,o=null){isFunction$1(s)||(s=extend({},s)),o!=null&&!isObject$3(o)&&(o=null);const d=createAppContext(),L=new WeakSet;let ge=!1;const Mt=d.app={_uid:uid$1++,_component:s,_props:o,_container:null,_context:d,_instance:null,version:version$7,get config(){return d.config},set config(er){},use(er,...tr){return L.has(er)||(er&&isFunction$1(er.install)?(L.add(er),er.install(Mt,...tr)):isFunction$1(er)&&(L.add(er),er(Mt,...tr))),Mt},mixin(er){return d.mixins.includes(er)||d.mixins.push(er),Mt},component(er,tr){return tr?(d.components[er]=tr,Mt):d.components[er]},directive(er,tr){return tr?(d.directives[er]=tr,Mt):d.directives[er]},mount(er,tr,ir){if(!ge){const rr=createVNode(s,o);return rr.appContext=d,tr&&e?e(rr,er):t(rr,er,ir),ge=!0,Mt._container=er,er.__vue_app__=Mt,getExposeProxy(rr.component)||rr.component.proxy}},unmount(){ge&&(t(null,Mt._container),delete Mt._container.__vue_app__)},provide(er,tr){return d.provides[er]=tr,Mt},runWithContext(er){currentApp=Mt;try{return er()}finally{currentApp=null}}};return Mt}}let currentApp=null;function provide(t,e){if(currentInstance){let r=currentInstance.provides;const s=currentInstance.parent&¤tInstance.parent.provides;s===r&&(r=currentInstance.provides=Object.create(s)),r[t]=e}}function inject(t,e,r=!1){const s=currentInstance||currentRenderingInstance;if(s||currentApp){const o=s?s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:currentApp._context.provides;if(o&&t in o)return o[t];if(arguments.length>1)return r&&isFunction$1(e)?e.call(s&&s.proxy):e}}function hasInjectionContext(){return!!(currentInstance||currentRenderingInstance||currentApp)}function initProps(t,e,r,s=!1){const o={},d={};def(d,InternalObjectKey,1),t.propsDefaults=Object.create(null),setFullProps(t,e,o,d);for(const L in t.propsOptions[0])L in o||(o[L]=void 0);r?t.props=s?o:shallowReactive(o):t.type.props?t.props=o:t.props=d,t.attrs=d}function updateProps(t,e,r,s){const{props:o,attrs:d,vnode:{patchFlag:L}}=t,ge=toRaw(o),[Mt]=t.propsOptions;let er=!1;if((s||L>0)&&!(L&16)){if(L&8){const tr=t.vnode.dynamicProps;for(let ir=0;ir<tr.length;ir++){let rr=tr[ir];if(isEmitListener(t.emitsOptions,rr))continue;const nr=e[rr];if(Mt)if(hasOwn$1(d,rr))nr!==d[rr]&&(d[rr]=nr,er=!0);else{const ar=camelize(rr);o[ar]=resolvePropValue(Mt,ge,ar,nr,t,!1)}else nr!==d[rr]&&(d[rr]=nr,er=!0)}}}else{setFullProps(t,e,o,d)&&(er=!0);let tr;for(const ir in ge)(!e||!hasOwn$1(e,ir)&&((tr=hyphenate(ir))===ir||!hasOwn$1(e,tr)))&&(Mt?r&&(r[ir]!==void 0||r[tr]!==void 0)&&(o[ir]=resolvePropValue(Mt,ge,ir,void 0,t,!0)):delete o[ir]);if(d!==ge)for(const ir in d)(!e||!hasOwn$1(e,ir))&&(delete d[ir],er=!0)}er&&trigger(t,"set","$attrs")}function setFullProps(t,e,r,s){const[o,d]=t.propsOptions;let L=!1,ge;if(e)for(let Mt in e){if(isReservedProp(Mt))continue;const er=e[Mt];let tr;o&&hasOwn$1(o,tr=camelize(Mt))?!d||!d.includes(tr)?r[tr]=er:(ge||(ge={}))[tr]=er:isEmitListener(t.emitsOptions,Mt)||(!(Mt in s)||er!==s[Mt])&&(s[Mt]=er,L=!0)}if(d){const Mt=toRaw(r),er=ge||EMPTY_OBJ;for(let tr=0;tr<d.length;tr++){const ir=d[tr];r[ir]=resolvePropValue(o,Mt,ir,er[ir],t,!hasOwn$1(er,ir))}}return L}function resolvePropValue(t,e,r,s,o,d){const L=t[r];if(L!=null){const ge=hasOwn$1(L,"default");if(ge&&s===void 0){const Mt=L.default;if(L.type!==Function&&!L.skipFactory&&isFunction$1(Mt)){const{propsDefaults:er}=o;r in er?s=er[r]:(setCurrentInstance(o),s=er[r]=Mt.call(null,e),unsetCurrentInstance())}else s=Mt}L[0]&&(d&&!ge?s=!1:L[1]&&(s===""||s===hyphenate(r))&&(s=!0))}return s}function normalizePropsOptions(t,e,r=!1){const s=e.propsCache,o=s.get(t);if(o)return o;const d=t.props,L={},ge=[];let Mt=!1;if(!isFunction$1(t)){const tr=ir=>{Mt=!0;const[rr,nr]=normalizePropsOptions(ir,e,!0);extend(L,rr),nr&&ge.push(...nr)};!r&&e.mixins.length&&e.mixins.forEach(tr),t.extends&&tr(t.extends),t.mixins&&t.mixins.forEach(tr)}if(!d&&!Mt)return isObject$3(t)&&s.set(t,EMPTY_ARR),EMPTY_ARR;if(isArray$4(d))for(let tr=0;tr<d.length;tr++){const ir=camelize(d[tr]);validatePropName(ir)&&(L[ir]=EMPTY_OBJ)}else if(d)for(const tr in d){const ir=camelize(tr);if(validatePropName(ir)){const rr=d[tr],nr=L[ir]=isArray$4(rr)||isFunction$1(rr)?{type:rr}:extend({},rr);if(nr){const ar=getTypeIndex(Boolean,nr.type),sr=getTypeIndex(String,nr.type);nr[0]=ar>-1,nr[1]=sr<0||ar<sr,(ar>-1||hasOwn$1(nr,"default"))&&ge.push(ir)}}}const er=[L,ge];return isObject$3(t)&&s.set(t,er),er}function validatePropName(t){return t[0]!=="$"}function getType(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function isSameType(t,e){return getType(t)===getType(e)}function getTypeIndex(t,e){return isArray$4(e)?e.findIndex(r=>isSameType(r,t)):isFunction$1(e)&&isSameType(e,t)?0:-1}const isInternalKey=t=>t[0]==="_"||t==="$stable",normalizeSlotValue=t=>isArray$4(t)?t.map(normalizeVNode):[normalizeVNode(t)],normalizeSlot$1=(t,e,r)=>{if(e._n)return e;const s=withCtx((...o)=>normalizeSlotValue(e(...o)),r);return s._c=!1,s},normalizeObjectSlots=(t,e,r)=>{const s=t._ctx;for(const o in t){if(isInternalKey(o))continue;const d=t[o];if(isFunction$1(d))e[o]=normalizeSlot$1(o,d,s);else if(d!=null){const L=normalizeSlotValue(d);e[o]=()=>L}}},normalizeVNodeSlots=(t,e)=>{const r=normalizeSlotValue(e);t.slots.default=()=>r},initSlots=(t,e)=>{if(t.vnode.shapeFlag&32){const r=e._;r?(t.slots=toRaw(e),def(e,"_",r)):normalizeObjectSlots(e,t.slots={})}else t.slots={},e&&normalizeVNodeSlots(t,e);def(t.slots,InternalObjectKey,1)},updateSlots=(t,e,r)=>{const{vnode:s,slots:o}=t;let d=!0,L=EMPTY_OBJ;if(s.shapeFlag&32){const ge=e._;ge?r&&ge===1?d=!1:(extend(o,e),!r&&ge===1&&delete o._):(d=!e.$stable,normalizeObjectSlots(e,o)),L=e}else e&&(normalizeVNodeSlots(t,e),L={default:1});if(d)for(const ge in o)!isInternalKey(ge)&&L[ge]==null&&delete o[ge]};function setRef(t,e,r,s,o=!1){if(isArray$4(t)){t.forEach((rr,nr)=>setRef(rr,e&&(isArray$4(e)?e[nr]:e),r,s,o));return}if(isAsyncWrapper(s)&&!o)return;const d=s.shapeFlag&4?getExposeProxy(s.component)||s.component.proxy:s.el,L=o?null:d,{i:ge,r:Mt}=t,er=e&&e.r,tr=ge.refs===EMPTY_OBJ?ge.refs={}:ge.refs,ir=ge.setupState;if(er!=null&&er!==Mt&&(isString$1(er)?(tr[er]=null,hasOwn$1(ir,er)&&(ir[er]=null)):isRef(er)&&(er.value=null)),isFunction$1(Mt))callWithErrorHandling(Mt,ge,12,[L,tr]);else{const rr=isString$1(Mt),nr=isRef(Mt);if(rr||nr){const ar=()=>{if(t.f){const sr=rr?hasOwn$1(ir,Mt)?ir[Mt]:tr[Mt]:Mt.value;o?isArray$4(sr)&&remove$1(sr,d):isArray$4(sr)?sr.includes(d)||sr.push(d):rr?(tr[Mt]=[d],hasOwn$1(ir,Mt)&&(ir[Mt]=tr[Mt])):(Mt.value=[d],t.k&&(tr[t.k]=Mt.value))}else rr?(tr[Mt]=L,hasOwn$1(ir,Mt)&&(ir[Mt]=L)):nr&&(Mt.value=L,t.k&&(tr[t.k]=L))};L?(ar.id=-1,queuePostRenderEffect(ar,r)):ar()}}}let hasMismatch=!1;const isSVGContainer=t=>/svg/.test(t.namespaceURI)&&t.tagName!=="foreignObject",isComment=t=>
2t.nodeType===8;function createHydrationFunctions(t){const{mt:e,p:r,o:{patchProp:s,createText:o,nextSibling:d,parentNode:L,remove:ge,insert:Mt,createComment:er}}=t,tr=(or,dr)=>{if(!dr.hasChildNodes()){r(null,or,dr),flushPostFlushCbs(),dr._vnode=or;return}hasMismatch=!1,ir(dr.firstChild,or,null,null,null),flushPostFlushCbs(),dr._vnode=or,hasMismatch&&console.error("Hydration completed but contains mismatches.")},ir=(or,dr,hr,pr,mr,vr=!1)=>{const Er=isComment(or)&&or.data==="[",Cr=()=>sr(or,dr,hr,pr,mr,Er),{type:Pr,ref:kr,shapeFlag:Mr,patchFlag:Ur}=dr;let $r=or.nodeType;dr.el=or,Ur===-2&&(vr=!1,dr.dynamicChildren=null);let yr=null;switch(Pr){case Text$1:$r!==3?dr.children===""?(Mt(dr.el=o(""),L(or),or),yr=or):yr=Cr():(or.data!==dr.children&&(hasMismatch=!0,or.data=dr.children),yr=d(or));break;case Comment:ur(or)?(yr=d(or),cr(dr.el=or.content.firstChild,or,hr)):$r!==8||Er?yr=Cr():yr=d(or);break;case Static:if(Er&&(or=d(or),$r=or.nodeType),$r===1||$r===3){yr=or;const xr=!dr.children.length;for(let gr=0;gr<dr.staticCount;gr++)xr&&(dr.children+=yr.nodeType===1?yr.outerHTML:yr.data),gr===dr.staticCount-1&&(dr.anchor=yr),yr=d(yr);return Er?d(yr):yr}else Cr();break;case Fragment$1:Er?yr=ar(or,dr,hr,pr,mr,vr):yr=Cr();break;default:if(Mr&1)($r!==1||dr.type.toLowerCase()!==or.tagName.toLowerCase())&&!ur(or)?yr=Cr():yr=rr(or,dr,hr,pr,mr,vr);else if(Mr&6){dr.slotScopeIds=mr;const xr=L(or);if(Er?yr=lr(or):isComment(or)&&or.data==="teleport start"?yr=lr(or,or.data,"teleport end"):yr=d(or),e(dr,xr,null,hr,pr,isSVGContainer(xr),vr),isAsyncWrapper(dr)){let gr;Er?(gr=createVNode(Fragment$1),gr.anchor=yr?yr.previousSibling:xr.lastChild):gr=or.nodeType===3?createTextVNode(""):createVNode("div"),gr.el=or,dr.component.subTree=gr}}else Mr&64?$r!==8?yr=Cr():yr=dr.type.hydrate(or,dr,hr,pr,mr,vr,t,nr):Mr&128&&(yr=dr.type.hydrate(or,dr,hr,pr,isSVGContainer(L(or)),mr,vr,t,ir))}return kr!=null&&setRef(kr,null,pr,dr),yr},rr=(or,dr,hr,pr,mr,vr)=>{vr=vr||!!dr.dynamicChildren;const{type:Er,props:Cr,patchFlag:Pr,shapeFlag:kr,dirs:Mr,transition:Ur}=dr,$r=Er==="input"&&Mr||Er==="option";if($r||Pr!==-1){if(Mr&&invokeDirectiveHook(dr,null,hr,"created"),Cr)if($r||!vr||Pr&48)for(const gr in Cr)($r&&gr.endsWith("value")||isOn(gr)&&!isReservedProp(gr))&&s(or,gr,null,Cr[gr],!1,void 0,hr);else Cr.onClick&&s(or,"onClick",null,Cr.onClick,!1,void 0,hr);let yr;(yr=Cr&&Cr.onVnodeBeforeMount)&&invokeVNodeHook(yr,hr,dr);let xr=!1;if(ur(or)){xr=needTransition(pr,Ur)&&hr&&hr.vnode.props&&hr.vnode.props.appear;const gr=or.content.firstChild;xr&&Ur.beforeEnter(gr),cr(gr,or,hr),dr.el=or=gr}if(Mr&&invokeDirectiveHook(dr,null,hr,"beforeMount"),((yr=Cr&&Cr.onVnodeMounted)||Mr||xr)&&queueEffectWithSuspense(()=>{yr&&invokeVNodeHook(yr,hr,dr),xr&&Ur.enter(or),Mr&&invokeDirectiveHook(dr,null,hr,"mounted")},pr),kr&16&&!(Cr&&(Cr.innerHTML||Cr.textContent))){let gr=nr(or.firstChild,dr,or,hr,pr,mr,vr);for(;gr;){hasMismatch=!0;const _r=gr;gr=gr.nextSibling,ge(_r)}}else kr&8&&or.textContent!==dr.children&&(hasMismatch=!0,or.textContent=dr.children)}return or.nextSibling},nr=(or,dr,hr,pr,mr,vr,Er)=>{Er=Er||!!dr.dynamicChildren;const Cr=dr.children,Pr=Cr.length;for(let kr=0;kr<Pr;kr++){const Mr=Er?Cr[kr]:Cr[kr]=normalizeVNode(Cr[kr]);if(or)or=ir(or,Mr,pr,mr,vr,Er);
vendor: 2,433 bytes, line 2
2else{if(Mr.type===Text$1&&!Mr.children)continue;hasMismatch=!0,r(null,Mr,hr,null,pr,mr,isSVGContainer(hr),vr)}}return or},ar=(or,dr,hr,pr,mr,vr)=>{const{slotScopeIds:Er}=dr;Er&&(mr=mr?mr.concat(Er):Er);const Cr=L(or),Pr=nr(d(or),dr,Cr,hr,pr,mr,vr);return Pr&&isComment(Pr)&&Pr.data==="]"?d(dr.anchor=Pr):(hasMismatch=!0,Mt(dr.anchor=er("]"),Cr,Pr),Pr)},sr=(or,dr,hr,pr,mr,vr)=>{if(hasMismatch=!0,dr.el=null,vr){const Pr=lr(or);for(;;){const kr=d(or);if(kr&&kr!==Pr)ge(kr);else break}}const Er=d(or),Cr=L(or);return ge(or),r(null,dr,Cr,Er,hr,pr,isSVGContainer(Cr),mr),Er},lr=(or,dr="[",hr="]")=>{let pr=0;for(;or;)if(or=d(or),or&&isComment(or)&&(or.data===dr&&pr++,or.data===hr)){if(pr===0)return d(or);pr--}return or},cr=(or,dr,hr)=>{const pr=dr.parentNode;pr&&pr.replaceChild(or,dr);let mr=hr;for(;mr;)mr.vnode.el===dr&&(mr.vnode.el=mr.subTree.el=or),mr=mr.parent},ur=or=>or.nodeType===1&&or.tagName.toLowerCase()==="template";return[tr,ir]}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(t){return baseCreateRenderer(t)}function createHydrationRenderer(t){return baseCreateRenderer(t,createHydrationFunctions)}function baseCreateRenderer(t,e){const r=getGlobalThis();r.__VUE__=!0;const{insert:s,remove:o,patchProp:d,createElement:L,createText:ge,createComment:Mt,setText:er,setElementText:tr,parentNode:ir,nextSibling:rr,setScopeId:nr=NOOP,insertStaticContent:ar}=t,sr=(Dr,Lr,Nr,Wr=null,qr=null,Fr=null,Ti=!1,Xr=null,Si=!!Lr.dynamicChildren)=>{if(Dr===Lr)return;Dr&&!isSameVNodeType(Dr,Lr)&&(Wr=Vr(Dr),Hr(Dr,qr,Fr,!0),Dr=null),Lr.patchFlag===-2&&(Si=!1,Lr.dynamicChildren=null);const{type:jr,ref:wi,shapeFlag:ki}=Lr;switch(jr){case Text$1:lr(Dr,Lr,Nr,Wr);break;case Comment:cr(Dr,Lr,Nr,Wr);break;case Static:Dr==null&&ur(Lr,Nr,Wr,Ti);break;case Fragment$1:kr(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si);break;default:ki&1?hr(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si):ki&6?Mr(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si):(ki&64||ki&128)&&jr.process(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si,Qr)}wi!=null&&qr&&setRef(wi,Dr&&Dr.ref,Fr,Lr||Dr,!Lr)},lr=(Dr,Lr,Nr,Wr)=>{if(Dr==null)s(Lr.el=ge(Lr.children),Nr,Wr);else{const qr=Lr.el=Dr.el;Lr.children!==Dr.children&&er(qr,Lr.children)}},cr=(Dr,Lr,Nr,Wr)=>{Dr==null?s(Lr.el=Mt(Lr.children||""),Nr,Wr):Lr.el=Dr.el},ur=(Dr,Lr,Nr,Wr)=>{[Dr.el,Dr.anchor]=ar(Dr.children,Lr,Nr,Wr,Dr.el,Dr.anchor)},or=({el:Dr,anchor:Lr},Nr,Wr)=>{let qr;for(;Dr&&Dr!==Lr;)qr=rr(Dr),s(Dr,Nr,Wr),Dr=qr;s(Lr,Nr,Wr)},dr=({el:Dr,anchor:Lr})=>{let Nr;
vendor: 35,725 bytes, line 2
2for(;Dr&&Dr!==Lr;)Nr=rr(Dr),o(Dr),Dr=Nr;o(Lr)},hr=(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si)=>{Ti=Ti||Lr.type==="svg",Dr==null?pr(Lr,Nr,Wr,qr,Fr,Ti,Xr,Si):Er(Dr,Lr,qr,Fr,Ti,Xr,Si)},pr=(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr)=>{let Si,jr;const{type:wi,props:ki,shapeFlag:Ii,transition:Pi,dirs:Di}=Dr;if(Si=Dr.el=L(Dr.type,Fr,ki&&ki.is,ki),Ii&8?tr(Si,Dr.children):Ii&16&&vr(Dr.children,Si,null,Wr,qr,Fr&&wi!=="foreignObject",Ti,Xr),Di&&invokeDirectiveHook(Dr,null,Wr,"created"),mr(Si,Dr,Dr.scopeId,Ti,Wr),ki){for(const Wi in ki)Wi!=="value"&&!isReservedProp(Wi)&&d(Si,Wi,null,ki[Wi],Fr,Dr.children,Wr,qr,di);"value"in ki&&d(Si,"value",null,ki.value),(jr=ki.onVnodeBeforeMount)&&invokeVNodeHook(jr,Wr,Dr)}Di&&invokeDirectiveHook(Dr,null,Wr,"beforeMount");const Oi=needTransition(qr,Pi);Oi&&Pi.beforeEnter(Si),s(Si,Lr,Nr),((jr=ki&&ki.onVnodeMounted)||Oi||Di)&&queuePostRenderEffect(()=>{jr&&invokeVNodeHook(jr,Wr,Dr),Oi&&Pi.enter(Si),Di&&invokeDirectiveHook(Dr,null,Wr,"mounted")},qr)},mr=(Dr,Lr,Nr,Wr,qr)=>{if(Nr&&nr(Dr,Nr),Wr)for(let Fr=0;Fr<Wr.length;Fr++)nr(Dr,Wr[Fr]);if(qr){let Fr=qr.subTree;if(Lr===Fr){const Ti=qr.vnode;mr(Dr,Ti,Ti.scopeId,Ti.slotScopeIds,qr.parent)}}},vr=(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si=0)=>{for(let jr=Si;jr<Dr.length;jr++){const wi=Dr[jr]=Xr?cloneIfMounted(Dr[jr]):normalizeVNode(Dr[jr]);sr(null,wi,Lr,Nr,Wr,qr,Fr,Ti,Xr)}},Er=(Dr,Lr,Nr,Wr,qr,Fr,Ti)=>{const Xr=Lr.el=Dr.el;let{patchFlag:Si,dynamicChildren:jr,dirs:wi}=Lr;Si|=Dr.patchFlag&16;const ki=Dr.props||EMPTY_OBJ,Ii=Lr.props||EMPTY_OBJ;let Pi;Nr&&toggleRecurse(Nr,!1),(Pi=Ii.onVnodeBeforeUpdate)&&invokeVNodeHook(Pi,Nr,Lr,Dr),wi&&invokeDirectiveHook(Lr,Dr,Nr,"beforeUpdate"),Nr&&toggleRecurse(Nr,!0);const Di=qr&&Lr.type!=="foreignObject";if(jr?Cr(Dr.dynamicChildren,jr,Xr,Nr,Wr,Di,Fr):Ti||gr(Dr,Lr,Xr,null,Nr,Wr,Di,Fr,!1),Si>0){if(Si&16)Pr(Xr,Lr,ki,Ii,Nr,Wr,qr);else if(Si&2&&ki.class!==Ii.class&&d(Xr,"class",null,Ii.class,qr),Si&4&&d(Xr,"style",ki.style,Ii.style,qr),Si&8){const Oi=Lr.dynamicProps;for(let Wi=0;Wi<Oi.length;Wi++){const Zi=Oi[Wi],en=ki[Zi],un=Ii[Zi];(un!==en||Zi==="value")&&d(Xr,Zi,en,un,qr,Dr.children,Nr,Wr,di)}}Si&1&&Dr.children!==Lr.children&&tr(Xr,Lr.children)}else!Ti&&jr==null&&Pr(Xr,Lr,ki,Ii,Nr,Wr,qr);((Pi=Ii.onVnodeUpdated)||wi)&&queuePostRenderEffect(()=>{Pi&&invokeVNodeHook(Pi,Nr,Lr,Dr),wi&&invokeDirectiveHook(Lr,Dr,Nr,"updated")},Wr)},Cr=(Dr,Lr,Nr,Wr,qr,Fr,Ti)=>{for(let Xr=0;Xr<Lr.length;Xr++){const Si=Dr[Xr],jr=Lr[Xr],wi=Si.el&&(Si.type===Fragment$1||!isSameVNodeType(Si,jr)||Si.shapeFlag&70)?ir(Si.el):Nr;sr(Si,jr,wi,null,Wr,qr,Fr,Ti,!0)}},Pr=(Dr,Lr,Nr,Wr,qr,Fr,Ti)=>{if(Nr!==Wr){if(Nr!==EMPTY_OBJ)for(const Xr in Nr)!isReservedProp(Xr)&&!(Xr in Wr)&&d(Dr,Xr,Nr[Xr],null,Ti,Lr.children,qr,Fr,di);for(const Xr in Wr){if(isReservedProp(Xr))continue;const Si=Wr[Xr],jr=Nr[Xr];Si!==jr&&Xr!=="value"&&d(Dr,Xr,jr,Si,Ti,Lr.children,qr,Fr,di)}"value"in Wr&&d(Dr,"value",Nr.value,Wr.value)}},kr=(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si)=>{const jr=Lr.el=Dr?Dr.el:ge(""),wi=Lr.anchor=Dr?Dr.anchor:ge("");let{patchFlag:ki,dynamicChildren:Ii,slotScopeIds:Pi}=Lr;Pi&&(Xr=Xr?Xr.concat(Pi):Pi),Dr==null?(s(jr,Nr,Wr),s(wi,Nr,Wr),vr(Lr.children,Nr,wi,qr,Fr,Ti,Xr,Si)):ki>0&&ki&64&&Ii&&Dr.dynamicChildren?(Cr(Dr.dynamicChildren,Ii,Nr,qr,Fr,Ti,Xr),(Lr.key!=null||qr&&Lr===qr.subTree)&&traverseStaticChildren(Dr,Lr,!0)):gr(Dr,Lr,Nr,wi,qr,Fr,Ti,Xr,Si)},Mr=(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si)=>{Lr.slotScopeIds=Xr,Dr==null?Lr.shapeFlag&512?qr.ctx.activate(Lr,Nr,Wr,Ti,Si):Ur(Lr,Nr,Wr,qr,Fr,Ti,Si):$r(Dr,Lr,Si)},Ur=(Dr,Lr,Nr,Wr,qr,Fr,Ti)=>{const Xr=Dr.component=createComponentInstance(Dr,Wr,qr);if(isKeepAlive(Dr)&&(Xr.ctx.renderer=Qr),setupComponent(Xr),Xr.asyncDep){if(qr&&qr.registerDep(Xr,yr),!Dr.el){const Si=Xr.subTree=createVNode(Comment);cr(null,Si,Lr,Nr)}return}yr(Xr,Dr,Lr,Nr,qr,Fr,Ti)},$r=(Dr,Lr,Nr)=>{const Wr=Lr.component=Dr.component;if(shouldUpdateComponent(Dr,Lr,Nr))if(Wr.asyncDep&&!Wr.asyncResolved){xr(Wr,Lr,Nr);return}else Wr.next=Lr,invalidateJob(Wr.update),Wr.update();else Lr.el=Dr.el,Wr.vnode=Lr},yr=(Dr,Lr,Nr,Wr,qr,Fr,Ti)=>{const Xr=()=>{if(Dr.isMounted){let{next:wi,bu:ki,u:Ii,parent:Pi,vnode:Di}=Dr,Oi=wi,Wi;toggleRecurse(Dr,!1),wi?(wi.el=Di.el,xr(Dr,wi,Ti)):wi=Di,ki&&invokeArrayFns(ki),(Wi=wi.props&&wi.props.onVnodeBeforeUpdate)&&invokeVNodeHook(Wi,Pi,wi,Di),toggleRecurse(Dr,!0);const Zi=renderComponentRoot(Dr),en=Dr.subTree;Dr.subTree=Zi,sr(en,Zi,ir(en.el),Vr(en),Dr,qr,Fr),wi.el=Zi.el,Oi===null&&updateHOCHostEl(Dr,Zi.el),Ii&&queuePostRenderEffect(Ii,qr),(Wi=wi.props&&wi.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(Wi,Pi,wi,Di),qr)}else{let wi;const{el:ki,props:Ii}=Lr,{bm:Pi,m:Di,parent:Oi}=Dr,Wi=isAsyncWrapper(Lr);if(toggleRecurse(Dr,!1),Pi&&invokeArrayFns(Pi),!Wi&&(wi=Ii&&Ii.onVnodeBeforeMount)&&invokeVNodeHook(wi,Oi,Lr),toggleRecurse(Dr,!0),ki&&Mi){const Zi=()=>{Dr.subTree=renderComponentRoot(Dr),Mi(ki,Dr.subTree,Dr,qr,null)};Wi?Lr.type.__asyncLoader().then(()=>!Dr.isUnmounted&&Zi()):Zi()}else{const Zi=Dr.subTree=renderComponentRoot(Dr);sr(null,Zi,Nr,Wr,Dr,qr,Fr),Lr.el=Zi.el}if(Di&&queuePostRenderEffect(Di,qr),!Wi&&(wi=Ii&&Ii.onVnodeMounted)){const Zi=Lr;queuePostRenderEffect(()=>invokeVNodeHook(wi,Oi,Zi),qr)}(Lr.shapeFlag&256||Oi&&isAsyncWrapper(Oi.vnode)&&Oi.vnode.shapeFlag&256)&&Dr.a&&queuePostRenderEffect(Dr.a,qr),Dr.isMounted=!0,Lr=Nr=Wr=null}},Si=Dr.effect=new ReactiveEffect(Xr,()=>queueJob(jr),Dr.scope),jr=Dr.update=()=>Si.run();jr.id=Dr.uid,toggleRecurse(Dr,!0),jr()},xr=(Dr,Lr,Nr)=>{Lr.component=Dr;const Wr=Dr.vnode.props;Dr.vnode=Lr,Dr.next=null,updateProps(Dr,Lr.props,Wr,Nr),updateSlots(Dr,Lr.children,Nr),pauseTracking(),flushPreFlushCbs(),resetTracking()},gr=(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si=!1)=>{const jr=Dr&&Dr.children,wi=Dr?Dr.shapeFlag:0,ki=Lr.children,{patchFlag:Ii,shapeFlag:Pi}=Lr;if(Ii>0){if(Ii&128){wr(jr,ki,Nr,Wr,qr,Fr,Ti,Xr,Si);return}else if(Ii&256){_r(jr,ki,Nr,Wr,qr,Fr,Ti,Xr,Si);return}}Pi&8?(wi&16&&di(jr,qr,Fr),ki!==jr&&tr(Nr,ki)):wi&16?Pi&16?wr(jr,ki,Nr,Wr,qr,Fr,Ti,Xr,Si):di(jr,qr,Fr,!0):(wi&8&&tr(Nr,""),Pi&16&&vr(ki,Nr,Wr,qr,Fr,Ti,Xr,Si))},_r=(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si)=>{Dr=Dr||EMPTY_ARR,Lr=Lr||EMPTY_ARR;const jr=Dr.length,wi=Lr.length,ki=Math.min(jr,wi);let Ii;for(Ii=0;Ii<ki;Ii++){const Pi=Lr[Ii]=Si?cloneIfMounted(Lr[Ii]):normalizeVNode(Lr[Ii]);sr(Dr[Ii],Pi,Nr,null,qr,Fr,Ti,Xr,Si)}jr>wi?di(Dr,qr,Fr,!0,!1,ki):vr(Lr,Nr,Wr,qr,Fr,Ti,Xr,Si,ki)},wr=(Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si)=>{let jr=0;const wi=Lr.length;let ki=Dr.length-1,Ii=wi-1;for(;jr<=ki&&jr<=Ii;){const Pi=Dr[jr],Di=Lr[jr]=Si?cloneIfMounted(Lr[jr]):normalizeVNode(Lr[jr]);if(isSameVNodeType(Pi,Di))sr(Pi,Di,Nr,null,qr,Fr,Ti,Xr,Si);else break;jr++}for(;jr<=ki&&jr<=Ii;){const Pi=Dr[ki],Di=Lr[Ii]=Si?cloneIfMounted(Lr[Ii]):normalizeVNode(Lr[Ii]);if(isSameVNodeType(Pi,Di))sr(Pi,Di,Nr,null,qr,Fr,Ti,Xr,Si);else break;ki--,Ii--}if(jr>ki){if(jr<=Ii){const Pi=Ii+1,Di=Pi<wi?Lr[Pi].el:Wr;for(;jr<=Ii;)sr(null,Lr[jr]=Si?cloneIfMounted(Lr[jr]):normalizeVNode(Lr[jr]),Nr,Di,qr,Fr,Ti,Xr,Si),jr++}}else if(jr>Ii)for(;jr<=ki;)Hr(Dr[jr],qr,Fr,!0),jr++;else{const Pi=jr,Di=jr,Oi=new Map;for(jr=Di;jr<=Ii;jr++){const on=Lr[jr]=Si?cloneIfMounted(Lr[jr]):normalizeVNode(Lr[jr]);on.key!=null&&Oi.set(on.key,jr)}let Wi,Zi=0;const en=Ii-Di+1;let un=!1,fn=0;const an=new Array(en);for(jr=0;jr<en;jr++)an[jr]=0;for(jr=Pi;jr<=ki;jr++){const on=Dr[jr];if(Zi>=en){Hr(on,qr,Fr,!0);continue}let Pn;if(on.key!=null)Pn=Oi.get(on.key);else for(Wi=Di;Wi<=Ii;Wi++)if(an[Wi-Di]===0&&isSameVNodeType(on,Lr[Wi])){Pn=Wi;break}Pn===void 0?Hr(on,qr,Fr,!0):(an[Pn-Di]=jr+1,Pn>=fn?fn=Pn:un=!0,sr(on,Lr[Pn],Nr,null,qr,Fr,Ti,Xr,Si),Zi++)}const mn=un?getSequence(an):EMPTY_ARR;for(Wi=mn.length-1,jr=en-1;jr>=0;jr--){const on=Di+jr,Pn=Lr[on],Un=on+1<wi?Lr[on+1].el:Wr;an[jr]===0?sr(null,Pn,Nr,Un,qr,Fr,Ti,Xr,Si):un&&(Wi<0||jr!==mn[Wi]?Ir(Pn,Nr,Un,2):Wi--)}}},Ir=(Dr,Lr,Nr,Wr,qr=null)=>{const{el:Fr,type:Ti,transition:Xr,children:Si,shapeFlag:jr}=Dr;if(jr&6){Ir(Dr.component.subTree,Lr,Nr,Wr);return}if(jr&128){Dr.suspense.move(Lr,Nr,Wr);return}if(jr&64){Ti.move(Dr,Lr,Nr,Qr);return}if(Ti===Fragment$1){s(Fr,Lr,Nr);for(let ki=0;ki<Si.length;ki++)Ir(Si[ki],Lr,Nr,Wr);s(Dr.anchor,Lr,Nr);return}if(Ti===Static){or(Dr,Lr,Nr);return}if(Wr!==2&&jr&1&&Xr)if(Wr===0)Xr.beforeEnter(Fr),s(Fr,Lr,Nr),queuePostRenderEffect(()=>Xr.enter(Fr),qr);else{const{leave:ki,delayLeave:Ii,afterLeave:Pi}=Xr,Di=()=>s(Fr,Lr,Nr),Oi=()=>{ki(Fr,()=>{Di(),Pi&&Pi()})};Ii?Ii(Fr,Di,Oi):Oi()}else s(Fr,Lr,Nr)},Hr=(Dr,Lr,Nr,Wr=!1,qr=!1)=>{const{type:Fr,props:Ti,ref:Xr,children:Si,dynamicChildren:jr,shapeFlag:wi,patchFlag:ki,dirs:Ii}=Dr;if(Xr!=null&&setRef(Xr,null,Nr,Dr,!0),wi&256){Lr.ctx.deactivate(Dr);return}const Pi=wi&1&&Ii,Di=!isAsyncWrapper(Dr);let Oi;if(Di&&(Oi=Ti&&Ti.onVnodeBeforeUnmount)&&invokeVNodeHook(Oi,Lr,Dr),wi&6)xi(Dr.component,Nr,Wr);else{if(wi&128){Dr.suspense.unmount(Nr,Wr);return}Pi&&invokeDirectiveHook(Dr,null,Lr,"beforeUnmount"),wi&64?Dr.type.remove(Dr,Lr,Nr,qr,Qr,Wr):jr&&(Fr!==Fragment$1||ki>0&&ki&64)?di(jr,Lr,Nr,!1,!0):(Fr===Fragment$1&&ki&384||!qr&&wi&16)&&di(Si,Lr,Nr),Wr&&Yr(Dr)}(Di&&(Oi=Ti&&Ti.onVnodeUnmounted)||Pi)&&queuePostRenderEffect(()=>{Oi&&invokeVNodeHook(Oi,Lr,Dr),Pi&&invokeDirectiveHook(Dr,null,Lr,"unmounted")},Nr)},Yr=Dr=>{const{type:Lr,el:Nr,anchor:Wr,transition:qr}=Dr;if(Lr===Fragment$1){Jr(Nr,Wr);return}if(Lr===Static){dr(Dr);return}const Fr=()=>{o(Nr),qr&&!qr.persisted&&qr.afterLeave&&qr.afterLeave()};if(Dr.shapeFlag&1&&qr&&!qr.persisted){const{leave:Ti,delayLeave:Xr}=qr,Si=()=>Ti(Nr,Fr);Xr?Xr(Dr.el,Fr,Si):Si()}else Fr()},Jr=(Dr,Lr)=>{let Nr;for(;Dr!==Lr;)Nr=rr(Dr),o(Dr),Dr=Nr;o(Lr)},xi=(Dr,Lr,Nr)=>{const{bum:Wr,scope:qr,update:Fr,subTree:Ti,um:Xr}=Dr;Wr&&invokeArrayFns(Wr),qr.stop(),Fr&&(Fr.active=!1,Hr(Ti,Dr,Lr,Nr)),Xr&&queuePostRenderEffect(Xr,Lr),queuePostRenderEffect(()=>{Dr.isUnmounted=!0},Lr),Lr&&Lr.pendingBranch&&!Lr.isUnmounted&&Dr.asyncDep&&!Dr.asyncResolved&&Dr.suspenseId===Lr.pendingId&&(Lr.deps--,Lr.deps===0&&Lr.resolve())},di=(Dr,Lr,Nr,Wr=!1,qr=!1,Fr=0)=>{for(let Ti=Fr;Ti<Dr.length;Ti++)Hr(Dr[Ti],Lr,Nr,Wr,qr)},Vr=Dr=>Dr.shapeFlag&6?Vr(Dr.component.subTree):Dr.shapeFlag&128?Dr.suspense.next():rr(Dr.anchor||Dr.el),Zr=(Dr,Lr,Nr)=>{Dr==null?Lr._vnode&&Hr(Lr._vnode,null,null,!0):sr(Lr._vnode||null,Dr,Lr,null,null,null,Nr),flushPreFlushCbs(),flushPostFlushCbs(),Lr._vnode=Dr},Qr={p:sr,um:Hr,m:Ir,r:Yr,mt:Ur,mc:vr,pc:gr,pbc:Cr,n:Vr,o:t};let Ai,Mi;return e&&([Ai,Mi]=e(Qr)),{render:Zr,hydrate:Ai,createApp:createAppAPI(Zr,Ai)}}function toggleRecurse({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function needTransition(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function traverseStaticChildren(t,e,r=!1){const s=t.children,o=e.children;if(isArray$4(s)&&isArray$4(o))for(let d=0;d<s.length;d++){const L=s[d];let ge=o[d];ge.shapeFlag&1&&!ge.dynamicChildren&&((ge.patchFlag<=0||ge.patchFlag===32)&&(ge=o[d]=cloneIfMounted(o[d]),ge.el=L.el),r||traverseStaticChildren(L,ge)),ge.type===Text$1&&(ge.el=L.el)}}function getSequence(t){const e=t.slice(),r=[0];let s,o,d,L,ge;const Mt=t.length;for(s=0;s<Mt;s++){const er=t[s];if(er!==0){if(o=r[r.length-1],t[o]<er){e[s]=o,r.push(s);continue}for(d=0,L=r.length-1;d<L;)ge=d+L>>1,t[r[ge]]<er?d=ge+1:L=ge;er<t[r[d]]&&(d>0&&(e[s]=r[d-1]),r[d]=s)}}for(d=r.length,L=r[d-1];d-- >0;)r[d]=L,L=e[L];return r}const isTeleport=t=>t.__isTeleport,Fragment$1=Symbol.for("v-fgt"),Text$1=Symbol.for("v-txt"),Comment=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(t=!1){blockStack.push(currentBlock=t?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(t){isBlockTreeEnabled+=t}function setupBlock(t){return t.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(t),t}function createElementBlock(t,e,r,s,o,d){return setupBlock(createBaseVNode(t,e,r,s,o,d,!0))}function createBlock(t,e,r,s,o){return setupBlock(createVNode(t,e,r,s,o,!0))}function isVNode(t){return t?t.__v_isVNode===!0:!1}function isSameVNodeType(t,e){return t.type===e.type&&t.key===e.key}const InternalObjectKey="__vInternal",normalizeKey=({key:t})=>t??null,normalizeRef=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?isString$1(t)||isRef(t)||isFunction$1(t)?{i:currentRenderingInstance,r:t,k:e,f:!!r}:t:null);function createBaseVNode(t,e=null,r=null,s=0,o=null,d=t===Fragment$1?0:1,L=!1,ge=!1){const Mt={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&normalizeKey(e),ref:e&&normalizeRef(e),scopeId:currentScopeId,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return ge?(normalizeChildren(Mt,r),d&128&&t.normalize(Mt)):r&&(Mt.shapeFlag|=isString$1(r)?8:16),isBlockTreeEnabled>0&&!L&¤tBlock&&(Mt.patchFlag>0||d&6)&&Mt.patchFlag!==32&¤tBlock.push(Mt),Mt}const createVNode=_createVNode;function _createVNode(t,e=null,r=null,s=0,o=null,d=!1){if((!t||t===NULL_DYNAMIC_COMPONENT)&&(t=Comment),isVNode(t)){const ge=cloneVNode(t,e,!0);return r&&normalizeChildren(ge,r),isBlockTreeEnabled>0&&!d&¤tBlock&&(ge.shapeFlag&6?currentBlock[currentBlock.indexOf(t)]=ge:currentBlock.push(ge)),ge.patchFlag|=-2,ge}if(isClassComponent(t)&&(t=t.__vccOpts),e){e=guardReactiveProps(e);let{class:ge,style:Mt}=e;ge&&!isString$1(ge)&&(e.class=normalizeClass(ge)),isObject$3(Mt)&&(isProxy(Mt)&&!isArray$4(Mt)&&(Mt=extend({},Mt)),e.style=normalizeStyle(Mt))}const L=isString$1(t)?1:isSuspense(t)?128:isTeleport(t)?64:isObject$3(t)?4:isFunction$1(t)?2:0;return createBaseVNode(t,e,r,s,o,L,d,!0)}function guardReactiveProps(t){return t?isProxy(t)||InternalObjectKey in t?extend({},t):t:null}function cloneVNode(t,e,r=!1){const{props:s,ref:o,patchFlag:d,children:L}=t,ge=e?mergeProps(s||{},e):s;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:ge,key:ge&&normalizeKey(ge),ref:e&&e.ref?r&&o?isArray$4(o)?o.concat(normalizeRef(e)):[o,normalizeRef(e)]:normalizeRef(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:L,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Fragment$1?d===-1?16:d|16:d,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&cloneVNode(t.ssContent),ssFallback:t.ssFallback&&cloneVNode(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function createTextVNode(t=" ",e=0){return createVNode(Text$1,null,t,e)}function createStaticVNode(t,e){const r=createVNode(Static,null,t);return r.staticCount=e,r}function createCommentVNode(t="",e=!1){return e?(openBlock(),createBlock(Comment,null,t)):createVNode(Comment,null,t)}function normalizeVNode(t){return t==null||typeof t=="boolean"?createVNode(Comment):isArray$4(t)?createVNode(Fragment$1,null,t.slice()):typeof t=="object"?cloneIfMounted(t):createVNode(Text$1,null,String(t))}function cloneIfMounted(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:cloneVNode(t)}function normalizeChildren(t,e){let r=0;const{shapeFlag:s}=t;if(e==null)e=null;else if(isArray$4(e))r=16;else if(typeof e=="object")if(s&65){const o=e.default;o&&(o._c&&(o._d=!1),normalizeChildren(t,o()),o._c&&(o._d=!0));return}else{r=32;const o=e._;!o&&!(InternalObjectKey in e)?e._ctx=currentRenderingInstance:o===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else isFunction$1(e)?(e={default:e,_ctx:currentRenderingInstance},r=32):(e=String(e),s&64?(r=16,e=[createTextVNode(e)]):r=8);t.children=e,t.shapeFlag|=r}function mergeProps(...t){const e={};for(let r=0;r<t.length;r++){const s=t[r];for(const o in s)if(o==="class")e.class!==s.class&&(e.class=normalizeClass([e.class,s.class]));else if(o==="style")e.style=normalizeStyle([e.style,s.style]);else if(isOn(o)){const d=e[o],L=s[o];L&&d!==L&&!(isArray$4(d)&&d.includes(L))&&(e[o]=d?[].concat(d,L):L)}else o!==""&&(e[o]=s[o])}return e}function invokeVNodeHook(t,e,r,s=null){callWithAsyncErrorHandling(t,e,7,[r,s])}const emptyAppContext=createAppContext();let uid=0;function createComponentInstance(t,e,r){const s=t.type,o=(e?e.appContext:t.appContext)||emptyAppContext,d={uid:uid++,vnode:t,type:s,parent:e,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new EffectScope(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:normalizePropsOptions(s,o),emitsOptions:normalizeEmitsOptions(s,o),emit:null,emitted:null,propsDefaults:EMPTY_OBJ,inheritAttrs:s.inheritAttrs,ctx:EMPTY_OBJ,data:EMPTY_OBJ,props:EMPTY_OBJ,attrs:EMPTY_OBJ,slots:EMPTY_OBJ,refs:EMPTY_OBJ,setupState:EMPTY_OBJ,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return d.ctx={_:d},d.root=e?e.root:d,d.emit=emit.bind(null,d),t.ce&&t.ce(d),d}let currentInstance=null;const getCurrentInstance=()=>currentInstance||currentRenderingInstance;let internalSetCurrentInstance,globalCurrentInstanceSetters,settersKey="__VUE_INSTANCE_SETTERS__";(globalCurrentInstanceSetters=getGlobalThis()[settersKey])||(globalCurrentInstanceSetters=getGlobalThis()[settersKey]=[]),globalCurrentInstanceSetters.push(t=>currentInstance=t),internalSetCurrentInstance=t=>{globalCurrentInstanceSetters.length>1?globalCurrentInstanceSetters.forEach(e=>e(t)):globalCurrentInstanceSetters[0](t)};const setCurrentInstance=t=>{internalSetCurrentInstance(t),t.scope.on()},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(t){return t.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(t,e=!1){isInSSRComponentSetup=e;const{props:r,children:s}=t.vnode,o=isStatefulComponent(t);initProps(t,r,o,e),initSlots(t,s);const d=o?setupStatefulComponent(t,e):void 0;return isInSSRComponentSetup=!1,d}function setupStatefulComponent(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=markRaw(new Proxy(t.ctx,PublicInstanceProxyHandlers));const{setup:s}=r;if(s){const o=t.setupContext=s.length>1?createSetupContext(t):null;setCurrentInstance(t),pauseTracking();const d=callWithErrorHandling(s,t,0,[t.props,o]);if(resetTracking(),unsetCurrentInstance(),isPromise$1(d)){if(d.then(unsetCurrentInstance,unsetCurrentInstance),e)return d.then(L=>{handleSetupResult(t,L,e)}).catch(L=>{handleError$1(L,t,0)});t.asyncDep=d}else handleSetupResult(t,d,e)}else finishComponentSetup(t,e)}function handleSetupResult(t,e,r){isFunction$1(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:isObject$3(e)&&(t.setupState=proxyRefs(e)),finishComponentSetup(t,r)}let compile;function finishComponentSetup(t,e,r){const s=t.type;if(!t.render){if(!e&&compile&&!s.render){const o=s.template||resolveMergedOptions(t).template;if(o){const{isCustomElement:d,compilerOptions:L}=t.appContext.config,{delimiters:ge,compilerOptions:Mt}=s,er=extend(extend({isCustomElement:d,delimiters:ge},L),Mt);s.render=compile(o,er)}}t.render=s.render||NOOP}{setCurrentInstance(t),pauseTracking();try{applyOptions(t)}finally{resetTracking(),unsetCurrentInstance()}}}function getAttrsProxy(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(e,r){return track(t,"get","$attrs"),e[r]}}))}function createSetupContext(t){const e=r=>{t.exposed=r||{}};return{get attrs(){return getAttrsProxy(t)},slots:t.slots,emit:t.emit,expose:e}}function getExposeProxy(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(proxyRefs(markRaw(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in publicPropertiesMap)return publicPropertiesMap[r](t)},has(e,r){return r in e||r in publicPropertiesMap}}))}function getComponentName(t,e=!0){return isFunction$1(t)?t.displayName||t.name:t.name||e&&t.__name}function isClassComponent(t){return isFunction$1(t)&&"__vccOpts"in t}const computed=(t,e)=>computed$1(t,e,isInSSRComponentSetup);function h$4(t,e,r){const s=arguments.length;return s===2?isObject$3(e)&&!isArray$4(e)?isVNode(e)?createVNode(t,null,[e]):createVNode(t,e):createVNode(t,null,e):(s>3?r=Array.prototype.slice.call(arguments,2):s===3&&isVNode(r)&&(r=[r]),createVNode(t,e,r))}const ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey),version$7="3.3.8",svgNS="http://www.w3.org/2000/svg",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,s)=>{const o=e?doc.createElementNS(svgNS,t):doc.createElement(t,r?{is:r}:void 0);return t==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:t=>doc.createTextNode(t),createComment:t=>doc.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>doc.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,s,o,d){const L=r?r.previousSibling:e.lastChild;if(o&&(o===d||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),r),!(o===d||!(o=o.nextSibling)););else{templateContainer.innerHTML=s?`<svg>${t}</svg>`:t;const ge=templateContainer.content;if(s){const Mt=ge.firstChild;for(;Mt.firstChild;)ge.appendChild(Mt.firstChild);ge.removeChild(Mt)}e.insertBefore(ge,r)}return[L?L.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),Transition=(t,{slots:e})=>h$4(BaseTransition,resolveTransitionProps(t),e);Transition.displayName="Transition";const DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Transition.props=extend({},BaseTransitionPropsValidators,DOMTransitionPropsValidators);const callHook=(t,e=[])=>{isArray$4(t)?t.forEach(r=>r(...e)):t&&t(...e)},hasExplicitCallback=t=>t?isArray$4(t)?t.some(e=>e.length>1):t.length>1:!1;function resolveTransitionProps(t){const e={};for(const kr in t)kr in DOMTransitionPropsValidators||(e[kr]=t[kr]);if(t.css===!1)return e;const{name:r="v",type:s,duration:o,enterFromClass:d=`${r}-enter-from`,enterActiveClass:L=`${r}-enter-active`,enterToClass:ge=`${r}-enter-to`,appearFromClass:Mt=d,appearActiveClass:er=L,appearToClass:tr=ge,leaveFromClass:ir=`${r}-leave-from`,leaveActiveClass:rr=`${r}-leave-active`,leaveToClass:nr=`${r}-leave-to`}=t,ar=normalizeDuration(o),sr=ar&&ar[0],lr=ar&&ar[1],{onBeforeEnter:cr,onEnter:ur,onEnterCancelled:or,onLeave:dr,onLeaveCancelled:hr,onBeforeAppear:pr=cr,onAppear:mr=ur,onAppearCancelled:vr=or}=e,Er=(kr,Mr,Ur)=>{removeTransitionClass(kr,Mr?tr:ge),removeTransitionClass(kr,Mr?er:L),Ur&&Ur()},Cr=(kr,Mr)=>{kr._isLeaving=!1,removeTransitionClass(kr,ir),removeTransitionClass(kr,nr),removeTransitionClass(kr,rr),Mr&&Mr()},Pr=kr=>(Mr,Ur)=>{const $r=kr?mr:ur,yr=()=>Er(Mr,kr,Ur);callHook($r,[Mr,yr]),nextFrame(()=>{removeTransitionClass(Mr,kr?Mt:d),addTransitionClass(Mr,kr?tr:ge),hasExplicitCallback($r)||whenTransitionEnds(Mr,s,sr,yr)})};return extend(e,{onBeforeEnter(kr){callHook(cr,[kr]),addTransitionClass(kr,d),addTransitionClass(kr,L)},onBeforeAppear(kr){callHook(pr,[kr]),addTransitionClass(kr,Mt),addTransitionClass(kr,er)},onEnter:Pr(!1),onAppear:Pr(!0),onLeave(kr,Mr){kr._isLeaving=!0;const Ur=()=>Cr(kr,Mr);addTransitionClass(kr,ir),forceReflow(),addTransitionClass(kr,rr),nextFrame(()=>{kr._isLeaving&&(removeTransitionClass(kr,ir),addTransitionClass(kr,nr),hasExplicitCallback(dr)||whenTransitionEnds(kr,s,lr,Ur))}),callHook(dr,[kr,Ur])},onEnterCancelled(kr){Er(kr,!1),callHook(or,[kr])},onAppearCancelled(kr){Er(kr,!0),callHook(vr,[kr])},onLeaveCancelled(kr){Cr(kr),callHook(hr,[kr])}})}function normalizeDuration(t){if(t==null)return null;if(isObject$3(t))return[NumberOf(t.enter),NumberOf(t.leave)];{const e=NumberOf(t);return[e,e]}}function NumberOf(t){return toNumber(t)}function addTransitionClass(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.add(r)),(t[vtcKey]||(t[vtcKey]=new Set)).add(e)}function removeTransitionClass(t,e){e.split(/\s+/).forEach(s=>s&&t.classList.remove(s));const r=t[vtcKey];r&&(r.delete(e),r.size||(t[vtcKey]=void 0))}function nextFrame(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let endId=0;function whenTransitionEnds(t,e,r,s){const o=t._endId=++endId,d=()=>{o===t._endId&&s()};if(r)return setTimeout(d,r);const{type:L,timeout:ge,propCount:Mt}=getTransitionInfo(t,e);if(!L)return s();const er=L+"end";let tr=0;const ir=()=>{t.removeEventListener(er,rr),d()},rr=nr=>{nr.target===t&&++tr>=Mt&&ir()};setTimeout(()=>{tr<Mt&&ir()},ge+1),t.addEventListener(er,rr)}function getTransitionInfo(t,e){const r=window.getComputedStyle(t),s=ar=>(r[ar]||"").split(", "),o=s(`${TRANSITION}Delay`),d=s(`${TRANSITION}Duration`),L=getTimeout(o,d),ge=s(`${ANIMATION}Delay`),Mt=s(`${ANIMATION}Duration`),er=getTimeout(ge,Mt);let tr=null,ir=0,rr=0;e===TRANSITION?L>0&&(tr=TRANSITION,ir=L,rr=d.length):e===ANIMATION?er>0&&(tr=ANIMATION,ir=er,rr=Mt.length):(ir=Math.max(L,er),tr=ir>0?L>er?TRANSITION:ANIMATION:null,rr=tr?tr===TRANSITION?d.length:Mt.length:0);const nr=tr===TRANSITION&&/\b(transform|all)(,|$)/.test(s(`${TRANSITION}Property`).toString());return{type:tr,timeout:ir,propCount:rr,hasTransform:nr}}function getTimeout(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((r,s)=>toMs(r)+toMs(t[s])))}function toMs(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}function patchClass(t,e,r){const s=t[vtcKey];s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}const vShowOldKey=Symbol("_vod"),vShow={beforeMount(t,{value:e},{transition:r}){t[vShowOldKey]=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):setDisplay(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:s}){!e!=!r&&(s?e?(s.beforeEnter(t),setDisplay(t,!0),s.enter(t)):s.leave(t,()=>{setDisplay(t,!1)}):setDisplay(t,e))},beforeUnmount(t,{value:e}){setDisplay(t,e)}};function setDisplay(t,e){t.style.display=e?t[vShowOldKey]:"none"}function patchStyle(t,e,r){const s=t.style,o=isString$1(r);if(r&&!o){if(e&&!isString$1(e))for(const d in e)r[d]==null&&setStyle(s,d,"");for(const d in r)setStyle(s,d,r[d])}else{const d=s.display;o?e!==r&&(s.cssText=r):e&&t.removeAttribute("style"),vShowOldKey in t&&(s.display=d)}}const importantRE=/\s*!important$/;function setStyle(t,e,r){if(isArray$4(r))r.forEach(s=>setStyle(t,e,s));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const s=autoPrefix(t,e);importantRE.test(r)?t.setProperty(hyphenate(s),r.replace(importantRE,""),"important"):t[s]=r}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(t,e){const r=prefixCache[e];if(r)return r;let s=camelize(e);if(s!=="filter"&&s in t)return prefixCache[e]=s;s=capitalize(s);for(let o=0;o<prefixes.length;o++){const d=prefixes[o]+s;if(d in t)return prefixCache[e]=d}return e}const xlinkNS="http://www.w3.org/1999/xlink";function patchAttr(t,e,r,s,o){if(s&&e.startsWith("xlink:"))r==null?t.removeAttributeNS(xlinkNS,e.slice(6,e.length)):t.setAttributeNS(xlinkNS,e,r);else{const d=isSpecialBooleanAttr(e);r==null||d&&!includeBooleanAttr(r)?t.removeAttribute(e):t.setAttribute(e,d?"":r)}}function patchDOMProp(t,e,r,s,o,d,L){if(e==="innerHTML"||e==="textContent"){s&&L(s,o,d),t[e]=r??"";return}const ge=t.tagName;if(e==="value"&&ge!=="PROGRESS"&&!ge.includes("-")){t._value=r;const er=ge==="OPTION"?t.getAttribute("value"):t.value,tr=r??"";er!==tr&&(t.value=tr),r==null&&t.removeAttribute(e);return}let Mt=!1;if(r===""||r==null){const er=typeof t[e];er==="boolean"?r=includeBooleanAttr(r):r==null&&er==="string"?(r="",Mt=!0):er==="number"&&(r=0,Mt=!0)}try{t[e]=r}catch{}Mt&&t.removeAttribute(e)}function addEventListener(t,e,r,s){t.addEventListener(e,r,s)}function removeEventListener(t,e,r,s){t.removeEventListener(e,r,s)}const veiKey=Symbol("_vei");function patchEvent(t,e,r,s,o=null){const d=t[veiKey]||(t[veiKey]={}),L=d[e];if(s&&L)L.value=s;else{const[ge,Mt]=parseName(e);if(s){const er=d[e]=createInvoker(s,o);addEventListener(t,ge,er,Mt)}else L&&(removeEventListener(t,ge,L,Mt),d[e]=void 0)}}const optionsModifierRE=/(?:Once|Passive|Capture)$/;function parseName(t){let e;if(optionsModifierRE.test(t)){e={};let s;for(;s=t.match(optionsModifierRE);)t=t.slice(0,t.length-s[0].length),e[s[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):hyphenate(t.slice(2)),e]}let cachedNow=0;const p$1=Promise.resolve(),getNow=()=>cachedNow||(p$1.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(t,e){const r=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=r.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(s,r.value),e,5,[s])};return r.value=t,r.attached=getNow(),r}function patchStopImmediatePropagation(t,e){if(isArray$4(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(s=>o=>!o._stopped&&s&&s(o))}else return e}const nativeOnRE=/^on[a-z]/,patchProp=(t,e,r,s,o=!1,d,L,ge,Mt)=>{e==="class"?patchClass(t,s,o):e==="style"?patchStyle(t,r,s):isOn(e)?isModelListener(e)||patchEvent(t,e,r,s,L):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):shouldSetAsProp(t,e,s,o))?patchDOMProp(t,e,s,d,L,ge,Mt):(e==="true-value"?t._trueValue=s:e==="false-value"&&(t._falseValue=s),patchAttr(t,e,s,o))};function shouldSetAsProp(t,e,r,s){return s?!!(e==="innerHTML"||e==="textContent"||e in t&&nativeOnRE.test(e)&&isFunction$1(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||nativeOnRE.test(e)&&isString$1(r)?!1:e in t}const getModelAssigner=t=>{const e=t.props["onUpdate:modelValue"]||!1;return isArray$4(e)?r=>invokeArrayFns(e,r):e};function onCompositionStart(t){t.target.composing=!0}function onCompositionEnd(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const assignKey=Symbol("_assign"),vModelText={created(t,{modifiers:{lazy:e,trim:r,number:s}},o){t[assignKey]=getModelAssigner(o);const d=s||o.props&&o.props.type==="number";addEventListener(t,e?"change":"input",L=>{if(L.target.composing)return;let ge=t.value;r&&(ge=ge.trim()),d&&(ge=looseToNumber(ge)),t[assignKey](ge)}),r&&addEventListener(t,"change",()=>{t.value=t.value.trim()}),e||(addEventListener(t,"compositionstart",onCompositionStart),addEventListener(t,"compositionend",onCompositionEnd),addEventListener(t,"change",onCompositionEnd))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,modifiers:{lazy:r,trim:s,number:o}},d){if(t[assignKey]=getModelAssigner(d),t.composing||document.activeElement===t&&t.type!=="range"&&(r||s&&t.value.trim()===e||(o||t.type==="number")&&looseToNumber(t.value)===e))return;const L=e??"";t.value!==L&&(t.value=L)}},vModelCheckbox={deep:!0,created(t,e,r){t[assignKey]=getModelAssigner(r),addEventListener(t,"change",()=>{const s=t._modelValue,o=getValue$1(t),d=t.checked,L=t[assignKey];if(isArray$4(s)){const ge=looseIndexOf(s,o),Mt=ge!==-1;if(d&&!Mt)L(s.concat(o));else if(!d&&Mt){const er=[...s];er.splice(ge,1),L(er)}}else if(isSet$2(s)){const ge=new Set(s);d?ge.add(o):ge.delete(o),L(ge)}else L(getCheckboxValue(t,d))})},mounted:setChecked,beforeUpdate(t,e,r){t[assignKey]=getModelAssigner(r),setChecked(t,e,r)}};function setChecked(t,{value:e,oldValue:r},s){t._modelValue=e,isArray$4(e)?t.checked=looseIndexOf(e,s.props.value)>-1:isSet$2(e)?t.checked=e.has(s.props.value):e!==r&&(t.checked=looseEqual(e,getCheckboxValue(t,!0)))}const vModelSelect={deep:!0,created(t,{value:e,modifiers:{number:r}},s){const o=isSet$2(e);addEventListener(t,"change",()=>{const d=Array.prototype.filter.call(t.options,L=>L.selected).map(L=>r?looseToNumber(getValue$1(L)):getValue$1(L));t[assignKey](t.multiple?o?new Set(d):d:d[0])}),t[assignKey]=getModelAssigner(s)},mounted(t,{value:e}){setSelected(t,e)},beforeUpdate(t,e,r){t[assignKey]=getModelAssigner(r)},updated(t,{value:e}){setSelected(t,e)}};function setSelected(t,e){const r=t.multiple;if(!(r&&!isArray$4(e)&&!isSet$2(e))){for(let s=0,o=t.options.length;s<o;s++){const d=t.options[s],L=getValue$1(d);if(r)isArray$4(e)?d.selected=looseIndexOf(e,L)>-1:d.selected=e.has(L);else if(looseEqual(getValue$1(d),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!r&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function getValue$1(t){return"_value"in t?t._value:t.value}function getCheckboxValue(t,e){const r=e?"_trueValue":"_falseValue";return r in t?t[r]:e}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>systemModifiers.some(r=>t[`${r}Key`]&&!e.includes(r))},withModifiers=(t,e)=>(r,...s)=>{for(let o=0;o<e.length;o++){const d=modifierGuards[e[o]];if(d&&d(r,e))return}return t(r,...s)},keyNames={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},withKeys=(t,e)=>r=>{if(!("key"in r))return;const s=hyphenate(r.key);if(e.some(o=>o===s||keyNames[o]===s))return t(r)},rendererOptions=extend({patchProp},nodeOps);let renderer,enabledHydration=!1;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}function ensureHydrationRenderer(){return renderer=enabledHydration?renderer:createHydrationRenderer(rendererOptions),enabledHydration=!0,renderer}const createApp=(...t)=>{const e=ensureRenderer().createApp(...t),{mount:r}=e;return e.mount=s=>{const o=normalizeContainer(s);if(!o)return;const d=e._component;!isFunction$1(d)&&!d.render&&!d.template&&(d.template=o.innerHTML),o.innerHTML="";const L=r(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),L},e},createSSRApp=(...t)=>{const e=ensureHydrationRenderer().createApp(...t),{mount:r}=e;return e.mount=s=>{const o=normalizeContainer(s);if(o)return r(o,!0,o instanceof SVGElement)},e};function normalizeContainer(t){return isString$1(t)?document.querySelector(t):t}const suspectProtoRx=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,suspectConstructorRx=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,JsonSigRx=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function jsonParseTransform(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){warnKeyDropped(t);return}return e}function warnKeyDropped(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function destr(t,e={}){if(typeof t!="string")return t;const r=t.trim();if(t[0]==='"'&&t.endsWith('"')&&!t.includes("\\"))return r.slice(1,-1);if(r.length<=9){const s=r.toLowerCase();if(s==="true")return!0;
2if(s==="false")return!1;if(s==="undefined")return;if(s==="null")return null;if(s==="nan")return Number.NaN;if(s==="infinity")return Number.POSITIVE_INFINITY;if(s==="-infinity")return Number.NEGATIVE_INFINITY}if(!JsonSigRx.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(suspectProtoRx.test(t)||suspectConstructorRx.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,jsonParseTransform)}return JSON.parse(t)}catch(s){if(e.strict)throw s;return t}}const HASH_RE$1=/#/g,AMPERSAND_RE$1=/&/g,SLASH_RE$1=/\//g,EQUAL_RE$1=/=/g,PLUS_RE$1=/\+/g,ENC_CARET_RE$1=/%5e/gi,ENC_BACKTICK_RE$1=/%60/gi,ENC_PIPE_RE$1=/%7c/gi,ENC_SPACE_RE$1=/%20/gi;function encode$2(t){return encodeURI(""+t).replace(ENC_PIPE_RE$1,"|")}function encodeQueryValue$1(t){return encode$2(typeof t=="string"?t:JSON.stringify(t)).replace(PLUS_RE$1,"%2B").replace(ENC_SPACE_RE$1,"+").replace(HASH_RE$1,"%23").replace(AMPERSAND_RE$1,"%26").replace(ENC_BACKTICK_RE$1,"`").replace(ENC_CARET_RE$1,"^").replace(SLASH_RE$1,"%2F")}function encodeQueryKey$1(t){return encodeQueryValue$1(t).replace(EQUAL_RE$1,"%3D")}function decode$2(t=""){try{return decodeURIComponent(""+t)}catch{return""+t}}function decodeQueryKey(t){return decode$2(t.replace(PLUS_RE$1," "))}function decodeQueryValue(t){return decode$2(t.replace(PLUS_RE$1," "))}function parseQuery$1(t=""){const e={};t[0]==="?"&&(t=t.slice(1));for(const r of t.split("&")){const s=r.match(/([^=]+)=?(.*)/)||[];if(s.length<2)continue;const o=decodeQueryKey(s[1]);if(o==="__proto__"||o==="constructor")continue;const d=decodeQueryValue(s[2]||"");e[o]===void 0?e[o]=d:Array.isArray(e[o])?e[o].push(d):e[o]=[e[o],d]}return e}function encodeQueryItem(t,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(r=>`${encodeQueryKey$1(t)}=${encodeQueryValue$1(r)}`).join("&"):`${encodeQueryKey$1(t)}=${encodeQueryValue$1(e)}`:encodeQueryKey$1(t)}function stringifyQuery$1(t){return Object.keys(t).filter(e=>t[e]!==void 0).map(e=>encodeQueryItem(e,t[e])).filter(Boolean).join("&")}const PROTOCOL_STRICT_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,PROTOCOL_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,PROTOCOL_RELATIVE_REGEX=/^([/\\]\s*){2,}[^/\\]/,PROTOCOL_SCRIPT_RE=/^[\s\0]*(blob|data|javascript|vbscript):$/i,TRAILING_SLASH_RE$1=/\/$|\/\?|\/#/,JOIN_LEADING_SLASH_RE=/^\.?\//;function hasProtocol(t,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?PROTOCOL_STRICT_REGEX.test(t):PROTOCOL_REGEX.test(t)||(e.acceptRelative?PROTOCOL_RELATIVE_REGEX.test(t):!1)}function isScriptProtocol(t){return!!t&&PROTOCOL_SCRIPT_RE.test(t)}function hasTrailingSlash(t="",e){return e?TRAILING_SLASH_RE$1.test(t):t.endsWith("/")}function withoutTrailingSlash(t="",e){if(!e)return(hasTrailingSlash(t)?t.slice(0,-1):t)||"/";if(!hasTrailingSlash(t,!0))return t||"/";let r=t,s="";const o=t.indexOf("#");o>=0&&(r=t.slice(0,o),s=t.slice(o));const[d,...L]=r.split("?");return((d.endsWith("/")?d.slice(0,-1):d)||"/")+(L.length>0?`?${L.join("?")}`:"")+s}function withTrailingSlash(t="",e){if(!e)return t.endsWith("/")?t:t+"/";if(hasTrailingSlash(t,!0))return t||"/";let r=t,s="";const o=t.indexOf("#");if(o>=0&&(r=t.slice(0,o),s=t.slice(o),!r))return s;const[d,...L]=r.split("?");return d+"/"+(L.length>0?`?${L.join("?")}`:"")+s}function hasLeadingSlash(t=""){return t.startsWith("/")}function withLeadingSlash(t=""){return hasLeadingSlash(t)?t:"/"+t}function withBase(t,e){if(isEmptyURL(e)||hasProtocol(t))return t;const r=withoutTrailingSlash(e);return t.startsWith(r)?t:joinURL(r,t)}function withoutBase(t,e){if(isEmptyURL(e))return t;const r=withoutTrailingSlash(e);if(!t.startsWith(r))return t;const s=t.slice(r.length);return s[0]==="/"?s:"/"+s}function withQuery(t,e){const r=parseURL$1(t),s={...parseQuery$1(r.search),...e};return r.search=stringifyQuery$1(s),stringifyParsedURL(r)}function isEmptyURL(t){return!t||t==="/"}function isNonEmptyURL(t){return t&&t!=="/"}function joinURL(t,...e){let r=t||"";for(const s of e.filter(o=>isNonEmptyURL(o)))if(r){const o=s.replace(JOIN_LEADING_SLASH_RE,"");r=withTrailingSlash(r)+o}else r=s;return r}function joinRelativeURL(...t){var L,ge,Mt,er;const e=/\/(?!\/)/,r=t.filter(Boolean),s=[];let o=0;for(const tr of r)if(!(!tr||tr==="/")){for(const[ir,rr]of tr.split(e).entries())if(!(!rr||rr===".")){if(rr===".."){if(s.length===1&&hasProtocol(s[0]))continue;s.pop(),o--;continue}if(ir===1&&((L=s[s.length-1])!=null&&L.endsWith(":/"))){s[s.length-1]+="/"+rr;continue}s.push(rr),o++}}let d=s.join("/");return o>=0?(ge=r[0])!=null&&ge.startsWith("/")&&!d.startsWith("/")?d="/"+d:(Mt=r[0])!=null&&Mt.startsWith("./")&&!d.startsWith("./")&&(d="./"+d):d="../".repeat(-1*o)+d,(er=r[r.length-1])!=null&&er.endsWith("/")&&!d.endsWith("/")&&(d+="/"),d}function isEqual$2(t,e,r={}){return r.trailingSlash||(t=withTrailingSlash(t),e=withTrailingSlash(e)),r.leadingSlash||(t=withLeadingSlash(t),e=withLeadingSlash(e)),r.encoding||(t=decode$2(t),e=decode$2(e)),t===e}const protocolRelative=Symbol.for("ufo:protocolRelative");function parseURL$1(t="",e){const r=t.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(r){const[,ir,rr=""]=r;return{protocol:ir.toLowerCase(),pathname:rr,href:ir+rr,auth:"",host:"",search:"",hash:""}}if(!hasProtocol(t,{acceptRelative:!0}))return e?parseURL$1(e+t):parsePath(t);const[,s="",o,d=""]=t.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,L="",ge=""]=d.match(/([^#/?]*)(.*)?/)||[],{pathname:Mt,search:er,hash:tr}=parsePath(ge.replace(/\/(?=[A-Za-z]:)/,""));return{protocol:s.toLowerCase(),auth:o?o.slice(0,Math.max(0,o.length-1)):"",host:L,pathname:Mt,search:er,hash:tr,[protocolRelative]:!s}}function parsePath(t=""){const[e="",r="",s=""]=(t.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:r,hash:s}}function stringifyParsedURL(t){const e=t.pathname||"",r=t.search?(t.search.startsWith("?")?""
2:"?")+t.search:"",s=t.hash||"",o=t.auth?t.auth+"@":"",d=t.host||"";return(t.protocol||t[protocolRelative]?(t.protocol||"")+"//":"")+o+d+e+r+s}let FetchError$1=class extends Error{constructor(e,r){super(e,r),this.name="FetchError",r!=null&&r.cause&&!this.cause&&(this.cause=r.cause)}};function createFetchError(t){var Mt,er,tr,ir,rr;const e=((Mt=t.error)==null?void 0:Mt.message)||((er=t.error)==null?void 0:er.toString())||"",r=((tr=t.request)==null?void 0:tr.method)||((ir=t.options)==null?void 0:ir.method)||"GET",s=((rr=t.request)==null?void 0:rr.url)||String(t.request)||"/",o=`[${r}] ${JSON.stringify(s)}`,d=t.response?`${t.response.status} ${t.response.statusText}`:"<no response>",L=`${o}: ${d}${e?` ${e}`:""}`,ge=new FetchError$1(L,t.error?{cause:t.error}:void 0);for(const nr of["request","options","response"])Object.defineProperty(ge,nr,{get(){return t[nr]}});for(const[nr,ar]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(ge,nr,{get(){return t.response&&t.response[ar]}});return ge}const payloadMethods=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function isPayloadMethod(t="GET"){return payloadMethods.has(t.toUpperCase())}function isJSONSerializable(t){if(t===void 0)return!1;const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(t)?!0:t.buffer?!1:t.constructor&&t.constructor.name==="Object"||typeof t.toJSON=="function"}const textTypes=new Set(["image/svg","application/xml","application/xhtml","application/html"]),JSON_RE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function detectResponseType(t=""){if(!t)return"json";const e=t.split(";").shift()||"";return JSON_RE.test(e)?"json":textTypes.has(e)||e.startsWith("text/")?"text":"blob"}function mergeFetchOptions(t,e,r=globalThis.Headers){const s={...e,...t};if(e!=null&&e.params&&(t!=null&&t.params)&&(s.params={...e==null?void 0:e.params,...t==null?void 0:t.params}),e!=null&&e.query&&(t!=null&&t.query)&&(s.query={...e==null?void 0:e.query,...t==null?void 0:t.query}),e!=null&&e.headers&&(t!=null&&t.headers)){s.headers=new r((e==null?void 0:e.headers)||{});for(const[o,d]of new r((t==null?void 0:t.headers)||{}))s.headers.set(o,d)}return s}const retryStatusCodes=new Set([408,409,425,429,500,502,503,504]),nullBodyResponses=new Set([101,204,205,304]);function createFetch(t={}){const{fetch:e=globalThis.fetch,Headers:r=globalThis.Headers,AbortController:s=globalThis.AbortController}=t;async function o(ge){const Mt=ge.error&&ge.error.name==="AbortError"&&!ge.options.timeout||!1;if(ge.options.retry!==!1&&!Mt){let tr;typeof ge.options.retry=="number"?tr=ge.options.retry:tr=isPayloadMethod(ge.options.method)?0:1;const ir=ge.response&&ge.response.status||500;if(tr>0&&(Array.isArray(ge.options.retryStatusCodes)?ge.options.retryStatusCodes.includes(ir):retryStatusCodes.has(ir))){const rr=ge.options.retryDelay||0;return rr>0&&await new Promise(nr=>setTimeout(nr,rr)),d(ge.request,{...ge.options,retry:tr-1})}}const er=createFetchError(ge);throw Error.captureStackTrace&&Error.captureStackTrace(er,d),er}const d=async function(Mt,er={}){var nr;const tr={request:Mt,options:mergeFetchOptions(er,t.defaults,r),response:void 0,error:void 0};tr.options.method=(nr=tr.options.method)==null?void 0:nr.toUpperCase(),tr.options.onRequest&&await tr.options.onRequest(tr),typeof tr.request=="string"&&(tr.options.baseURL&&(tr.request=withBase(tr.request,tr.options.baseURL)),(tr.options.query||tr.options.params)&&(tr.request=withQuery(tr.request,{...tr.options.params,...tr.options.query}))),tr.options.body&&isPayloadMethod(tr.options.method)&&(isJSONSerializable(tr.options.body)?(tr.options.body=typeof tr.options.body=="string"?tr.options.body:JSON.stringify(tr.options.body),tr.options.headers=new r(tr.options.headers||{}),tr.options.headers.has("content-type")||tr.options.headers.set("content-type","application/json"),tr.options.headers.has("accept")||tr.options.headers.set("accept","application/json")):("pipeTo"in tr.options.body&&typeof tr.options.body.pipeTo=="function"||typeof tr.options.body.pipe=="function")&&("duplex"in tr.options||(tr.options.duplex="half")));let ir;if(!tr.options.signal&&tr.options.timeout){const ar=new s;ir=setTimeout(()=>ar.abort(),tr.options.timeout),tr.options.signal=ar.signal}try{tr.response=await e(tr.request,tr.options)}catch(ar){return tr.error=ar,tr.options.onRequestError&&await tr.options.onRequestError(tr),await o(tr)}finally{ir&&clearTimeout(ir)}if(tr.response.body&&!nullBodyResponses.has(tr.response.status)&&tr.options.method!=="HEAD"){const ar=(tr.options.parseResponse?"json":tr.options.responseType)||detectResponseType(tr.response.headers.get("content-type")||"");switch(ar){case"json":{const sr=await tr.response.text(),lr=tr.options.parseResponse||destr;tr.response._data=lr(sr);break}case"stream":{tr.response._data=tr.response.body;break}default:tr.response._data=await tr.response[ar]()}}return tr.options.onResponse&&await tr.options.onResponse(tr),!tr.options.ignoreResponseError&&tr.response.status>=400&&tr.response.status<600?(tr.options.onResponseError&&await tr.options.onResponseError(tr),await o(tr)):tr.response},L=async function(Mt,er){return(await d(Mt,er))._data};return L.raw=d,L.native=(...ge)=>e(...ge),L.create=(ge={})=>createFetch({...t,defaults:{...t.defaults,...ge}}),L}const _globalThis$1=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),fetch$1=_globalThis$1.fetch||(()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!"))),Headers$1=_globalThis$1.Headers,AbortController$1=_globalThis$1.AbortController,ofetch=createFetch({fetch:fetch$1,Headers:Headers$1,AbortController:AbortController$1}),$fetch$1=ofetch,useRuntimeConfig$1=()=>{var t;return((t=window==null?void 0:window.__NUXT__)==null?void 0:t.config)||{}},appConfig=useRuntimeConfig$1().app,baseURL=()=>appConfig.baseURL,buildAssetsDir=()=>appConfig.buildAssetsDir,buildAssetsURL=(...t)=>joinRelativeURL(publicAssetsURL(),buildAssetsDir(),...t),publicAssetsURL=(...t)=>{const e=appConfig.cdnURL||appConfig.baseURL;return t.length?joinRelativeURL(e,...t):e};globalThis.__buildAssetsURL=buildAssetsURL,globalThis.__publicAssetsURL=publicAssetsURL;globalThis.$fetch||(globalThis.$fetch=$fetch$1.create({baseURL:baseURL()}));function flatHooks(t,e={},r){for(const s in t){const o=t[s],d=r?`${r}:${s}`:s;typeof o=="object"&&o!==null?flatHooks(o,e,d):typeof o=="function"&&(e[d]=o)}return e}const defaultTask={run:t=>t()},_createTask=()=>defaultTask,createTask=typeof console.createTask<"u"?console.createTask:_createTask;function serialTaskCaller(t,e){const r=e.shift(),s=createTask(r);return t.reduce((o,d)=>o.then(()=>s.run(()=>d(...e))),Promise.resolve())}function parallelTaskCaller(t,e){const r=e.shift(),s=createTask(r);return Promise.all(t.map(o=>s.run(()=>o(...e))))}function callEachWith(t,e){for(const r of[...t])r(e)}class Hookable{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,r,s={}){if(!e||typeof r!="function")return()=>{};const o=e;let d;for(;this._deprecatedHooks[e];)d=this._deprecatedHooks[e],e=d.to;if(d&&!s.allowDeprecated){let L=d.message;L||(L=`${o} hook has been deprecated`+(d.to?`, please use ${d.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(L)||(console.warn(L),this._deprecatedMessages.add(L))}if(!r.name)try{Object.defineProperty(r,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(r),()=>{r&&(this.removeHook(e,r),r=void 0)}}hookOnce(e,r){let s,o=(...d)=>(typeof s=="function"&&s(),s=void 0,o=void 0,r(...d));return s=this.hook(e,o),s}removeHook(e,r){if(this._hooks[e]){const s=this._hooks[e].indexOf(r);s!==-1&&this._hooks[e].splice(s,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,r){this._deprecatedHooks[e]=typeof r=="string"?{to:r}:r;const s=this._hooks[e]||[];delete this._hooks[e];for(const o of s)this.hook(e,o)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const r in e)this.deprecateHook(r,e[r])}
2addHooks(e){const r=flatHooks(e),s=Object.keys(r).map(o=>this.hook(o,r[o]));return()=>{for(const o of s.splice(0,s.length))o()}}removeHooks(e){const r=flatHooks(e);for(const s in r)this.removeHook(s,r[s])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...r){return r.unshift(e),this.callHookWith(serialTaskCaller,e,...r)}callHookParallel(e,...r){return r.unshift(e),this.callHookWith(parallelTaskCaller,e,...r)}callHookWith(e,r,...s){const o=this._before||this._after?{name:r,args:s,context:{}}:void 0;this._before&&callEachWith(this._before,o);const d=e(r in this._hooks?[...this._hooks[r]]:[],s);return d instanceof Promise?d.finally(()=>{this._after&&o&&callEachWith(this._after,o)}):(this._after&&o&&callEachWith(this._after,o),d)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const r=this._before.indexOf(e);r!==-1&&this._before.splice(r,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const r=this._after.indexOf(e);r!==-1&&this._after.splice(r,1)}}}}function createHooks(){return new Hookable}function createContext(t={}){let e,r=!1;const s=L=>{if(e&&e!==L)throw new Error("Context conflict")};let o;if(t.asyncContext){const L=t.AsyncLocalStorage||globalThis.AsyncLocalStorage;L?o=new L:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const d=()=>{if(o&&e===void 0){const L=o.getStore();if(L!==void 0)return L}return e};return{use:()=>{const L=d();if(L===void 0)throw new Error("Context is not available");return L},tryUse:()=>d(),set:(L,ge)=>{ge||s(L),e=L,r=!0},unset:()=>{e=void 0,r=!1},call:(L,ge)=>{s(L),e=L;try{return o?o.run(L,ge):ge()}finally{r||(e=void 0)}},async callAsync(L,ge){e=L;const Mt=()=>{e=L},er=()=>e===L?Mt:void 0;asyncHandlers.add(er);try{const tr=o?o.run(L,ge):ge();return r||(e=void 0),await tr}finally{asyncHandlers.delete(er)}}}}function createNamespace(t={}){const e={};return{get(r,s={}){return e[r]||(e[r]=createContext({...t,...s})),e[r],e[r]}}}const _globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},globalKey$2="__unctx__",defaultNamespace=_globalThis[globalKey$2]||(_globalThis[globalKey$2]=createNamespace()),getContext=(t,e={})=>defaultNamespace.get(t,e),asyncHandlersKey="__unctx_async_handlers__",asyncHandlers=_globalThis[asyncHandlersKey]||(_globalThis[asyncHandlersKey]=new Set);function executeAsync(t){const e=[];for(const o of asyncHandlers){const d=o();d&&e.push(d)}const r=()=>{for(const o of e)o()};let s=t();return s&&typeof s=="object"&&"catch"in s&&(s=s.catch(o=>{throw r(),o})),[s,r]}const nuxtAppCtx=getContext("nuxt-app",{asyncContext:!1}),NuxtPluginIndicator="__nuxt_plugin";function createNuxtApp(t){let e=0;const r={_scope:effectScope(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.11.2"},get vue(){return r.vueApp.version}},payload:reactive({data:{},state:{},once:new Set,_errors:{},...window.__NUXT__??{}}),static:{data:{}},runWithContext:o=>r._scope.run(()=>callWithNuxt(r,o)),isHydrating:!0,deferHydration(){if(!r.isHydrating)return()=>{};e++;let o=!1;return()=>{if(!o&&(o=!0,e--,e===0))return r.isHydrating=!1,r.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:{},_payloadRevivers:{},...t};r.hooks=createHooks(),r.hook=r.hooks.hook,r.callHook=r.hooks.callHook,r.provide=(o,d)=>{const L="$"+o;defineGetter(r,L,d),defineGetter(r.vueApp.config.globalProperties,L,d)},defineGetter(r.vueApp,"$nuxt",r),defineGetter(r.vueApp.config.globalProperties,"$nuxt",r);{window.addEventListener("nuxt.preloadError",d=>{r.callHook("app:chunkError",{error:d.payload})}),window.useNuxtApp=window.useNuxtApp||useNuxtApp;const o=r.hook("app:error",(...d)=>{console.error("[nuxt] error caught during app initialization",...d)});r.hook("app:mounted",o)}const s=r.payload.config;return r.provide("config",s),r}async function applyPlugin(t,e){if(e.hooks&&t.hooks.addHooks(e.hooks),typeof e=="function"){const{provide:r}=await t.runWithContext(()=>e(t))||{};if(r&&typeof r=="object")for(const s in r)t.provide(s,r[s])}}async function applyPlugins(t,e){const r=[],s=[],o=[],d=[];let L=0;async function ge(Mt){var tr;const er=((tr=Mt.dependsOn)==null?void 0:tr.filter(ir=>e.some(rr=>rr._name===ir)&&!r.includes(ir)))??[];if(er.length>0)s.push([new Set(er),Mt]);else{const ir=applyPlugin(t,Mt).then(async()=>{Mt._name&&(r.push(Mt._name),await Promise.all(s.map(async([rr,nr])=>{rr.has(Mt._name)&&(rr.delete(Mt._name),rr.size===0&&(L++,await ge(nr)))})))});Mt.parallel?o.push(ir.catch(rr=>d.push(rr))):await ir}}for(const Mt of e)await ge(Mt);if(await Promise.all(o),L)for(let Mt=0;Mt<L;Mt++)await Promise.all(o);if(d.length)throw d[0]}function defineNuxtPlugin(t){if(typeof t=="function")return t;const e=t._name||t.name;return delete t.name,Object.assign(t.setup||(()=>{}),t,{[NuxtPluginIndicator]:!0,_name:e})}function callWithNuxt(t,e,r){const s=()=>e();return nuxtAppCtx.set(t),t.vueApp.runWithContext(s)}function tryUseNuxtApp(){var e;let t;return hasInjectionContext()&&(t=(e=getCurrentInstance())==null?void 0:e.appContext.app.$nuxt),t=t||nuxtAppCtx.tryUse(),t||null}function useNuxtApp(){const t=tryUseNuxtApp();if(!t)throw new Error("[nuxt] instance unavailable");return t}function useRuntimeConfig(t){return useNuxtApp().$config}function defineGetter(t,e,r){Object.defineProperty(t,e,{get:()=>r})}const fieldContentRegExp=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function parse$3(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");const r={},o=(e||{}).decode||decode$1;let d=0;for(;d<t.length;){const L=t.indexOf("=",d);if(L===-1)break;let ge=t.indexOf(";",d);if(ge===-1)ge=t.length;else if(ge<L){d=t.lastIndexOf(";",L-1)+1;continue}const Mt=t.slice(d,L).trim();if(r[Mt]===void 0){let er=t.slice(L+1,ge).trim();er.codePointAt(0)===34&&(er=er.slice(1,-1)),r[Mt]=tryDecode(er,o)}d=ge+1}return r}function serialize(t,e,r){const s=r||{},o=s.encode||encode$1;if(typeof o!="function")throw new TypeError("option encode is invali
2d");if(!fieldContentRegExp.test(t))throw new TypeError("argument name is invalid");const d=o(e);if(d&&!fieldContentRegExp.test(d))throw new TypeError("argument val is invalid");let L=t+"="+d;if(s.maxAge!==void 0&&s.maxAge!==null){const ge=s.maxAge-0;if(Number.isNaN(ge)||!Number.isFinite(ge))throw new TypeError("option maxAge is invalid");L+="; Max-Age="+Math.floor(ge)}if(s.domain){if(!fieldContentRegExp.test(s.domain))throw new TypeError("option domain is invalid");L+="; Domain="+s.domain}if(s.path){if(!fieldContentRegExp.test(s.path))throw new TypeError("option path is invalid");L+="; Path="+s.path}if(s.expires){if(!isDate(s.expires)||Number.isNaN(s.expires.valueOf()))throw new TypeError("option expires is invalid");L+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(L+="; HttpOnly"),s.secure&&(L+="; Secure"),s.priority)switch(typeof s.priority=="string"?s.priority.toLowerCase():s.priority){case"low":{L+="; Priority=Low";break}case"medium":{L+="; Priority=Medium";break}case"high":{L+="; Priority=High";break}
2default:throw new TypeError("option priority is invalid")}if(s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:{L+="; SameSite=Strict";break}case"lax":{L+="; SameSite=Lax";break}case"strict":{L+="; SameSite=Strict";break}case"none":{L+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(L+="; Partitioned"),L}function isDate(t){return Object.prototype.toString.call(t)==="[object Date]"||t instanceof Date}function tryDecode(t,e){try{return e(t)}catch{return t}}function decode$1(t){return t.includes("%")?decodeURIComponent(t):t}function encode$1(t){return encodeURIComponent(t)}const defaults$1=Object.freeze({ignoreUnknown:!1,respectType:!1,respectFunctionNames:!1,respectFunctionProperties:!1,unorderedObjects:!0,unorderedArrays:!1,unorderedSets:!1,excludeKeys:void 0,excludeValues:void 0,replacer:void 0});function objectHash(t,e){e?e={...defaults$1,...e}:e=defaults$1;const r=createHasher(e);return r.dispatch(t),r.toString()}const defaultPrototypesKeys=Object.freeze(["prototype","__proto__","constructor"]);function createHasher(t){let e="",r=new Map;const s=o=>{e+=o};return{toString(){return e},getContext(){return r},dispatch(o){return t.replacer&&(o=t.replacer(o)),this[o===null?"null":typeof o](o)},object(o){if(o&&typeof o.toJSON=="function")return this.object(o.toJSON());const d=Object.prototype.toString.call(o);let L="";const ge=d.length;ge<10?L="unknown:["+d+"]":L=d.slice(8,ge-1),L=L.toLowerCase();let Mt=null;if((Mt=r.get(o))===void 0)r.set(o,r.size);else return this.dispatch("[CIRCULAR:"+Mt+"]");if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(o))return s("buffer:"),s(o.toString("utf8"));if(L!=="object"&&L!=="function"&&L!=="asyncfunction")this[L]?this[L](o):t.ignoreUnknown||this.unkown(o,L);else{let er=Object.keys(o);t.unorderedObjects&&(er=er.sort());let tr=[];t.respectType!==!1&&!isNativeFunction(o)&&(tr=defaultPrototypesKeys),t.excludeKeys&&(er=er.filter(rr=>!t.excludeKeys(rr)),tr=tr.filter(rr=>!t.excludeKeys(rr))),s("object:"+(er.length+tr.length)+":");const ir=rr=>{this.dispatch(rr),s(":"),t.excludeValues||this.dispatch(o[rr]),s(",")};for(const rr of er)ir(rr);for(const rr of tr)ir(rr)}},array(o,d){if(d=d===void 0?t.unorderedArrays!==!1:d,s("array:"+o.length+":"),!d||o.length<=1){for(const Mt of o)this.dispatch(Mt);return}const L=new Map,ge=o.map(Mt=>{const er=createHasher(t);er.dispatch(Mt);for(const[tr,ir]of er.getContext())L.set(tr,ir);return er.toString()});return r=L,ge.sort(),this.array(ge,!1)},date(o){return s("date:"+o.toJSON())},symbol(o){return s("symbol:"+o.toString())},unkown(o,d){if(s(d),!!o&&(s(":"),o&&typeof o.entries=="function"))return this.array(Array.from(o.entries()),!0)},error(o){return s("error:"+o.toString())},boolean(o){return s("bool:"+o)},string(o){s("string:"+o.length+":"),s(o)},function(o){s("fn:"),isNativeFunction(o)?this.dispatch("[native]"):this.dispatch(o.toString()),t.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(o.name)),t.respectFunctionProperties&&this.object(o)},number(o){return s("number:"+o)},xml(o){return s("xml:"+o.toString())},null(){return s("Null")},undefined(){return s("Undefined")},regexp(o){return s("regex:"+o.toString())},uint8array(o){return s("uint8array:"),this.dispatch(Array.prototype.slice.call(o))},uint8clampedarray(o){return s("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(o))},int8array(o){return s("int8array:"),this.dispatch(Array.prototype.slice.call(o))},uint16array(o){return s("uint16array:"),this.dispatch(Array.prototype.slice.call(o))},int16array(o){return s("int16array:"),this.dispatch(Array.prototype.slice.call(o))},uint32array(o){return s("uint32array:"),this.dispatch(Array.prototype.slice.call(o))},int32array(o){return s("int32array:"),this.dispatch(Array.prototype.slice.call(o))},float32array(o){return s("float32array:"),this.dispatch(Array.prototype.slice.call(o))},float64array(o){return s("float64array:"),this.dispatch(Array.prototype.slice.call(o))},arraybuffer(o){return s("arraybuffer:"),this.dispatch(new Uint8Array(o))},url(o){return s("url:"+o.toString())},map(o){s("map:");const d=[...o];return this.array(d,t.unorderedSets!==!1)},set(o){s("set:");const d=[...o];return this.array(d,t.unorderedSets!==!1)},file(o){return s("file:"),this.dispatch([o.name,o.size,o.type,o.lastModfied])},blob(){if(t.ignoreUnknown)return s("[blob]");throw new Error(`Hashing Blob objects is currently not supported 3Use "options.replacer" or "options.ignoreUnknown" 4`)},domwindow(){return s("domwindow")}
4,bigint(o){return s("bigint:"+o.toString())},process(){return s("process")},timer(){return s("timer")},pipe(){return s("pipe")},tcp(){return s("tcp")},udp(){return s("udp")},tty(){return s("tty")},statwatcher(){return s("statwatcher")},securecontext(){return s("securecontext")},connection(){return s("connection")},zlib(){return s("zlib")},context(){return s("context")},nodescript(){return s("nodescript")},httpparser(){return s("httpparser")},dataview(){return s("dataview")},signal(){return s("signal")},fsevent(){return s("fsevent")},tlswrap(){return s("tlswrap")}}}const nativeFunc="[native code] }",nativeFuncLength=nativeFunc.length;function isNativeFunction(t){return typeof t!="function"?!1:Function.prototype.toString.call(t).slice(-nativeFuncLength)===nativeFunc}class WordArray{constructor(e,r){e=this.words=e||[],this.sigBytes=r===void 0?e.length*4:r}toString(e){return(e||Hex$1).stringify(this)}concat(e){if(this.clamp(),this.sigBytes%4)for(let r=0;r<e.sigBytes;r++){const s=e.words[r>>>2]>>>24-r%4*8&255;this.words[this.sigBytes+r>>>2]|=s<<24-(this.sigBytes+r)%4*8}else for(let r=0;r<e.sigBytes;r+=4)this.words[this.sigBytes+r>>>2]=e.words[r>>>2];return this.sigBytes+=e.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new WordArray([...this.words])}}const Hex$1={stringify(t){const e=[];for(let r=0;r<t.sigBytes;r++){const s=t.words[r>>>2]>>>24-r%4*8&255;e.push((s>>>4).toString(16),(s&15).toString(16))}return e.join("")}},Base64={stringify(t){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=[];for(let s=0;s<t.sigBytes;s+=3){const o=t.words[s>>>2]>>>24-s%4*8&255,d=t.words[s+1>>>2]>>>
424-(s+1)%4*8&255,L=t.words[s+2>>>2]>>>24-(s+2)%4*8&255,ge=o<<16|d<<8|L;for(let Mt=0;Mt<4&&s*8+Mt*6<t.sigBytes*8;Mt++)r.push(e.charAt(ge>>>6*(3-Mt)&63))}return r.join("")}},Latin1={parse(t){const e=t.length,r=[];for(let s=0;s<e;s++)r[s>>>2]|=(t.charCodeAt(s)&255)<<24-s%4*8;return new WordArray(r,e)}},Utf8={parse(t){return Latin1.parse(unescape(encodeURIComponent(t)))}};class BufferedBlockAlgorithm{constructor(){this._data=new WordArray,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new WordArray,this._nDataBytes=0}_append(e){typeof e=="string"&&(e=Utf8.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_doProcessBlock(e,r){}_process(e){let r,s=this._data.sigBytes/(this.blockSize*4);e?s=Math.ceil(s):s=Math.max((s|0)-this._minBufferSize,0);const o=s*this.blockSize,d=Math.min(o*4,this._data.sigBytes);if(o){for(let L=0;L<o;L+=this.blockSize)this._doProcessBlock(this._data.words,L);r=this._data.words.splice(0,o),this._data.sigBytes-=d}return new WordArray(r,d)}}class Hasher extends BufferedBlockAlgorithm{update(e){return this._append(e),this._process(),this}finalize(e){e&&this._append(e)}}const H$2=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],K$2=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],W$3=[];class SHA256 extends Hasher{constructor(){super(...arguments),this._hash=new WordArray([...H$2])}reset(){super.reset(),this._hash=new WordArray([...H$2])}_doProcessBlock(e,r){const s=this._hash.words;let o=s[0],d=s[1],L=s[2],ge=s[3],Mt=s[4],er=s[5],tr=s[6],ir=s[7];for(let rr=0;rr<64;rr++){if(rr<16)W$3[rr]=e[r+rr]|0;else{const or=W$3[rr-15],dr=(or<<25|or>>>7)^(or<<14|or>>>18)^or>>>3,hr=W$3[rr-2],pr=(hr<<15|hr>>>17)^(hr<<13|hr>>>19)^hr>>>10;W$3[rr]=dr+W$3[rr-7]+pr+W$3[rr-16]}const nr=Mt&er^~Mt&tr,ar=o&d^o&L^d&L,sr=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),lr=(Mt<<26|Mt>>>6)^(Mt<<21|Mt>>>11)^(Mt<<7|Mt>>>25),cr=ir+lr+nr+K$2[rr]+W$3[rr],ur=sr+ar;ir=tr,tr=er,er=Mt,Mt=ge+cr|0,ge=L,L=d,d=o,o=cr+ur|0}s[0]=s[0]+o|0,s[1]=s[1]+d|0,s[2]=s[2]+L|0,s[3]=s[3]+ge|0,s[4]=s[4]+Mt|0,s[5]=s[5]+er|0,s[6]=s[6]+tr|0,s[7]=s[7]+ir|0}finalize(e){super.finalize(e);const r=this._nDataBytes*8,s=this._data.sigBytes*8;return this._data.words[s>>>5]|=128<<24-s%32,this._data.words[(s+64>>>9<<4)+14]=Math.floor(r/4294967296),this._data.words[(s+64>>>9<<4)+15]=r,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function sha256base64(t){return new SHA256().finalize(t).toString(Base64)}function hash$1(t,e={}){const r=typeof t=="string"?t:objectHash(t,e);return sha256base64(r).slice(0,10)}function isEqual$1(t,e,r={}){return t===e||objectHash(t,r)===objectHash(e,r)}function _createMatcher(t,e){return{ctx:{table:t},matchAll:r=>_matchRoutes(r,t)}}function _createTableFromExport(t){const e={};for(const r in t)e[r]=r==="dynamic"?new Map(Object.entries(t[r]).map(([s,o])=>[s,_createTableFromExport(o)])):new Map(Object.entries(t[r]));return e}function createMatcherFromExport(t){return _createMatcher(_createTableFromExport(t))}function _matchRoutes(t,e,r){t.endsWith("/")&&(t=t.slice(0,-1)||"/");const s=[];for(const[d,L]of _sortRoutesMap(e.wildcard))(t===d||t.startsWith(d+"/"))&&s.push(L);for(const[d,L]of _sortRoutesMap(e.dynamic))if(t.startsWith(d+"/")){const ge="/"+t.slice(d.length).split("/").splice(2).join("/");s.push(..._matchRoutes(ge,L))}const o=e.static.get(t);return o&&s.push(o),s.filter(Boolean)}function _sortRoutesMap(t){return[...t.entries()].sort((e,r)=>e[0].length-r[0].length)}function isPlainObject(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function _defu(t,e,r=".",s){if(!isPlainObject(e))return _defu(t,{},r,s);const o=Object.assign({},e);for(const d in t){if(d==="__proto__"||d==="constructor")continue;const L=t[d];L!=null&&(s&&s(o,d,L,r)||(Array.isArray(L)&&Array.isArray(o[d])?o[d]=[...L,...o[d]]:isPlainObject(L)&&isPlainObject(o[d])?o[d]=_defu(L,o[d],(r?`${r}.`:"")+d.toString(),s):o[d]=L))}return o}function createDefu(t){return(...e)=>e.reduce((r,s)=>_defu(r,s,"",t),{})}const defu=createDefu(),defuFn=createDefu((t,e,r)=>{if(t[e]!==void 0&&typeof r=="function")return t[e]=r(t[e]),!0});function hasProp(t,e){try{return e in t}catch{return!1}}var __defProp$2$1=Object.defineProperty,__defNormalProp$2$1=(t,e,r)=>e in t?__defProp$2$1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$2$1=(t,e,r)=>(__defNormalProp$2$1(t,typeof e!="symbol"?e+"":e,r),r);
4class H3Error extends Error{constructor(e,r={}){super(e,r),__publicField$2$1(this,"statusCode",500),__publicField$2$1(this,"fatal",!1),__publicField$2$1(this,"unhandled",!1),__publicField$2$1(this,"statusMessage"),__publicField$2$1(this,"data"),__publicField$2$1(this,"cause"),r.cause&&!this.cause&&(this.cause=r.cause)}toJSON(){const e={message:this.message,statusCode:sanitizeStatusCode(this.statusCode,500)};return this.statusMessage&&(e.statusMessage=sanitizeStatusMessage(this.statusMessage)),this.data!==void 0&&(e.data=this.data),e}}__publicField$2$1(H3Error,"__h3_error__",!0);function createError$1(t){if(typeof t=="string")return new H3Error(t);if(isError(t))return t;const e=new H3Error(t.message??t.statusMessage??"",{cause:t.cause||t});if(hasProp(t,"stack"))try{Object.defineProperty(e,"stack",{get(){return t.stack}})}catch{try{e.stack=t.stack}catch{}}if(t.data&&(e.data=t.data),t.statusCode?e.statusCode=sanitizeStatusCode(t.statusCode,e.statusCode):t.status&&(e.statusCode=sanitizeStatusCode(t.status,e.statusCode)),t.statusMessage?e.statusMessage=t.statusMessage:t.statusText&&(e.statusMessage=t.statusText),e.statusMessage){const r=e.statusMessage;sanitizeStatusMessage(e.statusMessage)!==r&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return t.fatal!==void 0&&(e.fatal=t.fatal),t.unhandled!==void 0&&(e.unhandled=t.unhandled),e}function isError(t){var e;return((e=t==null?void 0:t.constructor)==null?void 0:e.__h3_error__)===!0}const DISALLOWED_STATUS_CHARS=/[^\u0009\u0020-\u007E]/g;function sanitizeStatusMessage(t=""){return t.replace(DISALLOWED_STATUS_CHARS,"")}function sanitizeStatusCode(t,e=200){return!t||(typeof t=="string"&&(t=Number.parseInt(t,10)),t<100||t>999)?e:t}typeof setImmediate>"u"||setImmediate;const LayoutMetaSymbol=Symbol("layout-meta"),PageRouteSymbol=Symbol("route"),useRouter$1=()=>{var t;return(t=useNuxtApp())==null?void 0:t.$router},useRoute$1=()=>hasInjectionContext()?inject(PageRouteSymbol,useNuxtApp()._route):useNuxtApp()._route;function defineNuxtRouteMiddleware(t){return t}const addRouteMiddleware=(t,e,r={})=>{const s=useNuxtApp(),o=r.global||typeof t!="string",d=e;if(!d){console.warn("[nuxt] No route middleware passed to `addRouteMiddleware`.",t);return}o?s._middleware.global.push(d):s._middleware.named[t]=d},isProcessingMiddleware=()=>{try{if(useNuxtApp()._processingMiddleware)return!0}catch{return!1}return!1},navigateTo=(t,e)=>{t||(t="/");const r=typeof t=="string"?t:withQuery(t.path||"/",t.query||{})+(t.hash||"");if(e!=null&&e.open){const{target:ge="_blank",windowFeatures:Mt={}}=e.open,er=Object.entries(Mt).filter(([tr,ir])=>ir!==void 0).map(([tr,ir])=>`${tr.toLowerCase()}=${ir}`).join(", ");return open(r,ge,er),Promise.resolve()}const s=(e==null?void 0:e.external)||hasProtocol(r,{acceptRelative:!0});if(s){if(!(e!=null&&e.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const ge=parseURL$1(r).protocol;if(ge&&isScriptProtocol(ge))throw new Error(`Cannot navigate to a URL with '${ge}' protocol.`)}const o=isProcessingMiddleware();if(!s&&o)return t;const d=useRouter$1(),L=useNuxtApp();return s?(L._scope.stop(),e!=null&&e.replace?location.replace(r):location.href=r,o?L.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):e!=null&&e.replace?d.replace(t):d.push(t)},NUXT_ERROR_SIGNATURE="__nuxt_error",useError=()=>toRef(useNuxtApp().payload,"error"),showError=t=>{const e=createError(t);try{const r=useNuxtApp(),s=useError();r.hooks.callHook("app:error",e),s.value=s.value||e}catch{throw e}return e},clearError=async(t={})=>{const e=useNuxtApp(),r=useError();e.callHook("app:error:cleared",t),t.redirect&&await useRouter$1().replace(t.redirect),r.value=null},isNuxtError=t=>!!t&&typeof t=="object"&&NUXT_ERROR_SIGNATURE in t,createError=t=>{const e=createError$1(t);return Object.defineProperty(e,NUXT_ERROR_SIGNATURE,{value:!0,configurable:!1,writable:!1}),e},UNDEFINED=-1,HOLE=-2,NAN=-3,POSITIVE_INFINITY=-4,NEGATIVE_INFINITY=-5,NEGATIVE_ZERO=-6;function parse$2(t,e){return unflatten(JSON.parse(t),e)}function unflatten(t,e){if(typeof t=="number")return o(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const r=t,s=Array(r.length);function o(d,L=!1){if(d===UNDEFINED)return;if(d===NAN)return NaN;if(d===POSITIVE_INFINITY)return 1/0;if(d===NEGATIVE_INFINITY)return-1/0;if(d===NEGATIVE_ZERO)return-0;if(L)throw new Error("Invalid input");if(d in s)return s[d];const ge=r[d];if(!ge||typeof ge!="object")s[d]=ge;else if(Array.isArray(ge))if(typeof ge[0]=="string"){const Mt=ge[0],er=e==null?void 0:e[Mt];if(er)return s[d]=er(o(ge[1]));switch(Mt){case"Date":s[d]=new Date(ge[1]);break;case"Set":const tr=new Set;s[d]=tr;for(let nr=1;nr<ge.length;nr+=1)tr.add(o(ge[nr]));break;case"Map":const ir=new Map;s[d]=ir;for(let nr=1;nr<ge.length;nr+=2)ir.set(o(ge[nr]),o(ge[nr+1]));break;case"RegExp":s[d]=new RegExp(ge[1],ge[2]);break;case"Object":s[d]=Object(ge[1]);break;case"BigInt":s[d]=BigInt(ge[1]);break;case"null":const rr=Object.create(null);s[d]=rr;for(let nr=1;nr<ge.length;nr+=2)rr[ge[nr]]=o(ge[nr+1]);break;default:throw new Error(`Unknown type ${Mt}`)}}else{const Mt=new Array(ge.length);s[d]=Mt;for(let er=0;er<ge.length;er+=1){const tr=ge[er];tr!==HOLE&&(Mt[er]=o(tr))}}else{const Mt={};s[d]=Mt;for(const er in ge){const tr=ge[er];Mt[er]=o(tr)}}return s[d]}return o(0)}function asArray$1(t){return Array.isArray(t)?t:[t]}const TagsWithInnerContent=["title","titleTemplate","script","style","noscript"],HasElementTags=["base","meta","link","style","script","noscript"],ValidHeadTags=["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"],UniqueTags=["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"],TagConfigKeys=["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"],IsBrowser=typeof window<"u";function defineHeadPlugin(t){return t}function hashCode(t){let e=9;for(let r=0;r<t.length;)e=Math.imul(e^t.charCodeAt(r++),9**9);return((e^e>>>9)+65536).toString(16).substring(1,8).toLowerCase()}function hashTag(t){return t._h||hashCode(t._d?t._d:`${t.tag}:${t.textContent||t.innerHTML||""}:${Object.entries(t.props).map(([e,r])=>`${e}:${String(r)}`).join(",")}`)}function tagDedupeKey(t,e){const{props:r,tag:s}=t;if(UniqueTags.includes(s))return s;if(s==="link"&&r.rel==="canonical")return"canonical";if(r.charset)return"charset";const o=["id"];s==="meta"&&o.push("name","property","http-equiv");for(const d of o)if(typeof r[d]<"u"){const L=String(r[d]);return`${s}:${d}:${L}`}return!1}function resolveTitleTemplate(t,e){return t==null?e||null:typeof t=="function"?t(e):t}function unpackToArray(t,e){const r=[],s=e.resolveKeyData||(d=>d.key),o=e.resolveValueData||(d=>d.value);for(const[d,L]of Object.entries(t))r.push(...(Array.isArray(L)?L:[L]).map(ge=>{const Mt={key:d,value:ge},er=o(Mt);return typeof er=="object"?unpackToArray(er,e):Array.isArray(er)?er:{[typeof e.key=="function"?e.key(Mt):e.key]:s(Mt),[typeof e.value=="function"?e.value(Mt):e.value]:er}}).flat());return r}function unpackToString(t,e){return Object.entries(t).map(([r,s])=>{if(typeof s=="object"&&(s=unpackToString(s,e)),e.resolve){const o=e.resolve({key:r,value:s});if(typeof o<"u")return o}return typeof s=="number"&&(s=s.toString()),typeof s=="string"&&e.wrapValue&&(s=s.replace(new RegExp(e.wrapValue,"g"),`\\${e.wrapValue}`),s=`${e.wrapValue}${s}${e.wrapValue}`),`${r}${e.keyValueSeparator||""}${s}`}).join(e.entrySeparator||"")}const p=t=>({keyValue:t,metaKey:"property"}),k$1=t=>({keyValue:t}),MetaPackingSchema={appleItunesApp:{unpack:{entrySeparator:", ",resolve({key:t,value:e}){return`${fixKeyCase(t)}=${e}`}}},articleExpirationTime:p("article:expiration_time"),articleModifiedTime:p("article:modified_time"),articlePublishedTime:p("article:published_time"),bookReleaseDate:p("book:release_date"),charset:{metaKey:"charset"},contentSecurityPolicy:{unpack:{entrySeparator:"; ",resolve({key:t,value:e}){return`${fixKeyCase(t)} ${e}`}},metaKey:"http-equiv"},contentType:{metaKey:"http-equiv"},defaultStyle:{metaKey:"http-equiv"},fbAppId:p("fb:app_id"),msapplicationConfig:k$1("msapplication-Config"),msapplicationTileColor:k$1("msapplication-TileColor"),msapplicationTileImage:k$1("msapplication-TileImage"),ogAudioSecureUrl:p("og:audio:secure_url"),ogAudioUrl:p("og:audio"),ogImageSecureUrl:p("og:image:secure_url"),ogImageUrl:p("og:image"),ogSiteName:p("og:site_name"),ogVideoSecureUrl:p("og:video:secure_url"),ogVideoUrl:p("og:video"),profileFirstName:p("profile:first_name"),profileLastName:p("profile:last_name"),profileUsername:p("profile:username"),refresh:{metaKey:"http-equiv",unpack:{entrySeparator:";",resolve({key:t,value:e}){if(t==="seconds")return`${e}`}}},robots:{unpack:{entrySeparator:", ",resolve({key:t,value:e}){return typeof e=="boolean"?`${fixKeyCase(t)}`:`${fixKeyCase(t)}:${e}`}}},xUaCompatible:{metaKey:"http-equiv"}},openGraphNamespaces=["og","book","article","profile"];function resolveMetaKeyType(t){var r;const e=fixKeyCase(t).split(":")[0];return openGraphNamespaces.includes(e)?"property":((r=MetaPackingSchema[t])==null?void 0:r.metaKey)||"name"}function resolveMetaKeyValue(t){var e;return((e=MetaPackingSchema[t])==null?void 0:e.keyValue)||fixKeyCase(t)}function fixKeyCase(t){const e=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=e.split("-")[0];return openGraphNamespaces.includes(r)||r==="twitter"?t.replace(/([A-Z])/g,":$1").toLowerCase():e}function changeKeyCasingDeep(t){if(Array.isArray(t))return t.map(r=>changeKeyCasingDeep(r));if(typeof t!="object"||Array.isArray(t))return t;const e={};for(const[r,s]of Object.entries(t))e[fixKeyCase(r)]=changeKeyCasingDeep(s);return e}function resolvePackedMetaObjectValue(t,e){const r=MetaPackingSchema[e];return e==="refresh"?`${t.seconds};url=${t.url}`:unpackToString(changeKeyCasingDeep(t),{keyValueSeparator:"=",entrySeparator:", ",resolve({value:s,key:o}){if(s===null)return"";if(typeof s=="boolean")return`${o}`},...r==null?void 0:r.unpack})}const ObjectArrayEntries=["og:image","og:video","og:audio","twitter:image"];function sanitize(t){const e={};return Object.entries(t).forEach(([r,s])=>{String(s)!=="false"&&r&&(e[r]=s)}),e}
4function handleObjectEntry(t,e){const r=sanitize(e),s=fixKeyCase(t),o=resolveMetaKeyType(s);if(ObjectArrayEntries.includes(s)){const d={};return Object.entries(r).forEach(([L,ge])=>{d[`${t}${L==="url"?"":`${L.charAt(0).toUpperCase()}${L.slice(1)}`}`]=ge}),unpackMeta(d).sort((L,ge)=>{var Mt,er;return(((Mt=L[o])==null?void 0:Mt.length)||0)-(((er=ge[o])==null?void 0:er.length)||0)})}return[{[o]:s,...r}]}function unpackMeta(t){const e=[],r={};Object.entries(t).forEach(([o,d])=>{if(!Array.isArray(d)){if(typeof d=="object"&&d){if(ObjectArrayEntries.includes(fixKeyCase(o))){e.push(...handleObjectEntry(o,d));return}r[o]=sanitize(d)}else r[o]=d;return}d.forEach(L=>{e.push(...typeof L=="string"?unpackMeta({[o]:L}):handleObjectEntry(o,L))})});const s=unpackToArray(r,{key({key:o}){return resolveMetaKeyType(o)},value({key:o}){return o==="charset"?"charset":"content"},resolveKeyData({key:o}){return resolveMetaKeyValue(o)},resolveValueData({value:o,key:d}){return o===null?"_null":typeof o=="object"?resolvePackedMetaObjectValue(o,d):typeof o=="number"?o.toString():o}});return[...e,...s].map(o=>(o.content==="_null"&&(o.content=null),o))}async function normaliseTag(t,e,r){const s={tag:t,props:await normaliseProps(typeof e=="object"&&typeof e!="function"&&!(e instanceof Promise)?{...e}:{[["script","noscript","style"].includes(t)?"innerHTML":"textContent"]:e},["templateParams","titleTemplate"].includes(t))};return TagConfigKeys.forEach(o=>{const d=typeof s.props[o]<"u"?s.props[o]:r[o];typeof d<"u"&&((!["innerHTML","textContent","children"].includes(o)||TagsWithInnerContent.includes(s.tag))&&(s[o==="children"?"innerHTML":o]=d),delete s.props[o])}),s.props.body&&(s.tagPosition="bodyClose",delete s.props.body),s.tag==="script"&&typeof s.innerHTML=="object"&&(s.innerHTML=JSON.stringify(s.innerHTML),s.props.type=s.props.type||"application/json"),Array.isArray(s.props.content)?s.props.content.map(o=>({...s,props:{...s.props,content:o}})):s}function normaliseStyleClassProps(t,e){var s;const r=t==="class"?" ":";";return typeof e=="object"&&!Array.isArray(e)&&(e=Object.entries(e).filter(([,o])=>o).map(([o,d])=>t==="style"?`${o}:${d}`:o)),(s=Array.isArray(e)?e.join(r):e)==null?void 0:s.split(r).filter(o=>o.trim()).filter(Boolean).join(r)}async function normaliseProps(t,e){for(const r of Object.keys(t)){if(["class","style"].includes(r)){t[r]=normaliseStyleClassProps(r,t[r]);continue}if(t[r]instanceof Promise&&(t[r]=await t[r]),!e&&!TagConfigKeys.includes(r)){const s=String(t[r]),o=r.startsWith("data-");s==="true"||s===""?t[r]=o?"true":!0:t[r]||(o&&s==="false"?t[r]="false":delete t[r])}}return t}const TagEntityBits=10;async function normaliseEntryTags(t){const e=[];return Object.entries(t.resolvedInput).filter(([r,s])=>typeof s<"u"&&ValidHeadTags.includes(r)).forEach(([r,s])=>{const o=asArray$1(s);e.push(...o.map(d=>normaliseTag(r,d,t)).flat())}),(await Promise.all(e)).flat().filter(Boolean).map((r,s)=>(r._e=t._i,t.mode&&(r._m=t.mode),r._p=(t._i<<TagEntityBits)+s,r))}const TAG_WEIGHTS={base:-10,title:10},TAG_ALIASES={critical:-80,high:-10,low:20};function tagWeight(t){let e=100;const r=t.tagPriority;return typeof r=="number"?r:(t.tag==="meta"?(t.props["http-equiv"]==="content-security-policy"&&(e=-30),t.props.charset&&(e=-20),t.props.name==="viewport"&&(e=-15)):t.tag==="link"&&t.props.rel==="preconnect"?e=20:t.tag in TAG_WEIGHTS&&(e=TAG_WEIGHTS[t.tag]),typeof r=="string"&&r in TAG_ALIASES?e+TAG_ALIASES[r]:e)}const SortModifiers=[{prefix:"before:",offset:-1},{prefix:"after:",offset:1}],NetworkEvents=["onload","onerror","onabort","onprogress","onloadstart"],sepSub="%separator";function processTemplateParams(t,e,r){if(typeof t!="string"||!t.includes("%"))return t;function s(L){let ge;return["s","pageTitle"].includes(L)?ge=e.pageTitle:L.includes(".")?ge=L.split(".").reduce((Mt,er)=>Mt&&Mt[er]||void 0,e):ge=e[L],typeof ge<"u"?(ge||"").replace(/"/g,'\\"'):!1}let o=t;try{o=decodeURI(t)}catch{}return(o.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(L=>{const ge=s(L.slice(1));typeof ge=="string"&&(t=t.replace(new RegExp(`\\${L}(\\W|$)`,"g"),(Mt,er)=>`${ge}${er}`).trim())}
4),t.includes(sepSub)&&(t.endsWith(sepSub)&&(t=t.slice(0,-sepSub.length).trim()),t.startsWith(sepSub)&&(t=t.slice(sepSub.length).trim()),t=t.replace(new RegExp(`\\${sepSub}\\s*\\${sepSub}`,"g"),sepSub),t=processTemplateParams(t,{separator:r},r)),t}async function renderDOMHead(t,e={}){var tr;const r=e.document||t.resolvedOptions.document;if(!r||!t.dirty)return;const s={shouldRender:!0,tags:[]};if(await t.hooks.callHook("dom:beforeRender",s),!s.shouldRender)return;const o=(await t.resolveTags()).map(ir=>({tag:ir,id:HasElementTags.includes(ir.tag)?hashTag(ir):ir.tag,shouldRender:!0}));let d=t._dom;if(!d){d={elMap:{htmlAttrs:r.documentElement,bodyAttrs:r.body}};for(const ir of["body","head"]){const rr=(tr=r[ir])==null?void 0:tr.children,nr=[];for(const ar of[...rr].filter(sr=>HasElementTags.includes(sr.tagName.toLowerCase()))){const sr={tag:ar.tagName.toLowerCase(),props:await normaliseProps(ar.getAttributeNames().reduce((ur,or)=>({...ur,[or]:ar.getAttribute(or)}),{})),innerHTML:ar.innerHTML};let lr=1,cr=tagDedupeKey(sr);for(;cr&&nr.find(ur=>ur._d===cr);)cr=`${cr}:${lr++}`;sr._d=cr||void 0,nr.push(sr),d.elMap[ar.getAttribute("data-hid")||hashTag(sr)]=ar}}}d.pendingSideEffects={...d.sideEffects||{}},d.sideEffects={};function L(ir,rr,nr){const ar=`${ir}:${rr}`;d.sideEffects[ar]=nr,delete d.pendingSideEffects[ar]}function ge({id:ir,$el:rr,tag:nr}){const ar=nr.tag.endsWith("Attrs");d.elMap[ir]=rr,ar||(["textContent","innerHTML"].forEach(sr=>{nr[sr]&&nr[sr]!==rr[sr]&&(rr[sr]=nr[sr])}),L(ir,"el",()=>{var sr;(sr=d.elMap[ir])==null||sr.remove(),delete d.elMap[ir]}));for(const[sr,lr]of Object.entries(nr._eventHandlers||{}))rr.getAttribute(`data-${sr}`)!==""&&((nr.tag==="bodyAttrs"?r.defaultView:rr).addEventListener(sr.replace("on",""),lr.bind(rr)),rr.setAttribute(`data-${sr}`,""));Object.entries(nr.props).forEach(([sr,lr])=>{const cr=`attr:${sr}`;if(sr==="class")for(const ur of(lr||"").split(" ").filter(Boolean))ar&&L(ir,`${cr}:${ur}`,()=>rr.classList.remove(ur)),!rr.classList.contains(ur)&&rr.classList.add(ur);else if(sr==="style")for(const ur of(lr||"").split(";").filter(Boolean)){const[or,...dr]=ur.split(":").map(hr=>hr.trim());L(ir,`${cr}:${ur}:${or}`,()=>{rr.style.removeProperty(or)}),rr.style.setProperty(or,dr.join(":"))}else rr.getAttribute(sr)!==lr&&rr.setAttribute(sr,lr===!0?"":String(lr)),ar&&L(ir,cr,()=>rr.removeAttribute(sr))})}const Mt=[],er={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const ir of o){const{tag:rr,shouldRender:nr,id:ar}=ir;if(nr){if(rr.tag==="title"){r.title=rr.textContent;continue}ir.$el=ir.$el||d.elMap[ar],ir.$el?ge(ir):HasElementTags.includes(rr.tag)&&Mt.push(ir)}}for(const ir of Mt){const rr=ir.tag.tagPosition||"head";ir.$el=r.createElement(ir.tag.tag),ge(ir),er[rr]=er[rr]||r.createDocumentFragment(),er[rr].appendChild(ir.$el)}for(const ir of o)await t.hooks.callHook("dom:renderTag",ir,r,L);er.head&&r.head.appendChild(er.head),er.bodyOpen&&r.body.insertBefore(er.bodyOpen,r.body.firstChild),er.bodyClose&&r.body.appendChild(er.bodyClose),Object.values(d.pendingSideEffects).forEach(ir=>ir()),t._dom=d,t.dirty=!1,await t.hooks.callHook("dom:rendered",{renders:o})}async function debouncedRenderDOMHead(t,e={}){const r=e.delayFn||(s=>setTimeout(s,10));return t._domUpdatePromise=t._domUpdatePromise||new Promise(s=>r(async()=>{await renderDOMHead(t,e),delete t._domUpdatePromise,s()}))}function DomPlugin(t){return e=>{var s,o;const r=((o=(s=e.resolvedOptions.document)==null?void 0:s.head.querySelector('script[id="unhead:payload"]'))==null?void 0:o.innerHTML)||!1;return r&&e.push(JSON.parse(r)),{mode:"client",hooks:{"entries:updated":function(d){debouncedRenderDOMHead(d,t)}}}}}const UsesMergeStrategy=["templateParams","htmlAttrs","bodyAttrs"],DedupePlugin={hooks:{"tag:normalise":function({tag:t}){["hid","vmid","key"].forEach(s=>{t.props[s]&&(t.key=t.props[s],delete t.props[s])});const r=tagDedupeKey(t)||(t.key?`${t.tag}:${t.key}`:!1);r&&(t._d=r)},"tags:resolve":function(t){const e={};t.tags.forEach(s=>{const o=(s.key?`${s.tag}:${s.key}`:s._d)||s._p,d=e[o];if(d){let ge=s==null?void 0:s.tagDuplicateStrategy;if(!ge&&UsesMergeStrategy.includes(s.tag)&&(ge="merge"),ge==="merge"){const Mt=d.props;["class","style"].forEach(er=>{Mt[er]&&(s.props[er]?(er==="style"&&!Mt[er].endsWith(";")&&(Mt[er]+=";"),s.props[er]=`${Mt[er]}
4 ${s.props[er]}`):s.props[er]=Mt[er])}),e[o].props={...Mt,...s.props};return}else if(s._e===d._e){d._duped=d._duped||[],s._d=`${d._d}:${d._duped.length+1}`,d._duped.push(s);return}else if(tagWeight(s)>tagWeight(d))return}const L=Object.keys(s.props).length+(s.innerHTML?1:0)+(s.textContent?1:0);if(HasElementTags.includes(s.tag)&&L===0){delete e[o];return}e[o]=s});const r=[];Object.values(e).forEach(s=>{const o=s._duped;delete s._duped,r.push(s),o&&r.push(...o)}),t.tags=r,t.tags=t.tags.filter(s=>!(s.tag==="meta"&&(s.props.name||s.props.property)&&!s.props.content))}}},PayloadPlugin={mode:"server",hooks:{"tags:resolve":function(t){const e={};t.tags.filter(r=>["titleTemplate","templateParams","title"].includes(r.tag)&&r._m==="server").forEach(r=>{e[r.tag]=r.tag.startsWith("title")?r.textContent:r.props}),Object.keys(e).length&&t.tags.push({tag:"script",innerHTML:JSON.stringify(e),props:{id:"unhead:payload",type:"application/json"}})}}},ValidEventTags=["script","link","bodyAttrs"],EventHandlersPlugin=t=>({hooks:{"tags:resolve":function(e){for(const r of e.tags.filter(s=>ValidEventTags.includes(s.tag)))Object.entries(r.props).forEach(([s,o])=>{s.startsWith("on")&&typeof o=="function"&&(t.ssr&&NetworkEvents.includes(s)?r.props[s]=`this.dataset.${s}fired = true`:delete r.props[s],r._eventHandlers=r._eventHandlers||{},r._eventHandlers[s]=o)}),t.ssr&&r._eventHandlers&&(r.props.src||r.props.href)&&(r.key=r.key||hashCode(r.props.src||r.props.href))},"dom:renderTag":function({$el:e,tag:r}){var s,o;for(const d of Object.keys((e==null?void 0:e.dataset)||{}).filter(L=>NetworkEvents.some(ge=>`${ge}fired`===L))){const L=d.replace("fired","");(o=(s=r._eventHandlers)==null?void 0:s[L])==null||o.call(e,new Event(L.replace("on","")))}}}}),DupeableTags=["link","style","script","noscript"],HashKeyedPlugin={hooks:{"tag:normalise":({tag:t})=>{t.key&&DupeableTags.includes(t.tag)&&(t.props["data-hid"]=t._h=hashCode(t.key))}}},SortPlugin={hooks:{"tags:resolve":t=>{const e=r=>{var s;return(s=t.tags.find(o=>o._d===r))==null?void 0:s._p};for(const{prefix:r,offset:s}of SortModifiers)for(const o of t.tags.filter(d=>typeof d.tagPriority=="string"&&d.tagPriority.startsWith(r))){const d=e(o.tagPriority.replace(r,""));typeof d<"u"&&(o._p=d+s)}t.tags.sort((r,s)=>r._p-s._p).sort((r,s)=>tagWeight(r)-tagWeight(s))}}},SupportedAttrs={meta:"content",link:"href",htmlAttrs:"lang"},TemplateParamsPlugin=t=>({hooks:{"tags:resolve":e=>{var ge;const{tags:r}=e,s=(ge=r.find(Mt=>Mt.tag==="title"))==null?void 0:ge.textContent,o=r.findIndex(Mt=>Mt.tag==="templateParams"),d=o!==-1?r[o].props:{},L=d.separator||"|";delete d.separator,d.pageTitle=processTemplateParams(d.pageTitle||s||"",d,L);for(const Mt of r.filter(er=>er.processTemplateParams!==!1)){const er=SupportedAttrs[Mt.tag];er&&typeof Mt.props[er]=="string"?Mt.props[er]=processTemplateParams(Mt.props[er],d,L):(Mt.processTemplateParams===!0||["titleTemplate","title"].includes(Mt.tag))&&["innerHTML","textContent"].forEach(tr=>{typeof Mt[tr]=="string"&&(Mt[tr]=processTemplateParams(Mt[tr],d,L))})}t._templateParams=d,t._separator=L,e.tags=r.filter(Mt=>Mt.tag!=="templateParams")}}}),TitleTemplatePlugin={hooks:{"tags:resolve":t=>{const{tags:e}=t;let r=e.findIndex(o=>o.tag==="titleTemplate");const s=e.findIndex(o=>o.tag==="title");if(s!==-1&&r!==-1){const o=resolveTitleTemplate(e[r].textContent,e[s].textContent);o!==null?e[s].textContent=o||e[s].textContent:delete e[s]}else if(r!==-1){const o=resolveTitleTemplate(e[r].textContent);o!==null&&(e[r].textContent=o,e[r].tag="title",r=-1)}r!==-1&&delete e[r],t.tags=e.filter(Boolean)}}},XSSPlugin={hooks:{"tags:afterResolve":function(t){for(const e of t.tags)typeof e.innerHTML=="string"&&(e.innerHTML&&["application/ld+json","application/json"].includes(e.props.type)?e.innerHTML=e.innerHTML.replace(/</g,"\\u003C"):e.innerHTML=e.innerHTML.replace(new RegExp(`</${e.tag}`,"g"),`<\\/${e.tag}`))}}};let activeHead;function createHead$1(t={}){const e=createHeadCore(t);return e.use(DomPlugin()),activeHead=e}function filterMode(t,e){return!t||t==="server"&&e||t==="client"&&!e}function createHeadCore(t={}){const e=createHooks();e.addHooks(t.hooks||{}),t.document=t.document||(IsBrowser?document:void 0);const r=!t.document,s=()=>{ge.dirty=!0,e.callHook("entries:updated",ge)};let o=0,d=[];const L=[],ge={plugins:L,dirty:!1,resolvedOptions:t,hooks:e,headEntries(){return d},use(Mt){const er=typeof Mt=="function"?Mt(ge):Mt;(!er.key||!L.some(tr=>tr.key===er.key))&&(L.push(er),filterMode(er.mode,r)&&e.addHooks(er.hooks||{}))},push(Mt,er){er==null||delete er.head;const tr={_i:o++,input:Mt,...er};return filterMode(tr.mode,r)&&(d.push(tr),s()),{dispose(){d=d.filter(ir=>ir._i!==tr._i),e.callHook("entries:updated",ge),s()},patch(ir){d=d.map(rr=>
4(rr._i===tr._i&&(rr.input=tr.input=ir),rr)),s()}}},async resolveTags(){const Mt={tags:[],entries:[...d]};await e.callHook("entries:resolve",Mt);for(const er of Mt.entries){const tr=er.resolvedInput||er.input;if(er.resolvedInput=await(er.transform?er.transform(tr):tr),er.resolvedInput)for(const ir of await normaliseEntryTags(er)){const rr={tag:ir,entry:er,resolvedOptions:ge.resolvedOptions};await e.callHook("tag:normalise",rr),Mt.tags.push(rr.tag)}}return await e.callHook("tags:beforeResolve",Mt),await e.callHook("tags:resolve",Mt),await e.callHook("tags:afterResolve",Mt),Mt.tags},ssr:r};return[DedupePlugin,PayloadPlugin,EventHandlersPlugin,HashKeyedPlugin,SortPlugin,TemplateParamsPlugin,TitleTemplatePlugin,XSSPlugin,...(t==null?void 0:t.plugins)||[]].forEach(Mt=>ge.use(Mt)),ge.hooks.callHook("init",ge),ge}function getActiveHead(){return activeHead}const Vue3=version$7.startsWith("3");function resolveUnref(t){return typeof t=="function"?t():unref(t)}function resolveUnrefHeadInput(t,e=""){if(t instanceof Promise)return t;const r=resolveUnref(t);return!t||!r?r:Array.isArray(r)?r.map(s=>resolveUnrefHeadInput(s,e)):typeof r=="object"?Object.fromEntries(Object.entries(r).map(([s,o])=>s==="titleTemplate"||s.startsWith("on")?[s,unref(o)]:[s,resolveUnrefHeadInput(o,s)])):r}const VueReactivityPlugin={hooks:{"entries:resolve":function(t){for(const e of t.entries)e.resolvedInput=resolveUnrefHeadInput(e.input)}}},headSymbol="usehead";function vueInstall(t){return{install(r){Vue3&&(r.config.globalProperties.$unhead=t,r.config.globalProperties.$head=t,r.provide(headSymbol,t))}}.install}function createHead(t={}){t.domDelayFn=t.domDelayFn||(r=>nextTick(()=>setTimeout(()=>r(),0)));const e=createHead$1(t);return e.use(VueReactivityPlugin),e.install=vueInstall(e),e}const _global=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},globalKey$1="__unhead_injection_handler__";function setHeadInjectionHandler(t){_global[globalKey$1]=t}function injectHead(){if(globalKey$1 in _global)return _global[globalKey$1]();const t=inject(headSymbol);return t||getActiveHead()}function useHead(t,e={}){const r=e.head||injectHead();if(r)return r.ssr?r.push(t,e):clientUseHead(r,t,e)}function clientUseHead(t,e,r={}){const s=ref$2(!1),o=ref$2({});watchEffect(()=>{o.value=s.value?{}:resolveUnrefHeadInput(e)});const d=t.push(o.value,r);return watch(o,ge=>{d.patch(ge)}),getCurrentInstance()&&(onBeforeUnmount(()=>{d.dispose()}),onDeactivated(()=>{s.value=!0}),onActivated(()=>{s.value=!1})),d}function klona(t){if(typeof t!="object")return t;var e,r,s=Object.prototype.toString.call(t);if(s==="[object Object]"){if(t.constructor!==Object&&typeof t.constructor=="function"){r=new t.constructor;for(e in t)t.hasOwnProperty(e)&&r[e]!==t[e]&&(r[e]=klona(t[e]))}else{r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:klona(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=klona(t[e])}return r}if(s==="[object Array]"){for(e=t.length,r=Array(e);e--;)r[e]=klona(t[e]);return r}return s==="[object Set]"?(r=new Set,t.forEach(function(o){r.add(klona(o))}),r):s==="[object Map]"?(r=new Map,t.forEach(function(o,d){r.set(klona(d),klona(o))}),r):s==="[object Date]"?new Date(+t):s==="[object RegExp]"?(r=new RegExp(t.source,t.flags),r.lastIndex=t.lastIndex,r):s==="[object DataView]"?new t.constructor(klona(t.buffer)):s==="[object ArrayBuffer]"?t.slice(0):s.slice(-6)==="Array]"?new t.constructor(t):t}const inlineConfig={nuxt:{buildId:"6d8e16f9-1d7d-45f8-83b4-007b12065899"}},__appConfig=defuFn(inlineConfig);function useAppConfig(){const t=useNuxtApp();return t._appConfig||(t._appConfig=reactive(__appConfig)),t._appConfig}const appPageTransition={name:"page",mode:"out-in"},appKeepalive=!1,nuxtLinkDefaults={componentName:"NuxtLink"},asyncDataDefaults={deep:!0},fetchDefaults={},vueAppRootContainer="#__nuxt";let manifest,matcher;function fetchManifest(){var e;const t=(e=useAppConfig().nuxt)==null?void 0:e.buildId;return manifest=$fetch(buildAssetsURL(`builds/meta/${t}.json`)),manifest.then(r=>{matcher=createMatcherFromExport(r.matcher)}),manifest}function getAppManifest(){return manifest||fetchManifest()}async function getRouteRules(t){return await getAppManifest(),defu({},...matcher.matchAll(t).reverse())}function loadPayload(t,e={}){const r=_getPayloadURL(t,e),s=useNuxtApp(),o=s._payloadCache=s._payloadCache||{};return r in o||(o[r]=isPrerendered(t).then(d=>d?_importPayload(r).then(L=>L||(delete o[r],null)):(o[r]=null,null))),o[r]}const filename="_payload.json";function _getPayloadURL(t,e={}){var o;
4const r=new URL(t,"http://localhost");if(r.host!=="localhost"||hasProtocol(r.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+t);const s=e.hash||(e.fresh?Date.now():(o=useAppConfig().nuxt)==null?void 0:o.buildId);return joinURL(useRuntimeConfig().app.baseURL,r.pathname,filename+(s?`?${s}`:""))}async function _importPayload(t){const e=fetch(t).then(r=>r.text().then(parsePayload));try{return await e}catch(r){console.warn("[nuxt] Cannot load payload ",t,r)}return null}async function isPrerendered(t=useRoute$1().path){if(t=withoutTrailingSlash(t),(await getAppManifest()).prerendered.includes(t))return!0;const r=await getRouteRules(t);return!!r.prerender&&!r.redirect}let payloadCache=null;async function getNuxtClientPayload(){if(payloadCache)return payloadCache;const t=document.getElementById("__NUXT_DATA__");if(!t)return{};const e=await parsePayload(t.textContent||""),r=t.dataset.src?await _importPayload(t.dataset.src):void 0;return payloadCache={...e,...r,...window.__NUXT__},payloadCache}async function parsePayload(t){return await parse$2(t,useNuxtApp()._payloadRevivers)}function definePayloadReviver(t,e){useNuxtApp()._payloadRevivers[t]=e}const revivers={NuxtError:t=>createError(t),EmptyShallowRef:t=>shallowRef(t==="_"?void 0:t==="0n"?BigInt(0):destr(t)),EmptyRef:t=>ref$2(t==="_"?void 0:t==="0n"?BigInt(0):destr(t)),ShallowRef:t=>shallowRef(t),ShallowReactive:t=>shallowReactive(t),Ref:t=>ref$2(t),Reactive:t=>reactive(t)},revive_payload_client_4sVQNw7RlN=defineNuxtPlugin({name:"nuxt:revive-payload:client",order:-30,async setup(t){let e,r;for(const s in revivers)definePayloadReviver(s,revivers[s]);Object.assign(t.payload,([e,r]=executeAsync(()=>t.runWithContext(getNuxtClientPayload)),e=await e,r(),e)),window.__NUXT__=t.payload}}),unheadPlugins=[],unhead_KgADcZ0jPj=defineNuxtPlugin({name:"nuxt:head",enforce:"pre",setup(t){const e=createHead({plugins:unheadPlugins});setHeadInjectionHandler(()=>useNuxtApp().vueApp._context.provides.usehead),t.vueApp.use(e);{let r=!0;const s=async()=>{r=!1,await renderDOMHead(e)};e.hooks.hook("dom:beforeRender",o=>{o.shouldRender=!r}),t.hooks.hook("page:start",()=>{r=!0}),t.hooks.hook("page:finish",()=>{t.isHydrating||s()}),t.hooks.hook("app:error",s),t.hooks.hook("app:suspense:resolve",s)}}});/*! 5 * vue-router v4.3.2 6 * (c) 2024 Eduardo San Martin Morote 7 * @license MIT 8 */const isBrowser=typeof document<"u";function isESModule(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const assign$1=Object.assign;function applyToParams(t,e){const r={};for(const s in e){const o=e[s];r[s]=isArray$3(o)?o.map(t):t(o)}return r}const noop$3=()=>{},isArray$3=Array.isArray,HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(t){return encodeURI(""+t).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(t){return commonEncode(t).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(t){return commonEncode(t).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(t){return encodeQueryValue(t).replace(EQUAL_RE,"%3D")}function encodePath(t){return commonEncode(t).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(t){return t==null?"":encodePath(t).replace(SLASH_RE,"%2F")}function decode(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=t=>t.replace(TRAILING_SLASH_RE,"");function parseURL(t,e,r="/"){let s,o={},d="",L="";const ge=e.indexOf("#");let Mt=e.indexOf("?");return ge<Mt&&ge>=0&&(Mt=-1),Mt>-1&&(s=e.slice(0,Mt),d=e.slice(Mt+1,ge>-1?ge:e.length),o=t(d)),ge>-1&&(s=s||e.slice(0,ge),L=e.slice(ge,e.length)),s=resolveRelativePath(s??e,r),{fullPath:s+(d&&"?")+d+L,path:s,query:o,hash:decode(L)}}function stringifyURL(t,e){const r=e.query?t(e.query):"";return e.path+(r&&"?")+r+(e.hash||"")}function stripBase(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function isSameRouteLocation(t,e,r){const s=e.matched.length-1,o=r.matched.length-1;return s>-1&&s===o&&isSameRouteRecord(e.matched[s],r.matched[o])&&isSameRouteLocationParams(e.params,r.params)&&t(e.query)===t(r.query)&&e.hash===r.hash}function isSameRouteRecord(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function isSameRouteLocationParams(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(!isSameRouteLocationParamsValue(t[r],e[r]))return!1;return!0}function isSameRouteLocationParamsValue(t,e){return isArray$3(t)?isEquivalentArray(t,e):isArray$3(e)?isEquivalentArray(e,t):t===e}function isEquivalentArray(t,e){return isArray$3(e)?t.length===e.length&&t.every((r,s)=>r===e[s]):t.length===1&&t[0]===e}function resolveRelativePath(t,e){if(t.startsWith("/"))return t;if(!t)return e;const r=e.split("/"),s=t.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let d=r.length-1,L,ge;for(L=0;L<s.length;L++)if(ge=s[L],ge!==".")if(ge==="..")d>1&&d--;else break;return r.slice(0,d).join("/")+"/"+s.slice(L).join("/")}var NavigationType;(function(t){t.pop="pop",t.push="push"})(NavigationType||(NavigationType={}));var NavigationDirection;(function(t){t.back="back",t.forward="forward",t.unknown=""})(NavigationDirection||(NavigationDirection={}));function normalizeBase(t){if(!t)if(isBrowser){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),removeTrailingSlash(t)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(t,e){return t.replace(BEFORE_HASH_RE,"#")+e}function getElementPosition(t,e){const r=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-r.left-(e.left||0),top:s.top-r.top-(e.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(t){let e;if("el"in t){const r=t.el,s=typeof r=="string"&&r.startsWith("#"),o=typeof r=="string"?s?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!o)return;e=getElementPosition(o,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}
vendor: 4,681 bytes, line 8
8function getScrollKey(t,e){return(history.state?history.state.position-e:-1)+t}const scrollPositions=new Map;function saveScrollPosition(t,e){scrollPositions.set(t,e)}function getSavedScrollPosition(t){const e=scrollPositions.get(t);return scrollPositions.delete(t),e}let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation$1(t,e){const{pathname:r,search:s,hash:o}=e,d=t.indexOf("#");if(d>-1){let ge=o.includes(t.slice(d))?t.slice(d).length:1,Mt=o.slice(ge);return Mt[0]!=="/"&&(Mt="/"+Mt),stripBase(Mt,"")}return stripBase(r,t)+s+o}function useHistoryListeners(t,e,r,s){let o=[],d=[],L=null;const ge=({state:rr})=>{const nr=createCurrentLocation$1(t,location),ar=r.value,sr=e.value;let lr=0;if(rr){if(r.value=nr,e.value=rr,L&&L===ar){L=null;return}lr=sr?rr.position-sr.position:0}else s(nr);o.forEach(cr=>{cr(r.value,ar,{delta:lr,type:NavigationType.pop,direction:lr?lr>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function Mt(){L=r.value}function er(rr){o.push(rr);const nr=()=>{const ar=o.indexOf(rr);ar>-1&&o.splice(ar,1)};return d.push(nr),nr}function tr(){const{history:rr}=window;rr.state&&rr.replaceState(assign$1({},rr.state,{scroll:computeScrollPosition()}),"")}function ir(){for(const rr of d)rr();d=[],window.removeEventListener("popstate",ge),window.removeEventListener("beforeunload",tr)}return window.addEventListener("popstate",ge),window.addEventListener("beforeunload",tr,{passive:!0}),{pauseListeners:Mt,listen:er,destroy:ir}}function buildState(t,e,r,s=!1,o=!1){return{back:t,current:e,forward:r,replaced:s,position:window.history.length,scroll:o?computeScrollPosition():null}}function useHistoryStateNavigation(t){const{history:e,location:r}=window,s={value:createCurrentLocation$1(t,r)},o={value:e.state};o.value||d(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function d(Mt,er,tr){const ir=t.indexOf("#"),rr=ir>-1?(r.host&&document.querySelector("base")?t:t.slice(ir))+Mt:createBaseLocation()+t+Mt;try{e[tr?"replaceState":"pushState"](er,"",rr),o.value=er}catch(nr){console.error(nr),r[tr?"replace":"assign"](rr)}}function L(Mt,er){const tr=assign$1({},e.state,buildState(o.value.back,Mt,o.value.forward,!0),er,{position:o.value.position});d(Mt,tr,!0),s.value=Mt}function ge(Mt,er){const tr=assign$1({},o.value,e.state,{forward:Mt,scroll:computeScrollPosition()});d(tr.current,tr,!0);const ir=assign$1({},buildState(s.value,Mt,null),{position:tr.position+1},er);d(Mt,ir,!1),s.value=Mt}return{location:s,state:o,push:ge,replace:L}}function createWebHistory(t){t=normalizeBase(t);const e=useHistoryStateNavigation(t),r=useHistoryListeners(t,e.state,e.location,e.replace);function s(d,L=!0){L||r.pauseListeners(),history.go(d)}const o=assign$1({location:"",base:t,go:s,createHref:createHref.bind(null,t)},e,r);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>e.state.value}),o}function createWebHashHistory(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),createWebHistory(t)}function isRouteLocation(t){return typeof t=="string"||t&&typeof t=="object"}function isRouteName(t){return typeof t=="string"||typeof t=="symbol"}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},NavigationFailureSymbol=Symbol("");var NavigationFailureType;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(NavigationFailureType||(NavigationFailureType={}));function createRouterError(t,e){return assign$1(new Error,{type:t,[NavigationFailureSymbol]:!0},e)}function isNavigationFailure(t,e){return t instanceof Error&&NavigationFailureSymbol in t&&(e==null||!!(t.type&e))}const BASE_PARAM_PATTERN="[^/]+?",BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(t,e){const r=assign$1({},BASE_PATH_PARSER_OPTIONS,e),s=[];let o=r.start?"^":"";const d=[];for(const er of t){const tr=er.length?[]:[90];r.strict&&!er.length&&(o+="/");for(let ir=0;ir<er.length;ir++){const rr=er[ir];let nr=40+(r.sensitive?.25:0);if(rr.type===0)ir||(o+="/"),o+=rr.value.replace(REGEX_CHARS_RE,"\\$&"),nr+=40;else if(rr.type===1){const{value:ar,repeatable:sr,optional:lr,regexp:cr}=rr;d.push({name:ar,repeatable:sr,optional:lr});const ur=cr||BASE_PARAM_PATTERN;if(ur!==BASE_PARAM_PATTERN){nr+=10;try{new RegExp(`(${ur})`)}catch(dr){throw new Error(`Invalid custom RegExp for param "${ar}" (${ur}): `+dr.message)}}let or=sr?`((?:${ur}
8)(?:/(?:${ur}))*)`:`(${ur})`;ir||(or=lr&&er.length<2?`(?:/${or})`:"/"+or),lr&&(or+="?"),o+=or,nr+=20,lr&&(nr+=-8),sr&&(nr+=-20),ur===".*"&&(nr+=-50)}tr.push(nr)}s.push(tr)}if(r.strict&&r.end){const er=s.length-1;s[er][s[er].length-1]+=.7000000000000001}r.strict||(o+="/?"),r.end?o+="$":r.strict&&(o+="(?:/|$)");const L=new RegExp(o,r.sensitive?"":"i");function ge(er){const tr=er.match(L),ir={};if(!tr)return null;for(let rr=1;rr<tr.length;rr++){const nr=tr[rr]||"",ar=d[rr-1];ir[ar.name]=nr&&ar.repeatable?nr.split("/"):nr}return ir}function Mt(er){let tr="",ir=!1;for(const rr of t){(!ir||!tr.endsWith("/"))&&(tr+="/"),ir=!1;for(const nr of rr)if(nr.type===0)tr+=nr.value;else if(nr.type===1){const{value:ar,repeatable:sr,optional:lr}=nr,cr=ar in er?er[ar]:"";if(isArray$3(cr)&&!sr)throw new Error(`Provided param "${ar}" is an array but it is not repeatable (* or + modifiers)`);const ur=isArray$3(cr)?cr.join("/"):cr;if(!ur)if(lr)rr.length<2&&(tr.endsWith("/")?tr=tr.slice(0,-1):ir=!0);else throw new Error(`Missing required param "${ar}"`);tr+=ur}}return tr||"/"}return{re:L,score:s,keys:d,parse:ge,stringify:Mt}}function compareScoreArray(t,e){let r=0;for(;r<t.length&&r<e.length;){const s=e[r]-t[r];if(s)return s;r++}return t.length<e.length?t.length===1&&t[0]===80?-1:1:t.length>e.length?e.length===1&&e[0]===80?1:-1:0}function comparePathParserScore(t,e){let r=0;const s=t.score,o=e.score;for(;r<s.length&&r<o.length;){const d=compareScoreArray(s[r],o[r]);if(d)return d;r++}if(Math.abs(o.length-s.length)===1){if(isLastScoreNegative(s))return 1;if(isLastScoreNegative(o))return-1}return o.length-s.length}function isLastScoreNegative(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const ROOT_TOKEN={type:0,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(t){if(!t)return[[]];if(t==="/")return[[ROOT_TOKEN]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(nr){throw new Error(`ERR (${r})/"${er}": ${nr}`)}let r=0,s=r;const o=[];let d;function L(){d&&o.push(d),d=[]}let ge=0,Mt,er="",tr="";function ir(){er&&(r===0?d.push({type:0,value:er}):r===1||r===2||r===3?(d.length>1&&(Mt==="*"||Mt==="+")&&e(`A repeatable param (${er}) must be alone in its segment. eg: '/:ids+.`),d.push({type:1,value:er,regexp:tr,repeatable:Mt==="*"||Mt==="+",optional:Mt==="*"||Mt==="?"})):e("Invalid state to consume buffer"),er="")}function rr(){er+=Mt}for(;ge<t.length;){if(Mt=t[ge++],Mt==="\\"&&r!==2){s=r,r=4;continue}switch(r){case 0:Mt==="/"?(er&&ir(),L()):Mt===":"?(ir(),r=1):rr();break;case 4:rr(),r=s;break;case 1:Mt==="("?r=2:VALID_PARAM_RE.test(Mt)?rr():(ir(),r=0,Mt!=="*"&&Mt!=="?"&&Mt!=="+"&&ge--);break;case 2:Mt===")"?tr[tr.length-1]=="\\"?tr=tr.slice(0,-1)+Mt:r=3:tr+=Mt;break;case 3:ir(),r=0,Mt!=="*"&&Mt!=="?"&&Mt!=="+"&&ge--,tr="";break;default:e("Unknown state");break}}return r===2&&e(`Unfinished custom RegExp for param "${er}"`),ir(),L(),o}function createRouteRecordMatcher(t,e,r){const s=tokensToParser(tokenizePath(t.path),r),o=assign$1(s,{record:t,parent:e,children:[],alias:[]});return e&&!o.record.aliasOf==!e.record.aliasOf&&e.children.push(o),o}function createRouterMatcher(t,e){const r=[],s=new Map;e=mergeOptions$1({strict:!1,end:!0,sensitive:!1},e);function o(tr){return s.get(tr)}function d(tr,ir,rr){const nr=!rr,ar=normalizeRouteRecord(tr);ar.aliasOf=rr&&rr.record;const sr=mergeOptions$1(e,tr),lr=[ar];if("alias"in tr){const or=typeof tr.alias=="string"?[tr.alias]:tr.alias;for(const dr of or)lr.push(assign$1({},ar,{components:rr?rr.record.components:ar.components,path:dr,aliasOf:rr?rr.record:ar}))}let cr,ur;for(const or of lr){const{path:dr}=or;if(ir&&dr[0]!=="/"){const hr=ir.record.path,pr=hr[hr.length-1]==="/"?"":"/";or.path=ir.record.path+(dr&&pr+dr)}if(cr=createRouteRecordMatcher(or,ir,sr),rr?rr.alias.push(cr):(ur=ur||cr,ur!==cr&&ur.alias.push(cr),nr&&tr.name&&!isAliasRecord(cr)&&L(tr.name)),ar.children){const hr=ar.children;for(let pr=0;pr<hr.length;pr++)d(hr[pr],cr,rr&&rr.children[pr])}rr=rr||cr,(cr.record.components&&Object.keys(cr.record.components).length||cr.record.name||cr.record.redirect)&&Mt(cr)}return ur?()=>{L(ur)}:noop$3}function L(tr){if(isRouteName(tr)){const ir=s.get(tr);
vendor: 13,347 bytes, line 8
8ir&&(s.delete(tr),r.splice(r.indexOf(ir),1),ir.children.forEach(L),ir.alias.forEach(L))}else{const ir=r.indexOf(tr);ir>-1&&(r.splice(ir,1),tr.record.name&&s.delete(tr.record.name),tr.children.forEach(L),tr.alias.forEach(L))}}function ge(){return r}function Mt(tr){let ir=0;for(;ir<r.length&&comparePathParserScore(tr,r[ir])>=0&&(tr.record.path!==r[ir].record.path||!isRecordChildOf(tr,r[ir]));)ir++;r.splice(ir,0,tr),tr.record.name&&!isAliasRecord(tr)&&s.set(tr.record.name,tr)}function er(tr,ir){let rr,nr={},ar,sr;if("name"in tr&&tr.name){if(rr=s.get(tr.name),!rr)throw createRouterError(1,{location:tr});sr=rr.record.name,nr=assign$1(paramsFromLocation(ir.params,rr.keys.filter(ur=>!ur.optional).concat(rr.parent?rr.parent.keys.filter(ur=>ur.optional):[]).map(ur=>ur.name)),tr.params&¶msFromLocation(tr.params,rr.keys.map(ur=>ur.name))),ar=rr.stringify(nr)}else if(tr.path!=null)ar=tr.path,rr=r.find(ur=>ur.re.test(ar)),rr&&(nr=rr.parse(ar),sr=rr.record.name);else{if(rr=ir.name?s.get(ir.name):r.find(ur=>ur.re.test(ir.path)),!rr)throw createRouterError(1,{location:tr,currentLocation:ir});sr=rr.record.name,nr=assign$1({},ir.params,tr.params),ar=rr.stringify(nr)}const lr=[];let cr=rr;for(;cr;)lr.unshift(cr.record),cr=cr.parent;return{name:sr,path:ar,params:nr,matched:lr,meta:mergeMetaFields(lr)}}return t.forEach(tr=>d(tr)),{addRoute:d,resolve:er,removeRoute:L,getRoutes:ge,getRecordMatcher:o}}function paramsFromLocation(t,e){const r={};for(const s of e)s in t&&(r[s]=t[s]);return r}function normalizeRouteRecord(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:normalizeRecordProps(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function normalizeRecordProps(t){const e={},r=t.props||!1;if("component"in t)e.default=r;else for(const s in t.components)e[s]=typeof r=="object"?r[s]:r;return e}function isAliasRecord(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function mergeMetaFields(t){return t.reduce((e,r)=>assign$1(e,r.meta),{})}function mergeOptions$1(t,e){const r={};for(const s in t)r[s]=s in e?e[s]:t[s];return r}function isRecordChildOf(t,e){return e.children.some(r=>r===t||isRecordChildOf(t,r))}function parseQuery(t){const e={};if(t===""||t==="?")return e;const s=(t[0]==="?"?t.slice(1):t).split("&");for(let o=0;o<s.length;++o){const d=s[o].replace(PLUS_RE," "),L=d.indexOf("="),ge=decode(L<0?d:d.slice(0,L)),Mt=L<0?null:decode(d.slice(L+1));if(ge in e){let er=e[ge];isArray$3(er)||(er=e[ge]=[er]),er.push(Mt)}else e[ge]=Mt}return e}function stringifyQuery(t){let e="";for(let r in t){const s=t[r];if(r=encodeQueryKey(r),s==null){s!==void 0&&(e+=(e.length?"&":"")+r);continue}(isArray$3(s)?s.map(d=>d&&encodeQueryValue(d)):[s&&encodeQueryValue(s)]).forEach(d=>{d!==void 0&&(e+=(e.length?"&":"")+r,d!=null&&(e+="="+d))})}return e}function normalizeQuery(t){const e={};for(const r in t){const s=t[r];s!==void 0&&(e[r]=isArray$3(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return e}const matchedRouteKey=Symbol(""),viewDepthKey=Symbol(""),routerKey=Symbol(""),routeLocationKey=Symbol(""),routerViewLocationKey=Symbol("");function useCallbacks(){let t=[];function e(s){return t.push(s),()=>{const o=t.indexOf(s);o>-1&&t.splice(o,1)}}function r(){t=[]}return{add:e,list:()=>t.slice(),reset:r}}function guardToPromiseFn(t,e,r,s,o,d=L=>L()){const L=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((ge,Mt)=>{const er=rr=>{rr===!1?Mt(createRouterError(4,{from:r,to:e})):rr instanceof Error?Mt(rr):isRouteLocation(rr)?Mt(createRouterError(2,{from:e,to:rr})):(L&&s.enterCallbacks[o]===L&&typeof rr=="function"&&L.push(rr),ge())},tr=d(()=>t.call(s&&s.instances[o],e,r,er));let ir=Promise.resolve(tr);t.length<3&&(ir=ir.then(er)),ir.catch(rr=>Mt(rr))})}function extractComponentsGuards(t,e,r,s,o=d=>d()){const d=[];for(const L of t)for(const ge in L.components){let Mt=L.components[ge];if(!(e!=="beforeRouteEnter"&&!L.instances[ge]))if(isRouteComponent(Mt)){const tr=(Mt.__vccOpts||Mt)[e];tr&&d.push(guardToPromiseFn(tr,r,s,L,ge,o))}else{let er=Mt();d.push(()=>er.then(tr=>{if(!tr)return Promise.reject(new Error(`Couldn't resolve component "${ge}" at "${L.path}"`));const ir=isESModule(tr)?tr.default:tr;L.components[ge]=ir;const nr=(ir.__vccOpts||ir)[e];return nr&&guardToPromiseFn(nr,r,s,L,ge,o)()}))}}return d}function isRouteComponent(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function useLink(t){const e=inject(routerKey),r=inject(routeLocationKey),s=computed(()=>{const Mt=unref(t.to);return e.resolve(Mt)}),o=computed(()=>{const{matched:Mt}=s.value,{length:er}=Mt,tr=Mt[er-1],ir=r.matched;if(!tr||!ir.length)return-1;const rr=ir.findIndex(isSameRouteRecord.bind(null,tr));if(rr>-1)return rr;const nr=getOriginalPath(Mt[er-2]);return er>1&&getOriginalPath(tr)===nr&&ir[ir.length-1].path!==nr?ir.findIndex(isSameRouteRecord.bind(null,Mt[er-2])):rr}),d=computed(()=>o.value>-1&&includesParams(r.params,s.value.params)),L=computed(()=>o.value>-1&&o.value===r.matched.length-1&&isSameRouteLocationParams(r.params,s.value.params));function ge(Mt={}){return guardEvent(Mt)?e[unref(t.replace)?"replace":"push"](unref(t.to)).catch(noop$3):Promise.resolve()}return{route:s,href:computed(()=>s.value.href),isActive:d,isExactActive:L,navigate:ge}}const RouterLinkImpl=defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink,setup(t,{slots:e}){const r=reactive(useLink(t)),{options:s}=inject(routerKey),o=computed(()=>({[getLinkClass(t.activeClass,s.linkActiveClass,"router-link-active")]:r.isActive,[getLinkClass(t.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const d=e.default&&e.default(r);return t.custom?d:h$4("a",{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:o.value},d)}}}),RouterLink=RouterLinkImpl;function guardEvent(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function includesParams(t,e){for(const r in e){const s=e[r],o=t[r];if(typeof s=="string"){if(s!==o)return!1}else if(!isArray$3(o)||o.length!==s.length||s.some((d,L)=>d!==o[L]))return!1}return!0}function getOriginalPath(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const getLinkClass=(t,e,r)=>t??e??r,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:r}){const s=inject(routerViewLocationKey),o=computed(()=>t.route||s.value),d=inject(viewDepthKey,0),L=computed(()=>{let er=unref(d);const{matched:tr}=o.value;let ir;for(;(ir=tr[er])&&!ir.components;)er++;return er}),ge=computed(()=>o.value.matched[L.value]);provide(viewDepthKey,computed(()=>L.value+1)),provide(matchedRouteKey,ge),provide(routerViewLocationKey,o);const Mt=ref$2();return watch(()=>[Mt.value,ge.value,t.name],([er,tr,ir],[rr,nr,ar])=>{tr&&(tr.instances[ir]=er,nr&&nr!==tr&&er&&er===rr&&(tr.leaveGuards.size||(tr.leaveGuards=nr.leaveGuards),tr.updateGuards.size||(tr.updateGuards=nr.updateGuards))),er&&tr&&(!nr||!isSameRouteRecord(tr,nr)||!rr)&&(tr.enterCallbacks[ir]||[]).forEach(sr=>sr(er))},{flush:"post"}),()=>{const er=o.value,tr=t.name,ir=ge.value,rr=ir&&ir.components[tr];if(!rr)return normalizeSlot(r.default,{Component:rr,route:er});const nr=ir.props[tr],ar=nr?nr===!0?er.params:typeof nr=="function"?nr(er):nr:null,lr=h$4(rr,assign$1({},ar,e,{onVnodeUnmounted:cr=>{cr.component.isUnmounted&&(ir.instances[tr]=null)},ref:Mt}));return normalizeSlot(r.default,{Component:lr,route:er})||lr}}});function normalizeSlot(t,e){if(!t)return null;const r=t(e);return r.length===1?r[0]:r}const RouterView=RouterViewImpl;function createRouter(t){const e=createRouterMatcher(t.routes,t),r=t.parseQuery||parseQuery,s=t.stringifyQuery||stringifyQuery,o=t.history,d=useCallbacks(),L=useCallbacks(),ge=useCallbacks(),Mt=shallowRef(START_LOCATION_NORMALIZED);let er=START_LOCATION_NORMALIZED;isBrowser&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const tr=applyToParams.bind(null,Vr=>""+Vr),ir=applyToParams.bind(null,encodeParam),rr=applyToParams.bind(null,decode);function nr(Vr,Zr){let Qr,Ai;return isRouteName(Vr)?(Qr=e.getRecordMatcher(Vr),Ai=Zr):Ai=Vr,e.addRoute(Ai,Qr)}function ar(Vr){const Zr=e.getRecordMatcher(Vr);Zr&&e.removeRoute(Zr)}function sr(){return e.getRoutes().map(Vr=>Vr.record)}function lr(Vr){return!!e.getRecordMatcher(Vr)}function cr(Vr,Zr){if(Zr=assign$1({},Zr||Mt.value),typeof Vr=="string"){const Nr=parseURL(r,Vr,Zr.path),Wr=e.resolve({path:Nr.path},Zr),qr=o.createHref(Nr.fullPath);return assign$1(Nr,Wr,{params:rr(Wr.params),hash:decode(Nr.hash),redirectedFrom:void 0,href:qr})}let Qr;if(Vr.path!=null)Qr=assign$1({},Vr,{path:parseURL(r,Vr.path,Zr.path).path});else{const Nr=assign$1({},Vr.params);for(const Wr in Nr)Nr[Wr]==null&&delete Nr[Wr];Qr=assign$1({},Vr,{params:ir(Nr)}),Zr.params=ir(Zr.params)}const Ai=e.resolve(Qr,Zr),Mi=Vr.hash||"";Ai.params=tr(rr(Ai.params));const Dr=stringifyURL(s,assign$1({},Vr,{hash:encodeHash(Mi),path:Ai.path})),Lr=o.createHref(Dr);return assign$1({fullPath:Dr,hash:Mi,query:s===stringifyQuery?normalizeQuery(Vr.query):Vr.query||{}},Ai,{redirectedFrom:void 0,href:Lr})}function ur(Vr){return typeof Vr=="string"?parseURL(r,Vr,Mt.value.path):assign$1({},Vr)}function or(Vr,Zr){if(er!==Vr)return createRouterError(8,{from:Zr,to:Vr})}function dr(Vr){return mr(Vr)}function hr(Vr){return dr(assign$1(ur(Vr),{replace:!0}))}function pr(Vr){const Zr=Vr.matched[Vr.matched.length-1];if(Zr&&Zr.redirect){const{redirect:Qr}=Zr;let Ai=typeof Qr=="function"?Qr(Vr):Qr;return typeof Ai=="string"&&(Ai=Ai.includes("?")||Ai.includes("#")?Ai=ur(Ai):{path:Ai},Ai.params={}),assign$1({query:Vr.query,hash:Vr.hash,params:Ai.path!=null?{}:Vr.params},Ai)}}function mr(Vr,Zr){const Qr=er=cr(Vr),Ai=Mt.value,Mi=Vr.state,Dr=Vr.force,Lr=Vr.replace===!0,Nr=pr(Qr);if(Nr)return mr(assign$1(ur(Nr),{state:typeof Nr=="object"?assign$1({},Mi,Nr.state):Mi,force:Dr,replace:Lr}),Zr||Qr);const Wr=Qr;Wr.redirectedFrom=Zr;let qr;return!Dr&&isSameRouteLocation(s,Ai,Qr)&&(qr=createRouterError(16,{to:Wr,from:Ai}),Ir(Ai,Ai,!0,!1)),(qr?Promise.resolve(qr):Cr(Wr,Ai)).catch(Fr=>isNavigationFailure(Fr)?isNavigationFailure(Fr,2)?Fr:wr(Fr):gr(Fr,Wr,Ai)).then(Fr=>{if(Fr){if(isNavigationFailure(Fr,2))return mr(assign$1({replace:Lr},ur(Fr.to),{state:typeof Fr.to=="object"?assign$1({},Mi,Fr.to.state):Mi,force:Dr}),Zr||Wr)}else Fr=kr(Wr,Ai,!0,Lr,Mi);return Pr(Wr,Ai,Fr),Fr})}function vr(Vr,Zr){const Qr=or(Vr,Zr);return Qr?Promise.reject(Qr):Promise.resolve()}function Er(Vr){const Zr=Jr.values().next().value;return Zr&&typeof Zr.runWithContext=="function"?Zr.runWithContext(Vr):Vr()}function Cr(Vr,Zr){let Qr;const[Ai,Mi,Dr]=extractChangingRecords(Vr,Zr);Qr=extractComponentsGuards(Ai.reverse(),"beforeRouteLeave",Vr,Zr);for(const Nr of Ai)Nr.leaveGuards.forEach(Wr=>{Qr.push(guardToPromiseFn(Wr,Vr,Zr))});const Lr=vr.bind(null,Vr,Zr);return Qr.push(Lr),di(Qr).then(()=>{Qr=[];for(const Nr of d.list())Qr.push(guardToPromiseFn(Nr,Vr,Zr));return Qr.push(Lr),di(Qr)}).then(()=>{Qr=extractComponentsGuards(Mi,"beforeRouteUpdate",Vr,Zr);for(const Nr of Mi)Nr.updateGuards.forEach(Wr=>{Qr.push(guardToPromiseFn(Wr,Vr,Zr))});return Qr.push(Lr),di(Qr)}).then(()=>{Qr=[];for(const Nr of Dr)if(Nr.beforeEnter)if(isArray$3(Nr.beforeEnter))for(const Wr of Nr.beforeEnter)Qr.push(guardToPromiseFn(Wr,Vr,Zr));else Qr.push(guardToPromiseFn(Nr.beforeEnter,Vr,Zr));return Qr.push(Lr),di(Qr)}).then(()=>(Vr.matched.forEach(Nr=>Nr.enterCallbacks={}),Qr=extractComponentsGuards(Dr,"beforeRouteEnter",Vr,Zr,Er),Qr.push(Lr),di(Qr))).then(()=>{Qr=[];for(const Nr of L.list())Qr.push(guardToPromiseFn(Nr,Vr,Zr));return Qr.push(Lr),di(Qr)}).catch(Nr=>isNavigationFailure(Nr,8)?Nr:Promise.reject(Nr))}function Pr(Vr,Zr,Qr){ge.list().forEach(Ai=>Er(()=>Ai(Vr,Zr,Qr)))}function kr(Vr,Zr,Qr,Ai,Mi){const Dr=or(Vr,Zr);if(Dr)return Dr;const Lr=Zr===START_LOCATION_NORMALIZED,Nr=isBrowser?history.state:{};Qr&&(Ai||Lr?o.replace(Vr.fullPath,assign$1({scroll:Lr&&Nr&&Nr.scroll},Mi)):o.push(Vr.fullPath,Mi)),Mt.value=Vr,Ir(Vr,Zr,Qr,Lr),wr()}let Mr;function Ur(){Mr||(Mr=o.listen((Vr,Zr,Qr)=>{if(!xi.listening)return;const Ai=cr(Vr),Mi=pr(Ai);if(Mi){mr(assign$1(Mi,{replace:!0}),Ai).catch(noop$3);return}er=Ai;const Dr=Mt.value;isBrowser&&saveScrollPosition(getScrollKey(Dr.fullPath,Qr.delta),computeScrollPosition()),Cr(Ai,Dr).catch(Lr=>isNavigationFailure(Lr,12)?Lr:isNavigationFailure(Lr,2)?(mr(Lr.to,Ai).then(Nr=>{isNavigationFailure(Nr,20)&&!Qr.delta&&Qr.type===NavigationType.pop&&o.go(-1,!1)}).catch(noop$3),Promise.reject()):(Qr.delta&&o.go(-Qr.delta,!1),gr(Lr,Ai,Dr))).then(Lr=>{Lr=Lr||kr(Ai,Dr,!1),Lr&&(Qr.delta&&!isNavigationFailure(Lr,8)?o.go(-Qr.delta,!1):Qr.type===NavigationType.pop&&isNavigationFailure(Lr,20)&&o.go(-1,!1)),Pr(Ai,Dr,Lr)}
8).catch(noop$3)}))}let $r=useCallbacks(),yr=useCallbacks(),xr;function gr(Vr,Zr,Qr){wr(Vr);const Ai=yr.list();return Ai.length?Ai.forEach(Mi=>Mi(Vr,Zr,Qr)):console.error(Vr),Promise.reject(Vr)}function _r(){return xr&&Mt.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((Vr,Zr)=>{$r.add([Vr,Zr])})}function wr(Vr){return xr||(xr=!Vr,Ur(),$r.list().forEach(([Zr,Qr])=>Vr?Qr(Vr):Zr()),$r.reset()),Vr}function Ir(Vr,Zr,Qr,Ai){const{scrollBehavior:Mi}=t;if(!isBrowser||!Mi)return Promise.resolve();const Dr=!Qr&&getSavedScrollPosition(getScrollKey(Vr.fullPath,0))||(Ai||!Qr)&&history.state&&history.state.scroll||null;return nextTick().then(()=>Mi(Vr,Zr,Dr)).then(Lr=>Lr&&scrollToPosition(Lr)).catch(Lr=>gr(Lr,Vr,Zr))}const Hr=Vr=>o.go(Vr);let Yr;const Jr=new Set,xi={currentRoute:Mt,listening:!0,addRoute:nr,removeRoute:ar,hasRoute:lr,getRoutes:sr,resolve:cr,options:t,push:dr,replace:hr,go:Hr,back:()=>Hr(-1),forward:()=>Hr(1),beforeEach:d.add,beforeResolve:L.add,afterEach:ge.add,onError:yr.add,isReady:_r,install(Vr){const Zr=this;Vr.component("RouterLink",RouterLink),Vr.component("RouterView",RouterView),Vr.config.globalProperties.$router=Zr,Object.defineProperty(Vr.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(Mt)}),isBrowser&&!Yr&&Mt.value===START_LOCATION_NORMALIZED&&(Yr=!0,dr(o.location).catch(Mi=>{}));const Qr={};for(const Mi in START_LOCATION_NORMALIZED)Object.defineProperty(Qr,Mi,{get:()=>Mt.value[Mi],enumerable:!0});Vr.provide(routerKey,Zr),Vr.provide(routeLocationKey,shallowReactive(Qr)),Vr.provide(routerViewLocationKey,Mt);const Ai=Vr.unmount;Jr.add(Vr),Vr.unmount=function(){Jr.delete(Vr),Jr.size<1&&(er=START_LOCATION_NORMALIZED,Mr&&Mr(),Mr=null,Mt.value=START_LOCATION_NORMALIZED,Yr=!1,xr=!1),Ai()}}};function di(Vr){return Vr.reduce((Zr,Qr)=>Zr.then(()=>Er(Qr)),Promise.resolve())}return xi}function extractChangingRecords(t,e){const r=[],s=[],o=[],d=Math.max(e.matched.length,t.matched.length);for(let L=0;L<d;L++){const ge=e.matched[L];ge&&(t.matched.find(er=>isSameRouteRecord(er,ge))?s.push(ge):r.push(ge));const Mt=t.matched[L];Mt&&(e.matched.find(er=>isSameRouteRecord(er,Mt))||o.push(Mt))}return[r,s,o]}function useRouter(){return inject(routerKey)}function useRoute(){return inject(routeLocationKey)}const interpolatePath=(t,e)=>e.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,r=>{var s;return((s=t.params[r.slice(1)])==null?void 0:s.toString())||""}),generateRouteKey$1=(t,e)=>{const r=t.route.matched.find(o=>{var d;return((d=o.components)==null?void 0:d.default)===t.Component.type}),s=e??(r==null?void 0:r.meta.key)??(r&&interpolatePath(t.route,r));return typeof s=="function"?s(t.route):s},wrapInKeepAlive=(t,e)=>({default:()=>t?h$4(KeepAlive,t===!0?{}:t,e):e});function toArray$1(t){return Array.isArray(t)?t:[t]}const scriptRel="modulepreload",assetsURL=function(t,e){return t[0]==="."?new URL(t,e).href:t},seen={},___vitePreload=function(e,r,s){let o=Promise.resolve();if(r&&r.length>0){const d=document.getElementsByTagName("link"),L=document.querySelector("meta[property=csp-nonce]"),ge=(L==null?void 0:L.nonce)||(L==null?void 0:L.getAttribute("nonce"));o=Promise.all(r.map(Mt=>{if(Mt=assetsURL(Mt,s),Mt in seen)return;seen[Mt]=!0;const er=Mt.endsWith(".css"),tr=er?'[rel="stylesheet"]':"";if(!!s)for(let nr=d.length-1;nr>=0;nr--){const ar=d[nr];if(ar.href===Mt&&(!er||ar.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${Mt}"]${tr}`))return;const rr=document.createElement("link");if(rr.rel=er?"stylesheet":scriptRel,er||(rr.as="script",rr.crossOrigin=""),rr.href=Mt,ge&&rr.setAttribute("nonce",ge),document.head.appendChild(rr),er)return new Promise((nr,ar)=>{rr.addEventListener("load",nr),rr.addEventListener("error",()=>ar(new Error(`Unable to preload CSS for ${Mt}`)))})}))}return o.then(()=>e()).catch(d=>{const L=new Event("vite:preloadError",{cancelable:!0});if(L.payload=d,window.dispatchEvent(L),!L.defaultPrevented)throw d})},__vitePreload=(...t)=>___vitePreload(...t).catch(e=>{const r=new Event("nuxt.preloadError");throw r.payload=e,window.dispatchEvent(r),e}),__nuxt_page_meta$d=null,__nuxt_page_meta$c=null,__nuxt_page_meta$b=null,__nuxt_page_meta$a=null,__nuxt_page_meta$9=null,__nuxt_page_meta$8=null,__nuxt_page_meta$7=null,__nuxt_page_meta$6=null,__nuxt_page_meta$5=null,__nuxt_page_meta$4=null,__nuxt_page_meta$3=null,__nuxt_page_meta$2=null,__nuxt_page_meta$1=null,__nuxt_page_meta=null,_routes=[{name:"slug",path:"/:slug()",meta:{},alias:[],redirect:__nuxt_page_meta$d==null?void 0:__nuxt_page_meta$d.redirect,component:()=>__vitePreload(()=>import("./BjYe2Cdj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url).then(t=>t.default||t)},{name:"about",path:"/about",meta:{},alias:[],redirect:__nuxt_page_meta$c==null?void 0:__nuxt_page_meta$c.redirect,component:()=>__vitePreload(()=>import("./D36JQ9TL.js"),__vite__mapDeps([13,1,2,3,4,7,8,9,14,15]),import.meta.url).then(t=>t.default||t)},{name:"careers",path:"/careers",meta:{},alias:[],redirect:__nuxt_page_meta$b==null?void 0:__nuxt_page_meta$b.redirect,component:()=>__vitePreload(()=>import("./Bs6Ektdp.js"),__vite__mapDeps([16,1,2,3,4,5,6,7,8,9,14,17,18,10,11,12]),import.meta.url).then(t=>t.default||t)},{name:"end-user-license-agreement",path:"/end-user-license-agreement",meta:{},alias:[],redirect:__nuxt_page_meta$a==null?void 0:__nuxt_page_meta$a.redirect,component:()=>__vitePreload(()=>import("./DXgkQqQO.js"),__vite__mapDeps([19,1,2,20]),import.meta.url).then(t=>t.default||t)},{name:"games-slug",path:"/games/:slug()",meta:{},alias:[],redirect:__nuxt_page_meta$9==null?void 0:__nuxt_page_meta$9.redirect,component:()=>__vitePreload(()=>import("./CI1Y3dyd.js"),__vite__mapDeps([21,1,2,3,4,17,18,22]),import.meta.url).then(t=>t.default||t)},{name:"games",path:"/games",meta:{},alias:[],redirect:__nuxt_page_meta$8==null?void 0:__nuxt_page_meta$8.redirect,component:()=>__vitePreload(()=>import("./dUANrJEL.js"),__vite__mapDeps([23,1,2,3,4,5,6,17,18]),import.meta.url).then(t=>t.default||t)},{name:"index",path:"/",meta:{},alias:[],redirect:__nuxt_page_meta$7==null?void 0:__nuxt_page_meta$7.redirect,component:()=>__vitePreload(()=>import("./NafwX7Eg.js"),__vite__mapDeps([24,1,2,3,4,5,6,10,11,12,25,8,9,26,27]),import.meta.url).then(t=>t.default||t)},{name:"join-code",path:"/join/:code()",meta:{},alias:[],redirect:__nuxt_page_meta$6==null?void 0:__nuxt_page_meta$6.redirect,component:()=>__vitePreload(()=>import("./Co2Od2Zj.js"),__vite__mapDeps([28,29]),import.meta.url).then(t=>t.default||t)},{name:"join",path:"/join",meta:{},alias:[],redirect:__nuxt_page_meta$5==null?void 0:__nuxt_page_meta$5.redirect,component:()=>__vitePreload(()=>import("./Bsz82Kqw.js"),__vite__mapDeps([30,31,1,2,3,4,5,6,10,11,12,25,8,9,26]),import.meta.url).then(t=>t.default||t)},{name:"news-slug",path:"/news/:slug()",meta:{},alias:[],redirect:__nuxt_page_meta$4==null?void 0:__nuxt_page_meta$4.redirect,component:()=>__vitePreload(()=>import("./BWGj2LXU.js"),__vite__mapDeps([32,11,31,33]),import.meta.url).then(t=>t.default||t)},{name:"news",path:"/news",meta:{},alias:[],redirect:__nuxt_page_meta$3==null?void 0:__nuxt_page_meta$3.redirect,component:()=>__vitePreload(()=>import("./DEKft-P7.js"),__vite__mapDeps([34,1,2,3,4,7,8,9,14,15,35]),import.meta.url).then(t=>t.default||t)},{name:"privacy-policy",path:"/privacy-policy",meta:{},alias:[],redirect:__nuxt_page_meta$2==null?void 0:__nuxt_page_meta$2.redirect,component:()=>__vitePreload(()=>import("./Dr6r0ZVe.js"),__vite__mapDeps([36,1,2,37]),import.meta.url).then(t=>t.default||t)},{name:"terms-of-use",path:"/terms-of-use",meta:{},alias:[],redirect:__nuxt_page_meta$1==null?void 0:__nuxt_page_meta$1.redirect,component:()=>__vitePreload(()=>import("./Cq9h6rWm.js"),__vite__mapDeps([38,1,2,39]),import.meta.url).then(t=>t.default||t)},{name:"xr-futures",path:"/xr-futures",meta:{},alias:[],redirect:__nuxt_page_meta==null?void 0:__nuxt_page_meta.redirect,component:()=>__vitePreload(()=>import("./B004fdtY.js"),__vite__mapDeps([40,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url).then(t=>t.default||t)}],_wrapIf=(t,e,r)=>(e=e===!0?{}:e,{default:()=>{var s;return e?h$4(t,e,r):(s=r.default)==null?void 0:s.call(r)}});function generateRouteKey(t){const e=(t==null?void 0:t.meta.key)??t.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,r=>{var s;return((s=t.params[r.slice(1)])==null?void 0:s.toString())||""});return typeof e=="function"?e(t):e}function isChangingPage(t,e){return t===e||e===START_LOCATION_NORMALIZED?!1:generateRouteKey(t)!==generateRouteKey(e)?!0:!t.matched.every((s,o)=>{var d,L;return s.components&&s.components.default===((L=(d=e.matched[o])==null?void 0:d.components)==null?void 0:L.default)})}const routerOptions0={scrollBehavior(t,e,r){var er;const s=useNuxtApp(),o=((er=useRouter$1().options)==null?void 0:er.scrollBehaviorType)??"auto";let d=r||void 0;const L=typeof t.meta.scrollToTop=="function"?t.meta.scrollToTop(t,e):t.meta.scrollToTop;if(!d&&e&&t&&L!==!1&&isChangingPage(t,e)&&(d={left:0,top:0}),t.path===e.path)return e.hash&&!t.hash?{left:0,top:0}:t.hash?{el:t.hash,top:_getHashElementScrollMarginTop(t.hash),behavior:o}:!1;const ge=tr=>!!(tr.meta.pageTransition??appPageTransition),Mt=ge(e)&&ge(t)?"page:transition:finish":"page:finish";return new Promise(tr=>{s.hooks.hookOnce(Mt,async()=>{await new Promise(ir=>setTimeout(ir,0)),t.hash&&(d={el:t.hash,top:_getHashElementScrollMarginTop(t.hash),behavior:o}),tr(d)})})}};function _getHashElementScrollMarginTop(t){try{const e=document.querySelector(t);if(e)return parseFloat(getComputedStyle(e).scrollMarginTop)}catch{}return 0}const configRouterOptions={hashMode:!1,scrollBehaviorType:"auto"},routerOptions={...configRouterOptions,...routerOptions0},validate=async t=>{var Mt;let e,r;if(!((Mt=t.meta)!=null&&Mt.validate))return;const s=useNuxtApp(),o=useRouter$1();if(([e,r]=executeAsync(()=>Promise.resolve(t.meta.validate(t))),e=await e,r(),e)===!0)return;const L=createError({statusCode:404,statusMessage:`Page Not Found: ${t.fullPath}`,data:{path:t.fullPath}}),ge=o.beforeResolve(er=>{if(ge(),er===t){const tr=o.afterEach(async()=>{tr(),await s.runWithContext(()=>showError(L)),window.history.pushState({},"",t.fullPath)});return!1}})},manifest_45route_45rule=async t=>{let e,r;const s=([e,r]=executeAsync(()=>getRouteRules(t.path)),e=await e,r(),e);
8if(s.redirect)return hasProtocol(s.redirect,{acceptRelative:!0})?(window.location.href=s.redirect,!1):s.redirect},globalMiddleware=[validate,manifest_45route_45rule],namedMiddleware={redirect:()=>__vitePreload(()=>import("./CnnQXdws.js"),[],import.meta.url)};function createCurrentLocation(t,e,r){const{pathname:s,search:o,hash:d}=e,L=t.indexOf("#");if(L>-1){const er=d.includes(t.slice(L))?t.slice(L).length:1;let tr=d.slice(er);return tr[0]!=="/"&&(tr="/"+tr),withoutBase(tr,"")}const ge=withoutBase(s,t),Mt=!r||isEqual$2(ge,r,{trailingSlash:!0})?ge:r;return Mt+(Mt.includes("?")?"":o)+d}const plugin$1=defineNuxtPlugin({name:"nuxt:router",enforce:"pre",async setup(t){var lr,cr;let e,r,s=useRuntimeConfig().app.baseURL;routerOptions.hashMode&&!s.includes("#")&&(s+="#");const o=((lr=routerOptions.history)==null?void 0:lr.call(routerOptions,s))??(routerOptions.hashMode?createWebHashHistory(s):createWebHistory(s)),d=((cr=routerOptions.routes)==null?void 0:cr.call(routerOptions,_routes))??_routes;let L;const ge=createRouter({...routerOptions,scrollBehavior:(ur,or,dr)=>{if(or===START_LOCATION_NORMALIZED){L=dr;return}if(routerOptions.scrollBehavior){if(ge.options.scrollBehavior=routerOptions.scrollBehavior,"scrollRestoration"in window.history){const hr=ge.beforeEach(()=>{hr(),window.history.scrollRestoration="manual"})}return routerOptions.scrollBehavior(ur,START_LOCATION_NORMALIZED,L||dr)}},history:o,routes:d});"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),t.vueApp.use(ge);const Mt=shallowRef(ge.currentRoute.value);ge.afterEach((ur,or)=>{Mt.value=or}),Object.defineProperty(t.vueApp.config.globalProperties,"previousRoute",{get:()=>Mt.value});const er=createCurrentLocation(s,window.location,t.payload.path),tr=sh
8allowRef(ge.currentRoute.value),ir=()=>{tr.value=ge.currentRoute.value};t.hook("page:finish",ir),ge.afterEach((ur,or)=>{var dr,hr,pr,mr;((hr=(dr=ur.matched[0])==null?void 0:dr.components)==null?void 0:hr.default)===((mr=(pr=or.matched[0])==null?void 0:pr.components)==null?void 0:mr.default)&&ir()});const rr={};for(const ur in tr.value)Object.defineProperty(rr,ur,{get:()=>tr.value[ur]});t._route=shallowReactive(rr),t._middleware=t._middleware||{global:[],named:{}};try{[e,r]=executeAsync(()=>ge.isReady()),await e,r()}catch(ur){[e,r]=executeAsync(()=>t.runWithContext(()=>showError(ur))),await e,r()}const nr=er!==ge.currentRoute.value.fullPath?ge.resolve(er):ge.currentRoute.value;ir();const ar=t.payload.state._layout;ge.beforeEach(async(ur,or)=>{var dr;await t.callHook("page:loading:start"),ur.meta=reactive(ur.meta),t.isHydrating&&ar&&!isReadonly(ur.meta.layout)&&(ur.meta.layout=ar),t._processingMiddleware=!0;{const hr=new Set([...globalMiddleware,...t._middleware.global]);for(const pr of ur.matched){const mr=pr.meta.middleware;if(mr)for(const vr of toArray$1(mr))hr.add(vr)}{const pr=await t.runWithContext(()=>getRouteRules(ur.path));if(pr.appMiddleware)for(const mr in pr.appMiddleware)pr.appMiddleware[mr]?hr.add(mr):hr.delete(mr)}for(const pr of hr){const mr=typeof pr=="string"?t._middleware.named[pr]||await((dr=namedMiddleware[pr])==null?void 0:dr.call(namedMiddleware).then(Er=>Er.default||Er)):pr;if(!mr)throw new Error(`Unknown route middleware: '${pr}'.`);const vr=await t.runWithContext(()=>mr(ur,or));if(!t.payload.serverRendered&&t.isHydrating&&(vr===!1||vr instanceof Error)){const Er=vr||createError$1({statusCode:404,statusMessage:`Page Not Found: ${er}`});return await t.runWithContext(()=>showError(Er)),!1}if(vr!==!0&&(vr||vr===!1))return vr}}}),ge.onError(async()=>{delete t._processingMiddleware,await t.callHook("page:loading:end")});const sr=useError();return ge.afterEach(async(ur,or,dr)=>{delete t._processingMiddleware,!t.isHydrating&&sr.value&&await t.runWithContext(clearError),dr&&await t.callHook("page:loading:end"),ur.matched.length===0&&await t.runWithContext(()=>showError(createError$1({statusCode:404,fatal:!1,statusMessage:`Page not found: ${ur.fullPath}`,data:{path:ur.fullPath}})))}),t.hooks.hookOnce("app:created",async()=>{try{"name"in nr&&(nr.name=void 0),await ge.replace({...nr,force:!0}),ge.options.scrollBehavior=routerOptions.scrollBehavior}catch(ur){await t.runWithContext(()=>showError(ur))}}),{provide:{router:ge}}}});function useRequestHeaders(t){return{}}const useStateKeyPrefix="$s";function useState(...t){const e=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(e);const[r,s]=t;if(!r||typeof r!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+r);if(s!==void 0&&typeof s!="function")throw new Error("[nuxt] [useState] init must be a function: "+s);const o=useStateKeyPrefix+r,d=useNuxtApp(),L=toRef(d.payload.state,o);if(L.value===void 0&&s){const ge=s();if(isRef(ge))return d.payload.state[o]=ge,ge;L.value=ge}return L}const _0_siteConfig_7pzUtwM1Zj=defineNuxtPlugin({name:"nuxt-site-config:init",enforce:"pre",async setup(t){const e=useState("site-config");let r={};return r=e.value||window.__NUXT_SITE_CONFIG__,{provide:{nuxtSiteConfig:r}}}}),requestIdleCallback=globalThis.requestIdleCallback||(t=>{const e=Date.now(),r={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-e))};return setTimeout(()=>{t(r)},1)}),cancelIdleCallback=globalThis.cancelIdleCallback||(t=>{clearTimeout(t)}),onNuxtReady=t=>{const e=useNuxtApp();e.isHydrating?e.hooks.hookOnce("app:suspense:resolve",()=>{requestIdleCallback(t)}):requestIdleCallback(t)},payload_client_yVLowv6hDl=defineNuxtPlugin({name:"nuxt:payload",setup(t){useRouter$1().beforeResolve(async(e,r)=>{if(e.path===r.path)return;const s=await loadPayload(e.path);s&&Object.assign(t.static.data,s.data)}),onNuxtReady(()=>{var e;t.hooks.hook("link:prefetch",async r=>{parseURL$1(r).protocol||await loadPayload(r)}),((e=navigator.connection)==null?void 0:e.effectiveType)!=="slow-2g"&&setTimeout(getAppManifest,1e3)})}}),check_outdated_build_client_8vK7RkfGxZ=defineNuxtPlugin(t=>{let e;async function r(){const s=await getAppManifest();e&&clearTimeout(e),e=setTimeout(r,1e3*60*60);try{const o=await $fetch(buildAssetsURL("builds/latest.json")+`?${Date.now()}`);o.id!==s.id&&t.hooks.callHook("app:manifest:update",o)}catch{}}onNuxtReady(()=>{e=setTimeout(r,1e3*60*60)})}),components_plugin_KR1HBZs4kY=defineNuxtPlugin({name:"nuxt:global-components"}),layouts={},prefetch_client_5tzzN0oIVL=defineNuxtPlugin({name:"nuxt:prefetch",setup(t){const e=useRouter$1();t.hooks.hook("app:mounted",()=>{e.beforeEach(async r=>{var o;const s=(o=r==null?void 0:r.meta)==null?void 0:o.layout;s&&typeof layouts[s]=="function"&&await layouts[s]()})}),t.hooks.hook("link:prefetch",r=>{if(hasProtocol(r))return;const s=e.resolve(r);if(!s)return;const o=s.meta.layout;let d=toArray$1(s.meta.middleware);d=d.filter(L=>typeof L=="string");for(const L of d)typeof namedMiddleware[L]=="function"&&namedMiddleware[L]();
8o&&typeof layouts[o]=="function"&&layouts[o]()})}}),CookieDefaults={path:"/",watch:!0,decode:t=>destr(decodeURIComponent(t)),encode:t=>encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))},store$1=void 0;function useCookie(t,e){var Mt;const r={...CookieDefaults,...e},s=readRawCookies(r)||{};let o;r.maxAge!==void 0?o=r.maxAge*1e3:r.expires&&(o=r.expires.getTime()-Date.now());const d=o!==void 0&&o<=0,L=klona(d?void 0:s[t]??((Mt=r.default)==null?void 0:Mt.call(r))),ge=o&&!d?cookieRef(L,o,r.watch&&r.watch!=="shallow"):ref$2(L);{let er=null;try{!store$1&&typeof BroadcastChannel<"u"&&(er=new BroadcastChannel(`nuxt:cookies:${t}`))}catch{}const tr=()=>{r.readonly||isEqual$1(ge.value,s[t])||(writeClientCookie(t,ge.value,r),s[t]=klona(ge.value),er==null||er.postMessage({value:r.encode(ge.value)}))},ir=nr=>{var sr;const ar=nr.refresh?(sr=readRawCookies(r))==null?void 0:sr[t]:r.decode(nr.value);rr=!0,s[t]=ge.value=ar,nextTick(()=>{rr=!1})};let rr=!1;getCurrentScope()&&onScopeDispose(()=>{rr=!0,tr(),er==null||er.close()}),er&&(er.onmessage=({data:nr})=>ir(nr)),r.watch?watch(ge,()=>{rr||tr()},{deep:r.watch!=="shallow"}):tr()}return ge}function readRawCookies(t={}){return parse$3(document.cookie,t)}function serializeCookie(t,e,r={}){return e==null?serialize(t,e,{...r,maxAge:-1}):serialize(t,e,r)}function writeClientCookie(t,e,r={}){document.cookie=serializeCookie(t,e,r)}const MAX_TIMEOUT_DELAY=2147483647;function cookieRef(t,e,r){let s,o,d=0;const L=r?ref$2(t):{value:t};return getCurrentScope()&&onScopeDispose(()=>{o==null||o(),clearTimeout(s)}),customRef((ge,Mt)=>{r&&(o=watch(L,Mt));function er(){clearTimeout(s);const tr=e-d,ir=tr<MAX_TIMEOUT_DELAY?tr:MAX_TIMEOUT_DELAY;s=setTimeout(()=>{if(d+=ir,d<e)return er();L.value=void 0,Mt()},ir)}return{get(){return ge(),L.value},set(tr){er(),L.value=tr,Mt()}}})}function escapeStringRegexp(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const replacements
vendor: 24,157 bytes, line 8
8=[["Ã","ss"],["áº","Ss"],["ä","ae"],["Ã","Ae"],["ö","oe"],["Ã","Oe"],["ü","ue"],["Ã","Ue"],["Ã","A"],["Ã","A"],["Ã","A"],["Ã","A"],["Ã","Ae"],["Ã
","A"],["Ã","AE"],["Ã","C"],["Ã","E"],["Ã","E"],["Ã","E"],["Ã","E"],["Ã","I"],["Ã","I"],["Ã","I"],["Ã","I"],["Ã","D"],["Ã","N"],["Ã","O"],["Ã","O"],["Ã","O"],["Ã","O"],["Ã","Oe"],["Å","O"],["Ã","O"],["Ã","U"],["Ã","U"],["Ã","U"],["Ã","Ue"],["Ű","U"],["Ã","Y"],["Ã","TH"],["Ã","ss"],["à ","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["Ã¥","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["Ã","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["Å","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["áº","SS"],["à ","a"],["Ã","A"],["á","a"],["Ã","A"],["â","a"],["Ã","A"],["ã","a"],["Ã","A"],["è","e"],["Ã","E"],["é","e"],["Ã","E"],["ê","e"],["Ã","E"],["ì","i"],["Ã","I"],["Ã","i"],["Ã","I"],["ò","o"],["Ã","O"],["ó","o"],["Ã","O"],["ô","o"],["Ã","O"],["õ","o"],["Ã","O"],["ù","u"],["Ã","U"],["ú","u"],["Ã","U"],["ý","y"],["Ã","Y"],["Ä","a"],["Ä","A"],["Ä","D"],["Ä","d"],["Ä©","i"],["Ĩ","I"],["Å©","u"],["Ũ","U"],["Æ¡","o"],["Æ ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["áº","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["á»","e"],["á»","E"],["á»","e"],["á»","E"],["á»
","e"],["á»","E"],["á»","e"],["á»","E"],["á»","i"],["á»","I"],["á»","i"],["á»","I"],["á»","o"],["á»","O"],["á»","o"],["á»","O"],["á»","o"],["á»","O"],["á»","o"],["á»","O"],["á»","o"],["á»","O"],["á»","o"],["á»","O"],["á»","o"],["á»","O"],["á»","o"],["á»","O"],["á»","o"],["á»","O"],["á»","o"],["á»","O"],["ỡ","o"],["á» ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["á»§","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["á»","u"],["Ử","U"],["ữ","u"],["á»®","U"],["á»±","u"],["á»°","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["á»´","Y"],["á»·","y"],["á»¶","Y"],["ỹ","y"],["Ỹ","Y"],["Ø¡","e"],["Ø¢","a"],["Ø£","a"],["ؤ","w"],["Ø¥","i"],["ئ","y"],["ا","a"],["ب","b"],["Ø©","t"],["ت","t"],["Ø«","th"],["ج","j"],["Ø","h"],["Ø®","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["Ø´","sh"],["ص","s"],["ض","d"],["Ø·","t"],["ظ","z"],["ع","e"],["غ","gh"],["Ù","_"],["Ù","f"],["Ù","q"],["Ù","k"],["Ù","l"],["Ù
","m"],["Ù","n"],["Ù","h"],["Ù","w"],["Ù","a"],["Ù","y"],["Ùâ","a"],["Ù","u"],["Ùâ","i"],["Ù ","0"],["Ù¡","1"],["Ù¢","2"],["Ù£","3"],["Ù¤","4"],["Ù¥","5"],["Ù¦","6"],["Ù§","7"],["Ù¨","8"],["Ù©","9"],["Ú","ch"],["Ú©","k"],["Ú¯","g"],["Ù¾","p"],["Ú","zh"],["Û","y"],["Û°","0"],["Û±","1"],["Û²","2"],["Û³","3"],["Û´","4"],["Ûµ","5"],["Û¶","6"],["Û·","7"],["Û¸","8"],["Û¹","9"],["Ù¼","p"],["Ú","z"],["Ú
","c"],["Ú","d"],["ﺫ","d"],["ïº","r"],["Ú","r"],["ﺯ","z"],["Ú","g"],["Ú","x"],["Ú«","g"],["Ú¼","n"],["Û","e"],["Û","e"],["Û","ai"],["Ù¹","t"],["Ú","d"],["Ú","r"],["Úº","n"],["Û","h"],["Ú¾","h"],["Û","e"],["Ð","A"],["а","a"],["Ð","B"],["б","b"],["Ð","V"],["в","v"],["Ð","G"],["г","g"],["Ð","D"],["д","d"],["Ñе","ye"],["Ъе","Ye"],["ÑÐ","yE"],["ЪÐ","YE"],["Ð","E"],["е","e"],["Ð","Yo"],["Ñ","yo"],["Ð","Zh"],["ж","zh"],["Ð","Z"],["з","z"],["Ð","I"],["и","i"],["Ñй","iy"],["Ый","Iy"],["ЫÐ","IY"],["ÑÐ","iY"],["Ð","Y"],["й","y"],["Ð","K"],["к","k"],["Ð","L"],["л","l"],["Ð","M"],["м","m"],["Ð","N"],["н","n"],["Ð","O"],["о","o"],["Ð","P"],["п","p"],["Ð ","R"],["Ñ","r"],["С","S"],["Ñ","s"],["Т","T"],["Ñ","t"],["У","U"],["Ñ","u"],["Ф","F"],["Ñ","f"],["Ð¥","Kh"],["Ñ
","kh"],["Ц","Ts"],["Ñ","ts"],["Ч","Ch"],["Ñ","ch"],["Ш","Sh"],["Ñ","sh"],["Щ","Sch"],["Ñ","sch"],["Ъ",""],["Ñ",""],["Ы","Y"],["Ñ","y"],["Ь",""],["Ñ",""],["Ð","E"],["Ñ","e"],["Ю","Yu"],["Ñ","yu"],["Я","Ya"],["Ñ","ya"],["Ä","a"],["Ä","A"],["È","s"],["È","S"],["È","t"],["È","T"],["Å£","t"],["Å¢","T"],["Å","s"],["Å","S"],["ç","c"],["Ã","C"],["Ä","g"],["Ä","G"],["ı","i"],["İ","I"],["Õ¡","a"],["Ô±","A"],["Õ¢","b"],["Ô²","B"],["Õ£","g"],["Ô³","G"],["Õ¤","d"],["Ô´","D"],["Õ¥","ye"],["Ôµ","Ye"],["Õ¦","z"],["Ô¶","Z"],["Õ§","e"],["Ô·","E"],["Õ¨","y"],["Ô¸","Y"],["Õ©","t"],["Ô¹","T"],["Õª","zh"],["Ôº","Zh"],["Õ«","i"],["Ô»","I"],["Õ¬","l"],["Ô¼","L"],["Õ","kh"],["Ô½","Kh"],["Õ®","ts"],["Ô¾","Ts"],["Õ¯","k"],["Ô¿","K"],["Õ°","h"],["Õ","H"],["Õ±","dz"],["Õ","Dz"],["Õ²","gh"],["Õ","Gh"],["Õ³","tch"],["Õ","Tch"],["Õ´","m"],["Õ","M"],["Õµ","y"],["Õ
","Y"],["Õ¶","n"],["Õ","N"],["Õ·","sh"],["Õ","Sh"],["Õ¸","vo"],["Õ","Vo"],["Õ¹","ch"],["Õ","Ch"],["Õº","p"],["Õ","P"],["Õ»","j"],["Õ","J"],["Õ¼","r"],["Õ","R"],["Õ½","s"],["Õ","S"],["Õ¾","v"],["Õ","V"],["Õ¿","t"],["Õ","T"],["Ö","r"],["Õ","R"],["Ö","c"],["Õ","C"],["Õ¸Ö","u"],["ÕÕ","U"],["ÕÖ","U"],["Ö","p"],["Õ","P"],["Ö","q"],["Õ","Q"],["Ö
","o"],["Õ","O"],["Ö","f"],["Õ","F"],["Ö","yev"],["á","a"],["á","b"],["á","g"],["á","d"],["á","e"],["á","v"],["á","z"],["á","t"],["á","i"],["á","k"],["á","l"],["á","m"],["á","n"],["á","o"],["á","p"],["á","zh"],["á ","r"],["á¡","s"],["á¢","t"],["á£","u"],["á¤","ph"],["á¥","q"],["á¦","gh"],["á§","k"],["á¨","sh"],["á©","ch"],["áª","ts"],["á«","dz"],["á¬","ts"],["á","tch"],["á®","kh"],["á¯","j"],["á°","h"],["Ä","c"],["Ä","d"],["Ä","e"],["Å","n"],["Å","r"],["Å¡","s"],["Å¥","t"],["ů","u"],["ž","z"],["Ä","C"],["Ä","D"],["Ä","E"],["Å","N"],["Å","R"],["Å ","S"],["Ť","T"],["Å®","U"],["Ž","Z"],["Þ","h"],["Þ","sh"],["Þ","n"],["Þ","r"],["Þ","b"],["Þ
","lh"],["Þ","k"],["Þ","a"],["Þ","v"],["Þ","m"],["Þ","f"],["Þ","dh"],["Þ","th"],["Þ","l"],["Þ","g"],["Þ","gn"],["Þ","s"],["Þ","d"],["Þ","z"],["Þ","t"],["Þ","y"],["Þ","p"],["Þ","j"],["Þ","ch"],["Þ","tt"],["Þ","hh"],["Þ","kh"],["Þ","th"],["Þ","z"],["Þ","sh"],["Þ","s"],["Þ","d"],["Þ ","t"],["Þ¡","z"],["Þ¢","a"],["Þ£","gh"],["Þ¤","q"],["Þ¥","w"],["Þ¦","a"],["Þ§","aa"],["Þ¨","i"],["Þ©","ee"],["Þª","u"],["Þ«","oo"],["Þ¬","e"],["Þ","ey"],["Þ®","o"],["Þ¯","oa"],["Þ°",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["Ï","p"],["Ï","r"],["Ï","s"],["Ï","t"],["Ï
","y"],["Ï","f"],["Ï","x"],["Ï","ps"],["Ï","o"],["ά","a"],["Î","e"],["ί","i"],["Ï","o"],["Ï","y"],["ή","i"],["Ï","o"],["Ï","s"],["Ï","i"],["ΰ","y"],["Ï","y"],["Î","i"],["Î","A"],["Î","B"],["Î","G"],["Î","D"],["Î","E"],["Î","Z"],["Î","I"],["Î","TH"],["Î","I"],["Î","K"],["Î","L"],["Î","M"],["Î","N"],["Î","KS"],["Î","O"],["Î ","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Î¥","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Î","A"],["Î","E"],["Î","I"],["Î","O"],["Î","Y"],["Î","I"],["Î","O"],["Ϊ","I"],["Ϋ","Y"],["Ä","a"],["Ä","e"],["Ä£","g"],["Ä«","i"],["Ä·","k"],["ļ","l"],["Å","n"],["Å«","u"],["Ä","A"],["Ä","E"],["Ä¢","G"],["Ī","I"],["Ķ","K"],["Ä»","L"],["Å
","N"],["Ū","U"],["Ä","c"],["Å¡","s"],["ž","z"],["Ä","C"],["Å ","S"],["Ž","Z"],["Ä
","a"],["Ä","c"],["Ä","e"],["Ä","e"],["į","i"],["Å¡","s"],["ų","u"],["Å«","u"],["ž","z"],["Ä","A"],["Ä","C"],["Ä","E"],["Ä","E"],["Ä®","I"],["Å ","S"],["Ų","U"],["Ū","U"],["Ð","Kj"],["Ñ","kj"],["Ð","Lj"],["Ñ","lj"],["Ð","Nj"],["Ñ","nj"],["ТÑ","Ts"],["ÑÑ","ts"],["Ä
","a"],["Ä","c"],["Ä","e"],["Å","l"],["Å","n"],["Å","s"],["ź","z"],["ż","z"],["Ä","A"],["Ä","C"],["Ä","E"],["Å","L"],["Å","N"],["Å","S"],["Ź","Z"],["Å»","Z"],["Ð","Ye"],["Ð","I"],["Ð","Yi"],["Ò","G"],["Ñ","ye"],["Ñ","i"],["Ñ","yi"],["Ò","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["Â¥","Y"],["ß¿","b"],["à§³","t"],["૱","Bo"],["฿","B"],["â ","CE"],["â¡","C"],["â¢","Cr"],["â£","F"],["â¥","m"],["â¦","N"],["â§","Pt"],["â¨","Rs"],["â©","W"],["â«","s"],["â¬","E"],["â","K"],["â®","T"],["â¯","Dp"],["â°","S"],["â±","P"],["â²","G"],["â³","A"],["â´","S"],["âµ","C"],["â¶","tt"],["â·","S"],["â¸","T"],["â¹","R"],["âº","L"],["â½","P"],["â¿","B"],["﹩","$"],["ï¿ ","c"],["ï¿¥","Y"],["₩","W"],["ð","A"],["ð","B"],["ð","C"],["ð","D"],["ð","E"],["ð
","F"],["ð","G"],["ð","H"],["ð","I"],["ð","J"],["ð","K"],["ð","L"],["ð","M"],["ð","N"],["ð","O"],["ð","P"],["ð","Q"],["ð","R"],["ð","S"],["ð","T"],["ð","U"],["ð","V"],["ð","W"],["ð","X"],["ð","Y"],["ð","Z"],["ð","a"],["ð","b"],["ð","c"],["ð","d"],["ð","e"],["ð","f"],["ð ","g"],["ð¡","h"],["ð¢","i"],["ð£","j"],["ð¤","k"],["ð¥","l"],["ð¦","m"],["ð§","n"],["ð¨","o"],["ð©","p"],["ðª","q"],["ð«","r"],["ð¬","s"],["ð","t"],["ð®","u"],["ð¯","v"],["ð°","w"],["ð±","x"],["ð²","y"],["ð³","z"],["ð´","A"],["ðµ","B"],["ð¶","C"],["ð·","D"],["ð¸","E"],["ð¹","F"],["ðº","G"],["ð»","H"],["ð¼","I"],["ð½","J"],["ð¾","K"],["ð¿","L"],["ð","M"],["ð","N"],["ð","O"],["ð","P"],["ð","Q"],["ð
","R"],["ð","S"],["ð","T"],["ð","U"],["ð","V"],["ð","W"],["ð","X"],["ð","Y"],["ð","Z"],["ð","a"],["ð","b"],["ð","c"],["ð","d"],["ð","e"],["ð","f"],["ð","g"],["ð","i"],["ð","j"],["ð","k"],["ð","l"],["ð","m"],["ð","n"],["ð","o"],["ð","p"],["ð","q"],["ð","r"],["ð ","s"],["ð¡","t"],["ð¢","u"],["ð£","v"],["ð¤","w"],["ð¥","x"],["ð¦","y"],["ð§","z"],["ð¨","A"],["ð©","B"],["ðª","C"],["ð«","D"],["ð¬","E"],["ð","F"],["ð®","G"],["ð¯","H"],["ð°","I"],["ð±","J"],["ð²","K"],["ð³","L"],["ð´","M"],["ðµ","N"],["ð¶","O"],["ð·","P"],["ð¸","Q"],["ð¹","R"],["ðº","S"],["ð»","T"],["ð¼","U"],["ð½","V"],["ð¾","W"],["ð¿","X"],["ð","Y"],["ð","Z"],["ð","a"],["ð","b"],["ð","c"],["ð
","d"],["ð","e"],["ð","f"],["ð","g"],["ð","h"],["ð","i"],["ð","j"],["ð","k"],["ð","l"],["ð","m"],["ð","n"],["ð","o"],["ð","p"],["ð","q"],["ð","r"],["ð","s"],["ð","t"],["ð","u"],["ð","v"],["ð","w"],["ð","x"],["ð","y"],["ð","z"],["ð","A"],["ð","C"],["ð","D"],["ð¢","g"],["ð¥","J"],["ð¦","K"],["ð©","N"],["ðª","O"],["ð«","P"],["ð¬","Q"],["ð®","S"],["ð¯","T"],["ð°","U"],["ð±","V"],["ð²","W"],["ð³","X"],["ð´","Y"],["ðµ","Z"],["ð¶","a"],["ð·","b"],["ð¸","c"],["ð¹","d"],["ð»","f"],["ð½","h"],["ð¾","i"],["ð¿","j"],["ð","h"],["ð","l"],["ð","m"],["ð","n"],["ð
","p"],["ð","q"],["ð","r"],["ð","s"],["ð","t"],["ð","u"],["ð","v"],["ð","w"],["ð","x"],["ð","y"],["ð","z"],["ð","A"],["ð","B"],["ð","C"],["ð","D"],["ð","E"],["ð","F"],["ð","G"],["ð","H"],["ð","I"],["ð","J"],["ð","K"],["ð","L"],["ð","M"],["ð","N"],["ð","O"],["ð","P"],["ð ","Q"],["ð¡","R"],["ð¢","S"],["ð£","T"],["ð¤","U"],["ð¥","V"],["ð¦","W"],["ð§","X"],["ð¨","Y"],["ð©","Z"],["ðª","a"],["ð«","b"],["ð¬","c"],["ð","d"],["ð®","e"],["ð¯","f"],["ð°","g"],["ð±","h"],["ð²","i"],["ð³","j"],["ð´","k"],["ðµ","l"],["ð¶","m"],["ð·","n"],["ð¸","o"],["ð¹","p"],["ðº","q"],["ð»","r"],["ð¼","s"],["ð½","t"],["ð¾","u"],["ð¿","v"],["ð","w"],["ð","x"],["ð","y"],["ð","z"],["ð","A"],["ð
","B"],["ð","D"],["ð","E"],["ð","F"],["ð","G"],["ð","J"],["ð","K"],["ð","L"],["ð","M"],["ð","N"],["ð","O"],["ð","P"],["ð","Q"],["ð","S"],["ð","T"],["ð","U"],["ð","V"],["ð","W"],["ð","X"],["ð","Y"],["ð","a"],["ð","b"],["ð ","c"],["ð¡","d"],["ð¢","e"],["ð£","f"],["ð¤","g"],["ð¥","h"],["ð¦","i"],["ð§","j"],["ð¨","k"],["ð©","l"],["ðª","m"],["ð«","n"],["ð¬","o"],["ð","p"],["ð®","q"],["ð¯","r"],["ð°","s"],["ð±","t"],["ð²","u"],["ð³","v"],["ð´","w"],["ðµ","x"],["ð¶","y"],["ð·","z"],["ð¸","A"],["ð¹","B"],["ð»","D"],["ð¼","E"],["ð½","F"],["ð¾","G"],["ð","I"],["ð","J"],["ð","K"],["ð","L"],["ð","M"],["ð","N"],["ð","S"],["ð","T"],["ð","U"],["ð","V"],["ð","W"],["ð","X"],["ð","Y"],["ð","a"],["ð","b"],["ð","c"],["ð","d"],["ð","e"],["ð","f"],["ð","g"],["ð","h"],["ð","i"],["ð","j"],["ð","k"],["ð","l"],["ð","m"],["ð","n"],["ð ","o"],["ð¡","p"],["ð¢","q"],["ð£","r"],["ð¤","s"],["ð¥","t"],["ð¦","u"],["ð§","v"],["ð¨","w"],["ð©","x"],["ðª","y"],["ð«","z"],["ð¬","A"],["ð","B"],["ð®","C"],["ð¯","D"],["ð°","E"],["ð±","F"],["ð²","G"],["ð³","H"],["ð´","I"],["ðµ","J"],["ð¶","K"],["ð·","L"],["ð¸","M"],["ð¹","N"],["ðº","O"],["ð»","P"],["ð¼","Q"],["ð½","R"],["ð¾","S"],["ð¿","T"],["ð","U"],["ð","V"],["ð","W"],["ð","X"],["ð","Y"],["ð
","Z"],["ð","a"],["ð","b"],["ð","c"],["ð","d"],["ð","e"],["ð","f"],["ð","g"],["ð","h"],["ð","i"],["ð","j"],["ð","k"],["ð","l"],["ð","m"],["ð","n"],["ð","o"],["ð","p"],["ð","q"],["ð","r"],["ð","s"],["ð","t"],["ð","u"],["ð","v"],["ð","w"],["ð","x"],["ð","y"],["ð","z"],["ð ","A"],["ð¡","B"],["ð¢","C"],["ð£","D"],["ð¤","E"],["ð¥","F"],["ð¦","G"],["ð§","H"],["ð¨","I"],["ð©","J"],["ðª","K"],["ð«","L"],["ð¬","M"],["ð","N"],["ð®","O"],["ð¯","P"],["ð°","Q"],["ð±","R"],["ð²","S"],["ð³","T"],["ð´","U"],["ðµ","V"],["ð¶","W"],["ð·","X"],["ð¸","Y"],["ð¹","Z"],["ðº","a"],["ð»","b"],["ð¼","c"],["ð½","d"],["ð¾","e"],["ð¿","f"],["ð","g"],["ð","h"],["ð","i"],["ð","j"],["ð","k"],["ð
","l"],["ð","m"],["ð","n"],["ð","o"],["ð","p"],["ð","q"],["ð","r"],["ð","s"],["ð","t"],["ð","u"],["ð","v"],["ð","w"],["ð","x"],["ð","y"],["ð","z"],["ð","A"],["ð","B"],["ð","C"],["ð","D"],["ð","E"],["ð","F"],["ð","G"],["ð","H"],["ð","I"],["ð","J"],["ð","K"],["ð","L"],["ð ","M"],["ð¡","N"],["ð¢","O"],["ð£","P"],["ð¤","Q"],["ð¥","R"],["ð¦","S"],["ð§","T"],["ð¨","U"],["ð©","V"],["ðª","W"],["ð«","X"],["ð¬","Y"],["ð","Z"],["ð®","a"],["ð¯","b"],["ð°","c"],["ð±","d"],["ð²","e"],["ð³","f"],["ð´","g"],["ðµ","h"],["ð¶","i"],["ð·","j"],["ð¸","k"],["ð¹","l"],["ðº","m"],["ð»","n"],["ð¼","o"],["ð½","p"],["ð¾","q"],["ð¿","r"],["ð","s"],["ð","t"],["ð","u"],["ð","v"],["ð","w"],["ð
","x"],["ð","y"],["ð","z"],["ð","A"],["ð","B"],["ð","C"],["ð","D"],["ð","E"],["ð","F"],["ð","G"],["ð","H"],["ð","I"],["ð","J"],["ð","K"],["ð","L"],["ð","M"],["ð","N"],["ð","O"],["ð","P"],["ð","Q"],["ð","R"],["ð","S"],["ð","T"],["ð","U"],["ð","V"],["ð","W"],["ð","X"],["ð ","Y"],["ð¡","Z"],["ð¢","a"],["ð£","b"],["ð¤","c"],["ð¥","d"],["ð¦","e"],["ð§","f"],["ð¨","g"],["ð©","h"],["ðª","i"],["ð«","j"],["ð¬","k"],["ð","l"],["ð®","m"],["ð¯","n"],["ð°","o"],["ð±","p"],["ð²","q"],["ð³","r"],["ð´","s"],["ðµ","t"],["ð¶","u"],["ð·","v"],["ð¸","w"],["ð¹","x"],["ðº","y"],["ð»","z"],["ð¼","A"],["ð½","B"],["ð¾","C"],["ð¿","D"],["ð","E"],["ð","F"],["ð","G"],["ð","H"],["ð","I"],["ð
","J"],["ð","K"],["ð","L"],["ð","M"],["ð","N"],["ð","O"],["ð","P"],["ð","Q"],["ð","R"],["ð","S"],["ð","T"],["ð","U"],["ð","V"],["ð","W"],["ð","X"],["ð","Y"],["ð","Z"],["ð","a"],["ð","b"],["ð","c"],["ð","d"],["ð","e"],["ð","f"],["ð","g"],["ð","h"],["ð","i"],["ð","j"],["ð ","k"],["ð¡","l"],["ð¢","m"],["ð£","n"],["ð¤","o"],["ð¥","p"],["ð¦","q"],["ð§","r"],["ð¨","s"],["ð©","t"],["ðª","u"],["ð«","v"],["ð¬","w"],["ð","x"],["ð®","y"],["ð¯","z"],["ð°","A"],["ð±","B"],["ð²","C"],["ð³","D"],["ð´","E"],["ðµ","F"],["ð¶","G"],["ð·","H"],["ð¸","I"],["ð¹","J"],["ðº","K"],["ð»","L"],["ð¼","M"],["ð½","N"],["ð¾","O"],["ð¿","P"],["ð","Q"],["ð","R"],["ð","S"],["ð","T"],["ð","U"],["ð
","V"],["ð","W"],["ð","X"],["ð","Y"],["ð","Z"],["ð","a"],["ð","b"],["ð","c"],["ð","d"],["ð","e"],["ð","f"],["ð","g"],["ð","h"],["ð","i"],["ð","j"],["ð","k"],["ð","l"],["ð","m"],["ð","n"],["ð","o"],["ð","p"],["ð","q"],["ð","r"],["ð","s"],["ð","t"],["ð","u"],["ð","v"],["ð ","w"],["ð¡","x"],["ð¢","y"],["ð£","z"],["ð¤","l"],["ð¥","j"],["ð¢","A"],["ð£","B"],["ð¤","G"],["ð¥","D"],["ð¦","E"],["ð§","Z"],["ð¨","I"],["ð©","TH"],["ðª","I"],["ð«","K"],["ð¬","L"],["ð","M"],["ð®","N"],["ð¯","KS"],["ð°","O"],["ð±","P"],["ð²","R"],["ð³","TH"],["ð´","S"],["ðµ","T"],["ð¶","Y"],["ð·","F"],["ð¸","x"],["ð¹","PS"],["ðº","O"],["ð»","D"],["ð¼","a"],["ð½","b"],["ð¾","g"],["ð¿","d"],["ð","e"],["ð","z"],["ð","i"],["ð","th"],["ð","i"],["ð
","k"],["ð","l"],["ð","m"],["ð","n"],["ð","ks"],["ð","o"],["ð","p"],["ð","r"],["ð","s"],["ð","s"],["ð","t"],["ð","y"],["ð","f"],["ð","x"],["ð","ps"],["ð","o"],["ð","d"],["ð","E"],["ð","TH"],["ð","K"],["ð","f"],["ð","r"],["ð","p"],["ð","A"],["ð","V"],["ð","G"],["ð","D"],["ð ","E"],["ð¡","Z"],["ð¢","I"],["ð£","TH"],["ð¤","I"],["ð¥","K"],["ð¦","L"],["ð§","M"],["ð¨","N"],["ð©","KS"],["ðª","O"],["ð«","P"],["ð¬","S"],["ð","TH"],["ð®","S"],["ð¯","T"],["ð°","Y"],["ð±","F"],["ð²","X"],["ð³","PS"],["ð´","O"],["ðµ","D"],["ð¶","a"],["ð·","v"],["ð¸","g"],["ð¹","d"],["ðº","e"],["ð»","z"],["ð¼","i"],["ð½","th"],["ð¾","i"],["ð¿","k"],["ð","l"],["ð","m"],["ð","n"],["ð","ks"],["ð","o"],["ð
","p"],["ð","r"],["ð","s"],["ð","s"],["ð","t"],["ð","y"],["ð","f"],["ð","x"],["ð","ps"],["ð","o"],["ð","a"],["ð","e"],["ð","i"],["ð","k"],["ð","f"],["ð","r"],["ð","p"],["ð","A"],["ð","B"],["ð","G"],["ð","D"],["ð","E"],["ð","Z"],["ð","I"],["ð","TH"],["ð","I"],["ð","K"],["ð ","L"],["ð¡","M"],["ð¢","N"],["ð£","KS"],["ð¤","O"],["ð¥","P"],["ð¦","R"],["ð§","TH"],["ð¨","S"],["ð©","T"],["ðª","Y"],["ð«","F"],["ð¬","X"],["ð","PS"],["ð®","O"],["ð¯","D"],["ð°","a"],["ð±","v"],["ð²","g"],["ð³","d"],["ð´","e"],["ðµ","z"],["ð¶","i"],["ð·","th"],["ð¸","i"],["ð¹","k"],["ðº","l"],["ð»","m"],["ð¼","n"],["ð½","ks"],["ð¾","o"],["ð¿","p"],["ð","r"],["ð","s"],["ð","s"],["ð","t"],["ð","y"],["ð
","f"],["ð","x"],["ð","ps"],["ð","o"],["ð","a"],["ð","e"],["ð","i"],["ð","k"],["ð","f"],["ð","r"],["ð","p"],["ð","A"],["ð","V"],["ð","G"],["ð","D"],["ð","E"],["ð","Z"],["ð","I"],["ð","TH"],["ð","I"],["ð","K"],["ð","L"],["ð","M"],["ð","N"],["ð","KS"],["ð","O"],["ð","P"],["ð ","S"],["ð¡","TH"],["ð¢","S"],["ð£","T"],["ð¤","Y"],["ð¥","F"],["ð¦","X"],["ð§","PS"],["ð¨","O"],["ð©","D"],["ðª","av"],["ð«","g"],["ð¬","d"],["ð","e"],["ð®","z"],["ð¯","i"],["ð°","i"],["ð±","th"],["ð²","i"],["ð³","k"],["ð´","l"],["ðµ","m"],["ð¶","n"],["ð·","ks"],["ð¸","o"],["ð¹","p"],["ðº","r"],["ð»","s"],["ð¼","s"],["ð½","t"],["ð¾","y"],["ð¿","f"],["ð","x"],["ð","ps"],["ð","o"],["ð","a"],["ð","e"],["ð
","i"],["ð","k"],["ð","f"],["ð","r"],["ð","p"],["ð","F"],["ð","f"],["â","(a)"],["â","(b)"],["â","(c)"],["â","(d)"],["â ","(e)"],["â¡","(f)"],["â¢","(g)"],["â£","(h)"],["â¤","(i)"],["â¥","(j)"],["â¦","(k)"],["â§","(l)"],["â¨","(m)"],["â©","(n)"],["âª","(o)"],["â«","(p)"],["â¬","(q)"],["â","(r)"],["â®","(s)"],["â¯","(t)"],["â°","(u)"],["â±","(v)"],["â²","(w)"],["â³","(x)"],["â´","(y)"],["âµ","(z)"],["â¶","(A)"],["â·","(B)"],["â¸","(C)"],["â¹","(D)"],["âº","(E)"],["â»","(F)"],["â¼","(G)"],["â½","(H)"],["â¾","(I)"],["â¿","(J)"],["â","(K)"],["â","(L)"],["â","(N)"],["â","(O)"],["â
","(P)"],["â","(Q)"],["â","(R)"],["â","(S)"],["â","(T)"],["â","(U)"],["â","(V)"],["â","(W)"],["â","(X)"],["â","(Y)"],["â","(Z)"],["â","(a)"],["â","(b)"],["â","(b)"],["â","(c)"],["â","(e)"],["â","(f)"],["â","(g)"],["â","(h)"],["â","(i)"],["â","(j)"],["â","(k)"],["â","(l)"],["â","(m)"],["â","(n)"],["â","(o)"],["â","(p)"],["â ","(q)"],["â¡","(r)"],["â¢","(s)"],["â£","(t)"],["â¤","(u)"],["â¥","(v)"],["â¦","(w)"],["â§","(x)"],["â¨","(y)"],["â©","(z)"],["Ä","C"],["Ä","c"],["Ä ","G"],["Ä¡","g"],["Ħ","H"],["ħ","h"],["Å»","Z"],["ż","z"],["ð","0"],["ð","1"],["ð","2"],["ð","3"],["ð","4"],["ð","5"],["ð","6"],["ð","7"],["ð","8"],["ð","9"],["ð","0"],["ð","1"],["ð","2"],["ð","3"],["ð","4"],["ð","5"],["ð","6"],["ð","7"],["ð ","8"],["ð¡","9"],["ð¢","0"],["ð£","1"],["ð¤","2"],["ð¥","3"],["ð¦","4"],["ð§","5"],["ð¨","6"],["ð©","7"],["ðª","8"],["ð«","9"],["ð¬","0"],["ð","1"],["ð®","2"],["ð¯","3"],["ð°","4"],["ð±","5"],["ð²","6"],["ð³","7"],["ð´","8"],["ðµ","9"],["ð¶","0"],["ð·","1"],["ð¸","2"],["ð¹","3"],["ðº","4"],["ð»","5"],["ð¼","6"],["ð½","7"],["ð¾","8"],["ð¿","9"],["â ","1"],["â¡","2"],["â¢","3"],["â£","4"],["â¤","5"],["â¥","6"],["â¦","7"],["â§","8"],["â¨","9"],["â©","10"],["âª","11"],["â«","12"],["â¬","13"],["â","14"],["â®","15"],["â¯","16"],["â°","17"],["â±","18"],["â²","19"],["â³","20"],["â´","1"],["âµ","2"],["â¶","3"],["â·","4"],["â¸","5"],["â¹","6"],["âº","7"],["â»","8"],["â¼","9"],["â½","10"],["â¾","11"],["â¿","12"],["â","13"],["â","14"],["â","15"],["â","16"],["â","17"],["â
","18"],["â","19"],["â","20"],["â","1."],["â","2."],["â","3."],["â","4."],["â","5."],["â","6."],["â","7."],["â","8."],["â","9."],["â","10."],["â","11."],["â","12."],["â","13."],["â","14."],["â","15."],["â","16."],["â","17."],["â","18."],["â","19."],["â","20."],["âª","0"],["â«","11"],["â¬","12"],["â","13"],["â®","14"],["â¯","15"],["â°","16"],["â±","17"],["â²","18"],["â³","19"],["â´","20"],["âµ","1"],["â¶","2"],["â·","3"],["â¸","4"],["â¹","5"],["âº","6"],["â»","7"],["â¼","8"],["â½","9"],["â¾","10"],["â¿","0"],["ð°","&"],["ð±","&"],["ð²","&"],["ð³","&"],["ð´","&"],["ðµ","&"],["ð¶",'"'],["ð·",'"'],["ð¸",'"'],["â½","?!"],["ð¹","?!"],["ðº","?!"],["ð»","?!"],["ð¼","/"],["ð½","\\"],["ð","AR"],["ð","V"],["ð","V"],["ð","VR"],["ð
","VF"],["ð©","2"],["ðª","5"],["ð¡","f"],["ð¢","W"],["ð£","U"],["ð§","V"],["ð¨","T"],["ðª","V"],["ð«","MB"],["ð¬","VB"],["ð²","3B"],["ð³","3B"],["ð¯","100"],["ð","BACK"],["ð","END"],["ð","ON!"],["ð","SOON"],["ð","TOP"],["ð","18"],["ð¤","abc"],["ð ","ABCD"],["ð¡","abcd"],["ð¢","1234"],["ð£","T&@%"],["#ï¸â£","#"],["*ï¸â£","*"],["0ï¸â£","0"],["1ï¸â£","1"],["2ï¸â£","2"],["3ï¸â£","3"],["4ï¸â£","4"],["5ï¸â£","5"],["6ï¸â£","6"],["7ï¸â£","7"],["8ï¸â£","8"],["9ï¸â£","9"],["ð","10"],["ð
°ï¸","A"],["ð
±ï¸","B"],["ð","AB"],["ð","CL"],["ð
¾ï¸","O"],["ð
¿","P"],["ð","SOS"],["ð
²","C"],["ð
³","D"],["ð
´","E"],["ð
µ","F"],["ð
¶","G"],["ð
·","H"],["ð
¸","I"],["ð
¹","J"],["ð
º","K"],["ð
»","L"],["ð
¼","M"],["ð
½","N"],["ð","Q"],["ð","R"],["ð","S"],["ð","T"],["ð","U"],["ð
","V"],["ð","W"],["ð","X"],["ð","Y"],["ð","Z"]],
8doCustomReplacements=(t,e)=>{for(const[r,s]of e)t=t.replace(new RegExp(escapeStringRegexp(r),"g"),s);return t};function transliterate(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const r=new Map([...replacements,...e.customReplacements]);return t=t.normalize(),t=doCustomReplacements(t,r),t=t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").normalize(),t}const overridableReplacements=[["&"," and "],["ð¦"," unicorn "],["â¥"," love "]],decamelize=t=>t.replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2"),removeMootSeparators=(t,e)=>{const r=escapeStringRegexp(e);return t.replace(new RegExp(`${r}{2,}`,"g"),e).replace(new RegExp(`^${r}|${r}$`,"g"),"")},buildPatternSlug=t=>{let e="a-z\\d";if(e+=t.lowercase?"":"A-Z",t.preserveCharacters.length>0)for(const r of t.preserveCharacters){if(r===t.separator)throw new Error(`The separator character \`${t.separator}\` cannot be included in preserved characters: ${t.preserveCharacters}`);e+=escapeStringRegexp(r)}return new RegExp(`[^${e}]+`,"g")};function slugify(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...e};const r=e.preserveLeadingUnderscore&&t.startsWith("_"),s=e.preserveTrailingDash&&t.endsWith("-"),o=new Map([...overridableReplacements,...e.customReplacements]);t=transliterate(t,{customReplacements:o}),e.decamelize&&(t=decamelize(t));const d=buildPatternSlug(e);return e.lowercase&&(t=t.toLowerCase()),t=t.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3"),t=t.replace(d,e.separator),t=t.replace(/\\/g,""),e.separator&&(t=removeMootSeparators(t,e.separator)),r&&(t=`_${t}`),s&&(t=`${t}-`),t}const LOCALE_DEFAULT="en",getAllCookieIdsString=t=>getCookieIds([...t.cookies.necessary,...t.cookies.optional]).join(""),getCookieId=t=>t.id||slugify(resolveTranslatable(t.name)),getCookieIds=t=>t.map(e=>getCookieId(e)),removeCookie=t=>useCookie(t,{expires:new Date(0)}),resolveTranslatable=(t,e=LOCALE_DEFAULT)=>{if(typeof t=="string")return t;if(!e)throw new Error("No locale given for translatable that is not a string.");const r=t[e];if(!r)throw new Error(`Could not get translation for locale ${e}.`);return r},moduleOptions={barPosition:"bottom-full",closeModalOnClickOutside:!0,colors:{barBackground:"#000",barButtonBackground:"#fff",barButtonColor:"#000",barButtonHoverBackground:"#333",barButtonHoverColor:"#fff",barTextColor:"#fff",checkboxActiveBackground:"#000",checkboxActiveCircleBackground:"#fff",checkboxDisabledBackground:"#ddd",checkboxDisabledCircleBackground:"#fff",checkboxInactiveBackground:"#000",checkboxInactiveCircleBackground:"#fff",controlButtonBackground:"#fff",controlButtonHoverBackground:"#000",controlButtonIconColor:"#000",controlButtonIconHoverColor:"#fff",focusRingColor:"#808080",modalBackground:"#fff",modalButtonBackground:"#000",modalButtonColor:"#fff",modalButtonHoverBackground:"#333",modalButtonHoverColor:"#fff",modalOverlay:"#000",modalOverlayOpacity:.8,modalTextColor:"#000",modalUnsavedColor:"#fff"},cookies:{necessary:[{name:{en:"Default cookies"},description:{en:"Used for cookie control."},cookies:["cookie_control_consent","cookie_control_enabled_cookies"]}],optional:[{name:{en:"Google Analytics"},description:{en:"Google Analytics is a web analytics service offered by Google that tracks and reports website traffic."},async:!0,cookies:["_ga","_ga_RF9408XSRR","_gid"]}]},cookieExpiryOffsetMs:31536e6,cookieNameIsConsentGiven:"ncc_c",cookieNameCookiesEnabledIds:"ncc_e",cookieOptions:{path:"/"},isAcceptNecessaryButtonEnabled:!0,isControlButtonEnabled:!1,isCookieIdVisible:!1,isCssEnabled:!0,isCssPonyfillEnabled:!1,isDashInDescriptionEnabled:!0,isIframeBlocked:!1,isModalForced:!1,locales:["en","en"],localeTexts:{en:{accept:"Accept",acceptAll:"Accept all",bannerDescription:"We use our own cookies and third-party cookies so that we can display this website correctly and better understand how this website is used, with a view to improving the services we offer. A decision on cookie usage permissions can be changed anytime using the cookie button that will appear after a selection has been made on this banner.",bannerTitle:"Cookies",close:"Close",cookiesFunctional:"Functional cookies",cookiesNecessary:"Necessary cookies",cookiesOptional:"Optional cookies",decline:"Decline",declineAll:"Decline all",here:"here",iframeBlocked:"To see this, please enable functional cookies",manageCookies:"Learn more and customize",save:"Remember",settingsUnsaved:"You have unsaved settings"}}},plugin=defineNuxtPlugin(t=>{var er;const e=useCookie(moduleOptions.cookieNameIsConsentGiven,moduleOptions.cookieOptions),r=(er=useCookie(moduleOptions.cookieNameCookiesEnabledIds,moduleOptions.cookieOptions).value)==null?void 0:er.split("|"),s=ref$2(e===void 0?void 0:e.value===getAllCookieIdsString(moduleOptions)),o=ref$2(r===void 0?void 0:[...moduleOptions.cookies.necessary.filter(tr=>r.includes(getCookieId(tr))),...moduleOptions.cookies.optional.filter(tr=>r.includes(getCookieId(tr)))]),d=ref$2(r),L=ref$2(),ge=ref$2();return{provide:{cookies:{cookiesEnabled:o,cookiesEnabledIds:d,isConsentGiven:s,isModalActive:L,locale:ge,moduleOptions}}}}),isDefer=t=>t==="defer"||t===!1;function useAsyncData(...t){var ar;const e=typeof t[t.length-1]=="string"?t.pop():void 0;
8typeof t[0]!="string"&&t.unshift(e);let[r,s,o={}]=t;if(typeof r!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof s!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const d=useNuxtApp(),L=s,ge=()=>null,Mt=()=>d.isHydrating?d.payload.data[r]:d.static.data[r];o.server=o.server??!0,o.default=o.default??ge,o.getCachedData=o.getCachedData??Mt,o.lazy=o.lazy??!1,o.immediate=o.immediate??!0,o.deep=o.deep??asyncDataDefaults.deep,o.dedupe=o.dedupe??"cancel";const er=()=>o.getCachedData(r,d)!=null;if(!d._asyncData[r]||!o.immediate){(ar=d.payload._errors)[r]??(ar[r]=null);const sr=o.deep?ref$2:shallowRef;d._asyncData[r]={data:sr(o.getCachedData(r,d)??o.default()),pending:ref$2(!er()),error:toRef(d.payload._errors,r),status:ref$2("idle")}}const tr={...d._asyncData[r]};tr.refresh=tr.execute=(sr={})=>{if(d._asyncDataPromises[r]){if(isDefer(sr.dedupe??o.dedupe))return d._asyncDataPromises[r];d._asyncDataPromises[r].cancelled=!0}if((sr._initial||d.isHydrating&&sr._initial!==!1)&&er())return Promise.resolve(o.getCachedData(r,d));tr.pending.value=!0,tr.status.value="pending";const lr=new Promise((cr,ur)=>{try{cr(L(d))}catch(or){ur(or)}}).then(async cr=>{if(lr.cancelled)return d._asyncDataPromises[r];let ur=cr;o.transform&&(ur=await o.transform(cr)),o.pick&&(ur=pick(ur,o.pick)),d.payload.data[r]=ur,tr.data.value=ur,tr.error.value=null,tr.status.value="success"}).catch(cr=>{if(lr.cancelled)return d._asyncDataPromises[r];tr.error.value=createError(cr),tr.data.value=unref(o.default()),tr.status.value="error"}).finally(()=>{lr.cancelled||(tr.pending.value=!1,delete d._asyncDataPromises[r])});return d._asyncDataPromises[r]=lr,d._asyncDataPromises[r]},tr.clear=()=>clearNuxtDataByKey(d,r);const ir=()=>tr.refresh({_initial:!0}),rr=o.server!==!1&&d.payload.serverRendered;{const sr=getCurrentInstance();if(sr&&!sr._nuxtOnBeforeMountCbs){sr._nuxtOnBeforeMountCbs=[];const ur=sr._nuxtOnBeforeMountCbs;onBeforeMount(()=>{ur.forEach(or=>{or()}),ur.splice(0,ur.length)}),onUnmounted(()=>ur.splice(0,ur.length))}rr&&d.isHydrating&&(tr.error.value||er())?(tr.pending.value=!1,tr.status.value=tr.error.value?"error":"success"):sr&&(d.payload.serverRendered&&d.isHydrating||o.lazy)&&o.immediate?sr._nuxtOnBeforeMountCbs.push(ir):o.immediate&&ir();const lr=getCurrentScope();if(o.watch){const ur=watch(o.watch,()=>tr.refresh());lr&&onScopeDispose(ur)}const cr=d.hook("app:data:refresh",async ur=>{(!ur||ur.includes(r))&&await tr.refresh()});lr&&onScopeDispose(cr)}const nr=Promise.resolve(d._asyncDataPromises[r]).then(()=>tr);return Object.assign(nr,tr),nr}function clearNuxtDataByKey(t,e){e in t.payload.data&&(t.payload.data[e]=void 0),e in t.payload._errors&&(t.payload._errors[e]=null),t._asyncData[e]&&(t._asyncData[e].data.value=void 0,t._asyncData[e].error.value=null,t._asyncData[e].pending.value=!1,t._asyncData[e].status.value="idle"),e in t._asyncDataPromises&&(t._asyncDataPromises[e].cancelled=!0,t._asyncDataPromises[e]=void 0)}function pick(t,e){const r={};for(const s of e)r[s]=t[s];return r}async function preloadRouteComponents(t,e=useRouter$1()){const{path:r,matched:s}=e.resolve(t);if(!s.length||(e._routePreloaded||(e._routePreloaded=new Set),e._routePreloaded.has(r)))return;const o=e._preloadPromises=e._preloadPromises||[];if(o.length>4)return Promise.all(o).then(()=>preloadRouteComponents(t,e));e._routePreloaded.add(r);const d=s.map(L=>{var ge;return(ge=L.components)==null?void 0:ge.default}).filter(L=>typeof L=="function");for(const L of d){const ge=Promise.resolve(L()).catch(()=>{}).finally(()=>o.splice(o.indexOf(ge)));o.push(ge)}await Promise.all(o)}function reloadNuxtApp(t={}){const e=t.path||window.location.pathname;let r={};try{r=destr(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(t.force||(r==null?void 0:r.path)!==e||(r==null?void 0:r.expires)<Date.now()){try{sessionStorage.setItem("nuxt:reload",JSON.stringify({path:e,expires:Date.now()+(t.ttl??1e4)}))}catch{}if(t.persistState)try{sessionStorage.setItem("nuxt:reload:state",JSON.stringify({state:useNuxtApp().payload.state}))}catch{}window.location.pathname!==e?window.location.href=e:window.location.reload()}}const clientOnlySymbol=Symbol.for("nuxt:client-only"),__nuxt_component_2$1=defineComponent({name:"ClientOnly",
8inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(t,{slots:e,attrs:r}){const s=ref$2(!1);return onMounted(()=>{s.value=!0}),provide(clientOnlySymbol,!0),o=>{var Mt;if(s.value)return(Mt=e.default)==null?void 0:Mt.call(e);const d=e.fallback||e.placeholder;if(d)return d();const L=o.fallback||o.placeholder||"",ge=o.fallbackTag||o.placeholderTag||"span";return createElementBlock(ge,r,L)}}}),firstNonUndefined=(...t)=>t.find(e=>e!==void 0);function defineNuxtLink(t){const e=t.componentName||"NuxtLink";function r(s,o){if(!s||t.trailingSlash!=="append"&&t.trailingSlash!=="remove")return s;if(typeof s=="string")return applyTrailingSlashBehavior(s,t.trailingSlash);const d="path"in s&&s.path!==void 0?s.path:o(s).path;return{...s,name:void 0,path:applyTrailingSlashBehavior(d,t.trailingSlash)}}return defineComponent({name:e,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},setup(s,{slots:o}){const d=useRouter$1(),L=useRuntimeConfig(),ge=computed(()=>{const ar=s.to||s.href||"";return r(ar,d.resolve)}),Mt=computed(()=>typeof ge.value=="string"&&hasProtocol(ge.value,{acceptRelative:!0})),er=computed(()=>s.target&&s.target!=="_self"),tr=computed(()=>s.external||er.value?!0:typeof ge.value=="object"?!1:ge.value===""||Mt.value),ir=ref$2(!1),rr=ref$2(null),nr=ar=>{var sr;rr.value=s.custom?(sr=ar==null?void 0:ar.$el)==null?void 0:sr.nextElementSibling:ar==null?void 0:ar.$el};if(s.prefetch!==!1&&s.noPrefetch!==!0&&s.target!=="_blank"&&!isSlowConnection()){const sr=useNuxtApp();let lr,cr=null;onMounted(()=>{const ur=useObserver();onNuxtReady(()=>{lr=requestIdleCallback(()=>{var or;(or=rr==null?void 0:rr.value)!=null&&or.tagName&&(cr=ur.observe(rr.value,async()=>{cr==null||cr(),cr=null;const dr=typeof ge.value=="string"?ge.value:d.resolve(ge.value).fullPath;await Promise.all([sr.hooks.callHook("link:prefetch",dr).catch(()=>{}),!tr.value&&preloadRouteComponents(ge.value,d).catch(()=>{})]),ir.value=!0}))})})}),onBeforeUnmount(()=>{lr&&cancelIdleCallback(lr),cr==null||cr(),cr=null})}return()=>{var cr,ur;if(!tr.value){const or={ref:nr,to:ge.value,activeClass:s.activeClass||t.activeClass,exactActiveClass:s.exactActiveClass||t.exactActiveClass,replace:s.replace,ariaCurrentValue:s.ariaCurrentValue,custom:s.custom};return s.custom||(ir.value&&(or.class=s.prefetchedClass||t.prefetchedClass),or.rel=s.rel||void 0),h$4(resolveComponent("RouterLink"),or,o.default)}const ar=typeof ge.value=="object"?((cr=d.resolve(ge.value))==null?void 0:cr.href)??null:ge.value&&!s.external&&!Mt.value?r(joinURL(L.app.baseURL,ge.value),d.resolve):ge.value||null,sr=s.target||null,lr=firstNonUndefined(s.noRel?"":s.rel,t.externalRelAttribute,Mt.value||er.value?"noopener noreferrer":"")||null;if(s.custom){if(!o.default)return null;const or=()=>navigateTo(ar,{replace:s.replace,external:s.external});return o.default({href:ar,navigate:or,get route(){if(!ar)return;const dr=parseURL$1(ar);return{path:dr.pathname,fullPath:dr.pathname,get query(){return parseQuery$1(dr.search)},hash:dr.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:ar}},rel:lr,target:sr,isExternal:tr.value,isActive:!1,isExactActive:!1})}return h$4("a",{ref:rr,href:ar,rel:lr,target:sr},(ur=o.default)==null?void 0:ur.call(o))}}})}const __nuxt_component_1=defineNuxtLink(nuxtLinkDefaults);function applyTrailingSlashBehavior(t,e){const r=e==="append"?withTrailingSlash:withoutTrailingSlash;return hasProtocol(t)&&!t.startsWith("http")?t:r(t,!0)}function useObserver(){const t=useNuxtApp();if(t._observer)return t._observer;let e=null;const r=new Map,s=(d,L)=>(e||(e=new IntersectionObserver(ge=>{for(const Mt of ge){const er=r.get(Mt.target);(Mt.isIntersecting||Mt.intersectionRatio>0)&&er&&er()}})),r.set(d,L),e.observe(d),()=>{r.delete(d),e.unobserve(d),r.size===0&&(e.disconnect(),e=null)});return t._observer={observe:s}}function isSlowConnection(){const t=navigator.connection;return!!(t&&(t.saveData||/2g/.test(t.effectiveType)))}const REGEX_MOBILE1=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|FBAN|FBAV|fennec|hiptop|iemobile|ip(hone|od)|Instagram|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,REGEX_MOBILE2=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
8sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;function isMobile(t){return REGEX_MOBILE1.test(t)||REGEX_MOBILE2.test(t.slice(0,4))}const REGEX_MOBILE_OR_TABLET1=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|FBAN|FBAV|fennec|hiptop|iemobile|ip(hone|od)|Instagram|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,REGEX_MOBILE_OR_TABLET2=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,REGEX_CRAWLER=/Googlebot\/|Googlebot-Mobile|Googlebot-Image|Googlebot-News|Googlebot-Video|AdsBot-Google([^-]|$)|AdsBot-Google-Mobile|Feedfetcher-Google|Mediapartners-Google|Mediapartners \(Googlebot\)|APIs-Google|bingbot|Slurp|[wW]get|LinkedInBot|Python-urllib|python-requests|aiohttp|httpx|libwww-perl|httpunit|nutch|Go-http-client|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|BIGLOTRON|Teoma|convera|seekbot|Gigabot|Gigablast|exabot|ia_archiver|GingerCrawler|webmon |HTTrack|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|findlink|msrbot|panscient|yacybot|AISearchBot|ips-agent|tagoobot|MJ12bot|woriobot|yanga|buzzbot|mlbot|YandexBot|YandexImages|YandexAccessibilityBot|YandexMobileBot|YandexMetrika|YandexTurbo|YandexImageResizer|YandexVideo|YandexAdNet|YandexBlogs|YandexCalendar|YandexDirect|YandexFavicons|YaDirectFetcher|YandexForDomain|YandexMarket|YandexMedia|YandexMobileScreenShotBot|YandexNews|YandexOntoDB|YandexPagechecker|YandexPartner|YandexRCA|YandexSearchShop|YandexSitelinks|YandexSpravBot|YandexTracker|YandexVertis|YandexVerticals|YandexWebmaster|YandexScreenshotBot|purebot|Linguee Bot|CyberPatrol|voilabot|Baiduspider|citeseerxbot|spbot|twengabot|postrank|TurnitinBot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|Ahrefs(Bot|SiteAudit)|fuelbot|CrunchBot|IndeedBot|mappydata|woobot|ZoominfoBot|PrivacyAwareBot|Multiviewbot|SWIMGBot|Grobbot|eright|Apercite|semanticbot|Aboundex|domaincrawler|wbsearchbot|summify|CCBot|edisterbot|seznambot|ec2linkfinder|gslfbot|aiHitBot|intelium_bot|facebookexternalhit|Yeti|RetrevoPageAnalyzer|lb-spider|Sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|OrangeBot\/|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|S[eE][mM]rushBot|yoozBot|lipperhey|Y!J|Domain Re-Animator Bot|AddThis|Screaming Frog SEO Spider|MetaURI|Scrapy|Livelap[bB]ot|OpenHoseBot|CapsuleChecker|[email protected]|IstellaBot|DeuSu\/|betaBot|Cliqzbot\/|MojeekBot\/|netEstate NE Crawler|SafeSearch microdata crawler|Gluten Free Crawler\/|Sonic|Sysomos|Trove|deadlinkchecker|Slack-ImgProxy|Embedly|RankActiveLinkBot|iskanie|SafeDNSBot|SkypeUriPreview|Veoozbot|Slackbot|redditbot|datagnionbot|Google-Adwords-Instant|adbeat_bot|WhatsApp|contxbot|pinterest.com.bot|electricmonk|GarlikCrawler|BingPreview\/|vebidoobot|FemtosearchBot|Yahoo Link Preview|MetaJobBot|DomainStatsBot|mindUpBot|Daum\/|Jugendschutzprogramm-Crawler|Xenu Link Sleuth|Pcore-HTTP|moatbot|KosmioBot|pingdom|AppInsights|PhantomJS|Gowikibot|PiplBot|Discordbot|TelegramBot|Jetslide|newsharecounts|James BOT|Bark[rR]owler|TinEye|SocialRankIOBot|trendictionbot|Ocarinabot|epicbot|Primalbot|DuckDuckGo-Favicons-Bot|GnowitNewsbot|Leikibot|LinkArchiver|YaK\/|PaperLiBot|Digg Deeper|dcrawl|Snacktory|AndersPinkBot|Fyrebot|EveryoneSocialBot|Mediatoolkitbot|Luminator-robots|ExtLinksBot|SurveyBot|NING\/|okhttp|Nuzzel|omgili|PocketParser|YisouSpider|um-LN|ToutiaoSpider|MuckRack|Jamie's Spider|AHC\/|NetcraftSurveyAgent|Laserlikebot|^Apache-HttpClient|AppEngine-Google|Jetty|Upflow|Thinklab|Traackr.com|Twurly|Mastodon|http_get|DnyzBot|botify|007ac9 Crawler|BehloolBot|BrandVerity|check_http|BDCbot|ZumBot|EZID|ICC-Crawler|ArchiveBot|^LCC |filterdb.iss.net\/crawler|BLP_bbot|BomboraBot|Buck\/|Companybook-Crawler|Genieo|magpie-crawler|Meltw
8aterNews|Moreover|newspaper\/|ScoutJet|(^| )sentry\/|StorygizeBot|UptimeRobot|OutclicksBot|seoscanners|Hatena|Google Web Preview|MauiBot|AlphaBot|SBL-BOT|IAS crawler|adscanner|Netvibes|acapbot|Baidu-YunGuanCe|bitlybot|blogmuraBot|Bot.AraTurka.com|bot-pge.chlooe.com|BoxcarBot|BTWebClient|ContextAd Bot|Digincore bot|Disqus|Feedly|Fetch\/|Fever|Flamingo_SearchEngine|FlipboardProxy|g2reader-bot|G2 Web Services|imrbot|K7MLWCBot|Kemvibot|Landau-Media-Spider|linkapediabot|vkShare|Siteimprove.com|BLEXBot\/|DareBoost|ZuperlistBot\/|Miniflux\/|Feedspot|Diffbot\/|SEOkicks|tracemyfile|Nimbostratus-Bot|zgrab|PR-CY.RU|AdsTxtCrawler|Datafeedwatch|Zabbix|TangibleeBot|google-xrawler|axios|Amazon CloudFront|Pulsepoint|CloudFlare-AlwaysOnline|Google-Structured-Data-Testing-Tool|WordupInfoSearch|WebDataStats|HttpUrlConnection|Seekport Crawler|ZoomBot|VelenPublicWebCrawler|MoodleBot|jpg-newsbot|outbrain|W3C_Validator|Validator\.nu|W3C-checklink|W3C-mobileOK|W3C_I18n-Checker|FeedValidator|W3C_CSS_Validator|W3C_Unicorn|Google-PhysicalWeb|Blackboard|ICBot\/|BazQux|Twingly|Rivva|Experibot|awesomecrawler|Dataprovider.com|GroupHigh\/|theoldreader.com|AnyEvent|Uptimebot\.org|Nmap Scripting Engine|2ip.ru|Clickagy|Caliperbot|MBCrawler|online-webceo-bot|B2B Bot|AddSearchBot|Google Favicon|HubSpot|Chrome-Lighthouse|HeadlessChrome|CheckMarkNetwork\/|www\.uptime\.com|Streamline3Bot\/|serpstatbot\/|MixnodeCache\/|^curl|SimpleScraper|RSSingBot|Jooblebot|fedoraplanet|Friendica|NextCloud|Tiny Tiny RSS|RegionStuttgartBot|Bytespider|Datanyze|Google-Site-Verification|TrendsmapResolver|tweetedtimes|NTENTbot|Gwene|SimplePie|SearchAtlas|Superfeedr|feedbot|UT-Dorkbot|Amazonbot|SerendeputyBot|Eyeotabot|officestorebot|Neticle Crawler|SurdotlyBot|LinkisBot|AwarioSmartBot|AwarioRssBot|RyteBot|FreeWebMonitoring SiteChecker|AspiegelBot|NAVER Blog Rssbot|zenback bot|SentiBot|Domains Project\/|Pandalytics|VKRobot|bidswitchbot|tigerbot|NIXStatsbot|Atom Feed Robot|Curebot|PagePeeker\/|Vigil\/|rssbot\/|startmebot\/|JobboerseBot|seewithkids|NINJA bot|Cutbot|BublupBot|BrandONbot|RidderBot|Taboolabot|Dubbotbot|FindITAnswersbot|infoobot|Refindbot|BlogTraffic\/\d\.\d+ Feed-Fetcher|SeobilityBot|Cincraw|Dragonbot|VoluumDSP-content-bot|FreshRSS|BitBot|^PHP-Curl-Class|Google-Certificates-Bridge/;function isMobileOrTablet(t){return REGEX_MOBILE_OR_TABLET1.test(t)||REGEX_MOBILE_OR_TABLET2.test(t.slice(0,4))}function isIos(t){return/iPad|iPhone|iPod/.test(t)}function isAndroid(t){return/android/i.test(t)}function isWindows(t){return/Windows/.test(t)}function isMacOS(t){return/Mac OS X/.test(t)}const browsers=[{name:"Samsung",test:/SamsungBrowser/i},{name:"Edge",test:/edg([ea]|ios|)\//i},{name:"Firefox",test:/firefox|iceweasel|fxios/i},{name:"Chrome",test:/chrome|crios|crmo/i},{name:"Safari",test:/safari|applewebkit/i}];function getBrowserName(t){for(const e of browsers)if(e.test.test(t))return e.name;return""}function generateFlags(t,e){let r=!1,s=!1,o=!1,d=!1;if(e==="Amazon CloudFront")t["cloudfront-is-mobile-viewer"]==="true"&&(r=!0,s=!0),t["cloudfront-is-tablet-viewer"]==="true"&&(r=!1,s=!0),t["cloudfront-is-desktop-viewer"]==="true"&&(r=!1,s=!1),t["cloudfront-is-ios-viewer"]==="true"&&(o=!0),t["cloudfront-is-android-viewer"]==="true"&&(d=!0);else if(t&&t["cf-device-type"])switch(t["cf-device-type"]){case"mobile":r=!0,s=!0;break;case"tablet":r=!1,s=!0;break;case"desktop":r=!1,s=!1;break}else r=isMobile(e),s=isMobileOrTablet(e),o=isIos(e),d=isAndroid(e);const L=isWindows(e),ge=isMacOS(e),Mt=getBrowserName(e),er=Mt==="Safari",tr=Mt==="Firefox",ir=Mt==="Edge",rr=Mt==="Chrome",nr=Mt==="Samsung",ar=REGEX_CRAWLER.test(e);return{userAgent:e,isMobile:r,isMobileOrTablet:s,isTablet:!r&&s,isDesktop:!s,isIos:o,isAndroid:d,isWindows:L,isMacOS:ge,isApple:ge||o,isDesktopOrTablet:!r,isSafari:er,isFirefox:tr,isEdge:ir,isChrome:rr,isSamsung:nr,isCrawler:ar}}const plugin_t2GMTTFnMT=defineNuxtPlugin(t=>{const e=useRuntimeConfig(),r=e.public.device.defaultUserAgent,s=e.public.device.refreshOnResize;if(t.ssrContext){const L=useRequestHeaders(),ge=L["user-agent"]||r;return{provide:{device:reactive(generateFlags(L,ge))}}}const o=navigator.userAgent||r,d=reactive(generateFlags({},o));return s&&window.addEventListener("resize",()=>{setTimeout(()=>{const L=generateFlags({},navigator.userAgent||r);
8Object.entries(L).forEach(ge=>{const[Mt,er]=ge;d[Mt]=er})},50)}),{provide:{device:d}}});var extendStatics=function(t,e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(r[o]=s[o])},extendStatics(t,e)};function __extends(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");extendStatics(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var __assign=function(){return __assign=Object.assign||function(e){for(var r,s=1,o=arguments.length;s<o;s++){r=arguments[s];for(var d in r)Object.prototype.hasOwnProperty.call(r,d)&&(e[d]=r[d])}return e},__assign.apply(this,arguments)};function __rest(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(r[s[o]]=t[s[o]]);return r}function __awaiter(t,e,r,s){function o(d){return d instanceof r?d:new r(function(L){L(d)})}return new(r||(r=Promise))(function(d,L){function ge(tr){try{er(s.next(tr))}catch(ir){L(ir)}}function Mt(tr){try{er(s.throw(tr))}catch(ir){L(ir)}}function er(tr){tr.done?d(tr.value):o(tr.value).then(ge,Mt)}er((s=s.apply(t,e||[])).next())})}function __generator(t,e){var r={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},s,o,d,L;return L={next:ge(0),throw:ge(1),return:ge(2)},typeof Symbol=="function"&&(L[Symbol.iterator]=function(){return this}),L;function ge(er){return function(tr){return Mt([er,tr])}}function Mt(er){if(s)throw new TypeError("Generator is already executing.");for(;L&&(L=0,er[0]&&(r=0)),r;)try{if(s=1,o&&(d=er[0]&2?o.return:er[0]?o.throw||((d=o.return)&&d.call(o),0):o.next)&&!(d=d.call(o,er[1])).done)return d;switch(o=0,d&&(er=[er[0]&2,d.value]),er[0]){case 0:case 1:d=er;break;case 4:return r.label++,{value:er[1],done:!1};case 5:r.label++,o=er[1],er=[0];continue;case 7:er=r.ops.pop(),r.trys.pop();continue;default:if(d=r.trys,!(d=d.length>0&&d[d.length-1])&&(er[0]===6||er[0]===2)){r=0;continue}if(er[0]===3&&(!d||er[1]>d[0]&&er[1]<d[3])){r.label=er[1];break}if(er[0]===6&&r.label<d[1]){r.label=d[1],d=er;break}if(d&&r.label<d[2]){r.label=d[2],r.ops.push(er);break}d[2]&&r.ops.pop(),r.trys.pop();continue}er=e.call(t,r)}catch(tr){er=[6,tr],o=0}finally{s=d=0}if(er[0]&5)throw er[1];return{value:er[0]?er[1]:void 0,done:!0}}}function __spreadArray(t,e,r){if(r||arguments.length===2)for(var s=0,o=e.length,d;s<o;s++)(d||!(s in e))&&(d||(d=Array.prototype.slice.call(e,0,s)),d[s]=e[s]);return t.concat(d||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;
8var genericMessage="Invariant Violation",_a$1=Object.setPrototypeOf,setPrototypeOf=_a$1===void 0?function(t,e){return t.__proto__=e,t}:_a$1,InvariantError=function(t){__extends(e,t);function e(r){r===void 0&&(r=genericMessage);var s=t.call(this,typeof r=="number"?genericMessage+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return s.framesToPop=1,s.name=genericMessage,setPrototypeOf(s,e.prototype),s}return e}(Error);function invariant$2(t,e){if(!t)throw new InvariantError(e)}var verbosityLevels=["debug","log","warn","error","silent"],verbosityLevel=verbosityLevels.indexOf("log");function wrapConsoleMethod(t){return function(){if(verbosityLevels.indexOf(t)>=verbosityLevel){var e=console[t]||console.log;return e.apply(console,arguments)}}}(function(t){t.debug=wrapConsoleMethod("debug"),t.log=wrapConsoleMethod("log"),t.warn=wrapConsoleMethod("warn"),t.error=wrapConsoleMethod("error")})(invariant$2||(invariant$2={}));var version$6="3.10.4";function maybe$1(t){try{return t()}catch{}}const global$1=maybe$1(function(){return globalThis})||maybe$1(function(){return window})||maybe$1(function(){return self})||maybe$1(function(){return global})||maybe$1(function(){return maybe$1.constructor("return this")()});var prefixCounts=new Map;function makeUniqueId(t){var e=prefixCounts.get(t)||1;return prefixCounts.set(t,e+1),"".concat(t,":").concat(e,":").concat(Math.random().toString(36).slice(2))}function stringifyForDisplay(t,e){e===void 0&&(e=0);var r=makeUniqueId("stringifyForDisplay");return JSON.stringify(t,function(s,o){return o===void 0?r:o},e).split(JSON.stringify(r)).join("<undefined>")}function wrap$4(t){return function(e){for(var r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];if(typeof e=="number"){var o=e;e=getHandledErrorMsg(o),e||(e=getFallbackErrorMsg(o,r),r=[])}t.apply(void 0,[e].concat(r))}}var invariant$1=Object.assign(function(e,r){for(var s=[],o=2;o<arguments.length;o++)s[o-2]=arguments[o];e||invariant$2(e,getHandledErrorMsg(r,s)||getFallbackErrorMsg(r,s))},{debug:wrap$4(invariant$2.debug),log:wrap$4(invariant$2.log),warn:wrap$4(invariant$2.warn),error:wrap$4(invariant$2.error)});function newInvariantError(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return new InvariantError(getHandledErrorMsg(t,e)||getFallbackErrorMsg(t,e))}var ApolloErrorMessageHandler=Symbol.for("ApolloErrorMessageHandler_"+version$6);function stringify(t){return typeof t=="string"?t:stringifyForDisplay(t,2).slice(0,1e3)}function getHandledErrorMsg(t,e){if(e===void 0&&(e=[]),!!t)return global$1[ApolloErrorMessageHandler]&&global$1[ApolloErrorMessageHandler](t,e.map(stringify))}function getFallbackErrorMsg(t,e){if(e===void 0&&(e=[]),!!t)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:version$6,message:t,args:e.map(stringify)})))}function devAssert(t,e){if(!!!t)throw new Error(e)}function isObjectLike$1(t){return typeof t=="object"&&t!==null}function invariant(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const LineRegExp=/\r\n|[\n\r]/g;function getLocation(t,e){let r=0,s=1;for(const o of t.body.matchAll(LineRegExp)){if(typeof o.index=="number"||invariant(!1),o.index>=e)break;r=o.index+o[0].length,s+=1}return{line:s,column:e+1-r}}function printLocation(t){return printSourceLocation(t.source,getLocation(t.source,t.start))}function printSourceLocation(t,e){const r=t.locationOffset.column-1,s="".padStart(r)+t.body,o=e.line-1,d=t.locationOffset.line-1,L=e.line+d,ge=e.line===1?r:0,Mt=e.column+ge,er=`${t.name}:${L}:${Mt} 9`,tr=s.split(/\r\n|[\n\r]/g),ir=tr[o];if(ir.length>120){const rr=Math.floor(Mt/80),nr=Mt%80,ar=[];for(let sr=0;sr<ir.length;sr+=80)ar.push(ir.slice(sr,sr+80));return er+printPrefixedLines([[`${L} |`,ar[0]],...ar.slice(1,rr+1).map(sr=>["|",sr]),["|","^".padStart(nr)],["|",ar[rr+1]]])}return er+printPrefixedLines([[`${L-1} |`,tr[o-1]],[`${L} |`,ir],["|","^".padStart(Mt)],[`${L+1} |`,tr[o+1]]])}function printPrefixedLines(t){const e=t.filter(([s,o])=>o!==void 0),r=Math.max(...e.map(([s])=>s.length));return e.map(([s,o])=>s.padStart(r)+(o?" "+o:"")).join(` 10`)}function toNormalizedOptions(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}
vendor: 9,480 bytes, lines 10-16
10class GraphQLError extends Error{constructor(e,...r){var s,o,d;const{nodes:L,source:ge,positions:Mt,path:er,originalError:tr,extensions:ir}=toNormalizedOptions(r);super(e),this.name="GraphQLError",this.path=er??void 0,this.originalError=tr??void 0,this.nodes=undefinedIfEmpty(Array.isArray(L)?L:L?[L]:void 0);const rr=undefinedIfEmpty((s=this.nodes)===null||s===void 0?void 0:s.map(ar=>ar.loc).filter(ar=>ar!=null));this.source=ge??(rr==null||(o=rr[0])===null||o===void 0?void 0:o.source),this.positions=Mt??(rr==null?void 0:rr.map(ar=>ar.start)),this.locations=Mt&&ge?Mt.map(ar=>getLocation(ge,ar)):rr==null?void 0:rr.map(ar=>getLocation(ar.source,ar.start));const nr=isObjectLike$1(tr==null?void 0:tr.extensions)?tr==null?void 0:tr.extensions:void 0;this.extensions=(d=ir??nr)!==null&&d!==void 0?d:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),tr!=null&&tr.stack?Object.defineProperty(this,"stack",{value:tr.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,GraphQLError):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(e+=` 11 12`+printLocation(r.loc));else if(this.source&&this.locations)for(const r of this.locations)e+=` 13 14`+printSourceLocation(this.source,r);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function undefinedIfEmpty(t){return t===void 0||t.length===0?void 0:t}function syntaxError(t,e,r){return new GraphQLError(`Syntax Error: ${r}`,{source:t,positions:[e]})}let Location$1=class{constructor(e,r,s){this.start=e.start,this.end=r.end,this.startToken=e,this.endToken=r,this.source=s}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};class Token{constructor(e,r,s,o,d,L){this.kind=e,this.start=r,this.end=s,this.line=o,this.column=d,this.value=L,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const QueryDocumentKeys={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:[],FloatValue:[],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"]},kindValues=new Set(Object.keys(QueryDocumentKeys));function isNode(t){const e=t==null?void 0:t.kind;return typeof e=="string"&&kindValues.has(e)}var OperationTypeNode;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(OperationTypeNode||(OperationTypeNode={}));var DirectiveLocation;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(DirectiveLocation||(DirectiveLocation={}));var Kind;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Kind||(Kind={}));function isWhiteSpace(t){return t===9||t===32}function isDigit(t){return t>=48&&t<=57}function isLetter(t){return t>=97&&t<=122||t>=65&&t<=90}function isNameStart(t){return isLetter(t)||t===95}function isNameContinue(t){return isLetter(t)||isDigit(t)||t===95}function dedentBlockStringLines(t){var e;let r=Number.MAX_SAFE_INTEGER,s=null,o=-1;for(let L=0;L<t.length;++L){var d;const ge=t[L],Mt=leadingWhitespace(ge);Mt!==ge.length&&(s=(d=s)!==null&&d!==void 0?d:L,o=L,L!==0&&Mt<r&&(r=Mt))}return t.map((L,ge)=>ge===0?L:L.slice(r)).slice((e=s)!==null&&e!==void 0?e:0,o+1)}function leadingWhitespace(t){let e=0;for(;e<t.length&&isWhiteSpace(t.charCodeAt(e));)++e;return e}function printBlockString(t,e){const r=t.replace(/"""/g,'\\"""'),s=r.split(/\r\n|[\n\r]/g),o=s.length===1,d=s.length>1&&s.slice(1).every(nr=>nr.length===0||isWhiteSpace(nr.charCodeAt(0))),L=r.endsWith('\\"""'),ge=t.endsWith('"')&&!L,Mt=t.endsWith("\\"),er=ge||Mt,tr=!o||t.length>70||er||d||L;let ir="";const rr=o&&isWhiteSpace(t.charCodeAt(0));return(tr&&!rr||d)&&(ir+=` 15`),ir+=r,(tr||er)&&(ir+=` 16`),'"""'+ir+'"""'}var TokenKind;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(TokenKind||(TokenKind={}));class Lexer{constructor(e){const r=new Token(TokenKind.SOF,0,0,0,0);this.source=e,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==TokenKind.EOF)do if(e.next)e=e.next;else{const r=readNextToken(this,e.end);e.next=r,r.prev=e,e=r}while(e.kind===TokenKind.COMMENT);return e}}function isPunctuatorTokenKind(t){return t===TokenKind.BANG||t===TokenKind.DOLLAR||t===TokenKind.AMP||t===TokenKind.PAREN_L||t===TokenKind.PAREN_R||t===TokenKind.SPREAD||t===TokenKind.COLON||t===TokenKind.EQUALS||t===TokenKind.AT||t===TokenKind.BRACKET_L||t===TokenKind.BRACKET_R||t===TokenKind.BRACE_L||t===TokenKind.PIPE||t===TokenKind.BRACE_R}function isUnicodeScalarValue(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function isSupplementaryCodePoint(t,e){return isLeadingSurrogate(t.charCodeAt(e))&&isTrailingSurrogate(t.charCodeAt(e+1))}function isLeadingSurrogate(t){return t>=55296&&t<=56319}function isTrailingSurrogate(t){return t>=56320&&t<=57343}function printCodePointAt(t,e){const r=t.source.body.codePointAt(e);if(r===void 0)return TokenKind.EOF;
vendor: 7,394 bytes, lines 16-18
16if(r>=32&&r<=126){const s=String.fromCodePoint(r);return s==='"'?`'"'`:`"${s}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function createToken(t,e,r,s,o){const d=t.line,L=1+r-t.lineStart;return new Token(e,r,s,d,L,o)}function readNextToken(t,e){const r=t.source.body,s=r.length;let o=e;for(;o<s;){const d=r.charCodeAt(o);switch(d){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++t.line,t.lineStart=o;continue;case 13:r.charCodeAt(o+1)===10?o+=2:++o,++t.line,t.lineStart=o;continue;case 35:return readComment(t,o);case 33:return createToken(t,TokenKind.BANG,o,o+1);case 36:return createToken(t,TokenKind.DOLLAR,o,o+1);case 38:return createToken(t,TokenKind.AMP,o,o+1);case 40:return createToken(t,TokenKind.PAREN_L,o,o+1);case 41:return createToken(t,TokenKind.PAREN_R,o,o+1);case 46:if(r.charCodeAt(o+1)===46&&r.charCodeAt(o+2)===46)return createToken(t,TokenKind.SPREAD,o,o+3);break;case 58:return createToken(t,TokenKind.COLON,o,o+1);case 61:return createToken(t,TokenKind.EQUALS,o,o+1);case 64:return createToken(t,TokenKind.AT,o,o+1);case 91:return createToken(t,TokenKind.BRACKET_L,o,o+1);case 93:return createToken(t,TokenKind.BRACKET_R,o,o+1);case 123:return createToken(t,TokenKind.BRACE_L,o,o+1);case 124:return createToken(t,TokenKind.PIPE,o,o+1);case 125:return createToken(t,TokenKind.BRACE_R,o,o+1);case 34:return r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34?readBlockString(t,o):readString(t,o)}if(isDigit(d)||d===45)return readNumber(t,o,d);if(isNameStart(d))return readName(t,o);throw syntaxError(t.source,o,d===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:isUnicodeScalarValue(d)||isSupplementaryCodePoint(r,o)?`Unexpected character: ${printCodePointAt(t,o)}.`:`Invalid character: ${printCodePointAt(t,o)}.`)}return createToken(t,TokenKind.EOF,s,s)}function readComment(t,e){const r=t.source.body,s=r.length;let o=e+1;for(;o<s;){const d=r.charCodeAt(o);if(d===10||d===13)break;if(isUnicodeScalarValue(d))++o;else if(isSupplementaryCodePoint(r,o))o+=2;else break}return createToken(t,TokenKind.COMMENT,e,o,r.slice(e+1,o))}function readNumber(t,e,r){const s=t.source.body;let o=e,d=r,L=!1;if(d===45&&(d=s.charCodeAt(++o)),d===48){if(d=s.charCodeAt(++o),isDigit(d))throw syntaxError(t.source,o,`Invalid number, unexpected digit after 0: ${printCodePointAt(t,o)}.`)}else o=readDigits(t,o,d),d=s.charCodeAt(o);if(d===46&&(L=!0,d=s.charCodeAt(++o),o=readDigits(t,o,d),d=s.charCodeAt(o)),(d===69||d===101)&&(L=!0,d=s.charCodeAt(++o),(d===43||d===45)&&(d=s.charCodeAt(++o)),o=readDigits(t,o,d),d=s.charCodeAt(o)),d===46||isNameStart(d))throw syntaxError(t.source,o,`Invalid number, expected digit but got: ${printCodePointAt(t,o)}.`);return createToken(t,L?TokenKind.FLOAT:TokenKind.INT,e,o,s.slice(e,o))}function readDigits(t,e,r){if(!isDigit(r))throw syntaxError(t.source,e,`Invalid number, expected digit but got: ${printCodePointAt(t,e)}.`);const s=t.source.body;let o=e+1;for(;isDigit(s.charCodeAt(o));)++o;return o}function readString(t,e){const r=t.source.body,s=r.length;let o=e+1,d=o,L="";for(;o<s;){const ge=r.charCodeAt(o);if(ge===34)return L+=r.slice(d,o),createToken(t,TokenKind.STRING,e,o+1,L);if(ge===92){L+=r.slice(d,o);const Mt=r.charCodeAt(o+1)===117?r.charCodeAt(o+2)===123?readEscapedUnicodeVariableWidth(t,o):readEscapedUnicodeFixedWidth(t,o):readEscapedCharacter(t,o);L+=Mt.value,o+=Mt.size,d=o;continue}if(ge===10||ge===13)break;if(isUnicodeScalarValue(ge))++o;else if(isSupplementaryCodePoint(r,o))o+=2;else throw syntaxError(t.source,o,`Invalid character within String: ${printCodePointAt(t,o)}.`)}throw syntaxError(t.source,o,"Unterminated string.")}function readEscapedUnicodeVariableWidth(t,e){const r=t.source.body;let s=0,o=3;for(;o<12;){const d=r.charCodeAt(e+o++);if(d===125){if(o<5||!isUnicodeScalarValue(s))break;return{value:String.fromCodePoint(s),size:o}}if(s=s<<4|readHexDigit(d),s<0)break}throw syntaxError(t.source,e,`Invalid Unicode escape sequence: "${r.slice(e,e+o)}".`)}function readEscapedUnicodeFixedWidth(t,e){const r=t.source.body,s=read16BitHexCode(r,e+2);if(isUnicodeScalarValue(s))return{value:String.fromCodePoint(s),size:6};if(isLeadingSurrogate(s)&&r.charCodeAt(e+6)===92&&r.charCodeAt(e+7)===117){const o=read16BitHexCode(r,e+8);if(isTrailingSurrogate(o))return{value:String.fromCodePoint(s,o),size:12}}throw syntaxError(t.source,e,`Invalid Unicode escape sequence: "${r.slice(e,e+6)}".`)}function read16BitHexCode(t,e){return readHexDigit(t.charCodeAt(e))<<12|readHexDigit(t.charCodeAt(e+1))<<8|readHexDigit(t.charCodeAt(e+2))<<4|readHexDigit(t.charCodeAt(e+3))}function readHexDigit(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function readEscapedCharacter(t,e){const r=t.source.body;switch(r.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` 17`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw syntaxError(t.source,e,`Invalid character escape sequence: "${r.slice(e,e+2)}".`)}function readBlockString(t,e){const r=t.source.body,s=r.length;let o=t.lineStart,d=e+3,L=d,ge="";const Mt=[];for(;d<s;){const er=r.charCodeAt(d);if(er===34&&r.charCodeAt(d+1)===34&&r.charCodeAt(d+2)===34){ge+=r.slice(L,d),Mt.push(ge);const tr=createToken(t,TokenKind.BLOCK_STRING,e,d+3,dedentBlockStringLines(Mt).join(` 18`));return t.line+=Mt.length-1,t.lineStart=o,tr}if(er===92&&r.charCodeAt(d+1)===34&&r.charCodeAt(d+2)===34&&r.charCodeAt(d+3)===34){ge+=r.slice(L,d),L=d+1,d+=4;continue}if(er===10||er===13){ge+=r.slice(L,d),Mt.push(ge),er===13&&r.charCodeAt(d+1)===10?d+=2:++d,ge="",L=d,o=d;continue}if(isUnicodeScalarValue(er))++d;else if(isSupplementaryCodePoint(r,d))d+=2;else throw syntaxError(t.source,d,`Invalid character within String: ${printCodePointAt(t,d)}.`)}throw syntaxError(t.source,d,"Unterminated string.")}function readName(t,e){const r=t.source.body,s=r.length;let o=e+1;for(;o<s;){const d=r.charCodeAt(o);if(isNameContinue(d))++o;else break}return createToken(t,TokenKind.NAME,e,o,r.slice(e,o))}const MAX_ARRAY_LENGTH=10,MAX_RECURSIVE_DEPTH=2;function inspect(t){return formatValue(t,[])}function formatValue(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return formatObjectValue(t,e);default:return String(t)}}function formatObjectValue(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const r=[...e,t];if(isJSONable(t)){const s=t.toJSON();if(s!==t)return typeof s=="string"?s:formatValue(s,r)}else if(Array.isArray(t))return formatArray(t,r);return formatObject(t,r)}function isJSONable(t){return typeof t.toJSON=="function"}function formatObject(t,e){const r=Object.entries(t);return r.length===0?"{}":e.length>MAX_RECURSIVE_DEPTH?"["+getObjectTag(t)+"]":"{ "+r.map(([o,d])=>o+": "+formatValue(d,e)).join(", ")+" }"}function formatArray(t,e){if(t.length===0)return"[]";if(e.length>MAX_RECURSIVE_DEPTH)return"[Array]";const r=Math.min(MAX_ARRAY_LENGTH,t.length),s=t.length-r,o=[];for(let d=0;d<r;++d)o.push(formatValue(t[d],e));return s===1?o.push("... 1 more item"):s>1&&o.push(`... ${s} more items`),"["+o.join(", ")+"]"}function getObjectTag(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");
vendor: 27,057 bytes, lines 18-56
18if(e==="Object"&&typeof t.constructor=="function"){const r=t.constructor.name;if(typeof r=="string"&&r!=="")return r}return e}const instanceOf=globalThis.process?function(e,r){return e instanceof r}:function(e,r){if(e instanceof r)return!0;if(typeof e=="object"&&e!==null){var s;const o=r.prototype[Symbol.toStringTag],d=Symbol.toStringTag in e?e[Symbol.toStringTag]:(s=e.constructor)===null||s===void 0?void 0:s.name;if(o===d){const L=inspect(e);throw new Error(`Cannot use ${o} "${L}" from another module or realm. 19 20Ensure that there is only one instance of "graphql" in the node_modules 21directory. If different versions of "graphql" are the dependencies of other 22relied on modules, use "resolutions" to ensure only one version is installed. 23 24https://yarnpkg.com/en/docs/selective-version-resolutions 25 26Duplicate "graphql" modules cannot be used at the same time since different 27versions may have different capabilities and behavior. The data from one 28version used in the function from another could produce confusing and 29spurious results.`)}}return!1};class Source{constructor(e,r="GraphQL request",s={line:1,column:1}){typeof e=="string"||devAssert(!1,`Body must be a string. Received: ${inspect(e)}.`),this.body=e,this.name=r,this.locationOffset=s,this.locationOffset.line>0||devAssert(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||devAssert(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function isSource(t){return instanceOf(t,Source)}function parse$1(t,e){return new Parser(t,e).parseDocument()}class Parser{constructor(e,r={}){const s=isSource(e)?e:new Source(e);this._lexer=new Lexer(s),this._options=r,this._tokenCounter=0}parseName(){const e=this.expectToken(TokenKind.NAME);return this.node(e,{kind:Kind.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Kind.DOCUMENT,definitions:this.many(TokenKind.SOF,this.parseDefinition,TokenKind.EOF)})}parseDefinition(){if(this.peek(TokenKind.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),r=e?this._lexer.lookahead():this._lexer.token;if(r.kind===TokenKind.NAME){switch(r.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()}if(e)throw syntaxError(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(TokenKind.BRACE_L))return this.node(e,{kind:Kind.OPERATION_DEFINITION,operation:OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let s;return this.peek(TokenKind.NAME)&&(s=this.parseName()),this.node(e,{kind:Kind.OPERATION_DEFINITION,operation:r,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(TokenKind.NAME);switch(e.value){case"query":return OperationTypeNode.QUERY;case"mutation":return OperationTypeNode.MUTATION;case"subscription":return OperationTypeNode.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(TokenKind.PAREN_L,this.parseVariableDefinition,TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(TokenKind.DOLLAR),this.node(e,{kind:Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Kind.SELECTION_SET,selections:this.many(TokenKind.BRACE_L,this.parseSelection,TokenKind.BRACE_R)})}parseSelection(){return this.peek(TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,r=this.parseName();let s,o;return this.expectOptionalToken(TokenKind.COLON)?(s=r,o=this.parseName()):o=r,this.node(e,{kind:Kind.FIELD,alias:s,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const r=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(TokenKind.PAREN_L,r,TokenKind.PAREN_R)}parseArgument(e=!1){const r=this._lexer.token,s=this.parseName();return this.expectToken(TokenKind.COLON),this.node(r,{kind:Kind.ARGUMENT,name:s,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(TokenKind.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(TokenKind.NAME)?this.node(e,{kind:Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Kind.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const r=this._lexer.token;switch(r.kind){case TokenKind.BRACKET_L:return this.parseList(e);case TokenKind.BRACE_L:return this.parseObject(e);case TokenKind.INT:return this.advanceLexer(),this.node(r,{kind:Kind.INT,value:r.value});case TokenKind.FLOAT:return this.advanceLexer(),this.node(r,{kind:Kind.FLOAT,value:r.value});case TokenKind.STRING:case TokenKind.BLOCK_STRING:return this.parseStringLiteral();case TokenKind.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:Kind.BOOLEAN,value:!0});case"false":return this.node(r,{kind:Kind.BOOLEAN,value:!1});case"null":return this.node(r,{kind:Kind.NULL});default:return this.node(r,{kind:Kind.ENUM,value:r.value})}case TokenKind.DOLLAR:if(e)if(this.expectToken(TokenKind.DOLLAR),this._lexer.token.kind===TokenKind.NAME){const s=this._lexer.token.value;throw syntaxError(this._lexer.source,r.start,`Unexpected variable "$${s}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:Kind.STRING,value:e.value,block:e.kind===TokenKind.BLOCK_STRING})}parseList(e){const r=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:Kind.LIST,values:this.any(TokenKind.BRACKET_L,r,TokenKind.BRACKET_R)})}parseObject(e){const r=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:Kind.OBJECT,fields:this.any(TokenKind.BRACE_L,r,TokenKind.BRACE_R)})}parseObjectField(e){const r=this._lexer.token,s=this.parseName();return this.expectToken(TokenKind.COLON),this.node(r,{kind:Kind.OBJECT_FIELD,name:s,value:this.parseValueLiteral(e)})}parseDirectives(e){const r=[];for(;this.peek(TokenKind.AT);)r.push(this.parseDirective(e));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const r=this._lexer.token;return this.expectToken(TokenKind.AT),this.node(r,{kind:Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let r;if(this.expectOptionalToken(TokenKind.BRACKET_L)){const s=this.parseTypeReference();this.expectToken(TokenKind.BRACKET_R),r=this.node(e,{kind:Kind.LIST_TYPE,type:s})}else r=this.parseNamedType();return this.expectOptionalToken(TokenKind.BANG)?this.node(e,{kind:Kind.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(TokenKind.STRING)||this.peek(TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const s=this.parseConstDirectives(),o=this.many(TokenKind.BRACE_L,this.parseOperationTypeDefinition,TokenKind.BRACE_R);return this.node(e,{kind:Kind.SCHEMA_DEFINITION,description:r,directives:s,operationTypes:o})}parseOperationTypeDefinition(){const e=this._lexer.token,r=this.parseOperationType();this.expectToken(TokenKind.COLON);const s=this.parseNamedType();return this.node(e,{kind:Kind.OPERATION_TYPE_DEFINITION,operation:r,type:s})}parseScalarTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const s=this.parseName(),o=this.parseConstDirectives();return this.node(e,{kind:Kind.SCALAR_TYPE_DEFINITION,description:r,name:s,directives:o})}parseObjectTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const s=this.parseName(),o=this.parseImplementsInterfaces(),d=this.parseConstDirectives(),L=this.parseFieldsDefinition();return this.node(e,{kind:Kind.OBJECT_TYPE_DEFINITION,description:r,name:s,interfaces:o,directives:d,fields:L})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(TokenKind.BRACE_L,this.parseFieldDefinition,TokenKind.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,r=this.parseDescription(),s=this.parseName(),o=this.parseArgumentDefs();this.expectToken(TokenKind.COLON);const d=this.parseTypeReference(),L=this.parseConstDirectives();return this.node(e,{kind:Kind.FIELD_DEFINITION,description:r,name:s,arguments:o,type:d,directives:L})}parseArgumentDefs(){return this.optionalMany(TokenKind.PAREN_L,this.parseInputValueDef,TokenKind.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,r=this.parseDescription(),s=this.parseName();this.expectToken(TokenKind.COLON);const o=this.parseTypeReference();let d;this.expectOptionalToken(TokenKind.EQUALS)&&(d=this.parseConstValueLiteral());const L=this.parseConstDirectives();return this.node(e,{kind:Kind.INPUT_VALUE_DEFINITION,description:r,name:s,type:o,defaultValue:d,directives:L})}parseInterfaceTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const s=this.parseName(),o=this.parseImplementsInterfaces(),d=this.parseConstDirectives(),L=this.parseFieldsDefinition();return this.node(e,{kind:Kind.INTERFACE_TYPE_DEFINITION,description:r,name:s,interfaces:o,directives:d,fields:L})}parseUnionTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const s=this.parseName(),o=this.parseConstDirectives(),d=this.parseUnionMemberTypes();return this.node(e,{kind:Kind.UNION_TYPE_DEFINITION,description:r,name:s,directives:o,types:d})}parseUnionMemberTypes(){return this.expectOptionalToken(TokenKind.EQUALS)?this.delimitedMany(TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const s=this.parseName(),o=this.parseConstDirectives(),d=this.parseEnumValuesDefinition();return this.node(e,{kind:Kind.ENUM_TYPE_DEFINITION,description:r,name:s,directives:o,values:d})}parseEnumValuesDefinition(){return this.optionalMany(TokenKind.BRACE_L,this.parseEnumValueDefinition,TokenKind.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,r=this.parseDescription(),s=this.parseEnumValueName(),o=this.parseConstDirectives();return this.node(e,{kind:Kind.ENUM_VALUE_DEFINITION,description:r,name:s,directives:o})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw syntaxError(this._lexer.source,this._lexer.token.start,`${getTokenDesc(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const s=this.parseName(),o=this.parseConstDirectives(),d=this.parseInputFieldsDefinition();return this.node(e,{kind:Kind.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:s,directives:o,fields:d})}parseInputFieldsDefinition(){return this.optionalMany(TokenKind.BRACE_L,this.parseInputValueDef,TokenKind.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===TokenKind.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)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),s=this.optionalMany(TokenKind.BRACE_L,this.parseOperationTypeDefinition,TokenKind.BRACE_R);if(r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:Kind.SCHEMA_EXTENSION,directives:r,operationTypes:s})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),s=this.parseConstDirectives();if(s.length===0)throw this.unexpected();return this.node(e,{kind:Kind.SCALAR_TYPE_EXTENSION,name:r,directives:s})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),d=this.parseFieldsDefinition();if(s.length===0&&o.length===0&&d.length===0)throw this.unexpected();return this.node(e,{kind:Kind.OBJECT_TYPE_EXTENSION,name:r,interfaces:s,directives:o,fields:d})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),d=this.parseFieldsDefinition();if(s.length===0&&o.length===0&&d.length===0)throw this.unexpected();return this.node(e,{kind:Kind.INTERFACE_TYPE_EXTENSION,name:r,interfaces:s,directives:o,fields:d})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),s=this.parseConstDirectives(),o=this.parseUnionMemberTypes();if(s.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:Kind.UNION_TYPE_EXTENSION,name:r,directives:s,types:o})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),s=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();if(s.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:Kind.ENUM_TYPE_EXTENSION,name:r,directives:s,values:o})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),s=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();if(s.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:Kind.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:s,fields:o})}parseDirectiveDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(TokenKind.AT);const s=this.parseName(),o=this.parseArgumentDefs(),d=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const L=this.parseDirectiveLocations();return this.node(e,{kind:Kind.DIRECTIVE_DEFINITION,description:r,name:s,arguments:o,repeatable:d,locations:L})}parseDirectiveLocations(){return this.delimitedMany(TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(DirectiveLocation,r.value))return r;throw this.unexpected(e)}node(e,r){return this._options.noLocation!==!0&&(r.loc=new Location$1(e,this._lexer.lastToken,this._lexer.source)),r}peek(e){return this._lexer.token.kind===e}expectToken(e){const r=this._lexer.token;if(r.kind===e)return this.advanceLexer(),r;throw syntaxError(this._lexer.source,r.start,`Expected ${getTokenKindDesc(e)}, found ${getTokenDesc(r)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const r=this._lexer.token;if(r.kind===TokenKind.NAME&&r.value===e)this.advanceLexer();else throw syntaxError(this._lexer.source,r.start,`Expected "${e}", found ${getTokenDesc(r)}.`)}expectOptionalKeyword(e){const r=this._lexer.token;return r.kind===TokenKind.NAME&&r.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const r=e??this._lexer.token;return syntaxError(this._lexer.source,r.start,`Unexpected ${getTokenDesc(r)}.`)}any(e,r,s){this.expectToken(e);const o=[];for(;!this.expectOptionalToken(s);)o.push(r.call(this));return o}optionalMany(e,r,s){if(this.expectOptionalToken(e)){const o=[];do o.push(r.call(this));while(!this.expectOptionalToken(s));return o}return[]}many(e,r,s){this.expectToken(e);const o=[];do o.push(r.call(this));while(!this.expectOptionalToken(s));return o}delimitedMany(e,r){this.expectOptionalToken(e);const s=[];do s.push(r.call(this));while(this.expectOptionalToken(e));return s}advanceLexer(){const{maxTokens:e}=this._options,r=this._lexer.advance();if(e!==void 0&&r.kind!==TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw syntaxError(this._lexer.source,r.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function getTokenDesc(t){const e=t.value;return getTokenKindDesc(t.kind)+(e!=null?` "${e}"`:"")}function getTokenKindDesc(t){return isPunctuatorTokenKind(t)?`"${t}"`:t}function printString(t){return`"${t.replace(escapedRegExp,escapedReplacer)}"`}const escapedRegExp=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function escapedReplacer(t){return escapeSequences[t.charCodeAt(0)]}const escapeSequences=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],BREAK=Object.freeze({});function visit(t,e,r=QueryDocumentKeys){const s=new Map;for(const cr of Object.values(Kind))s.set(cr,getEnterLeaveForKind(e,cr));let o,d=Array.isArray(t),L=[t],ge=-1,Mt=[],er=t,tr,ir;const rr=[],nr=[];do{ge++;const cr=ge===L.length,ur=cr&&Mt.length!==0;if(cr){if(tr=nr.length===0?void 0:rr[rr.length-1],er=ir,ir=nr.pop(),ur)if(d){er=er.slice();let dr=0;for(const[hr,pr]of Mt){const mr=hr-dr;pr===null?(er.splice(mr,1),dr++):er[mr]=pr}}else{er=Object.defineProperties({},Object.getOwnPropertyDescriptors(er));for(const[dr,hr]of Mt)er[dr]=hr}ge=o.index,L=o.keys,Mt=o.edits,d=o.inArray,o=o.prev}else if(ir){if(tr=d?ge:L[ge],er=ir[tr],er==null)continue;rr.push(tr)}let or;if(!Array.isArray(er)){var ar,sr;isNode(er)||devAssert(!1,`Invalid AST Node: ${inspect(er)}.`);const dr=cr?(ar=s.get(er.kind))===null||ar===void 0?void 0:ar.leave:(sr=s.get(er.kind))===null||sr===void 0?void 0:sr.enter;if(or=dr==null?void 0:dr.call(e,er,tr,ir,rr,nr),or===BREAK)break;if(or===!1){if(!cr){rr.pop();continue}}else if(or!==void 0&&(Mt.push([tr,or]),!cr))if(isNode(or))er=or;else{rr.pop();continue}}if(or===void 0&&ur&&Mt.push([tr,er]),cr)rr.pop();else{var lr;o={inArray:d,index:ge,keys:L,edits:Mt,prev:o},d=Array.isArray(er),L=d?er:(lr=r[er.kind])!==null&&lr!==void 0?lr:[],ge=-1,Mt=[],ir&&nr.push(ir),ir=er}}while(o!==void 0);return Mt.length!==0?Mt[Mt.length-1][1]:t}function getEnterLeaveForKind(t,e){const r=t[e];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:t.enter,leave:t.leave}}function print$1(t){return visit(t,printDocASTReducer)}const MAX_LINE_LENGTH=80,printDocASTReducer={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>join(t.definitions,` 30 31`)},OperationDefinition:{leave(t){const e=wrap$3("(",join(t.variableDefinitions,", "),")"),r=join([t.operation,join([t.name,e]),join(t.directives," ")]," ");return(r==="query"?"":r+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:r,directives:s})=>t+": "+e+wrap$3(" = ",r)+wrap$3(" ",join(s," "))},SelectionSet:{leave:({selections:t})=>block(t)},Field:{leave({alias:t,name:e,arguments:r,directives:s,selectionSet:o}){const d=wrap$3("",t,": ")+e;let L=d+wrap$3("(",join(r,", "),")");return L.length>MAX_LINE_LENGTH&&(L=d+wrap$3(`( 32`,indent(join(r,` 33`)),` 34)`)),join([L,join(s," "),o]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+wrap$3(" ",join(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:r})=>join(["...",wrap$3("on ",t),join(e," "),r]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:r,directives:s,selectionSet:o})=>`fragment ${t}${wrap$3("(",join(r,", "),")")} on ${e} ${wrap$3("",join(s," ")," ")}`+o},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?printBlockString(t):printString(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+join(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+join(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+wrap$3("(",join(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:r})=>wrap$3("",t,` 35`)+join(["schema",join(e," "),block(r)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:r})=>wrap$3("",t,` 36`)+join(["scalar",e,join(r," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:r,directives:s,fields:o})=>wrap$3("",t,` 37`)+join(["type",e,wrap$3("implements ",join(r," & ")),join(s," "),block(o)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:r,type:s,directives:o})=>wrap$3("",t,` 38`)+e+(hasMultilineItems(r)?wrap$3(`( 39`,indent(join(r,` 40`)),` 41)`):wrap$3("(",join(r,", "),")"))+": "+s+wrap$3(" ",join(o," "))},InputValueDefinition:{leave:({description:t,name:e,type:r,defaultValue:s,directives:o})=>wrap$3("",t,` 42`)+join([e+": "+r,wrap$3("= ",s),join(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:r,directives:s,fields:o})=>wrap$3("",t,` 43`)+join(["interface",e,wrap$3("implements ",join(r," & ")),join(s," "),block(o)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:r,types:s})=>wrap$3("",t,` 44`)+join(["union",e,join(r," "),wrap$3("= ",join(s," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:r,values:s})=>wrap$3("",t,` 45`)+join(["enum",e,join(r," "),block(s)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:r})=>wrap$3("",t,` 46`)+join([e,join(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:r,fields:s})=>wrap$3("",t,` 47`)+join(["input",e,join(r," "),block(s)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:r,repeatable:s,locations:o})=>wrap$3("",t,` 48`)+"directive @"+e+(hasMultilineItems(r)?wrap$3(`( 49`,indent(join(r,` 50`)),` 51)`):wrap$3("(",join(r,", "),")"))+(s?" repeatable":"")+" on "+join(o," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>join(["extend schema",join(t," "),block(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>join(["extend scalar",t,join(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:r,fields:s})=>join(["extend type",t,wrap$3("implements ",join(e," & ")),join(r," "),block(s)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:r,fields:s})=>join(["extend interface",t,wrap$3("implements ",join(e," & ")),join(r," "),block(s)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:r})=>join(["extend union",t,join(e," "),wrap$3("= ",join(r," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:r})=>join(["extend enum",t,join(e," "),block(r)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:r})=>join(["extend input",t,join(e," "),block(r)]," ")}};function join(t,e=""){var r;return(r=t==null?void 0:t.filter(s=>s).join(e))!==null&&r!==void 0?r:""}function block(t){return wrap$3(`{ 52`,indent(join(t,` 53`)),` 54}`)}function wrap$3(t,e,r=""){return e!=null&&e!==""?t+e+r:""}function indent(t){return wrap$3(" ",t.replace(/\n/g,` 55 `))}function hasMultilineItems(t){var e;return(e=t==null?void 0:t.some(r=>r.includes(` 56`)))!==null&&e!==void 0?e:!1}function isSelectionNode(t){return t.kind===Kind.FIELD||t.kind===Kind.FRAGMENT_SPREAD||t.kind===Kind.INLINE_FRAGMENT}function shouldInclude(t,e){var r=t.directives;return!r||!r.length?!0:getInclusionDirectives(r).every(function(s){var o=s.directive,d=s.ifArgument,L=!1;return d.value.kind==="Variable"?(L=e&&e[d.value.name.value],invariant$1(L!==void 0,68,o.name.value)):L=d.value.value,o.name.value==="skip"?!L:L})}function hasDirectives(t,e,r){var s=new Set(t),o=s.size;
56return visit(e,{Directive:function(d){if(s.delete(d.name.value)&&(!r||!s.size))return BREAK}}),r?!s.size:s.size<o}function hasClientExports(t){return t&&hasDirectives(["client","export"],t,!0)}function isInclusionDirective(t){var e=t.name.value;return e==="skip"||e==="include"}function getInclusionDirectives(t){var e=[];return t&&t.length&&t.forEach(function(r){if(isInclusionDirective(r)){var s=r.arguments,o=r.name.value;invariant$1(s&&s.length===1,69,o);var d=s[0];invariant$1(d.name&&d.name.value==="if",70,o);var L=d.value;invariant$1(L&&(L.kind==="Variable"||L.kind==="BooleanValue"),71,o),e.push({directive:r,ifArgument:d})}}),e}const defaultMakeData$1=()=>Object.create(null),{forEach:forEach$1,slice:slice$1}=Array.prototype,{hasOwnProperty:hasOwnProperty$i}=Object.prototype;let Trie$1=class Ls{constructor(e=!0,r=defaultMakeData$1){this.weakness=e,this.makeData=r}lookup(){return this.lookupArray(arguments)}lookupArray(e){let r=this;return forEach$1.call(e,s=>r=r.getChildTrie(s)),hasOwnProperty$i.call(r,"data")?r.data:r.data=this.makeData(slice$1.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let r=this;for(let s=0,o=e.length;r&&s<o;++s){const d=r.mapFor(e[s],!1);r=d&&d.get(e[s])}return r&&r.data}remove(){return this.removeArray(arguments)}removeArray(e){let r;if(e.length){const s=e[0],o=this.mapFor(s,!1),d=o&&o.get(s);d&&(r=d.removeArray(slice$1.call(e,1)),!d.data&&!d.weak&&!(d.strong&&d.strong.size)&&o.delete(s))}else r=this.data,delete this.data;return r}getChildTrie(e){const r=this.mapFor(e,!0);let s=r.get(e);return s||r.set(e,s=new Ls(this.weakness,this.makeData)),s}mapFor(e,r){return this.weakness&&isObjRef$1(e)?this.weak||(r?this.weak=new WeakMap:void 0):this.strong||(r?this.strong=new Map:void 0)}};function isObjRef$1(t){switch(typeof t){case"object":if(t===null)break;case"function":return!0}return!1}var canUseWeakMap=typeof WeakMap=="function"&&!maybe$1(function(){return navigator.product=="ReactNative"&&!global.HermesInternal}),canUseWeakSet=typeof WeakSet=="function",canUseSymbol=typeof Symbol=="function"&&typeof Symbol.for=="function",canUseAsyncIteratorSymbol=canUseSymbol&&Symbol.asyncIterator;maybe$1(function(){return window.document.createElement});maybe$1(function(){return navigator.userAgent.indexOf("jsdom")>=0});function isNonNullObject(t){return t!==null&&typeof t=="object"}function getFragmentQueryDocument(t,e){var r=e,s=[];t.definitions.forEach(function(d){if(d.kind==="OperationDefinition")throw newInvariantError(72,d.operation,d.name?" named '".concat(d.name.value,"'"):"");d.kind==="FragmentDefinition"&&s.push(d)}),typeof r>"u"&&(invariant$1(s.length===1,73,s.length),r=s[0].name.value);var o=__assign(__assign({},t),{definitions:__spreadArray([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],t.definitions,!0)});return o}function createFragmentMap(t){t===void 0&&(t=[]);var e={};return t.forEach(function(r){e[r.name.value]=r}),e}function getFragmentFromSelection(t,e){switch(t.kind){case"InlineFragment":return t;case"FragmentSpread":{var r=t.name.value;if(typeof e=="function")return e(r);var s=e&&e[r];return invariant$1(s,74,r),s||null}default:return null}}function defaultDispose$1(){}class StrongCache{constructor(e=1/0,r=defaultDispose$1){this.max=e,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const r=this.getNode(e);return r&&r.value}get size(){return this.map.size}getNode(e){const r=this.map.get(e);if(r&&r!==this.newest){const{older:s,newer:o}=r;o&&(o.older=s),s&&(s.newer=o),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=o)}return r}set(e,r){let s=this.getNode(e);return s?s.value=r:(s={key:e,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=s),this.newest=s,this.oldest=this.oldest||s,this.map.set(e,s),s.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const r=this.map.get(e);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(e),this.dispose(r.value,e),!0):!1}}function noop$2(){}const defaultDispose=noop$2,_WeakRef=typeof WeakRef<"u"?WeakRef:function(t){return{deref:()=>t}},_WeakMap=typeof WeakMap<"u"?WeakMap:Map,_FinalizationRegistry=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:noop$2,unregister:noop$2}},finalizationBatchSize=10024;class WeakCache{constructor(e=1/0,r=defaultDispose){this.max=e,this.dispose=r,this.map=new _WeakMap,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const s=this.unfinalizedNodes.values();for(let o=0;o<finalizationBatchSize;o++){const d=s.next().value;if(!d)break;
56this.unfinalizedNodes.delete(d);const L=d.key;delete d.key,d.keyRef=new _WeakRef(L),this.registry.register(L,d,d)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new _FinalizationRegistry(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const r=this.getNode(e);return r&&r.value}getNode(e){const r=this.map.get(e);if(r&&r!==this.newest){const{older:s,newer:o}=r;o&&(o.older=s),s&&(s.newer=o),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=o)}return r}set(e,r){let s=this.getNode(e);return s?s.value=r:(s={key:e,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=s),this.newest=s,this.oldest=this.oldest||s,this.scheduleFinalization(s),this.map.set(e,s),this.size++,s.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const r=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,r),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),r&&this.map.delete(r)}delete(e){const r=this.map.get(e);return r?(this.deleteNode(r),!0):!1}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var scheduledCleanup=new WeakSet;function schedule(t){t.size<=(t.max||-1)||scheduledCleanup.has(t)||(scheduledCleanup.add(t),setTimeout(function(){t.clean(),scheduledCleanup.delete(t)},100))}var AutoCleanedWeakCache=function(t,e){var r=new WeakCache(t,e);return r.set=function(s,o){var d=WeakCache.prototype.set.call(this,s,o);return schedule(this),d},r},AutoCleanedStrongCache=function(t,e){var r=new StrongCache(t,e);return r.set=function(s,o){var d=StrongCache.prototype.set.call(this,s,o);return schedule(this),d},r},cacheSizeSymbol=Symbol.for("apollo.cacheSize"),cacheSizes=__assign({},global$1[cacheSizeSymbol]),globalCaches={};function registerGlobalCache(t,e){globalCaches[t]=e}var getApolloClientMemoryInternals=globalThis.__DEV__!==!1?_getApolloClientMemoryInternals:void 0,getInMemoryCacheMemoryInternals=globalThis.__DEV__!==!1?_getInMemoryCacheMemoryInternals:void 0,getApolloCacheMemoryInternals=globalThis.__DEV__!==!1?_getApolloCacheMemoryInternals:void 0;function getCurrentCacheSizes(){var t={parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4};return Object.fromEntries(Object.entries(t).map(function(e){var r=e[0],s=e[1];return[r,cacheSizes[r]||s]}))}function _getApolloClientMemoryInternals(){var t,e,r,s,o;if(globalThis.__DEV__===!1)throw new Error("only supported in development mode");return{limits:getCurrentCacheSizes(),sizes:__assign({print:(t=globalCaches.print)===null||t===void 0?void 0:t.call(globalCaches),parser:(e=globalCaches.parser)===null||e===void 0?void 0:e.call(globalCaches),canonicalStringify:(r=globalCaches.canonicalStringify)===null||r===void 0?void 0:r.call(globalCaches),links:linkInfo(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:transformInfo(this.queryManager.documentTransform)}},(o=(s=this.cache).getMemoryInternals)===null||o===void 0?void 0:o.call(s))}}function _getApolloCacheMemoryInternals(){return{cache:{fragmentQueryDocuments:getWrapperInformation(this.getFragmentDoc)}}}function _getInMemoryCacheMemoryInternals(){var t=this.config.fragments;return __assign(__assign({},_getApolloCacheMemoryInternals.apply(this)),{addTypenameDocumentTransform:transformInfo(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:getWrapperInformation(this.storeReader.executeSelectionSet),executeSubSelectedArray:getWrapperInformation(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:getWrapperInformation(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:getWrapperInformation(t==null?void 0:t.findFragmentSpreads),lookup:getWrapperInformation(t==null?void 0:t.lookup),transform:getWrapperInformation(t==null?void 0:t.transform)}})}function isWrapper(t){return!!t&&"dirtyKey"in t}function getWrapperInformation(t){return isWrapper(t)?t.size:void 0}function isDefined(t){return t!=null}function transformInfo(t){return recurseTransformInfo(t).map(function(e){return{cache:e}})}function recurseTransformInfo(t){return t?__spreadArray(__spreadArray([getWrapperInformation(t==null?void 0:t.performWork)],recurseTransformInfo(t==null?void 0:t.left),!0),recurseTransformInfo(t==null?void 0:t.right),!0).filter(isDefined):[]}function linkInfo(t){var e;return t?__spreadArray(__spreadArray([(e=t==null?void 0:t.getMemoryInternals)===null||e===void 0?void 0:e.call(t)],linkInfo(t==null?void 0:t.left),!0),linkInfo(t==null?void 0:t.right),!0).filter(isDefined):[]}var canonicalStringify=Object.assign(function(e){return JSON.stringify(e,stableObjectReplacer)},{reset:function(){sortingMap=new AutoCleanedStrongCache(cacheSizes.canonicalStringify||1e3)}});globalThis.__DEV__!==!1&®isterGlobalCache("canonicalStringify",function(){return sortingMap.size});var sortingMap;canonicalStringify.reset();function stableObjectReplacer(t,e){if(e&&typeof e=="object"){var r=Object.getPrototypeOf(e);if(r===Object.prototype||r===null){var s=Object.keys(e);if(s.every(everyKeyInOrder))return e;var o=JSON.stringify(s),d=sortingMap.get(o);if(!d){s.sort();var L=JSON.stringify(s);d=sortingMap.get(L)||s,sortingMap.set(o,d),sortingMap.set(L,d)}var ge=Object.create(r);return d.forEach(function(Mt){ge[Mt]=e[Mt]}),ge}}return e}function everyKeyInOrder(t,e,r){return e===0||r[e-1]<=t}function makeReference(t){return{__ref:String(t)}}function isReference(t){return!!(t&&typeof t=="object"&&typeof t.__ref=="string")}function isDocumentNode(t){return isNonNullObject(t)&&t.kind==="Document"&&Array.isArray(t.definitions)}function isStringValue(t){return t.kind==="StringValue"}function isBooleanValue(t){return t.kind==="BooleanValue"}function isIntValue(t){return t.kind==="IntValue"}function isFloatValue(t){return t.kind==="FloatValue"}function isVariable(t){return t.kind==="Variable"}function isObjectValue(t){return t.kind==="ObjectValue"}function isListValue(t){return t.kind==="ListValue"}function isEnumValue(t){return t.kind==="EnumValue"}
56function isNullValue(t){return t.kind==="NullValue"}function valueToObjectRepresentation(t,e,r,s){if(isIntValue(r)||isFloatValue(r))t[e.value]=Number(r.value);else if(isBooleanValue(r)||isStringValue(r))t[e.value]=r.value;else if(isObjectValue(r)){var o={};r.fields.map(function(L){return valueToObjectRepresentation(o,L.name,L.value,s)}),t[e.value]=o}else if(isVariable(r)){var d=(s||{})[r.name.value];t[e.value]=d}else if(isListValue(r))t[e.value]=r.values.map(function(L){var ge={};return valueToObjectRepresentation(ge,e,L,s),ge[e.value]});else if(isEnumValue(r))t[e.value]=r.value;else if(isNullValue(r))t[e.value]=null;else throw newInvariantError(83,e.value,r.kind)}function storeKeyNameFromField(t,e){var r=null;t.directives&&(r={},t.directives.forEach(function(o){r[o.name.value]={},o.arguments&&o.arguments.forEach(function(d){var L=d.name,ge=d.value;return valueToObjectRepresentation(r[o.name.value],L,ge,e)})}));var s=null;return t.arguments&&t.arguments.length&&(s={},t.arguments.forEach(function(o){var d=o.name,L=o.value;return valueToObjectRepresentation(s,d,L,e)})),getStoreKeyName(t.name.value,s,r)}var KNOWN_DIRECTIVES=["connection","include","skip","client","rest","export","nonreactive"],storeKeyNameStringify=canonicalStringify,getStoreKeyName=Object.assign(function(t,e,r){if(e&&r&&r.connection&&r.connection.key)if(r.connection.filter&&r.connection.filter.length>0){var s=r.connection.filter?r.connection.filter:[];s.sort();var o={};return s.forEach(function(ge){o[ge]=e[ge]}),"".concat(r.connection.key,"(").concat(storeKeyNameStringify(o),")")}else return r.connection.key;var d=t;if(e){var L=storeKeyNameStringify(e);d+="(".concat(L,")")}return r&&Object.keys(r).forEach(function(ge){KNOWN_DIRECTIVES.indexOf(ge)===-1&&(r[ge]&&Object.keys(r[ge]).length?d+="@".concat(ge,"(").concat(storeKeyNameStringify(r[ge]),")"):d+="@".concat(ge))}),d},{setStringify:function(t){var e=storeKeyNameStringify;return storeKeyNameStringify=t,e}});function argumentsObjectFromField(t,e){if(t.arguments&&t.arguments.length){var r={};return t.arguments.forEach(function(s){var o=s.name,d=s.value;return valueToObjectRepresentation(r,o,d,e)}),r}return null}function resultKeyNameFromField(t){return t.alias?t.alias.value:t.name.value}function getTypenameFromResult(t,e,r){for(var s,o=0,d=e.selections;o<d.length;o++){var L=d[o];if(isField(L)){if(L.name.value==="__typename")return t[resultKeyNameFromField(L)]}else s?s.push(L):s=[L]}if(typeof t.__typename=="string")return t.__typename;if(s)for(var ge=0,Mt=s;ge<Mt.length;ge++){var L=Mt[ge],er=getTypenameFromResult(t,getFragmentFromSelection(L,r).selectionSet,r);if(typeof er=="string")return er}}function isField(t){return t.kind==="Field"}function isInlineFragment(t){return t.kind==="InlineFragment"}function checkDocument(t){invariant$1(t&&t.kind==="Document",75);var e=t.definitions.filter(function(r){return r.kind!=="FragmentDefinition"}).map(function(r){if(r.kind!=="OperationDefinition")throw newInvariantError(76,r.kind);return r});return invariant$1(e.length<=1,77,e.length),t}function getOperationDefinition(t){return checkDocument(t),t.definitions.filter(function(e){return e.kind==="OperationDefinition"})[0]}function getOperationName(t){return t.definitions.filter(function(e){return e.kind==="OperationDefinition"&&!!e.name}).map(function(e){return e.name.value})[0]||null}function getFragmentDefinitions(t){return t.definitions.filter(function(e){return e.kind==="FragmentDefinition"})}function getQueryDefinition(t){var e=getOperationDefinition(t);return invariant$1(e&&e.operation==="query",78),e}function getFragmentDefinition(t){invariant$1(t.kind==="Document",79),invariant$1(t.definitions.length<=1,80);var e=t.definitions[0];return invariant$1(e.kind==="FragmentDefinition",81),e}function getMainDefinition(t){checkDocument(t);for(var e,r=0,s=t.definitions;r<s.length;r++){var o=s[r];if(o.kind==="OperationDefinition"){var d=o.operation;if(d==="query"||d==="mutation"||d==="subscription")return o}o.kind==="FragmentDefinition"&&!e&&(e=o)}if(e)return e;throw newInvariantError(82)}function getDefaultValues(t){var e=Object.create(null),r=t&&t.variableDefinitions;return r&&r.length&&r.forEach(function(s){s.defaultValue&&valueToObjectRepresentation(e,s.variable.name,s.defaultValue)}),e}const defaultMakeData=()=>Object.create(null),{forEach,slice}=Array.prototype,{hasOwnProperty:hasOwnProperty$h}=Object.prototype;class Trie{constructor(e=!0,r=defaultMakeData){this.weakness=e,this.makeData=r}lookup(...e){return this.lookupArray(e)}lookupArray(e){let r=this;return forEach.call(e,s=>r=r.getChildTrie(s)),hasOwnProperty$h.call(r,"data")?r.data:r.data=this.makeData(slice.call(e))}peek(...e){return this.peekArray(e)}peekArray(e){let r=this;for(let s=0,o=e.length;r&&s<o;++s){const d=this.weakness&&isObjRef(e[s])?r.weak:r.strong;r=d&&d.get(e[s])}return r&&r.data}getChildTrie(e){const r=this.weakness&&isObjRef(e)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map);let s=r.get(e);return s||r.set(e,s=new Trie(this.weakness,this.makeData)),s}}function isObjRef(t){switch(typeof t){case"object":if(t===null)break;case"function":return!0}return!1}let currentContext=null;const MISSING_VALUE={};let idCounter=1;const makeSlotClass=()=>class{constructor(){this.id=["slot",idCounter++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=currentContext;e;e=e.parent)if(this.id in e.slots){const r=e.slots[this.id];if(r===MISSING_VALUE)break;return e!==currentContext&&(currentContext.slots[this.id]=r),!0}return currentContext&&(currentContext.slots[this.id]=MISSING_VALUE),!1}getValue(){if(this.hasValue())return currentContext.slots[this.id]}withValue(e,r,s,o){const d={__proto__:null,[this.id]:e},L=currentContext;currentContext={parent:L,slots:d};try{return r.apply(o,s)}finally{currentContext=L}}static bind(e){const r=currentContext;return function(){const s=currentContext;try{return currentContext=r,e.apply(this,arguments)}finally{currentContext=s}}}static noContext(e,r,s){if(currentContext){const o=currentContext;try{return currentContext=null,e.apply(s,r)}finally{currentContext=o}}else return e.apply(s,r)}};function maybe(t){try{return t()}catch{}}const globalKey="@wry/context:Slot",host=maybe(()=>globalThis)||maybe(()=>global)||Object.create(null),globalHost=host,Slot=globalHost[globalKey]||Array[globalKey]||function(t){try{Object.defineProperty(globalHost,globalKey,{value:t,enumerable:!1,writable:!1,
56configurable:!0})}finally{return t}}(makeSlotClass()),parentEntrySlot=new Slot,{hasOwnProperty:hasOwnProperty$g}=Object.prototype,arrayFromSet=Array.from||function(t){const e=[];return t.forEach(r=>e.push(r)),e};function maybeUnsubscribe(t){const{unsubscribe:e}=t;typeof e=="function"&&(t.unsubscribe=void 0,e())}const emptySetPool=[],POOL_TARGET_SIZE=100;function assert(t,e){if(!t)throw new Error(e||"assertion failure")}function valueIs(t,e){const r=t.length;return r>0&&r===e.length&&t[r-1]===e[r-1]}function valueGet(t){switch(t.length){case 0:throw new Error("unknown value");case 1:return t[0];case 2:throw t[1]}}function valueCopy(t){return t.slice(0)}class Entry{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++Entry.count}peek(){if(this.value.length===1&&!mightBeDirty(this))return rememberParent(this),this.value[0]}recompute(e){return assert(!this.recomputing,"already recomputing"),rememberParent(this),mightBeDirty(this)?reallyRecompute(this,e):valueGet(this.value)}setDirty(){this.dirty||(this.dirty=!0,reportDirty(this),maybeUnsubscribe(this))}dispose(){this.setDirty(),forgetChildren(this),eachParent(this,(e,r)=>{e.setDirty(),forgetChild(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=emptySetPool.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(arrayFromSet(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),emptySetPool.push(this.deps),this.deps=null)}}Entry.count=0;function rememberParent(t){const e=parentEntrySlot.getValue();if(e)return t.parents.add(e),e.childValues.has(t)||e.childValues.set(t,[]),mightBeDirty(t)?reportDirtyChild(e,t):reportCleanChild(e,t),e}function reallyRecompute(t,e){return forgetChildren(t),parentEntrySlot.withValue(t,recomputeNewValue,[t,e]),maybeSubscribe(t,e)&&setClean(t),valueGet(t.value)}function recomputeNewValue(t,e){t.recomputing=!0;const{normalizeResult:r}=t;let s;r&&t.value.length===1&&(s=valueCopy(t.value)),t.value.length=0;try{if(t.value[0]=t.fn.apply(null,e),r&&s&&!valueIs(s,t.value))try{t.value[0]=r(t.value[0],s[0])}catch{}}catch(o){t.value[1]=o}t.recomputing=!1}function mightBeDirty(t){return t.dirty||!!(t.dirtyChildren&&t.dirtyChildren.size)}function setClean(t){t.dirty=!1,!mightBeDirty(t)&&reportClean(t)}function reportDirty(t){eachParent(t,reportDirtyChild)}function reportClean(t){eachParent(t,reportCleanChild)}function eachParent(t,e){const r=t.parents.size;if(r){const s=arrayFromSet(t.parents);for(let o=0;o<r;++o)e(s[o],t)}}function reportDirtyChild(t,e){assert(t.childValues.has(e)),assert(mightBeDirty(e));const r=!mightBeDirty(t);if(!t.dirtyChildren)t.dirtyChildren=emptySetPool.pop()||new Set;else if(t.dirtyChildren.has(e))return;t.dirtyChildren.add(e),r&&reportDirty(t)}function reportCleanChild(t,e){assert(t.childValues.has(e)),assert(!mightBeDirty(e));const r=t.childValues.get(e);r.length===0?t.childValues.set(e,valueCopy(e.value)):valueIs(r,e.value)||t.setDirty(),removeDirtyChild(t,e),!mightBeDirty(t)&&reportClean(t)}function removeDirtyChild(t,e){const r=t.dirtyChildren;r&&(r.delete(e),r.size===0&&(emptySetPool.length<POOL_TARGET_SIZE&&emptySetPool.push(r),t.dirtyChildren=null))}function forgetChildren(t){t.childValues.size>0&&t.childValues.forEach((e,r)=>{forgetChild(t,r)}),t.forgetDeps(),assert(t.dirtyChildren===null)}function forgetChild(t,e){e.parents.delete(t),t.childValues.delete(e),removeDirtyChild(t,e)}function maybeSubscribe(t,e){if(typeof t.subscribe=="function")try{maybeUnsubscribe(t),t.unsubscribe=t.subscribe.apply(null,e)}catch{return t.setDirty(),!1}return!0}const EntryMethods={setDirty:!0,dispose:!0,forget:!0};function dep(t){const e=new Map;function r(s){const o=parentEntrySlot.getValue();if(o){let d=e.get(s);d||e.set(s,d=new Set),o.dependOn(d)}}return r.dirty=function(o,d){const L=e.get(o);if(L){const ge=d&&hasOwnProperty$g.call(EntryMethods,d)?d:"setDirty";arrayFromSet(L).forEach(Mt=>Mt[ge]()),e.delete(o),maybeUnsubscribe(L)}},r}let defaultKeyTrie;function defaultMakeCacheKey(...t){return(defaultKeyTrie||(defaultKeyTrie=new Trie(typeof WeakMap=="function"))).lookupArray(t)}const caches=new Set;function wrap$2(t,{max:e=Math.pow(2,16),keyArgs:r,makeCacheKey:s=defaultMakeCacheKey,normalizeResult:o,subscribe:d,cache:L=StrongCache}=Object.create(null)){const ge=typeof L=="function"?new L(e,rr=>rr.dispose()):L,Mt=function(){const rr=s.apply(null,r?r.apply(null,arguments):arguments);if(rr===void 0)return t.apply(null,arguments);let nr=ge.get(rr);nr||(ge.set(rr,nr=new Entry(t)),nr.normalizeResult=o,nr.subscribe=d,nr.forget=()=>ge.delete(rr));const ar=nr.recompute(Array.prototype.slice.call(arguments));return ge.set(rr,nr),caches.add(ge),parentEntrySlot.hasValue()||(caches.forEac
56h(sr=>sr.clean()),caches.clear()),ar};Object.defineProperty(Mt,"size",{get:()=>ge.size,configurable:!1,enumerable:!1}),Object.freeze(Mt.options={max:e,keyArgs:r,makeCacheKey:s,normalizeResult:o,subscribe:d,cache:ge});function er(rr){const nr=rr&&ge.get(rr);nr&&nr.setDirty()}Mt.dirtyKey=er,Mt.dirty=function(){er(s.apply(null,arguments))};function tr(rr){const nr=rr&&ge.get(rr);if(nr)return nr.peek()}Mt.peekKey=tr,Mt.peek=function(){return tr(s.apply(null,arguments))};function ir(rr){return rr?ge.delete(rr):!1}return Mt.forgetKey=ir,Mt.forget=function(){return ir(s.apply(null,arguments))},Mt.makeCacheKey=s,Mt.getKey=r?function(){return s.apply(null,r.apply(null,arguments))}:s,Object.freeze(Mt)}function identity(t){return t}var DocumentTransform=function(){function t(e,r){r===void 0&&(r=Object.create(null)),this.resultCache=canUseWeakSet?new WeakSet:new Set,this.transform=e,r.getCacheKey&&(this.getCacheKey=r.getCacheKey),this.cached=r.cache!==!1,this.resetCache()}return t.prototype.getCacheKey=function(e){return[e]},t.identity=function(){return new t(identity,{cache:!1})},t.split=function(e,r,s){return s===void 0&&(s=t.identity()),Object.assign(new t(function(o){var d=e(o)?r:s;return d.transformDocument(o)},{cache:!1}),{left:r,right:s})},t.prototype.resetCache=function(){var e=this;if(this.cached){var r=new Trie$1(canUseWeakMap);this.performWork=wrap$2(t.prototype.performWork.bind(this),{makeCacheKey:function(s){var o=e.getCacheKey(s);if(o)return invariant$1(Array.isArray(o),67),r.lookupArray(o)},max:cacheSizes["documentTransform.cache"],cache:WeakCache})}},t.prototype.performWork=function(e){return checkDocument(e),this.transform(e)},t.prototype.transformDocument=function(e){if(this.resultCache.has(e))return e;var r=this.performWork(e);return this.resultCache.add(r),r},t.prototype.concat=function(e){var r=this;return Object.assign(new t(function(s){return e.transformDocument(r.transformDocument(s))},{cache:!1}),{left:this,right:e})},t}(),printCache,print=Object.assign(function(t){var e=printCache.get(t);return e||(e=print$1(t),printCache.set(t,e)),e},{reset:function(){printCache=new AutoCleanedWeakCache(cacheSizes.print||2e3)}});print.reset();globalThis.__DEV__!==!1&®isterGlobalCache("print",function(){return printCache?printCache.size:0});var isArray$2=Array.isArray;function isNonEmptyArray(t){return Array.isArray(t)&&t.length>0}var TYPENAME_FIELD={kind:Kind.FIELD,name:{kind:Kind.NAME,value:"__typename"}};function isEmpty$1(t,e){return!t||t.selectionSet.selections.every(function(r){return r.kind===Kind.FRAGMENT_SPREAD&&isEmpty$1(e[r.name.value],e)})}function nullIfDocIsEmpty(t){return isEmpty$1(getOperationDefinition(t)||getFragmentDefinition(t),createFragmentMap(getFragmentDefinitions(t)))?null:t}function getDirectiveMatcher(t){var e=new Map,r=new Map;return t.forEach(function(s){s&&(s.name?e.set(s.name,s):s.test&&r.set(s.test,s))}),function(s){var o=e.get(s.name.value);return!o&&r.size&&r.forEach(function(d,L){L(s)&&(o=d)}),o}}function makeInUseGetterFunction(t){var e=new Map;return function(s){s===void 0&&(s=t);var o=e.get(s);return o||e.set(s,o={variables:new Set,fragmentSpreads:new Set}),o}}function removeDirectivesFromDocument(t,e){checkDocument(e);for(var r=makeInUseGetterFunction(""),s=makeInUseGetterFunction(""),o=function(cr){for(var ur=0,or=void 0;ur<cr.length&&(or=cr[ur]);++ur)if(!isArray$2(or)){if(or.kind===Kind.OPERATION_DEFINITION)return r(or.name&&or.name.value);if(or.kind===Kind.FRAGMENT_DEFINITION)return s(or.name.value)}return globalThis.__DEV__!==!1&&invariant$1.error(84),null},d=0,L=e.definitions.length-1;L>=0;--L)e.definitions[L].kind===Kind.OPERATION_DEFINITION&&++d;var ge=getDirectiveMatcher(t),Mt=function(cr){return isNonEmptyArray(cr)&&cr.map(ge).some(function(ur){return ur&&ur.remove})},er=new Map,tr=!1,ir={enter:function(cr){if(Mt(cr.directives))return tr=!0,null}},rr=visit(e,{Field:ir,InlineFragment:ir,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(cr,ur,or,dr,hr){var pr=o(hr);pr&&pr.variables.add(cr.name.value)}},FragmentSpread:{enter:function(cr,ur,or,dr,hr){if(Mt(cr.directives))return tr=!0,null;var pr=o(hr);pr&&pr.fragmentSpreads.add(cr.name.value)}},FragmentDefinition:{enter:function(cr,ur,or,dr){er.set(JSON.stringify(dr),cr)},leave:function(cr,ur,or,dr){var hr=er.get(JSON.stringify(dr));if(cr===hr)return cr;if(d>0&&cr.selectionSet.selections.every(function(pr){return pr.kind===Kind.FIELD&&pr.name.value==="__typename"}))return s(cr.name.value).removed=!0,tr=!0,null}},Directive:{leave:function(cr){if(ge(cr))return tr=!0,null}}});if(!tr)return e;var nr=function(cr){return cr.transitiveVars||(cr.transitiveVars=new Set(cr.variables),cr.removed||cr.fragmentSpreads.forEach(function(ur){nr(s(ur)).transitiveVars.forEac
56h(function(or){cr.transitiveVars.add(or)})})),cr},ar=new Set;rr.definitions.forEach(function(cr){cr.kind===Kind.OPERATION_DEFINITION?nr(r(cr.name&&cr.name.value)).fragmentSpreads.forEach(function(ur){ar.add(ur)}):cr.kind===Kind.FRAGMENT_DEFINITION&&d===0&&!s(cr.name.value).removed&&ar.add(cr.name.value)}),ar.forEach(function(cr){nr(s(cr)).fragmentSpreads.forEach(function(ur){ar.add(ur)})});var sr=function(cr){return!!(!ar.has(cr)||s(cr).removed)},lr={enter:function(cr){if(sr(cr.name.value))return null}};return nullIfDocIsEmpty(visit(rr,{FragmentSpread:lr,FragmentDefinition:lr,OperationDefinition:{leave:function(cr){if(cr.variableDefinitions){var ur=nr(r(cr.name&&cr.name.value)).transitiveVars;if(ur.size<cr.variableDefinitions.length)return __assign(__assign({},cr),{variableDefinitions:cr.variableDefinitions.filter(function(or){return ur.has(or.variable.name.value)})})}}}}))}var addTypenameToDocument=Object.assign(function(t){return visit(t,{SelectionSet:{enter:function(e,r,s){if(!(s&&s.kind===Kind.OPERATION_DEFINITION)){var o=e.selections;if(o){var d=o.some(function(ge){return isField(ge)&&(ge.name.value==="__typename"||ge.name.value.lastIndexOf("__",0)===0)});if(!d){var L=s;if(!(isField(L)&&L.directives&&L.directives.some(function(ge){return ge.name.value==="export"})))return __assign(__assign({},e),{selections:__spreadArray(__spreadArray([],o,!0),[TYPENAME_FIELD],!1)})}}}}}})},{added:function(t){return t===TYPENAME_FIELD}});function buildQueryFromSelectionSet(t){var e=getMainDefinition(t),r=e.operation;if(r==="query")return t;var s=visit(t,{OperationDefinition:{enter:function(o){return __assign(__assign({},o),{operation:"query"})}}});return s}function removeClientSetsFromDocument(t){checkDocument(t);var e=removeDirectivesFromDocument([{test:function(r){return r.name.value==="client"},remove:!0}],t);return e}var hasOwnProperty$f=Object.prototype.hasOwnProperty;function mergeDeep(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mergeDeepArray(t)}function mergeDeepArray(t){var e=t[0]||{},r=t.length;if(r>1)for(var s=new DeepMerger,o=1;o<r;++o)e=s.merge(e,t[o]);return e}var defaultReconciler=function(t,e,r){return this.merge(t[r],e[r])},DeepMerger=function(){function t(e){e===void 0&&(e=defaultReconciler),this.reconciler=e,this.isObject=isNonNullObject,this.pastCopies=new Set}return t.prototype.merge=function(e,r){for(var s=this,o=[],d=2;d<arguments.length;d++)o[d-2]=arguments[d];return isNonNullObject(r)&&isNonNullObject(e)?(Object.keys(r).forEach(function(L){if(hasOwnProperty$f.call(e,L)){var ge=e[L];if(r[L]!==ge){var Mt=s.reconciler.apply(s,__spreadArray([e,r,L],o,!1));Mt!==ge&&(e=s.shallowCopyForMerge(e),e[L]=Mt)}}else e=s.shallowCopyForMerge(e),e[L]=r[L]}),e):r},t.prototype.shallowCopyForMerge=function(e){return isNonNullObject(e)&&(this.pastCopies.has(e)||(Array.isArray(e)?e=e.slice(0):e=__assign({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},t}();function _createForOfIteratorHelperLoose(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=_unsupportedIterableToArray$1(t))||e){r&&(t=r);var s=0;return function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 57In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$1(t,e){if(t){if(typeof t=="string")return _arrayLikeToArray$1(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray$1(t,e)}}function _arrayLikeToArray$1(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function _defineProperties$2(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function _createClass$2(t,e,r){return e&&_defineProperties$2(t.prototype,e),r&&_defineProperties$2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var hasSymbols=function(){return typeof Symbol=="function"}
vendor: 4,430 bytes, line 57
57,hasSymbol=function(t){return hasSymbols()&&!!Symbol[t]},getSymbol=function(t){return hasSymbol(t)?Symbol[t]:"@@"+t};hasSymbols()&&!hasSymbol("observable")&&(Symbol.observable=Symbol("observable"));var SymbolIterator=getSymbol("iterator"),SymbolObservable=getSymbol("observable"),SymbolSpecies=getSymbol("species");function getMethod$1(t,e){var r=t[e];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function getSpecies(t){var e=t.constructor;return e!==void 0&&(e=e[SymbolSpecies],e===null&&(e=void 0)),e!==void 0?e:Observable}function isObservable(t){return t instanceof Observable}function hostReportError(t){hostReportError.log?hostReportError.log(t):setTimeout(function(){throw t})}function enqueue(t){Promise.resolve().then(function(){try{t()}catch(e){hostReportError(e)}})}function cleanupSubscription(t){var e=t._cleanup;if(e!==void 0&&(t._cleanup=void 0,!!e))try{if(typeof e=="function")e();else{var r=getMethod$1(e,"unsubscribe");r&&r.call(e)}}catch(s){hostReportError(s)}}function closeSubscription(t){t._observer=void 0,t._queue=void 0,t._state="closed"}function flushSubscription(t){var e=t._queue;if(e){t._queue=void 0,t._state="ready";for(var r=0;r<e.length&&(notifySubscription(t,e[r].type,e[r].value),t._state!=="closed");++r);}}function notifySubscription(t,e,r){t._state="running";var s=t._observer;try{var o=getMethod$1(s,e);switch(e){case"next":o&&o.call(s,r);break;case"error":if(closeSubscription(t),o)o.call(s,r);else throw r;break;case"complete":closeSubscription(t),o&&o.call(s);break}}catch(d){hostReportError(d)}t._state==="closed"?cleanupSubscription(t):t._state==="running"&&(t._state="ready")}function onNotify(t,e,r){if(t._state!=="closed"){if(t._state==="buffering"){t._queue.push({type:e,value:r});return}if(t._state!=="ready"){t._state="buffering",t._queue=[{type:e,value:r}],enqueue(function(){return flushSubscription(t)});return}notifySubscription(t,e,r)}}var Subscription$1=function(){function t(r,s){this._cleanup=void 0,this._observer=r,this._queue=void 0,this._state="initializing";var o=new SubscriptionObserver(this);try{this._cleanup=s.call(void 0,o)}catch(d){o.error(d)}this._state==="initializing"&&(this._state="ready")}var e=t.prototype;return e.unsubscribe=function(){this._state!=="closed"&&(closeSubscription(this),cleanupSubscription(this))},_createClass$2(t,[{key:"closed",get:function(){return this._state==="closed"}}]),t}(),SubscriptionObserver=function(){function t(r){this._subscription=r}var e=t.prototype;return e.next=function(s){onNotify(this._subscription,"next",s)},e.error=function(s){onNotify(this._subscription,"error",s)},e.complete=function(){onNotify(this._subscription,"complete")},_createClass$2(t,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),t}(),Observable=function(){function t(r){if(!(this instanceof t))throw new TypeError("Observable cannot be called as a function");if(typeof r!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=r}var e=t.prototype;return e.subscribe=function(s){return(typeof s!="object"||s===null)&&(s={next:s,error:arguments[1],complete:arguments[2]}),new Subscription$1(s,this._subscriber)},e.forEach=function(s){var o=this;return new Promise(function(d,L){if(typeof s!="function"){L(new TypeError(s+" is not a function"));return}function ge(){Mt.unsubscribe(),d()}var Mt=o.subscribe({next:function(er){try{s(er,ge)}catch(tr){L(tr),Mt.unsubscribe()}},error:L,complete:d})})},e.map=function(s){var o=this;if(typeof s!="function")throw new TypeError(s+" is not a function");var d=getSpecies(this);return new d(function(L){return o.subscribe({next:function(ge){try{ge=s(ge)}catch(Mt){return L.error(Mt)}L.next(ge)},error:function(ge){L.error(ge)},complete:function(){L.complete()}})})},e.filter=function(s){var o=this;if(typeof s!="function")throw new TypeError(s+" is not a function");var d=getSpecies(this);return new d(function(L){return o.subscribe({next:function(ge){try{if(!s(ge))return}catch(Mt){return L.error(Mt)}L.next(ge)},error:function(ge){L.error(ge)},complete:function(){L.complete()}})})},e.reduce=function(s){var o=this;if(typeof s!="function")throw new TypeError(s+" is not a function");var d=getSpecies(this),L=arguments.length>1,ge=!1,Mt=arguments[1],er=Mt;return new d(function(tr){return o.subscribe({next:function(ir){var rr=!ge;if(ge=!0,!rr||L)try{er=s(er,ir)}catch(nr){return tr.error(nr)}
57else er=ir},error:function(ir){tr.error(ir)},complete:function(){if(!ge&&!L)return tr.error(new TypeError("Cannot reduce an empty sequence"));tr.next(er),tr.complete()}})})},e.concat=function(){for(var s=this,o=arguments.length,d=new Array(o),L=0;L<o;L++)d[L]=arguments[L];var ge=getSpecies(this);return new ge(function(Mt){var er,tr=0;function ir(rr){er=rr.subscribe({next:function(nr){Mt.next(nr)},error:function(nr){Mt.error(nr)},complete:function(){tr===d.length?(er=void 0,Mt.complete()):ir(ge.from(d[tr++]))}})}return ir(s),function(){er&&(er.unsubscribe(),er=void 0)}})},e.flatMap=function(s){var o=this;if(typeof s!="function")throw new TypeError(s+" is not a function");var d=getSpecies(this);return new d(function(L){var ge=[],Mt=o.subscribe({next:function(tr){if(s)try{tr=s(tr)}catch(rr){return L.error(rr)}var ir=d.from(tr).subscribe({next:function(rr){L.next(rr)},error:function(rr){L.error(rr)},complete:function(){var rr=ge.indexOf(ir);rr>=0&&ge.splice(rr,1),er()}});ge.push(ir)},error:function(tr){L.error(tr)},complete:function(){er()}});function er(){Mt.closed&&ge.length===0&&L.complete()}return function(){ge.forEach(function(tr){return tr.unsubscribe()}),Mt.unsubscribe()}})},e[SymbolObservable]=function(){return this},t.from=function(s){var o=typeof this=="function"?this:t;if(s==null)throw new TypeError(s+" is not an object");var d=getMethod$1(s,SymbolObservable);if(d){var L=d.call(s);if(Object(L)!==L)throw new TypeError(L+" is not an object");return isObservable(L)&&L.constructor===o?L:new o(function(ge){return L.subscribe(ge)})}if(hasSymbol("iterator")&&(d=getMethod$1(s,SymbolIterator),d))return new o(function(ge){enqueue(function(){if(!ge.closed){for(var Mt=_createForOfIteratorHelperLoose(d.call(s)),er;!(er=Mt()).done;){var tr=er.value;if(ge.next(tr),ge.closed)return}ge.complete()}})});if(Array.isArray(s))return new o(function(ge){enqueue(function(){if(!ge.closed){for(var Mt=0;Mt<s.length;++Mt)if(ge.next(s[Mt]),ge.closed)return;ge.complete()}})});throw new TypeError(s+" is not observable")},t.of=function(){for(var s=arguments.length,o=new Array(s),d=0;d<s;d++)o[d]=arguments[d];var L=typeof this=="function"?this:t;return new L(function(ge){enqueue(function(){if(!ge.closed){for(var Mt=0;Mt<o.length;++Mt)if(ge.next(o[Mt]),ge.closed)return;ge.complete()}})})},_createClass$2(t,null,[{key:SymbolSpecies,get:function(){return this}}]),t}();hasSymbols()&&Object.defineProperty(Observable,Symbol("extensions"),{value:{symbol:SymbolObservable,hostReportError},configurable:!0});function symbolObservablePonyfill(t){var e,r=t.Symbol;if(typeof r=="function")if(r.observable)e=r.observable;else{typeof r.for=="function"?e=r.for("https://github.com/benlesh/symbol-observable"):e=r("https://github.com/benlesh/symbol-observable");try{r.observable=e}catch{}}else e="@@observable";return e}var root$2;typeof self<"u"?root$2=self:typeof window<"u"?root$2=window:typeof global<"u"?root$2=global:typeof module<"u"?root$2=module:root$2=Function("return this")();symbolObservablePonyfill(root$2);var prototype=Observable.prototype,fakeObsSymbol="@@observable";prototype[fakeObsSymbol]||(prototype[fakeObsSymbol]=function(){return this});var toString$1=Object.prototype.toString;function cloneDeep$1(t){return cloneDeepHelper(t)}function cloneDeepHelper(t,e){switch(toString$1.call(t)){case"[object Array]":{if(e=e||new Map,e.has(t))return e.get(t);var r=t.slice(0);return e.set(t,r),r.forEach(function(o,d){r[d]=cloneDeepHelper(o,e)}),r}case"[object Object]":{if(e=e||new Map,e.has(t))return e.get(t);var s=Object.create(Object.getPrototypeOf(t));return e.set(t,s),Object.keys(t).forEach(function(o){s[o]=cloneDeepHelper(t[o],e)}),s}default:return t}}function deepFreeze(t){var e=new Set([t]);return e.forEach(function(r){isNonNullObject(r)&&shallowFreeze(r)===r&&Object.getOwnPropertyNames(r).forEach(function(s){isNonNullObject(r[s])&&e.add(r[s])})}),t}function shallowFreeze(t){if(globalThis.__DEV__!==!1&&!Object.isFrozen(t))try{Object.freeze(t)}catch(e){if(e instanceof TypeError)return null;throw e}return t}function maybeDeepFreeze(t){return globalThis.__DEV__!==!1&&deepFreeze(t),t}function iterateObserversSafely(t,e,r){var s=[];t.forEach(function(o){return o[e]&&s.push(o)}
57),s.forEach(function(o){return o[e](r)})}function asyncMap(t,e,r){return new Observable(function(s){var o={then:function(Mt){return new Promise(function(er){return er(Mt())})}};function d(Mt,er){return function(tr){if(Mt){var ir=function(){return s.closed?0:Mt(tr)};o=o.then(ir,ir).then(function(rr){return s.next(rr)},function(rr){return s.error(rr)})}else s[er](tr)}}var L={next:d(e,"next"),error:d(r,"error"),complete:function(){o.then(function(){return s.complete()})}},ge=t.subscribe(L);return function(){return ge.unsubscribe()}})}function fixObservableSubclass(t){function e(r){Object.defineProperty(t,r,{value:Observable})}return canUseSymbol&&Symbol.species&&e(Symbol.species),e("@@species"),t}function isPromiseLike(t){return t&&typeof t.then=="function"}var Concast=function(t){__extends(e,t);function e(r){var s=t.call(this,function(o){return s.addObserver(o),function(){return s.removeObserver(o)}})||this;return s.observers=new Set,s.promise=new Promise(function(o,d){s.resolve=o,s.reject=d}),s.handlers={next:function(o){s.sub!==null&&(s.latest=["next",o],s.notify("next",o),iterateObserversSafely(s.observers,"next",o))},error:function(o){var d=s.sub;d!==null&&(d&&setTimeout(function(){return d.unsubscribe()}),s.sub=null,s.latest=["error",o],s.reject(o),s.notify("error",o),iterateObserversSafely(s.observers,"error",o))},complete:function(){var o=s,d=o.sub,L=o.sources,ge=L===void 0?[]:L;if(d!==null){var Mt=ge.shift();Mt?isPromiseLike(Mt)?Mt.then(function(er){return s.sub=er.subscribe(s.handlers)},s.handlers.error):s.sub=Mt.subscribe(s.handlers):(d&&setTimeout(function(){return d.unsubscribe()}),s.sub=null,s.latest&&s.latest[0]==="next"?s.resolve(s.latest[1]):s.resolve(),s.notify("complete"),iterateObserversSafely(s.observers,"complete"))}}},s.nextResultListeners=new Set,s.cancel=function(o){s.reject(o),s.sources=[],s.handlers.complete()},s.promise.catch(function(o){}),typeof r=="function"&&(r=[new Observable(r)]),isPromiseLike(r)?r.then(function(o){return s.start(o)},s.handlers.error):s.start(r),s}return e.prototype.start=function(r){this.sub===void 0&&(this.sources=Array.from(r),this.handlers.complete())},e.prototype.deliverLastMessage=function(r){if(this.latest){var s=this.latest[0],o=r[s];o&&o.call(r,this.latest[1]),this.sub===null&&s==="next"&&r.complete&&r.complete()}},e.prototype.addObserver=function(r){this.observers.has(r)||(this.deliverLastMessage(r),this.observers.add(r))},e.prototype.removeObserver=function(r){this.observers.delete(r)&&this.observers.size<1&&this.handlers.complete()},e.prototype.notify=function(r,s){var o=this.nextResultListeners;o.size&&(this.nextResultListeners=new Set,o.forEach(function(d){return d(r,s)}))},e.prototype.beforeNext=function(r){var s=!1;this.nextResultListeners.add(function(o,d){s||(s=!0,r(o,d))})},e}(Observable);fixObservableSubclass(Concast);function isExecutionPatchIncrementalResult(t){return"incremental"in t}function isExecutionPatchInitialResult(t){return"hasNext"in t&&"data"in t}function isExecutionPatchResult(t){return isExecutionPatchIncrementalResult(t)||isExecutionPatchInitialResult(t)}function isApolloPayloadResult(t){return isNonNullObject(t)&&"payload"in t}function mergeIncrementalData(t,e){var r=t,s=new DeepMerger;return isExecutionPatchIncrementalResult(e)&&isNonEmptyArray(e.incremental)&&e.incremental.forEach(function(o){for(var d=o.data,L=o.path,ge=L.length-1;ge>=0;--ge){var Mt=L[ge],er=!isNaN(+Mt),tr=er?[]:{};tr[Mt]=d,d=tr}r=s.merge(r,d)}),r}function graphQLResultHasError(t){var e=getGraphQLErrorsFromResult(t);return isNonEmptyArray(e)}function getGraphQLErrorsFromResult(t){var e=isNonEmptyArray(t.errors)?t.errors.slice(0):[];return isExecutionPatchIncrementalResult(t)&&isNonEmptyArray(t.incremental)&&t.incremental.forEach(function(r){r.errors&&e.push.apply(e,r.errors)}),e}function compact(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Object.create(null);return t.forEach(function(s){s&&Object.keys(s).forEach(function(o){var d=s[o];d!==void 0&&(r[o]=d)})}),r}function mergeOptions(t,e){return compact(t,e,e.variables&&{variables:compact(__assign(__assign({},t&&t.variables),e.variables))})}
57function fromError(t){return new Observable(function(e){e.error(t)})}var throwServerError=function(t,e,r){var s=new Error(r);throw s.name="ServerError",s.response=t,s.statusCode=t.status,s.result=e,s};function validateOperation(t){for(var e=["query","operationName","variables","extensions","context"],r=0,s=Object.keys(t);r<s.length;r++){var o=s[r];if(e.indexOf(o)<0)throw newInvariantError(43,o)}return t}function createOperation(t,e){var r=__assign({},t),s=function(d){typeof d=="function"?r=__assign(__assign({},r),d(r)):r=__assign(__assign({},r),d)},o=function(){return __assign({},r)};return Object.defineProperty(e,"setContext",{enumerable:!1,value:s}),Object.defineProperty(e,"getContext",{enumerable:!1,value:o}),e}function transformOperation(t){var e={variables:t.variables||{},extensions:t.extensions||{},operationName:t.operationName,query:t.query};return e.operationName||(e.operationName=typeof e.query!="string"?getOperationName(e.query)||void 0:""),e}function filterOperationVariables(t,e){var r=__assign({},t),s=new Set(Object.keys(t));return visit(e,{Variable:function(o,d,L){L&&L.kind!=="VariableDefinition"&&s.delete(o.name.value)}}),s.forEach(function(o){delete r[o]}),r}function passthrough(t,e){return e?e(t):Observable.of()}function toLink(t){return typeof t=="function"?new ApolloLink(t):t}function isTerminating(t){return t.request.length<=1}var ApolloLink=function(){function t(e){e&&(this.request=e)}return t.empty=function(){return new t(function(){return Observable.of()})},t.from=function(e){return e.length===0?t.empty():e.map(toLink).reduce(function(r,s){return r.concat(s)})},t.split=function(e,r,s){var o=toLink(r),d=toLink(s||new t(passthrough)),L;return isTerminating(o)&&isTerminating(d)?L=new t(function(ge){return e(ge)?o.request(ge)||Observable.of():d.request(ge)||Observable.of()}):L=new t(function(ge,Mt){return e(ge)?o.request(ge,Mt)||Observable.of():d.request(ge,Mt)||Observable.of()}),Object.assign(L,{left:o,right:d})},t.execute=function(e,r){return e.request(createOperation(r.context,transformOperation(validateOperation(r))))||Observable.of()},t.concat=function(e,r){var s=toLink(e);if(isTerminating(s))return globalThis.__DEV__!==!1&&invariant$1.warn(35,s),s;var o=toLink(r),d;return isTerminating(o)?d=new t(function(L){return s.request(L,function(ge){return o.request(ge)||Observable.of()})||Observable.of()}):d=new t(function(L,ge){return s.request(L,function(Mt){return o.request(Mt,ge)||Observable.of()})||Observable.of()}),Object.assign(d,{left:s,right:o})},t.prototype.split=function(e,r,s){return this.concat(t.split(e,r,s||new t(passthrough)))},t.prototype.concat=function(e){return t.concat(this,e)},t.prototype.request=function(e,r){throw newInvariantError(36)},t.prototype.onError=function(e,r){if(r&&r.error)return r.error(e),!1;throw e},t.prototype.setOnError=function(e){return this.onError=e,this},t}(),from=ApolloLink.from,split=ApolloLink.split,execute=ApolloLink.execute;function onError(t){return new ApolloLink(function(e,r){return new Observable(function(s){var o,d,L;try{o=r(e).subscribe({next:function(ge){if(ge.errors&&(L=t({graphQLErrors:ge.errors,response:ge,operation:e,forward:r}),L)){d=L.subscribe({next:s.next.bind(s),error:s.error.bind(s),complete:s.complete.bind(s)});return}s.next(ge)},error:function(ge){if(L=t({operation:e,networkError:ge,graphQLErrors:ge&&ge.result&&ge.result.errors,forward:r}),L){d=L.subscribe({next:s.next.bind(s),error:s.error.bind(s),complete:s.complete.bind(s)});return}s.error(ge)},complete:function(){L||s.complete.bind(s)()}})}catch(ge){t({networkError:ge,operation:e,forward:r}),s.error(ge)}return function(){o&&o.unsubscribe(),d&&o.unsubscribe()}})})}(function(t){__extends(e,t);function e(r){var s=t.call(this)||this;return s.link=onError(r),s}return e.prototype.request=function(r,s){return this.link.request(r,s)},e})(ApolloLink);function _iterableToArrayLimit(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var s,o,d,L,ge=[],Mt=!0,er=!1;try{if(d=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;Mt=!1}else for(;!(Mt=(s=d.call(r)).done)&&(ge.push(s.value),ge.length!==e);Mt=!0);}catch(tr){er=!0,o=tr}
57finally{try{if(!Mt&&r.return!=null&&(L=r.return(),Object(L)!==L))return}finally{if(er)throw o}}return ge}}function ownKeys$1(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,s)}return r}function _objectSpread2$1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ownKeys$1(Object(r),!0).forEach(function(s){_defineProperty$1(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$1(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function _typeof(t){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(t)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,_toPropertyKey$1(s.key),s)}}function _createClass$1(t,e,r){return e&&_defineProperties$1(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function _defineProperty$1(t,e,r){return e=_toPropertyKey$1(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _inherits(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_getPrototypeOf(t)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,o){return s.__proto__=o,s},_setPrototypeOf(t,e)}function _isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _assertThisInitialized$1(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _possibleConstructorReturn(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(t)}function _createSuper(t){var e=_isNativeReflectConstruct();return function(){var s=_getPrototypeOf(t),o;if(e){var d=_getPrototypeOf(this).constructor;o=Reflect.construct(s,arguments,d)}else o=s.apply(this,arguments);return _possibleConstructorReturn(this,o)}}function _superPropBase(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=_getPrototypeOf(t),t!==null););return t}function _get$1(){return typeof Reflect<"u"&&Reflect.get?_get$1=Reflect.get.bind():_get$1=function(e,r,s){var o=_superPropBase(e,r);if(o){var d=Object.getOwnPropertyDescriptor(o,r);return d.get?d.get.call(arguments.length<3?e:s):d.value}},_get$1.apply(this,arguments)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _iterableToArray(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function _unsupportedIterableToArray(t,e){if(t){if(typeof t=="string")return _arrayLikeToArray(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(t,e)}}function _arrayLikeToArray(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 58In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _nonIterableRest(){throw new TypeError(`Invalid attempt to de
58structure non-iterable instance. 59In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toPrimitive$1(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,e);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function _toPropertyKey$1(t){var e=_toPrimitive$1(t,"string");return typeof e=="symbol"?e:String(e)}function throttle(t,e,r){var s=r||{},o=s.noTrailing,d=o===void 0?!1:o,L=s.noLeading,ge=L===void 0?!1:L,Mt=s.debounceMode,er=Mt===void 0?void 0:Mt,tr,ir=!1,rr=0;function nr(){tr&&clearTimeout(tr)}function ar(lr){var cr=lr||{},ur=cr.upcomingOnly,or=ur===void 0?!1:ur;nr(),ir=!or}function sr(){for(var lr=arguments.length,cr=new Array(lr),ur=0;ur<lr;ur++)cr[ur]=arguments[ur];var or=this,dr=Date.now()-rr;if(ir)return;function hr(){rr=Date.now(),e.apply(or,cr)}function pr(){tr=void 0}!ge&&er&&!tr&&hr(),nr(),er===void 0&&dr>t?ge?(rr=Date.now(),d||(tr=setTimeout(er?pr:hr,t))):hr():d!==!0&&(tr=setTimeout(er?pr:hr,er===void 0?t-dr:t))}return sr.cancel=ar,sr}function debounce(t,e,r){var s=r||{},o=s.atBegin,d=o===void 0?!1:o;return throttle(t,e,{debounceMode:d!==!1})}var esm=Object.freeze({__proto__:null,debounce,throttle});function factory$2(t){return function(e,r){return t(r,e)}}var throttle$1=factory$2(esm.throttle),debounce$1=factory$2(esm.debounce),reapply=function(e,r){for(;typeof e=="function";)e=e.call(r);return e},omit=function(e,r){return Object.entries(e).filter(function(s){var o=_slicedToArray(s,1),d=o[0];return!r.includes(d)}).reduce(function(s,o){var d=_slicedToArray(o,2),L=d[0],ge=d[1];return s[L]=ge,s},{})},addGqlError=function(e){e.graphQLErrors&&e.graphQLErrors.length&&(e.gqlError=e.graphQLErrors[0])},isServer$1=typeof window>"u",skippAllKeys={query:"_skipAllQueries",subscription:"_skipAllSubscriptions"},SmartApollo=function(){function t(e,r,s){_classCallCheck(this,t),_defineProperty$1(this,"type",null),_defineProperty$1(this,"vueApolloSpecialKeys",[]),this.vm=e,this.key=r,this.initialOptions=s,this.options=Object.assign({},s),this._skip=!1,this._pollInterval=null,this._watchers=[],this._destroyed=!1,this.lastApolloOptions=null}return _createClass$1(t,[{key:"autostart",value:function(){var r=this;typeof this.options.skip=="function"?this._skipWatcher=this.vm.$watch(function(){return r.options.skip.call(r.vm,r.vm,r.key)},this.skipChanged.bind(this),{immediate:!0,deep:this.options.deep}):!this.options.skip&&!this.allSkip?this.start():this._skip=!0,typeof this.options.pollInterval=="function"&&(this._pollWatcher=this.vm.$watch(this.options.pollInterval.bind(this.vm),this.pollIntervalChanged.bind(this),{immediate:!0}))}},{key:"pollIntervalChanged",value:function(r,s){r!==s&&(this.pollInterval=r,r==null?this.stopPolling():this.startPolling(r))}},{key:"skipChanged",value:function(r,s){r!==s&&(this.skip=r)}},{key:"pollInterval",get:function(){return this._pollInterval},set:function(r){this._pollInterval=r}},{key:"skip",get:function(){return this._skip},set:function(r){r||this.allSkip?this.stop():this.start(),this._skip=r}},{key:"allSkip",get:function(){return this.vm.$apollo[skippAllKeys[this.type]]}},{key:"refresh",value:function(){this._skip||(this.stop(),this.start())}},{key:"start",value:function(){var r=this;this.starting=!0;for(var s=function(){var Mt=d[o];if(typeof r.initialOptions[Mt]=="function"){var er=r.initialOptions[Mt].bind(r.vm);r.options[Mt]=er();var tr=function(rr){r._destroyed||(r.options[Mt]=rr,r.refresh())};isServer$1||(tr=r.options.throttle?throttle$1(tr,r.options.throttle):tr,tr=r.options.debounce?debounce$1(tr,r.options.debounce):tr),r._watchers.push(r.vm.$watch(er,tr,{deep:r.options.deep}))}},o=0,d=["query","document","context"];o<d.length;o++)s();if(typeof this.options.variables=="function"){var L=this.executeApollo.bind(this);isServer$1||(L=this.options.throttle?throttle$1(L,this.options.throttle):L,L=this.options.debounce?debounce$1(L,this.options.debounce):L),this._watchers.push(this.vm.$watch(function(){return typeof r.options.variables=="function"?r.options.variables.call(r.vm):r.options.variables},L,{immediate:!0,deep:this.options.deep}))}else this.executeApollo(this.options.variables)}},{key:"stop",value:function(){for(var r=0,s=this._watchers;r<s.length;r++){var o=s[r];o()}this.sub&&(this.sub.unsubscribe(),this.sub=null)}},{key:"generateApolloOptions",value:function(r){var s=omit(this.options,this.vueApolloSpecialKeys);return s.variables=r,this.lastApolloOptions=s,s}},{key:"executeApollo",value:function(r){this.starting=!1}},{key:"nextResult",value:function(r){var s=r.error;s&&addGqlError(s)}},{key:"callHandlers",value:function(r){for(var s=!1,o=arguments.length,d=new Array(o>1?o-1:0),L=1;L<o;L++)d[L-1]=arguments[L];for(var ge=0;ge<r.length;ge++){var Mt=r[ge];
59if(Mt){s=!0;var er=Mt.apply(this.vm,d);if(typeof er<"u"&&!er)break}}return s}},{key:"errorHandler",value:function(){for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return this.callHandlers.apply(this,[[this.options.error,this.vm.$apollo.error,this.vm.$apollo.provider.errorHandler]].concat(s))}},{key:"catchError",value:function(r){addGqlError(r);var s=this.errorHandler(r,this.vm,this.key,this.type,this.lastApolloOptions);if(!s)if(r.graphQLErrors&&r.graphQLErrors.length!==0){console.error("GraphQL execution errors for ".concat(this.type," '").concat(this.key,"'"));for(var o=0,d=r.graphQLErrors;o<d.length;o++){var L=d[o];console.error(L)}}else if(r.networkError)console.error("Error sending the ".concat(this.type," '").concat(this.key,"'"),r.networkError);else if(console.error("[vue-apollo] An error has occurred for ".concat(this.type," '").concat(this.key,"'")),Array.isArray(r)){var ge;(ge=console).error.apply(ge,_toConsumableArray(r))}else console.error(r)}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.stop(),this._skipWatcher&&this._skipWatcher())}}]),t}(),VUE_APOLLO_QUERY_KEYWORDS=["variables","watch","update","result","error","loadingKey","watchLoading","skip","throttle","debounce","subscribeToMore","prefetch","manual"],SmartQuery=function(t){_inherits(r,t);var e=_createSuper(r);function r(s,o,d){var L,ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return _classCallCheck(this,r),s.$data.$apolloData&&!s.$data.$apolloData.queries[o]&&(s.$data.$apolloData.queries[o]={loading:!1}),L=e.call(this,s,o,d),_defineProperty$1(_assertThisInitialized$1(L),"type","query"),_defineProperty$1(_assertThisInitialized$1(L),"vueApolloSpecialKeys",VUE_APOLLO_QUERY_KEYWORDS),_defineProperty$1(_assertThisInitialized$1(L),"_loading",!1),_defineProperty$1(_assertThisInitialized$1(L),"_linkedSubscriptions",[]),isServer$1&&(L.firstRun=new Promise(function(Mt,er){L._firstRunResolve=Mt,L._firstRunReject=er})),isServer$1&&(L.options.fetchPolicy="network-only"),d.manual||(L.hasDataField=Object.prototype.hasOwnProperty.call(L.vm.$data,o),L.hasDataField?Object.defineProperty(L.vm.$data.$apolloData.data,o,{get:function(){return L.vm.$data[o]},enumerable:!0,configurable:!0}):Object.defineProperty(L.vm.$data,o,{get:function(){return L.vm.$data.$apolloData.data[o]},enumerable:!0,configurable:!0})),ge&&L.autostart(),L}return _createClass$1(r,[{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(o){this._loading!==o&&(this._loading=o,this.vm.$data.$apolloData&&this.vm.$data.$apolloData.queries[this.key]&&(this.vm.$data.$apolloData.queries[this.key].loading=o,this.vm.$data.$apolloData.loading+=o?1:-1))}},{key:"stop",value:function(){_get$1(_getPrototypeOf(r.prototype),"stop",this).call(this),this.loadingDone(),this.observer&&(this.observer.stopPolling(),this.observer=null)}},{key:"generateApolloOptions",value:function(o){var d=_get$1(_getPrototypeOf(r.prototype),"generateApolloOptions",this).call(this,o);return this.vm.$isServer&&delete d.pollInterval,d}},{key:"executeApollo",value:function(o){if(!this._destroyed){var d=JSON.stringify(o);if(this.sub){if(d===this.previousVariablesJson)return;this.sub.unsubscribe();for(var L=0,ge=this._linkedSubscriptions;L<ge.length;L++){var Mt=ge[L];Mt.stop()}}if(this.previousVariablesJson=d,this.observer=this.vm.$apollo.watchQuery(this.generateApolloOptions(o)),this.startQuerySubscription(),this.options.fetchPolicy!=="no-cache"||this.options.notifyOnNetworkStatusChange){var er=this.retrieveCurrentResult();(this.options.notifyOnNetworkStatusChange||this.observer.getCurrentResult&&!er.loading)&&this.nextResult(er)}_get$1(_getPrototypeOf(r.prototype),"executeApollo",this).call(this,o);for(var tr=0,ir=this._linkedSubscriptions;tr<ir.length;tr++){var rr=ir[tr];rr.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 o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,d=this.observer.getCurrentResult?this.observer.getCurrentResult():this.observer.currentResult();return(o||d.loading)&&(this.loading||this.applyLoadingModifier(1),this.loading=!0),d}},{key:"nextResult",value:function(o){_get$1(_getPrototypeOf(r.prototype),"nextResult",this).call(this,o);var d=o.data,L=o.loading,ge=o.error,Mt=o.errors,er=Mt&&Mt.length;if((ge||er)&&this.firstRunReject(ge),L||this.loadingDone(),!ge&&er){var tr=new Error("GraphQL error: ".concat(Mt.map(function(rr){return rr.message}).join(" | ")));Object.assign(tr,{graphQLErrors:Mt,networkError:null}),_get$1(_getPrototypeOf(r.prototype),"catchError",this).call(this,tr)}if(!(this.observer.options.errorPolicy==="none"&&(ge||er))){var ir=typeof this.options.result=="function";d==null||(this.options.manual?ir||console.error("".concat(this.key," query must have a 'result' hook in manual mode")):typeof this.options.update=="function"?this.setData(this.options.update.call(this.vm,d)):typeof d[this.key]>"u"&&Object.keys(d).length?console.error("Missing ".concat(this.key," attribute on result"),d):this.setData(d[this.key])),ir&&this.options.result.call(this.vm,o,this.key)}}},{key:"setData",value:function(o){var d=this.hasDataField?this.vm.$data:this.vm.$data.$apolloData.data;d[this.key]=o}},{key:"catchError",value:function(o){_get$1(_getPrototypeOf(r.prototype),"catchError",this).call(this,o),this.firstRunReject(o),this.loadingDone(o
59),this.nextResult(this.observer.getCurrentResult?this.observer.getCurrentResult():this.observer.currentResult()),this.resubscribeToQuery()}},{key:"resubscribeToQuery",value:function(){var o=this.observer.getLastError(),d=this.observer.getLastResult();this.observer.resetLastResults(),this.startQuerySubscription(),Object.assign(this.observer,{lastError:o,lastResult:d})}},{key:"loadingKey",get:function(){return this.options.loadingKey||this.vm.$apollo.loadingKey}},{key:"watchLoading",value:function(){for(var o=arguments.length,d=new Array(o),L=0;L<o;L++)d[L]=arguments[L];return this.callHandlers.apply(this,[[this.options.watchLoading,this.vm.$apollo.watchLoading,this.vm.$apollo.provider.watchLoading]].concat(d,[this]))}},{key:"applyLoadingModifier",value:function(o){var d=this.loadingKey;d&&typeof this.vm[d]=="number"&&(this.vm[d]+=o),this.watchLoading(o===1,o)}},{key:"loadingDone",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this.loading&&this.applyLoadingModifier(-1),this.loading=!1,o||this.firstRunResolve()}},{key:"fetchMore",value:function(){var o=this;if(this.observer){var d;return this.retrieveCurrentResult(!0),(d=this.observer).fetchMore.apply(d,arguments).then(function(L){return L.loading||o.loadingDone(),L})}}},{key:"subscribeToMore",value:function(){if(this.observer){var o;return{unsubscribe:(o=this.observer).subscribeToMore.apply(o,arguments)}}}},{key:"refetch",value:function(o){var d=this;if(o&&(this.options.variables=o),this.observer){var L=this.observer.refetch(o).then(function(ge){return ge.loading||d.loadingDone(),ge});return this.retrieveCurrentResult(),L}}},{key:"setVariables",value:function(o,d){if(this.options.variables=o,this.observer){var L=this.observer.setVariables(o,d);return this.retrieveCurrentResult(),L}}},{key:"setOptions",value:function(o){if(Object.assign(this.options,o),this.observer){var d=this.observer.setOptions(o);return this.retrieveCurrentResult(),d}}},{key:"startPolling",value:function(){if(this.observer){var o;return(o=this.observer).startPolling.apply(o,arguments)}}},{key:"stopPolling",value:function(){if(this.observer){var o;return(o=this.observer).stopPolling.apply(o,arguments)}}},{key:"firstRunResolve",value:function(){this._firstRunResolve&&(this._firstRunResolve(),this._firstRunResolve=null)}},{key:"firstRunReject",value:function(o){this._firstRunReject&&(this._firstRunReject(o),this._firstRunReject=null)}},{key:"destroy",value:function(){_get$1(_getPrototypeOf(r.prototype),"destroy",this).call(this),this.loading&&this.watchLoading(!1,-1),this.loading=!1}}]),r}(SmartApollo),MAX_RETRIES=5,DELAY_MS=500,SmartSubscription=function(t){_inherits(r,t);var e=_createSuper(r);function r(s,o,d){var L,ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return _classCallCheck(this,r),L=e.call(this,s,o,d),_defineProperty$1(_assertThisInitialized$1(L),"type","subscription"),_defineProperty$1(_assertThisInitialized$1(L),"vueApolloSpecialKeys",["variables","result","error","throttle","debounce","linkedQuery"]),L.attempts=0,ge&&L.autostart(),L}return _createClass$1(r,[{key:"generateApolloOptions",value:function(o){var d=_get$1(_getPrototypeOf(r.prototype),"generateApolloOptions",this).call(this,o);return d.onError=this.catchError.bind(this),d}},{key:"executeApollo",value:function(o){if(!this._destroyed){var d=JSON.stringify(o);if(this.sub){if(d===this.previousVariablesJson)return;this.sub.unsubscribe()}this.previousVariablesJson=d;var L=this.generateApolloOptions(o);if(typeof L.updateQuery=="function"&&(L.updateQuery=L.updateQuery.bind(this.vm)),this.options.linkedQuery){if(typeof this.options.result=="function"){var ge=this.options.result.bind(this.vm),Mt=L.updateQuery&&L.updateQuery.bind(this.vm);L.updateQuery=function(){return ge.apply(void 0,arguments),Mt&&Mt.apply(void 0,arguments)}}this.sub=this.options.linkedQuery.subscribeToMore(L)}else this.observer=this.vm.$apollo.subscribe(L),this.sub=this.observer.subscribe({next:this.nextResult.bind(this),error:this.catchError.bind(this)});_get$1(_getPrototypeOf(r.prototype),"executeApollo",this).call(this,o)}}},{key:"nextResult",value:function(o){_get$1(_getPrototypeOf(r.prototype),"nextResult",this).call(this,o),this.attempts=0,typeof this.options.result=="function"&&this.options.result.call(this.vm,o,this.key)}},{key:"catchError",value:function(o){_get$1(_getPrototypeOf(r.prototype),"catchError",this).call(this,o),!(this.skip||this.attempts>=MAX_RETRIES)&&(this.stop(),this.retryTimeout=setTimeout(this.start.bind(this),Math.pow(2,this.attempts)*DELAY_MS),this.attempts++)}},{key:"stop",value:function(){_get$1(_getPrototypeOf(r.prototype),"stop",this).call(this),clearTimeout(this.retryTimeout)}}]),r}(SmartApollo),DollarApollo=function(){function t(e,r){_classCallCheck(this,t),this._apolloSubscriptions=[],this._watchers=[],this.vm=e,this.provider=r,this.queries={},this.subscriptions={},this.client=void 0,this.loadingKey=void 0,this.error=void 0}return _createClass$1(t,[{key:"getClient",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!r||!r.client){if(_typeof(this.client)==="object")return this.client;if(this.client)if(this.provider.clients){var s=this.provider.clients[this.client];if(!s)throw new Error("[vue-apollo] Missing client '".concat(this.client,"' in 'apolloProvider'"));return s}else throw new Error("[vue-apollo] Missing 'clients' options in 'apolloProvider'");return this.provider.defaultClient}var o=this.provider.clients[r.client];if(!o)throw new Error("[vue-apollo] Missing client '".concat(r.client,"' in 'apolloProvider'"));return o}},{key:"query",value:function(r){return this.getClient(r).query(r)}},{key:"watchQuery",value:function(r){var s=this,o=this.getClient(r).watchQuery(r),d=o.subscribe.bind(o);return o.subscribe=function(L){var ge=d(L);return s._apolloSubscriptions.push(ge),ge},o}},{key:"mutate",value:function(r){return this.getClient(r).mutate(r)}},{key:"subscribe",value:function(r){var s=this;if(!isServer$1){var o=this.getClient(r).subscribe(r),d=o.subscribe.bind(o);return o.subscribe=function(L){var ge=d(L);return s._apolloSubscriptions.push(ge),ge},o}}},{key:"loading",get:function(){return this.vm.$data.$apolloData.loading!==0}},{key:"data",get:function(){return this.vm.$data.$apolloData.data}},{key:"addSmartQuery",value:function(r,s){var o=this,d=reapply(s,this.vm);if(!d.query){var L=d;d={query:L}}var ge=this.vm.$options.apollo,Mt=this.provider.defaultOptions,er;if(Mt&&Mt.$query&&(er=Mt.$query),ge&&ge.$query&&(er=_objectSpread2$1(_objectSpread2$1({},er||{}),ge.$query)),er)for(var tr in er)typeof d[tr]>"u"&&(d[tr]=er[tr]);var ir=this.queries[r]=new SmartQuery(this.vm,r,d,!1);if((!isServer$1||d.prefetch!==!1)&&ir.autostart(),!isServer$1){var rr=d.subscribeToMore;rr&&(Array.isArray(rr)?rr.forEach(function(nr,ar){o.addSmartSubscription("".concat(r).concat(ar),_objectSpread2$1(_objectSpread2$1({},nr),{},{linkedQuery:ir}))}):this.addSmartSubscription(r,_objectSpread2$1(_objectSpread2$1({},rr),{},{linkedQuery:ir})))}return ir}},{key:"addSmartSubscription",value:function(r,s){if(!isServer$1){s=reapply(s,this.vm);var o=this.subscriptions[r]=new SmartSubscription(this.vm,r,s,!1);if(o.autostart(),s.linkedQuery){var d=s.linkedQuery._linkedSubscriptions.findIndex(function(L){return L.key===r});d!==-1?s.linkedQuery._linkedSubscriptions[d]=o:s.linkedQuery._linkedSubscriptions.push(o)}return o}}},{key:"defineReactiveSetter",value:function(r,s,o){var d=this;this._watchers.push(this.vm.$watch(s,function(L){d[r]=L},{immediate:!0,deep:o}))}},{key:"skipAllQueries",set:function(r){this._skipAllQueries=r;for(var s in this.queries)this.queries[s].skip=r}},{key:"skipAllSubscriptions",set:function(r){this._skipAllSubscriptions=r;for(var s in this.subscriptions)this.subscriptions[s].skip=r}},{key:"skipAll",set:function(r){this.skipAllQueries=r,this.skipAllSubscriptions=r}},{key:"destroy",value:function(){for(var r=0,s=this._watchers;r<s.length;r++){var o=s[r];o()}for(var d in this.queries)this.queries[d].destroy();for(var L in this.subscriptions)this.subscriptions[L].destroy();this._apolloSubscriptions.forEach(function(ge){ge.unsubscribe()}),this._apolloSubscriptions=null,this.vm=null}}]),t}();function hasProperty(t,e){return typeof t<"u"&&Object.prototype.hasOwnProperty.call(t,e)}function launch(){var t=this,e=this.$apolloProvider;if(!(this._apolloLaunched||!e)){this._apolloLaunched=!0;var r=this.$options.apollo;if(r){this.$_apolloPromises=[],r.$init||(r.$init=!0,e.defaultOptions&&(r=this.$options.apollo=Object.assign({},e.defaultOptions,r))),defineReactiveSetter(this.$apollo,"skipAll",r.$skipAll,r.$deep),defineReactiveSetter(this.$apollo,"skipAllQueries",r.$skipAllQueries,r.$deep),defineReactiveSetter(this.$apollo,"skipAllSubscriptions",r.$skipAllSubscriptions,r.$deep),defineReactiveSetter(this.$apollo,"client",r.$client,r.$deep),defineReactiveSetter(this.$apollo,"loadingKey",r.$loadingKey,r.$deep),defineReactiveSetter(this.$apollo,"error",r.$error,r.$deep),defineReactiveSetter(this.$apollo,"watchLoading",r.$watchLoading,r.$deep),Object.defineProperty(this,"$apolloData",{get:function(){return t.$data.$apolloData},enumerable:!0,configurable:!0});for(var s in r)if(s.charAt(0)!=="$"){var o=r[s],d=this.$apollo.addSmartQuery(s,o);isServer$1&&(o=reapply(o,this),e.prefetch!==!1&&o.prefetch!==!1&&r.$prefetch!==!1&&!d.skip&&this.$_apolloPromises.push(d.firstRun))}if(r.subscribe&&console.warn("vue-apollo -> `subscribe` option is deprecated. Use the `$subscribe` option instead."),r.$subscribe)for(var L in r.$subscribe)this.$apollo.addSmartSubscription(L,r.$subscribe[L])}}}function defineReactiveSetter(t,e,r,s){typeof r<"u"&&(typeof r=="function"?t.defineReactiveSetter(e,r,s):t[e]=r)}function destroy(){this.$apollo&&(this.$apollo.destroy(),this.$apollo=null)}function installMixin(t,e){t.mixin({data:function(){var s={$apolloData:{queries:{},loading:0,data:{}}},o=this.$options.apollo;if(o){for(var d in o)if(d.charAt(0)!=="$"){var L=o[d];!L.manual&&!hasProperty(this.$options.props,d)&&!hasProperty(this.$options.computed,d)&&!hasProperty(this.$options.methods,d)&&(s[d]=null)}}return s},beforeCreate:function(){var s=this;if(this.$apollo=new DollarApollo(this,e),isServer$1){var o=this.$options.ssrRender;this.$options.ssrRender=function(d){var L=o.call(s,d);return destroy.call(s),L}}},serverPrefetch:function(){var s=this;if(this.$_apolloPromises)return Promise.all(this.$_apolloPromises).then(function(){var o={vm:s,provider:s.$apollo.provider,loading:!1,queries:{},subscriptions:{}};destroy.call(s),s.$apollo=o}).catch(function(o){return destroy.call(s),Promise.reject(o)})},created:launch,unmounted:destroy})}var keywords=["$subscribe"],ApolloProvider=function(){function t(e){if(_classCallCheck(this,t),!e)throw new Error("Options argument required");this.clients=e.clients||{},e.defaultClient&&(this.clients.defaultClient=this.defaultClient=e.defaultClient),this.defaultOptions=e.defaultOptions,this.watchLoading=e.watchLoading,this.errorHandler=e.errorHandler,this.prefetch=e.prefetch}return _createClass$1(t,[{key:"install",value:function(r){r.config.optionMergeStrategies.apollo=function(s,o,d){if(!s)return o;if(!o)return s;for(var L=Object.assign({},omit(s,keywords),s.data),ge=Object.assign({},omit(o,keywords),o.data),Mt={},er=0;er<keywords.length;er++){var tr=keywords[er];Mt[tr]=mergeObjectOptions(s[tr],o[tr])}return Object.assign(Mt,mergeObjectOptions(L,ge))},r.config.globalProperties.$apolloProvider=this,installMixin(r,this)}}]),t}();function mergeObjectOptions(t,e){return t?Object.assign(Object.assign(Object.create(null),t),e):e}function createApolloProvider(t){return new ApolloProvider(t)}function asyncIterator(t){var e,r=t[Symbol.asyncIterator]();return e={next:function(){return r.next()}},e[Symbol.asyncIterator]=function(){return this},e}function nodeStreamIterator(t){var e=null,r=null,s=!1,o=[],d=[];function L(ir){if(!r){if(d.length){var rr=d.shift();if(Array.isArray(rr)&&rr[0])return rr[0]({value:ir,done:!1})}o.push(ir)}}function ge(ir){r=ir;var rr=d.slice();rr.forEach(function(nr){nr[1](ir)}),!e||e()}function Mt(){s=!0;var ir=d.slice();ir.forEach(function(rr){rr[0]({value:void 0,done:!0})}),!e||e()}e=function(){e=null,t.removeListener("data",L),t.removeListener("error",ge),t.removeListener("end",Mt),t.removeListener("finish",Mt),t.removeListener("close",Mt)},t.on("data",L),t.on("error",ge),t.on("end",Mt),t.on("finish",Mt),t.on("close",Mt);function er(){return new Promise(function(ir,rr){if(r)return rr(r);if(o.length)return ir({value:o.shift(),done:!1});if(s)return ir({value:void 0,done:!0});d.push([ir,rr])})}var tr={next:function(){return er()}};return canUseAsyncIteratorSymbol&&(tr[Symbol.asyncIterator]=function(){return this}),tr}function promiseIterator(t){var e=!1,r={next:function(){return e?Promise.resolve({value:void 0,done:!0}):(e=!0,new Promise(function(s,o){t.then(function(d){s({value:d,done:!1})}).catch(o)}))}};return canUseAsyncIteratorSymbol&&(r[Symbol.asyncIterator]=function(){return this}),r}function readerIterator(t){var e={next:function(){return t.read()}};return canUseAsyncIteratorSymbol&&(e[Symbol.asyncIterator]=function(){return this}),e}function isNodeResponse(t){return!!t.body}function isReadableStream(t){return!!t.getReader}function isAsyncIterableIterator(t){return!!(canUseAsyncIteratorSymbol&&t[Symbol.asyncIterator])}function isStreamableBlob(t){return!!t.stream}function isBlob(t){return!!t.arrayBuffer}function isNodeReadableStream(t){return!!t.pipe}function responseIterator(t){var e=t;if(isNodeResponse(t)&&(e=t.body),isAsyncIterableIterator(e))return asyncIterator(e);
59if(isReadableStream(e))return readerIterator(e.getReader());if(isStreamableBlob(e))return readerIterator(e.stream().getReader());if(isBlob(e))return promiseIterator(e.arrayBuffer());if(isNodeReadableStream(e))return nodeStreamIterator(e);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var PROTOCOL_ERRORS_SYMBOL=Symbol();function graphQLResultHasProtocolErrors(t){return t.extensions?Array.isArray(t.extensions[PROTOCOL_ERRORS_SYMBOL]):!1}function isApolloError(t){return t.hasOwnProperty("graphQLErrors")}var generateErrorMessage=function(t){var e=__spreadArray(__spreadArray(__spreadArray([],t.graphQLErrors,!0),t.clientErrors,!0),t.protocolErrors,!0);return t.networkError&&e.push(t.networkError),e.map(function(r){return isNonNullObject(r)&&r.message||"Error message not found."}).join(` 60`)},ApolloError=function(t){__extends(e,t);function e(r){var s=r.graphQLErrors,o=r.protocolErrors,d=r.clientErrors,L=r.networkError,ge=r.errorMessage,Mt=r.extraInfo,er=t.call(this,ge)||this;return er.name="ApolloError",er.graphQLErrors=s||[],er.protocolErrors=o||[],er.clientErrors=d||[],er.networkError=L||null,er.message=ge||generateErrorMessage(er),er.extraInfo=Mt,er.__proto__=e.prototype,er}return e}(Error),hasOwnProperty$e=Object.prototype.hasOwnProperty;function readMultipartBody(t,e){return __awaiter(this,void 0,void 0,function(){var r,s,o,d,L,ge,Mt,er,tr,ir,rr,nr,ar,sr,lr,cr,ur,or,dr,hr,pr,mr,vr,Er;return __generator(this,function(Cr){switch(Cr.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");r=new TextDecoder("utf-8"),s=(Er=t.headers)===null||Er===void 0?void 0:Er.get("content-type"),o="boundary=",d=s!=null&&s.includes(o)?s==null?void 0:s.substring((s==null?void 0:s.indexOf(o))+o.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",L=`\r 61--`.concat(d),ge="",Mt=responseIterator(t),er=!0,Cr.label=1;case 1:return er?[4,Mt.next()]:[3,3];case 2:for(tr=Cr.sent(),ir=tr.value,rr=tr.done,nr=typeof ir=="string"?ir:r.decode(ir),ar=ge.length-L.length+1,er=!rr,ge+=nr,sr=ge.indexOf(L,ar);sr>-1;){if(lr=void 0,mr=[ge.slice(0,sr),ge.slice(sr+L.length)],lr=mr[0],ge=mr[1],cr=lr.indexOf(`\r 62\r 63`),ur=parseHeaders(lr.slice(0,cr)),or=ur["content-type"],or&&or.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");if(dr=lr.slice(cr),dr){if(hr=parseJsonBody(t,dr),Object.keys(hr).length>1||"data"in hr||"incremental"in hr||"errors"in hr||"payload"in hr)if(isApolloPayloadResult(hr)){if(pr={},"payload"in hr){if(Object.keys(hr).length===1&&hr.payload===null)return[2];pr=__assign({},hr.payload)}"errors"in hr&&(pr=__assign(__assign({},pr),{extensions:__assign(__assign({},"extensions"in pr?pr.extensions:null),(vr={},vr[PROTOCOL_ERRORS_SYMBOL]=hr.errors,vr))})),e(pr)}else e(hr);else if(Object.keys(hr).length===1&&"hasNext"in hr&&!hr.hasNext)return[2]}sr=ge.indexOf(L)}return[3,1];case 3:return[2]}})})}function parseHeaders(t){var e={};return t.split(` 64`).forEach(function(r){var s=r.indexOf(":");if(s>-1){var o=r.slice(0,s).trim().toLowerCase(),d=r.slice(s+1).trim();e[o]=d}}),e}function parseJsonBody(t,e){if(t.status>=300){var r=function(){try{return JSON.parse(e)}catch{return e}};throwServerError(t,r(),"Response not successful: Received status code ".concat(t.status))}try{return JSON.parse(e)}catch(o){var s=o;throw s.name="ServerParseError",s.response=t,s.statusCode=t.status,s.bodyText=e,s}}function handleError(t,e){t.result&&t.result.errors&&t.result.data&&e.next(t.result),e.error(t)}function parseAndCheckHttpResponse(t){return function(e){return e.text().then(function(r){return parseJsonBody(e,r)}).then(function(r){return!Array.isArray(r)&&!hasOwnProperty$e.call(r,"data")&&!hasOwnProperty$e.call(r,"errors")&&throwServerError(e,r,"Server response was missing for query '".concat(Array.isArray(t)?t.map(function(s){return s.operationName}):t.operationName,"'.")),r})}}var serializeFetchParameter=function(t,e){var r;try{r=JSON.stringify(t)}catch(o){var s=newInvariantError(39,e,o.message);throw s.parseError=o,s}return r},defaultHttpOptions={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},defaultHeaders={accept:"*/*","content-type":"application/json"},defaultOptions={method:"POST"},fallbackHttpConfig={http:defaultHttpOptions,headers:defaultHeaders,options:defaultOptions},defaultPrinter=function(t,e){return e(t)};function selectHttpOptionsAndBodyInternal(t,e){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];var o={},d={};r.forEach(function(ir){o=__assign(__assign(__assign({},o),ir.options),{headers:__assign(__assign({},o.headers),ir.headers)}),ir.credentials&&(o.credentials=ir.credentials),d=__assign(__assign({},d),ir.http)}),o.headers&&(o.headers=removeDuplicateHeaders(o.headers,d.preserveHeaderCase));var L=t.operationName,ge=t.extensions,Mt=t.variables,er=t.query,tr={operationName:L,variables:Mt};return d.includeExtensions&&(tr.extensions=ge),d.includeQuery&&(tr.query=e(er,print)),{options:o,body:tr}}function removeDuplicateHeaders(t,e){if(!e){var r=Object.create(null);
64return Object.keys(Object(t)).forEach(function(d){r[d.toLowerCase()]=t[d]}),r}var s=Object.create(null);Object.keys(Object(t)).forEach(function(d){s[d.toLowerCase()]={originalName:d,value:t[d]}});var o=Object.create(null);return Object.keys(s).forEach(function(d){o[s[d].originalName]=s[d].value}),o}var checkFetcher=function(t){if(!t&&typeof fetch>"u")throw newInvariantError(37)},selectURI=function(t,e){var r=t.getContext(),s=r.uri;return s||(typeof e=="function"?e(t):e||"/graphql")};function rewriteURIForGET(t,e){var r=[],s=function(ir,rr){r.push("".concat(ir,"=").concat(encodeURIComponent(rr)))};if("query"in e&&s("query",e.query),e.operationName&&s("operationName",e.operationName),e.variables){var o=void 0;try{o=serializeFetchParameter(e.variables,"Variables map")}catch(ir){return{parseError:ir}}s("variables",o)}if(e.extensions){var d=void 0;try{d=serializeFetchParameter(e.extensions,"Extensions map")}catch(ir){return{parseError:ir}}s("extensions",d)}var L="",ge=t,Mt=t.indexOf("#");Mt!==-1&&(L=t.substr(Mt),ge=t.substr(0,Mt));var er=ge.indexOf("?")===-1?"?":"&",tr=ge+er+r.join("&")+L;return{newURI:tr}}var backupFetch=maybe$1(function(){return fetch}),createHttpLink=function(t){t===void 0&&(t={});var e=t.uri,r=e===void 0?"/graphql":e,s=t.fetch,o=t.print,d=o===void 0?defaultPrinter:o,L=t.includeExtensions,ge=t.preserveHeaderCase,Mt=t.useGETForQueries,er=t.includeUnusedVariables,tr=er===void 0?!1:er,ir=__rest(t,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);globalThis.__DEV__!==!1&&checkFetcher(s||backupFetch);var rr={http:{includeExtensions:L,preserveHeaderCase:ge},options:ir.fetchOptions,credentials:ir.credentials,headers:ir.headers};return new ApolloLink(function(nr){var ar=selectURI(nr,r),sr=nr.getContext(),lr={};if(sr.clientAwareness){var cr=sr.clientAwareness,ur=cr.name,or=cr.version;ur&&(lr["apollographql-client-name"]=ur),or&&(lr["apollographql-client-version"]=or)}var dr=__assign(__assign({},lr),sr.headers),hr={http:sr.http,options:sr.fetchOptions,credentials:sr.credentials,headers:dr};if(hasDirectives(["client"],nr.query)){var pr=removeClientSetsFromDocument(nr.query);if(!pr)return fromError(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));nr.query=pr}var mr=selectHttpOptionsAndBodyInternal(nr,d,fallbackHttpConfig,rr,hr),vr=mr.options,Er=mr.body;Er.variables&&!tr&&(Er.variables=filterOperationVariables(Er.variables,nr.query));var Cr;!vr.signal&&typeof AbortController<"u"&&(Cr=new AbortController,vr.signal=Cr.signal);var Pr=function(_r){return _r.kind==="OperationDefinition"&&_r.operation==="mutation"},kr=function(_r){return _r.kind==="OperationDefinition"&&_r.operation==="subscription"},Mr=kr(getMainDefinition(nr.query)),Ur=hasDirectives(["defer"],nr.query);if(Mt&&!nr.query.definitions.some(Pr)&&(vr.method="GET"),Ur||Mr){vr.headers=vr.headers||{};var $r="multipart/mixed;";Mr&&Ur&&globalThis.__DEV__!==!1&&invariant$1.warn(38),Mr?$r+="boundary=graphql;subscriptionSpec=1.0,application/json":Ur&&($r+="deferSpec=20220824,application/json"),vr.headers.accept=$r}if(vr.method==="GET"){var yr=rewriteURIForGET(ar,Er),xr=yr.newURI,gr=yr.parseError;if(gr)return fromError(gr);ar=xr}else try{vr.body=serializeFetchParameter(Er,"Payload")}catch(_r){return fromError(_r)}return new Observable(function(_r){var wr=s||maybe$1(function(){return fetch})||backupFetch,Ir=_r.next.bind(_r);return wr(ar,vr).then(function(Hr){var Yr;nr.setContext({response:Hr});var Jr=(Yr=Hr.headers)===null||Yr===void 0?void 0:Yr.get("content-type");return Jr!==null&&/^multipart\/mixed/i.test(Jr)?readMultipartBody(Hr,Ir):parseAndCheckHttpResponse(nr)(Hr).then(Ir)}).then(function(){Cr=void 0,_r.complete()}).catch(function(Hr){Cr=void 0,handleError(Hr,_r)}),function(){Cr&&Cr.abort()}})})},HttpLink=function(t){__extends(e,t);function e(r){r===void 0&&(r={});var s=t.call(this,createHttpLink(r).request)||this;return s.options=r,s}return e}(ApolloLink);const{toString,hasOwnProperty:hasOwnProperty$d}=Object.prototype,fnToStr=Function.prototype.toString,previousComparisons=new Map;function equal(t,e){try{return check(t,e)}finally{previousComparisons.clear()}}function check(t,e){if(t===e)return!0;const r=toString.call(t),s=toString.call(e);
64if(r!==s)return!1;switch(r){case"[object Array]":if(t.length!==e.length)return!1;case"[object Object]":{if(previouslyCompared(t,e))return!0;const o=definedKeys(t),d=definedKeys(e),L=o.length;if(L!==d.length)return!1;for(let ge=0;ge<L;++ge)if(!hasOwnProperty$d.call(e,o[ge]))return!1;for(let ge=0;ge<L;++ge){const Mt=o[ge];if(!check(t[Mt],e[Mt]))return!1}return!0}case"[object Error]":return t.name===e.name&&t.message===e.message;case"[object Number]":if(t!==t)return e!==e;case"[object Boolean]":case"[object Date]":return+t==+e;case"[object RegExp]":case"[object String]":return t==`${e}`;case"[object Map]":case"[object Set]":{if(t.size!==e.size)return!1;if(previouslyCompared(t,e))return!0;const o=t.entries(),d=r==="[object Map]";for(;;){const L=o.next();if(L.done)break;const[ge,Mt]=L.value;if(!e.has(ge)||d&&!check(Mt,e.get(ge)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":t=new Uint8Array(t),e=new Uint8Array(e);case"[object DataView]":{let o=t.byteLength;if(o===e.byteLength)for(;o--&&t[o]===e[o];);return o===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const o=fnToStr.call(t);return o!==fnToStr.call(e)?!1:!endsWith$1(o,nativeCodeSuffix)}}return!1}function definedKeys(t){return Object.keys(t).filter(isDefinedKey,t)}function isDefinedKey(t){return this[t]!==void 0}const nativeCodeSuffix="{ [native code] }";function endsWith$1(t,e){const r=t.length-e.length;return r>=0&&t.indexOf(e,r)===r}function previouslyCompared(t,e){let r=previousComparisons.get(t);if(r){if(r.has(e))return!0}else previousComparisons.set(t,r=new Set);return r.add(e),!1}function equalByQuery(t,e,r,s){var o=e.data,d=__rest(e,["data"]),L=r.data,ge=__rest(r,["data"]);return equal(d,ge)&&equalBySelectionSet(getMainDefinition(t).selectionSet,o,L,{fragmentMap:createFragmentMap(getFragmentDefinitions(t)),variables:s})}function equalBySelectionSet(t,e,r,s){if(e===r)return!0;var o=new Set;return t.selections.every(function(d){if(o.has(d)||(o.add(d),!shouldInclude(d,s.variables))||selectionHasNonreactiveDirective(d))return!0;if(isField(d)){var L=resultKeyNameFromField(d),ge=e&&e[L],Mt=r&&r[L],er=d.selectionSet;if(!er)return equal(ge,Mt);var tr=Array.isArray(ge),ir=Array.isArray(Mt);if(tr!==ir)return!1;if(tr&&ir){var rr=ge.length;if(Mt.length!==rr)return!1;for(var nr=0;nr<rr;++nr)if(!equalBySelectionSet(er,ge[nr],Mt[nr],s))return!1;return!0}return equalBySelectionSet(er,ge,Mt,s)}else{var ar=getFragmentFromSelection(d,s.fragmentMap);if(ar)return selectionHasNonreactiveDirective(ar)?!0:equalBySelectionSet(ar.selectionSet,e,r,s)}})}function selectionHasNonreactiveDirective(t){return!!t.directives&&t.directives.some(directiveIsNonreactive)}function directiveIsNonreactive(t){return t.name.value==="nonreactive"}var ApolloCache=function(){function t(){this.assumeImmutableResults=!1,this.getFragmentDoc=wrap$2(getFragmentQueryDocument,{max:cacheSizes["cache.fragmentQueryDocuments"]||1e3,cache:WeakCache})}return t.prototype.batch=function(e){var r=this,s=typeof e.optimistic=="string"?e.optimistic:e.optimistic===!1?null:void 0,o;return this.performTransaction(function(){return o=e.update(r)},s),o},t.prototype.recordOptimisticTransaction=function(e,r){this.performTransaction(e,r)},t.prototype.transformDocument=function(e){return e},t.prototype.transformForLink=function(e){return e},t.prototype.identify=function(e){},t.prototype.gc=function(){return[]},t.prototype.modify=function(e){return!1},t.prototype.readQuery=function(e,r){return r===void 0&&(r=!!e.optimistic),this.read(__assign(__assign({},e),{rootId:e.id||"ROOT_QUERY",optimistic:r}))},t.prototype.watchFragment=function(e){var r=this,s=e.fragment,o=e.fragmentName,d=e.from,L=e.optimistic,ge=L===void 0?!0:L,Mt=this.getFragmentDoc(s,o),er={returnPartialData:!0,id:typeof d=="string"?d:this.identify(d),query:Mt,optimistic:ge},tr;return new Observable(function(ir){return r.watch(__assign(__assign({},er),{immediate:!0,callback:function(rr){if(!(tr&&equalByQuery(Mt,{data:tr==null?void 0:tr.result},{data:rr.result}))){var nr={data:rr.result,complete:!!rr.complete};rr.missing&&(nr.missing=mergeDeepArray(rr.missing.map(function(ar){return ar.missing}))),tr=rr,ir.next(nr)}}}))})},t.prototype.readFragment=function(e,r){return r===void 0&&(r=!!e.optimistic),this.read(__assign(__assign({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:r}))},t.prototype.writeQuery=function(e){var r=e.id,s=e.data,o=__rest(e,["id","data"]);return this.write(Object.assign(o,{dataId:r||"ROOT_QUERY",result:s}))},t.prototype.writeFragment=function(e){var r=e.id,s=e.data,o=e.fragment,d=e.fragmentName,L=__rest(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(L,{query:this.getFragmentDoc(o,d),dataId:r,result:s}))},t.prototype.updateQuery=function(e,r){return this.batch({update:function(s){var o=s.readQuery(e),d=r(o);return d==null?o:(s.writeQuery(__assign(__assign({},e),{data:d})),d)}})},t.prototype.updateFragment=function(e,r){return this.batch({update:function(s){var o=s.readFragment(e),d=r
64(o);return d==null?o:(s.writeFragment(__assign(__assign({},e),{data:d})),d)}})},t}();globalThis.__DEV__!==!1&&(ApolloCache.prototype.getMemoryInternals=getApolloCacheMemoryInternals);var MissingFieldError=function(t){__extends(e,t);function e(r,s,o,d){var L,ge=t.call(this,r)||this;if(ge.message=r,ge.path=s,ge.query=o,ge.variables=d,Array.isArray(ge.path)){ge.missing=ge.message;for(var Mt=ge.path.length-1;Mt>=0;--Mt)ge.missing=(L={},L[ge.path[Mt]]=ge.missing,L)}else ge.missing=ge.path;return ge.__proto__=e.prototype,ge}return e}(Error),hasOwn=Object.prototype.hasOwnProperty;function isNullish(t){return t==null}function defaultDataIdFromObject(t,e){var r=t.__typename,s=t.id,o=t._id;if(typeof r=="string"&&(e&&(e.keyObject=isNullish(s)?isNullish(o)?void 0:{_id:o}:{id:s}),isNullish(s)&&!isNullish(o)&&(s=o),!isNullish(s)))return"".concat(r,":").concat(typeof s=="number"||typeof s=="string"?s:JSON.stringify(s))}var defaultConfig={dataIdFromObject:defaultDataIdFromObject,addTypename:!0,resultCaching:!0,canonizeResults:!1};function normalizeConfig(t){return compact(defaultConfig,t)}function shouldCanonizeResults(t){var e=t.canonizeResults;return e===void 0?defaultConfig.canonizeResults:e}function getTypenameFromStoreObject(t,e){return isReference(e)?t.get(e.__ref,"__typename"):e&&e.__typename}var TypeOrFieldNameRegExp=/^[_a-z][_0-9a-z]*/i;function fieldNameFromStoreName(t){var e=t.match(TypeOrFieldNameRegExp);return e?e[0]:t}function selectionSetMatchesResult(t,e,r){return isNonNullObject(e)?isArray$2(e)?e.every(function(s){return selectionSetMatchesResult(t,s,r)}):t.selections.every(function(s){if(isField(s)&&shouldInclude(s,r)){var o=resultKeyNameFromField(s);return hasOwn.call(e,o)&&(!s.selectionSet||selectionSetMatchesResult(s.selectionSet,e[o],r))}return!0}):!1}function storeValueIsStoreObject(t){return isNonNullObject(t)&&!isReference(t)&&!isArray$2(t)}function makeProcessedFieldsMerger(){return new DeepMerger}function extractFragmentContext(t,e){var r=createFragmentMap(getFragmentDefinitions(t));return{fragmentMap:r,lookupFragment:function(s){var o=r[s];return!o&&e&&(o=e.lookup(s)),o||null}}}var DELETE=Object.create(null),delModifier=function(){return DELETE},INVALIDATE=Object.create(null),EntityStore=function(){function t(e,r){var s=this;this.policies=e,this.group=r,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(o,d){return maybeDeepFreeze(isReference(o)?s.get(o.__ref,d):o&&o[d])},this.canRead=function(o){return isReference(o)?s.has(o.__ref):typeof o=="object"},this.toReference=function(o,d){if(typeof o=="string")return makeReference(o);if(isReference(o))return o;var L=s.policies.identify(o)[0];if(L){var ge=makeReference(L);return d&&s.merge(L,o),ge}}}return t.prototype.toObject=function(){return __assign({},this.data)},t.prototype.has=function(e){return this.lookup(e,!0)!==void 0},t.prototype.get=function(e,r){if(this.group.depend(e,r),hasOwn.call(this.data,e)){var s=this.data[e];if(s&&hasOwn.call(s,r))return s[r]}if(r==="__typename"&&hasOwn.call(this.policies.rootTypenamesById,e))return this.policies.rootTypenamesById[e];if(this instanceof Layer)return this.parent.get(e,r)},t.prototype.lookup=function(e,r){if(r&&this.group.depend(e,"__exists"),hasOwn.call(this.data,e))return this.data[e];if(this instanceof Layer)return this.parent.lookup(e,r);if(this.policies.rootTypenamesById[e])return Object.create(null)},t.prototype.merge=function(e,r){var s=this,o;isReference(e)&&(e=e.__ref),isReference(r)&&(r=r.__ref);var d=typeof e=="string"?this.lookup(o=e):e,L=typeof r=="string"?this.lookup(o=r):r;if(L){invariant$1(typeof o=="string",1);var ge=new DeepMerger(storeObjectReconciler).merge(d,L);if(this.data[o]=ge,ge!==d&&(delete this.refs[o],this.group.caching)){var Mt=Object.create(null);d||(Mt.__exists=1),Object.keys(L).forEach(function(er){if(!d||d[er]!==ge[er]){Mt[er]=1;var tr=fieldNameFromStoreName(er);tr!==er&&!s.policies.hasKeyArgs(ge.__typename,tr)&&(Mt[tr]=1),ge[er]===void 0&&!(s instanceof Layer)&&delete ge[er]}}),Mt.__typename&&!(d&&d.__typename)&&this.policies.rootTypenamesById[o]===ge.__typename&&delete Mt.__typename,Object.keys(Mt).forEach(function(er){return s.group.dirty(o,er)})}}},t.prototype.modify=function(e,r){var s=this,o=this.lookup(e);if(o){var d=Object.create(null),L=!1,ge=!0,Mt={DELETE,INVALIDATE,isReference,toReference:this.toReference,canRead:this.canRead,readField:function(er,tr){return s.policies.readField(typeof er=="string"?{fieldName:er,from:tr||makeReference(e)}:er,{store:s})}};
64if(Object.keys(o).forEach(function(er){var tr=fieldNameFromStoreName(er),ir=o[er];if(ir!==void 0){var rr=typeof r=="function"?r:r[er]||r[tr];if(rr){var nr=rr===delModifier?DELETE:rr(maybeDeepFreeze(ir),__assign(__assign({},Mt),{fieldName:tr,storeFieldName:er,storage:s.getStorage(e,er)}));if(nr===INVALIDATE)s.group.dirty(e,er);else if(nr===DELETE&&(nr=void 0),nr!==ir&&(d[er]=nr,L=!0,ir=nr,globalThis.__DEV__!==!1)){var ar=function(hr){if(s.lookup(hr.__ref)===void 0)return globalThis.__DEV__!==!1&&invariant$1.warn(2,hr),!0};if(isReference(nr))ar(nr);else if(Array.isArray(nr))for(var sr=!1,lr=void 0,cr=0,ur=nr;cr<ur.length;cr++){var or=ur[cr];if(isReference(or)){if(sr=!0,ar(or))break}else if(typeof or=="object"&&or){var dr=s.policies.identify(or)[0];dr&&(lr=or)}if(sr&&lr!==void 0){globalThis.__DEV__!==!1&&invariant$1.warn(3,lr);break}}}}ir!==void 0&&(ge=!1)}}),L)return this.merge(e,d),ge&&(this instanceof Layer?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},t.prototype.delete=function(e,r,s){var o,d=this.lookup(e);if(d){var L=this.getFieldValue(d,"__typename"),ge=r&&s?this.policies.getStoreFieldName({typename:L,fieldName:r,args:s}):r;return this.modify(e,ge?(o={},o[ge]=delModifier,o):delModifier)}return!1},t.prototype.evict=function(e,r){var s=!1;return e.id&&(hasOwn.call(this.data,e.id)&&(s=this.delete(e.id,e.fieldName,e.args)),this instanceof Layer&&this!==r&&(s=this.parent.evict(e,r)||s),(e.fieldName||s)&&this.group.dirty(e.id,e.fieldName||"__exists")),s},t.prototype.clear=function(){this.replace(null)},t.prototype.extract=function(){var e=this,r=this.toObject(),s=[];return this.getRootIdSet().forEach(function(o){hasOwn.call(e.policies.rootTypenamesById,o)||s.push(o)}),s.length&&(r.__META={extraRootIds:s.sort()}),r},t.prototype.replace=function(e){var r=this;if(Object.keys(this.data).forEach(function(d){e&&hasOwn.call(e,d)||r.delete(d)}),e){var s=e.__META,o=__rest(e,["__META"]);Object.keys(o).forEach(function(d){r.merge(d,o[d])}),s&&s.extraRootIds.forEach(this.retain,this)}},t.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},t.prototype.release=function(e){if(this.rootIds[e]>0){var r=--this.rootIds[e];return r||delete this.rootIds[e],r}return 0},t.prototype.getRootIdSet=function(e){return e===void 0&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Layer?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},t.prototype.gc=function(){var e=this,r=this.getRootIdSet(),s=this.toObject();r.forEach(function(L){hasOwn.call(s,L)&&(Object.keys(e.findChildRefIds(L)).forEach(r.add,r),delete s[L])});var o=Object.keys(s);if(o.length){for(var d=this;d instanceof Layer;)d=d.parent;o.forEach(function(L){return d.delete(L)})}return o},t.prototype.findChildRefIds=function(e){if(!hasOwn.call(this.refs,e)){var r=this.refs[e]=Object.create(null),s=this.data[e];if(!s)return r;var o=new Set([s]);o.forEach(function(d){isReference(d)&&(r[d.__ref]=!0),isNonNullObject(d)&&Object.keys(d).forEach(function(L){var ge=d[L];isNonNullObject(ge)&&o.add(ge)})})}return this.refs[e]},t.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},t}(),CacheGroup=function(){function t(e,r){r===void 0&&(r=null),this.caching=e,this.parent=r,this.d=null,this.resetCaching()}return t.prototype.resetCaching=function(){this.d=this.caching?dep():null,this.keyMaker=new Trie$1(canUseWeakMap)}
64,t.prototype.depend=function(e,r){if(this.d){this.d(makeDepKey(e,r));var s=fieldNameFromStoreName(r);s!==r&&this.d(makeDepKey(e,s)),this.parent&&this.parent.depend(e,r)}},t.prototype.dirty=function(e,r){this.d&&this.d.dirty(makeDepKey(e,r),r==="__exists"?"forget":"setDirty")},t}();function makeDepKey(t,e){return e+"#"+t}function maybeDependOnExistenceOfEntity(t,e){supportsResultCaching(t)&&t.group.depend(e,"__exists")}(function(t){var e=function(r){__extends(s,r);function s(o){var d=o.policies,L=o.resultCaching,ge=L===void 0?!0:L,Mt=o.seed,er=r.call(this,d,new CacheGroup(ge))||this;return er.stump=new Stump(er),er.storageTrie=new Trie$1(canUseWeakMap),Mt&&er.replace(Mt),er}return s.prototype.addLayer=function(o,d){return this.stump.addLayer(o,d)},s.prototype.removeLayer=function(){return this},s.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},s}(t);t.Root=e})(EntityStore||(EntityStore={}));var Layer=function(t){__extends(e,t);function e(r,s,o,d){var L=t.call(this,s.policies,d)||this;return L.id=r,L.parent=s,L.replay=o,L.group=d,o(L),L}return e.prototype.addLayer=function(r,s){return new e(r,this,s,this.group)},e.prototype.removeLayer=function(r){var s=this,o=this.parent.removeLayer(r);return r===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(d){var L=s.data[d],ge=o.lookup(d);ge?L?L!==ge&&Object.keys(L).forEach(function(Mt){equal(L[Mt],ge[Mt])||s.group.dirty(d,Mt)}):(s.group.dirty(d,"__exists"),Object.keys(ge).forEach(function(Mt){s.group.dirty(d,Mt)})):s.delete(d)}),o):o===this.parent?this:o.addLayer(this.id,this.replay)},e.prototype.toObject=function(){return __assign(__assign({},this.parent.toObject()),this.data)},e.prototype.findChildRefIds=function(r){var s=this.parent.findChildRefIds(r);return hasOwn.call(this.data,r)?__assign(__assign({},s),t.prototype.findChildRefIds.call(this,r)):s},e.prototype.getStorage=function(){for(var r=this.parent;r.parent;)r=r.parent;return r.getStorage.apply(r,arguments)},e}(EntityStore),Stump=function(t){__extends(e,t);function e(r){return t.call(this,"EntityStore.Stump",r,function(){},new CacheGroup(r.group.caching,r.group))||this}return e.prototype.removeLayer=function(){return this},e.prototype.merge=function(r,s){return this.parent.merge(r,s)},e}(Layer);function storeObjectReconciler(t,e,r){var s=t[r],o=e[r];return equal(s,o)?s:o}function supportsResultCaching(t){return!!(t instanceof EntityStore&&t.group.caching)}function shallowCopy(t){return isNonNullObject(t)?isArray$2(t)?t.slice(0):__assign({__proto__:Object.getPrototypeOf(t)},t):t}var ObjectCanon=function(){function t(){this.known=new(canUseWeakSet?WeakSet:Set),this.pool=new Trie$1(canUseWeakMap),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return t.prototype.isKnown=function(e){return isNonNullObject(e)&&this.known.has(e)},t.prototype.pass=function(e){if(isNonNullObject(e)){var r=shallowCopy(e);return this.passes.set(r,e),r}return e},t.prototype.admit=function(e){var r=this;if(isNonNullObject(e)){var s=this.passes.get(e);if(s)return s;var o=Object.getPrototypeOf(e);switch(o){case Array.prototype:{if(this.known.has(e))return e;var d=e.map(this.admit,this),L=this.pool.lookupArray(d);return L.array||(this.known.add(L.array=d),globalThis.__DEV__!==!1&&Object.freeze(d)),L.array}case null:case Object.prototype:{if(this.known.has(e))return e;var ge=Object.getPrototypeOf(e),Mt=[ge],er=this.sortedKeys(e);Mt.push(er.json);var tr=Mt.length;er.sorted.forEach(function(nr){Mt.push(r.admit(e[nr]))});var L=this.pool.lookupArray(Mt);if(!L.object){var ir=L.object=Object.create(ge);this.known.add(ir),er.sorted.forEach(function(nr,ar){ir[nr]=Mt[tr+ar]}),globalThis.__DEV__!==!1&&Object.freeze(ir)}return L.object}}}return e},t.prototype.sortedKeys=function(e){var r=Object.keys(e),s=this.pool.lookupArray(r);if(!s.keys){r.sort();var o=JSON.stringify(r);(s.keys=this.keysByJSON.get(o))||this.keysByJSON.set(o,s.keys={sorted:r,json:o})}return s.keys},t}();function execSelectionSetKeyArgs(t){return[t.selectionSet,t.objectOrReference,t.context,t.context.canonizeResults]}var StoreReader=function(){function t(e){var r=this;this.knownResults=new(canUseWeakMap?WeakMap:Map),this.config=compact(e,{addTypename:e.addTypename!==!1,canonizeResults:shouldCanonizeResults(e)}),this.canon=e.canon||new ObjectCanon,this.executeSelectionSet=wrap$2(function(s){var o,d=s.context.canonizeResults,L=execSelectionSetKeyArgs(s);L[3]=!d;var ge=(o=r.executeSelectionSet).peek.apply(o,L);return ge?d?__assign(__assign({},ge),{result:r.canon.admit(ge.result)}):ge:(maybeDependOnExistenceOfEntity(s.context.store,s.enclosingRef.__ref),r.execSelectionSetImpl(s))},{max:this.config.resultCacheMaxSize||cacheSizes["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:execSelectionSetKeyArgs,makeCacheKey:function(s,o,d,L){if
64(supportsResultCaching(d.store))return d.store.makeCacheKey(s,isReference(o)?o.__ref:o,d.varString,L)}}),this.executeSubSelectedArray=wrap$2(function(s){return maybeDependOnExistenceOfEntity(s.context.store,s.enclosingRef.__ref),r.execSubSelectedArrayImpl(s)},{max:this.config.resultCacheMaxSize||cacheSizes["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(s){var o=s.field,d=s.array,L=s.context;if(supportsResultCaching(L.store))return L.store.makeCacheKey(o,d,L.varString)}})}return t.prototype.resetCanon=function(){this.canon=new ObjectCanon},t.prototype.diffQueryAgainstStore=function(e){var r=e.store,s=e.query,o=e.rootId,d=o===void 0?"ROOT_QUERY":o,L=e.variables,ge=e.returnPartialData,Mt=ge===void 0?!0:ge,er=e.canonizeResults,tr=er===void 0?this.config.canonizeResults:er,ir=this.config.cache.policies;L=__assign(__assign({},getDefaultValues(getQueryDefinition(s))),L);var rr=makeReference(d),nr=this.executeSelectionSet({selectionSet:getMainDefinition(s).selectionSet,objectOrReference:rr,enclosingRef:rr,context:__assign({store:r,query:s,policies:ir,variables:L,varString:canonicalStringify(L),canonizeResults:tr},extractFragmentContext(s,this.config.fragments))}),ar;if(nr.missing&&(ar=[new MissingFieldError(firstMissing(nr.missing),nr.missing,s,L)],!Mt))throw ar[0];return{result:nr.result,complete:!ar,missing:ar}},t.prototype.isFresh=function(e,r,s,o){if(supportsResultCaching(o.store)&&this.knownResults.get(e)===s){var d=this.executeSelectionSet.peek(s,r,o,this.canon.isKnown(e));if(d&&e===d.result)return!0}return!1},t.prototype.execSelectionSetImpl=function(e){var r=this,s=e.selectionSet,o=e.objectOrReference,d=e.enclosingRef,L=e.context;if(isReference(o)&&!L.policies.rootTypenamesById[o.__ref]&&!L.store.has(o.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(o.__ref," object")};var ge=L.variables,Mt=L.policies,er=L.store,tr=er.getFieldValue(o,"__typename"),ir=[],rr,nr=new DeepMerger;this.config.addTypename&&typeof tr=="string"&&!Mt.rootIdsByTypename[tr]&&ir.push({__typename:tr});function ar(or,dr){var hr;return or.missing&&(rr=nr.merge(rr,(hr={},hr[dr]=or.missing,hr))),or.result}var sr=new Set(s.selections);sr.forEach(function(or){var dr,hr;if(shouldInclude(or,ge))if(isField(or)){var pr=Mt.readField({fieldName:or.name.value,field:or,variables:L.variables,from:o},L),mr=resultKeyNameFromField(or);pr===void 0?addTypenameToDocument.added(or)||(rr=nr.merge(rr,(dr={},dr[mr]="Can't find field '".concat(or.name.value,"' on ").concat(isReference(o)?o.__ref+" object":"object "+JSON.stringify(o,null,2)),dr))):isArray$2(pr)?pr.length>0&&(pr=ar(r.executeSubSelectedArray({field:or,array:pr,enclosingRef:d,context:L}),mr)):or.selectionSet?pr!=null&&(pr=ar(r.executeSelectionSet({selectionSet:or.selectionSet,objectOrReference:pr,enclosingRef:isReference(pr)?pr:d,context:L}),mr)):L.canonizeResults&&(pr=r.canon.pass(pr)),pr!==void 0&&ir.push((hr={},hr[mr]=pr,hr))}else{var vr=getFragmentFromSelection(or,L.lookupFragment);if(!vr&&or.kind===Kind.FRAGMENT_SPREAD)throw newInvariantError(9,or.name.value);vr&&Mt.fragmentMatches(vr,tr)&&vr.selectionSet.selections.forEach(sr.add,sr)}});var lr=mergeDeepArray(ir),cr={result:lr,missing:rr},ur=L.canonizeResults?this.canon.admit(cr):maybeDeepFreeze(cr);return ur.result&&this.knownResults.set(ur.result,s),ur},t.prototype.execSubSelectedArrayImpl=function(e){var r=this,s=e.field,o=e.array,d=e.enclosingRef,L=e.context,ge,Mt=new DeepMerger;function er(tr,ir){var rr;return tr.missing&&(ge=Mt.merge(ge,(rr={},rr[ir]=tr.missing,rr))),tr.result}return s.selectionSet&&(o=o.filter(L.store.canRead)),o=o.map(function(tr,ir){return tr===null?null:isArray$2(tr)?er(r.executeSubSelectedArray({field:s,array:tr,enclosingRef:d,context:L}),ir):s.selectionSet?er(r.executeSelectionSet({selectionSet:s.selectionSet,objectOrReference:tr,enclosingRef:isReference(tr)?tr:d,context:L}),ir):(globalThis.__DEV__!==!1&&assertSelectionSetForIdValue(L.store,s,tr),tr)}),{result:L.canonizeResults?this.canon.admit(o):o,missing:ge}},t}();function firstMissing(t){try{JSON.stringify(t,function(e,r){if(typeof r=="string")throw r;return r})}catch(e){return e}}function assertSelectionSetForIdValue(t,e,r){if(!e.selectionSet){var s=new Set([r]);
64s.forEach(function(o){isNonNullObject(o)&&(invariant$1(!isReference(o),10,getTypenameFromStoreObject(t,o),e.name.value),Object.values(o).forEach(s.add,s))})}}var cacheSlot=new Slot,cacheInfoMap=new WeakMap;function getCacheInfo(t){var e=cacheInfoMap.get(t);return e||cacheInfoMap.set(t,e={vars:new Set,dep:dep()}),e}function forgetCache(t){getCacheInfo(t).vars.forEach(function(e){return e.forgetCache(t)})}function recallCache(t){getCacheInfo(t).vars.forEach(function(e){return e.attachCache(t)})}function makeVar(t){var e=new Set,r=new Set,s=function(d){if(arguments.length>0){if(t!==d){t=d,e.forEach(function(Mt){getCacheInfo(Mt).dep.dirty(s),broadcast(Mt)});var L=Array.from(r);r.clear(),L.forEach(function(Mt){return Mt(t)})}}else{var ge=cacheSlot.getValue();ge&&(o(ge),getCacheInfo(ge).dep(s))}return t};s.onNextChange=function(d){return r.add(d),function(){r.delete(d)}};var o=s.attachCache=function(d){return e.add(d),getCacheInfo(d).vars.add(s),s};return s.forgetCache=function(d){return e.delete(d)},s}function broadcast(t){t.broadcastWatches&&t.broadcastWatches()}var specifierInfoCache=Object.create(null);function lookupSpecifierInfo(t){var e=JSON.stringify(t);return specifierInfoCache[e]||(specifierInfoCache[e]=Object.create(null))}function keyFieldsFnFromSpecifier(t){var e=lookupSpecifierInfo(t);return e.keyFieldsFn||(e.keyFieldsFn=function(r,s){var o=function(L,ge){return s.readField(ge,L)},d=s.keyObject=collectSpecifierPaths(t,function(L){var ge=extractKeyPath(s.storeObject,L,o);return ge===void 0&&r!==s.storeObject&&hasOwn.call(r,L[0])&&(ge=extractKeyPath(r,L,extractKey)),invariant$1(ge!==void 0,4,L.join("."),r),ge});return"".concat(s.typename,":").concat(JSON.stringify(d))})}function keyArgsFnFromSpecifier(t){var e=lookupSpecifierInfo(t);return e.keyArgsFn||(e.keyArgsFn=function(r,s){var o=s.field,d=s.variables,L=s.fieldName,ge=collectSpecifierPaths(t,function(er){var tr=er[0],ir=tr.charAt(0);if(ir==="@"){if(o&&isNonEmptyArray(o.directives)){var rr=tr.slice(1),nr=o.directives.find(function(cr){return cr.name.value===rr}),ar=nr&&argumentsObjectFromField(nr,d);return ar&&extractKeyPath(ar,er.slice(1))}return}if(ir==="$"){var sr=tr.slice(1);if(d&&hasOwn.call(d,sr)){var lr=er.slice(0);return lr[0]=sr,extractKeyPath(d,lr)}return}if(r)return extractKeyPath(r,er)}),Mt=JSON.stringify(ge);return(r||Mt!=="{}")&&(L+=":"+Mt),L})}function collectSpecifierPaths(t,e){var r=new DeepMerger;return getSpecifierPaths(t).reduce(function(s,o){var d,L=e(o);if(L!==void 0){for(var ge=o.length-1;ge>=0;--ge)L=(d={},d[o[ge]]=L,d);s=r.merge(s,L)}return s},Object.create(null))}function getSpecifierPaths(t){var e=lookupSpecifierInfo(t);if(!e.paths){var r=e.paths=[],s=[];t.forEach(function(o,d){isArray$2(o)?(getSpecifierPaths(o).forEach(function(L){return r.push(s.concat(L))}),s.length=0):(s.push(o),isArray$2(t[d+1])||(r.push(s.slice(0)),s.length=0))})}return e.paths}function extractKey(t,e){return t[e]}function extractKeyPath(t,e,r){return r=r||extractKey,normalize$2(e.reduce(function s(o,d){return isArray$2(o)?o.map(function(L){return s(L,d)}):o&&r(o,d)},t))}function normalize$2(t){return isNonNullObject(t)?isArray$2(t)?t.map(normalize$2):collectSpecifierPaths(Object.keys(t).sort(),function(e){return extractKeyPath(t,e)}):t}function argsFromFieldSpecifier(t){return t.args!==void 0?t.args:t.field?argumentsObjectFromField(t.field,t.variables):null}var nullKeyFieldsFn=function(){},simpleKeyArgsFn=function(t,e){return e.fieldName},mergeTrueFn=function(t,e,r){var s=r.mergeObjects;return s(t,e)},mergeFalseFn=function(t,e){return e},Policies=function(){function t(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=__assign({dataIdFromObject:defaultDataIdFromObject},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return t.prototype.identify=function(e,r){var s,o=this,d=r&&(r.typename||((s=r.storeObject)===null||s===void 0?void 0:s.__typename))||e.__typename;if(d===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var L=r&&r.storeObject||e,ge=__assign(__assign({},r),{typename:d,storeObject:L,readField:r&&r.readField||function(){var rr=normalizeReadFieldOptions(arguments,L);return o.readField(rr,{store:o.cache.data,variables:rr.variables})}}),Mt,er=d&&this.getTypePolicy(d),tr=er&&er.keyFn||this.config.dataIdFromObject;tr;){var ir=tr(__assign(__assign({},e),L),ge);if(isArray$2(ir))tr=keyFieldsFnFromSpecifier(ir);else{Mt=ir;break}}return Mt=Mt?String(Mt):void 0,ge.keyObject?[Mt,ge.keyObject]:[Mt]},t.prototype.addTypePolicies=function(e){var r=this;Object.keys(e).forEach(function(s){var o=e[s],d=o.queryType,L=o.mutationType,ge=o.subscriptionType,Mt=__rest(o,["queryType","mutationType","subscriptionType"]);d&&r.setRootTypename("Query",s),L&&r.setRootTypename("Mutation",s),ge&&r.setRootTypename("Subscription",s),hasOwn.call(r.toBeAdded,s)?r.toBeAdded[s].push(Mt):r.toBeAdded[s]=[Mt]})},t.prototype.updateTypePolicy=function(e,r){var s=this,o=this.getTypePolicy(e),d=r.keyFields,L=r.fields;function ge(Mt,er){Mt.merge=typeof er=="function"?er:er===!0?mergeTrueFn:er===!1?mergeFalseFn:Mt.merge}ge(o,r.merge),o.keyFn=d===!1?nullKeyFieldsFn:isArray$2(d)?keyFieldsFnFromSpecifier(d):typeof d=="function"?d:o.keyFn,L&&Object.keys(L).forEac
64h(function(Mt){var er=s.getFieldPolicy(e,Mt,!0),tr=L[Mt];if(typeof tr=="function")er.read=tr;else{var ir=tr.keyArgs,rr=tr.read,nr=tr.merge;er.keyFn=ir===!1?simpleKeyArgsFn:isArray$2(ir)?keyArgsFnFromSpecifier(ir):typeof ir=="function"?ir:er.keyFn,typeof rr=="function"&&(er.read=rr),ge(er,nr)}er.read&&er.merge&&(er.keyFn=er.keyFn||simpleKeyArgsFn)})},t.prototype.setRootTypename=function(e,r){r===void 0&&(r=e);var s="ROOT_"+e.toUpperCase(),o=this.rootTypenamesById[s];r!==o&&(invariant$1(!o||o===e,5,e),o&&delete this.rootIdsByTypename[o],this.rootIdsByTypename[r]=s,this.rootTypenamesById[s]=r)},t.prototype.addPossibleTypes=function(e){var r=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(s){r.getSupertypeSet(s,!0),e[s].forEach(function(o){r.getSupertypeSet(o,!0).add(s);var d=o.match(TypeOrFieldNameRegExp);(!d||d[0]!==o)&&r.fuzzySubtypes.set(o,new RegExp(o))})})},t.prototype.getTypePolicy=function(e){var r=this;if(!hasOwn.call(this.typePolicies,e)){var s=this.typePolicies[e]=Object.create(null);s.fields=Object.create(null);var o=this.supertypeMap.get(e);!o&&this.fuzzySubtypes.size&&(o=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(L,ge){if(L.test(e)){var Mt=r.supertypeMap.get(ge);Mt&&Mt.forEach(function(er){return o.add(er)})}})),o&&o.size&&o.forEach(function(L){var ge=r.getTypePolicy(L),Mt=ge.fields,er=__rest(ge,["fields"]);Object.assign(s,er),Object.assign(s.fields,Mt)})}var d=this.toBeAdded[e];return d&&d.length&&d.splice(0).forEach(function(L){r.updateTypePolicy(e,L)}),this.typePolicies[e]},t.prototype.getFieldPolicy=function(e,r,s){if(e){var o=this.getTypePolicy(e).fields;return o[r]||s&&(o[r]=Object.create(null))}},t.prototype.getSupertypeSet=function(e,r){var s=this.supertypeMap.get(e);return!s&&r&&this.supertypeMap.set(e,s=new Set),s},t.prototype.fragmentMatches=function(e,r,s,o){var d=this;if(!e.typeCondition)return!0;if(!r)return!1;var L=e.typeCondition.name.value;if(r===L)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(L))for(var ge=this.getSupertypeSet(r,!0),Mt=[ge],er=function(ar){var sr=d.getSupertypeSet(ar,!1);sr&&sr.size&&Mt.indexOf(sr)<0&&Mt.push(sr)},tr=!!(s&&this.fuzzySubtypes.size),ir=!1,rr=0;rr<Mt.length;++rr){var nr=Mt[rr];if(nr.has(L))return ge.has(L)||(ir&&globalThis.__DEV__!==!1&&invariant$1.warn(6,r,L),ge.add(L)),!0;nr.forEach(er),tr&&rr===Mt.length-1&&selectionSetMatchesResult(e.selectionSet,s,o)&&(tr=!1,ir=!0,this.fuzzySubtypes.forEach(function(ar,sr){var lr=r.match(ar);lr&&lr[0]===r&&er(sr)}))}return!1},t.prototype.hasKeyArgs=function(e,r){var s=this.getFieldPolicy(e,r,!1);return!!(s&&s.keyFn)},t.prototype.getStoreFieldName=function(e){var r=e.typename,s=e.fieldName,o=this.getFieldPolicy(r,s,!1),d,L=o&&o.keyFn;if(L&&r)for(var ge={typename:r,fieldName:s,field:e.field||null,variables:e.variables},Mt=argsFromFieldSpecifier(e);L;){var er=L(Mt,ge);if(isArray$2(er))L=keyArgsFnFromSpecifier(er);else{d=er||s;break}}return d===void 0&&(d=e.field?storeKeyNameFromField(e.field,e.variables):getStoreKeyName(s,argsFromFieldSpecifier(e))),d===!1?s:s===fieldNameFromStoreName(d)?d:s+":"+d},t.prototype.readField=function(e,r){var s=e.from;if(s){var o=e.field||e.fieldName;if(o){if(e.typename===void 0){var d=r.store.getFieldValue(s,"__typename");d&&(e.typename=d)}var L=this.getStoreFieldName(e),ge=fieldNameFromStoreName(L),Mt=r.store.getFieldValue(s,L),er=this.getFieldPolicy(e.typename,ge,!1),tr=er&&er.read;if(tr){var ir=makeFieldFunctionOptions(this,s,e,r,r.store.getStorage(isReference(s)?s.__ref:s,L));return cacheSlot.withValue(this.cache,tr,[Mt,ir])}return Mt}}},t.prototype.getReadFunction=function(e,r){var s=this.getFieldPolicy(e,r,!1);return s&&s.read},t.prototype.getMergeFunction=function(e,r,s){var o=this.getFieldPolicy(e,r,!1),d=o&&o.merge;return!d&&s&&(o=this.getTypePolicy(s),d=o&&o.merge),d},t.prototype.runMergeFunction=function(e,r,s,o,d){var L=s.field,ge=s.typename,Mt=s.merge;return Mt===mergeTrueFn?makeMergeObjectsFunction(o.store)(e,r):Mt===mergeFalseFn?r:(o.overwrite&&(e=void 0),Mt(e,r,makeFieldFunctionOptions(this,void 0,{typename:ge,fieldName:L.name.value,field:L,variables:o.variables},o,d||Object.create(null))))},t}();function makeFieldFunctionOptions(t,e,r,s,o){var d=t.getStoreFieldName(r),L=fieldNameFromStoreName(d),ge=r.variables||s.variables,Mt=s.store,er=Mt.toReference,tr=Mt.canRead;return{args:argsFromFieldSpecifier(r),field:r.field||null,fieldName:L,storeFieldName:d,variables:ge,isReference,toReference:er,storage:o,cache:t.cache,canRead:tr,readField:function(){return t.readField(normalizeReadFieldOptions(arguments,e,ge),s)},mergeObjects:makeMergeObjectsFunction(s.store)}}function normalizeReadFieldOptions(t,e,r){var s=t[0],o=t[1],d=t.length,L;return typeof s=="string"?L={fieldName:s,from:d>1?o:e}:(L=__assign({},s),hasOwn.call(L,"from")||(L.from=e)),globalThis.__DEV__!==!1&&L.from===void 0&&globalThis.__DEV__!==!1&&invariant$1.warn(7,stringifyForDisplay(Array.from(t))),L.variables===void 0&&(L.variables=r),L}function makeMergeObjectsFunction(t){return function(r,s){if(isArray$2(r)||isArray$2(s))throw newInvariantError(8);if(isNonNullObject(r)&&isNonNullObject(s)){var o=t.getFieldValue(r,"__typename"),d=t.getFieldValue(s,"__typename"),L=o&&d&&o!==d;if(L)return s;if(isReference(r)&&storeValueIsStoreObject(s))return t.merge(r.__ref,s),r;if(storeValueIsStoreObject(r)&&isReference(s))return t.merge(r,s.__ref),s;if(storeValueIsStoreObject(r)&&storeValueIsStoreObject(s))return __assign(__assign({},r),s)}return s}}function getContextFlavor(t,e,r){var s="".concat(e).concat(r),o=t.flavors.get(s);return o||t.flavors.set(s,o=t.clientOnly===e&&t.deferred===r?t:__assign(__assign({},t),{clientOnly:e,deferred:r})),o}var StoreWriter=function(){function t(e,r,s){this.cache=e,this.reader=r,this.fragments=s}return t.prototype.writeToStore=function(e,r){var s=this,o=r.query,d=r.result,L=r.dataId,ge=r.variables,Mt=r.overwrite,er=getOperationDefinition(o),tr=makeProcessedFieldsMerger();ge=__assign(__assign({},getDefaultValues(er)),ge);var ir=__assign(__assign({store:e,written:Object.create(null),merge:function(nr,ar){return tr.merge(nr,ar)},variables:ge,varString:canonicalStringify(ge)},extractFragmentContext(o,this.fragments)),{overwrite:!!Mt,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),rr=this.processSelectionSet({result:d||Object.create(null),dataId:L,selectionSet:er.selectionSet,mergeTree:{map:new Map},context:ir});if(!isReference(rr))throw newInvariantError(11,d);
64return ir.incomingById.forEach(function(nr,ar){var sr=nr.storeObject,lr=nr.mergeTree,cr=nr.fieldNodeSet,ur=makeReference(ar);if(lr&&lr.map.size){var or=s.applyMerges(lr,ur,sr,ir);if(isReference(or))return;sr=or}if(globalThis.__DEV__!==!1&&!ir.overwrite){var dr=Object.create(null);cr.forEach(function(mr){mr.selectionSet&&(dr[mr.name.value]=!0)});var hr=function(mr){return dr[fieldNameFromStoreName(mr)]===!0},pr=function(mr){var vr=lr&&lr.map.get(mr);return!!(vr&&vr.info&&vr.info.merge)};Object.keys(sr).forEach(function(mr){hr(mr)&&!pr(mr)&&warnAboutDataLoss(ur,sr,mr,ir.store)})}e.merge(ar,sr)}),e.retain(rr.__ref),rr},t.prototype.processSelectionSet=function(e){var r=this,s=e.dataId,o=e.result,d=e.selectionSet,L=e.context,ge=e.mergeTree,Mt=this.cache.policies,er=Object.create(null),tr=s&&Mt.rootTypenamesById[s]||getTypenameFromResult(o,d,L.fragmentMap)||s&&L.store.get(s,"__typename");typeof tr=="string"&&(er.__typename=tr);var ir=function(){var or=normalizeReadFieldOptions(arguments,er,L.variables);if(isReference(or.from)){var dr=L.incomingById.get(or.from.__ref);if(dr){var hr=Mt.readField(__assign(__assign({},or),{from:dr.storeObject}),L);if(hr!==void 0)return hr}}return Mt.readField(or,L)},rr=new Set;this.flattenFields(d,o,L,tr).forEach(function(or,dr){var hr,pr=resultKeyNameFromField(dr),mr=o[pr];if(rr.add(dr),mr!==void 0){var vr=Mt.getStoreFieldName({typename:tr,fieldName:dr.name.value,field:dr,variables:or.variables}),Er=getChildMergeTree(ge,vr),Cr=r.processFieldValue(mr,dr,dr.selectionSet?getContextFlavor(or,!1,!1):or,Er),Pr=void 0;dr.selectionSet&&(isReference(Cr)||storeValueIsStoreObject(Cr))&&(Pr=ir("__typename",Cr));var kr=Mt.getMergeFunction(tr,dr.name.value,Pr);kr?Er.info={field:dr,typename:tr,merge:kr}:maybeRecycleChildMergeTree(ge,vr),er=or.merge(er,(hr={},hr[vr]=Cr,hr))}else globalThis.__DEV__!==!1&&!or.clientOnly&&!or.deferred&&!addTypenameToDocument.added(dr)&&!Mt.getReadFunction(tr,dr.name.value)&&globalThis.__DEV__!==!1&&invariant$1.error(12,resultKeyNameFromField(dr),o)});try{var nr=Mt.identify(o,{typename:tr,selectionSet:d,fragmentMap:L.fragmentMap,storeObject:er,readField:ir}),ar=nr[0],sr=nr[1];s=s||ar,sr&&(er=L.merge(er,sr))}catch(or){if(!s)throw or}if(typeof s=="string"){var lr=makeReference(s),cr=L.written[s]||(L.written[s]=[]);if(cr.indexOf(d)>=0||(cr.push(d),this.reader&&this.reader.isFresh(o,lr,d,L)))return lr;var ur=L.incomingById.get(s);return ur?(ur.storeObject=L.merge(ur.storeObject,er),ur.mergeTree=mergeMergeTrees(ur.mergeTree,ge),rr.forEach(function(or){return ur.fieldNodeSet.add(or)})):L.incomingById.set(s,{storeObject:er,mergeTree:mergeTreeIsEmpty(ge)?void 0:ge,fieldNodeSet:rr}),lr}return er},t.prototype.processFieldValue=function(e,r,s,o){var d=this;return!r.selectionSet||e===null?globalThis.__DEV__!==!1?cloneDeep$1(e):e:isArray$2(e)?e.map(function(L,ge){var Mt=d.processFieldValue(L,r,s,getChildMergeTree(o,ge));return maybeRecycleChildMergeTree(o,ge),Mt}):this.processSelectionSet({result:e,selectionSet:r.selectionSet,context:s,mergeTree:o})},t.prototype.flattenFields=function(e,r,s,o){o===void 0&&(o=getTypenameFromResult(r,e,s.fragmentMap));var d=new Map,L=this.cache.policies,ge=new Trie$1(!1);return function Mt(er,tr){var ir=ge.lookup(er,tr.clientOnly,tr.deferred);ir.visited||(ir.visited=!0,er.selections.forEach(function(rr){if(shouldInclude(rr,s.variables)){var nr=tr.clientOnly,ar=tr.deferred;if(!(nr&&ar)&&isNonEmptyArray(rr.directives)&&rr.directives.forEach(function(cr){var ur=cr.name.value;if(ur==="client"&&(nr=!0),ur==="defer"){var or=argumentsObjectFromField(cr,s.variables);(!or||or.if!==!1)&&(ar=!0)}}),isField(rr)){var sr=d.get(rr);sr&&(nr=nr&&sr.clientOnly,ar=ar&&sr.deferred),d.set(rr,getContextFlavor(s,nr,ar))}else{var lr=getFragmentFromSelection(rr,s.lookupFragment);if(!lr&&rr.kind===Kind.FRAGMENT_SPREAD)throw newInvariantError(13,rr.name.value);lr&&L.fragmentMatches(lr,o,r,s.variables)&&Mt(lr.selectionSet,getContextFlavor(s,nr,ar))}}}))}(e,s),d},t.prototype.applyMerges=function(e,r,s,o,d){var L,ge=this;if(e.map.size&&!isReference(s)){var Mt=!isArray$2(s)&&(isReference(r)||storeValueIsStoreObject(r))?r:void 0,er=s;Mt&&!d&&(d=[isReference(Mt)?Mt.__ref:Mt]);var tr,ir=function(rr,nr){return isArray$2(rr)?typeof nr=="number"?rr[nr]:void 0:o.store.getFieldValue(rr,String(nr))};
64e.map.forEach(function(rr,nr){var ar=ir(Mt,nr),sr=ir(er,nr);if(sr!==void 0){d&&d.push(nr);var lr=ge.applyMerges(rr,ar,sr,o,d);lr!==sr&&(tr=tr||new Map,tr.set(nr,lr)),d&&invariant$1(d.pop()===nr)}}),tr&&(s=isArray$2(er)?er.slice(0):__assign({},er),tr.forEach(function(rr,nr){s[nr]=rr}))}return e.info?this.cache.policies.runMergeFunction(r,s,e.info,o,d&&(L=o.store).getStorage.apply(L,d)):s},t}(),emptyMergeTreePool=[];function getChildMergeTree(t,e){var r=t.map;return r.has(e)||r.set(e,emptyMergeTreePool.pop()||{map:new Map}),r.get(e)}function mergeMergeTrees(t,e){if(t===e||!e||mergeTreeIsEmpty(e))return t;if(!t||mergeTreeIsEmpty(t))return e;var r=t.info&&e.info?__assign(__assign({},t.info),e.info):t.info||e.info,s=t.map.size&&e.map.size,o=s?new Map:t.map.size?t.map:e.map,d={info:r,map:o};if(s){var L=new Set(e.map.keys());t.map.forEach(function(ge,Mt){d.map.set(Mt,mergeMergeTrees(ge,e.map.get(Mt))),L.delete(Mt)}),L.forEach(function(ge){d.map.set(ge,mergeMergeTrees(e.map.get(ge),t.map.get(ge)))})}return d}function mergeTreeIsEmpty(t){return!t||!(t.info||t.map.size)}function maybeRecycleChildMergeTree(t,e){var r=t.map,s=r.get(e);s&&mergeTreeIsEmpty(s)&&(emptyMergeTreePool.push(s),r.delete(e))}var warnings=new Set;function warnAboutDataLoss(t,e,r,s){var o=function(ir){var rr=s.getFieldValue(ir,r);return typeof rr=="object"&&rr},d=o(t);if(d){var L=o(e);if(L&&!isReference(d)&&!equal(d,L)&&!Object.keys(d).every(function(ir){return s.getFieldValue(L,ir)!==void 0})){var ge=s.getFieldValue(t,"__typename")||s.getFieldValue(e,"__typename"),Mt=fieldNameFromStoreName(r),er="".concat(ge,".").concat(Mt);if(!warnings.has(er)){warnings.add(er);var tr=[];
64!isArray$2(d)&&!isArray$2(L)&&[d,L].forEach(function(ir){var rr=s.getFieldValue(ir,"__typename");typeof rr=="string"&&!tr.includes(rr)&&tr.push(rr)}),globalThis.__DEV__!==!1&&invariant$1.warn(14,Mt,ge,tr.length?"either ensure all objects of type "+tr.join(" and ")+" have an ID or a custom merge function, or ":"",er,__assign({},d),__assign({},L))}}}}var InMemoryCache=function(t){__extends(e,t);function e(r){r===void 0&&(r={});var s=t.call(this)||this;return s.watches=new Set,s.addTypenameTransform=new DocumentTransform(addTypenameToDocument),s.assumeImmutableResults=!0,s.makeVar=makeVar,s.txCount=0,s.config=normalizeConfig(r),s.addTypename=!!s.config.addTypename,s.policies=new Policies({cache:s,dataIdFromObject:s.config.dataIdFromObject,possibleTypes:s.config.possibleTypes,typePolicies:s.config.typePolicies}),s.init(),s}return e.prototype.init=function(){var r=this.data=new EntityStore.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=r.stump,this.resetResultCache()},e.prototype.resetResultCache=function(r){var s=this,o=this.storeReader,d=this.config.fragments;this.storeWriter=new StoreWriter(this,this.storeReader=new StoreReader({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:shouldCanonizeResults(this.config),canon:r?void 0:o&&o.canon,fragments:d}),d),this.maybeBroadcastWatch=wrap$2(function(L,ge){return s.broadcastWatch(L,ge)},{max:this.config.resultCacheMaxSize||cacheSizes["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(L){var ge=L.optimistic?s.optimisticData:s.data;if(supportsResultCaching(ge)){var Mt=L.optimistic,er=L.id,tr=L.variables;return ge.makeCacheKey(L.query,L.callback,canonicalStringify({optimistic:Mt,id:er,variables:tr}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(L){return L.resetCaching()})},e.prototype.restore=function(r){return this.init(),r&&this.data.replace(r),this},e.prototype.extract=function(r){return r===void 0&&(r=!1),(r?this.optimisticData:this.data).extract()},e.prototype.read=function(r){var s=r.returnPartialData,o=s===void 0?!1:s;try{return this.storeReader.diffQueryAgainstStore(__assign(__assign({},r),{store:r.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:o})).result||null}catch(d){if(d instanceof MissingFieldError)return null;throw d}},e.prototype.write=function(r){try{return++this.txCount,this.storeWriter.writeToStore(this.data,r)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},e.prototype.modify=function(r){if(hasOwn.call(r,"id")&&!r.id)return!1;var s=r.optimistic?this.optimisticData:this.data;try{return++this.txCount,s.modify(r.id||"ROOT_QUERY",r.fields)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},e.prototype.diff=function(r){return this.storeReader.diffQueryAgainstStore(__assign(__assign({},r),{store:r.optimistic?this.optimisticData:this.data,rootId:r.id||"ROOT_QUERY",config:this.config}))},e.prototype.watch=function(r){var s=this;return this.watches.size||recallCache(this),this.watches.add(r),r.immediate&&this.maybeBroadcastWatch(r),function(){s.watches.delete(r)&&!s.watches.size&&forgetCache(s),s.maybeBroadcastWatch.forget(r)}},e.prototype.gc=function(r){var s;canonicalStringify.reset(),print.reset(),this.addTypenameTransform.resetCache(),(s=this.config.fragments)===null||s===void 0||s.resetCaches();var o=this.optimisticData.gc();return r&&!this.txCount&&(r.resetResultCache?this.resetResultCache(r.resetResultIdentities):r.resetResultIdentities&&this.storeReader.resetCanon()),o},e.prototype.retain=function(r,s){return(s?this.optimisticData:this.data).retain(r)},e.prototype.release=function(r,s){return(s?this.optimisticData:this.data).release(r)},e.prototype.identify=function(r){if(isReference(r))return r.__ref;try{return this.policies.identify(r)[0]}catch(s){globalThis.__DEV__!==!1&&invariant$1.warn(s)}},e.prototype.evict=function(r){if(!r.id){if(hasOwn.call(r,"id"))return!1;r=__assign(__assign({},r),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(r,this.data)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},e.prototype.reset=function(r){var s=this;return this.init(),canonicalStringify.reset(),r&&r.discardWatches?(this.watches.forEac
64h(function(o){return s.maybeBroadcastWatch.forget(o)}),this.watches.clear(),forgetCache(this)):this.broadcastWatches(),Promise.resolve()},e.prototype.removeOptimistic=function(r){var s=this.optimisticData.removeLayer(r);s!==this.optimisticData&&(this.optimisticData=s,this.broadcastWatches())},e.prototype.batch=function(r){var s=this,o=r.update,d=r.optimistic,L=d===void 0?!0:d,ge=r.removeOptimistic,Mt=r.onWatchUpdated,er,tr=function(rr){var nr=s,ar=nr.data,sr=nr.optimisticData;++s.txCount,rr&&(s.data=s.optimisticData=rr);try{return er=o(s)}finally{--s.txCount,s.data=ar,s.optimisticData=sr}},ir=new Set;return Mt&&!this.txCount&&this.broadcastWatches(__assign(__assign({},r),{onWatchUpdated:function(rr){return ir.add(rr),!1}})),typeof L=="string"?this.optimisticData=this.optimisticData.addLayer(L,tr):L===!1?tr(this.data):tr(),typeof ge=="string"&&(this.optimisticData=this.optimisticData.removeLayer(ge)),Mt&&ir.size?(this.broadcastWatches(__assign(__assign({},r),{onWatchUpdated:function(rr,nr){var ar=Mt.call(this,rr,nr);return ar!==!1&&ir.delete(rr),ar}})),ir.size&&ir.forEach(function(rr){return s.maybeBroadcastWatch.dirty(rr)})):this.broadcastWatches(r),er},e.prototype.performTransaction=function(r,s){return this.batch({update:r,optimistic:s||s!==null})},e.prototype.transformDocument=function(r){return this.addTypenameToDocument(this.addFragmentsToDocument(r))},e.prototype.broadcastWatches=function(r){var s=this;this.txCount||this.watches.forEach(function(o){return s.maybeBroadcastWatch(o,r)})},e.prototype.addFragmentsToDocument=function(r){var s=this.config.fragments;return s?s.transform(r):r},e.prototype.addTypenameToDocument=function(r){return this.addTypename?this.addTypenameTransform.transformDocument(r):r},e.prototype.broadcastWatch=function(r,s){var o=r.lastDiff,d=this.diff(r);s&&(r.optimistic&&typeof s.optimistic=="string"&&(d.fromOptimisticTransaction=!0),s.onWatchUpdated&&s.onWatchUpdated.call(this,r,d,o)===!1)||(!o||!equal(o.result,d.result))&&r.callback(r.lastDiff=d,o)},e}(ApolloCache);globalThis.__DEV__!==!1&&(InMemoryCache.prototype.getMemoryInternals=getInMemoryCacheMemoryInternals);var NetworkStatus;(function(t){t[t.loading=1]="loading",t[t.setVariables=2]="setVariables",t[t.fetchMore=3]="fetchMore",t[t.refetch=4]="refetch",t[t.poll=6]="poll",t[t.ready=7]="ready",t[t.error=8]="error"})(NetworkStatus||(NetworkStatus={}));function isNetworkRequestInFlight(t){return t?t<7:!1}var assign=Object.assign,hasOwnProperty$c=Object.hasOwnProperty,ObservableQuery=function(t){__extends(e,t);function e(r){var s=r.queryManager,o=r.queryInfo,d=r.options,L=t.call(this,function(lr){try{var cr=lr._subscription._observer;cr&&!cr.error&&(cr.error=defaultSubscriptionObserverErrorCallback)}catch{}var ur=!L.observers.size;L.observers.add(lr);var or=L.last;return or&&or.error?lr.error&&lr.error(or.error):or&&or.result&&lr.next&&lr.next(or.result),ur&&L.reobserve().catch(function(){}),function(){L.observers.delete(lr)&&!L.observers.size&&L.tearDownQuery()}})||this;L.observers=new Set,L.subscriptions=new Set,L.queryInfo=o,L.queryManager=s,L.waitForOwnResult=skipCacheDataFor(d.fetchPolicy),L.isTornDown=!1;var ge=s.defaultOptions.watchQuery,Mt=ge===void 0?{}:ge,er=Mt.fetchPolicy,tr=er===void 0?"cache-first":er,ir=d.fetchPolicy,rr=ir===void 0?tr:ir,nr=d.initialFetchPolicy,ar=nr===void 0?rr==="standby"?tr:rr:nr;L.options=__assign(__assign({},d),{initialFetchPolicy:ar,fetchPolicy:rr}),L.queryId=o.queryId||s.generateQueryId();var sr=getOperationDefinition(L.query);return L.queryName=sr&&sr.name&&sr.name.value,L}return Object.defineProperty(e.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),e.prototype.result=function(){var r=this;return new Promise(function(s,o){var d={next:function(ge){s(ge),r.observers.delete(d),r.observers.size||r.queryManager.removeQuery(r.queryId),setTimeout(function(){L.unsubscribe()},0)},error:o},L=r.subscribe(d)})},e.prototype.resetDiff=function(){this.queryInfo.resetDiff()},e.prototype.getCurrentResult=function(r){r===void 0&&(r=!0);var s=this.getLastResult(!0),o=this.queryInfo.networkStatus||s&&s.networkStatus||NetworkStatus.ready,d=__assign(__assign({}
64,s),{loading:isNetworkRequestInFlight(o),networkStatus:o}),L=this.options.fetchPolicy,ge=L===void 0?"cache-first":L;if(!(skipCacheDataFor(ge)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var Mt=this.queryInfo.getDiff();(Mt.complete||this.options.returnPartialData)&&(d.data=Mt.result),equal(d.data,{})&&(d.data=void 0),Mt.complete?(delete d.partial,Mt.complete&&d.networkStatus===NetworkStatus.loading&&(ge==="cache-first"||ge==="cache-only")&&(d.networkStatus=NetworkStatus.ready,d.loading=!1)):d.partial=!0,globalThis.__DEV__!==!1&&!Mt.complete&&!this.options.partialRefetch&&!d.loading&&!d.data&&!d.error&&logMissingFieldErrors(Mt.missing)}return r&&this.updateLastResult(d),d},e.prototype.isDifferentFromLastResult=function(r,s){if(!this.last)return!0;var o=this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?!equalByQuery(this.query,this.last.result,r,this.variables):!equal(this.last.result,r);return o||s&&!equal(this.last.variables,s)},e.prototype.getLast=function(r,s){var o=this.last;if(o&&o[r]&&(!s||equal(o.variables,this.variables)))return o[r]},e.prototype.getLastResult=function(r){return this.getLast("result",r)},e.prototype.getLastError=function(r){return this.getLast("error",r)},e.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},e.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},e.prototype.refetch=function(r){var s,o={pollInterval:0},d=this.options.fetchPolicy;if(d==="cache-and-network"?o.fetchPolicy=d:d==="no-cache"?o.fetchPolicy="no-cache":o.fetchPolicy="network-only",globalThis.__DEV__!==!1&&r&&hasOwnProperty$c.call(r,"variables")){var L=getQueryDefinition(this.query),ge=L.variableDefinitions;(!ge||!ge.some(function(Mt){return Mt.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&invariant$1.warn(20,r,((s=L.name)===null||s===void 0?void 0:s.value)||L)}return r&&!equal(this.options.variables,r)&&(o.variables=this.options.variables=__assign(__assign({},this.options.variables),r)),this.queryInfo.resetLastWrite(),this.reobserve(o,NetworkStatus.refetch)},e.prototype.fetchMore=function(r){var s=this,o=__assign(__assign({},r.query?r:__assign(__assign(__assign(__assign({},this.options),{query:this.options.query}),r),{variables:__assign(__assign({},this.options.variables),r.variables)})),{fetchPolicy:"no-cache"});o.query=this.transformDocument(o.query);var d=this.queryManager.generateQueryId();this.lastQuery=r.query?this.transformDocument(this.options.query):o.query;var L=this.queryInfo,ge=L.networkStatus;L.networkStatus=NetworkStatus.fetchMore,o.notifyOnNetworkStatusChange&&this.observe();var Mt=new Set;return this.queryManager.fetchQuery(d,o,NetworkStatus.fetchMore).then(function(er){return s.queryManager.removeQuery(d),L.networkStatus===NetworkStatus.fetchMore&&(L.networkStatus=ge),s.queryManager.cache.batch({update:function(tr){var ir=r.updateQuery;ir?tr.updateQuery({query:s.query,variables:s.variables,returnPartialData:!0,optimistic:!1},function(rr){return ir(rr,{fetchMoreResult:er.data,variables:o.variables})}):tr.writeQuery({query:o.query,variables:o.variables,data:er.data})},onWatchUpdated:function(tr){Mt.add(tr.query)}}),er}).finally(function(){Mt.has(s.query)||reobserveCacheFirst(s)})},e.prototype.subscribeToMore=function(r){var s=this,o=this.queryManager.startGraphQLSubscription({query:r.document,variables:r.variables,context:r.context}).subscribe({next:function(d){var L=r.updateQuery;L&&s.updateQuery(function(ge,Mt){var er=Mt.variables;return L(ge,{subscriptionData:d,variables:er})})},error:function(d){if(r.onError){r.onError(d);return}globalThis.__DEV__!==!1&&invariant$1.error(21,d)}});return this.subscriptions.add(o),function(){s.subscriptions.delete(o)&&o.unsubscribe()}},e.prototype.setOptions=function(r){return this.reobserve(r)},e.prototype.silentSetOptions=function(r){var s=compact(this.options,r||{});assign(this.options,s)},e.prototype.setVariables=function(r){return equal(this.variables,r)?this.observers.size?this.result():Promise.resolve():(this.options.variables=r,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:r},NetworkStatus.setVariables):Promise.resolve())},e.prototype.updateQuery=function(r){var s=this.queryManager,o=s.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,d=r(o,{variables:this.variables});d&&(s.cache.writeQuery({query:this.options.query,data:d,variables:this.variables}),s.broadcastQueries())},e.prototype.startPolling=function(r){this.options.pollInterval=r,this.updatePolling()},e.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},e.prototype.applyNextFetchPolicy=function(r,s){if(s.nextFetchPolicy){var o=s.fetchPolicy,d=o===void 0?"cache-first":o,L=s.initialFetchPolicy,ge=L===void 0?d:L;d==="standby"||(typeof s.nextFetchPolicy=="function"?s.fetchPolicy=s.nextFetchPolicy(d,{reason:r,options:s,observable:this,initialFetchPolicy:ge}):r==="variables-changed"?s.fetchPolicy=ge:s.fetchPolicy=s.nextFetchPolicy)}return s.fetchPolicy},e.prototype.fetch=function(r,s,o){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,r,s,o)},e.prototype.updatePolling=function(){var r=this;if(!this.queryManager.ssrMode){var s=this,o=s.pollingInfo,d=s.options.pollInterval;
64if(!d||!this.hasObservers()){o&&(clearTimeout(o.timeout),delete this.pollingInfo);return}if(!(o&&o.interval===d)){invariant$1(d,22);var L=o||(this.pollingInfo={});L.interval=d;var ge=function(){var er,tr;r.pollingInfo&&(!isNetworkRequestInFlight(r.queryInfo.networkStatus)&&!(!((tr=(er=r.options).skipPollAttempt)===null||tr===void 0)&&tr.call(er))?r.reobserve({fetchPolicy:r.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},NetworkStatus.poll).then(Mt,Mt):Mt())},Mt=function(){var er=r.pollingInfo;er&&(clearTimeout(er.timeout),er.timeout=setTimeout(ge,er.interval))};Mt()}}},e.prototype.updateLastResult=function(r,s){s===void 0&&(s=this.variables);var o=this.getLastError();return o&&this.last&&!equal(s,this.last.variables)&&(o=void 0),this.last=__assign({result:this.queryManager.assumeImmutableResults?r:cloneDeep$1(r),variables:s},o?{error:o}:null)},e.prototype.reobserveAsConcast=function(r,s){var o=this;this.isTornDown=!1;var d=s===NetworkStatus.refetch||s===NetworkStatus.fetchMore||s===NetworkStatus.poll,L=this.options.variables,ge=this.options.fetchPolicy,Mt=compact(this.options,r||{}),er=d?Mt:assign(this.options,Mt),tr=this.transformDocument(er.query);this.lastQuery=tr,d||(this.updatePolling(),r&&r.variables&&!equal(r.variables,L)&&er.fetchPolicy!=="standby"&&er.fetchPolicy===ge&&(this.applyNextFetchPolicy("variables-changed",er),s===void 0&&(s=NetworkStatus.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=skipCacheDataFor(er.fetchPolicy));var ir=function(){o.concast===ar&&(o.waitForOwnResult=!1)},rr=er.variables&&__assign({},er.variables),nr=this.fetch(er,s,tr),ar=nr.concast,sr=nr.fromLink,lr={next:function(cr){equal(o.variables,rr)&&(ir(),o.reportResult(cr,rr))},error:function(cr){equal(o.variables,rr)&&(ir(),o.reportError(cr,rr))}};return!d&&(sr||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=ar,this.observer=lr),ar.addObserver(lr),ar},e.prototype.reobserve=function(r,s){return this.reobserveAsConcast(r,s).promise},e.prototype.resubscribeAfterError=function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];var o=this.last;this.resetLastResults();var d=this.subscribe.apply(this,r);return this.last=o,d},e.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},e.prototype.reportResult=function(r,s){var o=this.getLastError(),d=this.isDifferentFromLastResult(r,s);(o||!r.partial||this.options.returnPartialData)&&this.updateLastResult(r,s),(o||d)&&iterateObserversSafely(this.observers,"next",r)},e.prototype.reportError=function(r,s){var o=__assign(__assign({},this.getLastResult()),{error:r,errors:r.graphQLErrors,networkStatus:NetworkStatus.error,loading:!1});this.updateLastResult(o,s),iterateObserversSafely(this.observers,"error",this.last.error=r)},e.prototype.hasObservers=function(){return this.observers.size>0},e.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(r){return r.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},e.prototype.transformDocument=function(r){return this.queryManager.transform(r)},e}(Observable);fixObservableSubclass(ObservableQuery);function reobserveCacheFirst(t){var e=t.options,r=e.fetchPolicy,s=e.nextFetchPolicy;return r==="cache-and-network"||r==="network-only"?t.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(o,d){return this.nextFetchPolicy=s,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(o,d):r}}):t.reobserve()}function defaultSubscriptionObserverErrorCallback(t){globalThis.__DEV__!==!1&&invariant$1.error(23,t.message,t.stack)}function logMissingFieldErrors(t){globalThis.__DEV__!==!1&&t&&globalThis.__DEV__!==!1&&invariant$1.debug(24,t)}function skipCacheDataFor(t){return t==="network-only"||t==="no-cache"||t==="standby"}var LocalState=function(){function t(e){var r=e.cache,s=e.client,o=e.resolvers,d=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=r,s&&(this.client=s),o&&this.addResolvers(o),d&&this.setFragmentMatcher(d)}return t.prototype.addResolvers=function(e){var r=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(s){r.resolvers=mergeDeep(r.resolvers,s)}):this.resolvers=mergeDeep(this.resolvers,e)},t.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},t.prototype.getResolvers=function(){return this.resolvers||{}},t.prototype.runResolvers=function(e){return __awaiter(this,arguments,void 0,function(r){var s=r.document,o=r.remoteResult,d=r.context,L=r.variables,ge=r.onlyRunForcedResolvers,Mt=ge===void 0?!1:ge;return __generator(this,function(er){return s?[2,this.resolveDocument(s,o.data,d,L,this.fragmentMatcher,Mt).then(function(tr){return __assign(__assign({},o),{data:tr.result})})]:[2,o]})})},t.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},t.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},t.prototype.clientQuery=function(e){return hasDirectives(["client"],e)&&this.resolvers?e:null}
64,t.prototype.serverQuery=function(e){return removeClientSetsFromDocument(e)},t.prototype.prepareContext=function(e){var r=this.cache;return __assign(__assign({},e),{cache:r,getCacheKey:function(s){return r.identify(s)}})},t.prototype.addExportedVariables=function(e){return __awaiter(this,arguments,void 0,function(r,s,o){return s===void 0&&(s={}),o===void 0&&(o={}),__generator(this,function(d){return r?[2,this.resolveDocument(r,this.buildRootValueFromCache(r,s)||{},this.prepareContext(o),s).then(function(L){return __assign(__assign({},s),L.exportedVariables)})]:[2,__assign({},s)]})})},t.prototype.shouldForceResolvers=function(e){var r=!1;return visit(e,{Directive:{enter:function(s){if(s.name.value==="client"&&s.arguments&&(r=s.arguments.some(function(o){return o.name.value==="always"&&o.value.kind==="BooleanValue"&&o.value.value===!0}),r))return BREAK}}}),r},t.prototype.buildRootValueFromCache=function(e,r){return this.cache.diff({query:buildQueryFromSelectionSet(e),variables:r,returnPartialData:!0,optimistic:!1}).result},t.prototype.resolveDocument=function(e,r){return __awaiter(this,arguments,void 0,function(s,o,d,L,ge,Mt){var er,tr,ir,rr,nr,ar,sr,lr,cr,ur,or;return d===void 0&&(d={}),L===void 0&&(L={}),ge===void 0&&(ge=function(){return!0}),Mt===void 0&&(Mt=!1),__generator(this,function(dr){return er=getMainDefinition(s),tr=getFragmentDefinitions(s),ir=createFragmentMap(tr),rr=this.collectSelectionsToResolve(er,ir),nr=er.operation,ar=nr?nr.charAt(0).toUpperCase()+nr.slice(1):"Query",sr=this,lr=sr.cache,cr=sr.client,ur={fragmentMap:ir,context:__assign(__assign({},d),{cache:lr,client:cr}),variables:L,fragmentMatcher:ge,defaultOperationType:ar,exportedVariables:{},selectionsToResolve:rr,onlyRunForcedResolvers:Mt},or=!1,[2,this.resolveSelectionSet(er.selectionSet,or,o,ur).then(function(hr){return{result:hr,exportedVariables:ur.exportedVariables}})]})})},t.prototype.resolveSelectionSet=function(e,r,s,o){return __awaiter(this,void 0,void 0,function(){var d,L,ge,Mt,er,tr=this;return __generator(this,function(ir){return d=o.fragmentMap,L=o.context,ge=o.variables,Mt=[s],er=function(rr){return __awaiter(tr,void 0,void 0,function(){var nr,ar;return __generator(this,function(sr){return!r&&!o.selectionsToResolve.has(rr)?[2]:shouldInclude(rr,ge)?isField(rr)?[2,this.resolveField(rr,r,s,o).then(function(lr){var cr;typeof lr<"u"&&Mt.push((cr={},cr[resultKeyNameFromField(rr)]=lr,cr))})]:(isInlineFragment(rr)?nr=rr:(nr=d[rr.name.value],invariant$1(nr,18,rr.name.value)),nr&&nr.typeCondition&&(ar=nr.typeCondition.name.value,o.fragmentMatcher(s,ar,L))?[2,this.resolveSelectionSet(nr.selectionSet,r,s,o).then(function(lr){Mt.push(lr)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(er)).then(function(){return mergeDeepArray(Mt)})]})})},t.prototype.resolveField=function(e,r,s,o){return __awaiter(this,void 0,void 0,function(){var d,L,ge,Mt,er,tr,ir,rr,nr,ar=this;return __generator(this,function(sr){return s?(d=o.variables,L=e.name.value,ge=resultKeyNameFromField(e),Mt=L!==ge,er=s[ge]||s[L],tr=Promise.resolve(er),(!o.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(ir=s.__typename||o.defaultOperationType,rr=this.resolvers&&this.resolvers[ir],rr&&(nr=rr[Mt?L:ge],nr&&(tr=Promise.resolve(cacheSlot.withValue(this.cache,nr,[s,argumentsObjectFromField(e,d),o.context,{field:e,fragmentMap:o.fragmentMap}]))))),[2,tr.then(function(lr){var cr,ur;if(lr===void 0&&(lr=er),e.directives&&e.directives.forEach(function(dr){dr.name.value==="export"&&dr.arguments&&dr.arguments.forEach(function(hr){hr.name.value==="as"&&hr.value.kind==="StringValue"&&(o.exportedVariables[hr.value.value]=lr)})}),!e.selectionSet||lr==null)return lr;var or=(ur=(cr=e.directives)===null||cr===void 0?void 0:cr.some(function(dr){return dr.name.value==="client"}))!==null&&ur!==void 0?ur:!1;if(Array.isArray(lr))return ar.resolveSubSelectedArray(e,r||or,lr,o);if(e.selectionSet)return ar.resolveSelectionSet(e.selectionSet,r||or,lr,o)})]):[2,null]})})},t.prototype.resolveSubSelectedArray=function(e,r,s,o){var d=this;return Promise.all(s.map(function(L){if(L===null)return null;if(Array.isArray(L))return d.resolveSubSelectedArray(e,r,L,o);if(e.selectionSet)return d.resolveSelectionSet(e.selectionSet,r,L,o)}))},t.prototype.collectSelectionsToResolve=function(e,r){var s=function(L){return!Array.isArray(L)},o=this.selectionsToResolveCache;function d(L){if(!o.has(L)){var ge=new Set;o.set(L,ge),visit(L,{Directive:function(Mt,er,tr,ir,rr){Mt.name.value==="client"&&rr.forEach(function(nr){s(nr)&&isSelectionNode(nr)&&ge.add(nr)})},FragmentSpread:function(Mt,er,tr,ir,rr){var nr=r[Mt.name.value];invariant$1(nr,19,Mt.name.value);var ar=d(nr);ar.size>0&&(rr.forEach(function(sr){s(sr)&&isSelectionNode(sr)&&ge.add(sr)}),ge.add(Mt),ar.forEach(function(sr){ge.add(sr)}))}})}return o.get(L)}return d(e)},t}(),destructiveMethodCounts=new(canUseWeakMap?WeakMap:Map);function wrapDestructiveCacheMethod(t,e){var r=t[e];typeof r=="function"&&(t[e]=function(){return destructiveMethodCounts.set(t,(destructiveMethodCounts.get(t)+1)%1e15),r.apply(this,arguments)})}function cancelNotifyTimeout(t){t.notifyTimeout&&(clearTimeout(t.notifyTimeout),t.notifyTimeout=void 0)}var QueryInfo=function(){function t(e,r){r===void 0&&(r=e.generateQueryId()),this.queryId=r,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var s=this.cache=e.cache;destructiveMethodCounts.has(s)||(destructiveMethodCounts.set(s,0),wrapDestructiveCacheMethod(s,"evict"),wrapDestructiveCacheMethod(s,"modify"),wrapDestructiveCacheMethod(s,"reset"))}return t.prototype.init=function(e){var r=e.networkStatus||NetworkStatus.loading;return this.variables&&this.networkStatus!==NetworkStatus.loading&&!equal(this.variables,e.variables)&&(r=NetworkStatus.setVariables),equal(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:r}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},t.prototype.reset=function(){cancelNotifyTimeout(this),this.dirty=!1},t.prototype.resetDiff=function(){this.lastDiff=void 0},t.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&equal(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var r=this.observableQuery;if(r&&r.options.fetchPolicy==="no-cache")return{complete:!1};var s=this.cache.diff(e);return this.updateLastDiff(s,e),s},t.prototype.updateLastDiff=function(e,r){this.lastDiff=e?{diff:e,options:r||this.getDiffOptions()}:void 0},t.prototype.getDiffOptions=function(e){var r;return e===void 0&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:(r=this.observableQuery)===null||r===void 0?void 0:r.options.canonizeResults}},t.prototype.setDiff=function(e){var r=this,s,o=this.lastDiff&&this.lastDiff.diff;e&&!e.complete&&(!((s=this.observableQuery)===null||s===void 0)&&s.getLastError())||(this.updateLastDiff(e),!this.dirty&&!equal(o&&o.result,e&&e.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0))))},t.prototype.setObservableQuery=function(e){var r=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){var s=r.getDiff();s.fromOptimisticTransaction?e.observe():reobserveCacheFirst(e)})):delete this.oqListener)},t.prototype.notify=function(){var e=this;cancelNotifyTimeout(this),this.shouldNotify()&&this.listeners.forEac
64h(function(r){return r(e)}),this.dirty=!1},t.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(isNetworkRequestInFlight(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if(e!=="cache-only"&&e!=="cache-and-network")return!1}return!0},t.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=t.prototype.cancel;var e=this.observableQuery;e&&e.stopPolling()}},t.prototype.cancel=function(){},t.prototype.updateWatch=function(e){var r=this;e===void 0&&(e=this.variables);var s=this.observableQuery;if(!(s&&s.options.fetchPolicy==="no-cache")){var o=__assign(__assign({},this.getDiffOptions(e)),{watcher:this,callback:function(d){return r.setDiff(d)}});(!this.lastWatch||!equal(o,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=o))}},t.prototype.resetLastWrite=function(){this.lastWrite=void 0},t.prototype.shouldWrite=function(e,r){var s=this.lastWrite;return!(s&&s.dmCount===destructiveMethodCounts.get(this.cache)&&equal(r,s.variables)&&equal(e.data,s.result.data))},t.prototype.markResult=function(e,r,s,o){var d=this,L=new DeepMerger,ge=isNonEmptyArray(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&isNonEmptyArray(e.incremental)){var Mt=mergeIncrementalData(this.getDiff().result,e);e.data=Mt}else if("hasNext"in e&&e.hasNext){var er=this.getDiff();e.data=L.merge(er.result,e.data)}this.graphQLErrors=ge,s.fetchPolicy==="no-cache"?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(s.variables)):o!==0&&(shouldWriteResult(e,s.errorPolicy)?this.cache.performTransaction(function(tr){if(d.shouldWrite(e,s.variables))tr.writeQuery({query:r,data:e.data,variables:s.variables,overwrite:o===1}),d.lastWrite={result:e,variables:s.variables,dmCount:destructiveMethodCounts.get(d.cache)};else if(d.lastDiff&&d.lastDiff.diff.complete){e.data=d.lastDiff.diff.result;return}var ir=d.getDiffOptions(s.variables),rr=tr.diff(ir);!d.stopped&&equal(d.variables,s.variables)&&d.updateWatch(s.variables),d.updateLastDiff(rr,ir),rr.complete&&(e.data=rr.result)}):this.lastWrite=void 0)},t.prototype.markReady=function(){return this.networkError=null,this.networkStatus=NetworkStatus.ready},t.prototype.markError=function(e){return this.networkStatus=NetworkStatus.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},t}();function shouldWriteResult(t,e){e===void 0&&(e="none");var r=e==="ignore"||e==="all",s=!graphQLResultHasError(t);return!s&&r&&t.data&&(s=!0),s}var hasOwnProperty$5=Object.prototype.hasOwnProperty,IGNORE=Object.create(null),QueryManager=function(){function t(e){var r=e.cache,s=e.link,o=e.defaultOptions,d=e.documentTransform,L=e.queryDeduplication,ge=L===void 0?!1:L,Mt=e.onBroadcast,er=e.ssrMode,tr=er===void 0?!1:er,ir=e.clientAwareness,rr=ir===void 0?{}:ir,nr=e.localState,ar=e.assumeImmutableResults,sr=ar===void 0?!!r.assumeImmutableResults:ar,lr=e.defaultContext,cr=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new AutoCleanedWeakCache(cacheSizes["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Trie$1(!1);var ur=new DocumentTransform(function(or){return cr.cache.transformDocument(or)},{cache:!1});this.cache=r,this.link=s,this.defaultOptions=o||Object.create(null),this.queryDeduplication=ge,this.clientAwareness=rr,this.localState=nr||new LocalState({cache:r}),this.ssrMode=tr,this.assumeImmutableResults=sr,this.documentTransform=d?ur.concat(d).concat(ur):ur,this.defaultContext=lr||Object.create(null),(this.onBroadcast=Mt)&&(this.mutationStore=Object.create(null))}return t.prototype.stop=function(){var e=this;this.queries.forEach(function(r,s){e.stopQueryNoBroadcast(s)}),this.cancelPendingFetches(newInvariantError(25))},t.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(r){return r(e)}),this.fetchCancelFns.clear()},t.prototype.mutate=function(e){return __awaiter(this,arguments,void 0,function(r){var s,o,d,L,ge,Mt,er,tr=r.mutation,ir=r.variables,rr=r.optimisticResponse,nr=r.updateQueries,ar=r.refetchQueries,sr=ar===void 0?[]:ar,lr=r.awaitRefetchQueries,cr=lr===void 0?!1:lr,ur=r.update,or=r.onQueryUpdated,dr=r.fetchPolicy,hr=dr===void 0?((Mt=this.defaultOptions.mutate)===null||Mt===void 0?void 0:Mt.fetchPolicy)||"network-only":dr,pr=r.errorPolicy,mr=pr===void 0?((er=this.defaultOptions.mutate)===null||er===void 0?void 0:er.errorPolicy)||"none":pr,vr=r.keepRootFields,Er=r.context;return __generator(this,function(Cr){switch(Cr.label){case 0:return invariant$1(tr,26),invariant$1(hr==="network-only"||hr==="no-cache",27),s=this.generateMutationId(),tr=this.cache.transformForLink(this.transform(tr)),o=this.getDocumentInfo(tr).hasClientExports,ir=this.getVariables(tr,ir),o?[4,this.localState.addExportedVariables(tr,ir,Er)]:[3,2];case 1:ir=Cr.sent(),Cr.label=2;case 2:return d=this.mutationStore&&(this.mutationStore[s]={mutation:tr,variables:ir,loading:!0,error:null}),L=rr&&this.markMutationOptimistic(rr,{mutationId:s,document:tr,variables:ir,fetchPolicy:hr,errorPolicy:mr,context:Er,updateQueries:nr,update:ur,keepRootFields:vr}),this.broadcastQueries(),ge=this,[2,new Promise(function(Pr,kr){return asyncMap(ge.getObservableFromLink(tr,__assign(__assign({},Er),{optimisticResponse:L?rr:void 0}),ir,!1),function(Mr){if(graphQLResultHasError(Mr)&&mr==="none")throw new ApolloError({graphQLErrors:getGraphQLErrorsFromResult(Mr)});d&&(d.loading=!1,d.error=null);var Ur=__assign({},Mr);return typeof sr=="function"&&(sr=sr(Ur)),mr==="ignore"&&graphQLResultHasError(Ur)&&delete Ur.errors,ge.markMutationResult({mutationId:s,result:Ur,document:tr,variables:ir,fetchPolicy:hr,errorPolicy:mr,context:Er,update:ur,updateQueries:nr,awaitRefetchQueries:cr,refetchQueries:sr,removeOptimistic:L?s:void 0,onQueryUpdated:or,keepRootFields:vr})}).subscribe({next:function(Mr){ge.broadcastQueries(),(!("hasNext"in Mr)||Mr.hasNext===!1)&&Pr(Mr)},error:function(Mr){d&&(d.loading=!1,d.error=Mr),L&&ge.cache.removeOptimistic(s),ge.broadcastQueries(),kr(Mr instanceof ApolloError?Mr:new ApolloError({networkError:Mr}))}})})]}})})},t.prototype.markMutationResult=function(e,r){var s=this;r===void 0&&(r=this.cache);var o=e.result,d=[],L=e.fetchPolicy==="no-cache";if(!L&&shouldWriteResult(o,e.errorPolicy)){if(isExecutionPatchIncrementalResult(o)||d.push({result:o.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),isExecutionPatchIncrementalResult(o)&&isNonEmptyArray(o.incremental)){var ge=r.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}
64),Mt=void 0;ge.result&&(Mt=mergeIncrementalData(ge.result,o)),typeof Mt<"u"&&(o.data=Mt,d.push({result:Mt,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var er=e.updateQueries;er&&this.queries.forEach(function(ir,rr){var nr=ir.observableQuery,ar=nr&&nr.queryName;if(!(!ar||!hasOwnProperty$5.call(er,ar))){var sr=er[ar],lr=s.queries.get(rr),cr=lr.document,ur=lr.variables,or=r.diff({query:cr,variables:ur,returnPartialData:!0,optimistic:!1}),dr=or.result,hr=or.complete;if(hr&&dr){var pr=sr(dr,{mutationResult:o,queryName:cr&&getOperationName(cr)||void 0,queryVariables:ur});pr&&d.push({result:pr,dataId:"ROOT_QUERY",query:cr,variables:ur})}}})}if(d.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var tr=[];if(this.refetchQueries({updateCache:function(ir){L||d.forEach(function(sr){return ir.write(sr)});var rr=e.update,nr=!isExecutionPatchResult(o)||isExecutionPatchIncrementalResult(o)&&!o.hasNext;if(rr){if(!L){var ar=ir.diff({id:"ROOT_MUTATION",query:s.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});ar.complete&&(o=__assign(__assign({},o),{data:ar.result}),"incremental"in o&&delete o.incremental,"hasNext"in o&&delete o.hasNext)}nr&&rr(ir,o,{context:e.context,variables:e.variables})}!L&&!e.keepRootFields&&nr&&ir.modify({id:"ROOT_MUTATION",fields:function(sr,lr){var cr=lr.fieldName,ur=lr.DELETE;return cr==="__typename"?sr:ur}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(ir){return tr.push(ir)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(tr).then(function(){return o})}return Promise.resolve(o)},t.prototype.markMutationOptimistic=function(e,r){var s=this,o=typeof e=="function"?e(r.variables,{IGNORE}):e;return o===IGNORE?!1:(this.cache.recordOptimisticTransaction(function(d){try{s.markMutationResult(__assign(__assign({},r),{result:{data:o}}),d)}catch(L){globalThis.__DEV__!==!1&&invariant$1.error(L)}},r.mutationId),!0)},t.prototype.fetchQuery=function(e,r,s){return this.fetchConcastWithInfo(e,r,s).concast.promise},t.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(r,s){e[s]={variables:r.variables,networkStatus:r.networkStatus,networkError:r.networkError,graphQLErrors:r.graphQLErrors}}),e},t.prototype.resetErrors=function(e){var r=this.queries.get(e);r&&(r.networkError=void 0,r.graphQLErrors=[])},t.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},t.prototype.getDocumentInfo=function(e){var r=this.transformCache;if(!r.has(e)){var s={hasClientExports:hasClientExports(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:hasDirectives(["nonreactive"],e),clientQuery:this.localState.clientQuery(e),serverQuery:removeDirectivesFromDocument([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],e),defaultVars:getDefaultValues(getOperationDefinition(e)),asQuery:__assign(__assign({},e),{definitions:e.definitions.map(function(o){return o.kind==="OperationDefinition"&&o.operation!=="query"?__assign(__assign({},o),{operation:"query"}):o})})};r.set(e,s)}return r.get(e)},t.prototype.getVariables=function(e,r){return __assign(__assign({},this.getDocumentInfo(e).defaultVars),r)},t.prototype.watchQuery=function(e){var r=this.transform(e.query);e=__assign(__assign({},e),{variables:this.getVariables(r,e.variables)}),typeof e.notifyOnNetworkStatusChange>"u"&&(e.notifyOnNetworkStatusChange=!1);var s=new QueryInfo(this),o=new ObservableQuery({queryManager:this,queryInfo:s,options:e});return o.lastQuery=r,this.queries.set(o.queryId,s),s.init({document:r,observableQuery:o,variables:o.variables}),o},t.prototype.query=function(e,r){var s=this;return r===void 0&&(r=this.generateQueryId()),invariant$1(e.query,28),invariant$1(e.query.kind==="Document",29),invariant$1(!e.returnPartialData,30),invariant$1(!e.pollInterval,31),this.fetchQuery(r,__assign(__assign({},e),{query:this.transform(e.query)})).finally(function(){return s.stopQuery(r)})},t.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},t.prototype.generateRequestId=function(){return this.requestIdCounter++},t.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},t.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},t.prototype.stopQueryInStoreNoBroadcast=function(e){var r=this.queries.get(e);r&&r.stop()},t.prototype.clearStore=function(e){return e===void 0&&(e={discardWatches:!0}),this.cancelPendingFetches(newInvariantError(32)),this.queries.forEac
64h(function(r){r.observableQuery?r.networkStatus=NetworkStatus.loading:r.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},t.prototype.getObservableQueries=function(e){var r=this;e===void 0&&(e="active");var s=new Map,o=new Map,d=new Set;return Array.isArray(e)&&e.forEach(function(L){typeof L=="string"?o.set(L,!1):isDocumentNode(L)?o.set(r.transform(L),!1):isNonNullObject(L)&&L.query&&d.add(L)}),this.queries.forEach(function(L,ge){var Mt=L.observableQuery,er=L.document;if(Mt){if(e==="all"){s.set(ge,Mt);return}var tr=Mt.queryName,ir=Mt.options.fetchPolicy;if(ir==="standby"||e==="active"&&!Mt.hasObservers())return;(e==="active"||tr&&o.has(tr)||er&&o.has(er))&&(s.set(ge,Mt),tr&&o.set(tr,!0),er&&o.set(er,!0))}}),d.size&&d.forEach(function(L){var ge=makeUniqueId("legacyOneTimeQuery"),Mt=r.getQuery(ge).init({document:L.query,variables:L.variables}),er=new ObservableQuery({queryManager:r,queryInfo:Mt,options:__assign(__assign({},L),{fetchPolicy:"network-only"})});invariant$1(er.queryId===ge),Mt.setObservableQuery(er),s.set(ge,er)}),globalThis.__DEV__!==!1&&o.size&&o.forEach(function(L,ge){L||globalThis.__DEV__!==!1&&invariant$1.warn(typeof ge=="string"?33:34,ge)}),s},t.prototype.reFetchObservableQueries=function(e){var r=this;e===void 0&&(e=!1);var s=[];return this.getObservableQueries(e?"all":"active").forEach(function(o,d){var L=o.options.fetchPolicy;o.resetLastResults(),(e||L!=="standby"&&L!=="cache-only")&&s.push(o.refetch()),r.getQuery(d).setDiff(null)}),this.broadcastQueries(),Promise.all(s)},t.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},t.prototype.startGraphQLSubscription=function(e){var r=this,s=e.query,o=e.fetchPolicy,d=e.errorPolicy,L=d===void 0?"none":d,ge=e.variables,Mt=e.context,er=Mt===void 0?{}:Mt;s=this.transform(s),ge=this.getVariables(s,ge);var tr=function(rr){return r.getObservableFromLink(s,er,rr).map(function(nr){o!=="no-cache"&&(shouldWriteResult(nr,L)&&r.cache.write({query:s,result:nr.data,dataId:"ROOT_SUBSCRIPTION",variables:rr}),r.broadcastQueries());
64var ar=graphQLResultHasError(nr),sr=graphQLResultHasProtocolErrors(nr);if(ar||sr){var lr={};if(ar&&(lr.graphQLErrors=nr.errors),sr&&(lr.protocolErrors=nr.extensions[PROTOCOL_ERRORS_SYMBOL]),L==="none"||sr)throw new ApolloError(lr)}return L==="ignore"&&delete nr.errors,nr})};if(this.getDocumentInfo(s).hasClientExports){var ir=this.localState.addExportedVariables(s,ge,er).then(tr);return new Observable(function(rr){var nr=null;return ir.then(function(ar){return nr=ar.subscribe(rr)},rr.error),function(){return nr&&nr.unsubscribe()}})}return tr(ge)},t.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},t.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},t.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},t.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},t.prototype.getLocalState=function(){return this.localState},t.prototype.getObservableFromLink=function(e,r,s,o){var d=this,L;o===void 0&&(o=(L=r==null?void 0:r.queryDeduplication)!==null&&L!==void 0?L:this.queryDeduplication);var ge,Mt=this.getDocumentInfo(e),er=Mt.serverQuery,tr=Mt.clientQuery;if(er){var ir=this,rr=ir.inFlightLinkObservables,nr=ir.link,ar={query:er,variables:s,operationName:getOperationName(er)||void 0,context:this.prepareContext(__assign(__assign({},r),{forceFetch:!o}))};if(r=ar.context,o){var sr=print(er),lr=canonicalStringify(s),cr=rr.lookup(sr,lr);if(ge=cr.observable,!ge){var ur=new Concast([execute(nr,ar)]);ge=cr.observable=ur,ur.beforeNext(function(){rr.remove(sr,lr)})}}else ge=new Concast([execute(nr,ar)])}else ge=new Concast([Observable.of({data:{}})]),r=this.prepareContext(r);return tr&&(ge=asyncMap(ge,function(or){return d.localState.runResolvers({document:tr,remoteResult:or,context:r,variables:s})})),ge},t.prototype.getResultsFromLink=function(e,r,s){var o=e.lastRequestId=this.generateRequestId(),d=this.cache.transformForLink(s.query);return asyncMap(this.getObservableFromLink(d,s.context,s.variables),function(L){var ge=getGraphQLErrorsFromResult(L),Mt=ge.length>0;if(o>=e.lastRequestId){if(Mt&&s.errorPolicy==="none")throw e.markError(new ApolloError({graphQLErrors:ge}));e.markResult(L,d,s,r),e.markReady()}var er={data:L.data,loading:!1,networkStatus:NetworkStatus.ready};return Mt&&s.errorPolicy!=="ignore"&&(er.errors=ge,er.networkStatus=NetworkStatus.error),er},function(L){var ge=isApolloError(L)?L:new ApolloError({networkError:L});throw o>=e.lastRequestId&&e.markError(ge),ge})},t.prototype.fetchConcastWithInfo=function(e,r,s,o){var d=this;s===void 0&&(s=NetworkStatus.loading),o===void 0&&(o=r.query);var L=this.getVariables(o,r.variables),ge=this.getQuery(e),Mt=this.defaultOptions.watchQuery,er=r.fetchPolicy,tr=er===void 0?Mt&&Mt.fetchPolicy||"cache-first":er,ir=r.errorPolicy,rr=ir===void 0?Mt&&Mt.errorPolicy||"none":ir,nr=r.returnPartialData,ar=nr===void 0?!1:nr,sr=r.notifyOnNetworkStatusChange,lr=sr===void 0?!1:sr,cr=r.context,ur=cr===void 0?{}:cr,or=Object.assign({},r,{query:o,variables:L,fetchPolicy:tr,errorPolicy:rr,returnPartialData:ar,notifyOnNetworkStatusChange:lr,context:ur}),dr=function(Er){or.variables=Er;var Cr=d.fetchQueryByPolicy(ge,or,s);return or.fetchPolicy!=="standby"&&Cr.sources.length>0&&ge.observableQuery&&ge.observableQuery.applyNextFetchPolicy("after-fetch",r),Cr},hr=function(){return d.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,function(Er){hr(),setTimeout(function(){return pr.cancel(Er)})});var pr,mr;if(this.getDocumentInfo(or.query).hasClientExports)pr=new Concast(this.localState.addExportedVariables(or.query,or.variables,or.context).then(dr).then(function(Er){return Er.sources})),mr=!0;else{var vr=dr(or.variables);mr=vr.fromLink,pr=new Concast(vr.sources)}return pr.promise.then(hr,hr),{concast:pr,fromLink:mr}},t.prototype.refetchQueries=function(e){var r=this,s=e.updateCache,o=e.include,d=e.optimistic,L=d===void 0?!1:d,ge=e.removeOptimistic,Mt=ge===void 0?L?makeUniqueId("refetchQueries"):void 0:ge,er=e.onQueryUpdated,tr=new Map;
64o&&this.getObservableQueries(o).forEach(function(rr,nr){tr.set(nr,{oq:rr,lastDiff:r.getQuery(nr).getDiff()})});var ir=new Map;return s&&this.cache.batch({update:s,optimistic:L&&Mt||!1,removeOptimistic:Mt,onWatchUpdated:function(rr,nr,ar){var sr=rr.watcher instanceof QueryInfo&&rr.watcher.observableQuery;if(sr){if(er){tr.delete(sr.queryId);var lr=er(sr,nr,ar);return lr===!0&&(lr=sr.refetch()),lr!==!1&&ir.set(sr,lr),lr}er!==null&&tr.set(sr.queryId,{oq:sr,lastDiff:ar,diff:nr})}}}),tr.size&&tr.forEach(function(rr,nr){var ar=rr.oq,sr=rr.lastDiff,lr=rr.diff,cr;if(er){if(!lr){var ur=ar.queryInfo;ur.reset(),lr=ur.getDiff()}cr=er(ar,lr,sr)}(!er||cr===!0)&&(cr=ar.refetch()),cr!==!1&&ir.set(ar,cr),nr.indexOf("legacyOneTimeQuery")>=0&&r.stopQueryNoBroadcast(nr)}),Mt&&this.cache.removeOptimistic(Mt),ir},t.prototype.fetchQueryByPolicy=function(e,r,s){var o=this,d=r.query,L=r.variables,ge=r.fetchPolicy,Mt=r.refetchWritePolicy,er=r.errorPolicy,tr=r.returnPartialData,ir=r.context,rr=r.notifyOnNetworkStatusChange,nr=e.networkStatus;e.init({document:d,variables:L,networkStatus:s});var ar=function(){return e.getDiff()},sr=function(dr,hr){hr===void 0&&(hr=e.networkStatus||NetworkStatus.loading);var pr=dr.result;globalThis.__DEV__!==!1&&!tr&&!equal(pr,{})&&logMissingFieldErrors(dr.missing);var mr=function(vr){return Observable.of(__assign({data:vr,loading:isNetworkRequestInFlight(hr),networkStatus:hr},dr.complete?null:{partial:!0}))};return pr&&o.getDocumentInfo(d).hasForcedResolvers?o.localState.runResolvers({document:d,remoteResult:{data:pr},context:ir,variables:L,onlyRunForcedResolvers:!0}).then(function(vr){return mr(vr.data||void 0)}):er==="none"&&hr===NetworkStatus.refetch&&Array.isArray(dr.missing)?mr(void 0):mr(pr)},lr=ge==="no-cache"?0:s===NetworkStatus.refetch&&Mt!=="merge"?1:2,cr=function(){return o.getResultsFromLink(e,lr,{query:d,variables:L,context:ir,fetchPolicy:ge,errorPolicy:er})},ur=rr&&typeof nr=="number"&&nr!==s&&isNetworkRequestInFlight(s);switch(ge){default:case"cache-first":{var or=ar();return or.complete?{fromLink:!1,sources:[sr(or,e.markReady())]}:tr||ur?{fromLink:!0,sources:[sr(or),cr()]}:{fromLink:!0,sources:[cr()]}}case"cache-and-network":{var or=ar();return or.complete||tr||ur?{fromLink:!0,sources:[sr(or),cr()]}:{fromLink:!0,sources:[cr()]}}case"cache-only":return{fromLink:!1,sources:[sr(ar(),e.markReady())]};case"network-only":return ur?{fromLink:!0,sources:[sr(ar()),cr()]}:{fromLink:!0,sources:[cr()]};case"no-cache":return ur?{fromLink:!0,sources:[sr(e.getDiff()),cr()]}:{fromLink:!0,sources:[cr()]};case"standby":return{fromLink:!1,sources:[]}}},t.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new QueryInfo(this,e)),this.queries.get(e)},t.prototype.prepareContext=function(e){e===void 0&&(e={});var r=this.localState.prepareContext(e);return __assign(__assign(__assign({},this.defaultContext),r),{clientAwareness:this.clientAwareness})},t}(),hasSuggestedDevtools=!1,ApolloClient=function(){function t(e){var r=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw newInvariantError(15);var s=e.uri,o=e.credentials,d=e.headers,L=e.cache,ge=e.documentTransform,Mt=e.ssrMode,er=Mt===void 0?!1:Mt,tr=e.ssrForceFetchDelay,ir=tr===void 0?0:tr,rr=e.connectToDevTools,nr=rr===void 0?typeof window=="object"&&!window.__APOLLO_CLIENT__&&globalThis.__DEV__!==!1:rr,ar=e.queryDeduplication,sr=ar===void 0?!0:ar,lr=e.defaultOptions,cr=e.defaultContext,ur=e.assumeImmutableResults,or=ur===void 0?L.assumeImmutableResults:ur,dr=e.resolvers,hr=e.typeDefs,pr=e.fragmentMatcher,mr=e.name,vr=e.version,Er=e.link;Er||(Er=s?new HttpLink({uri:s,credentials:o,headers:d}):ApolloLink.empty()),this.link=Er,this.cache=L,this.disableNetworkFetches=er||ir>0,this.queryDeduplication=sr,this.defaultOptions=lr||Object.create(null),this.typeDefs=hr,ir&&setTimeout(function(){return r.disableNetworkFetches=!1},ir),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=version$6,this.localState=new LocalState({cache:L,client:this,resolvers:dr,fragmentMatcher:pr}),this.queryManager=new QueryManager({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:cr,documentTransform:ge,queryDeduplication:sr,ssrMode:er,clientAwareness:{name:mr,version:vr},localState:this.localState,assumeImmutableResults:or,onBroadcast:nr?function(){r.devToolsHookCb&&r.devToolsHookCb({action:{},state:{queries:r.queryManager.getQueryStore(),mutations:r.queryManager.mutationStore||{}},dataWithOptimisticResults:r.cache.extract(!0)})}:void 0}),nr&&this.connectToDevTools()}return t.prototype.connectToDevTools=function(){if(typeof window=="object"){var e=window,r=Symbol.for("apollo.devtools");(e[r]=e[r]||[]).push(this),e.__APOLLO_CLIENT__=this}!hasSuggestedDevtools&&globalThis.__DEV__!==!1&&(hasSuggestedDevtools=!0,setTimeout(function(){if(typeof window<"u"&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__&&/^(https?|file):$/.test(window.location.protocol)){var s=window.navigator,o=s&&s.userAgent,d=void 0;
64typeof o=="string"&&(o.indexOf("Chrome/")>-1?d="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":o.indexOf("Firefox/")>-1&&(d="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),d&&globalThis.__DEV__!==!1&&invariant$1.log("Download the Apollo DevTools for a better development experience: %s",d)}},1e4))},Object.defineProperty(t.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),t.prototype.stop=function(){this.queryManager.stop()},t.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=mergeOptions(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&(e.fetchPolicy==="network-only"||e.fetchPolicy==="cache-and-network")&&(e=__assign(__assign({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},t.prototype.query=function(e){return this.defaultOptions.query&&(e=mergeOptions(this.defaultOptions.query,e)),invariant$1(e.fetchPolicy!=="cache-and-network",16),this.disableNetworkFetches&&e.fetchPolicy==="network-only"&&(e=__assign(__assign({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},t.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=mergeOptions(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},t.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},t.prototype.readQuery=function(e,r){return r===void 0&&(r=!1),this.cache.readQuery(e,r)},t.prototype.watchFragment=function(e){return this.cache.watchFragment(e)},t.prototype.readFragment=function(e,r){return r===void 0&&(r=!1),this.cache.readFragment(e,r)},t.prototype.writeQuery=function(e){var r=this.cache.writeQuery(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),r},t.prototype.writeFragment=function(e){var r=this.cache.writeFragment(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),r},t.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},t.prototype.__requestRaw=function(e){return execute(this.link,e)},t.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(r){return r()}))}).then(function(){return e.reFetchObservableQueries()})},t.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(r){return r()}))})},t.prototype.onResetStore=function(e){var r=this;return this.resetStoreCallbacks.push(e),function(){r.resetStoreCallbacks=r.resetStoreCallbacks.filter(function(s){return s!==e})}},t.prototype.onClearStore=function(e){var r=this;return this.clearStoreCallbacks.push(e),function(){r.clearStoreCallbacks=r.clearStoreCallbacks.filter(function(s){return s!==e})}},t.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},t.prototype.refetchQueries=function(e){var r=this.queryManager.refetchQueries(e),s=[],o=[];r.forEach(function(L,ge){s.push(ge),o.push(L)});var d=Promise.all(o);return d.queries=s,d.results=o,d.catch(function(L){globalThis.__DEV__!==!1&&invariant$1.debug(17,L)}),d},t.prototype.getObservableQueries=function(e){return e===void 0&&(e="active"),this.queryManager.getObservableQueries(e)},t.prototype.extract=function(e){return this.cache.extract(e)},t.prototype.restore=function(e){return this.cache.restore(e)},t.prototype.addResolvers=function(e){this.localState.addResolvers(e)},t.prototype.setResolvers=function(e){this.localState.setResolvers(e)},t.prototype.getResolvers=function(){return this.localState.getResolvers()},t.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},t.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(t.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),t}();globalThis.__DEV__!==!1&&(ApolloClient.prototype.getMemoryInternals=getApolloClientMemoryInternals);var docCache=new Map,fragmentSourceMap=new Map,printFragmentWarnings=!0,experimentalFragmentVariables=!1;function normalize$1(t){return t.replace(/[\s,]+/g," ").trim()}function cacheKeyFromLoc(t){return normalize$1(t.source.body.substring(t.start,t.end))}
64function processFragments(t){var e=new Set,r=[];return t.definitions.forEach(function(s){if(s.kind==="FragmentDefinition"){var o=s.name.value,d=cacheKeyFromLoc(s.loc),L=fragmentSourceMap.get(o);L&&!L.has(d)?printFragmentWarnings&&console.warn("Warning: fragment with name "+o+` already exists. 65graphql-tag enforces all fragment names across your application to be unique; read more about 66this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):L||fragmentSourceMap.set(o,L=new Set),L.add(d),e.has(d)||(e.add(d),r.push(s))}else r.push(s)}),__assign(__assign({},t),{definitions:r})}function stripLoc(t){var e=new Set(t.definitions);e.forEach(function(s){s.loc&&delete s.loc,Object.keys(s).forEach(function(o){var d=s[o];d&&typeof d=="object"&&e.add(d)})});var r=t.loc;return r&&(delete r.startToken,delete r.endToken),t}function parseDocument(t){var e=normalize$1(t);if(!docCache.has(e)){var r=parse$1(t,{experimentalFragmentVariables,allowLegacyFragmentVariables:experimentalFragmentVariables});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");docCache.set(e,stripLoc(processFragments(r)))}return docCache.get(e)}function gql(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];typeof t=="string"&&(t=[t]);var s=t[0];return e.forEach(function(o,d){o&&o.kind==="Document"?s+=o.loc.source.body:s+=o,s+=t[d+1]}),parseDocument(s)}function resetCaches(){docCache.clear(),fragmentSourceMap.clear()}function disableFragmentWarnings(){printFragmentWarnings=!1}function enableExperimentalFragmentVariables(){experimentalFragmentVariables=!0}function disableExperimentalFragmentVariables(){experimentalFragmentVariables=!1}var extras={gql,resetCaches,disableFragmentWarnings,enableExperimentalFragmentVariables,disableExperimentalFragmentVariables};(function(t){t.gql=extras.gql,t.resetCaches=extras.resetCaches,t.disableFragmentWarnings=extras.disableFragmentWarnings,t.enableExperimentalFragmentVariables=extras.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=extras.disableExperimentalFragmentVariables})(gql||(gql={}));gql.default=gql;var ApolloClients=Symbol("apollo-clients");ref$2(0),ref$2(0),ref$2(0);function isLikeCloseEvent$1(t){return isNonNullObject(t)&&"code"in t&&"reason"in t}function isLikeErrorEvent(t){var e;return isNonNullObject(t)&&((e=t.target)===null||e===void 0?void 0:e.readyState)===WebSocket.CLOSED}var GraphQLWsLink=function(t){__extends(e,t);function e(r){var s=t.call(this)||this;return s.client=r,s}return e.prototype.request=function(r){var s=this;return new Observable(function(o){return s.client.subscribe(__assign(__assign({},r),{query:print(r.query)}),{next:o.next.bind(o),complete:o.complete.bind(o),error:function(d){if(d instanceof Error)return o.error(d);var L=isLikeCloseEvent$1(d);return L||isLikeErrorEvent(d)?o.error(new Error("Socket closed".concat(L?" with event ".concat(d.code):"").concat(L?" ".concat(d.reason):""))):o.error(new ApolloError({graphQLErrors:Array.isArray(d)?d:[d]}))}})})},e}(ApolloLink);function setContext(t){return new ApolloLink(function(e,r){var s=__rest(e,[]);return new Observable(function(o){var d,L=!1;return Promise.resolve(s).then(function(ge){return t(ge,e.getContext())}).then(e.setContext).then(function(){L||(d=r(e).subscribe({next:o.next.bind(o),error:o.error.bind(o),complete:o.complete.bind(o)}))}).catch(o.error.bind(o)),function(){L=!0,d&&d.unsubscribe()}})})}function extendedTypeof(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function isObject$2(t){return extendedTypeof(t)==="object"}function areGraphQLErrors(t){return Array.isArray(t)&&t.length>0&&t.every(e=>"message"in e)}function limitCloseReason(t,e){return t.length<124?t:e}const GRAPHQL_TRANSPORT_WS_PROTOCOL="graphql-transport-ws";var CloseCode;(function(t){t[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(CloseCode||(CloseCode={}));var MessageType;(function(t){t.ConnectionInit="connection_init",t.ConnectionAck="connection_ack",t.Ping="ping",t.Pong="pong",t.Subscribe="subscribe",t.Next="next",t.Error="error",t.Complete="complete"})(MessageType||(MessageType={}));function validateMessage(t){if(!isObject$2(t))throw new Error(`Message is expected to be an object, but got ${extendedTypeof(t)}`);if(!t.type)throw new Error("Message is missing the 'type' property");if(typeof t.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${extendedTypeof(t.type)}`);switch(t.type){case MessageType.ConnectionInit:case MessageType.ConnectionAck:case MessageType.Ping:case MessageType.Pong:{if(t.payload!=null&&!isObject$2(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${t.payload}"`);break}case MessageType.Subscribe:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${extendedTypeof(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);
66if(!isObject$2(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${extendedTypeof(t.payload)}`);if(typeof t.payload.query!="string")throw new Error(`"${t.type}" message payload expects the 'query' property to be a string, but got ${extendedTypeof(t.payload.query)}`);if(t.payload.variables!=null&&!isObject$2(t.payload.variables))throw new Error(`"${t.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${extendedTypeof(t.payload.variables)}`);if(t.payload.operationName!=null&&extendedTypeof(t.payload.operationName)!=="string")throw new Error(`"${t.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${extendedTypeof(t.payload.operationName)}`);if(t.payload.extensions!=null&&!isObject$2(t.payload.extensions))throw new Error(`"${t.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${extendedTypeof(t.payload.extensions)}`);break}case MessageType.Next:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${extendedTypeof(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!isObject$2(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${extendedTypeof(t.payload)}`);break}case MessageType.Error:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${extendedTypeof(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!areGraphQLErrors(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(t.payload)}`);break}case MessageType.Complete:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${extendedTypeof(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${t.type}"`)}return t}function parseMessage(t,e){return validateMessage(typeof t=="string"?JSON.parse(t,e):t)}function stringifyMessage(t,e){return validateMessage(t),JSON.stringify(t,e)}var __await=function(t){return this instanceof __await?(this.v=t,this):new __await(t)},__asyncGenerator=function(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=r.apply(t,e||[]),o,d=[];return o={},L("next"),L("throw"),L("return"),o[Symbol.asyncIterator]=function(){return this},o;function L(rr){s[rr]&&(o[rr]=function(nr){return new Promise(function(ar,sr){d.push([rr,nr,ar,sr])>1||ge(rr,nr)})})}function ge(rr,nr){try{Mt(s[rr](nr))}catch(ar){ir(d[0][3],ar)}}function Mt(rr){rr.value instanceof __await?Promise.resolve(rr.value.v).then(er,tr):ir(d[0][2],rr)}function er(rr){ge("next",rr)}function tr(rr){ge("throw",rr)}function ir(rr,nr){rr(nr),d.shift(),d.length&&ge(d[0][0],d[0][1])}};function createClient(t){const{url:e,connectionParams:r,lazy:s=!0,onNonLazyError:o=console.error,lazyCloseTimeout:d=0,keepAlive:L=0,disablePong:ge,connectionAckWaitTimeout:Mt=0,retryAttempts:er=5,retryWait:tr=async function(yr){let xr=1e3;for(let gr=0;gr<yr;gr++)xr*=2;await new Promise(gr=>setTimeout(gr,xr+Math.floor(Math.random()*2700+300)))},shouldRetry:ir=isLikeCloseEvent,isFatalConnectionProblem:rr,on:nr,webSocketImpl:ar,generateID:sr=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,yr=>{const xr=Math.random()*16|0;return(yr=="x"?xr:xr&3|8).toString(16)})},jsonMessageReplacer:lr,jsonMessageReviver:cr}=t;let ur;if(ar){if(!isWebSocket(ar))throw new Error("Invalid WebSocket implementation provided");ur=ar}else typeof WebSocket<"u"?ur=WebSocket:typeof global<"u"?ur=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(ur=window.WebSocket||window.MozWebSocket);if(!ur)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const or=ur,dr=(()=>{const $r=(()=>{const xr={};return{on(gr,_r){return xr[gr]=_r,()=>{delete xr[gr]}},emit(gr){var _r;"id"in gr&&((_r=xr[gr.id])===null||_r===void 0||_r.call(xr,gr))}}})(),yr={connecting:nr!=null&&nr.connecting?[nr.connecting]:[],opened:nr!=null&&nr.opened?[nr.opened]:[],connected:nr!=null&&nr.connected?[nr.connected]:[],ping:nr!=null&&nr.ping?[nr.ping]:[],pong:nr!=null&&nr.pong?[nr.pong]:[],message:nr!=null&&nr.message?[$r.emit,nr.message]:[$r.emit],closed:nr!=null&&nr.closed?[nr.closed]:[],error:nr!=null&&nr.error?[nr.error]:[]};return{onMessage:$r.on,on(xr,gr){const _r=yr[xr];return _r.push(gr),()=>{_r.splice(_r.indexOf(gr),1)}},emit(xr,...gr){for(const _r of[...yr[xr]])_r(...gr)}}})();function hr($r){const yr=[dr.on("error",xr=>{yr.forEach(gr=>gr()),$r(xr)}),dr.on("closed",xr=>{yr.forEach(gr=>gr()),$r(xr)})]}let pr,mr=0,vr,Er=!1,Cr=0,Pr=!1;async function kr(){clearTimeout(vr);const[$r,yr]=await(pr??(pr=new Promise((_r,wr)=>(async()=>
66{if(Er){if(await tr(Cr),!mr)return pr=void 0,wr({code:1e3,reason:"All Subscriptions Gone"});Cr++}dr.emit("connecting",Er);const Ir=new or(typeof e=="function"?await e():e,GRAPHQL_TRANSPORT_WS_PROTOCOL);let Hr,Yr;function Jr(){isFinite(L)&&L>0&&(clearTimeout(Yr),Yr=setTimeout(()=>{Ir.readyState===or.OPEN&&(Ir.send(stringifyMessage({type:MessageType.Ping})),dr.emit("ping",!1,void 0))},L))}hr(di=>{pr=void 0,clearTimeout(Hr),clearTimeout(Yr),wr(di),di instanceof TerminatedCloseEvent&&(Ir.close(4499,"Terminated"),Ir.onerror=null,Ir.onclose=null)}),Ir.onerror=di=>dr.emit("error",di),Ir.onclose=di=>dr.emit("closed",di),Ir.onopen=async()=>{try{dr.emit("opened",Ir);const di=typeof r=="function"?await r():r;if(Ir.readyState!==or.OPEN)return;Ir.send(stringifyMessage(di?{type:MessageType.ConnectionInit,payload:di}:{type:MessageType.ConnectionInit},lr)),isFinite(Mt)&&Mt>0&&(Hr=setTimeout(()=>{Ir.close(CloseCode.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},Mt)),Jr()}catch(di){dr.emit("error",di),Ir.close(CloseCode.InternalClientError,limitCloseReason(di instanceof Error?di.message:new Error(di).message,"Internal client error"))}};let xi=!1;Ir.onmessage=({data:di})=>{try{const Vr=parseMessage(di,cr);if(dr.emit("message",Vr),Vr.type==="ping"||Vr.type==="pong"){dr.emit(Vr.type,!0,Vr.payload),Vr.type==="pong"?Jr():ge||(Ir.send(stringifyMessage(Vr.payload?{type:MessageType.Pong,payload:Vr.payload}:{type:MessageType.Pong})),dr.emit("pong",!1,Vr.payload));return}if(xi)return;if(Vr.type!==MessageType.ConnectionAck)throw new Error(`First message cannot be of type ${Vr.type}`);clearTimeout(Hr),xi=!0,dr.emit("connected",Ir,Vr.payload,Er),Er=!1,Cr=0,_r([Ir,new Promise((Zr,Qr)=>hr(Qr))])}catch(Vr){Ir.onmessage=null,dr.emit("error",Vr),Ir.close(CloseCode.BadResponse,limitCloseReason(Vr instanceof Error?Vr.message:new Error(Vr).message,"Bad response"))}}})())));$r.readyState===or.CLOSING&&await yr;let xr=()=>{};const gr=new Promise(_r=>xr=_r);return[$r,xr,Promise.race([gr.then(()=>{if(!mr){const _r=()=>$r.close(1e3,"Normal Closure");isFinite(d)&&d>0?vr=setTimeout(()=>{$r.readyState===or.OPEN&&_r()},d):_r()}}),yr])]}function Mr($r){if(isLikeCloseEvent($r)&&(isFatalInternalCloseCode($r.code)||[CloseCode.InternalServerError,CloseCode.InternalClientError,CloseCode.BadRequest,CloseCode.BadResponse,CloseCode.Unauthorized,CloseCode.SubprotocolNotAcceptable,CloseCode.SubscriberAlreadyExists,CloseCode.TooManyInitialisationRequests].includes($r.code)))throw $r;if(Pr)return!1;if(isLikeCloseEvent($r)&&$r.code===1e3)return mr>0;if(!er||Cr>=er||!ir($r)||rr!=null&&rr($r))throw $r;return Er=!0}s||(async()=>{for(mr++;;)try{const[,,$r]=await kr();await $r}catch($r){try{if(!Mr($r))return}catch(yr){return o==null?void 0:o(yr)}}})();function Ur($r,yr){const xr=sr($r);let gr=!1,_r=!1,wr=()=>{mr--,gr=!0};return(async()=>{for(mr++;;)try{const[Ir,Hr,Yr]=await kr();if(gr)return Hr();const Jr=dr.onMessage(xr,xi=>{switch(xi.type){case MessageType.Next:{yr.next(xi.payload);return}case MessageType.Error:{_r=!0,gr=!0,yr.error(xi.payload),wr();return}case MessageType.Complete:{gr=!0,wr();return}}});Ir.send(stringifyMessage({id:xr,type:MessageType.Subscribe,payload:$r},lr)),wr=()=>{!gr&&Ir.readyState===or.OPEN&&Ir.send(stringifyMessage({id:xr,type:MessageType.Complete},lr)),mr--,gr=!0,Hr()},await Yr.finally(Jr);return}catch(Ir){if(!Mr(Ir))return}})().then(()=>{_r||yr.complete()}).catch(Ir=>{yr.error(Ir)}),()=>{gr||wr()}}return{on:dr.on,subscribe:Ur,iterate($r){const yr=[],xr={done:!1,error:null,resolve:()=>{}},gr=Ur($r,{next(wr){yr.push(wr),xr.resolve()},error(wr){xr.done=!0,xr.error=wr,xr.resolve()},complete(){xr.done=!0,xr.resolve()}}),_r=function(){return __asyncGenerator(this,arguments,function*(){for(;;){for(yr.length||(yield __await(new Promise(Hr=>xr.resolve=Hr)));yr.length;)yield yield __await(yr.shift());if(xr.error)throw xr.error;if(xr.done)return yield __await(void 0)}})}();return _r.throw=async wr=>(xr.done||(xr.done=!0,xr.error=wr,xr.resolve()),{done:!0,value:void 0}),_r.return=async()=>(gr(),{done:!0,value:void 0}),_r},async dispose(){if(Pr=!0,pr){const[$r]=await pr;$r.close(1e3,"Normal Closure")}},terminate(){pr&&dr.emit("closed",new TerminatedCloseEvent)}}}
66class TerminatedCloseEvent extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function isLikeCloseEvent(t){return isObject$2(t)&&"code"in t&&"reason"in t}function isFatalInternalCloseCode(t){return[1e3,1001,1006,1005,1012,1013,1014].includes(t)?!1:t>=1e3&&t<=1999}function isWebSocket(t){return typeof t=="function"&&"constructor"in t&&"CLOSED"in t&&"CLOSING"in t&&"CONNECTING"in t&&"OPEN"in t}function createRestartableClient(t){let e=!1,r=()=>{e=!0};return{...createClient({...t,on:{...t.on,opened:o=>{var d,L;(L=(d=t.on)==null?void 0:d.opened)==null||L.call(d,o),r=()=>{o.readyState===WebSocket.OPEN?o.close(4205,"Client Restart"):e=!0},e&&(e=!1,r())}}}),restart:()=>r()}}const NuxtApollo={proxyCookies:!0,clientAwareness:!1,cookieAttributes:{maxAge:604800,secure:!0,sameSite:"lax"},clients:{default:{httpEndpoint:"https://graphql.prepr.io/bc4845c1a0cd0f6aa55ad2338395c23dbb45e0a8ea34b2c1a66e8571a6012173",defaultOptions:{},inMemoryCacheOptions:{},tokenName:"apollo:<client-name>.token",authType:"Bearer",authHeader:"Authorization",tokenStorage:"cookie"},asegment:{httpEndpoint:"https://graphql.prepr.io/bc4845c1a0cd0f6aa55ad2338395c23dbb45e0a8ea34b2c1a66e8571a6012173",defaultOptions:{},inMemoryCacheOptions:{},tokenName:"apollo:<client-name>.token",tokenStorage:"cookie",authType:"Bearer",authHeader:"Authorization"},bsegment:{httpEndpoint:"https://graphql.prepr.io/bc4845c1a0cd0f6aa55ad2338395c23dbb45e0a8ea34b2c1a66e8571a6012173",defaultOptions:{},inMemoryCacheOptions:{},tokenName:"apollo:<client-name>.token",tokenStorage:"cookie",authType:"Bearer",authHeader:"Authorization"}}};function useAsyncQuery(...t){const{key:e,fn:r,options:s}=prep(...t);return useAsyncData(e,r,s)}const prep=(...t)=>{var tr,ir,rr,nr,ar,sr,lr;const{clients:e}=useApollo();let r,s,o,d,L,ge={};if(typeof(t==null?void 0:t[0])=="object"&&"query"in t[0]?(r=(tr=t==null?void 0:t[0])==null?void 0:tr.query,s=(ir=t==null?void 0:t[0])==null?void 0:ir.variables,o=(rr=t==null?void 0:t[0])==null?void 0:rr.cache,L=(nr=t==null?void 0:t[0])==null?void 0:nr.context,d=(ar=t==null?void 0:t[0])==null?void 0:ar.clientId,typeof(t==null?void 0:t[1])=="object"&&(ge=t==null?void 0:t[1])):(r=t==null?void 0:t[0],s=t==null?void 0:t[1],d=t==null?void 0:t[2],L=t==null?void 0:t[3],typeof(t==null?void 0:t[4])=="object"&&(ge=t==null?void 0:t[4])),!r)throw new Error("@nuxtjs/apollo: no query provided");if((!d||!(e!=null&&e[d]))&&(d=e!=null&&e.default?"default":(sr=Object.keys(e))==null?void 0:sr[0],!d))throw new Error("@nuxtjs/apollo: no client found");return s&&(s=isRef(s)?s:reactive(s),ge.watch=ge.watch||[],ge.watch.push(s)),{key:((lr=t==null?void 0:t[0])==null?void 0:lr.key)||hash$1({query:print$1(r),variables:unref(s),clientId:d}),query:r,clientId:d,variables:s,fn:()=>{var cr;return(cr=e[d])==null?void 0:cr.query({query:r,variables:unref(s)||void 0,...o&&{fetchPolicy:"cache-first"},context:L}).then(ur=>ur.data)},options:ge}};function useApollo(){const t=useNuxtApp(),e=async s=>{var ge;s=s||"default";const o=(ge=NuxtApollo==null?void 0:NuxtApollo.clients)==null?void 0:ge[s];if(!o)return;const d=ref$2(null);if(await t.callHook("apollo:auth",{token:d,client:s}),d.value)return d.value;const L=o.tokenName;return(o==null?void 0:o.tokenStorage)==="cookie"?t.runWithContext(()=>useCookie(L).value):localStorage.getItem(L)||null},r=async({token:s,client:o,mode:d,skipResetStore:L})=>{var er,tr,ir;o=o||"default";const ge=(er=NuxtApollo==null?void 0:NuxtApollo.clients)==null?void 0:er[o];if(!ge)return;const Mt=o&&ge.tokenName;if((ge==null?void 0:ge.tokenStorage)==="cookie"){const rr=o&&(ge==null?void 0:ge.cookieAttributes)||(NuxtApollo==null?void 0:NuxtApollo.cookieAttributes),nr=useCookie(Mt,rr);if(!nr.value&&d==="logout")return;nr.value=d==="login"&&s||null}else(ge==null?void 0:ge.tokenStorage)==="localStorage"&&(d==="login"&&s?localStorage.setItem(Mt,s):d==="logout"&&localStorage.removeItem(Mt));(tr=t==null?void 0:t._apolloWsClients)!=null&&tr[o]&&t._apolloWsClients[o].restart(),!L&&await((ir=t==null?void 0:t._apolloClients)==null?void 0:ir[o].resetStore().catch(rr=>console.log("%cError on cache reset","color: orange;",rr.message)))};return{getToken:e,clients:t==null?void 0:t._apolloClients,onLogin:(s,o,d)=>r({token:s,client:o,skipResetStore:d,mode:"login"}),onLogout:(s,o)=>r({client:s,skipResetStore:o,mode:"logout"})}}const plugin_eTVJQYlCmx=defineNuxtPlugin(t=>{var o,d;const r={};for(const[L,ge]of Object.entries(NuxtApollo.clients)){const Mt=async()=>{var ur,or;const lr=ref$2(null);
66if(await t.callHook("apollo:auth",{token:lr,client:L}),!lr.value){if(ge.tokenStorage==="cookie"){const dr=useCookie(ge.tokenName).value;dr&&(lr.value=dr)}else ge.tokenStorage==="localStorage"&&(lr.value=localStorage.getItem(ge.tokenName));if(!lr.value)return}return!!((or=(ur=lr.value)==null?void 0:ur.match(/^[a-zA-Z]+\s/))!=null&&or[0])||(ge==null?void 0:ge.authType)===null?lr.value:`${ge==null?void 0:ge.authType} ${lr.value}`},tr=setContext(async(lr,{headers:cr})=>{const ur=await Mt();if(ur)return{headers:{...cr,[ge.authHeader]:ur}}}).concat(createHttpLink({...(ge==null?void 0:ge.httpLinkOptions)&&ge.httpLinkOptions,uri:ge.browserHttpEndpoint||ge.httpEndpoint,headers:{...((o=ge==null?void 0:ge.httpLinkOptions)==null?void 0:o.headers)||{}}}));let ir=null;if(ge.wsEndpoint){const lr=createRestartableClient({...ge.wsLinkOptions,url:ge.wsEndpoint,connectionParams:async()=>{const cr=await Mt();if(cr)return{headers:{[ge.authHeader]:cr}}}});ir=new GraphQLWsLink(lr),t._apolloWsClients=t._apolloWsClients||{},t._apolloWsClients[L]=lr}const rr=onError(lr=>{t.callHook("apollo:error",lr)}),nr=ApolloLink.from([rr,...ir?[...ge!=null&&ge.websocketsOnly?[ir]:[split(({query:lr})=>{const cr=getMainDefinition(lr);return cr.kind==="OperationDefinition"&&cr.operation==="subscription"},ir,tr)]]:[tr]]),ar=new InMemoryCache(ge.inMemoryCacheOptions);r[L]=new ApolloClient({link:nr,cache:ar,...NuxtApollo.clientAwareness,ssrForceFetchDelay:100,connectToDevTools:ge.connectToDevTools||!1,defaultOptions:ge==null?void 0:ge.defaultOptions}),!(r!=null&&r.default)&&!((d=NuxtApollo==null?void 0:NuxtApollo.clients)!=null&&d.default)&&L===Object.keys(NuxtApollo.clients)[0]&&(r.default=r[L]);const sr=`_apollo:${L}`;t.hook("app:rendered",()=>{t.payload.data[sr]=ar.extract()}),t.payload.data[sr]&&ar.restore(destr(JSON.stringify(t.payload.data[sr])))}t.vueApp.provide(ApolloClients,r),t.vueApp.use(createApolloProvider({defaultClient:r==null?void 0:r.default})),t._apolloClients=r;const s=r==null?void 0:r.default;return{provide:{apolloHelpers:useApollo(),apollo:{clients:r,defaultClient:s}}}}),chunk_reload_client_UciE0i6zes=defineNuxtPlugin({name:"nuxt:chunk-reload",setup(t){const e=useRouter$1(),r=useRuntimeConfig(),s=new Set;e.beforeEach(()=>{s.clear()}),t.hook("app:chunkError",({error:d})=>{s.add(d)});function o(d){const ge="href"in d&&d.href[0]==="#"?r.app.baseURL+d.href:joinURL(r.app.baseURL,d.fullPath);reloadNuxtApp({path:ge,persistState:!0})}t.hook("app:manifest:update",()=>{e.beforeResolve(o)}),e.onError((d,L)=>{s.has(d)&&o(L)})}});var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lottie={exports:{}};(function(module,exports){typeof navigator<"u"&&function(t,e){module.exports=e()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,s=t.length,o;for(r=0;r<s;r+=1){o=t[r].prototype;for(var d in o)Object.prototype.hasOwnProperty.call(o,d)&&(e.prototype[d]=o[d])}}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(r){this.audios.push(r)},pause:function(){var r,s=this.audios.length;for(r=0;r<s;r+=1)this.audios[r].pause()},resume:function(){var r,s=this.audios.length;for(r=0;r<s;r+=1)this.audios[r].resume()},setRate:function(r){var s,o=this.audios.length;for(s=0;s<o;s+=1)this.audios[s].setRate(r)},createAudio:function(r){return this.audioFactory?this.audioFactory(r):window.Howl?new window.Howl({src:[r]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(r){this.audioFactory=r},setVolume:function(r){this._volume=r,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var r,s=this.audios.length;for(r=0;r<s;r+=1)this.audios[r].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function t(r,s){var o=0,d=[],L;switch(r){case"int16":case"uint8c":L=1;break;default:L=1.1;break}for(o=0;o<s;o+=1)d.push(L);return d}function e(r,s){return r==="float32"?new Float32Array(s):r==="int16"?new Int16Array(s):r==="uint8c"?new Uint8ClampedArray(s):t(r,s)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?e:t}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(r){return typeof r}:_typeof$6=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$6(t)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var t=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],e,r=t.length;for(e=0;e<r;e+=1)BMMath[t[e]]=Math[t[e]]})(),BMMath.random=Math.random,BMMath.abs=function(t){var e=_typeof$6(t);if(e==="object"&&t.length){var r=createSizedArray(t.length),s,o=t.length;for(s=0;s<o;s+=1)r[s]=Math.abs(t[s]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,s){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=s<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,s){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=s<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}var createElementID=function(){var t=0;return function(){return t+=1,idPrefix$1+"__lottie_element_"+t}}();function HSVtoRGB(t,e,r){var s,o,d,L,ge,Mt,er,tr;switch(L=Math.floor(t*6),ge=t*6-L,Mt=r*(1-e),er=r*(1-ge*e),tr=r*(1-(1-ge)*e),L%6){case 0:s=r,o=tr,d=Mt;break;case 1:s=er,o=r,d=Mt;break;case 2:s=Mt,o=r,d=tr;break;case 3:s=Mt,o=er,d=r;break;case 4:s=tr,o=Mt,d=r;break;case 5:s=r,o=Mt,d=er;break}return[s,o,d]}function RGBtoHSV(t,e,r){var s=Math.max(t,e,r),o=Math.min(t,e,r),d=s-o,L,ge=s===0?0:d/s,Mt=s/255;switch(s){case o:L=0;break;case t:L=e-r+d*(e<r?6:0),L/=6*d;break;case e:L=r-t+d*2,L/=6*d;break;case r:L=t-e+d*4,L/=6*d;break}return[L,ge,Mt]}function addSaturationToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[1]+=e,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t=[],e,r;for(e=0;e<256;e+=1)r=e.toString(16),t[e]=r.length===1?"0"+r:r;return function(s,o,d){return s<0&&(s=0),o<0&&(o=0),d<0&&(d=0),"#"+t[s]+t[o]+t[d]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(r){return typeof r}:_typeof$5=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$5(t)}var dataManager=function(){var t=1,e=[],r,s,o={onmessage:function(){},postMessage:function(nr){r({data:nr})}},d={postMessage:function(nr){o.onmessage({data:nr})}};function L(rr){if(window.Worker&&window.Blob&&getWebWorker()){var nr=new Blob(["var _workerSelf = self;
66 self.onmessage = ",rr.toString()],{type:"text/javascript"}),ar=URL.createObjectURL(nr);return new Worker(ar)}return r=rr,o}function ge(){s||(s=L(function(nr){function ar(){function lr($r,yr){var xr,gr,_r=$r.length,wr,Ir,Hr,Yr;for(gr=0;gr<_r;gr+=1)if(xr=$r[gr],"ks"in xr&&!xr.completed){if(xr.completed=!0,xr.hasMask){var Jr=xr.masksProperties;for(Ir=Jr.length,wr=0;wr<Ir;wr+=1)if(Jr[wr].pt.k.i)hr(Jr[wr].pt.k);else for(Yr=Jr[wr].pt.k.length,Hr=0;Hr<Yr;Hr+=1)Jr[wr].pt.k[Hr].s&&hr(Jr[wr].pt.k[Hr].s[0]),Jr[wr].pt.k[Hr].e&&hr(Jr[wr].pt.k[Hr].e[0])}xr.ty===0?(xr.layers=or(xr.refId,yr),lr(xr.layers,yr)):xr.ty===4?dr(xr.shapes):xr.ty===5&&Mr(xr)}}function cr($r,yr){if($r){var xr=0,gr=$r.length;for(xr=0;xr<gr;xr+=1)$r[xr].t===1&&($r[xr].data.layers=or($r[xr].data.refId,yr),lr($r[xr].data.layers,yr))}}function ur($r,yr){for(var xr=0,gr=yr.length;xr<gr;){if(yr[xr].id===$r)return yr[xr];xr+=1}return null}function or($r,yr){var xr=ur($r,yr);return xr?xr.layers.__used?JSON.parse(JSON.stringify(xr.layers)):(xr.layers.__used=!0,xr.layers):null}function dr($r){var yr,xr=$r.length,gr,_r;for(yr=xr-1;yr>=0;yr-=1)if($r[yr].ty==="sh")if($r[yr].ks.k.i)hr($r[yr].ks.k);else for(_r=$r[yr].ks.k.length,gr=0;gr<_r;gr+=1)$r[yr].ks.k[gr].s&&hr($r[yr].ks.k[gr].s[0]),$r[yr].ks.k[gr].e&&hr($r[yr].ks.k[gr].e[0]);else $r[yr].ty==="gr"&&dr($r[yr].it)}function hr($r){var yr,xr=$r.i.length;for(yr=0;yr<xr;yr+=1)$r.i[yr][0]+=$r.v[yr][0],$r.i[yr][1]+=$r.v[yr][1],$r.o[yr][0]+=$r.v[yr][0],$r.o[yr][1]+=$r.v[yr][1]}function pr($r,yr){var xr=yr?yr.split("."):[100,100,100];return $r[0]>xr[0]?!0:xr[0]>$r[0]?!1:$r[1]>xr[1]?!0:xr[1]>$r[1]?!1:$r[2]>xr[2]?!0:xr[2]>$r[2]?!1:null}var mr=function(){var $r=[4,4,14];function yr(gr){var _r=gr.t.d;gr.t.d={k:[{s:_r,t:0}]}}function xr(gr){var _r,wr=gr.length;for(_r=0;_r<wr;_r+=1)gr[_r].ty===5&&yr(gr[_r])}return function(gr){if(pr($r,gr.v)&&(xr(gr.layers),gr.assets)){var _r,wr=gr.assets.length;for(_r=0;_r<wr;_r+=1)gr.assets[_r].layers&&xr(gr.assets[_r].layers)}}}(),vr=function(){var $r=[4,7,99];return function(yr){if(yr.chars&&!pr($r,yr.v)){var xr,gr=yr.chars.length;for(xr=0;xr<gr;xr+=1){var _r=yr.chars[xr];_r.data&&_r.data.shapes&&(dr(_r.data.shapes),_r.data.ip=0,_r.data.op=99999,_r.data.st=0,_r.data.sr=1,_r.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},yr.chars[xr].t||(_r.data.shapes.push({ty:"no"}),_r.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),Er=function(){var $r=[5,7,15];function yr(gr){var _r=gr.t.p;typeof _r.a=="number"&&(_r.a={a:0,k:_r.a}),typeof _r.p=="number"&&(_r.p={a:0,k:_r.p}),typeof _r.r=="number"&&(_r.r={a:0,k:_r.r})}function xr(gr){var _r,wr=gr.length;for(_r=0;_r<wr;_r+=1)gr[_r].ty===5&&yr(gr[_r])}return function(gr){if(pr($r,gr.v)&&(xr(gr.layers),gr.assets)){var _r,wr=gr.assets.length;for(_r=0;_r<wr;_r+=1)gr.assets[_r].layers&&xr(gr.assets[_r].layers)}}}(),Cr=function(){var $r=[4,1,9];function yr(gr){var _r,wr=gr.length,Ir,Hr;for(_r=0;_r<wr;_r+=1)if(gr[_r].ty==="gr")yr(gr[_r].it);else if(gr[_r].ty==="fl"||gr[_r].ty==="st")if(gr[_r].c.k&&gr[_r].c.k[0].i)for(Hr=gr[_r].c.k.length,Ir=0;Ir<Hr;Ir+=1)gr[_r].c.k[Ir].s&&(gr[_r].c.k[Ir].s[0]/=255,gr[_r].c.k[Ir].s[1]/=255,gr[_r].c.k[Ir].s[2]/=255,gr[_r].c.k[Ir].s[3]/=255),gr[_r].c.k[Ir].e&&(gr[_r].c.k[Ir].e[0]/=255,gr[_r].c.k[Ir].e[1]/=255,gr[_r].c.k[Ir].e[2]/=255,gr[_r].c.k[Ir].e[3]/=255);else gr[_r].c.k[0]/=255,gr[_r].c.k[1]/=255,gr[_r].c.k[2]/=255,gr[_r].c.k[3]/=255}function xr(gr){var _r,wr=gr.length;for(_r=0;_r<wr;_r+=1)gr[_r].ty===4&&yr(gr[_r].shapes)}return function(gr){if(pr($r,gr.v)&&(xr(gr.layers),gr.assets)){var _r,wr=gr.assets.length;for(_r=0;_r<wr;_r+=1)gr.assets[_r].layers&&xr(gr.assets[_r].layers)}}}(),Pr=function(){var $r=[4,4,18];function yr(gr){var _r,wr=gr.length,Ir,Hr;for(_r=wr-1;_r>=0;_r-=1)if(gr[_r].ty==="sh")if(gr[_r].ks.k.i)gr[_r].ks.k.c=gr[_r].closed;else for(Hr=gr[_r].ks.k.length,Ir=0;Ir<Hr;Ir+=1)gr[_r].ks.k[Ir].s&&(gr[_r].ks.k[Ir].s[0].c=gr[_r].closed),gr[_r].ks.k[Ir].e&&(gr[_r].ks.k[Ir].e[0].c=gr[_r].closed);else gr[_r].ty==="gr"&&yr(gr[_r].it)}function xr(gr){var _r,wr,Ir=gr.length,Hr,Yr,Jr,xi;for(wr=0;wr<Ir;wr+=1){if(_r=gr[wr],_r.hasMask){var di=_r.masksProperties;for(Yr=di.length,Hr=0;Hr<Yr;Hr+=1)if(di[Hr].pt.k.i)di[Hr].pt.k.c=di[Hr].cl;else for(xi=di[Hr].pt.k.length,Jr=0;Jr<xi;Jr+=1)di[Hr].pt.k[Jr].s&&(di[Hr].pt.k[Jr].s[0].c=di[Hr].cl),di[Hr].pt.k[Jr].e&&(di[Hr].pt.k[Jr].e[0].c=di[Hr].cl)}_r.ty===4&&yr(_r.shapes)}}
vendor: 171,581 bytes, lines 66-74
66return function(gr){if(pr($r,gr.v)&&(xr(gr.layers),gr.assets)){var _r,wr=gr.assets.length;for(_r=0;_r<wr;_r+=1)gr.assets[_r].layers&&xr(gr.assets[_r].layers)}}}();function kr($r){$r.__complete||(Cr($r),mr($r),vr($r),Er($r),Pr($r),lr($r.layers,$r.assets),cr($r.chars,$r.assets),$r.__complete=!0)}function Mr($r){$r.t.a.length===0&&"m"in $r.t.p}var Ur={};return Ur.completeData=kr,Ur.checkColors=Cr,Ur.checkChars=vr,Ur.checkPathProperties=Er,Ur.checkShapes=Pr,Ur.completeLayers=lr,Ur}if(d.dataManager||(d.dataManager=ar()),d.assetLoader||(d.assetLoader=function(){function lr(ur){var or=ur.getResponseHeader("content-type");return or&&ur.responseType==="json"&&or.indexOf("json")!==-1||ur.response&&_typeof$5(ur.response)==="object"?ur.response:ur.response&&typeof ur.response=="string"?JSON.parse(ur.response):ur.responseText?JSON.parse(ur.responseText):null}function cr(ur,or,dr,hr){var pr,mr=new XMLHttpRequest;try{mr.responseType="json"}catch{}mr.onreadystatechange=function(){if(mr.readyState===4)if(mr.status===200)pr=lr(mr),dr(pr);else try{pr=lr(mr),dr(pr)}catch(vr){hr&&hr(vr)}};try{mr.open(["G","E","T"].join(""),ur,!0)}catch{mr.open(["G","E","T"].join(""),or+"/"+ur,!0)}mr.send()}return{load:cr}}()),nr.data.type==="loadAnimation")d.assetLoader.load(nr.data.path,nr.data.fullPath,function(lr){d.dataManager.completeData(lr),d.postMessage({id:nr.data.id,payload:lr,status:"success"})},function(){d.postMessage({id:nr.data.id,status:"error"})});else if(nr.data.type==="complete"){var sr=nr.data.animation;d.dataManager.completeData(sr),d.postMessage({id:nr.data.id,payload:sr,status:"success"})}else nr.data.type==="loadData"&&d.assetLoader.load(nr.data.path,nr.data.fullPath,function(lr){d.postMessage({id:nr.data.id,payload:lr,status:"success"})},function(){d.postMessage({id:nr.data.id,status:"error"})})}),s.onmessage=function(rr){var nr=rr.data,ar=nr.id,sr=e[ar];e[ar]=null,nr.status==="success"?sr.onComplete(nr.payload):sr.onError&&sr.onError()})}function Mt(rr,nr){t+=1;var ar="processId_"+t;return e[ar]={onComplete:rr,onError:nr},ar}function er(rr,nr,ar){ge();var sr=Mt(nr,ar);s.postMessage({type:"loadAnimation",path:rr,fullPath:window.location.origin+window.location.pathname,id:sr})}function tr(rr,nr,ar){ge();var sr=Mt(nr,ar);s.postMessage({type:"loadData",path:rr,fullPath:window.location.origin+window.location.pathname,id:sr})}function ir(rr,nr,ar){ge();var sr=Mt(nr,ar);s.postMessage({type:"complete",animation:rr,id:sr})}return{loadAnimation:er,loadData:tr,completeAnimation:ir}}(),ImagePreloader=function(){var t=function(){var cr=createTag("canvas");cr.width=1,cr.height=1;var ur=cr.getContext("2d");return ur.fillStyle="rgba(0,0,0,0)",ur.fillRect(0,0,1,1),cr}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function s(cr,ur,or){var dr="";if(cr.e)dr=cr.p;else if(ur){var hr=cr.p;hr.indexOf("images/")!==-1&&(hr=hr.split("/")[1]),dr=ur+hr}else dr=or,dr+=cr.u?cr.u:"",dr+=cr.p;return dr}function o(cr){var ur=0,or=setInterval((function(){var dr=cr.getBBox();(dr.width||ur>500)&&(this._imageLoaded(),clearInterval(or)),ur+=1}).bind(this),50)}function d(cr){var ur=s(cr,this.assetsPath,this.path),or=createNS("image");isSafari?this.testImageLoaded(or):or.addEventListener("load",this._imageLoaded,!1),or.addEventListener("error",(function(){dr.img=t,this._imageLoaded()}).bind(this),!1),or.setAttributeNS("http://www.w3.org/1999/xlink","href",ur),this._elementHelper.append?this._elementHelper.append(or):this._elementHelper.appendChild(or);var dr={img:or,assetData:cr};return dr}function L(cr){var ur=s(cr,this.assetsPath,this.path),or=createTag("img");or.crossOrigin="anonymous",or.addEventListener("load",this._imageLoaded,!1),or.addEventListener("error",(function(){dr.img=t,this._imageLoaded()}).bind(this),!1),or.src=ur;var dr={img:or,assetData:cr};return dr}function ge(cr){var ur={assetData:cr},or=s(cr,this.assetsPath,this.path);return dataManager.loadData(or,(function(dr){ur.img=dr,this._footageLoaded()}).bind(this),(function(){ur.img={},this._footageLoaded()}).bind(this)),ur}function Mt(cr,ur){this.imagesLoadedCb=ur;var or,dr=cr.length;for(or=0;or<dr;or+=1)cr[or].layers||(!cr[or].t||cr[or].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(cr[or]))):cr[or].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(cr[or]))))}function er(cr){this.path=cr||""}function tr(cr){this.assetsPath=cr||""}function ir(cr){for(var ur=0,or=this.images.length;ur<or;){if(this.images[ur].assetData===cr)return this.images[ur].img;ur+=1}return null}function rr(){this.imagesLoadedCb=null,this.images.length=0}function nr(){return this.totalImages===this.loadedAssets}function ar(){return this.totalFootages===this.loadedFootagesCount}function sr(cr,ur){cr==="svg"?(this._elementHelper=ur,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function lr(){this._imageLoaded=e.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=o.bind(this),this.createFootageData=ge.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return lr.prototype={loadAssets:Mt,setAssetsPath:tr,setPath:er,loadedImages:nr,loadedFootages:ar,destroy:rr,getAsset:ir,createImgData:L,createImageData:d,imageLoaded:e,footageLoaded:r,setCacheType:sr},lr}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,r){if(this._cbs[e])for(var s=this._cbs[e],o=0;o<s.length;o+=1)s[o](r)},addEventListener:function(e,r){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(r),(function(){this.removeEventListener(e,r)}).bind(this)},removeEventListener:function(e,r){if(!r)this._cbs[e]=null;else if(this._cbs[e]){for(var s=0,o=this._cbs[e].length;s<o;)this._cbs[e][s]===r&&(this._cbs[e].splice(s,1),s-=1,o-=1),s+=1;this._cbs[e].length||(this._cbs[e]=null)}}};var markerParser=function(){function t(e){for(var r=e.split(`\r 67`),s={},o,d=0,L=0;L<r.length;L+=1)o=r[L].split(":"),o.length===2&&(s[o[0]]=o[1].trim(),d+=1);if(d===0)throw new Error;return s}return function(e){for(var r=[],s=0;s<e.length;s+=1){var o=e[s],d={time:o.tm,duration:o.dr};try{d.payload=JSON.parse(e[s].cm)}catch{try{d.payload=t(e[s].cm)}catch{d.payload={name:e[s].cm}}}r.push(d)}return r}}(),ProjectInterface=function(){function t(e){this.compositions.push(e)}return function(){function e(r){for(var s=0,o=this.compositions.length;s<o;){if(this.compositions[s].data&&this.compositions[s].data.nm===r)return this.compositions[s].prepareFrame&&this.compositions[s].data.xt&&this.compositions[s].prepareFrame(this.currentFrame),this.compositions[s].compInterface;s+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),renderers={},registerRenderer=function(e,r){renderers[e]=r};function getRenderer(t){return renderers[t]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var t in renderers)if(renderers[t])return t;return""}function _typeof$4(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function(r){return typeof r}:_typeof$4=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$4(t)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var r=getRenderer(e);this.renderer=new r(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,t.loop===""||t.loop===null||t.loop===void 0||t.loop===!0?this.loop=!0:t.loop===!1?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(t,"autoloadSegments")?t.autoloadSegments:!0,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(t.path.lastIndexOf("\\")!==-1?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&_typeof$4(e)!=="object"&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},s=t.attributes;r.path=s.getNamedItem("data-animation-path")?s.getNamedItem("data-animation-path").value:s.getNamedItem("data-bm-path")?s.getNamedItem("data-bm-path").value:s.getNamedItem("bm-path")?s.getNamedItem("bm-path").value:"",r.animType=s.getNamedItem("data-anim-type")?s.getNamedItem("data-anim-type").value:s.getNamedItem("data-bm-type")?s.getNamedItem("data-bm-type").value:s.getNamedItem("bm-type")?s.getNamedItem("bm-type").value:s.getNamedItem("data-bm-renderer")?s.getNamedItem("data-bm-renderer").value:s.getNamedItem("bm-renderer")?s.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var o=s.getNamedItem("data-anim-loop")?s.getNamedItem("data-anim-loop").value:s.getNamedItem("data-bm-loop")?s.getNamedItem("data-bm-loop").value:s.getNamedItem("bm-loop")?s.getNamedItem("bm-loop").value:"";o==="false"?r.loop=!1:o==="true"?r.loop=!0:o!==""&&(r.loop=parseInt(o,10));var d=s.getNamedItem("data-anim-autoplay")?s.getNamedItem("data-anim-autoplay").value:s.getNamedItem("data-bm-autoplay")?s.getNamedItem("data-bm-autoplay").value:s.getNamedItem("bm-autoplay")?s.getNamedItem("bm-autoplay").value:!0;r.autoplay=d!=="false",r.name=s.getNamedItem("data-name")?s.getNamedItem("data-name").value:s.getNamedItem("data-bm-name")?s.getNamedItem("data-bm-name").value:s.getNamedItem("bm-name")?s.getNamedItem("bm-name").value:"";var L=s.getNamedItem("data-anim-prerender")?s.getNamedItem("data-anim-prerender").value:s.getNamedItem("data-bm-prerender")?s.getNamedItem("data-bm-prerender").value:s.getNamedItem("bm-prerender")?s.getNamedItem("bm-prerender").value:"";L==="false"&&(r.prerender=!1),r.path?this.setParams(r):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e=this.animationData.layers,r,s=e.length,o=t.layers,d,L=o.length;for(d=0;d<L;d+=1)for(r=0;r<s;){if(e[r].id===o[d].id){e[r]=o[d];break}r+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(s=t.assets.length,r=0;r<s;r+=1)this.animationData.assets.push(t.assets[r]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||t.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(t,e){var r=typeof t=="number"?t:void 0,s=typeof e=="number"?e:void 0;this.renderer.updateContainerSize(r,s)},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if(e=this.markers[r],e.payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!(r&&this.name!==r)){var s=Number(t);if(isNaN(s)){var o=this.getMarkerData(t);o&&this.goToAndStop(o.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!(r&&this.name!==r)){var s=Number(t);if(isNaN(s)){var o=this.getMarkerData(t);o&&(o.duration?this.playSegments([o.time,o.time+o.duration],!0):this.goToAndStop(o.time,!0))}else this.goToAndStop(s,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!(this.isPaused===!0||this.isLoaded===!1)){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):e<0?this.checkSegments(e%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(r=!0,e=0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,r!==-1&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),_typeof$4(t[0])==="object"){var r,s=t.length;for(r=0;r<s;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return this.segments.length?(this.adjustSegment(this.segments.shift(),t),!0):!1},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(t){this.loop=t},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;r.indexOf("images/")!==-1&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(t,e,r){try{var s=this.renderer.getElementByPath(t);s.updateDocumentData(e,r)}catch{}},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(t,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}t==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),t==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),t==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),t==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),t==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},e=[],r=0,s=0,o=0,d=!0,L=!1;function ge(yr){for(var xr=0,gr=yr.target;xr<s;)e[xr].animation===gr&&(e.splice(xr,1),xr-=1,s-=1,gr.isPaused||ir()),xr+=1}function Mt(yr,xr){if(!yr)return null;for(var gr=0;gr<s;){if(e[gr].elem===yr&&e[gr].elem!==null)return e[gr].animation;gr+=1}var _r=new AnimationItem;return rr(_r,yr),_r.setData(yr,xr),_r}function er(){var yr,xr=e.length,gr=[];for(yr=0;yr<xr;yr+=1)gr.push(e[yr].animation);return gr}function tr(){o+=1,Cr()}function ir(){o-=1}function rr(yr,xr){yr.addEventListener("destroy",ge),yr.addEventListener("_active",tr),yr.addEventListener("_idle",ir),e.push({elem:xr,animation:yr}),s+=1}function nr(yr){var xr=new AnimationItem;return rr(xr,null),xr.setParams(yr),xr}function ar(yr,xr){var gr;for(gr=0;gr<s;gr+=1)e[gr].animation.setSpeed(yr,xr)}function sr(yr,xr){var gr;for(gr=0;gr<s;gr+=1)e[gr].animation.setDirection(yr,xr)}function lr(yr){var xr;for(xr=0;xr<s;xr+=1)e[xr].animation.play(yr)}function cr(yr){var xr=yr-r,gr;for(gr=0;gr<s;gr+=1)e[gr].animation.advanceTime(xr);r=yr,o&&!L?window.requestAnimationFrame(cr):d=!0}function ur(yr){r=yr,window.requestAnimationFrame(cr)}function or(yr){var xr;for(xr=0;xr<s;xr+=1)e[xr].animation.pause(yr)}function dr(yr,xr,gr){var _r;for(_r=0;_r<s;_r+=1)e[_r].animation.goToAndStop(yr,xr,gr)}function hr(yr){var xr;for(xr=0;xr<s;xr+=1)e[xr].animation.stop(yr)}function pr(yr){var xr;for(xr=0;xr<s;xr+=1)e[xr].animation.togglePause(yr)}function mr(yr){var xr;for(xr=s-1;xr>=0;xr-=1)e[xr].animation.destroy(yr)}function vr(yr,xr,gr){var _r=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),wr,Ir=_r.length;for(wr=0;wr<Ir;wr+=1)gr&&_r[wr].setAttribute("data-bm-type",gr),Mt(_r[wr],yr);if(xr&&Ir===0){gr||(gr="svg");var Hr=document.getElementsByTagName("body")[0];Hr.innerText="";var Yr=createTag("div");Yr.style.width="100%",Yr.style.height="100%",Yr.setAttribute("data-bm-type",gr),Hr.appendChild(Yr),Mt(Yr,yr)}}function Er(){var yr;for(yr=0;yr<s;yr+=1)e[yr].animation.resize()}function Cr(){!L&&o&&d&&(window.requestAnimationFrame(ur),d=!1)}function Pr(){L=!0}function kr(){L=!1,Cr()}function Mr(yr,xr){var gr;for(gr=0;gr<s;gr+=1)e[gr].animation.setVolume(yr,xr)}function Ur(yr){var xr;for(xr=0;xr<s;xr+=1)e[xr].animation.mute(yr)}function $r(yr){var xr;for(xr=0;xr<s;xr+=1)e[xr].animation.unmute(yr)}return t.registerAnimation=Mt,t.loadAnimation=nr,t.setSpeed=ar,t.setDirection=sr,t.play=lr,t.pause=or,t.stop=hr,t.togglePause=pr,t.searchAnimations=vr,t.resize=Er,t.goToAndStop=dr,t.destroy=mr,t.freeze=Pr,t.unfreeze=kr,t.setVolume=Mr,t.mute=Ur,t.unmute=$r,t.getRegisteredAnimations=er,t}(),BezierFactory=function(){var t={};t.getBezierEasing=r;var e={};function r(ur,or,dr,hr,pr){var mr=pr||("bez_"+ur+"_"+or+"_"+dr+"_"+hr).replace(/\./g,"p");if(e[mr])return e[mr];var vr=new cr([ur,or,dr,hr]);return e[mr]=vr,vr}var s=4,o=.001,d=1e-7,L=10,ge=11,Mt=1/(ge-1),er=typeof Float32Array=="function";function tr(ur,or){return 1-3*or+3*ur}function ir(ur,or){return 3*or-6*ur}function rr(ur){return 3*ur}function nr(ur,or,dr){return((tr(or,dr)*ur+ir(or,dr))*ur+rr(or))*ur}function ar(ur,or,dr){return 3*tr(or,dr)*ur*ur+2*ir(or,dr)*ur+rr(or)}function sr(ur,or,dr,hr,pr){var mr,vr,Er=0;do vr=or+(dr-or)/2,mr=nr(vr,hr,pr)-ur,mr>0?dr=vr:or=vr;while(Math.abs(mr)>d&&++Er<L);return vr}function lr(ur,or,dr,hr){for(var pr=0;pr<s;++pr){var mr=ar(or,dr,hr);if(mr===0)return or;var vr=nr(or,dr,hr)-ur;or-=vr/mr}return or}function cr(ur){this._p=ur,this._mSampleValues=er?new Float32Array(ge):new Array(ge),this._precomputed=!1,this.get=this.get.bind(this)}return cr.prototype={get:function(or){var dr=this._p[0],hr=this._p[1],pr=this._p[2],mr=this._p[3];return this._precomputed||this._precompute(),dr===hr&&pr===mr?or:or===0?0:or===1?1:nr(this._getTForX(or),hr,mr)},_precompute:function(){var or=this._p[0],dr=this._p[1],hr=this._p[2],pr=this._p[3];this._precomputed=!0,(or!==dr||hr!==pr)&&this._calcSampleValues()},_calcSampleValues:function(){for(var or=this._p[0],dr=this._p[2],hr=0;hr<ge;++hr)this._mSampleValues[hr]=nr(hr*Mt,or,dr)},_getTForX:function(or){for(var dr=this._p[0],hr=this._p[2],pr=this._mSampleValues,mr=0,vr=1,Er=ge-1;vr!==Er&&pr[vr]<=or;++vr)mr+=Mt;--vr;var Cr=(or-pr[vr])/(pr[vr+1]-pr[vr]),Pr=mr+Cr*Mt,kr=ar(Pr,dr,hr);return kr>=o?lr(or,Pr,dr,hr):kr===0?Pr:sr(or,mr,mr+Mt,dr,hr)}},t}(),pooling=function(){function t(e){return e.concat(createSizedArray(e.length))}return{double:t}}(),poolFactory=function(){return function(t,e,r){var s=0,o=t,d=createSizedArray(o),L={newElement:ge,release:Mt};function ge(){var er;return s?(s-=1,er=d[s]):er=e(),er}function Mt(er){s===o&&(d=pooling.double(d),o*=2),r&&r(er),d[s]=er,s+=1}return L}}(),bezierLengthPool=function(){function t(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,t)}(),segmentsLengthPool=function(){function t(){return{lengths:[],totalLength:0}}function e(r){var s,o=r.lengths.length;for(s=0;s<o;s+=1)bezierLengthPool.release(r.lengths[s]);r.lengths.length=0}return poolFactory(8,t,e)}();function bezFunction(){var t=Math;function e(rr,nr,ar,sr,lr,cr){var ur=rr*sr+nr*lr+ar*cr-lr*sr-cr*rr-ar*nr;return ur>-.001&&ur<.001}function r(rr,nr,ar,sr,lr,cr,ur,or,dr){if(ar===0&&cr===0&&dr===0)return e(rr,nr,sr,lr,ur,or);var hr=t.sqrt(t.pow(sr-rr,2)+t.pow(lr-nr,2)+t.pow(cr-ar,2)),pr=t.sqrt(t.pow(ur-rr,2)+t.pow(or-nr,2)+t.pow(dr-ar,2)),mr=t.sqrt(t.pow(ur-sr,2)+t.pow(or-lr,2)+t.pow(dr-cr,2)),vr;return hr>pr?hr>mr?vr=hr-pr-mr:vr=mr-pr-hr:mr>pr?vr=mr-pr-hr:vr=pr-hr-mr,vr>-1e-4&&vr<1e-4}var s=function(){return function(rr,nr,ar,sr){var lr=getDefaultCurveSegments(),cr,ur,or,dr,hr,pr=0,mr,vr=[],Er=[],Cr=bezierLengthPool.newElement();for(or=ar.length,cr=0;cr<lr;cr+=1){for(hr=cr/(lr-1),mr=0,ur=0;ur<or;ur+=1)dr=bmPow(1-hr,3)*rr[ur]+3*bmPow(1-hr,2)*hr*ar[ur]+3*(1-hr)*bmPow(hr,2)*sr[ur]+bmPow(hr,3)*nr[ur],vr[ur]=dr,Er[ur]!==null&&(mr+=bmPow(vr[ur]-Er[ur],2)),Er[ur]=vr[ur];mr&&(mr=bmSqrt(mr),pr+=mr),Cr.percents[cr]=hr,Cr.lengths[cr]=pr}return Cr.addedLength=pr,Cr}}();function o(rr){var nr=segmentsLengthPool.newElement(),ar=rr.c,sr=rr.v,lr=rr.o,cr=rr.i,ur,or=rr._length,dr=nr.lengths,hr=0;for(ur=0;ur<or-1;ur+=1)dr[ur]=s(sr[ur],sr[ur+1],lr[ur],cr[ur+1]),hr+=dr[ur].addedLength;return ar&&or&&(dr[ur]=s(sr[ur],sr[0],lr[ur],cr[0]),hr+=dr[ur].addedLength),nr.totalLength=hr,nr}function d(rr){this.segmentLength=0,this.points=new Array(rr)}function L(rr,nr){this.partialLength=rr,this.point=nr}var ge=function(){var rr={};return function(nr,ar,sr,lr){var cr=(nr[0]+"_"+nr[1]+"_"+ar[0]+"_"+ar[1]+"_"+sr[0]+"_"+sr[1]+"_"+lr[0]+"_"+lr[1]).replace(/\./g,"p");if(!rr[cr]){var ur=getDefaultCurveSegments(),or,dr,hr,pr,mr,vr=0,Er,Cr,Pr=null;nr.length===2&&(nr[0]!==ar[0]||nr[1]!==ar[1])&&e(nr[0],nr[1],ar[0],ar[1],nr[0]+sr[0],nr[1]+sr[1])&&e(nr[0],nr[1],ar[0],ar[1],ar[0]+lr[0],ar[1]+lr[1])&&(ur=2);var kr=new d(ur);for(hr=sr.length,or=0;or<ur;or+=1){for(Cr=createSizedArray(hr),mr=or/(ur-1),Er=0,dr=0;dr<hr;dr+=1)pr=bmPow(1-mr,3)*nr[dr]+3*bmPow(1-mr,2)*mr*(nr[dr]+sr[dr])+3*(1-mr)*bmPow(mr,2)*(ar[dr]+lr[dr])+bmPow(mr,3)*ar[dr],Cr[dr]=pr,Pr!==null&&(Er+=bmPow(Cr[dr]-Pr[dr],2));Er=bmSqrt(Er),vr+=Er,kr.points[or]=new L(Er,Cr),Pr=Cr}kr.segmentLength=vr,rr[cr]=kr}return rr[cr]}}();function Mt(rr,nr){var ar=nr.percents,sr=nr.lengths,lr=ar.length,cr=bmFloor((lr-1)*rr),ur=rr*nr.addedLength,or=0;if(cr===lr-1||cr===0||ur===sr[cr])return ar[cr];for(var dr=sr[cr]>ur?-1:1,hr=!0;hr;)if(sr[cr]<=ur&&sr[cr+1]>ur?(or=(ur-sr[cr])/(sr[cr+1]-sr[cr]),hr=!1):cr+=dr,cr<0||cr>=lr-1){if(cr===lr-1)return ar[cr];hr=!1}return ar[cr]+(ar[cr+1]-ar[cr])*or}function er(rr,nr,ar,sr,lr,cr){var ur=Mt(lr,cr),or=1-ur,dr=t.round((or*or*or*rr[0]+(ur*or*or+or*ur*or+or*or*ur)*ar[0]+(ur*ur*or+or*ur*ur+ur*or*ur)*sr[0]+ur*ur*ur*nr[0])*1e3)/1e3,hr=t.round((or*or*or*rr[1]+(ur*or*or+or*ur*or+or*or*ur)*ar[1]+(ur*ur*or+or*ur*ur+ur*or*ur)*sr[1]+ur*ur*ur*nr[1])*1e3)/1e3;return[dr,hr]}var tr=createTypedArray("float32",8);function ir(rr,nr,ar,sr,lr,cr,ur){lr<0?lr=0:lr>1&&(lr=1);var or=Mt(lr,ur);cr=cr>1?1:cr;var dr=Mt(cr,ur),hr,pr=rr.length,mr=1-or,vr=1-dr,Er=mr*mr*mr,Cr=or*mr*mr*3,Pr=or*or*mr*3,kr=or*or*or,Mr=mr*mr*vr,Ur=or*mr*vr+mr*or*vr+mr*mr*dr,$r=or*or*vr+mr*or*dr+or*mr*dr,yr=or*or*dr,xr=mr*vr*vr,gr=or*vr*vr+mr*dr*vr+mr*vr*dr,_r=or*dr*vr+mr*dr*dr+or*vr*dr,wr=or*dr*dr,Ir=vr*vr*vr,Hr=dr*vr*vr+vr*dr*vr+vr*vr*dr,Yr=dr*dr*vr+vr*dr*dr+dr*vr*dr,Jr=dr*dr*dr;for(hr=0;hr<pr;hr+=1)tr[hr*4]=t.round((Er*rr[hr]+Cr*ar[hr]+Pr*sr[hr]+kr*nr[hr])*1e3)/1e3,tr[hr*4+1]=t.round((Mr*rr[hr]+Ur*ar[hr]+$r*sr[hr]+yr*nr[hr])*1e3)/1e3,tr[hr*4+2]=t.round((xr*rr[hr]+gr*ar[hr]+_r*sr[hr]+wr*nr[hr])*1e3)/1e3,tr[hr*4+3]=t.round((Ir*rr[hr]+Hr*ar[hr]+Yr*sr[hr]+Jr*nr[hr])*1e3)/1e3;return tr}return{getSegmentsLength:o,getNewSegment:ir,getPointInSegment:er,buildBezierData:ge,pointOnLine2D:e,pointOnLine3D:r}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(t,e){var r=this.offsetTime,s;this.propType==="multidimensional"&&(s=createTypedArray("float32",this.pv.length));for(var o=e.lastIndex,d=o,L=this.keyframes.length-1,ge=!0,Mt,er,tr;ge;){if(Mt=this.keyframes[d],er=this.keyframes[d+1],d===L-1&&t>=er.t-r){Mt.h&&(Mt=er),o=0;break}if(er.t-r>t){o=d;break}d<L-1?d+=1:(o=0,ge=!1)}tr=this.keyframesMetadata[d]||{};var ir,rr,nr,ar,sr,lr,cr=er.t-r,ur=Mt.t-r,or;if(Mt.to){tr.bezierData||(tr.bezierData=bez.buildBezierData(Mt.s,er.s||Mt.e,Mt.to,Mt.ti));var dr=tr.bezierData;if(t>=cr||t<ur){var hr=t>=cr?dr.points.length-1:0;for(rr=dr.points[hr].point.length,ir=0;ir<rr;ir+=1)s[ir]=dr.points[hr].point[ir]}else{tr.__fnct?lr=tr.__fnct:(lr=BezierFactory.getBezierEasing(Mt.o.x,Mt.o.y,Mt.i.x,Mt.i.y,Mt.n).get,tr.__fnct=lr),nr=lr((t-ur)/(cr-ur));var pr=dr.segmentLength*nr,mr,vr=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastAddedLength:0;for(sr=e.lastFrame<t&&e._lastKeyframeIndex===d?e._lastPoint:0,ge=!0,ar=dr.points.length;ge;){if(vr+=dr.points[sr].partialLength,pr===0||nr===0||sr===dr.points.length-1){for(rr=dr.points[sr].point.length,ir=0;ir<rr;ir+=1)s[ir]=dr.points[sr].point[ir];break}else if(pr>=vr&&pr<vr+dr.points[sr+1].partialLength){for(mr=(pr-vr)/dr.points[sr+1].partialLength,rr=dr.points[sr].point.length,ir=0;ir<rr;ir+=1)s[ir]=dr.points[sr].point[ir]+(dr.points[sr+1].point[ir]-dr.points[sr].point[ir])*mr;break}sr<ar-1?sr+=1:ge=!1}e._lastPoint=sr,e._lastAddedLength=vr-dr.points[sr].partialLength,e._lastKeyframeIndex=d}}else{var Er,Cr,Pr,kr,Mr;if(L=Mt.s.length,or=er.s||Mt.e,this.sh&&Mt.h!==1)if(t>=cr)s[0]=or[0],s[1]=or[1],s[2]=or[2];else if(t<=ur)s[0]=Mt.s[0],s[1]=Mt.s[1],s[2]=Mt.s[2];else{var Ur=createQuaternion(Mt.s),$r=createQuaternion(or),yr=(t-ur)/(cr-ur);quaternionToEuler(s,slerp(Ur,$r,yr))}else for(d=0;d<L;d+=1)Mt.h!==1&&(t>=cr?nr=1:t<ur?nr=0:(Mt.o.x.constructor===Array?(tr.__fnct||(tr.__fnct=[]),tr.__fnct[d]?lr=tr.__fnct[d]:(Er=Mt.o.x[d]===void 0?Mt.o.x[0]:Mt.o.x[d],Cr=Mt.o.y[d]===void 0?Mt.o.y[0]:Mt.o.y[d],Pr=Mt.i.x[d]===void 0?Mt.i.x[0]:Mt.i.x[d],kr=Mt.i.y[d]===void 0?Mt.i.y[0]:Mt.i.y[d],lr=BezierFactory.getBezierEasing(Er,Cr,Pr,kr).get,tr.__fnct[d]=lr)):tr.__fnct?lr=tr.__fnct:(Er=Mt.o.x,Cr=Mt.o.y,Pr=Mt.i.x,kr=Mt.i.y,lr=BezierFactory.getBezierEasing(Er,Cr,Pr,kr).get,Mt.keyframeMetadata=lr),nr=lr((t-ur)/(cr-ur)))),or=er.s||Mt.e,Mr=Mt.h===1?Mt.s[d]:Mt.s[d]+(or[d]-Mt.s[d])*nr,this.propType==="multidimensional"?s[d]=Mr:s=Mr}return e.lastIndex=o,s}function slerp(t,e,r){var s=[],o=t[0],d=t[1],L=t[2],ge=t[3],Mt=e[0],er=e[1],tr=e[2],ir=e[3],rr,nr,ar,sr,lr;return nr=o*Mt+d*er+L*tr+ge*ir,nr<0&&(nr=-nr,Mt=-Mt,er=-er,tr=-tr,ir=-ir),1-nr>1e-6?(rr=Math.acos(nr),ar=Math.sin(rr),sr=Math.sin((1-r)*rr)/ar,lr=Math.sin(r*rr)/ar):(sr=1-r,lr=r),s[0]=sr*o+lr*Mt,s[1]=sr*d+lr*er,s[2]=sr*L+lr*tr,s[3]=sr*ge+lr*ir,s}function quaternionToEuler(t,e){var r=e[0],s=e[1],o=e[2],d=e[3],L=Math.atan2(2*s*d-2*r*o,1-2*s*s-2*o*o),ge=Math.asin(2*r*s+2*o*d),Mt=Math.atan2(2*r*d-2*s*o,1-2*r*r-2*o*o);t[0]=L/degToRads,t[1]=ge/degToRads,t[2]=Mt/degToRads}function createQuaternion(t){var e=t[0]*degToRads,r=t[1]*degToRads,s=t[2]*degToRads,o=Math.cos(e/2),d=Math.cos(r/2),L=Math.cos(s/2),ge=Math.sin(e/2),Mt=Math.sin(r/2),er=Math.sin(s/2),tr=o*d*L-ge*Mt*er,ir=ge*Mt*L+o*d*er,rr=ge*d*L+o*Mt*er,nr=o*Mt*L-ge*d*er;return[ir,rr,nr,tr]}function getValueAtCurrentTime(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=r&&t>=r||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var s=this.interpolateValue(t,this._caching);this.pv=s}return this._caching.lastFrame=t,this.pv}function setVValue(t){var e;if(this.propType==="unidimensional")e=t*this.mult,mathAbs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var r=0,s=this.v.length;r<s;)e=t[r]*this.mult,mathAbs(this.v[r]-e)>1e-5&&(this.v[r]=e,this._mdf=!0),r+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var t,e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)r=this.effectsSequence[t](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function ValueProperty(t,e,r,s){this.propType="unidimensional",this.mult=r||1,this.data=e,this.v=r?e.k*r:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=s,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(t,e,r,s){this.propType="multidimensional",this.mult=r||1,this.data=e,this._mdf=!1,this.elem=t,this.container=s,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var o,d=e.k.length;for(this.v=createTypedArray("float32",d),this.pv=createTypedArray("float32",d),this.vel=createTypedArray("float32",d),o=0;o<d;o+=1)this.v[o]=e.k[o]*this.mult,this.pv[o]=e.k[o];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(t,e,r,s){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=r||1,this.elem=t,this.container=s,this.comp=t.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(t,e,r,s){this.propType="multidimensional";var o,d=e.k.length,L,ge,Mt,er;for(o=0;o<d-1;o+=1)e.k[o].to&&e.k[o].s&&e.k[o+1]&&e.k[o+1].s&&(L=e.k[o].s,ge=e.k[o+1].s,Mt=e.k[o].to,er=e.k[o].ti,(L.length===2&&!(L[0]===ge[0]&&L[1]===ge[1])&&bez.pointOnLine2D(L[0],L[1],ge[0],ge[1],L[0]+Mt[0],L[1]+Mt[1])&&bez.pointOnLine2D(L[0],L[1],ge[0],ge[1],ge[0]+er[0],ge[1]+er[1])||L.length===3&&!(L[0]===ge[0]&&L[1]===ge[1]&&L[2]===ge[2])&&bez.pointOnLine3D(L[0],L[1],L[2],ge[0],ge[1],ge[2],L[0]+Mt[0],L[1]+Mt[1],L[2]+Mt[2])&&bez.pointOnLine3D(L[0],L[1],L[2],ge[0],ge[1],ge[2],ge[0]+er[0],ge[1]+er[1],ge[2]+er[2]))&&(e.k[o].to=null,e.k[o].ti=null),L[0]===ge[0]&&L[1]===ge[1]&&Mt[0]===0&&Mt[1]===0&&er[0]===0&&er[1]===0&&(L.length===2||L[2]===ge[2]&&Mt[2]===0&&er[2]===0)&&(e.k[o].to=null,e.k[o].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=t,this.container=s,this.comp=t.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var tr=e.k[0].s.length;for(this.v=createTypedArray("float32",tr),this.pv=createTypedArray("float32",tr),o=0;o<tr;o+=1)this.v[o]=initFrame,this.pv[o]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",tr)},this.addEffect=addEffect}var PropertyFactory=function(){function t(r,s,o,d,L){s.sid&&(s=r.globalData.slotManager.getProp(s));var ge;if(!s.k.length)ge=new ValueProperty(r,s,d,L);else if(typeof s.k[0]=="number")ge=new MultiDimensionalProperty(r,s,d,L);else switch(o){case 0:ge=new KeyframedValueProperty(r,s,d,L);break;case 1:ge=new KeyframedMultidimensionalProperty(r,s,d,L);break}return ge.effectsSequence.length&&L.addDynamicProperty(ge),ge}var e={getProp:t};return e}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var e,r=this.dynamicProperties.length;for(e=0;e<r;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function t(){return createTypedArray("float32",2)}return poolFactory(8,t)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,s,o){var d;switch(this._length=Math.max(this._length,s+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":d=this.v;break;case"i":d=this.i;break;case"o":d=this.o;break;default:d=[];break}(!d[s]||d[s]&&!o)&&(d[s]=pointPool.newElement()),d[s][0]=t,d[s][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,s,o,d,L,ge){this.setXYAt(t,e,"v",L,ge),this.setXYAt(r,s,"o",L,ge),this.setXYAt(o,d,"i",L,ge)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,s=this.i,o=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],s[0][0],s[0][1],r[0][0],r[0][1],0,!1),o=1);var d=this._length-1,L=this._length,ge;for(ge=o;ge<L;ge+=1)t.setTripleAt(e[d][0],e[d][1],s[d][0],s[d][1],r[d][0],r[d][1],ge,!1),d-=1;return t},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function t(){return new ShapePath}function e(o){var d=o._length,L;for(L=0;L<d;L+=1)pointPool.release(o.v[L]),pointPool.release(o.i[L]),pointPool.release(o.o[L]),o.v[L]=null,o.i[L]=null,o.o[L]=null;o._length=0,o.c=!1}function r(o){var d=s.newElement(),L,ge=o._length===void 0?o.v.length:o._length;for(d.setLength(ge),d.c=o.c,L=0;L<ge;L+=1)d.setTripleAt(o.v[L][0],o.v[L][1],o.o[L][0],o.o[L][1],o.i[L][0],o.i[L][1],L);return d}var s=poolFactory(4,t,e);return s.clone=r,s}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=function(){var t={newShapeCollection:o,release:d},e=0,r=4,s=createSizedArray(r);function o(){var L;return e?(e-=1,L=s[e]):L=new ShapeCollection,L}function d(L){var ge,Mt=L._length;for(ge=0;ge<Mt;ge+=1)shapePool.release(L.shapes[ge]);L._length=0,e===r&&(s=pooling.double(s),r*=2),s[e]=L,e+=1}return t}(),ShapePropertyFactory=function(){var t=-999999;function e(cr,ur,or){var dr=or.lastIndex,hr,pr,mr,vr,Er,Cr,Pr,kr,Mr,Ur=this.keyframes;if(cr<Ur[0].t-this.offsetTime)hr=Ur[0].s[0],mr=!0,dr=0;else if(cr>=Ur[Ur.length-1].t-this.offsetTime)hr=Ur[Ur.length-1].s?Ur[Ur.length-1].s[0]:Ur[Ur.length-2].e[0],mr=!0;else{for(var $r=dr,yr=Ur.length-1,xr=!0,gr,_r,wr;xr&&(gr=Ur[$r],_r=Ur[$r+1],!(_r.t-this.offsetTime>cr));)$r<yr-1?$r+=1:xr=!1;if(wr=this.keyframesMetadata[$r]||{},mr=gr.h===1,dr=$r,!mr){if(cr>=_r.t-this.offsetTime)kr=1;else if(cr<gr.t-this.offsetTime)kr=0;else{var Ir;wr.__fnct?Ir=wr.__fnct:(Ir=BezierFactory.getBezierEasing(gr.o.x,gr.o.y,gr.i.x,gr.i.y).get,wr.__fnct=Ir),kr=Ir((cr-(gr.t-this.offsetTime))/(_r.t-this.offsetTime-(gr.t-this.offsetTime)))}pr=_r.s?_r.s[0]:gr.e[0]}hr=gr.s[0]}for(Cr=ur._length,Pr=hr.i[0].length,or.lastIndex=dr,vr=0;vr<Cr;vr+=1)for(Er=0;Er<Pr;Er+=1)Mr=mr?hr.i[vr][Er]:hr.i[vr][Er]+(pr.i[vr][Er]-hr.i[vr][Er])*kr,ur.i[vr][Er]=Mr,Mr=mr?hr.o[vr][Er]:hr.o[vr][Er]+(pr.o[vr][Er]-hr.o[vr][Er])*kr,ur.o[vr][Er]=Mr,Mr=mr?hr.v[vr][Er]:hr.v[vr][Er]+(pr.v[vr][Er]-hr.v[vr][Er])*kr,ur.v[vr][Er]=Mr}function r(){var cr=this.comp.renderedFrame-this.offsetTime,ur=this.keyframes[0].t-this.offsetTime,or=this.keyframes[this.keyframes.length-1].t-this.offsetTime,dr=this._caching.lastFrame;return dr!==t&&(dr<ur&&cr<ur||dr>or&&cr>or)||(this._caching.lastIndex=dr<cr?this._caching.lastIndex:0,this.interpolateShape(cr,this.pv,this._caching)),this._caching.lastFrame=cr,this.pv}function s(){this.paths=this.localShapeCollection}function o(cr,ur){if(cr._length!==ur._length||cr.c!==ur.c)return!1;var or,dr=cr._length;for(or=0;or<dr;or+=1)if(cr.v[or][0]!==ur.v[or][0]||cr.v[or][1]!==ur.v[or][1]||cr.o[or][0]!==ur.o[or][0]||cr.o[or][1]!==ur.o[or][1]||cr.i[or][0]!==ur.i[or][0]||cr.i[or][1]!==ur.i[or][1])return!1;return!0}function d(cr){o(this.v,cr)||(this.v=shapePool.clone(cr),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function L(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var cr;this.kf?cr=this.pv:this.data.ks?cr=this.data.ks.k:cr=this.data.pt.k;var ur,or=this.effectsSequence.length;for(ur=0;ur<or;ur+=1)cr=this.effectsSequence[ur](cr);this.setVValue(cr),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function ge(cr,ur,or){this.propType="shape",this.comp=cr.comp,this.container=cr,this.elem=cr,this.data=ur,this.k=!1,this.kf=!1,this._mdf=!1;var dr=or===3?ur.pt.k:ur.ks.k;this.v=shapePool.clone(dr),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=s,this.effectsSequence=[]}function Mt(cr){this.effectsSequence.push(cr),this.container.addDynamicProperty(this)}ge.prototype.interpolateShape=e,ge.prototype.getValue=L,ge.prototype.setVValue=d,ge.prototype.addEffect=Mt;function er(cr,ur,or){this.propType="shape",this.comp=cr.comp,this.elem=cr,this.container=cr,this.offsetTime=cr.data.st,this.keyframes=or===3?ur.pt.k:ur.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var dr=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,dr),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=s,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[r.bind(this)]}er.prototype.getValue=L,er.prototype.interpolateShape=e,er.prototype.setVValue=d,er.prototype.addEffect=Mt;var tr=function(){var cr=roundCorner;function ur(or,dr){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=dr.d,this.elem=or,this.comp=or.comp,this.frameId=-1,this.initDynamicPropertyContainer(or),this.p=PropertyFactory.getProp(or,dr.p,1,0,this),this.s=PropertyFactory.getProp(or,dr.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return ur.prototype={reset:s,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var dr=this.p.v[0],hr=this.p.v[1],pr=this.s.v[0]/2,mr=this.s.v[1]/2,vr=this.d!==3,Er=this.v;Er.v[0][0]=dr,Er.v[0][1]=hr-mr,Er.v[1][0]=vr?dr+pr:dr-pr,Er.v[1][1]=hr,Er.v[2][0]=dr,Er.v[2][1]=hr+mr,Er.v[3][0]=vr?dr-pr:dr+pr,Er.v[3][1]=hr,Er.i[0][0]=vr?dr-pr*cr:dr+pr*cr,Er.i[0][1]=hr-mr,Er.i[1][0]=vr?dr+pr:dr-pr,Er.i[1][1]=hr-mr*cr,Er.i[2][0]=vr?dr+pr*cr:dr-pr*cr,Er.i[2][1]=hr+mr,Er.i[3][0]=vr?dr-pr:dr+pr,Er.i[3][1]=hr+mr*cr,Er.o[0][0]=vr?dr+pr*cr:dr-pr*cr,Er.o[0][1]=hr-mr,Er.o[1][0]=vr?dr+pr:dr-pr,Er.o[1][1]=hr+mr*cr,Er.o[2][0]=vr?dr-pr*cr:dr+pr*cr,Er.o[2][1]=hr+mr,Er.o[3][0]=vr?dr-pr:dr+pr,Er.o[3][1]=hr-mr*cr}},extendPrototype([DynamicPropertyContainer],ur),ur}(),ir=function(){function cr(ur,or){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=ur,this.comp=ur.comp,this.data=or,this.frameId=-1,this.d=or.d,this.initDynamicPropertyContainer(ur),or.sy===1?(this.ir=PropertyFactory.getProp(ur,or.ir,0,0,this),this.is=PropertyFactory.getProp(ur,or.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(ur,or.pt,0,0,this),this.p=PropertyFactory.getProp(ur,or.p,1,0,this),this.r=PropertyFactory.getProp(ur,or.r,0,degToRads,this),this.or=PropertyFactory.getProp(ur,or.or,0,0,this),this.os=PropertyFactory.getProp(ur,or.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return cr.prototype={reset:s,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var or=Math.floor(this.pt.v)*2,dr=Math.PI*2/or,hr=!0,pr=this.or.v,mr=this.ir.v,vr=this.os.v,Er=this.is.v,Cr=2*Math.PI*pr/(or*2),Pr=2*Math.PI*mr/(or*2),kr,Mr,Ur,$r,yr=-Math.PI/2;yr+=this.r.v;var xr=this.data.d===3?-1:1;for(this.v._length=0,kr=0;kr<or;kr+=1){Mr=hr?pr:mr,Ur=hr?vr:Er,$r=hr?Cr:Pr;var gr=Mr*Math.cos(yr),_r=Mr*Math.sin(yr),wr=gr===0&&_r===0?0:_r/Math.sqrt(gr*gr+_r*_r),Ir=gr===0&&_r===0?0:-gr/Math.sqrt(gr*gr+_r*_r);gr+=+this.p.v[0],_r+=+this.p.v[1],this.v.setTripleAt(gr,_r,gr-wr*$r*Ur*xr,_r-Ir*$r*Ur*xr,gr+wr*$r*Ur*xr,_r+Ir*$r*Ur*xr,kr,!0),hr=!hr,yr+=dr*xr}},convertPolygonToPath:function(){var or=Math.floor(this.pt.v),dr=Math.PI*2/or,hr=this.or.v,pr=this.os.v,mr=2*Math.PI*hr/(or*4),vr,Er=-Math.PI*.5,Cr=this.data.d===3?-1:1;for(Er+=this.r.v,this.v._length=0,vr=0;vr<or;vr+=1){var Pr=hr*Math.cos(Er),kr=hr*Math.sin(Er),Mr=Pr===0&&kr===0?0:kr/Math.sqrt(Pr*Pr+kr*kr),Ur=Pr===0&&kr===0?0:-Pr/Math.sqrt(Pr*Pr+kr*kr);Pr+=+this.p.v[0],kr+=+this.p.v[1],this.v.setTripleAt(Pr,kr,Pr-Mr*mr*pr*Cr,kr-Ur*mr*pr*Cr,Pr+Mr*mr*pr*Cr,kr+Ur*mr*pr*Cr,vr,!0),Er+=dr*Cr}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],cr),cr}(),rr=function(){function cr(ur,or){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=ur,this.comp=ur.comp,this.frameId=-1,this.d=or.d,this.initDynamicPropertyContainer(ur),this.p=PropertyFactory.getProp(ur,or.p,1,0,this),this.s=PropertyFactory.getProp(ur,or.s,1,0,this),this.r=PropertyFactory.getProp(ur,or.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return cr.prototype={convertRectToPath:function(){var or=this.p.v[0],dr=this.p.v[1],hr=this.s.v[0]/2,pr=this.s.v[1]/2,mr=bmMin(hr,pr,this.r.v),vr=mr*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(or+hr,dr-pr+mr,or+hr,dr-pr+mr,or+hr,dr-pr+vr,0,!0),this.v.setTripleAt(or+hr,dr+pr-mr,or+hr,dr+pr-vr,or+hr,dr+pr-mr,1,!0),mr!==0?(this.v.setTripleAt(or+hr-mr,dr+pr,or+hr-mr,dr+pr,or+hr-vr,dr+pr,2,!0),this.v.setTripleAt(or-hr+mr,dr+pr,or-hr+vr,dr+pr,or-hr+mr,dr+pr,3,!0),this.v.setTripleAt(or-hr,dr+pr-mr,or-hr,dr+pr-mr,or-hr,dr+pr-vr,4,!0),this.v.setTripleAt(or-hr,dr-pr+mr,or-hr,dr-pr+vr,or-hr,dr-pr+mr,5,!0),this.v.setTripleAt(or-hr+mr,dr-pr,or-hr+mr,dr-pr,or-hr+vr,dr-pr,6,!0),this.v.setTripleAt(or+hr-mr,dr-pr,or+hr-vr,dr-pr,or+hr-mr,dr-pr,7,!0)):(this.v.setTripleAt(or-hr,dr+pr,or-hr+vr,dr+pr,or-hr,dr+pr,2),this.v.setTripleAt(or-hr,dr-pr,or-hr,dr-pr+vr,or-hr,dr-pr,3))):(this.v.setTripleAt(or+hr,dr-pr+mr,or+hr,dr-pr+vr,or+hr,dr-pr+mr,0,!0),mr!==0?(this.v.setTripleAt(or+hr-mr,dr-pr,or+hr-mr,dr-pr,or+hr-vr,dr-pr,1,!0),this.v.setTripleAt(or-hr+mr,dr-pr,or-hr+vr,dr-pr,or-hr+mr,dr-pr,2,!0),this.v.setTripleAt(or-hr,dr-pr+mr,or-hr,dr-pr+mr,or-hr,dr-pr+vr,3,!0),this.v.setTripleAt(or-hr,dr+pr-mr,or-hr,dr+pr-vr,or-hr,dr+pr-mr,4,!0),this.v.setTripleAt(or-hr+mr,dr+pr,or-hr+mr,dr+pr,or-hr+vr,dr+pr,5,!0),this.v.setTripleAt(or+hr-mr,dr+pr,or+hr-vr,dr+pr,or+hr-mr,dr+pr,6,!0),this.v.setTripleAt(or+hr,dr+pr-mr,or+hr,dr+pr-mr,or+hr,dr+pr-vr,7,!0)):(this.v.setTripleAt(or-hr,dr-pr,or-hr+vr,dr-pr,or-hr,dr-pr,1,!0),this.v.setTripleAt(or-hr,dr+pr,or-hr,dr+pr-vr,or-hr,dr+pr,2,!0),this.v.setTripleAt(or+hr,dr+pr,or+hr-vr,dr+pr,or+hr,dr+pr,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:s},extendPrototype([DynamicPropertyContainer],cr),cr}();function nr(cr,ur,or){var dr;if(or===3||or===4){var hr=or===3?ur.pt:ur.ks,pr=hr.k;pr.length?dr=new er(cr,ur,or):dr=new ge(cr,ur,or)}else or===5?dr=new rr(cr,ur):or===6?dr=new tr(cr,ur):or===7&&(dr=new ir(cr,ur));return dr.k&&cr.addDynamicProperty(dr),dr}function ar(){return ge}function sr(){return er}var lr={};return lr.getShapeProp=nr,lr.getConstructorFunction=ar,lr.getKeyframedConstructorFunction=sr,lr}();/*! 68 Transformation Matrix v2.0 69 (c) Epistemex 2014-2015 70 www.epistemex.com 71 By Ken Fyrstenberg 72 Contributions by leeoniya. 73 License: MIT, header required. 74 */var Matrix=function(){var t=Math.cos,e=Math.sin,r=Math.tan,s=Math.round;function o(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function d(gr){if(gr===0)return this;var _r=t(gr),wr=e(gr);return this._t(_r,-wr,0,0,wr,_r,0,0,0,0,1,0,0,0,0,1)}function L(gr){if(gr===0)return this;var _r=t(gr),wr=e(gr);return this._t(1,0,0,0,0,_r,-wr,0,0,wr,_r,0,0,0,0,1)}function ge(gr){if(gr===0)return this;var _r=t(gr),wr=e(gr);return this._t(_r,0,wr,0,0,1,0,0,-wr,0,_r,0,0,0,0,1)}function Mt(gr){if(gr===0)return this;var _r=t(gr),wr=e(gr);return this._t(_r,-wr,0,0,wr,_r,0,0,0,0,1,0,0,0,0,1)}function er(gr,_r){return this._t(1,_r,gr,1,0,0)}function tr(gr,_r){return this.shear(r(gr),r(_r))}function ir(gr,_r){var wr=t(_r),Ir=e(_r);return this._t(wr,Ir,0,0,-Ir,wr,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(gr),1,0,0,0,0,1,0,0,0,0,1)._t(wr,-Ir,0,0,Ir,wr,0,0,0,0,1,0,0,0,0,1)}function rr(gr,_r,wr){return!wr&&wr!==0&&(wr=1),gr===1&&_r===1&&wr===1?this:this._t(gr,0,0,0,0,_r,0,0,0,0,wr,0,0,0,0,1)}function nr(gr,_r,wr,Ir,Hr,Yr,Jr,xi,di,Vr,Zr,Qr,Ai,Mi,Dr,Lr){return this.props[0]=gr,this.props[1]=_r,this.props[2]=wr,this.props[3]=Ir,this.props[4]=Hr,this.props[5]=Yr,this.props[6]=Jr,this.props[7]=xi,this.props[8]=di,this.props[9]=Vr,this.props[10]=Zr,this.props[11]=Qr,this.props[12]=Ai,this.props[13]=Mi,this.props[14]=Dr,this.props[15]=Lr,this}function ar(gr,_r,wr){return wr=wr||0,gr!==0||_r!==0||wr!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,gr,_r,wr,1):this}function sr(gr,_r,wr,Ir,Hr,Yr,Jr,xi,di,Vr,Zr,Qr,Ai,Mi,Dr,Lr){var Nr=this.props;if(gr===1&&_r===0&&wr===0&&Ir===0&&Hr===0&&Yr===1&&Jr===0&&xi===0&&di===0&&Vr===0&&Zr===1&&Qr===0)return Nr[12]=Nr[12]*gr+Nr[15]*Ai,Nr[13]=Nr[13]*Yr+Nr[15]*Mi,Nr[14]=Nr[14]*Zr+Nr[15]*Dr,Nr[15]*=Lr,this._identityCalculated=!1,this;var Wr=Nr[0],qr=Nr[1],Fr=Nr[2],Ti=Nr[3],Xr=Nr[4],Si=Nr[5],jr=Nr[6],wi=Nr[7],ki=Nr[8],Ii=Nr[9],Pi=Nr[10],Di=Nr[11],Oi=Nr[12],Wi=Nr[13],Zi=Nr[14],en=Nr[15];return Nr[0]=Wr*gr+qr*Hr+Fr*di+Ti*Ai,Nr[1]=Wr*_r+qr*Yr+Fr*Vr+Ti*Mi,Nr[2]=Wr*wr+qr*Jr+Fr*Zr+Ti*Dr,Nr[3]=Wr*Ir+qr*xi+Fr*Qr+Ti*Lr,Nr[4]=Xr*gr+Si*Hr+jr*di+wi*Ai,Nr[5]=Xr*_r+Si*Yr+jr*Vr+wi*Mi,Nr[6]=Xr*wr+Si*Jr+jr*Zr+wi*Dr,Nr[7]=Xr*Ir+Si*xi+jr*Qr+wi*Lr,Nr[8]=ki*gr+Ii*Hr+Pi*di+Di*Ai,Nr[9]=ki*_r+Ii*Yr+Pi*Vr+Di*Mi,Nr[10]=ki*wr+Ii*Jr+Pi*Zr+Di*Dr,Nr[11]=ki*Ir+Ii*xi+Pi*Qr+Di*Lr,Nr[12]=Oi*gr+Wi*Hr+Zi*di+en*Ai,Nr[13]=Oi*_r+Wi*Yr+Zi*Vr+en*Mi,Nr[14]=Oi*wr+Wi*Jr+Zi*Zr+en*Dr,Nr[15]=Oi*Ir+Wi*xi+Zi*Qr+en*Lr,this._identityCalculated=!1,this}function lr(gr){var _r=gr.props;return this.transform(_r[0],_r[1],_r[2],_r[3],_r[4],_r[5],_r[6],_r[7],_r[8],_r[9],_r[10],_r[11],_r[12],_r[13],_r[14],_r[15])}function cr(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function ur(gr){for(var _r=0;_r<16;){if(gr.props[_r]!==this.props[_r])return!1;_r+=1}return!0}function or(gr){var _r;for(_r=0;_r<16;_r+=1)gr.props[_r]=this.props[_r];return gr}function dr(gr){var _r;for(_r=0;_r<16;_r+=1)this.props[_r]=gr[_r]}function hr(gr,_r,wr){return{x:gr*this.props[0]+_r*this.props[4]+wr*this.props[8]+this.props[12],y:gr*this.props[1]+_r*this.props[5]+wr*this.props[9]+this.props[13],z:gr*this.props[2]+_r*this.props[6]+wr*this.props[10]+this.props[14]}}function pr(gr,_r,wr){return gr*this.props[0]+_r*this.props[4]+wr*this.props[8]+this.props[12]}function mr(gr,_r,wr){return gr*this.props[1]+_r*this.props[5]+wr*this.props[9]+this.props[13]}function vr(gr,_r,wr){return gr*this.props[2]+_r*this.props[6]+wr*this.props[10]+this.props[14]}function Er(){var gr=this.props[0]*this.props[5]-this.props[1]*this.props[4],_r=this.props[5]/gr,wr=-this.props[1]/gr,Ir=-this.props[4]/gr,Hr=this.props[0]/gr,Yr=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/gr,Jr=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/gr,xi=new Matrix;return xi.props[0]=_r,xi.props[1]=wr,xi.props[4]=Ir,xi.props[5]=Hr,xi.props[12]=Yr,xi.props[13]=Jr,xi}function Cr(gr){var _r=this.getInverseMatrix();return _r.applyToPointArray(gr[0],gr[1],gr[2]||0)}function Pr(gr){var _r,wr=gr.length,Ir=[];for(_r=0;_r<wr;_r+=1)Ir[_r]=Cr(gr[_r]);return Ir}function kr(gr,_r,wr){var Ir=createTypedArray("float32",6);if(this.isIdentity())Ir[0]=gr[0],Ir[1]=gr[1],Ir[2]=_r[0],Ir[3]=_r[1],Ir[4]=wr[0],Ir[5]=wr[1];else{var Hr=this.props[0],Yr=this.props[1],Jr=this.props[4],xi=this.props[5],di=this.props[12],Vr=this.props[13];Ir[0]=gr[0]*Hr+gr[1]*Jr+di,Ir[1]=gr[0]*Yr+gr[1]*xi+Vr,Ir[2]=_r[0]*Hr+_r[1]*Jr+di,Ir[3]=_r[0]*Yr+_r[1]*xi+Vr,Ir[4]=wr[0]*Hr+wr[1]*Jr+di,Ir[5]=wr[0]*Yr+wr[1]*xi+Vr}return Ir}function Mr(gr,_r,wr){var Ir;return this.isIdentity()?Ir=[gr,_r,wr]:Ir=[gr*this.props[0]+_r*this.props[4]+wr*this.props[8]+this.props[12],gr*this.props[1]+_r*this.props[5]+wr*this.props[9]+this.props[13],gr*this.props[2]+_r*this.props[6]+wr*this.props[10]+this.props[14]],Ir}function Ur(gr,_r){if(this.isIdentity())return gr+","+_r;var wr=this.props;return Math.round((gr*wr[0]+_r*wr[4]+wr[12])*100)/100+","+Math.round((gr*wr[1]+_r*wr[5]+wr[13])*100)/100}function $r(){for(var gr=0,_r=this.props,wr="matrix3d(",Ir=1e4;gr<16;)wr+=s(_r[gr]*Ir)/Ir,wr+=gr===15?")":",",gr+=1;return wr}function yr(gr){var _r=1e4;return gr<1e-6&&gr>0||gr>-1e-6&&gr<0?s(gr*_r)/_r:gr}function xr(){var gr=this.props,_r=yr(gr[0]),wr=yr(gr[1]),Ir=yr(gr[4]),Hr=yr(gr[5]),Yr=yr(gr[12]),Jr=yr(gr[13]);return"matrix("+_r+","+wr+","+Ir+","+Hr+","+Yr+","+Jr+")"}return function(){this.reset=o,this.rotate=d,this.rotateX=L,this.rotateY=ge,this.rotateZ=Mt,this.skew=tr,this.skewFromAxis=ir,this.shear=er,this.scale=rr,this.setTransform=nr,this.translate=ar,this.transform=sr,this.multiply=lr,this.applyToPoint=hr,this.applyToX=pr,this.applyToY=mr,this.applyToZ=vr,this.applyToPointArray=Mr,this.applyToTriplePoints=kr,this.applyToPointStringified=Ur,this.toCSS=$r,this.to2dCSS=xr,this.clone=or,this.cloneFromProps=dr,this.equals=ur,this.inversePoints=Pr,this.inversePoint=Cr,this.getInverseMatrix=Er,this._t=this.transform,this.isIdentity=cr,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(r){return typeof r}:_typeof$3=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$3(t)}var lottie={};function setLocation(t){setLocationHref(t)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return animationManager.loadAnimation(t)}function setQuality(t){if(typeof t=="string")switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t)}function inBrowser(){return typeof navigator<"u"}function installPlugin(t,e){t==="expressions"&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var s=e[r].split("=");if(decodeURIComponent(s[0])==t)return decodeURIComponent(s[1])}return null}var queryString="";{var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)!=="object"&&(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=function(){var t={},e={};t.registerModifier=r,t.getModifier=s;function r(o,d){e[o]||(e[o]=d)}function s(o,d,L){return new e[o](d,L)}return t}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,s,o){var d=[];e<=1?d.push({s:t,e}):t>=1?d.push({s:t-1,e:e-1}):(d.push({s:t,e:1}),d.push({s:0,e:e-1}));var L=[],ge,Mt=d.length,er;for(ge=0;ge<Mt;ge+=1)if(er=d[ge],!(er.e*o<s||er.s*o>s+r)){var tr,ir;er.s*o<=s?tr=0:tr=(er.s*o-s)/r,er.e*o>=s+r?ir=1:ir=(er.e*o-s)/r,L.push([tr,ir])}return L.length||L.push([0,0]),L},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r;if(this._mdf||t){var s=this.o.v%360/360;if(s<0&&(s+=1),this.s.v>1?e=1+s:this.s.v<0?e=0+s:e=this.s.v+s,this.e.v>1?r=1+s:this.e.v<0?r=0+s:r=this.e.v+s,e>r){var o=e;e=r,r=o}e=Math.round(e*1e4)*1e-4,r=Math.round(r*1e4)*1e-4,this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var d,L,ge=this.shapes.length,Mt,er,tr,ir,rr,nr=0;if(r===e)for(L=0;L<ge;L+=1)this.shapes[L].localShapeCollection.releaseShapes(),this.shapes[L].shape._mdf=!0,this.shapes[L].shape.paths=this.shapes[L].localShapeCollection,this._mdf&&(this.shapes[L].pathsData.length=0);else if(r===1&&e===0||r===0&&e===1){if(this._mdf)for(L=0;L<ge;L+=1)this.shapes[L].pathsData.length=0,this.shapes[L].shape._mdf=!0}else{var ar=[],sr,lr;for(L=0;L<ge;L+=1)if(sr=this.shapes[L],!sr.shape._mdf&&!this._mdf&&!t&&this.m!==2)sr.shape.paths=sr.localShapeCollection;else{if(d=sr.shape.paths,er=d._length,rr=0,!sr.shape._mdf&&sr.pathsData.length)rr=sr.totalShapeLength;else{for(tr=this.releasePathsData(sr.pathsData),Mt=0;Mt<er;Mt+=1)ir=bez.getSegmentsLength(d.shapes[Mt]),tr.push(ir),rr+=ir.totalLength;sr.totalShapeLength=rr,sr.pathsData=tr}nr+=rr,sr.shape._mdf=!0}var cr=e,ur=r,or=0,dr;for(L=ge-1;L>=0;L-=1)if(sr=this.shapes[L],sr.shape._mdf){for(lr=sr.localShapeCollection,lr.releaseShapes(),this.m===2&&ge>1?(dr=this.calculateShapeEdges(e,r,sr.totalShapeLength,or,nr),or+=sr.totalShapeLength):dr=[[cr,ur]],er=dr.length,Mt=0;Mt<er;Mt+=1){cr=dr[Mt][0],ur=dr[Mt][1],ar.length=0,ur<=1?ar.push({s:sr.totalShapeLength*cr,e:sr.totalShapeLength*ur}):cr>=1?ar.push({s:sr.totalShapeLength*(cr-1),e:sr.totalShapeLength*(ur-1)}):(ar.push({s:sr.totalShapeLength*cr,e:sr.totalShapeLength}),ar.push({s:0,e:sr.totalShapeLength*(ur-1)}));var hr=this.addShapes(sr,ar[0]);if(ar[0].s!==ar[0].e){if(ar.length>1){var pr=sr.shape.paths.shapes[sr.shape.paths._length-1];if(pr.c){var mr=hr.pop();this.addPaths(hr,lr),hr=this.addShapes(sr,ar[1],mr)}else this.addPaths(hr,lr),hr=this.addShapes(sr,ar[1])}this.addPaths(hr,lr)}}sr.shape.paths=lr}}},TrimModifier.prototype.addPaths=function(t,e){var r,s=t.length;for(r=0;r<s;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,s,o,d,L){o.setXYAt(e[0],e[1],"o",d),o.setXYAt(r[0],r[1],"i",d+1),L&&o.setXYAt(t[0],t[1],"v",d),o.setXYAt(s[0],s[1],"v",d+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,s){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),s&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var s=t.pathsData,o=t.shape.paths.shapes,d,L=t.shape.paths._length,ge,Mt,er=0,tr,ir,rr,nr,ar=[],sr,lr=!0;for(r?(ir=r._length,sr=r._length):(r=shapePool.newElement(),ir=0,sr=0),ar.push(r),d=0;d<L;d+=1){for(rr=s[d].lengths,r.c=o[d].c,Mt=o[d].c?rr.length:rr.length+1,ge=1;ge<Mt;ge+=1)if(tr=rr[ge-1],er+tr.addedLength<e.s)er+=tr.addedLength,r.c=!1;else if(er>e.e){r.c=!1;break}else e.s<=er&&e.e>=er+tr.addedLength?(this.addSegment(o[d].v[ge-1],o[d].o[ge-1],o[d].i[ge],o[d].v[ge],r,ir,lr),lr=!1):(nr=bez.getNewSegment(o[d].v[ge-1],o[d].v[ge],o[d].o[ge-1],o[d].i[ge],(e.s-er)/tr.addedLength,(e.e-er)/tr.addedLength,rr[ge-1]),this.addSegmentFromArray(nr,r,ir,lr),lr=!1,r.c=!1),er+=tr.addedLength,ir+=1;if(o[d].c&&rr.length){if(tr=rr[ge-1],er<=e.e){var cr=rr[ge-1].addedLength;e.s<=er&&e.e>=er+cr?(this.addSegment(o[d].v[ge-1],o[d].o[ge-1],o[d].i[0],o[d].v[0],r,ir,lr),lr=!1):(nr=bez.getNewSegment(o[d].v[ge-1],o[d].v[0],o[d].o[ge-1],o[d].i[0],(e.s-er)/cr,(e.e-er)/cr,rr[ge-1]),this.addSegmentFromArray(nr,r,ir,lr),lr=!1,r.c=!1)}else r.c=!1;er+=tr.addedLength,ir+=1}if(r._length&&(r.setXYAt(r.v[sr][0],r.v[sr][1],"i",sr),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),er>e.e)break;d<L-1&&(r=shapePool.newElement(),lr=!0,ar.push(r),ir=0)}return ar};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,s=[0,0],o=t._length,d=0;for(d=0;d<o;d+=1)s[0]+=t.v[d][0],s[1]+=t.v[d][1];s[0]/=o,s[1]/=o;var L=shapePool.newElement();L.c=t.c;var ge,Mt,er,tr,ir,rr;for(d=0;d<o;d+=1)ge=t.v[d][0]+(s[0]-t.v[d][0])*r,Mt=t.v[d][1]+(s[1]-t.v[d][1])*r,er=t.o[d][0]+(s[0]-t.o[d][0])*-r,tr=t.o[d][1]+(s[1]-t.o[d][1])*-r,ir=t.i[d][0]+(s[0]-t.i[d][0])*-r,rr=t.i[d][1]+(s[1]-t.i[d][1])*-r,L.setTripleAt(ge,Mt,er,tr,ir,rr,d);return L},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,s=this.shapes.length,o,d,L=this.amount.v;if(L!==0){var ge,Mt;for(r=0;r<s;r+=1){if(ge=this.shapes[r],Mt=ge.localShapeCollection,!(!ge.shape._mdf&&!this._mdf&&!t))for(Mt.releaseShapes(),ge.shape._mdf=!0,e=ge.shape.paths.shapes,d=ge.shape.paths._length,o=0;o<d;o+=1)Mt.addShape(this.processPath(e[o],L));ge.shape.paths=ge.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var t=[0,0];function e(Mt){var er=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||er,this.a&&Mt.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&Mt.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&Mt.skewFromAxis(-this.sk.v,this.sa.v),this.r?Mt.rotate(-this.r.v):Mt.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?Mt.translate(this.px.v,this.py.v,-this.pz.v):Mt.translate(this.px.v,this.py.v,0):Mt.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function r(Mt){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||Mt){var er;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var tr,ir;if(er=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(tr=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/er,0),ir=this.p.getValueAtTime(this.p.keyframes[0].t/er,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(tr=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/er,0),ir=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/er,0)):(tr=this.p.pv,ir=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/er,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){tr=[],ir=[];var rr=this.px,nr=this.py;rr._caching.lastFrame+rr.offsetTime<=rr.keyframes[0].t?(tr[0]=rr.getValueAtTime((rr.keyframes[0].t+.01)/er,0),tr[1]=nr.getValueAtTime((nr.keyframes[0].t+.01)/er,0),ir[0]=rr.getValueAtTime(rr.keyframes[0].t/er,0),ir[1]=nr.getValueAtTime(nr.keyframes[0].t/er,0)):rr._caching.lastFrame+rr.offsetTime>=rr.keyframes[rr.keyframes.length-1].t?(tr[0]=rr.getValueAtTime(rr.keyframes[rr.keyframes.length-1].t/er,0),tr[1]=nr.getValueAtTime(nr.keyframes[nr.keyframes.length-1].t/er,0),ir[0]=rr.getValueAtTime((rr.keyframes[rr.keyframes.length-1].t-.01)/er,0),ir[1]=nr.getValueAtTime((nr.keyframes[nr.keyframes.length-1].t-.01)/er,0)):(tr=[rr.pv,nr.pv],ir[0]=rr.getValueAtTime((rr._caching.lastFrame+rr.offsetTime-.01)/er,rr.offsetTime),ir[1]=nr.getValueAtTime((nr._caching.lastFrame+nr.offsetTime-.01)/er,nr.offsetTime))}else ir=t,tr=ir;this.v.rotate(-Math.atan2(tr[1]-ir[1],tr[0]-ir[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function s(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function o(){}function d(Mt){this._addDynamicProperty(Mt),this.elem.addDynamicProperty(Mt),this._isDirty=!0}function L(Mt,er,tr){if(this.elem=Mt,this.frameId=-1,this.propType="transform",this.data=er,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(tr||Mt),er.p&&er.p.s?(this.px=PropertyFactory.getProp(Mt,er.p.x,0,0,this),this.py=PropertyFactory.getProp(Mt,er.p.y,0,0,this),er.p.z&&(this.pz=PropertyFactory.getProp(Mt,er.p.z,0,0,this))):this.p=PropertyFactory.getProp(Mt,er.p||{k:[0,0,0]},1,0,this),er.rx){if(this.rx=PropertyFactory.getProp(Mt,er.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(Mt,er.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(Mt,er.rz,0,degToRads,this),er.or.k[0].ti){var ir,rr=er.or.k.length;for(ir=0;ir<rr;ir+=1)er.or.k[ir].to=null,er.or.k[ir].ti=null}this.or=PropertyFactory.getProp(Mt,er.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(Mt,er.r||{k:0},0,degToRads,this);er.sk&&(this.sk=PropertyFactory.getProp(Mt,er.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(Mt,er.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(Mt,er.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(Mt,er.s||{k:[100,100,100]},1,.01,this),er.o?this.o=PropertyFactory.getProp(Mt,er.o,0,.01,Mt):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}L.prototype={applyToMatrix:e,getValue:r,precalculateMatrix:s,autoOrient:o},extendPrototype([DynamicPropertyContainer],L),L.prototype.addDynamicProperty=d,L.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function ge(Mt,er,tr){return new L(Mt,er,tr)}return{getTransformProperty:ge}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,s,o,d){var L=d?-1:1,ge=s.s.v[0]+(1-s.s.v[0])*(1-o),Mt=s.s.v[1]+(1-s.s.v[1])*(1-o);t.translate(s.p.v[0]*L*o,s.p.v[1]*L*o,s.p.v[2]),e.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),e.rotate(-s.r.v*L*o),e.translate(s.a.v[0],s.a.v[1],s.a.v[2]),r.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),r.scale(d?1/ge:ge,d?1/Mt:Mt),r.translate(s.a.v[0],s.a.v[1],s.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,s){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=s,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,t[e].ty==="gr"&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,s=t.length;for(r=0;r<s;r+=1)t[r]._render=e,t[r].ty==="gr"&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,s,o,d,L=!1;if(this._mdf||t){var ge=Math.ceil(this.c.v);if(this._groups.length<ge){for(;this._groups.length<ge;){var Mt={it:this.cloneElements(this._elements),ty:"gr"};Mt.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,Mt),this._groups.splice(0,0,Mt),this._currentCopies+=1}this.elem.reloadShapes(),L=!0}d=0;var er;for(s=0;s<=this._groups.length-1;s+=1){if(er=d<ge,this._groups[s]._render=er,this.changeGroupRender(this._groups[s].it,er),!er){var tr=this.elemsData[s].it,ir=tr[tr.length-1];ir.transform.op.v!==0?(ir.transform.op._mdf=!0,ir.transform.op.v=0):ir.transform.op._mdf=!1}d+=1}this._currentCopies=ge;var rr=this.o.v,nr=rr%1,ar=rr>0?Math.floor(rr):Math.ceil(rr),sr=this.pMatrix.props,lr=this.rMatrix.props,cr=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var ur=0;if(rr>0){for(;ur<ar;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),ur+=1;nr&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,nr,!1),ur+=nr)}else if(rr<0){for(;ur>ar;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),ur-=1;nr&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-nr,!0),ur-=nr)}s=this.data.m===1?0:this._currentCopies-1,o=this.data.m===1?1:-1,d=this._currentCopies;for(var or,dr;d;){if(e=this.elemsData[s].it,r=e[e.length-1].transform.mProps.v.props,dr=r.length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(s/(this._currentCopies-1)),ur!==0){for((s!==0&&o===1||s!==this._currentCopies-1&&o===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(lr[0],lr[1],lr[2],lr[3],lr[4],lr[5],lr[6],lr[7],lr[8],lr[9],lr[10],lr[11],lr[12],lr[13],lr[14],lr[15]),this.matrix.transform(cr[0],cr[1],cr[2],cr[3],cr[4],cr[5],cr[6],cr[7],cr[8],cr[9],cr[10],cr[11],cr[12],cr[13],cr[14],cr[15]),this.matrix.transform(sr[0],sr[1],sr[2],sr[3],sr[4],sr[5],sr[6],sr[7],sr[8],sr[9],sr[10],sr[11],sr[12],sr[13],sr[14],sr[15]),or=0;or<dr;or+=1)r[or]=this.matrix.props[or];this.matrix.reset()}else for(this.matrix.reset(),or=0;or<dr;or+=1)r[or]=this.matrix.props[or];ur+=1,d-=1,s+=o}}else for(d=this._currentCopies,s=0,o=1;d;)e=this.elemsData[s].it,r=e[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,d-=1,s+=o;return L},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r=shapePool.newElement();r.c=t.c;var s,o=t._length,d,L,ge,Mt,er,tr,ir=0,rr,nr,ar,sr,lr,cr;for(s=0;s<o;s+=1)d=t.v[s],ge=t.o[s],L=t.i[s],d[0]===ge[0]&&d[1]===ge[1]&&d[0]===L[0]&&d[1]===L[1]?(s===0||s===o-1)&&!t.c?(r.setTripleAt(d[0],d[1],ge[0],ge[1],L[0],L[1],ir),ir+=1):(s===0?Mt=t.v[o-1]:Mt=t.v[s-1],er=Math.sqrt(Math.pow(d[0]-Mt[0],2)+Math.pow(d[1]-Mt[1],2)),tr=er?Math.min(er/2,e)/er:0,lr=d[0]+(Mt[0]-d[0])*tr,rr=lr,cr=d[1]-(d[1]-Mt[1])*tr,nr=cr,ar=rr-(rr-d[0])*roundCorner,sr=nr-(nr-d[1])*roundCorner,r.setTripleAt(rr,nr,ar,sr,lr,cr,ir),ir+=1,s===o-1?Mt=t.v[0]:Mt=t.v[s+1],er=Math.sqrt(Math.pow(d[0]-Mt[0],2)+Math.pow(d[1]-Mt[1],2)),tr=er?Math.min(er/2,e)/er:0,ar=d[0]+(Mt[0]-d[0])*tr,rr=ar,sr=d[1]+(Mt[1]-d[1])*tr,nr=sr,lr=rr-(rr-d[0])*roundCorner,cr=nr-(nr-d[1])*roundCorner,r.setTripleAt(rr,nr,ar,sr,lr,cr,ir),ir+=1):(r.setTripleAt(t.v[s][0],t.v[s][1],t.o[s][0],t.o[s][1],t.i[s][0],t.i[s][1],ir),ir+=1);return r},RoundCornersModifier.prototype.processShapes=function(t){var e,r,s=this.shapes.length,o,d,L=this.rd.v;if(L!==0){var ge,Mt;for(r=0;r<s;r+=1){if(ge=this.shapes[r],Mt=ge.localShapeCollection,!(!ge.shape._mdf&&!this._mdf&&!t))for(Mt.releaseShapes(),ge.shape._mdf=!0,e=ge.shape.paths.shapes,d=ge.shape.paths._length,o=0;o<d;o+=1)Mt.addShape(this.processPath(e[o],L));ge.shape.paths=ge.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function floatEqual(t,e){return Math.abs(t-e)*1e5<=Math.min(Math.abs(t),Math.abs(e))}function floatZero(t){return Math.abs(t)<=1e-5}function lerp(t,e,r){return t*(1-r)+e*r}function lerpPoint(t,e,r){return[lerp(t[0],e[0],r),lerp(t[1],e[1],r)]}function quadRoots(t,e,r){if(t===0)return[];var s=e*e-4*t*r;if(s<0)return[];var o=-e/(2*t);if(s===0)return[o];var d=Math.sqrt(s)/(2*t);return[o-d,o+d]}function polynomialCoefficients(t,e,r,s){return[-t+3*e-3*r+s,3*t-6*e+3*r,-3*t+3*e,t]}function singlePoint(t){return new PolynomialBezier(t,t,t,t,!1)}function PolynomialBezier(t,e,r,s,o){o&&pointEqual(t,e)&&(e=lerpPoint(t,s,1/3)),o&&pointEqual(r,s)&&(r=lerpPoint(t,s,2/3));var d=polynomialCoefficients(t[0],e[0],r[0],s[0]),L=polynomialCoefficients(t[1],e[1],r[1],s[1]);this.a=[d[0],L[0]],this.b=[d[1],L[1]],this.c=[d[2],L[2]],this.d=[d[3],L[3]],this.points=[t,e,r,s]}PolynomialBezier.prototype.point=function(t){return[((this.a[0]*t+this.b[0])*t+this.c[0])*t+this.d[0],((this.a[1]*t+this.b[1])*t+this.c[1])*t+this.d[1]]},PolynomialBezier.prototype.derivative=function(t){return[(3*t*this.a[0]+2*this.b[0])*t+this.c[0],(3*t*this.a[1]+2*this.b[1])*t+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(t){var e=this.derivative(t);return Math.atan2(e[1],e[0])},PolynomialBezier.prototype.normalAngle=function(t){var e=this.derivative(t);return Math.atan2(e[0],e[1])},PolynomialBezier.prototype.inflectionPoints=function(){var t=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(t))return[];var e=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/t,r=e*e-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/t;if(r<0)return[];var s=Math.sqrt(r);return floatZero(s)?s>0&&s<1?[e]:[]:[e-s,e+s].filter(function(o){return o>0&&o<1})},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),r=lerpPoint(this.points[1],this.points[2],t),s=lerpPoint(this.points[2],this.points[3],t),o=lerpPoint(e,r,t),d=lerpPoint(r,s,t),L=lerpPoint(o,d,t);return[new PolynomialBezier(this.points[0],e,o,L,!0),new PolynomialBezier(L,d,s,this.points[3],!0)]};function extrema(t,e){var r=t.points[0][e],s=t.points[t.points.length-1][e];if(r>s){var o=s;s=r,r=o}for(var d=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),L=0;L<d.length;L+=1)if(d[L]>0&&d[L]<1){var ge=t.point(d[L])[e];ge<r?r=ge:ge>s&&(s=ge)}return{min:r,max:s}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}};function intersectData(t,e,r){var s=t.boundingBox();return{cx:s.cx,cy:s.cy,width:s.width,height:s.height,bez:t,t:(e+r)/2,t1:e,t2:r}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return Math.abs(t.cx-e.cx)*2<t.width+e.width&&Math.abs(t.cy-e.cy)*2<t.height+e.height}function intersectsImpl(t,e,r,s,o,d){if(boxIntersect(t,e)){if(r>=d||t.width<=s&&t.height<=s&&e.width<=s&&e.height<=s){o.push([t.t,e.t]);return}var L=splitData(t),ge=splitData(e);intersectsImpl(L[0],ge[0],r+1,s,o,d),intersectsImpl(L[0],ge[1],r+1,s,o,d),intersectsImpl(L[1],ge[0],r+1,s,o,d),intersectsImpl(L[1],ge[1],r+1,s,o,d)}}PolynomialBezier.prototype.intersections=function(t,e,r){e===void 0&&(e=2),r===void 0&&(r=7);var s=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,s,r),s},PolynomialBezier.shapeSegment=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[r],t.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[r],t.i[r],t.o[e],t.v[e],!0)};function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,r,s){var o=[t[0],t[1],1],d=[e[0],e[1],1],L=[r[0],r[1],1],ge=[s[0],s[1],1],Mt=crossProduct(crossProduct(o,d),crossProduct(L,ge));return floatZero(Mt[2])?null:[Mt[0]/Mt[2],Mt[1]/Mt[2]]}function polarOffset(t,e,r){return[t[0]+Math.cos(e)*r,t[1]-Math.sin(e)*r]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(t,e,r,s,o,d,L){var ge=r-Math.PI/2,Mt=r+Math.PI/2,er=e[0]+Math.cos(r)*s*o,tr=e[1]-Math.sin(r)*s*o;t.setTripleAt(er,tr,er+Math.cos(ge)*d,tr-Math.sin(ge)*d,er+Math.cos(Mt)*L,tr-Math.sin(Mt)*L,t.length())}function getPerpendicularVector(t,e){var r=[e[0]-t[0],e[1]-t[1]],s=-Math.PI*.5,o=[Math.cos(s)*r[0]-Math.sin(s)*r[1],Math.sin(s)*r[0]+Math.cos(s)*r[1]];return o}function getProjectingAngle(t,e){var r=e===0?t.length()-1:e-1,s=(e+1)%t.length(),o=t.v[r],d=t.v[s],L=getPerpendicularVector(o,d);return Math.atan2(0,1)-Math.atan2(L[1],L[0])}function zigZagCorner(t,e,r,s,o,d,L){var ge=getProjectingAngle(e,r),Mt=e.v[r%e._length],er=e.v[r===0?e._length-1:r-1],tr=e.v[(r+1)%e._length],ir=d===2?Math.sqrt(Math.pow(Mt[0]-er[0],2)+Math.pow(Mt[1]-er[1],2)):0,rr=d===2?Math.sqrt(Math.pow(Mt[0]-tr[0],2)+Math.pow(Mt[1]-tr[1],2)):0;setPoint(t,e.v[r%e._length],ge,L,s,rr/((o+1)*2),ir/((o+1)*2))}function zigZagSegment(t,e,r,s,o,d){for(var L=0;L<s;L+=1){var ge=(L+1)/(s+1),Mt=o===2?Math.sqrt(Math.pow(e.points[3][0]-e.points[0][0],2)+Math.pow(e.points[3][1]-e.points[0][1],2)):0,er=e.normalAngle(ge),tr=e.point(ge);setPoint(t,tr,er,d,r,Mt/((s+1)*2),Mt/((s+1)*2)),d=-d}return d}ZigZagModifier.prototype.processPath=function(t,e,r,s){var o=t._length,d=shapePool.newElement();if(d.c=t.c,t.c||(o-=1),o===0)return d;var L=-1,ge=PolynomialBezier.shapeSegment(t,0);zigZagCorner(d,t,0,e,r,s,L);for(var Mt=0;Mt<o;Mt+=1)L=zigZagSegment(d,ge,e,r,s,-L),Mt===o-1&&!t.c?ge=null:ge=PolynomialBezier.shapeSegment(t,(Mt+1)%o),zigZagCorner(d,t,Mt+1,e,r,s,L);return d},ZigZagModifier.prototype.processShapes=function(t){var e,r,s=this.shapes.length,o,d,L=this.amplitude.v,ge=Math.max(0,Math.round(this.frequency.v)),Mt=this.pointsType.v;if(L!==0){var er,tr;for(r=0;r<s;r+=1){if(er=this.shapes[r],tr=er.localShapeCollection,!(!er.shape._mdf&&!this._mdf&&!t))for(tr.releaseShapes(),er.shape._mdf=!0,e=er.shape.paths.shapes,d=er.shape.paths._length,o=0;o<d;o+=1)tr.addShape(this.processPath(e[o],L,ge,Mt));er.shape.paths=er.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function linearOffset(t,e,r){var s=Math.atan2(e[0]-t[0],e[1]-t[1]);return[polarOffset(t,s,r),polarOffset(e,s,r)]}function offsetSegment(t,e){var r,s,o,d,L,ge,Mt;Mt=linearOffset(t.points[0],t.points[1],e),r=Mt[0],s=Mt[1],Mt=linearOffset(t.points[1],t.points[2],e),o=Mt[0],d=Mt[1],Mt=linearOffset(t.points[2],t.points[3],e),L=Mt[0],ge=Mt[1];var er=lineIntersection(r,s,o,d);er===null&&(er=s);var tr=lineIntersection(L,ge,o,d);return tr===null&&(tr=L),new PolynomialBezier(r,er,tr,ge)}function joinLines(t,e,r,s,o){var d=e.points[3],L=r.points[0];if(s===3||pointEqual(d,L))return d;if(s===2){var ge=-e.tangentAngle(1),Mt=-r.tangentAngle(0)+Math.PI,er=lineIntersection(d,polarOffset(d,ge+Math.PI/2,100),L,polarOffset(L,ge+Math.PI/2,100)),tr=er?pointDistance(er,d):pointDistance(d,L)/2,ir=polarOffset(d,ge,2*tr*roundCorner);return t.setXYAt(ir[0],ir[1],"o",t.length()-1),ir=polarOffset(L,Mt,2*tr*roundCorner),t.setTripleAt(L[0],L[1],L[0],L[1],ir[0],ir[1],t.length()),L}var rr=pointEqual(d,e.points[2])?e.points[0]:e.points[2],nr=pointEqual(L,r.points[1])?r.points[3]:r.points[1],ar=lineIntersection(rr,d,L,nr);return ar&&pointDistance(ar,d)<o?(t.setTripleAt(ar[0],ar[1],ar[0],ar[1],ar[0],ar[1],t.length()),ar):d}function getIntersection(t,e){var r=t.intersections(e);return r.length&&floatEqual(r[0][0],1)&&r.shift(),r.length?r[0]:null}function pruneSegmentIntersection(t,e){var r=t.slice(),s=e.slice(),o=getIntersection(t[t.length-1],e[0]);return o&&(r[t.length-1]=t[t.length-1].split(o[0])[0],s[0]=e[0].split(o[1])[1]),t.length>1&&e.length>1&&(o=getIntersection(t[0],e[e.length-1]),o)?[[t[0].split(o[0])[0]],[e[e.length-1].split(o[1])[1]]]:[r,s]}function pruneIntersections(t){for(var e,r=1;r<t.length;r+=1)e=pruneSegmentIntersection(t[r-1],t[r]),t[r-1]=e[0],t[r]=e[1];return t.length>1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var r=t.inflectionPoints(),s,o,d,L;if(r.length===0)return[offsetSegment(t,e)];if(r.length===1||floatEqual(r[1],1))return d=t.split(r[0]),s=d[0],o=d[1],[offsetSegment(s,e),offsetSegment(o,e)];d=t.split(r[0]),s=d[0];var ge=(r[1]-r[0])/(1-r[0]);return d=d[1].split(ge),L=d[0],o=d[1],[offsetSegment(s,e),offsetSegment(L,e),offsetSegment(o,e)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this.miterLimit=PropertyFactory.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(t,e,r,s){var o=shapePool.newElement();o.c=t.c;var d=t.length();t.c||(d-=1);var L,ge,Mt,er=[];for(L=0;L<d;L+=1)Mt=PolynomialBezier.shapeSegment(t,L),er.push(offsetSegmentSplit(Mt,e));if(!t.c)for(L=d-1;L>=0;L-=1)Mt=PolynomialBezier.shapeSegmentInverted(t,L),er.push(offsetSegmentSplit(Mt,e));er=pruneIntersections(er);var tr=null,ir=null;for(L=0;L<er.length;L+=1){var rr=er[L];for(ir&&(tr=joinLines(o,ir,rr[0],r,s)),ir=rr[rr.length-1],ge=0;ge<rr.length;ge+=1)Mt=rr[ge],tr&&pointEqual(Mt.points[0],tr)?o.setXYAt(Mt.points[1][0],Mt.points[1][1],"o",o.length()-1):o.setTripleAt(Mt.points[0][0],Mt.points[0][1],Mt.points[1][0],Mt.points[1][1],Mt.points[0][0],Mt.points[0][1],o.length()),o.setTripleAt(Mt.points[3][0],Mt.points[3][1],Mt.points[3][0],Mt.points[3][1],Mt.points[2][0],Mt.points[2][1],o.length()),tr=Mt.points[3]}return er.length&&joinLines(o,ir,er[0][0],r,s),o},OffsetPathModifier.prototype.processShapes=function(t){var e,r,s=this.shapes.length,o,d,L=this.amount.v,ge=this.miterLimit.v,Mt=this.lineJoin;if(L!==0){var er,tr;for(r=0;r<s;r+=1){if(er=this.shapes[r],tr=er.localShapeCollection,!(!er.shape._mdf&&!this._mdf&&!t))for(tr.releaseShapes(),er.shape._mdf=!0,e=er.shape.paths.shapes,d=er.shape.paths._length,o=0;o<d;o+=1)tr.addShape(this.processPath(e[o],L,Mt,ge));er.shape.paths=er.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",s="normal",o=e.length,d,L=0;L<o;L+=1)switch(d=e[L].toLowerCase(),d){case"italic":s="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200";break}return{style:s,weight:t.fWeight||r}}var FontManager=function(){var t=5e3,e={w:0,size:0,shapes:[],data:{shapes:[]}},r=[];r=r.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var s=127988,o=917631,d=917601,L=917626,ge=65039,Mt=8205,er=127462,tr=127487,ir=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function rr(yr){var xr=yr.split(","),gr,_r=xr.length,wr=[];for(gr=0;gr<_r;gr+=1)xr[gr]!=="sans-serif"&&xr[gr]!=="monospace"&&wr.push(xr[gr]);return wr.join(",")}function nr(yr,xr){var gr=createTag("span");gr.setAttribute("aria-hidden",!0),gr.style.fontFamily=xr;var _r=createTag("span");_r.innerText="giItT1WQy@!-/#",gr.style.position="absolute",gr.style.left="-10000px",gr.style.top="-10000px",gr.style.fontSize="300px",gr.style.fontVariant="normal",gr.style.fontStyle="normal",gr.style.fontWeight="normal",gr.style.letterSpacing="0",gr.appendChild(_r),document.body.appendChild(gr);var wr=_r.offsetWidth;return _r.style.fontFamily=rr(yr)+", "+xr,{node:_r,w:wr,parent:gr}}function ar(){var yr,xr=this.fonts.length,gr,_r,wr=xr;for(yr=0;yr<xr;yr+=1)this.fonts[yr].loaded?wr-=1:this.fonts[yr].fOrigin==="n"||this.fonts[yr].origin===0?this.fonts[yr].loaded=!0:(gr=this.fonts[yr].monoCase.node,_r=this.fonts[yr].monoCase.w,gr.offsetWidth!==_r?(wr-=1,this.fonts[yr].loaded=!0):(gr=this.fonts[yr].sansCase.node,_r=this.fonts[yr].sansCase.w,gr.offsetWidth!==_r&&(wr-=1,this.fonts[yr].loaded=!0)),this.fonts[yr].loaded&&(this.fonts[yr].sansCase.parent.parentNode.removeChild(this.fonts[yr].sansCase.parent),this.fonts[yr].monoCase.parent.parentNode.removeChild(this.fonts[yr].monoCase.parent)));wr!==0&&Date.now()-this.initTime<t?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function sr(yr,xr){var gr=document.body&&xr?"svg":"canvas",_r,wr=getFontProperties(yr);if(gr==="svg"){var Ir=createNS("text");Ir.style.fontSize="100px",Ir.setAttribute("font-family",yr.fFamily),Ir.setAttribute("font-style",wr.style),Ir.setAttribute("font-weight",wr.weight),Ir.textContent="1",yr.fClass?(Ir.style.fontFamily="inherit",Ir.setAttribute("class",yr.fClass)):Ir.style.fontFamily=yr.fFamily,xr.appendChild(Ir),_r=Ir}else{var Hr=new OffscreenCanvas(500,500).getContext("2d");Hr.font=wr.style+" "+wr.weight+" 100px "+yr.fFamily,_r=Hr}function Yr(Jr){return gr==="svg"?(_r.textContent=Jr,_r.getComputedTextLength()):_r.measureText(Jr).width}return{measureText:Yr}}function lr(yr,xr){if(!yr){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=yr.list;return}if(!document.body){this.isLoaded=!0,yr.list.forEach(function(Zr){Zr.helper=sr(Zr),Zr.cache={}}),this.fonts=yr.list;return}var gr=yr.list,_r,wr=gr.length,Ir=wr;for(_r=0;_r<wr;_r+=1){var Hr=!0,Yr,Jr;if(gr[_r].loaded=!1,gr[_r].monoCase=nr(gr[_r].fFamily,"monospace"),gr[_r].sansCase=nr(gr[_r].fFamily,"sans-serif"),!gr[_r].fPath)gr[_r].loaded=!0,Ir-=1;else if(gr[_r].fOrigin==="p"||gr[_r].origin===3){if(Yr=document.querySelectorAll('style[f-forigin="p"][f-family="'+gr[_r].fFamily+'"], style[f-origin="3"][f-family="'+gr[_r].fFamily+'"]'),Yr.length>0&&(Hr=!1),Hr){var xi=createTag("style");xi.setAttribute("f-forigin",gr[_r].fOrigin),xi.setAttribute("f-origin",gr[_r].origin),xi.setAttribute("f-family",gr[_r].fFamily),xi.type="text/css",xi.innerText="@font-face {font-family: "+gr[_r].fFamily+"; font-style: normal; src: url('"+gr[_r].fPath+"');}",xr.appendChild(xi)}}else if(gr[_r].fOrigin==="g"||gr[_r].origin===1){for(Yr=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),Jr=0;Jr<Yr.length;Jr+=1)Yr[Jr].href.indexOf(gr[_r].fPath)!==-1&&(Hr=!1);if(Hr){var di=createTag("link");di.setAttribute("f-forigin",gr[_r].fOrigin),di.setAttribute("f-origin",gr[_r].origin),di.type="text/css",di.rel="stylesheet",di.href=gr[_r].fPath,document.body.appendChild(di)}}else if(gr[_r].fOrigin==="t"||gr[_r].origin===2){for(Yr=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),Jr=0;Jr<Yr.length;Jr+=1)gr[_r].fPath===Yr[Jr].src&&(Hr=!1);if(Hr){var Vr=createTag("link");Vr.setAttribute("f-forigin",gr[_r].fOrigin),Vr.setAttribute("f-origin",gr[_r].origin),Vr.setAttribute("rel","stylesheet"),Vr.setAttribute("href",gr[_r].fPath),xr.appendChild(Vr)}}gr[_r].helper=sr(gr[_r],xr),gr[_r].cache={},this.fonts.push(gr[_r])}Ir===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function cr(yr){if(yr){this.chars||(this.chars=[]);var xr,gr=yr.length,_r,wr=this.chars.length,Ir;for(xr=0;xr<gr;xr+=1){for(_r=0,Ir=!1;_r<wr;)this.chars[_r].style===yr[xr].style&&this.chars[_r].fFamily===yr[xr].fFamily&&this.chars[_r].ch===yr[xr].ch&&(Ir=!0),_r+=1;Ir||(this.chars.push(yr[xr]),wr+=1)}}}function ur(yr,xr,gr){for(var _r=0,wr=this.chars.length;_r<wr;){if(this.chars[_r].ch===yr&&this.chars[_r].style===xr&&this.chars[_r].fFamily===gr)return this.chars[_r];_r+=1}return(typeof yr=="string"&&yr.charCodeAt(0)!==13||!yr)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",yr,xr,gr)),e}function or(yr,xr,gr){var _r=this.getFontByName(xr),wr=yr;if(!_r.cache[wr]){var Ir=_r.helper;if(yr===" "){var Hr=Ir.measureText("|"+yr+"|"),Yr=Ir.measureText("||");_r.cache[wr]=(Hr-Yr)/100}else _r.cache[wr]=Ir.measureText(yr)/100}return _r.cache[wr]*gr}function dr(yr){for(var xr=0,gr=this.fonts.length;xr<gr;){if(this.fonts[xr].fName===yr)return this.fonts[xr];xr+=1}return this.fonts[0]}function hr(yr){var xr=0,gr=yr.charCodeAt(0);if(gr>=55296&&gr<=56319){var _r=yr.charCodeAt(1);_r>=56320&&_r<=57343&&(xr=(gr-55296)*1024+_r-56320+65536)}return xr}function pr(yr,xr){var gr=yr.toString(16)+xr.toString(16);return ir.indexOf(gr)!==-1}function mr(yr){return yr===Mt}function vr(yr){return yr===ge}function Er(yr){var xr=hr(yr);return xr>=er&&xr<=tr}function Cr(yr){return Er(yr.substr(0,2))&&Er(yr.substr(2,2))}function Pr(yr){return r.indexOf(yr)!==-1}function kr(yr,xr){var gr=hr(yr.substr(xr,2));if(gr!==s)return!1;var _r=0;for(xr+=2;_r<5;){if(gr=hr(yr.substr(xr,2)),gr<d||gr>L)return!1;_r+=1,xr+=2}return hr(yr.substr(xr,2))===o}function Mr(){this.isLoaded=!0}var Ur=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};Ur.isModifier=pr,Ur.isZeroWidthJoiner=mr,Ur.isFlagEmoji=Cr,Ur.isRegionalCode=Er,Ur.isCombinedCharacter=Pr,Ur.isRegionalFlag=kr,Ur.isVariationSelector=vr,Ur.BLACK_FLAG_CODE_POINT=s;var $r={addChars:cr,addFonts:lr,getCharData:ur,getFontByName:dr,measureText:or,checkLoadedFonts:ar,setIsLoaded:Mr};return Ur.prototype=$r,Ur}();function SlotManager(t){this.animationData=t}SlotManager.prototype.getProp=function(t){return this.animationData.slots&&this.animationData.slots[t.sid]?Object.assign(t,this.animationData.slots[t.sid].p):t};function slotFactory(t){return new SlotManager(t)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){this.renderableComponents.indexOf(e)===-1&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){this.renderableComponents.indexOf(e)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,r=this.renderableComponents.length;for(e=0;e<r;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var t={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(e){return t[e]||""}}();function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r=t.ef||[];this.effectElements=[];var s,o=r.length,d;for(s=0;s<o;s+=1)d=new GroupEffect(r[s],e),this.effectElements.push(d)}function GroupEffect(t,e){this.init(t,e)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var r,s=this.data.ef.length,o,d=this.data.ef;for(r=0;r<s;r+=1){switch(o=null,d[r].ty){case 0:o=new SliderEffect(d[r],e,this);break;case 1:o=new AngleEffect(d[r],e,this);break;case 2:o=new ColorEffect(d[r],e,this);break;case 3:o=new PointEffect(d[r],e,this);break;case 4:case 7:o=new CheckboxEffect(d[r],e,this);break;case 10:o=new LayerIndexEffect(d[r],e,this);break;case 11:o=new MaskIndexEffect(d[r],e,this);break;case 5:o=new EffectsManager(d[r],e);break;default:o=new NoValueEffect(d[r]);break}o&&this.effectElements.push(o)}};function BaseElement(){}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,r=this.data.masksProperties.length;e<r;){if(this.data.masksProperties[e].mode!=="n"&&this.data.masksProperties[e].cl!==!1)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var r=e("layer"),s=e("effects"),o=e("shape"),d=e("text"),L=e("comp");this.layerInterface=r(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var ge=s.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(ge),this.data.ty===0||this.data.xt?this.compInterface=L(this):this.data.ty===4?(this.layerInterface.shapeInterface=o(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=d(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm),r=this.baseElement||this.layerElement;r.style["mix-blend-mode"]=e},initBaseData:function(e,r,s){this.globalData=r,this.comp=s,this.data=e,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function FrameElement(){}FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,r){var s,o=this.dynamicProperties.length;for(s=0;s<o;s+=1)(r||this._isParent&&this.dynamicProperties[s].propType==="transform")&&(this.dynamicProperties[s].getValue(),this.dynamicProperties[s]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&this.dynamicProperties.push(e)}};function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var t=getExpressionInterfaces();if(t){var e=t("footage");this.layerInterface=e(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var s=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(s),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,t.au&&t.au.lv?t.au.lv:{k:[100]},1,.01,this)}AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}this._volume=this.lv.v[0];var r=this._volume*this._volumeMultiplier;this._previousVolume!==r&&(this._previousVolume=r,this.audio.volume(r))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(t){var e,r=this.layers.length,s;for(this.completeLayers=!0,e=r-1;e>=0;e-=1)this.elements[e]||(s=this.layers[e],s.ip-s.st<=t-this.layers[e].st&&s.op-s.st>t-this.layers[e].st&&this.buildItem(e)),this.completeLayers=this.elements[e]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){this.completeLayers=!1;var e,r=t.length,s,o=this.layers.length;for(e=0;e<r;e+=1)for(s=0;s<o;){if(this.layers[s].id===t[e].id){this.layers[s]=t[e];break}s+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var s=this.elements,o=this.layers,d=0,L=o.length;d<L;)o[d].ind==e&&(!s[d]||s[d]===!0?(this.buildItem(d),this.addPendingElement(t)):(r.push(s[d]),s[d].setAsParent(),o[d].parent!==void 0?this.buildElementParenting(t,o[d].parent,r):t.setHierarchy(r))),d+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var s=this.createComp(t[e]);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},BaseRenderer.prototype.getElementById=function(t){var e,r=this.elements.length;for(e=0;e<r;e+=1)if(this.elements[e].data.ind===t)return this.elements[e];return null},BaseRenderer.prototype.getElementByPath=function(t){var e=t.shift(),r;if(typeof e=="number")r=this.elements[e];else{var s,o=this.elements.length;for(s=0;s<o;s+=1)if(this.elements[s].data.nm===e){r=this.elements[s];break}}return t.length===0?r:r.getElementByPath(t)},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(t),this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,r=this.finalTransform.mat,s=0,o=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;s<o;){if(this.hierarchy[s].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}s+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,r.cloneFromProps(e),s=0;s<o;s+=1)r.multiply(this.hierarchy[s].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,r=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<r;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var s=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(s),e=1;e<r;e+=1){var o=this.localTransforms[e].matrix;s.multiply(o)}s.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var d=this.finalTransform.localOpacity;for(e=0;e<r;e+=1)d*=this.localTransforms[e].opacity*.01;this.finalTransform.localOpacity=d}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var r=0,s=e.length;for(r=0;r<s;r+=1)this.localTransforms.push(e[r])}}},globalToLocal:function(e){var r=[];r.push(this.finalTransform);for(var s=!0,o=this.comp;s;)o.finalTransform?(o.data.hasMask&&r.splice(0,0,o.finalTransform),o=o.comp):s=!1;var d,L=r.length,ge;for(d=0;d<L;d+=1)ge=r[d].mat.applyToPointArray(0,0,0),e=[e[0]-ge[0],e[1]-ge[1],0];return e},mHelper:new Matrix};function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var s=this.globalData.defs,o,d=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(d),this.solidPath="";var L,ge=this.masksProperties,Mt=0,er=[],tr,ir,rr=createElementID(),nr,ar,sr,lr,cr="clipPath",ur="clip-path";for(o=0;o<d;o+=1)if((ge[o].mode!=="a"&&ge[o].mode!=="n"||ge[o].inv||ge[o].o.k!==100||ge[o].o.x)&&(cr="mask",ur="mask"),(ge[o].mode==="s"||ge[o].mode==="i")&&Mt===0?(nr=createNS("rect"),nr.setAttribute("fill","#ffffff"),nr.setAttribute("width",this.element.comp.data.w||0),nr.setAttribute("height",this.element.comp.data.h||0),er.push(nr)):nr=null,L=createNS("path"),ge[o].mode==="n")this.viewData[o]={op:PropertyFactory.getProp(this.element,ge[o].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,ge[o],3),elem:L,lastPath:""},s.appendChild(L);else{Mt+=1,L.setAttribute("fill",ge[o].mode==="s"?"#000000":"#ffffff"),L.setAttribute("clip-rule","nonzero");var or;if(ge[o].x.k!==0?(cr="mask",ur="mask",lr=PropertyFactory.getProp(this.element,ge[o].x,0,null,this.element),or=createElementID(),ar=createNS("filter"),ar.setAttribute("id",or),sr=createNS("feMorphology"),sr.setAttribute("operator","erode"),sr.setAttribute("in","SourceGraphic"),sr.setAttribute("radius","0"),ar.appendChild(sr),s.appendChild(ar),L.setAttribute("stroke",ge[o].mode==="s"?"#000000":"#ffffff")):(sr=null,lr=null),this.storedData[o]={elem:L,x:lr,expan:sr,lastPath:"",lastOperator:"",filterId:or,lastRadius:0},ge[o].mode==="i"){ir=er.length;var dr=createNS("g");for(tr=0;tr<ir;tr+=1)dr.appendChild(er[tr]);var hr=createNS("mask");hr.setAttribute("mask-type","alpha"),hr.setAttribute("id",rr+"_"+Mt),hr.appendChild(L),s.appendChild(hr),dr.setAttribute("mask","url("+getLocationHref()+"#"+rr+"_"+Mt+")"),er.length=0,er.push(dr)}else er.push(L);ge[o].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[o]={elem:L,lastPath:"",op:PropertyFactory.getProp(this.element,ge[o].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,ge[o],3),invRect:nr},this.viewData[o].prop.k||this.drawPath(ge[o],this.viewData[o].prop.v,this.viewData[o])}for(this.maskElement=createNS(cr),d=er.length,o=0;o<d;o+=1)this.maskElement.appendChild(er[o]);Mt>0&&(this.maskElement.setAttribute("id",rr),this.element.maskedElement.setAttribute(ur,"url("+getLocationHref()+"#"+rr+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e=this.element.finalTransform.mat,r,s=this.masksProperties.length;for(r=0;r<s;r+=1)if((this.viewData[r].prop._mdf||t)&&this.drawPath(this.masksProperties[r],this.viewData[r].prop.v,this.viewData[r]),(this.viewData[r].op._mdf||t)&&this.viewData[r].elem.setAttribute("fill-opacity",this.viewData[r].op.v),this.masksProperties[r].mode!=="n"&&(this.viewData[r].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[r].invRect.setAttribute("transform",e.getInverseMatrix().to2dCSS()),this.storedData[r].x&&(this.storedData[r].x._mdf||t))){var o=this.storedData[r].expan;this.storedData[r].x.v<0?(this.storedData[r].lastOperator!=="erode"&&(this.storedData[r].lastOperator="erode",this.storedData[r].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[r].filterId+")")),o.setAttribute("radius",-this.storedData[r].x.v)):(this.storedData[r].lastOperator!=="dilate"&&(this.storedData[r].lastOperator="dilate",this.storedData[r].elem.setAttribute("filter",null)),this.storedData[r].elem.setAttribute("stroke-width",this.storedData[r].x.v*2))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" ",t},MaskElement.prototype.drawPath=function(t,e,r){var s=" M"+e.v[0][0]+","+e.v[0][1],o,d;for(d=e._length,o=1;o<d;o+=1)s+=" C"+e.o[o-1][0]+","+e.o[o-1][1]+" "+e.i[o][0]+","+e.i[o][1]+" "+e.v[o][0]+","+e.v[o][1];if(e.c&&d>1&&(s+=" C"+e.o[o-1][0]+","+e.o[o-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==s){var L="";r.elem&&(e.c&&(L=t.inv?this.solidPath+s:s),r.elem.setAttribute("d",L)),r.lastPath=s}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};t.createFilter=e,t.createAlphaToLuminanceFilter=r;function e(s,o){var d=createNS("filter");return d.setAttribute("id",s),o!==!0&&(d.setAttribute("filterUnits","objectBoundingBox"),d.setAttribute("x","0%"),d.setAttribute("y","0%"),d.setAttribute("width","100%"),d.setAttribute("height","100%")),d}function r(){var s=createNS("feColorMatrix");return s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),s}return t}(),featureSupport=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(t){var e,r="SourceGraphic",s=t.data.ef?t.data.ef.length:0,o=createElementID(),d=filtersFactory.createFilter(o,!0),L=0;this.filters=[];var ge;for(e=0;e<s;e+=1){ge=null;var Mt=t.data.ef[e].ty;if(registeredEffects$1[Mt]){var er=registeredEffects$1[Mt].effect;ge=new er(d,t.effectsManager.effectElements[e],t,idPrefix+L,r),r=idPrefix+L,registeredEffects$1[Mt].countsAsEffect&&(L+=1)}ge&&this.filters.push(ge)}L&&(t.globalData.defs.appendChild(d),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+o+")")),this.filters.length&&t.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},SVGEffects.prototype.getEffects=function(t){var e,r=this.filters.length,s=[];for(e=0;e<r;e+=1)this.filters[e].type===t&&s.push(this.filters[e]);return s};function registerEffect$1(t,e,r){registeredEffects$1[t]={effect:e,countsAsEffect:r}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var e=null;if(this.data.td){this.matteMasks={};var r=createNS("g");r.setAttribute("id",this.layerId),r.appendChild(this.layerElement),e=r,this.globalData.defs.appendChild(r)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var s=createNS("clipPath"),o=createNS("path");o.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var d=createElementID();if(s.setAttribute("id",d),s.appendChild(o),this.globalData.defs.appendChild(s),this.checkMasks()){var L=createNS("g");L.setAttribute("clip-path","url("+getLocationHref()+"#"+d+")"),L.appendChild(this.layerElement),this.transformedElement=L,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+d+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(e){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[e]){var r=this.layerId+"_"+e,s,o,d,L;if(e===1||e===3){var ge=createNS("mask");ge.setAttribute("id",r),ge.setAttribute("mask-type",e===3?"luminance":"alpha"),d=createNS("use"),d.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),ge.appendChild(d),this.globalData.defs.appendChild(ge),!featureSupport.maskType&&e===1&&(ge.setAttribute("mask-type","luminance"),s=createElementID(),o=filtersFactory.createFilter(s),this.globalData.defs.appendChild(o),o.appendChild(filtersFactory.createAlphaToLuminanceFilter()),L=createNS("g"),L.appendChild(d),ge.appendChild(L),L.setAttribute("filter","url("+getLocationHref()+"#"+s+")"))}else if(e===2){var Mt=createNS("mask");Mt.setAttribute("id",r),Mt.setAttribute("mask-type","alpha");var er=createNS("g");Mt.appendChild(er),s=createElementID(),o=filtersFactory.createFilter(s);var tr=createNS("feComponentTransfer");tr.setAttribute("in","SourceGraphic"),o.appendChild(tr);var ir=createNS("feFuncA");ir.setAttribute("type","table"),ir.setAttribute("tableValues","1.0 0.0"),tr.appendChild(ir),this.globalData.defs.appendChild(o);var rr=createNS("rect");rr.setAttribute("width",this.comp.data.w),rr.setAttribute("height",this.comp.data.h),rr.setAttribute("x","0"),rr.setAttribute("y","0"),rr.setAttribute("fill","#ffffff"),rr.setAttribute("opacity","0"),er.setAttribute("filter","url("+getLocationHref()+"#"+s+")"),er.appendChild(rr),d=createNS("use"),d.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),er.appendChild(d),featureSupport.maskType||(Mt.setAttribute("mask-type","luminance"),o.appendChild(filtersFactory.createAlphaToLuminanceFilter()),L=createNS("g"),er.appendChild(rr),L.appendChild(this.layerElement),er.appendChild(L)),this.globalData.defs.appendChild(Mt)}this.matteMasks[e]=r}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+e+")")}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){var t={initElement:function(r,s,o){this.initFrame(),this.initBaseData(r,s,o),this.initTransform(r,s,o),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var r=this.baseElement||this.layerElement;r.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var r=this.baseElement||this.layerElement;r.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(r){this._mdf=!1,this.prepareRenderableFrame(r),this.prepareProperties(r,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(t)],RenderableDOMElement)})();function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.assetData&&this.assetData.sid&&(this.assetData=e.slotManager.getProp(this.assetData)),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function(e){var r,s=this.shapeModifiers.length;for(r=0;r<s;r+=1)this.shapeModifiers[r].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var r=0,s=this.shapeModifiers.length;r<s;)if(this.shapeModifiers[r].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,r=this.shapes.length;for(e=0;e<r;e+=1)this.shapes[e].sh.reset();r=this.shapeModifiers.length;var s;for(e=r-1;e>=0&&(s=this.shapeModifiers[e].processShapes(this._isFirstFrame),!s);e-=1);}},searchProcessedElement:function(e){for(var r=this.processedElements,s=0,o=r.length;s<o;){if(r[s].elem===e)return r[s].pos;s+=1}return 0},addProcessedElement:function(e,r){for(var s=this.processedElements,o=s.length;o;)if(o-=1,s[o].elem===e){s[o].pos=r;return}s.push(new ProcessedElement(e,r))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var s=0,o=t.length;s<o;){if(t[s].mProps.dynamicProperties.length){this._isAnimated=!0;break}s+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=t.hd===!0,this.pElem=createNS("path"),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1};function DashProperty(t,e,r,s){this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(s);var o,d=e.length||0,L;for(o=0;o<d;o+=1)L=PropertyFactory.getProp(t,e[o].v,0,0,this),this.k=L.k||this.k,this.dataProps[o]={n:e[o].n,p:L};this.k||this.getValue(!0),this._isAnimated=this.k}DashProperty.prototype.getValue=function(t){if(!(this.elem.globalData.frameId===this.frameId&&!t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),e=0;e<r;e+=1)this.dataProps[e].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=r}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",e.p*4);var s=e.k.k[0].s?e.k.k[0].s.length-e.p*4:e.k.k.length-e.p*4;this.o=createTypedArray("float32",s),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=s,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,s=this.o.length/2,o;r<s;){if(o=Math.abs(t[r*4]-t[e*4+r*2]),o>.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r=this.data.p*4,s,o;for(e=0;e<r;e+=1)s=e%4===0?100:255,o=Math.round(this.prop.v[e]*s),this.c[e]!==o&&(this.c[e]=o,this._cmdf=!t);if(this.o.length)for(r=this.prop.v.length,e=this.data.p*4;e<r;e+=1)s=e%2===0?100:1,o=e%2===0?Math.round(this.prop.v[e]*100):this.prop.v[e],this.o[e-this.data.p*4]!==o&&(this.o[e-this.data.p*4]=o,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),s=createNS(e.t===1?"linearGradient":"radialGradient");s.setAttribute("id",r),s.setAttribute("spreadMethod","pad"),s.setAttribute("gradientUnits","userSpaceOnUse");var o=[],d,L,ge;for(ge=e.g.p*4,L=0;L<ge;L+=4)d=createNS("stop"),s.appendChild(d),o.push(d);t.setAttribute(e.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=s,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,s,o,d=createNS("mask"),L=createNS("path");d.appendChild(L);var ge=createElementID(),Mt=createElementID();d.setAttribute("id",Mt);var er=createNS(t.t===1?"linearGradient":"radialGradient");er.setAttribute("id",ge),er.setAttribute("spreadMethod","pad"),er.setAttribute("gradientUnits","userSpaceOnUse"),o=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var tr=this.stops;for(s=t.g.p*4;s<o;s+=2)r=createNS("stop"),r.setAttribute("stop-color","rgb(255,255,255)"),er.appendChild(r),tr.push(r);L.setAttribute(t.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+ge+")"),t.ty==="gs"&&(L.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),L.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),t.lj===1&&L.setAttribute("stroke-miterlimit",t.ml)),this.of=er,this.ms=d,this.ost=tr,this.maskId=Mt,e.msElem=L}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function(e,r,s,o){if(r===0)return"";var d=e.o,L=e.i,ge=e.v,Mt,er=" M"+o.applyToPointStringified(ge[0][0],ge[0][1]);for(Mt=1;Mt<r;Mt+=1)er+=" C"+o.applyToPointStringified(d[Mt-1][0],d[Mt-1][1])+" "+o.applyToPointStringified(L[Mt][0],L[Mt][1])+" "+o.applyToPointStringified(ge[Mt][0],ge[Mt][1]);return s&&r&&(er+=" C"+o.applyToPointStringified(d[Mt-1][0],d[Mt-1][1])+" "+o.applyToPointStringified(L[0][0],L[0][1])+" "+o.applyToPointStringified(ge[0][0],ge[0][1]),er+="z"),er},SVGElementsRenderer=function(){var t=new Matrix,e=new Matrix,r={createRenderFunction:s};function s(ir){switch(ir.ty){case"fl":return ge;case"gf":return er;case"gs":return Mt;case"st":return tr;case"sh":case"el":case"rc":case"sr":return L;case"tr":return o;case"no":return d;default:return null}}function o(ir,rr,nr){(nr||rr.transform.op._mdf)&&rr.transform.container.setAttribute("opacity",rr.transform.op.v),(nr||rr.transform.mProps._mdf)&&rr.transform.container.setAttribute("transform",rr.transform.mProps.v.to2dCSS())}function d(){}function L(ir,rr,nr){var ar,sr,lr,cr,ur,or,dr=rr.styles.length,hr=rr.lvl,pr,mr,vr,Er;for(or=0;or<dr;or+=1){if(cr=rr.sh._mdf||nr,rr.styles[or].lvl<hr){for(mr=e.reset(),vr=hr-rr.styles[or].lvl,Er=rr.transformers.length-1;!cr&&vr>0;)cr=rr.transformers[Er].mProps._mdf||cr,vr-=1,Er-=1;if(cr)for(vr=hr-rr.styles[or].lvl,Er=rr.transformers.length-1;vr>0;)mr.multiply(rr.transformers[Er].mProps.v),vr-=1,Er-=1}else mr=t;if(pr=rr.sh.paths,sr=pr._length,cr){for(lr="",ar=0;ar<sr;ar+=1)ur=pr.shapes[ar],ur&&ur._length&&(lr+=buildShapeString(ur,ur._length,ur.c,mr));rr.caches[or]=lr}else lr=rr.caches[or];rr.styles[or].d+=ir.hd===!0?"":lr,rr.styles[or]._mdf=cr||rr.styles[or]._mdf}}function ge(ir,rr,nr){var ar=rr.style;(rr.c._mdf||nr)&&ar.pElem.setAttribute("fill","rgb("+bmFloor(rr.c.v[0])+","+bmFloor(rr.c.v[1])+","+bmFloor(rr.c.v[2])+")"),(rr.o._mdf||nr)&&ar.pElem.setAttribute("fill-opacity",rr.o.v)}function Mt(ir,rr,nr){er(ir,rr,nr),tr(ir,rr,nr)}function er(ir,rr,nr){var ar=rr.gf,sr=rr.g._hasOpacity,lr=rr.s.v,cr=rr.e.v;if(rr.o._mdf||nr){var ur=ir.ty==="gf"?"fill-opacity":"stroke-opacity";rr.style.pElem.setAttribute(ur,rr.o.v)}if(rr.s._mdf||nr){var or=ir.t===1?"x1":"cx",dr=or==="x1"?"y1":"cy";ar.setAttribute(or,lr[0]),ar.setAttribute(dr,lr[1]),sr&&!rr.g._collapsable&&(rr.of.setAttribute(or,lr[0]),rr.of.setAttribute(dr,lr[1]))}var hr,pr,mr,vr;if(rr.g._cmdf||nr){hr=rr.cst;var Er=rr.g.c;for(mr=hr.length,pr=0;pr<mr;pr+=1)vr=hr[pr],vr.setAttribute("offset",Er[pr*4]+"%"),vr.setAttribute("stop-color","rgb("+Er[pr*4+1]+","+Er[pr*4+2]+","+Er[pr*4+3]+")")}if(sr&&(rr.g._omdf||nr)){var Cr=rr.g.o;for(rr.g._collapsable?hr=rr.cst:hr=rr.ost,mr=hr.length,pr=0;pr<mr;pr+=1)vr=hr[pr],rr.g._collapsable||vr.setAttribute("offset",Cr[pr*2]+"%"),vr.setAttribute("stop-opacity",Cr[pr*2+1])}if(ir.t===1)(rr.e._mdf||nr)&&(ar.setAttribute("x2",cr[0]),ar.setAttribute("y2",cr[1]),sr&&!rr.g._collapsable&&(rr.of.setAttribute("x2",cr[0]),rr.of.setAttribute("y2",cr[1])));else{var Pr;if((rr.s._mdf||rr.e._mdf||nr)&&(Pr=Math.sqrt(Math.pow(lr[0]-cr[0],2)+Math.pow(lr[1]-cr[1],2)),ar.setAttribute("r",Pr),sr&&!rr.g._collapsable&&rr.of.setAttribute("r",Pr)),rr.e._mdf||rr.h._mdf||rr.a._mdf||nr){Pr||(Pr=Math.sqrt(Math.pow(lr[0]-cr[0],2)+Math.pow(lr[1]-cr[1],2)));var kr=Math.atan2(cr[1]-lr[1],cr[0]-lr[0]),Mr=rr.h.v;Mr>=1?Mr=.99:Mr<=-1&&(Mr=-.99);var Ur=Pr*Mr,$r=Math.cos(kr+rr.a.v)*Ur+lr[0],yr=Math.sin(kr+rr.a.v)*Ur+lr[1];ar.setAttribute("fx",$r),ar.setAttribute("fy",yr),sr&&!rr.g._collapsable&&(rr.of.setAttribute("fx",$r),rr.of.setAttribute("fy",yr))}}}function tr(ir,rr,nr){var ar=rr.style,sr=rr.d;sr&&(sr._mdf||nr)&&sr.dashStr&&(ar.pElem.setAttribute("stroke-dasharray",sr.dashStr),ar.pElem.setAttribute("stroke-dashoffset",sr.dashoffset[0])),rr.c&&(rr.c._mdf||nr)&&ar.pElem.setAttribute("stroke","rgb("+bmFloor(rr.c.v[0])+","+bmFloor(rr.c.v[1])+","+bmFloor(rr.c.v[2])+")"),(rr.o._mdf||nr)&&ar.pElem.setAttribute("stroke-opacity",rr.o.v),(rr.w._mdf||nr)&&(ar.pElem.setAttribute("stroke-width",rr.w.v),ar.msElem&&ar.msElem.setAttribute("stroke-width",rr.w.v))}return r}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e=this.shapes.length,r,s,o=this.stylesList.length,d,L=[],ge=!1;for(s=0;s<o;s+=1){for(d=this.stylesList[s],ge=!1,L.length=0,t=0;t<e;t+=1)r=this.shapes[t],r.styles.indexOf(d)!==-1&&(L.push(r),ge=r._isAnimated||ge);L.length>1&&ge&&this.setShapesAsAnimated(L)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,s=new SVGStyleData(t,e),o=s.pElem;if(t.ty==="st")r=new SVGStrokeStyleData(this,t,s);else if(t.ty==="fl")r=new SVGFillStyleData(this,t,s);else if(t.ty==="gf"||t.ty==="gs"){var d=t.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData;r=new d(this,t,s),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),o.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))}else t.ty==="no"&&(r=new SVGNoStyleData(this,t,s));return(t.ty==="st"||t.ty==="gs")&&(o.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),o.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),o.setAttribute("fill-opacity","0"),t.lj===1&&o.setAttribute("stroke-miterlimit",t.ml)),t.r===2&&o.setAttribute("fill-rule","evenodd"),t.ln&&o.setAttribute("id",t.ln),t.cl&&o.setAttribute("class",t.cl),t.bm&&(o.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(s),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),s=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,s),s},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var s=4;t.ty==="rc"?s=5:t.ty==="el"?s=6:t.ty==="sr"&&(s=7);var o=ShapePropertyFactory.getShapeProp(this,t,s,this),d=new SVGShapeData(e,r,o);return this.shapes.push(d),this.addShapeToModifiers(d),this.addToAnimatedContents(t,d),d},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,s=this.animatedContents.length;r<s;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e=t.styles,r,s=this.stylesList.length;for(r=0;r<s;r+=1)this.stylesList[r].closed||e.push(this.stylesList[r])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,s,o,d,L){var ge=[].concat(d),Mt,er=t.length-1,tr,ir,rr=[],nr=[],ar,sr,lr;for(Mt=er;Mt>=0;Mt-=1){if(lr=this.searchProcessedElement(t[Mt]),lr?e[Mt]=r[lr-1]:t[Mt]._render=L,t[Mt].ty==="fl"||t[Mt].ty==="st"||t[Mt].ty==="gf"||t[Mt].ty==="gs"||t[Mt].ty==="no")lr?e[Mt].style.closed=!1:e[Mt]=this.createStyleElement(t[Mt],o),t[Mt]._render&&e[Mt].style.pElem.parentNode!==s&&s.appendChild(e[Mt].style.pElem),rr.push(e[Mt].style);else if(t[Mt].ty==="gr"){if(!lr)e[Mt]=this.createGroupElement(t[Mt]);else for(ir=e[Mt].it.length,tr=0;tr<ir;tr+=1)e[Mt].prevViewData[tr]=e[Mt].it[tr];this.searchShapes(t[Mt].it,e[Mt].it,e[Mt].prevViewData,e[Mt].gr,o+1,ge,L),t[Mt]._render&&e[Mt].gr.parentNode!==s&&s.appendChild(e[Mt].gr)}else t[Mt].ty==="tr"?(lr||(e[Mt]=this.createTransformElement(t[Mt],s)),ar=e[Mt].transform,ge.push(ar)):t[Mt].ty==="sh"||t[Mt].ty==="rc"||t[Mt].ty==="el"||t[Mt].ty==="sr"?(lr||(e[Mt]=this.createShapeElement(t[Mt],ge,o)),this.setElementStyles(e[Mt])):t[Mt].ty==="tm"||t[Mt].ty==="rd"||t[Mt].ty==="ms"||t[Mt].ty==="pb"||t[Mt].ty==="zz"||t[Mt].ty==="op"?(lr?(sr=e[Mt],sr.closed=!1):(sr=ShapeModifiers.getModifier(t[Mt].ty),sr.init(this,t[Mt]),e[Mt]=sr,this.shapeModifiers.push(sr)),nr.push(sr)):t[Mt].ty==="rp"&&(lr?(sr=e[Mt],sr.closed=!0):(sr=ShapeModifiers.getModifier(t[Mt].ty),e[Mt]=sr,sr.init(this,t,Mt,e),this.shapeModifiers.push(sr),L=!1),nr.push(sr));this.addProcessedElement(t[Mt],Mt+1)}for(er=rr.length,Mt=0;Mt<er;Mt+=1)rr[Mt].closed=!0;for(er=nr.length,Mt=0;Mt<er;Mt+=1)nr[Mt].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e=this.animatedContents.length,r;for(t=0;t<e;t+=1)r=this.animatedContents[t],(this._isFirstFrame||r.element._isAnimated)&&r.data!==!0&&r.fn(r.data,r.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(t,e,r,s,o,d){this.o=t,this.sw=e,this.sc=r,this.fc=s,this.m=o,this.p=d,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!s,m:!0,p:!0}}LetterProps.prototype.update=function(t,e,r,s,o,d){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var L=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,L=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,L=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,L=!0),this.fc!==s&&(this.fc=s,this._mdf.fc=!0,L=!0),this.m!==o&&(this.m=o,this._mdf.m=!0,L=!0),d.length&&(this.p[0]!==d[0]||this.p[1]!==d[1]||this.p[4]!==d[4]||this.p[5]!==d[5]||this.p[12]!==d[12]||this.p[13]!==d[13])&&(this.p=d,this._mdf.p=!0,L=!0),L};function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d&&e.d.sid&&(e.d=t.globalData.slotManager.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!t)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var s,o=this.effectsSequence.length,d=t||this.data.d.k[this.keysIndex].s;for(s=0;s<o;s+=1)r!==this.keysIndex?d=this.effectsSequence[s](d,d.t):d=this.effectsSequence[s](this.currentData,d.t);e!==d&&this.setCurrentData(d),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,s=t.length;r<=s-1&&!(r===s-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e=[],r=0,s=t.length,o,d,L=!1,ge=!1,Mt="";r<s;)L=ge,ge=!1,o=t.charCodeAt(r),Mt=t.charAt(r),FontManager.isCombinedCharacter(o)?L=!0:o>=55296&&o<=56319?FontManager.isRegionalFlag(t,r)?Mt=t.substr(r,14):(d=t.charCodeAt(r+1),d>=56320&&d<=57343&&(FontManager.isModifier(o,d)?(Mt=t.substr(r,2),L=!0):FontManager.isFlagEmoji(t.substr(r,4))?Mt=t.substr(r,4):Mt=t.substr(r,2))):o>56319?(d=t.charCodeAt(r+1),FontManager.isVariationSelector(o)&&(L=!0)):FontManager.isZeroWidthJoiner(o)&&(L=!0,ge=!0),L?(e[e.length-1]+=Mt,L=!1):e.push(Mt),r+=Mt.length;return e},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e=this.elem.globalData.fontManager,r=this.data,s=[],o,d,L,ge=0,Mt,er=r.m.g,tr=0,ir=0,rr=0,nr=[],ar=0,sr=0,lr,cr,ur=e.getFontByName(t.f),or,dr=0,hr=getFontProperties(ur);t.fWeight=hr.weight,t.fStyle=hr.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),d=t.finalText.length,t.finalLineHeight=t.lh;var pr=t.tr/1e3*t.finalSize,mr;if(t.sz)for(var vr=!0,Er=t.sz[0],Cr=t.sz[1],Pr,kr;vr;){kr=this.buildFinalText(t.t),Pr=0,ar=0,d=kr.length,pr=t.tr/1e3*t.finalSize;var Mr=-1;for(o=0;o<d;o+=1)mr=kr[o].charCodeAt(0),L=!1,kr[o]===" "?Mr=o:(mr===13||mr===3)&&(ar=0,L=!0,Pr+=t.finalLineHeight||t.finalSize*1.2),e.chars?(or=e.getCharData(kr[o],ur.fStyle,ur.fFamily),dr=L?0:or.w*t.finalSize/100):dr=e.measureText(kr[o],t.f,t.finalSize),ar+dr>Er&&kr[o]!==" "?(Mr===-1?d+=1:o=Mr,Pr+=t.finalLineHeight||t.finalSize*1.2,kr.splice(o,Mr===o?1:0,"\r"),Mr=-1,ar=0):(ar+=dr,ar+=pr);Pr+=ur.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Cr<Pr?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=kr,d=t.finalText.length,vr=!1)}ar=-pr,dr=0;var Ur=0,$r;for(o=0;o<d;o+=1)if(L=!1,$r=t.finalText[o],mr=$r.charCodeAt(0),mr===13||mr===3?(Ur=0,nr.push(ar),sr=ar>sr?ar:sr,ar=-2*pr,Mt="",L=!0,rr+=1):Mt=$r,e.chars?(or=e.getCharData($r,ur.fStyle,e.getFontByName(t.f).fFamily),dr=L?0:or.w*t.finalSize/100):dr=e.measureText(Mt,t.f,t.finalSize),$r===" "?Ur+=dr+pr:(ar+=dr+pr+Ur,Ur=0),s.push({l:dr,an:dr,add:tr,n:L,anIndexes:[],val:Mt,line:rr,animatorJustifyOffset:0}),er==2){if(tr+=dr,Mt===""||Mt===" "||o===d-1){for((Mt===""||Mt===" ")&&(tr-=dr);ir<=o;)s[ir].an=tr,s[ir].ind=ge,s[ir].extra=dr,ir+=1;ge+=1,tr=0}}else if(er==3){if(tr+=dr,Mt===""||o===d-1){for(Mt===""&&(tr-=dr);ir<=o;)s[ir].an=tr,s[ir].ind=ge,s[ir].extra=dr,ir+=1;tr=0,ge+=1}}else s[ge].ind=ge,s[ge].extra=0,ge+=1;if(t.l=s,sr=ar>sr?ar:sr,nr.push(ar),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=sr,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=nr;var yr=r.a,xr,gr;cr=yr.length;var _r,wr,Ir=[];for(lr=0;lr<cr;lr+=1){for(xr=yr[lr],xr.a.sc&&(t.strokeColorAnim=!0),xr.a.sw&&(t.strokeWidthAnim=!0),(xr.a.fc||xr.a.fh||xr.a.fs||xr.a.fb)&&(t.fillColorAnim=!0),wr=0,_r=xr.s.b,o=0;o<d;o+=1)gr=s[o],gr.anIndexes[lr]=wr,(_r==1&&gr.val!==""||_r==2&&gr.val!==""&&gr.val!==" "||_r==3&&(gr.n||gr.val==" "||o==d-1)||_r==4&&(gr.n||o==d-1))&&(xr.s.rn===1&&Ir.push(wr),wr+=1);r.a[lr].s.totalChars=wr;var Hr=-1,Yr;if(xr.s.rn===1)for(o=0;o<d;o+=1)gr=s[o],Hr!=gr.anIndexes[lr]&&(Hr=gr.anIndexes[lr],Yr=Ir.splice(Math.floor(Math.random()*Ir.length),1)[0]),gr.anIndexes[lr]=Yr}t.yOffset=t.finalLineHeight||t.finalSize*1.2,t.ls=t.ls||0,t.ascent=ur.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=e===void 0?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.setCurrentData(r),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var t=Math.max,e=Math.min,r=Math.floor;function s(d,L){this._currentTextLength=-1,this.k=!1,this.data=L,this.elem=d,this.comp=d.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(d),this.s=PropertyFactory.getProp(d,L.s||{k:0},0,0,this),"e"in L?this.e=PropertyFactory.getProp(d,L.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(d,L.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(d,L.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(d,L.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(d,L.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(d,L.a,0,.01,this),this.dynamicProperties.length||this.getValue()}s.prototype={getMult:function(L){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var ge=0,Mt=0,er=1,tr=1;this.ne.v>0?ge=this.ne.v/100:Mt=-this.ne.v/100,this.xe.v>0?er=1-this.xe.v/100:tr=1+this.xe.v/100;var ir=BezierFactory.getBezierEasing(ge,Mt,er,tr).get,rr=0,nr=this.finalS,ar=this.finalE,sr=this.data.sh;if(sr===2)ar===nr?rr=L>=ar?1:0:rr=t(0,e(.5/(ar-nr)+(L-nr)/(ar-nr),1)),rr=ir(rr);else if(sr===3)ar===nr?rr=L>=ar?0:1:rr=1-t(0,e(.5/(ar-nr)+(L-nr)/(ar-nr),1)),rr=ir(rr);else if(sr===4)ar===nr?rr=0:(rr=t(0,e(.5/(ar-nr)+(L-nr)/(ar-nr),1)),rr<.5?rr*=2:rr=1-2*(rr-.5)),rr=ir(rr);else if(sr===5){if(ar===nr)rr=0;else{var lr=ar-nr;L=e(t(0,L+.5-nr),ar-nr);var cr=-lr/2+L,ur=lr/2;rr=Math.sqrt(1-cr*cr/(ur*ur))}rr=ir(rr)}else sr===6?(ar===nr?rr=0:(L=e(t(0,L+.5-nr),ar-nr),rr=(1+Math.cos(Math.PI+Math.PI*2*L/(ar-nr)))/2),rr=ir(rr)):(L>=r(nr)&&(L-nr<0?rr=t(0,e(e(ar,1)-(nr-L),1)):rr=t(0,e(ar-L,1))),rr=ir(rr));if(this.sm.v!==100){var or=this.sm.v*.01;or===0&&(or=1e-8);var dr=.5-or*.5;rr<dr?rr=0:(rr=(rr-dr)/or,rr>1&&(rr=1))}return rr*this.a.v},getValue:function(L){this.iterateDynamicProperties(),this._mdf=L||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,L&&this.data.r===2&&(this.e.v=this._currentTextLength);var ge=this.data.r===2?1:100/this.data.totalChars,Mt=this.o.v/ge,er=this.s.v/ge+Mt,tr=this.e.v/ge+Mt;if(er>tr){var ir=er;er=tr,tr=ir}this.finalS=er,this.finalE=tr}},extendPrototype([DynamicPropertyContainer],s);function o(d,L,ge){return new s(d,L)}return{getTextSelectorProp:o}}();function TextAnimatorDataProperty(t,e,r){var s={propType:!1},o=PropertyFactory.getProp,d=e.a;this.a={r:d.r?o(t,d.r,0,degToRads,r):s,rx:d.rx?o(t,d.rx,0,degToRads,r):s,ry:d.ry?o(t,d.ry,0,degToRads,r):s,sk:d.sk?o(t,d.sk,0,degToRads,r):s,sa:d.sa?o(t,d.sa,0,degToRads,r):s,s:d.s?o(t,d.s,1,.01,r):s,a:d.a?o(t,d.a,1,0,r):s,o:d.o?o(t,d.o,0,.01,r):s,p:d.p?o(t,d.p,1,0,r):s,sw:d.sw?o(t,d.sw,0,0,r):s,sc:d.sc?o(t,d.sc,1,0,r):s,fc:d.fc?o(t,d.fc,1,0,r):s,fh:d.fh?o(t,d.fh,0,0,r):s,fs:d.fs?o(t,d.fs,0,.01,r):s,fb:d.fb?o(t,d.fb,0,.01,r):s,t:d.t?o(t,d.t,0,0,r):s},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e=this._textData.a.length,r,s=PropertyFactory.getProp;for(t=0;t<e;t+=1)r=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,r,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:s(this._elem,this._textData.p.a,0,0,this),f:s(this._elem,this._textData.p.f,0,0,this),l:s(this._elem,this._textData.p.l,0,0,this),r:s(this._elem,this._textData.p.r,0,0,this),p:s(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=s(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,!(!this._mdf&&!this._isFirstFrame&&!e&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var r=this._moreOptions.alignment.v,s=this._animatorsData,o=this._textData,d=this.mHelper,L=this._renderType,ge=this.renderedLetters.length,Mt,er,tr,ir,rr=t.l,nr,ar,sr,lr,cr,ur,or,dr,hr,pr,mr,vr,Er,Cr,Pr;if(this._hasMaskedPath){if(Pr=this._pathData.m,!this._pathData.n||this._pathData._mdf){var kr=Pr.v;this._pathData.r.v&&(kr=kr.reverse()),nr={tLength:0,segments:[]},ir=kr._length-1;var Mr;for(vr=0,tr=0;tr<ir;tr+=1)Mr=bez.buildBezierData(kr.v[tr],kr.v[tr+1],[kr.o[tr][0]-kr.v[tr][0],kr.o[tr][1]-kr.v[tr][1]],[kr.i[tr+1][0]-kr.v[tr+1][0],kr.i[tr+1][1]-kr.v[tr+1][1]]),nr.tLength+=Mr.segmentLength,nr.segments.push(Mr),vr+=Mr.segmentLength;tr=ir,Pr.v.c&&(Mr=bez.buildBezierData(kr.v[tr],kr.v[0],[kr.o[tr][0]-kr.v[tr][0],kr.o[tr][1]-kr.v[tr][1]],[kr.i[0][0]-kr.v[0][0],kr.i[0][1]-kr.v[0][1]]),nr.tLength+=Mr.segmentLength,nr.segments.push(Mr),vr+=Mr.segmentLength),this._pathData.pi=nr}if(nr=this._pathData.pi,ar=this._pathData.f.v,or=0,ur=1,lr=0,cr=!0,pr=nr.segments,ar<0&&Pr.v.c)for(nr.tLength<Math.abs(ar)&&(ar=-Math.abs(ar)%nr.tLength),or=pr.length-1,hr=pr[or].points,ur=hr.length-1;ar<0;)ar+=hr[ur].partialLength,ur-=1,ur<0&&(or-=1,hr=pr[or].points,ur=hr.length-1);hr=pr[or].points,dr=hr[ur-1],sr=hr[ur],mr=sr.partialLength}ir=rr.length,Mt=0,er=0;var Ur=t.finalSize*1.2*.714,$r=!0,yr,xr,gr,_r,wr;_r=s.length;var Ir,Hr=-1,Yr,Jr,xi,di=ar,Vr=or,Zr=ur,Qr=-1,Ai,Mi,Dr,Lr,Nr,Wr,qr,Fr,Ti="",Xr=this.defaultPropsArray,Si;if(t.j===2||t.j===1){var jr=0,wi=0,ki=t.j===2?-.5:-1,Ii=0,Pi=!0;for(tr=0;tr<ir;tr+=1)if(rr[tr].n){for(jr&&(jr+=wi);Ii<tr;)rr[Ii].animatorJustifyOffset=jr,Ii+=1;jr=0,Pi=!0}else{for(gr=0;gr<_r;gr+=1)yr=s[gr].a,yr.t.propType&&(Pi&&t.j===2&&(wi+=yr.t.v*ki),xr=s[gr].s,Ir=xr.getMult(rr[tr].anIndexes[gr],o.a[gr].s.totalChars),Ir.length?jr+=yr.t.v*Ir[0]*ki:jr+=yr.t.v*Ir*ki);Pi=!1}for(jr&&(jr+=wi);Ii<tr;)rr[Ii].animatorJustifyOffset=jr,Ii+=1}for(tr=0;tr<ir;tr+=1){if(d.reset(),Ai=1,rr[tr].n)Mt=0,er+=t.yOffset,er+=$r?1:0,ar=di,$r=!1,this._hasMaskedPath&&(or=Vr,ur=Zr,hr=pr[or].points,dr=hr[ur-1],sr=hr[ur],mr=sr.partialLength,lr=0),Ti="",Fr="",Wr="",Si="",Xr=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Qr!==rr[tr].line){switch(t.j){case 1:ar+=vr-t.lineWidths[rr[tr].line];break;case 2:ar+=(vr-t.lineWidths[rr[tr].line])/2;break}Qr=rr[tr].line}Hr!==rr[tr].ind&&(rr[Hr]&&(ar+=rr[Hr].extra),ar+=rr[tr].an/2,Hr=rr[tr].ind),ar+=r[0]*rr[tr].an*.005;var Di=0;for(gr=0;gr<_r;gr+=1)yr=s[gr].a,yr.p.propType&&(xr=s[gr].s,Ir=xr.getMult(rr[tr].anIndexes[gr],o.a[gr].s.totalChars),Ir.length?Di+=yr.p.v[0]*Ir[0]:Di+=yr.p.v[0]*Ir),yr.a.propType&&(xr=s[gr].s,Ir=xr.getMult(rr[tr].anIndexes[gr],o.a[gr].s.totalChars),Ir.length?Di+=yr.a.v[0]*Ir[0]:Di+=yr.a.v[0]*Ir);for(cr=!0,this._pathData.a.v&&(ar=rr[0].an*.5+(vr-this._pathData.f.v-rr[0].an*.5-rr[rr.length-1].an*.5)*Hr/(ir-1),ar+=this._pathData.f.v);cr;)lr+mr>=ar+Di||!hr?(Er=(ar+Di-lr)/sr.partialLength,Jr=dr.point[0]+(sr.point[0]-dr.point[0])*Er,xi=dr.point[1]+(sr.point[1]-dr.point[1])*Er,d.translate(-r[0]*rr[tr].an*.005,-(r[1]*Ur)*.01),cr=!1):hr&&(lr+=sr.partialLength,ur+=1,ur>=hr.length&&(ur=0,or+=1,pr[or]?hr=pr[or].points:Pr.v.c?(ur=0,or=0,hr=pr[or].points):(lr-=sr.partialLength,hr=null)),hr&&(dr=sr,sr=hr[ur],mr=sr.partialLength));Yr=rr[tr].an/2-rr[tr].add,d.translate(-Yr,0,0)}else Yr=rr[tr].an/2-rr[tr].add,d.translate(-Yr,0,0),d.translate(-r[0]*rr[tr].an*.005,-r[1]*Ur*.01,0);for(gr=0;gr<_r;gr+=1)yr=s[gr].a,yr.t.propType&&(xr=s[gr].s,Ir=xr.getMult(rr[tr].anIndexes[gr],o.a[gr].s.totalChars),(Mt!==0||t.j!==0)&&(this._hasMaskedPath?Ir.length?ar+=yr.t.v*Ir[0]:ar+=yr.t.v*Ir:Ir.length?Mt+=yr.t.v*Ir[0]:Mt+=yr.t.v*Ir));for(t.strokeWidthAnim&&(Dr=t.sw||0),t.strokeColorAnim&&(t.sc?Mi=[t.sc[0],t.sc[1],t.sc[2]]:Mi=[0,0,0]),t.fillColorAnim&&t.fc&&(Lr=[t.fc[0],t.fc[1],t.fc[2]]),gr=0;gr<_r;gr+=1)yr=s[gr].a,yr.a.propType&&(xr=s[gr].s,Ir=xr.getMult(rr[tr].anIndexes[gr],o.a[gr].s.totalChars),Ir.length?d.translate(-yr.a.v[0]*Ir[0],-yr.a.v[1]*Ir[1],yr.a.v[2]*Ir[2]):d.translate(-yr.a.v[0]*Ir,-yr.a.v[1]*Ir,yr.a.v[2]*Ir));for(gr=0;gr<_r;gr+=1)yr=s[gr].a,yr.s.propType&&(xr=s[gr].s,Ir=xr.getMult(rr[tr].anIndexes[gr],o.a[gr].s.totalChars),Ir.length?d.scale(1+(yr.s.v[0]-1)*Ir[0],1+(yr.s.v[1]-1)*Ir[1],1):d.scale(1+(yr.s.v[0]-1)*Ir,1+(yr.s.v[1]-1)*Ir,1));for(gr=0;gr<_r;gr+=1){if(yr=s[gr].a,xr=s[gr].s,Ir=xr.getMult(rr[tr].anIndexes[gr],o.a[gr].s.totalChars),yr.sk.propType&&(Ir.length?d.skewFromAxis(-yr.sk.v*Ir[0],yr.sa.v*Ir[1]):d.skewFromAxis(-yr.sk.v*Ir,yr.sa.v*Ir)),yr.r.propType&&(Ir.length?d.rotateZ(-yr.r.v*Ir[2]):d.rotateZ(-yr.r.v*Ir)),yr.ry.propType&&(Ir.length?d.rotateY(yr.ry.v*Ir[1]):d.rotateY(yr.ry.v*Ir)),yr.rx.propType&&(Ir.length?d.rotateX(yr.rx.v*Ir[0]):d.rotateX(yr.rx.v*Ir)),yr.o.propType&&(Ir.length?Ai+=(yr.o.v*Ir[0]-Ai)*Ir[0]:Ai+=(yr.o.v*Ir-Ai)*Ir),t.strokeWidthAnim&&yr.sw.propType&&(Ir.length?Dr+=yr.sw.v*Ir[0]:Dr+=yr.sw.v*Ir),t.strokeColorAnim&&yr.sc.propType)for(Nr=0;Nr<3;Nr+=1)Ir.length?Mi[Nr]+=(yr.sc.v[Nr]-Mi[Nr])*Ir[0]:Mi[Nr]+=(yr.sc.v[Nr]-Mi[Nr])*Ir;if(t.fillColorAnim&&t.fc){if(yr.fc.propType)for(Nr=0;Nr<3;Nr+=1)Ir.length?Lr[Nr]+=(yr.fc.v[Nr]-Lr[Nr])*Ir[0]:Lr[Nr]+=(yr.fc.v[Nr]-Lr[Nr])*Ir;yr.fh.propType&&(Ir.length?Lr=addHueToRGB(Lr,yr.fh.v*Ir[0]):Lr=addHueToRGB(Lr,yr.fh.v*Ir)),yr.fs.propType&&(Ir.length?Lr=addSaturationToRGB(Lr,yr.fs.v*Ir[0]):Lr=addSaturationToRGB(Lr,yr.fs.v*Ir)),yr.fb.propType&&(Ir.length?Lr=addBrightnessToRGB(Lr,yr.fb.v*Ir[0]):Lr=addBrightnessToRGB(Lr,yr.fb.v*Ir))}}for(gr=0;gr<_r;gr+=1)yr=s[gr].a,yr.p.propType&&(xr=s[gr].s,Ir=xr.getMult(rr[tr].anIndexes[gr],o.a[gr].s.totalChars),this._hasMaskedPath?Ir.length?d.translate(0,yr.p.v[1]*Ir[0],-yr.p.v[2]*Ir[1]):d.translate(0,yr.p.v[1]*Ir,-yr.p.v[2]*Ir):Ir.length?d.translate(yr.p.v[0]*Ir[0],yr.p.v[1]*Ir[1],-yr.p.v[2]*Ir[2]):d.translate(yr.p.v[0]*Ir,yr.p.v[1]*Ir,-yr.p.v[2]*Ir));if(t.strokeWidthAnim&&(Wr=Dr<0?0:Dr),t.strokeColorAnim&&(qr="rgb("+Math.round(Mi[0]*255)+","+Math.round(Mi[1]*255)+","+Math.round(Mi[2]*255)+")"),t.fillColorAnim&&t.fc&&(Fr="rgb("+Math.round(Lr[0]*255)+","+Math.round(Lr[1]*255)+","+Math.round(Lr[2]*255)+")"),this._hasMaskedPath){if(d.translate(0,-t.ls),d.translate(0,r[1]*Ur*.01+er,0),this._pathData.p.v){Cr=(sr.point[1]-dr.point[1])/(sr.point[0]-dr.point[0]);var Oi=Math.atan(Cr)*180/Math.PI;sr.point[0]<dr.point[0]&&(Oi+=180),d.rotate(-Oi*Math.PI/180)}d.translate(Jr,xi,0),ar-=r[0]*rr[tr].an*.005,rr[tr+1]&&Hr!==rr[tr+1].ind&&(ar+=rr[tr].an/2,ar+=t.tr*.001*t.finalSize)}else{switch(d.translate(Mt,er,0),t.ps&&d.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:d.translate(rr[tr].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[rr[tr].line]),0,0);break;case 2:d.translate(rr[tr].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[rr[tr].line])/2,0,0);break}d.translate(0,-t.ls),d.translate(Yr,0,0),d.translate(r[0]*rr[tr].an*.005,r[1]*Ur*.01,0),Mt+=rr[tr].l+t.tr*.001*t.finalSize}L==="html"?Ti=d.toCSS():L==="svg"?Ti=d.to2dCSS():Xr=[d.props[0],d.props[1],d.props[2],d.props[3],d.props[4],d.props[5],d.props[6],d.props[7],d.props[8],d.props[9],d.props[10],d.props[11],d.props[12],d.props[13],d.props[14],d.props[15]],Si=Ai}ge<=tr?(wr=new LetterProps(Si,Wr,qr,Fr,Ti,Xr),this.renderedLetters.push(wr),ge+=1,this.lettersChangedFlag=!0):(wr=this.renderedLetters[tr],this.lettersChangedFlag=wr.update(Si,Wr,qr,Fr,Ti,Xr)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)},ITextElement.prototype.createPathShape=function(t,e){var r,s=e.length,o,d="";for(r=0;r<s;r+=1)e[r].ty==="sh"&&(o=e[r].ks.k,d+=buildShapeString(o,o.i.length,!0,t));return d},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,s,o){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0);break}e.translate(s,o,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(t[0]*255)+","+Math.round(t[1]*255)+","+Math.round(t[2]*255)+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,s=[],o="";e<r;)t[e]==="\r"||t[e]==="�"?(s.push(o),o=""):o+=t[e],e+=1;return s.push(o),s},SVGTextLottieElement.prototype.buildShapeData=function(t,e){if(t.shapes&&t.shapes.length){var r=t.shapes[0];if(r.it){var s=r.it[r.it.length-1];s.s&&(s.s.k[0]=e,s.s.k[1]=e)}}return t},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var t,e,r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var s=this.globalData.fontManager.getFontByName(r.f);if(s.fClass)this.layerElement.setAttribute("class",s.fClass);else{this.layerElement.setAttribute("font-family",s.fFamily);var o=r.fWeight,d=r.fStyle;this.layerElement.setAttribute("font-style",d),this.layerElement.setAttribute("font-weight",o)}this.layerElement.setAttribute("aria-label",r.t);var L=r.l||[],ge=!!this.globalData.fontManager.chars;e=L.length;var Mt,er=this.mHelper,tr="",ir=this.data.singleShape,rr=0,nr=0,ar=!0,sr=r.tr*.001*r.finalSize;if(ir&&!ge&&!r.sz){var lr=this.textContainer,cr="start";switch(r.j){case 1:cr="end";break;case 2:cr="middle";break;default:cr="start";break}lr.setAttribute("text-anchor",cr),lr.setAttribute("letter-spacing",sr);var ur=this.buildTextContents(r.finalText);for(e=ur.length,nr=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)Mt=this.textSpans[t].span||createNS("tspan"),Mt.textContent=ur[t],Mt.setAttribute("x",0),Mt.setAttribute("y",nr),Mt.style.display="inherit",lr.appendChild(Mt),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=Mt,nr+=r.finalLineHeight;this.layerElement.appendChild(lr)}else{var or=this.textSpans.length,dr;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!ge||!ir||t===0){if(Mt=or>t?this.textSpans[t].span:createNS(ge?"g":"text"),or<=t){if(Mt.setAttribute("stroke-linecap","butt"),Mt.setAttribute("stroke-linejoin","round"),Mt.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=Mt,ge){var hr=createNS("g");Mt.appendChild(hr),this.textSpans[t].childSpan=hr}this.textSpans[t].span=Mt,this.layerElement.appendChild(Mt)}Mt.style.display="inherit"}if(er.reset(),ir&&(L[t].n&&(rr=-sr,nr+=r.yOffset,nr+=ar?1:0,ar=!1),this.applyTextPropertiesToMatrix(r,er,L[t].line,rr,nr),rr+=L[t].l||0,rr+=sr),ge){dr=this.globalData.fontManager.getCharData(r.finalText[t],s.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);var pr;if(dr.t===1)pr=new SVGCompElement(dr.data,this.globalData,this);else{var mr=emptyShapeData;dr.data&&dr.data.shapes&&(mr=this.buildShapeData(dr.data,r.finalSize)),pr=new SVGShapeElement(mr,this.globalData,this)}if(this.textSpans[t].glyph){var vr=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(vr.layerElement),vr.destroy()}this.textSpans[t].glyph=pr,pr._debug=!0,pr.prepareFrame(0),pr.renderFrame(),this.textSpans[t].childSpan.appendChild(pr.layerElement),dr.t===1&&this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else ir&&Mt.setAttribute("transform","translate("+er.props[12]+","+er.props[13]+")"),Mt.textContent=L[t].val,Mt.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}ir&&Mt&&Mt.setAttribute("d",tr)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e=this.textSpans.length,r;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<e;t+=1)r=this.textSpans[t].glyph,r&&(r.prepareFrame(this.comp.renderedFrame-this.data.st),r._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var t,e,r=this.textAnimator.renderedLetters,s=this.textProperty.currentData.l;e=s.length;var o,d,L;for(t=0;t<e;t+=1)s[t].n||(o=r[t],d=this.textSpans[t].span,L=this.textSpans[t].glyph,L&&L.renderFrame(),o._mdf.m&&d.setAttribute("transform",o.m),o._mdf.o&&d.setAttribute("op
74acity",o.o),o._mdf.sw&&d.setAttribute("stroke-width",o.sw),o._mdf.sc&&d.setAttribute("stroke",o.sc),o._mdf.fc&&d.setAttribute("fill",o.fc))}};function ISolidElement(t,e,r){this.initElement(t,e,r)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)};function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),s=createNS("rect");s.setAttribute("width",t.w),s.setAttribute("height",t.h),s.setAttribute("x",0),s.setAttribute("y",0);var o=createElementID();r.setAttribute("id",o),r.appendChild(s),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+o+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(t){var e=0,r=this.layers.length;for(e=0;e<r;e+=1)if(this.layers[e].ind===t)return e;return-1},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!(e[t]||this.layers[t].ty===99)){e[t]=!0;var r=this.createItem(this.layers[t]);if(e[t]=r,getExpressionsPlugin()&&(this.layers[t].ty===0&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt){var s="tp"in this.layers[t]?this.findIndexByInd(this.layers[t].tp):t-1;if(s===-1)return;if(!this.elements[s]||this.elements[s]===!0)this.buildItem(s),this.addPendingElement(r);else{var o=e[s],d=o.getMatte(this.layers[t].tt);r.setMatte(d)}}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){var s="tp"in t.data?this.findIndexByInd(t.data.tp):e-1,o=this.elements[s],d=o.getMatte(this.layers[e].tt);t.setMatte(d);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(!(this.renderedFrame===t||this.destroyed)){t===null?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var e,r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var s=0,o;s<e;)this.elements[s]&&this.elements[s]!==!0&&this.elements[s].getBaseElement()&&
vendor: 96,791 bytes, line 74
74(o=this.elements[s].getBaseElement()),s+=1;o?this.layerElement.insertBefore(r,o):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!e.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,s=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=s-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)};function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var s=createNS("title"),o=createElementID();s.setAttribute("id",o),s.textContent=e.title,this.svgElement.appendChild(s),r+=o}if(e&&e.description){var d=createNS("desc"),L=createElementID();d.setAttribute("id",L),d.textContent=e.description,this.svgElement.appendChild(d),r+=" "+L}r&&this.svgElement.setAttribute("aria-labelledby",r);var ge=createNS("defs");this.svgElement.appendChild(ge);var Mt=createNS("g");this.svgElement.appendChild(Mt),this.layerElement=Mt,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&e.hideOnTransparent===!1),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"},width:e&&e.width,height:e&&e.height,runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:ge,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(e){var r,s=e.length,o="_";for(r=0;r<s;r+=1)o+=e[r].transform.key+"_";var d=this.sequences[o];return d||(d={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[o]=d,this.sequenceList.push(d)),d},processSequence:function(e,r){for(var s=0,o=e.transforms.length,d=r;s<o&&!r;){if(e.transforms[s].transform.mProps._mdf){d=!0;break}s+=1}if(d)for(e.finalTransform.reset(),s=o-1;s>=0;s-=1)e.finalTransform.multiply(e.transforms[s].transform.mProps.v);e._mdf=d},processSequences:function(e){var r,s=this.sequenceList.length;for(r=0;r<s;r+=1)this.processSequence(this.sequenceList[r],e)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var e="__lottie_element_luma_buffer",r=null,s=null,o=null;function d(){var Mt=createNS("svg"),er=createNS("filter"),tr=createNS("feColorMatrix");return er.setAttribute("id",e),tr.setAttribute("type","matrix"),tr.setAttribute("color-interpolation-filters","sRGB"),tr.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),er.appendChild(tr),Mt.appendChild(er),Mt.setAttribute("id",e+"_svg"),featureSupport.svgLumaHidden&&(Mt.style.display="none"),Mt}function L(){r||(o=d(),document.body.appendChild(o),r=createTag("canvas"),s=r.getContext("2d"),s.filter="url(#"+e+")",s.fillStyle="rgba(0,0,0,0)",s.fillRect(0,0,1,1))}function ge(Mt){return r||L(),r.width=Mt.width,r.height=Mt.height,s.filter="url(#"+e+")",r}return{load:L,get:ge}};function createCanvas(t,e){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(t,e);var r=createTag("canvas");return r.width=t,r.height=e,r}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(t){var e,r=t.data.ef?t.data.ef.length:0;this.filters=[];var s;for(e=0;e<r;e+=1){s=null;var o=t.data.ef[e].ty;if(registeredEffects[o]){var d=registeredEffects[o].effect;s=new d(t.effectsManager.effectElements[e],t)}s&&this.filters.push(s)}this.filters.length&&t.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},CVEffects.prototype.getEffects=function(t){var e,r=this.filters.length,s=[];for(e=0;e<r;e+=1)this.filters[e].type===t&&s.push(this.filters[e]);return s};function registerEffect(t,e){registeredEffects[t]={effect:e}}function CVMaskElement(t,e){this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var r,s=this.masksProperties.length,o=!1;for(r=0;r<s;r+=1)this.masksProperties[r].mode!=="n"&&(o=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);this.hasMasks=o,o&&this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t=this.element.finalTransform.mat,e=this.element.canvasContext,r,s=this.masksProperties.length,o,d,L;for(e.beginPath(),r=0;r<s;r+=1)if(this.masksProperties[r].mode!=="n"){this.masksProperties[r].inv&&(e.moveTo(0,0),e.lineTo(this.element.globalData.compSize.w,0),e.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),e.lineTo(0,this.element.globalData.compSize.h),e.lineTo(0,0)),L=this.viewData[r].v,o=t.applyToPointArray(L.v[0][0],L.v[0][1],0),e.moveTo(o[0],o[1]);var ge,Mt=L._length;for(ge=1;ge<Mt;ge+=1)d=t.applyToTriplePoints(L.o[ge-1],L.i[ge],L.v[ge]),e.bezierCurveTo(d[0],d[1],d[2],d[3],d[4],d[5]);d=t.applyToTriplePoints(L.o[ge-1],L.i[0],L.v[0]),e.bezierCurveTo(d[0],d[1],d[2],d[3],d[4],d[5])}this.element.globalData.renderer.save(!0),e.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,r=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(r);var s=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(s),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var r=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=r}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0],r=e.getContext("2d");this.clearCanvas(r),r.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],r=e.getContext("2d");this.clearCanvas(r),r.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var s=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(s.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var o=assetLoader.getLumaCanvas(this.canvasContext.canvas),d=o.getContext("2d");d.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(o,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var r=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(r),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(r),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(t,e,r,s){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var o=4;e.ty==="rc"?o=5:e.ty==="el"?o=6:e.ty==="sr"&&(o=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,o,t);var d,L=r.length,ge;for(d=0;d<L;d+=1)r[d].closed||(ge={transforms:s.addTransformSequence(r[d].transforms),trNodes:[]},this.styledShapes.push(ge),r[d].elements.push(ge))}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:t.hd===!0},s={};if(t.ty==="fl"||t.ty==="st"?(s.c=PropertyFactory.getProp(this,t.c,1,255,this),s.c.k||(r.co="rgb("+bmFloor(s.c.v[0])+","+bmFloor(s.c.v[1])+","+bmFloor(s.c.v[2])+")")):(t.ty==="gf"||t.ty==="gs")&&(s.s=PropertyFactory.getProp(this,t.s,1,null,this),s.e=PropertyFactory.getProp(this,t.e,1,null,this),s.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),s.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),s.g=new GradientProperty(this,t.g,this)),s.o=PropertyFactory.getProp(this,t.o,0,.01,this),t.ty==="st"||t.ty==="gs"){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],t.lj==1&&(r.ml=t.ml),s.w=PropertyFactory.getProp(this,t.w,0,null,this),s.w.k||(r.wi=s.w.v),t.d){var o=new DashProperty(this,t.d,"canvas",this);s.d=o,s.d.k||(r.da=s.d.dashArray,r.do=s.d.dashoffset[0])}}else r.r=t.r===2?"evenodd":"nonzero";return this.stylesList.push(r),s.style=r,s},CVShapeElement.prototype.createGroupElement=function(){var t={it:[],prevViewData:[]};return t},CVShapeElement.prototype.createTransformElement=function(t){var e={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}};return e},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,s,o){var d,L=t.length-1,ge,Mt,er=[],tr=[],ir,rr,nr,ar=[].concat(o);for(d=L;d>=0;d-=1){if(ir=this.searchProcessedElement(t[d]),ir?e[d]=r[ir-1]:t[d]._shouldRender=s,t[d].ty==="fl"||t[d].ty==="st"||t[d].ty==="gf"||t[d].ty==="gs")ir?e[d].style.closed=!1:e[d]=this.createStyleElement(t[d],ar),er.push(e[d].style);else if(t[d].ty==="gr"){if(!ir)e[d]=this.createGroupElement(t[d]);else for(Mt=e[d].it.length,ge=0;ge<Mt;ge+=1)e[d].prevViewData[ge]=e[d].it[ge];this.searchShapes(t[d].it,e[d].it,e[d].prevViewData,s,ar)}else t[d].ty==="tr"?(ir||(nr=this.createTransformElement(t[d]),e[d]=nr),ar.push(e[d]),this.addTransformToStyleList(e[d])):t[d].ty==="sh"||t[d].ty==="rc"||t[d].ty==="el"||t[d].ty==="sr"?ir||(e[d]=this.createShapeElement(t[d])):t[d].ty==="tm"||t[d].ty==="rd"||t[d].ty==="pb"||t[d].ty==="zz"||t[d].ty==="op"?(ir?(rr=e[d],rr.closed=!1):(rr=ShapeModifiers.getModifier(t[d].ty),rr.init(this,t[d]),e[d]=rr,this.shapeModifiers.push(rr)),tr.push(rr)):t[d].ty==="rp"&&(ir?(rr=e[d],rr.closed=!0):(rr=ShapeModifiers.getModifier(t[d].ty),e[d]=rr,rr.init(this,t,d,e),this.shapeModifiers.push(rr),s=!1),tr.push(rr));this.addProcessedElement(t[d],d+1)}for(this.removeTransformFromStyleList(),this.closeStyles(er),L=tr.length,d=0;d<L;d+=1)tr[d].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e=this.stylesList.length,r,s,o,d,L,ge,Mt=this.globalData.renderer,er=this.globalData.canvasContext,tr,ir;for(t=0;t<e;t+=1)if(ir=this.stylesList[t],tr=ir.type,!((tr==="st"||tr==="gs")&&ir.wi===0||!ir.data._shouldRender||ir.coOp===0||this.globalData.currentGlobalAlpha===0)){for(Mt.save(),L=ir.elements,tr==="st"||tr==="gs"?(Mt.ctxStrokeStyle(tr==="st"?ir.co:ir.grd),Mt.ctxLineWidth(ir.wi),Mt.ctxLineCap(ir.lc),Mt.ctxLineJoin(ir.lj),Mt.ctxMiterLimit(ir.ml||0)):Mt.ctxFillStyle(tr==="fl"?ir.co:ir.grd),Mt.ctxOpacity(ir.coOp),tr!=="st"&&tr!=="gs"&&er.beginPath(),Mt.ctxTransform(ir.preTransforms.finalTransform.props),s=L.length,r=0;r<s;r+=1){for((tr==="st"||tr==="gs")&&(er.beginPath(),ir.da&&(er.setLineDash(ir.da),er.lineDashOffset=ir.do)),ge=L[r].trNodes,d=ge.length,o=0;o<d;o+=1)ge[o].t==="m"?er.moveTo(ge[o].p[0],ge[o].p[1]):ge[o].t==="c"?er.bezierCurveTo(ge[o].pts[0],ge[o].pts[1],ge[o].pts[2],ge[o].pts[3],ge[o].pts[4],ge[o].pts[5]):er.closePath();(tr==="st"||tr==="gs")&&(Mt.ctxStroke(),ir.da&&er.setLineDash(this.dashResetter))}tr!=="st"&&tr!=="gs"&&this.globalData.renderer.ctxFill(ir.r),Mt.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,s){var o,d=e.length-1,L;for(L=t,o=d;o>=0;o-=1)e[o].ty==="tr"?(L=r[o].transform,this.renderShapeTransform(t,L)):e[o].ty==="sh"||e[o].ty==="el"||e[o].ty==="rc"||e[o].ty==="sr"?this.renderPath(e[o],r[o]):e[o].ty==="fl"?this.renderFill(e[o],r[o],L):e[o].ty==="st"?this.renderStroke(e[o],r[o],L):e[o].ty==="gf"||e[o].ty==="gs"?this.renderGradientFill(e[o],r[o],L):e[o].ty==="gr"?this.renderShape(L,e[o].it,r[o].it):e[o].ty;s&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r=t.trNodes,s=e.paths,o,d,L,ge=s._length;r.length=0;var Mt=t.transforms.finalTransform;for(L=0;L<ge;L+=1){var er=s.shapes[L];if(er&&er.v){for(d=er._length,o=1;o<d;o+=1)o===1&&r.push({t:"m",p:Mt.applyToPointArray(er.v[0][0],er.v[0][1],0)}),r.push({t:"c",pts:Mt.applyToTriplePoints(er.o[o-1],er.i[o],er.v[o])});d===1&&r.push({t:"m",p:Mt.applyToPointArray(er.v[0][0],er.v[0][1],0)}),er.c&&d&&(r.push({t:"c",pts:Mt.applyToTriplePoints(er.o[o-1],er.i[0],er.v[0])}),r.push({t:"z"}))}}t.trNodes=r}},CVShapeElement.prototype.renderPath=function(t,e){if(t.hd!==!0&&t._shouldRender){var r,s=e.styledShapes.length;for(r=0;r<s;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var s=e.style;(e.c._mdf||this._isFirstFrame)&&(s.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(s.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var s=e.style,o;if(!s.grd||e.g._mdf||e.s._mdf||e.e._mdf||t.t!==1&&(e.h._mdf||e.a._mdf)){var d=this.globalData.canvasContext,L=e.s.v,ge=e.e.v;if(t.t===1)o=d.createLinearGradient(L[0],L[1],ge[0],ge[1]);else{var Mt=Math.sqrt(Math.pow(L[0]-ge[0],2)+Math.pow(L[1]-ge[1],2)),er=Math.atan2(ge[1]-L[1],ge[0]-L[0]),tr=e.h.v;tr>=1?tr=.99:tr<=-1&&(tr=-.99);var ir=Mt*tr,rr=Math.cos(er+e.a.v)*ir+L[0],nr=Math.sin(er+e.a.v)*ir+L[1];o=d.createRadialGradient(rr,nr,0,L[0],L[1],Mt)}var ar,sr=t.g.p,lr=e.g.c,cr=1;for(ar=0;ar<sr;ar+=1)e.g._hasOpacity&&e.g._collapsable&&(cr=e.g.o[ar*2+1]),o.addColorStop(lr[ar*4]/100,"rgba("+lr[ar*4+1]+","+lr[ar*4+2]+","+lr[ar*4+3]+","+cr+")");s.grd=o}s.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var s=e.style,o=e.d;o&&(o._mdf||this._isFirstFrame)&&(s.da=o.dashArray,s.do=o.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(s.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(s.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(s.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var s=this.globalData.fontManager.getFontByName(t.f),o,d,L=t.l,ge=this.mHelper;this.stroke=r,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,d=t.finalText.length;var Mt,er,tr,ir,rr,nr,ar,sr,lr,cr,ur=this.data.singleShape,or=t.tr*.001*t.finalSize,dr=0,hr=0,pr=!0,mr=0;for(o=0;o<d;o+=1){Mt=this.globalData.fontManager.getCharData(t.finalText[o],s.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),er=Mt&&Mt.data||{},ge.reset(),ur&&L[o].n&&(dr=-or,hr+=t.yOffset,hr+=pr?1:0,pr=!1),rr=er.shapes?er.shapes[0].it:[],ar=rr.length,ge.scale(t.finalSize/100,t.finalSize/100),ur&&this.applyTextPropertiesToMatrix(t,ge,L[o].line,dr,hr),lr=createSizedArray(ar-1);var vr=0;for(nr=0;nr<ar;nr+=1)if(rr[nr].ty==="sh"){for(ir=rr[nr].ks.k.i.length,sr=rr[nr].ks.k,cr=[],tr=1;tr<ir;tr+=1)tr===1&&cr.push(ge.applyToX(sr.v[0][0],sr.v[0][1],0),ge.applyToY(sr.v[0][0],sr.v[0][1],0)),cr.push(ge.applyToX(sr.o[tr-1][0],sr.o[tr-1][1],0),ge.applyToY(sr.o[tr-1][0],sr.o[tr-1][1],0),ge.applyToX(sr.i[tr][0],sr.i[tr][1],0),ge.applyToY(sr.i[tr][0],sr.i[tr][1],0),ge.applyToX(sr.v[tr][0],sr.v[tr][1],0),ge.applyToY(sr.v[tr][0],sr.v[tr][1],0));cr.push(ge.applyToX(sr.o[tr-1][0],sr.o[tr-1][1],0),ge.applyToY(sr.o[tr-1][0],sr.o[tr-1][1],0),ge.applyToX(sr.i[0][0],sr.i[0][1],0),ge.applyToY(sr.i[0][0],sr.i[0][1],0),ge.applyToX(sr.v[0][0],sr.v[0][1],0),ge.applyToY(sr.v[0][0],sr.v[0][1],0)),lr[vr]=cr,vr+=1}ur&&(dr+=L[o].l,dr+=or),this.textSpans[mr]?this.textSpans[mr].elem=lr:this.textSpans[mr]={elem:lr},mr+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var t=this.canvasContext;t.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var e,r,s,o,d,L,ge=this.textAnimator.renderedLetters,Mt=this.textProperty.currentData.l;r=Mt.length;var er,tr=null,ir=null,rr=null,nr,ar,sr=this.globalData.renderer;for(e=0;e<r;e+=1)if(!Mt[e].n){if(er=ge[e],er&&(sr.save(),sr.ctxTransform(er.p),sr.ctxOpacity(er.o)),this.fill){for(er&&er.fc?tr!==er.fc&&(sr.ctxFillStyle(er.fc),tr=er.fc):tr!==this.values.fill&&(tr=this.values.fill,sr.ctxFillStyle(this.values.fill)),nr=this.textSpans[e].elem,o=nr.length,this.globalData.canvasContext.beginPath(),s=0;s<o;s+=1)for(ar=nr[s],L=ar.length,this.globalData.canvasContext.moveTo(ar[0],ar[1]),d=2;d<L;d+=6)this.globalData.canvasContext.bezierCurveTo(ar[d],ar[d+1],ar[d+2],ar[d+3],ar[d+4],ar[d+5]);this.globalData.canvasContext.closePath(),sr.ctxFill()}if(this.stroke){for(er&&er.sw?rr!==er.sw&&(rr=er.sw,sr.ctxLineWidth(er.sw)):rr!==this.values.sWidth&&(rr=this.values.sWidth,sr.ctxLineWidth(this.values.sWidth)),er&&er.sc?ir!==er.sc&&(ir=er.sc,sr.ctxStrokeStyle(er.sc)):ir!==this.values.stroke&&(ir=this.values.stroke,sr.ctxStrokeStyle(this.values.stroke)),nr=this.textSpans[e].elem,o=nr.length,this.globalData.canvasContext.beginPath(),s=0;s<o;s+=1)for(ar=nr[s],L=ar.length,this.globalData.canvasContext.moveTo(ar[0],ar[1]),d=2;d<L;d+=6)this.globalData.canvasContext.bezierCurveTo(ar[d],ar[d+1],ar[d+2],ar[d+3],ar[d+4],ar[d+5]);this.globalData.canvasContext.closePath(),sr.ctxStroke()}er&&this.globalData.renderer.restore()}};function CVImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e=t.getContext("2d"),r=this.img.width,s=this.img.height,o=r/s,d=this.assetData.w/this.assetData.h,L,ge,Mt=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o>d&&Mt==="xMidYMid slice"||o<d&&Mt!=="xMidYMid slice"?(ge=s,L=ge*d):(L=r,ge=L/d),e.drawImage(this.img,(r-L)/2,(s-ge)/2,L,ge,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(t,e,r){this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRendererBase.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(t){t[0]===1&&t[1]===0&&t[4]===0&&t[5]===1&&t[12]===0&&t[13]===0||this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRendererBase.prototype.ctxOpacity=function(t){this.canvasContext.globalAlpha*=t<0?0:t},CanvasRendererBase.prototype.ctxFillStyle=function(t){this.canvasContext.fillStyle=t},CanvasRendererBase.prototype.ctxStrokeStyle=function(t){this.canvasContext.strokeStyle=t},CanvasRendererBase.prototype.ctxLineWidth=function(t){this.canvasContext.lineWidth=t},CanvasRendererBase.prototype.ctxLineCap=function(t){this.canvasContext.lineCap=t},CanvasRendererBase.prototype.ctxLineJoin=function(t){this.canvasContext.lineJoin=t},CanvasRendererBase.prototype.ctxMiterLimit=function(t){this.canvasContext.miterLimit=t},CanvasRendererBase.prototype.ctxFill=function(t){this.canvasContext.fill(t)},CanvasRendererBase.prototype.ctxFillRect=function(t,e,r,s){this.canvasContext.fillRect(t,e,r,s)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(t){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}t&&(this.globalData.blendMode="source-over"),this.contextData.restore(t)},CanvasRendererBase.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(t,e){this.reset();var r,s;t?(r=t,s=e,this.canvasContext.canvas.width=r,this.canvasContext.canvas.height=s):(this.animationItem.wrapper&&this.animationItem.container?(r=this.animationItem.wrapper.offsetWidth,s=this.animationItem.wrapper.offsetHeight):(r=this.canvasContext.canvas.width,s=this.canvasContext.canvas.height),this.canvasContext.canvas.width=r*this.renderConfig.dpr,this.canvasContext.canvas.height=s*this.renderConfig.dpr);var o,d;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var L=this.renderConfig.preserveAspectRatio.split(" "),ge=L[1]||"meet",Mt=L[0]||"xMidYMid",er=Mt.substr(0,4),tr=Mt.substr(4);o=r/s,d=this.transformCanvas.w/this.transformCanvas.h,d>o&&ge==="meet"||d<o&&ge==="slice"?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=s/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=s/(this.transformCanvas.h/this.renderConfig.dpr)),er==="xMid"&&(d<o&&ge==="meet"||d>o&&ge==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(s/this.transformCanvas.h))/2*this.renderConfig.dpr:er==="xMax"&&(d<o&&ge==="meet"||d>o&&ge==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(s/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,tr==="YMid"&&(d>o&&ge==="meet"||d<o&&ge==="slice")?this.transformCanvas.ty=(s-this.transformCanvas.h*(r/this.transformCanvas.w))/2*this.renderConfig.dpr:tr==="YMax"&&(d>o&&ge==="meet"||d<o&&ge==="slice")?this.transformCanvas.ty=(s-this.transformCanvas.h*(r/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=s/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");var t,e=this.layers?this.layers.length:0;for(t=e-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if(!(this.renderedFrame===t&&this.renderConfig.clearCanvas===!0&&!e||this.destroyed||t===-1)){this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var r,s=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=s-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=s-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!(e[t]||this.layers[t].ty===99)){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var t,e=15;for(t=0;t<e;t+=1){var r=new CanvasContext;this.stack[t]=r}this._length=e,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}CVContextData.prototype.duplicate=function(){var t=this._length*2,e=0;for(e=this._length;e<t;e+=1)this.stack[e]=new CanvasContext;this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(t){this.cArrPos-=1;var e=this.stack[this.cArrPos],r=e.transform,s,o=this.cTr.props;for(s=0;s<16;s+=1)o[s]=r[s];if(t){this.nativeContext.restore();var d=this.stack[this.cArrPos+1];this.appliedFillStyle=d.fillStyle,this.appliedStrokeStyle=d.strokeStyle,this.appliedLineWidth=d.lineWidth,this.appliedLineCap=d.lineCap,this.appliedLineJoin=d.lineJoin,this.appliedMiterLimit=d.miterLimit}this.nativeContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),(t||e.opacity!==-1&&this.currentOpacity!==e.opacity)&&(this.nativeContext.globalAlpha=e.opacity,this.currentOpacity=e.opacity),this.currentFillStyle=e.fillStyle,this.currentStrokeStyle=e.strokeStyle,this.currentLineWidth=e.lineWidth,this.currentLineCap=e.lineCap,this.currentLineJoin=e.lineJoin,this.currentMiterLimit=e.miterLimit},CVContextData.prototype.save=function(t){t&&this.nativeContext.save();var e=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var r=this.stack[this.cArrPos],s;for(s=0;s<16;s+=1)r.transform[s]=e[s];this.cArrPos+=1;var o=this.stack[this.cArrPos];o.opacity=r.opacity,o.fillStyle=r.fillStyle,o.strokeStyle=r.strokeStyle,o.lineWidth=r.lineWidth,o.lineCap=r.lineCap,o.lineJoin=r.lineJoin,o.miterLimit=r.miterLimit},CVContextData.prototype.setOpacity=function(t){this.stack[this.cArrPos].opacity=t},CVContextData.prototype.setContext=function(t){this.nativeContext=t},CVContextData.prototype.fillStyle=function(t){this.stack[this.cArrPos].fillStyle!==t&&(this.currentFillStyle=t,this.stack[this.cArrPos].fillStyle=t)},CVContextData.prototype.strokeStyle=function(t){this.stack[this.cArrPos].strokeStyle!==t&&(this.currentStrokeStyle=t,this.stack[this.cArrPos].strokeStyle=t)},CVContextData.prototype.lineWidth=function(t){this.stack[this.cArrPos].lineWidth!==t&&(this.currentLineWidth=t,this.stack[this.cArrPos].lineWidth=t)},CVContextData.prototype.lineCap=function(t){this.stack[this.cArrPos].lineCap!==t&&(this.currentLineCap=t,this.stack[this.cArrPos].lineCap=t)},CVContextData.prototype.lineJoin=function(t){this.stack[this.cArrPos].lineJoin!==t&&(this.currentLineJoin=t,this.stack[this.cArrPos].lineJoin=t)},CVContextData.prototype.miterLimit=function(t){this.stack[this.cArrPos].miterLimit!==t&&(this.currentMiterLimit=t,this.stack[this.cArrPos].miterLimit=t)},CVContextData.prototype.transform=function(t){this.transformMat.cloneFromProps(t);var e=this.cTr;this.transformMat.multiply(e),e.cloneFromProps(this.transformMat.props);var r=e.props;this.nativeContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])},CVContextData.prototype.opacity=function(t){var e=this.stack[this.cArrPos].opacity;e*=t<0?0:t,this.stack[this.cArrPos].opacity!==e&&(this.currentOpacity!==t&&(this.nativeContext.globalAlpha=t,this.currentOpacity=t),this.stack[this.cArrPos].opacity=e)},CVContextData.prototype.fill=function(t){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(t)},CVContextData.prototype.fillRect=function(t,e,r,s){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(t,e,r,s)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip();var e,r=this.layers.length;for(e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)};function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:e&&e.clearCanvas!==void 0?e.clearCanvas:!0,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||"",runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var r=this.finalTransform.mat.toCSS();e.transform=r,e.webkitTransform=r}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(t,e,r){this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?(t=createNS("rect"),t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(t=createTag("div"),t.style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)};function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,s=t.length;for(r=0;r<s;r+=1)e=t[r].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var r=t.sh.v,s=t.transformers,o,d=r._length,L,ge,Mt,er;if(!(d<=1)){for(o=0;o<d-1;o+=1)L=this.getTransformedPoint(s,r.v[o]),ge=this.getTransformedPoint(s,r.o[o]),Mt=this.getTransformedPoint(s,r.i[o+1]),er=this.getTransformedPoint(s,r.v[o+1]),this.checkBounds(L,ge,Mt,er,e);r.c&&(L=this.getTransformedPoint(s,r.v[o]),ge=this.getTransformedPoint(s,r.o[o]),Mt=this.getTransformedPoint(s,r.i[0]),er=this.getTransformedPoint(s,r.v[0]),this.checkBounds(L,ge,Mt,er,e))}},HShapeElement.prototype.checkBounds=function(t,e,r,s,o){this.getBoundsOfCurve(t,e,r,s);var d=this.shapeBoundingBox;o.x=bmMin(d.left,o.x),o.xMax=bmMax(d.right,o.xMax),o.y=bmMin(d.top,o.y),o.yMax=bmMax(d.bottom,o.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,r,s){for(var o=[[t[0],s[0]],[t[1],s[1]]],d,L,ge,Mt,er,tr,ir,rr=0;rr<2;++rr)L=6*t[rr]-12*e[rr]+6*r[rr],d=-3*t[rr]+9*e[rr]-9*r[rr]+3*s[rr],ge=3*e[rr]-3*t[rr],L|=0,d|=0,ge|=0,d===0&&L===0||(d===0?(Mt=-ge/L,Mt>0&&Mt<1&&o[rr].push(this.calculateF(Mt,t,e,r,s,rr))):(er=L*L-4*ge*d,er>=0&&(tr=(-L+bmSqrt(er))/(2*d),tr>0&&tr<1&&o[rr].push(this.calculateF(tr,t,e,r,s,rr)),ir=(-L-bmSqrt(er))/(2*d),ir>0&&ir<1&&o[rr].push(this.calculateF(ir,t,e,r,s,rr)))));this.shapeBoundingBox.left=bmMin.apply(null,o[0]),this.shapeBoundingBox.top=bmMin.apply(null,o[1]),this.shapeBoundingBox.right=bmMax.apply(null,o[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,o[1])},HShapeElement.prototype.calculateF=function(t,e,r,s,o,d){return bmPow(1-t,3)*e[d]+3*bmPow(1-t,2)*t*r[d]+3*(1-t)*bmPow(t,2)*s[d]+bmPow(t,3)*o[d]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,s=t.length;for(r=0;r<s;r+=1)t[r]&&t[r].sh?this.calculateShapeBoundingBox(t[r],e):t[r]&&t[r].it?this.calculateBoundingBox(t[r].it,e):t[r]&&t[r].style&&t[r].w&&this.expandStrokeBoundingBox(t[r].w,e)},HShapeElement.prototype.expandStrokeBoundingBox=function(t,e){var r=0;if(t.keyframes){for(var s=0;s<t.keyframes.length;s+=1){var o=t.keyframes[s].s;o>r&&(r=o)}r*=t.mult}else r=t.v*t.mult;e.x-=r,e.xMax+=r,e.y-=r,e.yMax+=r},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var r=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),r=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),r=!0),r||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var s=this.shapeCont.style,o="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";s.transform=o,s.webkitTransform=o}}};function HTextElement(t,e,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,r=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=r,e.color=r,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var s=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",s.fClass)this.innerElem.className=s.fClass;else{e.fontFamily=s.fFamily;var o=t.fWeight,d=t.fStyle;e.fontStyle=d,e.fontWeight=o}var L,ge,Mt=t.l;ge=Mt.length;var er,tr,ir,rr=this.mHelper,nr,ar="",sr=0;for(L=0;L<ge;L+=1){if(this.globalData.fontManager.chars?(this.textPaths[sr]?er=this.textPaths[sr]:(er=createNS("path"),er.setAttribute("stroke-linecap",lineCapEnum[1]),er.setAttribute("stroke-linejoin",lineJoinEnum[2]),er.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[sr]?(tr=this.textSpans[sr],ir=tr.children[0]):(tr=createTag("div"),tr.style.lineHeight=0,ir=createNS("svg"),ir.appendChild(er),styleDiv(tr)))):this.isMasked?er=this.textPaths[sr]?this.textPaths[sr]:createNS("text"):this.textSpans[sr]?(tr=this.textSpans[sr],er=this.textPaths[sr]):(tr=createTag("span"),styleDiv(tr),er=createTag("span"),styleDiv(er),tr.appendChild(er)),this.globalData.fontManager.chars){var lr=this.globalData.fontManager.getCharData(t.finalText[L],s.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),cr;if(lr?cr=lr.data:cr=null,rr.reset(),cr&&cr.shapes&&cr.shapes.length&&(nr=cr.shapes[0].it,rr.scale(t.finalSize/100,t.finalSize/100),ar=this.createPathShape(rr,nr),er.setAttribute("d",ar)),this.isMasked)this.innerElem.appendChild(er);else{if(this.innerElem.appendChild(tr),cr&&cr.shapes){document.body.appendChild(ir);var ur=ir.getBBox();ir.setAttribute("width",ur.width+2),ir.setAttribute("height",ur.height+2),ir.setAttribute("viewBox",ur.x-1+" "+(ur.y-1)+" "+(ur.width+2)+" "+(ur.height+2));var or=ir.style,dr="translate("+(ur.x-1)+"px,"+(ur.y-1)+"px)";or.transform=dr,or.webkitTransform=dr,Mt[L].yOffset=ur.y-1}else ir.setAttribute("width",1),ir.setAttribute("height",1);tr.appendChild(ir)}}else if(er.textContent=Mt[L].val,er.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(er);else{this.innerElem.appendChild(tr);var hr=er.style,pr="translate3d(0,"+-t.finalSize/1.2+"px,0)";hr.transform=pr,hr.webkitTransform=pr}this.isMasked?this.textSpans[sr]=er:this.textSpans[sr]=tr,this.textSpans[sr].style.display="block",this.textPaths[sr]=er,sr+=1}for(;sr<this.textSpans.length;)this.textSpans[sr].style.display="none",sr+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!(!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)){var r,s,o=0,d=this.textAnimator.renderedLetters,L=this.textProperty.currentData.l;s=L.length;var ge,Mt,er;for(r=0;r<s;r+=1)L[r].n?o+=1:(Mt=this.textSpans[r],er=this.textPaths[r],ge=d[o],o+=1,ge._mdf.m&&(this.isMasked?Mt.setAttribute("transform",ge.m):(Mt.style.webkitTransform=ge.m,Mt.style.transform=ge.m)),Mt.style.opacity=ge.o,ge.sw&&ge._mdf.sw&&er.setAttribute("stroke-width",ge.sw),ge.sc&&ge._mdf.sc&&er.setAttribute("stroke",ge.sc),ge.fc&&ge._mdf.fc&&(er.setAttribute("fill",ge.fc),er.style.color=ge.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var tr=this.innerElem.getBBox();this.currentBBox.w!==tr.width&&(this.currentBBox.w=tr.width,this.svgElement.setAttribute("width",tr.width)),this.currentBBox.h!==tr.height&&(this.currentBBox.h=tr.height,this.svgElement.setAttribute("height",tr.height));var ir=1;if(this.currentBBox.w!==tr.width+ir*2||this.currentBBox.h!==tr.height+ir*2||this.currentBBox.x!==tr.x-ir||this.currentBBox.y!==tr.y-ir){this.currentBBox.w=tr.width+ir*2,this.currentBBox.h=tr.height+ir*2,this.currentBBox.x=tr.x-ir,this.currentBBox.y=tr.y-ir,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var rr="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=rr,t.webkitTransform=rr}}}};function HCameraElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initHierarchy();var s=PropertyFactory.getProp;if(this.pe=s(this,t.pe,0,0,this),t.ks.p.s?(this.px=s(this,t.ks.p.x,1,0,this),this.py=s(this,t.ks.p.y,1,0,this),this.pz=s(this,t.ks.p.z,1,0,this)):this.p=s(this,t.ks.p,1,0,this),t.ks.a&&(this.a=s(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var o,d=t.ks.or.k.length;for(o=0;o<d;o+=1)t.ks.or.k[o].to=null,t.ks.or.k[o].ti=null}this.or=s(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=s(this,t.ks.rx,0,degToRads,this),this.ry=s(this,t.ks.ry,0,degToRads,this),this.rz=s(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e=this.comp.threeDElements.length,r,s,o;for(t=0;t<e;t+=1)if(r=this.comp.threeDElements[t],r.type==="3d"){s=r.perspectiveElem.style,o=r.container.style;var d=this.pe.v+"px",L="0px 0px 0px",ge="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";s.perspective=d,s.webkitPerspective=d,o.transformOrigin=L,o.mozTransformOrigin=L,o.webkitTransformOrigin=L,s.transform=ge,s.webkitTransform=ge}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t=this._isFirstFrame,e,r;if(this.hierarchy)for(r=this.hierarchy.length,e=0;e<r;e+=1)t=this.hierarchy[e].finalTransform.mProp._mdf||t;if(t||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(r=this.hierarchy.length-1,e=r;e>=0;e-=1){var s=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-s.p.v[0],-s.p.v[1],s.p.v[2]),this.mat.rotateX(-s.or.v[0]).rotateY(-s.or.v[1]).rotateZ(s.or.v[2]),this.mat.rotateX(-s.rx.v).rotateY(-s.ry.v).rotateZ(s.rz.v),this.mat.scale(1/s.s.v[0],1/s.s.v[1],1/s.s.v[2]),this.mat.translate(s.a.v[0],s.a.v[1],s.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var o;this.p?o=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:o=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var d=Math.sqrt(Math.pow(o[0],2)+Math.pow(o[1],2)+Math.pow(o[2],2)),L=[o[0]/d,o[1]/d,o[2]/d],ge=Math.sqrt(L[2]*L[2]+L[0]*L[0]),Mt=Math.atan2(L[1],ge),er=Math.atan2(L[0],-L[2]);this.mat.rotateY(er).rotateX(-Mt)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var tr=!this._prevMat.equals(this.mat);if((tr||this.pe._mdf)&&this.comp.threeDElements){r=this.comp.threeDElements.length;var ir,rr,nr;for(e=0;e<r;e+=1)if(ir=this.comp.threeDElements[e],ir.type==="3d"){if(tr){var ar=this.mat.toCSS();nr=ir.container.style,nr.transform=ar,nr.webkitTransform=ar}this.pe._mdf&&(rr=ir.perspectiveElem.style,rr.perspective=this.pe.v+"px",rr.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)};function HybridRendererBase(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&e.hideOnTransparent===!1),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){var s=this.layers[e];if(!s.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(r,e);else{for(var o=0,d,L,ge;o<e;)this.elements[o]&&this.elements[o]!==!0&&this.elements[o].getBaseElement&&(L=this.elements[o],ge=this.layers[o].ddd?this.getThreeDContainerByPos(o):L.getBaseElement(),d=ge||d),o+=1;d?(!s.ddd||!this.supports3d)&&this.layerElement.insertBefore(r,d):(!s.ddd||!this.supports3d)&&this.layerElement.appendChild(r)}else this.addTo3dContainer(r,e)}},HybridRendererBase.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRendererBase.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;e<r;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r=createTag("div"),s,o;styleDiv(r);var d=createTag("div");if(styleDiv(d),e==="3d"){s=r.style,s.width=this.globalData.compSize.w+"px",s.height=this.globalData.compSize.h+"px";var L="50% 50%";s.webkitTransformOrigin=L,s.mozTransformOrigin=L,s.transformOrigin=L,o=d.style;var ge="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";o.transform=ge,o.webkitTransform=ge}r.appendChild(d);var Mt={container:d,perspectiveElem:r,startPos:t,endPos:t,type:e};return this.threeDElements.push(Mt),Mt},HybridRendererBase.prototype.build3dContainers=function(){var t,e=this.layers.length,r,s="";for(t=0;t<e;t+=1)this.layers[t].ddd&&this.layers[t].ty!==3?(s!=="3d"&&(s="3d",r=this.createThreeDContainer(t,"3d")),r.endPos=Math.max(r.endPos,t)):(s!=="2d"&&(s="2d",r=this.createThreeDContainer(t,"2d")),r.endPos=Math.max(r.endPos,t));for(e=this.threeDElements.length,t=e-1;t>=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,s=this.threeDElements.length;r<s;){if(e<=this.threeDElements[r].endPos){for(var o=this.threeDElements[r].startPos,d;o<e;)this.elements[o]&&this.elements[o].getBaseElement&&(d=this.elements[o].getBaseElement()),o+=1;d?this.threeDElements[r].container.insertBefore(t,d):this.threeDElements[r].container.appendChild(t);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(t){var e=createTag("div"),r=this.animationItem.wrapper,s=e.style;s.width=t.w+"px",s.height=t.h+"px",this.resizerElem=e,styleDiv(e),s.transformStyle="flat",s.mozTransformStyle="flat",s.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),r.appendChild(e),s.overflow="hidden";var o=createNS("svg");o.setAttribute("width","1"),o.setAttribute("height","1"),styleDiv(o),this.resizerElem.appendChild(o);var d=createNS("defs");o.appendChild(d),this.data=t,this.setupGlobalData(t,o),this.globalData.defs=d,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,r=t/e,s=this.globalData.compSize.w/this.globalData.compSize.h,o,d,L,ge;s>r?(o=t/this.globalData.compSize.w,d=t/this.globalData.compSize.w,L=0,ge=(e-this.globalData.compSize.h*(t/this.globalData.compSize.w))/2):(o=e/this.globalData.compSize.h,d=e/this.globalData.compSize.h,L=(t-this.globalData.compSize.w*(e/this.globalData.compSize.h))/2,ge=0);var Mt=this.resizerElem.style;Mt.webkitTransform="matrix3d("+o+",0,0,0,0,"+d+",0,0,0,0,1,0,"+L+","+ge+",0,1)",Mt.transform=Mt.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t=this.globalData.compSize.w,e=this.globalData.compSize.h,r,s=this.threeDElements.length;for(r=0;r<s;r+=1){var o=this.threeDElements[r].perspectiveElem.style;o.webkitPerspective=Math.sqrt(Math.pow(t,2)+Math.pow(e,2))+"px",o.perspective=o.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(t){var e,r=t.length,s=createTag("div");for(e=0;e<r;e+=1)if(t[e].xt){var o=this.createComp(t[e],s,this.globalData.comp,null);o.initExpressions(),this.globalData.projectInterface.registerComposition(o)}};function HCompElement(t,e,r){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var r=0,s;r<e;)this.elements[r]&&this.elements[r].getBaseElement&&(s=this.elements[r].getBaseElement()),r+=1;s?this.layerElement.insertBefore(t,s):this.layerElement.appendChild(t)},HCompElement.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&e.hideOnTransparent===!1),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"},runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};var CompExpressionInterface=function(){return function(t){function e(r){for(var s=0,o=t.layers.length;s<o;){if(t.layers[s].nm===r||t.layers[s].ind===r)return t.elements[s].layerInterface;s+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e}}();function _typeof$2(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function(r){return typeof r}:_typeof$2=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$2(t)}function seedRandom(t,e){var r=this,s=256,o=6,d=52,L="random",ge=e.pow(s,o),Mt=e.pow(2,d),er=Mt*2,tr=s-1,ir;function rr(or,dr,hr){var pr=[];dr=dr===!0?{entropy:!0}:dr||{};var mr=lr(sr(dr.entropy?[or,ur(t)]:or===null?cr():or,3),pr),vr=new nr(pr),Er=function(){for(var Pr=vr.g(o),kr=ge,Mr=0;Pr<Mt;)Pr=(Pr+Mr)*s,kr*=s,Mr=vr.g(1);for(;Pr>=er;)Pr/=2,kr/=2,Mr>>>=1;return(Pr+Mr)/kr};return Er.int32=function(){return vr.g(4)|0},Er.quick=function(){return vr.g(4)/4294967296},Er.double=Er,lr(ur(vr.S),t),(dr.pass||hr||function(Cr,Pr,kr,Mr){return Mr&&(Mr.S&&ar(Mr,vr),Cr.state=function(){return ar(vr,{})}),kr?(e[L]=Cr,Pr):Cr})(Er,mr,"global"in dr?dr.global:this==e,dr.state)}e["seed"+L]=rr;function nr(or){var dr,hr=or.length,pr=this,mr=0,vr=pr.i=pr.j=0,Er=pr.S=[];for(hr||(or=[hr++]);mr<s;)Er[mr]=mr++;for(mr=0;mr<s;mr++)Er[mr]=Er[vr=tr&vr+or[mr%hr]+(dr=Er[mr])],Er[vr]=dr;pr.g=function(Cr){for(var Pr,kr=0,Mr=pr.i,Ur=pr.j,$r=pr.S;Cr--;)Pr=$r[Mr=tr&Mr+1],kr=kr*s+$r[tr&($r[Mr]=$r[Ur=tr&Ur+Pr])+($r[Ur]=Pr)];return pr.i=Mr,pr.j=Ur,kr}}function ar(or,dr){return dr.i=or.i,dr.j=or.j,dr.S=or.S.slice(),dr}function sr(or,dr){var hr=[],pr=_typeof$2(or),mr;if(dr&&pr=="object")for(mr in or)try{hr.push(sr(or[mr],dr-1))}catch{}return hr.length?hr:pr=="string"?or:or+"\0"}function lr(or,dr){for(var hr=or+"",pr,mr=0;mr<hr.length;)dr[tr&mr]=tr&(pr^=dr[tr&mr]*19)+hr.charCodeAt(mr++);return ur(dr)}function cr(){try{var or=new Uint8Array(s);return(r.crypto||r.msCrypto).getRandomValues(or),ur(or)}catch{var dr=r.navigator,hr=dr&&dr.plugins;return[+new Date,r,hr,r.screen,ur(t)]}}function ur(or){return String.fromCharCode.apply(0,or)}lr(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof$1(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function(r){return typeof r}:_typeof$1=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$1(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return t==="number"||e instanceof Number||t==="boolean"||t==="string"}function $bm_neg(t){var e=_typeof$1(t);if(e==="number"||t instanceof Number||e==="boolean")return-t;if($bm_isInstanceOfArray(t)){var r,s=t.length,o=[];for(r=0;r<s;r+=1)o[r]=-t[r];return o}return t.propType?t.v:-t}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=_typeof$1(t),s=_typeof$1(e);if(isNumerable(r,t)&&isNumerable(s,e)||r==="string"||s==="string")return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(s,e))return t=t.slice(0),t[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return e=e.slice(0),e[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var o=0,d=t.length,L=e.length,ge=[];o<d||o<L;)(typeof t[o]=="number"||t[o]instanceof Number)&&(typeof e[o]=="number"||e[o]instanceof Number)?ge[o]=t[o]+e[o]:ge[o]=e[o]===void 0?t[o]:t[o]||e[o],o+=1;return ge}return 0}var add=sum;function sub(t,e){var r=_typeof$1(t),s=_typeof$1(e);if(isNumerable(r,t)&&isNumerable(s,e))return r==="string"&&(t=parseInt(t,10)),s==="string"&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(s,e))return t=t.slice(0),t[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return e=e.slice(0),e[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var o=0,d=t.length,L=e.length,ge=[];o<d||o<L;)(typeof t[o]=="number"||t[o]instanceof Number)&&(typeof e[o]=="number"||e[o]instanceof Number)?ge[o]=t[o]-e[o]:ge[o]=e[o]===void 0?t[o]:t[o]||e[o],o+=1;return ge}return 0}function mul(t,e){var r=_typeof$1(t),s=_typeof$1(e),o;if(isNumerable(r,t)&&isNumerable(s,e))return t*e;var d,L;if($bm_isInstanceOfArray(t)&&isNumerable(s,e)){for(L=t.length,o=createTypedArray("float32",L),d=0;d<L;d+=1)o[d]=t[d]*e;return o}if(isNumerable(r,t)&&$bm_isInstanceOfArray(e)){for(L=e.length,o=createTypedArray("float32",L),d=0;d<L;d+=1)o[d]=t*e[d];return o}return 0}function div(t,e){var r=_typeof$1(t),s=_typeof$1(e),o;if(isNumerable(r,t)&&isNumerable(s,e))return t/e;var d,L;if($bm_isInstanceOfArray(t)&&isNumerable(s,e)){for(L=t.length,o=createTypedArray("float32",L),d=0;d<L;d+=1)o[d]=t[d]/e;return o}if(isNumerable(r,t)&&$bm_isInstanceOfArray(e)){for(L=e.length,o=createTypedArray("float32",L),d=0;d<L;d+=1)o[d]=t/e[d];return o}return 0}function mod(t,e){return typeof t=="string"&&(t=parseInt(t,10)),typeof e=="string"&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(e>r){var s=r;r=e,e=s}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if(typeof t=="number"||t instanceof Number)return e=e||0,Math.abs(t-e);e||(e=helperLengthArray);var r,s=Math.min(t.length,e.length),o=0;for(r=0;r<s;r+=1)o+=Math.pow(e[r]-t[r],2);return Math.sqrt(o)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e=t[0],r=t[1],s=t[2],o=Math.max(e,r,s),d=Math.min(e,r,s),L,ge,Mt=(o+d)/2;if(o===d)L=0,ge=0;else{var er=o-d;switch(ge=Mt>.5?er/(2-o-d):er/(o+d),o){case e:L=(r-s)/er+(r<s?6:0);break;case r:L=(s-e)/er+2;break;case s:L=(e-r)/er+4;break}L/=6}return[L,ge,Mt,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e=t[0],r=t[1],s=t[2],o,d,L;if(r===0)o=s,L=s,d=s;else{var ge=s<.5?s*(1+r):s+r-s*r,Mt=2*s-ge;o=hue2rgb(Mt,ge,e+1/3),d=hue2rgb(Mt,ge,e),L=hue2rgb(Mt,ge,e-1/3)}return[o,d,L,t[3]]}function linear(t,e,r,s,o){if((s===void 0||o===void 0)&&(s=e,o=r,e=0,r=1),r<e){var d=r;r=e,e=d}if(t<=e)return s;if(t>=r)return o;var L=r===e?0:(t-e)/(r-e);if(!s.length)return s+(o-s)*L;var ge,Mt=s.length,er=createTypedArray("float32",Mt);for(ge=0;ge<Mt;ge+=1)er[ge]=s[ge]+(o[ge]-s[ge])*L;return er}function random(t,e){if(e===void 0&&(t===void 0?(t=0,e=1):(e=t,t=void 0)),e.length){var r,s=e.length;t||(t=createTypedArray("float32",s));var o=createTypedArray("float32",s),d=BMMath.random();for(r=0;r<s;r+=1)o[r]=t[r]+d*(e[r]-t[r]);return o}t===void 0&&(t=0);var L=BMMath.random();return t+L*(e-t)}function createPath(t,e,r,s){var o,d=t.length,L=shapePool.newElement();L.setPathData(!!s,d);var ge=[0,0],Mt,er;for(o=0;o<d;o+=1)Mt=e&&e[o]?e[o]:ge,er=r&&r[o]?r[o]:ge,L.setTripleAt(t[o][0],t[o][1],er[0]+t[o][0],er[1]+t[o][1],Mt[0]+t[o][0],Mt[1]+t[o][1],o,!0);return L}function initiateExpression(elem,data,property){function noOp(t){return t}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=(function t(e,r){var s,o,d=this.pv.length?this.pv.length:1,L=createTypedArray("float32",d);e=5;var ge=Math.floor(time*e);for(s=0,o=0;s<ge;){for(o=0;o<d;o+=1)L[o]+=-r+r*2*BMMath.random();s+=1}var Mt=time*e,er=Mt-Math.floor(Mt),tr=createTypedArray("float32",d);if(d>1){for(o=0;o<d;o+=1)tr[o]=this.pv[o]+L[o]+(-r+r*2*BMMath.random())*er;return tr}return this.pv+L[0]+(-r+r*2*BMMath.random())*er}).bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty));function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],s=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads,o=-Math.atan2(r[1],r[2])/degToRads;return[o,s,0]}function easeOut(t,e,r,s,o){return applyEase(easeOutBez,t,e,r,s,o)}function easeIn(t,e,r,s,o){return applyEase(easeInBez,t,e,r,s,o)}function ease(t,e,r,s,o){return applyEase(easeInOutBez,t,e,r,s,o)}function applyEase(t,e,r,s,o,d){o===void 0?(o=r,d=s):e=(e-r)/(s-r),e>1?e=1:e<0&&(e=0);var L=t(e);if($bm_isInstanceOfArray(o)){var ge,Mt=o.length,er=createTypedArray("float32",Mt);for(ge=0;ge<Mt;ge+=1)er[ge]=(d[ge]-o[ge])*L+o[ge];return er}return(d-o)*L+o}function nearestKey(t){var e,r=data.k.length,s,o;if(!data.k.length||typeof data.k[0]=="number")s=0,o=0;else if(s=-1,t*=elem.comp.globalData.frameRate,t<data.k[0].t)s=1,o=data.k[0].t;else{for(e=0;e<r-1;e+=1)if(t===data.k[e].t){s=e+1,o=data.k[e].t;break}else if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(s=e+2,o=data.k[e+1].t):(s=e+1,o=data.k[e].t);break}s===-1&&(s=e+1,o=data.k[e].t)}var d={};return d.index=s,d.time=o/elem.comp.globalData.frameRate,d}function key(t){var e,r,s;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var o=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(s=o.length,r=0;r<s;r+=1)e[r]=o[r],e.value[r]=o[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return!t&&t!==0&&(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return typeof value=="string"?e===void 0?value.substring(t):value.substring(t,e):""}function substr(t,e){return typeof value=="string"?e===void 0?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=t===0?0:Math.floor(time*t)/t,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType===4&&!content&&(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var t={};t.initExpressions=e,t.resetFrame=ExpressionManager.resetFrame;function e(r){var s=0,o=[];function d(){s+=1}function L(){s-=1,s===0&&Mt()}function ge(er){o.indexOf(er)===-1&&o.push(er)}function Mt(){var er,tr=o.length;for(er=0;er<tr;er+=1)o[er].release();o.length=0}r.renderer.compInterface=CompExpressionInterface(r.renderer),r.renderer.globalData.projectInterface.registerComposition(r.renderer),r.renderer.globalData.pushExpression=d,r.renderer.globalData.popExpression=L,r.renderer.globalData.registerExpressionProperty=ge}return t}(),MaskManagerInterface=function(){function t(r,s){this._mask=r,this._data=s}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),this._mask.op.v*100}});var e=function(s){var o=createSizedArray(s.viewData.length),d,L=s.viewData.length;for(d=0;d<L;d+=1)o[d]=new t(s.viewData[d],s.masksProperties[d]);var ge=function(er){for(d=0;d<L;){if(s.masksProperties[d].nm===er)return o[d];d+=1}return null};return ge};return e}(),ExpressionPropertyInterface=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function r(L,ge,Mt){Object.defineProperty(L,"velocity",{get:function(){return ge.getVelocityAtTime(ge.comp.currentFrame)}}),L.numKeys=ge.keyframes?ge.keyframes.length:0,L.key=function(er){if(!L.numKeys)return 0;var tr="";"s"in ge.keyframes[er-1]?tr=ge.keyframes[er-1].s:"e"in ge.keyframes[er-2]?tr=ge.keyframes[er-2].e:tr=ge.keyframes[er-2].s;var ir=Mt==="unidimensional"?new Number(tr):Object.assign({},tr);return ir.time=ge.keyframes[er-1].t/ge.elem.comp.globalData.frameRate,ir.value=Mt==="unidimensional"?tr[0]:tr,ir},L.valueAtTime=ge.getValueAtTime,L.speedAtTime=ge.getSpeedAtTime,L.velocityAtTime=ge.getVelocityAtTime,L.propertyGroup=ge.propertyGroup}function s(L){(!L||!("pv"in L))&&(L=t);var ge=1/L.mult,Mt=L.pv*ge,er=new Number(Mt);return er.value=Mt,r(er,L,"unidimensional"),function(){return L.k&&L.getValue(),Mt=L.v*ge,er.value!==Mt&&(er=new Number(Mt),er.value=Mt,r(er,L,"unidimensional")),er}}function o(L){(!L||!("pv"in L))&&(L=e);var ge=1/L.mult,Mt=L.data&&L.data.l||L.pv.length,er=createTypedArray("float32",Mt),tr=createTypedArray("float32",Mt);return er.value=tr,r(er,L,"multidimensional"),function(){L.k&&L.getValue();for(var ir=0;ir<Mt;ir+=1)tr[ir]=L.v[ir]*ge,er[ir]=tr[ir];return er}}function d(){return t}return function(L){return L?L.propType==="unidimensional"?s(L):o(L):d}}(),TransformExpressionInterface=function(){return function(t){function e(L){switch(L){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)});var r,s,o,d;return t.p?d=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),s=ExpressionPropertyInterface(t.py),t.pz&&(o=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?d():[r(),s(),o?o():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e}}(),LayerExpressionInterface=function(){function t(er){var tr=new Matrix;if(er!==void 0){var ir=this._elem.finalTransform.mProp.getValueAtTime(er);ir.clone(tr)}else{var rr=this._elem.finalTransform.mProp;rr.applyToMatrix(tr)}return tr}function e(er,tr){var ir=this.getMatrix(tr);return ir.props[12]=0,ir.props[13]=0,ir.props[14]=0,this.applyPoint(ir,er)}function r(er,tr){var ir=this.getMatrix(tr);return this.applyPoint(ir,er)}function s(er,tr){var ir=this.getMatrix(tr);return ir.props[12]=0,ir.props[13]=0,ir.props[14]=0,this.invertPoint(ir,er)}function o(er,tr){var ir=this.getMatrix(tr);return this.invertPoint(ir,er)}function d(er,tr){if(this._elem.hierarchy&&this._elem.hierarchy.length){var ir,rr=this._elem.hierarchy.length;for(ir=0;ir<rr;ir+=1)this._elem.hierarchy[ir].finalTransform.mProp.applyToMatrix(er)}return er.applyToPointArray(tr[0],tr[1],tr[2]||0)}function L(er,tr){if(this._elem.hierarchy&&this._elem.hierarchy.length){var ir,rr=this._elem.hierarchy.length;for(ir=0;ir<rr;ir+=1)this._elem.hierarchy[ir].finalTransform.mProp.applyToMatrix(er)}return er.inversePoint(tr)}function ge(er){var tr=new Matrix;if(tr.reset(),this._elem.finalTransform.mProp.applyToMatrix(tr),this._elem.hierarchy&&this._elem.hierarchy.length){var ir,rr=this._elem.hierarchy.length;for(ir=0;ir<rr;ir+=1)this._elem.hierarchy[ir].finalTransform.mProp.applyToMatrix(tr);return tr.inversePoint(er)}return tr.inversePoint(er)}function Mt(){return[1,1,1,1]}return function(er){var tr;function ir(sr){nr.mask=new MaskManagerInterface(sr,er)}function rr(sr){nr.effect=sr}function nr(sr){switch(sr){case"ADBE Root Vectors Group":case"Contents":case 2:return nr.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return tr;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return nr.effect;case"ADBE Text Properties":return nr.textInterface;default:return null}}nr.getMatrix=t,nr.invertPoint=L,nr.applyPoint=d,nr.toWorld=r,nr.toWorldVec=e,nr.fromWorld=o,nr.fromWorldVec=s,nr.toComp=r,nr.fromComp=ge,nr.sampleImage=Mt,nr.sourceRectAtTime=er.sourceRectAtTime.bind(er),nr._elem=er,tr=TransformExpressionInterface(er.finalTransform.mProp);var ar=getDescriptor(tr,"anchorPoint");return Object.defineProperties(nr,{hasParent:{get:function(){return er.hierarchy.length}},parent:{get:function(){return er.hierarchy[0].layerInterface}},rotation:getDescriptor(tr,"rotation"),scale:getDescriptor(tr,"scale"),position:getDescriptor(tr,"position"),opacity:getDescriptor(tr,"opacity"),anchorPoint:ar,anchor_point:ar,transform:{get:function(){return tr}},active:{get:function(){return er.isInRange}}}),nr.startTime=er.data.st,nr.index=er.data.ind,nr.source=er.data.refId,nr.height=er.data.ty===0?er.data.h:100,nr.width=er.data.ty===0?er.data.w:100,nr.inPoint=er.data.ip/er.comp.globalData.frameRate,nr.outPoint=er.data.op/er.comp.globalData.frameRate,nr._name=er.data.nm,nr.registerMaskInterface=ir,nr.registerEffectsInterface=rr,nr}}(),propertyGroupFactory=function(){return function(t,e){return function(r){return r=r===void 0?1:r,r<=0?t:e(r-1)}}}(),PropertyInterface=function(){return function(t,e){var r={_name:t};function s(o){return o=o===void 0?1:o,o<=0?r:e(o-1)}return s}}(),EffectsExpressionInterface=function(){var t={createEffectsInterface:e};function e(o,d){if(o.effectsManager){var L=[],ge=o.data.ef,Mt,er=o.effectsManager.effectElements.length;for(Mt=0;Mt<er;Mt+=1)L.push(r(ge[Mt],o.effectsManager.effectElements[Mt],d,o));var tr=o.data.ef||[],ir=function(nr){for(Mt=0,er=tr.length;Mt<er;){if(nr===tr[Mt].nm||nr===tr[Mt].mn||nr===tr[Mt].ix)return L[Mt];Mt+=1}return null};return Object.defineProperty(ir,"numProperties",{get:function(){return tr.length}}),ir}return null}function r(o,d,L,ge){function Mt(nr){for(var ar=o.ef,sr=0,lr=ar.length;sr<lr;){if(nr===ar[sr].nm||nr===ar[sr].mn||nr===ar[sr].ix)return ar[sr].ty===5?tr[sr]:tr[sr]();sr+=1}throw new Error}var er=propertyGroupFactory(Mt,L),tr=[],ir,rr=o.ef.length;for(ir=0;ir<rr;ir+=1)o.ef[ir].ty===5?tr.push(r(o.ef[ir],d.effectElements[ir],d.effectElements[ir].propertyGroup,ge)):tr.push(s(d.effectElements[ir],o.ef[ir].ty,ge,er));return o.mn==="ADBE Color Control"&&Object.defineProperty(Mt,"color",{get:function(){return tr[0]()}}),Object.defineProperties(Mt,{numProperties:{get:function(){return o.np}},_name:{value:o.nm},propertyGroup:{value:er}}),Mt.enabled=o.en!==0,Mt.active=Mt.enabled,Mt}function s(o,d,L,ge){var Mt=ExpressionPropertyInterface(o.p);function er(){return d===10?L.comp.compInterface(o.p.v):Mt()}return o.p.setGroupProperty&&o.p.setGroupProperty(PropertyInterface("",ge)),er}return t}(),ShapePathInterface=function(){return function(e,r,s){var o=r.sh;function d(ge){return ge==="Shape"||ge==="shape"||ge==="Path"||ge==="path"||ge==="ADBE Vector Shape"||ge===2?d.path:null}var L=propertyGroupFactory(d,s);return o.setGroupProperty(PropertyInterface("Path",L)),Object.defineProperties(d,{path:{get:function(){return o.k&&o.getValue(),o}},shape:{get:function(){return o.k&&o.getValue(),o}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:s}}),d}}(),ShapeExpressionInterface=function(){function t(ar,sr,lr){var cr=[],ur,or=ar?ar.length:0;for(ur=0;ur<or;ur+=1)ar[ur].ty==="gr"?cr.push(r(ar[ur],sr[ur],lr)):ar[ur].ty==="fl"?cr.push(s(ar[ur],sr[ur],lr)):ar[ur].ty==="st"?cr.push(L(ar[ur],sr[ur],lr)):ar[ur].ty==="tm"?cr.push(ge(ar[ur],sr[ur],lr)):ar[ur].ty==="tr"||(ar[ur].ty==="el"?cr.push(er(ar[ur],sr[ur],lr)):ar[ur].ty==="sr"?cr.push(tr(ar[ur],sr[ur],lr)):ar[ur].ty==="sh"?cr.push(ShapePathInterface(ar[ur],sr[ur],lr)):ar[ur].ty==="rc"?cr.push(ir(ar[ur],sr[ur],lr)):ar[ur].ty==="rd"?cr.push(rr(ar[ur],sr[ur],lr)):ar[ur].ty==="rp"?cr.push(nr(ar[ur],sr[ur],lr)):ar[ur].ty==="gf"?cr.push(o(ar[ur],sr[ur],lr)):cr.push(d(ar[ur],sr[ur])));return cr}function e(ar,sr,lr){var cr,ur=function(hr){for(var pr=0,mr=cr.length;pr<mr;){if(cr[pr]._name===hr||cr[pr].mn===hr||cr[pr].propertyIndex===hr||cr[pr].ix===hr||cr[pr].ind===hr)return cr[pr];pr+=1}return typeof hr=="number"?cr[hr-1]:null};ur.propertyGroup=propertyGroupFactory(ur,lr),cr=t(ar.it,sr.it,ur.propertyGroup),ur.numProperties=cr.length;var or=Mt(ar.it[ar.it.length-1],sr.it[sr.it.length-1],ur.propertyGroup);return ur.transform=or,ur.propertyIndex=ar.cix,ur._name=ar.nm,ur}function r(ar,sr,lr){var cr=function(hr){switch(hr){case"ADBE Vectors Group":case"Contents":case 2:return cr.content;default:return cr.transform}};cr.propertyGroup=propertyGroupFactory(cr,lr);var ur=e(ar,sr,cr.propertyGroup),or=Mt(ar.it[ar.it.length-1],sr.it[sr.it.length-1],cr.propertyGroup);return cr.content=ur,cr.transform=or,Object.defineProperty(cr,"_name",{get:function(){return ar.nm}}),cr.numProperties=ar.np,cr.propertyIndex=ar.ix,cr.nm=ar.nm,cr.mn=ar.mn,cr}function s(ar,sr,lr){function cr(ur){return ur==="Color"||ur==="color"?cr.color:ur==="Opacity"||ur==="opacity"?cr.opacity:null}return Object.defineProperties(cr,{color:{get:ExpressionPropertyInterface(sr.c)},opacity:{get:ExpressionPropertyInterface(sr.o)},_name:{value:ar.nm},mn:{value:ar.mn}}),sr.c.setGroupProperty(PropertyInterface("Color",lr)),sr.o.setGroupProperty(PropertyInterface("Opacity",lr)),cr}function o(ar,sr,lr){function cr(ur){return ur==="Start Point"||ur==="start point"?cr.startPoint:ur==="End Point"||ur==="end point"?cr.endPoint:ur==="Opacity"||ur==="opacity"?cr.opacity:null}return Object.defineProperties(cr,{startPoint:{get:ExpressionPropertyInterface(sr.s)},endPoint:{get:ExpressionPropertyInterface(sr.e)},opacity:{get:ExpressionPropertyInterface(sr.o)},type:{get:function(){return"a"}},_name:{value:ar.nm},mn:{value:ar.mn}}),sr.s.setGroupProperty(PropertyInterface("Start Point",lr)),sr.e.setGroupProperty(PropertyInterface("End Point",lr)),sr.o.setGroupProperty(PropertyInterface("Opacity",lr)),cr}function d(){function ar(){return null}return ar}function L(ar,sr,lr){var cr=propertyGroupFactory(mr,lr),ur=propertyGroupFactory(pr,cr);function or(vr){Object.defineProperty(pr,ar.d[vr].nm,{get:ExpressionPropertyInterface(sr.d.dataProps[vr].p)})}var dr,hr=ar.d?ar.d.length:0,pr={};for(dr=0;dr<hr;dr+=1)or(dr),sr.d.dataProps[dr].p.setGroupProperty(ur);function mr(vr){return vr==="Color"||vr==="color"?mr.color:vr==="Opacity"||vr==="opacity"?mr.opacity:vr==="Stroke Width"||vr==="stroke width"?mr.strokeWidth:null}return Object.defineProperties(mr,{color:{get:ExpressionPropertyInterface(sr.c)},opacity:{get:ExpressionPropertyInterface(sr.o)},strokeWidth:{get:ExpressionPropertyInterface(sr.w)},dash:{get:function(){return pr}},_name:{value:ar.nm},mn:{value:ar.mn}}),sr.c.setGroupProperty(PropertyInterface("Color",cr)),sr.o.setGroupProperty(PropertyInterface("Opacity",cr)),sr.w.setGroupProperty(PropertyInterface("Stroke Width",cr)),mr}function ge(ar,sr,lr){function cr(or){return or===ar.e.ix||or==="End"||or==="end"?cr.end:or===ar.s.ix?cr.start:or===ar.o.ix?cr.offset:null}var ur=propertyGroupFactory(cr,lr);return cr.propertyIndex=ar.ix,sr.s.setGroupProperty(PropertyInterface("Start",ur)),sr.e.setGroupProperty(PropertyInterface("End",ur)),sr.o.setGroupProperty(PropertyInterface("Offset",ur)),cr.propertyIndex=ar.ix,cr.propertyGroup=lr,Object.defineProperties(cr,{start:{get:ExpressionPropertyInterface(sr.s)},end:{get:ExpressionPropertyInterface(sr.e)},offset:{get:ExpressionPropertyInterface(sr.o)},_name:{value:ar.nm}}),cr.mn=ar.mn,cr}function Mt(ar,sr,lr){function cr(or){return ar.a.ix===or||or==="Anchor Point"?cr.anchorPoint:ar.o.ix===or||or==="Opacity"?cr.opacity:ar.p.ix===or||or==="Position"?cr.position:ar.r.ix===or||or==="Rotation"||or==="ADBE Vector Rotation"?cr.rotation:ar.s.ix===or||or==="Scale"?cr.scale:ar.sk&&ar.sk.ix===or||or==="Skew"?cr.skew:ar.sa&&ar.sa.ix===or||or==="Skew Axis"?cr.skewAxis:null}var ur=propertyGroupFactory(cr,lr);return sr.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",ur)),sr.transform.mProps.p.setGroupProperty(PropertyInterface("Position",ur)),sr.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",ur)),sr.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",ur)),sr.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",ur)),sr.transform.mProps.sk&&(sr.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",ur)),sr.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",ur))),sr.transform.op.setGroupProperty(PropertyInterface("Opacity",ur)),Ob
vendor: 2,747 bytes, line 74
74ject.defineProperties(cr,{opacity:{get:ExpressionPropertyInterface(sr.transform.mProps.o)},position:{get:ExpressionPropertyInterface(sr.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(sr.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(sr.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(sr.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(sr.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(sr.transform.mProps.sa)},_name:{value:ar.nm}}),cr.ty="tr",cr.mn=ar.mn,cr.propertyGroup=lr,cr}function er(ar,sr,lr){function cr(dr){return ar.p.ix===dr?cr.position:ar.s.ix===dr?cr.size:null}var ur=propertyGroupFactory(cr,lr);cr.propertyIndex=ar.ix;var or=sr.sh.ty==="tm"?sr.sh.prop:sr.sh;return or.s.setGroupProperty(PropertyInterface("Size",ur)),or.p.setGroupProperty(PropertyInterface("Position",ur)),Object.defineProperties(cr,{size:{get:ExpressionPropertyInterface(or.s)},position:{get:ExpressionPropertyInterface(or.p)},_name:{value:ar.nm}}),cr.mn=ar.mn,cr}function tr(ar,sr,lr){function cr(dr){return ar.p.ix===dr?cr.position:ar.r.ix===dr?cr.rotation:ar.pt.ix===dr?cr.points:ar.or.ix===dr||dr==="ADBE Vector Star Outer Radius"?cr.outerRadius:ar.os.ix===dr?cr.outerRoundness:ar.ir&&(ar.ir.ix===dr||dr==="ADBE Vector Star Inner Radius")?cr.innerRadius:ar.is&&ar.is.ix===dr?cr.innerRoundness:null}var ur=propertyGroupFactory(cr,lr),or=sr.sh.ty==="tm"?sr.sh.prop:sr.sh;return cr.propertyIndex=ar.ix,or.or.setGroupProperty(PropertyInterface("Outer Radius",ur)),or.os.setGroupProperty(PropertyInterface("Outer Roundness",ur)),or.pt.setGroupProperty(PropertyInterface("Points",ur)),or.p.setGroupProperty(PropertyInterface("Position",ur)),or.r.setGroupProperty(PropertyInterface("Rotation",ur)),ar.ir&&(or.ir.setGroupProperty(PropertyInterface("Inner Radius",ur)),or.is.setGroupProperty(PropertyInterface("Inner Roundness",ur))),Object.defineProperties(cr,{position:{get:ExpressionPropertyInterface(or.p)},rotation:{get:ExpressionPropertyInterface(or.r)},points:{get:ExpressionPropertyInterface(or.pt)},outerRadius:{get:ExpressionPropertyInterface(or.or)},outerRoundness:{get:ExpressionPropertyInterface(or.os)},innerRadius:{get:ExpressionPropertyInterface(or.ir)},innerRoundness:{get:ExpressionPropertyInterface(or.is)},_name:{value:ar.nm}}),cr.mn=ar.mn,cr}function ir(ar,sr,lr){function cr(dr){return ar.p.ix===dr?cr.position:ar.r.ix===dr?cr.roundness:ar.s.ix===dr||dr==="Size"||dr==="ADBE Vector Rect Size"?cr.size:null}var ur=propertyGroupFactory(cr,lr),or=sr.sh.ty==="tm"?sr.sh.prop:sr.sh;return cr.propertyIndex=ar.ix,or.p.setGroupProperty(PropertyInterface("Position",ur)),or.s.setGroupProperty(PropertyInterface("Size",ur)),or.r.setGroupProperty(PropertyInterface("Rotation",ur)),Ob
vendor: 30,726 bytes, line 74
74ject.defineProperties(cr,{position:{get:ExpressionPropertyInterface(or.p)},roundness:{get:ExpressionPropertyInterface(or.r)},size:{get:ExpressionPropertyInterface(or.s)},_name:{value:ar.nm}}),cr.mn=ar.mn,cr}function rr(ar,sr,lr){function cr(dr){return ar.r.ix===dr||dr==="Round Corners 1"?cr.radius:null}var ur=propertyGroupFactory(cr,lr),or=sr;return cr.propertyIndex=ar.ix,or.rd.setGroupProperty(PropertyInterface("Radius",ur)),Object.defineProperties(cr,{radius:{get:ExpressionPropertyInterface(or.rd)},_name:{value:ar.nm}}),cr.mn=ar.mn,cr}function nr(ar,sr,lr){function cr(dr){return ar.c.ix===dr||dr==="Copies"?cr.copies:ar.o.ix===dr||dr==="Offset"?cr.offset:null}var ur=propertyGroupFactory(cr,lr),or=sr;return cr.propertyIndex=ar.ix,or.c.setGroupProperty(PropertyInterface("Copies",ur)),or.o.setGroupProperty(PropertyInterface("Offset",ur)),Object.defineProperties(cr,{copies:{get:ExpressionPropertyInterface(or.c)},offset:{get:ExpressionPropertyInterface(or.o)},_name:{value:ar.nm}}),cr.mn=ar.mn,cr}return function(ar,sr,lr){var cr;function ur(dr){if(typeof dr=="number")return dr=dr===void 0?1:dr,dr===0?lr:cr[dr-1];for(var hr=0,pr=cr.length;hr<pr;){if(cr[hr]._name===dr)return cr[hr];hr+=1}return null}function or(){return lr}return ur.propertyGroup=propertyGroupFactory(ur,or),cr=t(ar,sr,ur.propertyGroup),ur.numProperties=cr.length,ur._name="Contents",ur}}(),TextExpressionInterface=function(){return function(t){var e;function r(s){switch(s){case"ADBE Text Document":return r.sourceText;default:return null}}return Object.defineProperty(r,"sourceText",{get:function(){t.textProperty.getValue();var o=t.textProperty.currentData.t;return(!e||o!==e.value)&&(e=new String(o),e.value=o||new String(o),Object.defineProperty(e,"style",{get:function(){return{fillColor:t.textProperty.currentData.fc}}})),e}}),r}}();function _typeof(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(r){return typeof r}:_typeof=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(t)}var FootageInterface=function(){var t=function(s){var o="",d=s.getFootageData();function L(){return o="",d=s.getFootageData(),ge}function ge(Mt){if(d[Mt])return o=Mt,d=d[Mt],_typeof(d)==="object"?ge:d;var er=Mt.indexOf(o);if(er!==-1){var tr=parseInt(Mt.substr(er+o.length),10);return d=d[tr],_typeof(d)==="object"?ge:d}return""}return L},e=function(s){function o(d){return d==="Outline"?o.outlineInterface():null}return o._name="Outline",o.outlineInterface=t(s),o};return function(r){function s(o){return o==="Data"?s.dataInterface:null}return s._name="Data",s.dataInterface=e(r),s}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(t){return interfaces[t]||null}var expressionHelpers=function(){function t(L,ge,Mt){ge.x&&(Mt.k=!0,Mt.x=!0,Mt.initiateExpression=ExpressionManager.initiateExpression,Mt.effectsSequence.push(Mt.initiateExpression(L,ge,Mt).bind(Mt)))}function e(L){return L*=this.elem.globalData.frameRate,L-=this.offsetTime,L!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<L?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(L,this._cachingAtTime),this._cachingAtTime.lastFrame=L),this._cachingAtTime.value}function r(L){var ge=-.01,Mt=this.getValueAtTime(L),er=this.getValueAtTime(L+ge),tr=0;if(Mt.length){var ir;for(ir=0;ir<Mt.length;ir+=1)tr+=Math.pow(er[ir]-Mt[ir],2);tr=Math.sqrt(tr)*100}else tr=0;return tr}function s(L){if(this.vel!==void 0)return this.vel;var ge=-.001,Mt=this.getValueAtTime(L),er=this.getValueAtTime(L+ge),tr;if(Mt.length){tr=createTypedArray("float32",Mt.length);var ir;for(ir=0;ir<Mt.length;ir+=1)tr[ir]=(er[ir]-Mt[ir])/ge}else tr=(er-Mt)/ge;return tr}function o(){return this.pv}function d(L){this.propertyGroup=L}return{searchExpressions:t,getSpeedAtTime:r,getVelocityAtTime:s,getValueAtTime:e,getStaticValueAtTime:o,setGroupProperty:d}}();function addPropertyDecorator(){function t(rr,nr,ar){if(!this.k||!this.keyframes)return this.pv;rr=rr?rr.toLowerCase():"";var sr=this.comp.renderedFrame,lr=this.keyframes,cr=lr[lr.length-1].t;if(sr<=cr)return this.pv;var ur,or;ar?(nr?ur=Math.abs(cr-this.elem.comp.globalData.frameRate*nr):ur=Math.max(0,cr-this.elem.data.ip),or=cr-ur):((!nr||nr>lr.length-1)&&(nr=lr.length-1),or=lr[lr.length-1-nr].t,ur=cr-or);var dr,hr,pr;if(rr==="pingpong"){var mr=Math.floor((sr-or)/ur);if(mr%2!==0)return this.getValueAtTime((ur-(sr-or)%ur+or)/this.comp.globalData.frameRate,0)}else if(rr==="offset"){var vr=this.getValueAtTime(or/this.comp.globalData.frameRate,0),Er=this.getValueAtTime(cr/this.comp.globalData.frameRate,0),Cr=this.getValueAtTime(((sr-or)%ur+or)/this.comp.globalData.frameRate,0),Pr=Math.floor((sr-or)/ur);if(this.pv.length){for(pr=new Array(vr.length),hr=pr.length,dr=0;dr<hr;dr+=1)pr[dr]=(Er[dr]-vr[dr])*Pr+Cr[dr];return pr}return(Er-vr)*Pr+Cr}else if(rr==="continue"){var kr=this.getValueAtTime(cr/this.comp.globalData.frameRate,0),Mr=this.getValueAtTime((cr-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(pr=new Array(kr.length),hr=pr.length,dr=0;dr<hr;dr+=1)pr[dr]=kr[dr]+(kr[dr]-Mr[dr])*((sr-cr)/this.comp.globalData.frameRate)/5e-4;return pr}return kr+(kr-Mr)*((sr-cr)/.001)}return this.getValueAtTime(((sr-or)%ur+or)/this.comp.globalData.frameRate,0)}function e(rr,nr,ar){if(!this.k)return this.pv;rr=rr?rr.toLowerCase():"";var sr=this.comp.renderedFrame,lr=this.keyframes,cr=lr[0].t;if(sr>=cr)return this.pv;var ur,or;ar?(nr?ur=Math.abs(this.elem.comp.globalData.frameRate*nr):ur=Math.max(0,this.elem.data.op-cr),or=cr+ur):((!nr||nr>lr.length-1)&&(nr=lr.length-1),or=lr[nr].t,ur=or-cr);var dr,hr,pr;if(rr==="pingpong"){var mr=Math.floor((cr-sr)/ur);if(mr%2===0)return this.getValueAtTime(((cr-sr)%ur+cr)/this.comp.globalData.frameRate,0)}else if(rr==="offset"){var vr=this.getValueAtTime(cr/this.comp.globalData.frameRate,0),Er=this.getValueAtTime(or/this.comp.globalData.frameRate,0),Cr=this.getValueAtTime((ur-(cr-sr)%ur+cr)/this.comp.globalData.frameRate,0),Pr=Math.floor((cr-sr)/ur)+1;if(this.pv.length){for(pr=new Array(vr.length),hr=pr.length,dr=0;dr<hr;dr+=1)pr[dr]=Cr[dr]-(Er[dr]-vr[dr])*Pr;return pr}return Cr-(Er-vr)*Pr}else if(rr==="continue"){var kr=this.getValueAtTime(cr/this.comp.globalData.frameRate,0),Mr=this.getValueAtTime((cr+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(pr=new Array(kr.length),hr=pr.length,dr=0;dr<hr;dr+=1)pr[dr]=kr[dr]+(kr[dr]-Mr[dr])*(cr-sr)/.001;return pr}return kr+(kr-Mr)*(cr-sr)/.001}return this.getValueAtTime((ur-((cr-sr)%ur+cr))/this.comp.globalData.frameRate,0)}function r(rr,nr){if(!this.k)return this.pv;if(rr=(rr||.4)*.5,nr=Math.floor(nr||5),nr<=1)return this.pv;var ar=this.comp.renderedFrame/this.comp.globalData.frameRate,sr=ar-rr,lr=ar+rr,cr=nr>1?(lr-sr)/(nr-1):1,ur=0,or=0,dr;this.pv.length?dr=createTypedArray("float32",this.pv.length):dr=0;for(var hr;ur<nr;){if(hr=this.getValueAtTime(sr+ur*cr),this.pv.length)for(or=0;or<this.pv.length;or+=1)dr[or]+=hr[or];else dr+=hr;ur+=1}if(this.pv.length)for(or=0;or<this.pv.length;or+=1)dr[or]/=nr;else dr/=nr;return dr}function s(rr){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var nr=this._transformCachingAtTime.v;if(nr.cloneFromProps(this.pre.props),this.appliedTransformations<1){var ar=this.a.getValueAtTime(rr);nr.translate(-ar[0]*this.a.mult,-ar[1]*this.a.mult,ar[2]*this.a.mult)}if(this.appliedTransformations<2){var sr=this.s.getValueAtTime(rr);nr.scale(sr[0]*this.s.mult,sr[1]*this.s.mult,sr[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var lr=this.sk.getValueAtTime(rr),cr=this.sa.getValueAtTime(rr);nr.skewFromAxis(-lr*this.sk.mult,cr*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var ur=this.r.getValueAtTime(rr);nr.rotate(-ur*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var or=this.rz.getValueAtTime(rr),dr=this.ry.getValueAtTime(rr),hr=this.rx.getValueAtTime(rr),pr=this.or.getValueAtTime(rr);nr.rotateZ(-or*this.rz.mult).rotateY(dr*this.ry.mult).rotateX(hr*this.rx.mult).rotateZ(-pr[2]*this.or.mult).rotateY(pr[1]*this.or.mult).rotateX(pr[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var mr=this.px.getValueAtTime(rr),vr=this.py.getValueAtTime(rr);if(this.data.p.z){var Er=this.pz.getValueAtTime(rr);nr.translate(mr*this.px.mult,vr*this.py.mult,-Er*this.pz.mult)}else nr.translate(mr*this.px.mult,vr*this.py.mult,0)}else{var Cr=this.p.getValueAtTime(rr);nr.translate(Cr[0]*this.p.mult,Cr[1]*this.p.mult,-Cr[2]*this.p.mult)}return nr}function o(){return this.v.clone(new Matrix)}var d=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(rr,nr,ar){var sr=d(rr,nr,ar);return sr.dynamicProperties.length?sr.getValueAtTime=s.bind(sr):sr.getValueAtTime=o.bind(sr),sr.setGroupProperty=expressionHelpers.setGroupProperty,sr};var L=PropertyFactory.getProp;PropertyFactory.getProp=function(rr,nr,ar,sr,lr){var cr=L(rr,nr,ar,sr,lr);cr.kf?cr.getValueAtTime=expressionHelpers.getValueAtTime.bind(cr):cr.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(cr),cr.setGroupProperty=expressionHelpers.setGroupProperty,cr.loopOut=t,cr.loopIn=e,cr.smooth=r,cr.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(cr),cr.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(cr),cr.numKeys=nr.a===1?nr.k.length:0,cr.propertyIndex=nr.ix;var ur=0;return ar!==0&&(ur=createTypedArray("float32",nr.a===1?nr.k[0].s.length:nr.k.length)),cr._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:ur},expressionHelpers.searchExpressions(rr,nr,cr),cr.k&&lr.addDynamicProperty(cr),cr};function ge(rr){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),rr*=this.elem.globalData.frameRate,rr-=this.offsetTime,rr!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<rr?this._caching.lastIndex:0,this._cachingAtTime.lastTime=rr,this.interpolateShape(rr,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}var Mt=ShapePropertyFactory.getConstructorFunction(),er=ShapePropertyFactory.getKeyframedConstructorFunction();function tr(){}tr.prototype={vertices:function(nr,ar){this.k&&this.getValue();var sr=this.v;ar!==void 0&&(sr=this.getValueAtTime(ar,0));var lr,cr=sr._length,ur=sr[nr],or=sr.v,dr=createSizedArray(cr);for(lr=0;lr<cr;lr+=1)nr==="i"||nr==="o"?dr[lr]=[ur[lr][0]-or[lr][0],ur[lr][1]-or[lr][1]]:dr[lr]=[ur[lr][0],ur[lr][1]];return dr},points:function(nr){return this.vertices("v",nr)},inTangents:function(nr){return this.vertices("i",nr)},outTangents:function(nr){return this.vertices("o",nr)},isClosed:function(){return this.v.c},pointOnPath:function(nr,ar){var sr=this.v;ar!==void 0&&(sr=this.getValueAtTime(ar,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(sr));for(var lr=this._segmentsLength,cr=lr.lengths,ur=lr.totalLength*nr,or=0,dr=cr.length,hr=0,pr;or<dr;){if(hr+cr[or].addedLength>ur){var mr=or,vr=sr.c&&or===dr-1?0:or+1,Er=(ur-hr)/cr[or].addedLength;pr=bez.getPointInSegment(sr.v[mr],sr.v[vr],sr.o[mr],sr.i[vr],Er,cr[or]);break}else hr+=cr[or].addedLength;or+=1}return pr||(pr=sr.c?[sr.v[0][0],sr.v[0][1]]:[sr.v[sr._length-1][0],sr.v[sr._length-1][1]]),pr},vectorOnPath:function(nr,ar,sr){nr==1?nr=this.v.c:nr==0&&(nr=.999);var lr=this.pointOnPath(nr,ar),cr=this.pointOnPath(nr+.001,ar),ur=cr[0]-lr[0],or=cr[1]-lr[1],dr=Math.sqrt(Math.pow(ur,2)+Math.pow(or,2));if(dr===0)return[0,0];var hr=sr==="tangent"?[ur/dr,or/dr]:[-or/dr,ur/dr];return hr},tangentOnPath:function(nr,ar){return this.vectorOnPath(nr,ar,"tangent")},normalOnPath:function(nr,ar){return this.vectorOnPath(nr,ar,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([tr],Mt),extendPrototype([tr],er),er.prototype.getValueAtTime=ge,er.prototype.initiateExpression=ExpressionManager.initiateExpression;var ir=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(rr,nr,ar,sr,lr){var cr=ir(rr,nr,ar,sr,lr);return cr.propertyIndex=nr.ix,cr.lock=!1,ar===3?expressionHelpers.searchExpressions(rr,nr.pt,cr):ar===4&&expressionHelpers.searchExpressions(rr,nr.ks,cr),cr.k&&rr.addDynamicProperty(cr),cr}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function t(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(e,r){var s=this.calculateExpression(r);if(e.t!==s){var o={};return this.copyData(o,e),o.t=s.toString(),o.__complete=!1,o}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),r=this.searchExpressions();return this.kf=e||r,this.kf},TextProperty.prototype.searchExpressions=t}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function t(e,r){var s=createNS("feMerge");s.setAttribute("result",e);var o,d;for(d=0;d<r.length;d+=1)o=createNS("feMergeNode"),o.setAttribute("in",r[d]),s.appendChild(o),s.appendChild(o);return s}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(t,e,r,s,o){this.filterManager=e;var d=createNS("feColorMatrix");d.setAttribute("type","matrix"),d.setAttribute("color-interpolation-filters","linearRGB"),d.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=d,d.setAttribute("result",s+"_tint_1"),t.appendChild(d),d=createNS("feColorMatrix"),d.setAttribute("type","matrix"),d.setAttribute("color-interpolation-filters","sRGB"),d.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),d.setAttribute("result",s+"_tint_2"),t.appendChild(d),this.matrixFilter=d;var L=this.createMergeNode(s,[o,s+"_tint_1",s+"_tint_2"]);t.appendChild(L)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+s+" 0"),this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 1 0")}};function SVGFillFilter(t,e,r,s){this.filterManager=e;var o=createNS("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),o.setAttribute("result",s),t.appendChild(o),this.matrixFilter=o}SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}};function SVGStrokeEffect(t,e,r){this.initialized=!1,this.filterManager=e,this.elem=r,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var t=this.elem.layerElement.children||this.elem.layerElement.childNodes,e,r,s,o;for(this.filterManager.effectElements[1].p.v===1?(o=this.elem.maskManager.masksProperties.length,s=0):(s=this.filterManager.effectElements[0].p.v-1,o=s+1),r=createNS("g"),r.setAttribute("fill","none"),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-dashoffset",1),s;s<o;s+=1)e=createNS("path"),r.appendChild(e),this.paths.push({p:e,m:s});if(this.filterManager.effectElements[10].p.v===3){var d=createNS("mask"),L=createElementID();d.setAttribute("id",L),d.setAttribute("mask-type","alpha"),d.appendChild(r),this.elem.globalData.defs.appendChild(d);var ge=createNS("g");for(ge.setAttribute("mask","url("+getLocationHref()+"#"+L+")");t[0];)ge.appendChild(t[0]);this.elem.layerElement.appendChild(ge),this.masker=d,r.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(t=this.elem.layerElement.children||this.elem.layerElement.childNodes;t.length;)this.elem.layerElement.removeChild(t[0]);this.elem.layerElement.appendChild(r),this.elem.layerElement.removeAttribute("mask"),r.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=r},SVGStrokeEffect.prototype.renderFrame=function(t){this.initialized||this.initialize();var e,r=this.paths.length,s,o;for(e=0;e<r;e+=1)if(this.paths[e].m!==-1&&(s=this.elem.maskManager.viewData[this.paths[e].m],o=this.paths[e].p,(t||this.filterManager._mdf||s.prop._mdf)&&o.setAttribute("d",s.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||s.prop._mdf)){var d;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var L=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,ge=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,Mt=o.getTotalLength();d="0 0 0 "+Mt*L+" ";var er=Mt*(ge-L),tr=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01,ir=Math.floor(er/tr),rr;for(rr=0;rr<ir;rr+=1)d+="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01+" ";d+="0 "+Mt*10+" 0 0"}else d="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01;o.setAttribute("stroke-dasharray",d)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",this.filterManager.effectElements[4].p.v*2),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(t||this.filterManager.effectElements[3].p._mdf)){var nr=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(nr[0]*255)+","+bmFloor(nr[1]*255)+","+bmFloor(nr[2]*255)+")")}};function SVGTritoneFilter(t,e,r,s){this.filterManager=e;var o=createNS("feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","linearRGB"),o.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),t.appendChild(o);var d=createNS("feComponentTransfer");d.setAttribute("color-interpolation-filters","sRGB"),d.setAttribute("result",s),this.matrixFilter=d;var L=createNS("feFuncR");L.setAttribute("type","table"),d.appendChild(L),this.feFuncR=L;var ge=createNS("feFuncG");ge.setAttribute("type","table"),d.appendChild(ge),this.feFuncG=ge;var Mt=createNS("feFuncB");Mt.setAttribute("type","table"),d.appendChild(Mt),this.feFuncB=Mt,t.appendChild(d)}SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v,o=s[0]+" "+r[0]+" "+e[0],d=s[1]+" "+r[1]+" "+e[1],L=s[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",o),this.feFuncG.setAttribute("tableValues",d),this.feFuncB.setAttribute("tableValues",L)}};function SVGProLevelsFilter(t,e,r,s){this.filterManager=e;var o=this.filterManager.effectElements,d=createNS("feComponentTransfer");(o[10].p.k||o[10].p.v!==0||o[11].p.k||o[11].p.v!==1||o[12].p.k||o[12].p.v!==1||o[13].p.k||o[13].p.v!==0||o[14].p.k||o[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",d)),(o[17].p.k||o[17].p.v!==0||o[18].p.k||o[18].p.v!==1||o[19].p.k||o[19].p.v!==1||o[20].p.k||o[20].p.v!==0||o[21].p.k||o[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",d)),(o[24].p.k||o[24].p.v!==0||o[25].p.k||o[25].p.v!==1||o[26].p.k||o[26].p.v!==1||o[27].p.k||o[27].p.v!==0||o[28].p.k||o[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",d)),(o[31].p.k||o[31].p.v!==0||o[32].p.k||o[32].p.v!==1||o[33].p.k||o[33].p.v!==1||o[34].p.k||o[34].p.v!==0||o[35].p.k||o[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",d)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(d.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(d)),(o[3].p.k||o[3].p.v!==0||o[4].p.k||o[4].p.v!==1||o[5].p.k||o[5].p.v!==1||o[6].p.k||o[6].p.v!==0||o[7].p.k||o[7].p.v!==1)&&(d=createNS("feComponentTransfer"),d.setAttribute("color-interpolation-filters","sRGB"),d.setAttribute("result",s),t.appendChild(d),this.feFuncRComposed=this.createFeFunc("feFuncR",d),this.feFuncGComposed=this.createFeFunc("feFuncG",d),this.feFuncBComposed=this.createFeFunc("feFuncB",d))}SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,s,o){for(var d=0,L=256,ge,Mt=Math.min(t,e),er=Math.max(t,e),tr=Array.call(null,{length:L}),ir,rr=0,nr=o-s,ar=e-t;d<=256;)ge=d/256,ge<=Mt?ir=ar<0?o:s:ge>=er?ir=ar<0?s:o:ir=s+nr*Math.pow((ge-t)/ar,1/r),tr[rr]=ir,rr+=1,d+=256/(L-1);return tr.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}};function SVGDropShadowEffect(t,e,r,s,o){var d=e.container.globalData.renderConfig.filterSize,L=e.data.fs||d;t.setAttribute("x",L.x||d.x),t.setAttribute("y",L.y||d.y),t.setAttribute("width",L.width||d.width),t.setAttribute("height",L.height||d.height),this.filterManager=e;var ge=createNS("feGaussianBlur");ge.setAttribute("in","SourceAlpha"),ge.setAttribute("result",s+"_drop_shadow_1"),ge.setAttribute("stdDeviation","0"),this.feGaussianBlur=ge,t.appendChild(ge);var Mt=createNS("feOffset");Mt.setAttribute("dx","25"),Mt.setAttribute("dy","0"),Mt.setAttribute("in",s+"_drop_shadow_1"),Mt.setAttribute("result",s+"_drop_shadow_2"),this.feOffset=Mt,t.appendChild(Mt);var er=createNS("feFlood");er.setAttribute("flood-color","#00ff00"),er.setAttribute("flood-opacity","1"),er.setAttribute("result",s+"_drop_shadow_3"),this.feFlood=er,t.appendChild(er);var tr=createNS("feComposite");tr.setAttribute("in",s+"_drop_shadow_3"),tr.setAttribute("in2",s+"_drop_shadow_2"),tr.setAttribute("operator","in"),tr.setAttribute("result",s+"_drop_shadow_4"),t.appendChild(tr);var ir=this.createMergeNode(s,[s+"_drop_shadow_4",o]);t.appendChild(ir)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(e[0]*255),Math.round(e[1]*255),Math.round(e[2]*255)))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,s=(this.filterManager.effectElements[2].p.v-90)*degToRads,o=r*Math.cos(s),d=r*Math.sin(s);this.feOffset.setAttribute("dx",o),this.feOffset.setAttribute("dy",d)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var s=r.children,o=0,d=s.length;o<d&&s[o]!==t.layerElement;)o+=1;var L;o<=d-2&&(L=s[o+1]);var ge=createNS("use");ge.setAttribute("href","#"+e),L?r.insertBefore(ge,L):r.appendChild(ge)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),s=createNS("mask");s.setAttribute("id",e.layerId),s.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var o=t.globalData.defs;o.appendChild(s);var d=createNS("symbol");d.setAttribute("id",r),this.replaceInParent(e,r),d.appendChild(e.layerElement),o.appendChild(d);var L=createNS("use");L.setAttribute("href","#"+r),s.appendChild(L),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,s=e.length;r<s;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()};function SVGGaussianBlurEffect(t,e,r,s){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var o=createNS("feGaussianBlur");o.setAttribute("result",s),t.appendChild(o),this.feGaussianBlur=o}SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3,r=this.filterManager.effectElements[0].p.v*e,s=this.filterManager.effectElements[1].p.v,o=s==3?0:r,d=s==2?0:r;this.feGaussianBlur.setAttribute("stdDeviation",o+" "+d);var L=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",L)}};function TransformEffect(){}TransformEffect.prototype.init=function(t){this.effectsManager=t,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(t){if(this._opMdf=!1,this._mdf=!1,t||this.effectsManager._mdf){var e=this.effectsManager.effectElements,r=e[0].p.v,s=e[1].p.v,o=e[2].p.v===1,d=e[3].p.v,L=o?d:e[4].p.v,ge=e[5].p.v,Mt=e[6].p.v,er=e[7].p.v;this.matrix.reset(),this.matrix.translate(-r[0],-r[1],r[2]),this.matrix.scale(L*.01,d*.01,1),this.matrix.rotate(-er*degToRads),this.matrix.skewFromAxis(-ge*degToRads,(Mt+90)*degToRads),this.matrix.translate(s[0],s[1],0),this._mdf=!0,this.opacity!==e[8].p.v&&(this.opacity=e[8].p.v,this._opMdf=!0)}};function SVGTransformEffect(t,e){this.init(e)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(t){this.init(t)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})})(lottie,lottie.exports);var lottieExports=lottie.exports;const Lottie=getDefaultExportFromCjs$1(lottieExports);(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".lottie-animation-container{width:var(--lottie-animation-container-width);height:var(--lottie-animation-container-height);background-color:var(--lottie-animation-container-background-color);overflow:hidden;margin:var(--lottie-animation-margin)}.lottie-animation-container svg{transform:scale(var(--lottie-animation-scale))}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var __defProp$b=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp$b=(t,e,r)=>e in t?__defProp$b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__spreadValues=(t,e)=>{for(var r in e||(e={}))__hasOwnProp.call(e,r)&&__defNormalProp$b(t,r,e[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(e))__propIsEnum.call(e,r)&&__defNormalProp$b(t,r,e[r]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e)),freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global,freeGlobal$1=freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal$1||freeSelf||Function("return this")(),root$1=root,Symbol$1=root$1.Symbol,Symbol$2=Symbol$1,objectProto$e=Object.prototype,hasOwnProperty$b=objectProto$e.hasOwnProperty,nativeObjectToString$1=objectProto$e.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag(t){var e=hasOwnProperty$b.call(t,symToStringTag$1),r
74=t[symToStringTag$1];try{t[symToStringTag$1]=void 0;var s=!0}catch{}var o=nativeObjectToString$1.call(t);return s&&(e?t[symToStringTag$1]=r:delete t[symToStringTag$1]),o}var objectProto$d=Object.prototype,nativeObjectToString=objectProto$d.toString;function objectToString(t){return nativeObjectToString.call(t)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$2?Symbol$2.toStringTag:void 0;function baseGetTag(t){return t==null?t===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(t)?getRawTag(t):objectToString(t)}function isObjectLike(t){return t!=null&&typeof t=="object"}var isArray=Array.isArray,isArray$1=isArray;function isObject$1(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(t){if(!isObject$1(t))return!1;var e=baseGetTag(t);return e==funcTag$2||e==genTag$1||e==asyncTag||e==proxyTag}var coreJsData=root$1["__core-js_shared__"],coreJsData$1=coreJsData,maskSrcKey=function(){var t=/[^.]+$/.exec(coreJsData$1&&coreJsData$1.keys&&coreJsData$1.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function isMasked(t){return!!maskSrcKey&&maskSrcKey in t}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(t){if(t!=null){try{return funcToString$1.call(t)}catch{}try{return t+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$c=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$a=objectProto$c.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$a).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(t){if(!isObject$1(t)||isMasked(t))return!1;var e=isFunction(t)?reIsNative:reIsHostCtor;return e.test(toSource(t))}function getValue(t,e){return t==null?void 0:t[e]}function getNative(t,e){var r=getValue(t,e);return baseIsNative(r)?r:void 0}var WeakMap$1=getNative(root$1,"WeakMap"),WeakMap$1$1=WeakMap$1,objectCreate=Object.create,baseCreate=function(){function t(){}return function(e){if(!isObject$1(e))return{};if(objectCreate)return objectCreate(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),baseCreate$1=baseCreate,defineProperty=function(){try{var t=getNative(Object,"defineProperty");return t({},"",{}),t}catch{}}(),defineProperty$1=defineProperty;function arrayEach(t,e){for(var r=-1,s=t==null?0:t.length;++r<s&&e(t[r],r,t)!==!1;);return t}var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(t,e){var r=typeof t;return e=e??MAX_SAFE_INTEGER$1,!!e&&(r=="number"||r!="symbol"&&reIsUint.test(t))&&t>-1&&t%1==0&&t<e}function baseAssignValue(t,e,r){e=="__proto__"&&defineProperty$1?defineProperty$1(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function eq(t,e){return t===e||t!==t&&e!==e}var objectProto$b=Object.prototype,hasOwnProperty$9=objectProto$b.hasOwnProperty;function assignValue(t,e,r){var s=t[e];(!(hasOwnProperty$9.call(t,e)&&eq(s,r))||r===void 0&&!(e in t))&&baseAssignValue(t,e,r)}var MAX_SAFE_INTEGER$2=9007199254740991;function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=MAX_SAFE_INTEGER$2}function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}var objectProto$a=Object.prototype;function isPrototype(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||objectProto$a;return t===r}function baseTimes(t,e){for(var r=-1,s=Array(t);++r<t;)s[r]=e(r);return s}var argsTag$3="[object Arguments]";function baseIsArguments(t){return isObjectLike(t)&&baseGetTag(t)==argsTag$3}var objectProto$9=Object.prototype,hasOwnProperty$8=objectProto$9.hasOwnProperty,propertyIsEnumerable$1=objectProto$9.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(t){return isObjectLike(t)&&hasOwnProperty$8.call(t,"callee")&&!propertyIsEnumerable$1.call(t,"callee")},isArguments$1=isArguments;function stubFalse(){return!1}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$1=moduleExports$2?root$1.Buffer:void 0,nativeIsBuffer=Buffer$1?Buffer$1.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse,isBuffer$1=isBuffer,argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$5="[object Map]",numberTag$3="[object Number]",objectTag$3="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$3="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array
74]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0;typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$3]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$5]=typedArrayTags[numberTag$3]=typedArrayTags[objectTag$3]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$5]=typedArrayTags[stringTag$3]=typedArrayTags[weakMapTag$2]=!1;function baseIsTypedArray(t){return isObjectLike(t)&&isLength(t.length)&&!!typedArrayTags[baseGetTag(t)]}function baseUnary(t){return function(e){return t(e)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal$1.process,nodeUtil=function(){try{var t=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;return t||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}(),nodeUtil$1=nodeUtil,nodeIsTypedArray=nodeUtil$1&&nodeUtil$1.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,isTypedArray$1=isTypedArray,objectProto$8=Object.prototype,hasOwnProperty$7=objectProto$8.hasOwnProperty;function arrayLikeKeys(t,e){var r=isArray$1(t),s=!r&&isArguments$1(t),o=!r&&!s&&isBuffer$1(t),d=!r&&!s&&!o&&isTypedArray$1(t),L=r||s||o||d,ge=L?baseTimes(t.length,String):[],Mt=ge.length;for(var er in t)hasOwnProperty$7.call(t,er)&&!(L&&(er=="length"||o&&(er=="offset"||er=="parent")||d&&(er=="buffer"||er=="byteLength"||er=="byteOffset")||isIndex(er,Mt)))&&ge.push(er);return ge}function overArg(t,e){return function(r){return t(e(r))}}var nativeKeys=overArg(Object.keys,Object),nativeKeys$1=nativeKeys,objectProto$7=Object.prototype,hasOwnProperty$6=objectProto$7.hasOwnProperty;function baseKeys(t){if(!isPrototype(t))return nativeKeys$1(t);var e=[];for(var r in Object(t))hasOwnProperty$6.call(t,r)&&r!="constructor"&&e.push(r);return e}function keys(t){return isArrayLike(t)?arrayLikeKeys(t):baseKeys(t)}var nativeCreate=getNative(Object,"create"),nativeCreate$1=nativeCreate;function hashClear(){this.__data__=nativeCreate$1?nativeCreate$1(null):{},this.size=0}function hashDelete(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$5=Object.prototype,hasOwnProperty$4=objectProto$5.hasOwnProperty;function hashGet(t){var e=this.__data__;if(nativeCreate$1){var r=e[t];return r===HASH_UNDEFINED$2?void 0:r}return hasOwnProperty$4.call(e,t)?e[t]:void 0}var objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty;function hashHas(t){var e=this.__data__;return nativeCreate$1?e[t]!==void 0:hasOwnProperty$3.call(e,t)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nativeCreate$1&&e===void 0?HASH_UNDEFINED$1:e,this}function Hash(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var s=t[e];this.set(s[0],s[1])}}Hash.prototype.clear=hashClear;Hash.prototype.delete=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function assocIndexOf(t,e){for(var r=t.length;r--;)if(eq(t[r][0],e))return r;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(t){var e=this.__data__,r=assocIndexOf(e,t);if(r<0)return!1;var s=e.length-1;return r==s?e.pop():splice.call(e,r,1),--this.size,!0}function listCacheGet(t){var e=this.__data__,r=assocIndexOf(e,t);return r<0?void 0:e[r][1]}function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1}
vendor: 8,954 bytes, line 74
74function listCacheSet(t,e){var r=this.__data__,s=assocIndexOf(r,t);return s<0?(++this.size,r.push([t,e])):r[s][1]=e,this}function ListCache(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var s=t[e];this.set(s[0],s[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype.delete=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;var Map$1=getNative(root$1,"Map"),Map$1$1=Map$1;function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1$1||ListCache),string:new Hash}}function isKeyable(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function getMapData(t,e){var r=t.__data__;return isKeyable(e)?r[typeof e=="string"?"string":"hash"]:r.map}function mapCacheDelete(t){var e=getMapData(this,t).delete(t);return this.size-=e?1:0,e}function mapCacheGet(t){return getMapData(this,t).get(t)}function mapCacheHas(t){return getMapData(this,t).has(t)}function mapCacheSet(t,e){var r=getMapData(this,t),s=r.size;return r.set(t,e),this.size+=r.size==s?0:1,this}function MapCache(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var s=t[e];this.set(s[0],s[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype.delete=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function arrayPush(t,e){for(var r=-1,s=e.length,o=t.length;++r<s;)t[o+r]=e[r];return t}var getPrototype=overArg(Object.getPrototypeOf,Object),getPrototype$1=getPrototype;function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function stackGet(t){return this.__data__.get(t)}function stackHas(t){return this.__data__.has(t)}var LARGE_ARRAY_SIZE=200;function stackSet(t,e){var r=this.__data__;if(r instanceof ListCache){var s=r.__data__;if(!Map$1$1||s.length<LARGE_ARRAY_SIZE-1)return s.push([t,e]),this.size=++r.size,this;r=this.__data__=new MapCache(s)}return r.set(t,e),this.size=r.size,this}function Stack(t){var e=this.__data__=new ListCache(t);this.size=e.size}Stack.prototype.clear=stackClear;Stack.prototype.delete=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer2=moduleExports?root$1.Buffer:void 0;Buffer2&&Buffer2.allocUnsafe;function cloneBuffer(t,e){return t.slice()}function arrayFilter(t,e){for(var r=-1,s=t==null?0:t.length,o=0,d=[];++r<s;){var L=t[r];e(L,r,t)&&(d[o++]=L)}return d}function stubArray(){return[]}var objectProto$3=Object.prototype,propertyIsEnumerable=objectProto$3.propertyIsEnumerable,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols$1?function(t){return t==null?[]:(t=Object(t),arrayFilter(nativeGetSymbols$1(t),function(e){return propertyIsEnumerable.call(t,e)}))}:stubArray,getSymbols$1=getSymbols;function baseGetAllKeys(t,e,r){var s=e(t);return isArray$1(t)?s:arrayPush(s,r(t))}function getAllKeys(t){return baseGetAllKeys(t,keys,getSymbols$1)}var DataView$1=getNative(root$1,"DataView"),DataView$1$1=DataView$1,Promise$1=getNative(root$1,"Promise"),Promise$2=Promise$1,Set$1=getNative(root$1,"Set"),Set$1$1=Set$1,mapTag$4="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",setTag$4="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$3="[object DataView]",dataViewCtorString=toSource(DataView$1$1),mapCtorString=toSource(Map$1$1),promiseCtorString=toSource(Promise$2),setCtorString=toSource(Set$1$1),weakMapCtorString=toSource(WeakMap$1$1),getTag=baseGetTag;(DataView$1$1&&getTag(new DataView$1$1(new ArrayBuffer(1)))!=dataViewTag$3||Map$1$1&&getTag(new Map$1$1)!=mapTag$4||Promise$2&&getTag(Promise$2.resolve())!=promiseTag||Set$1$1&&getTag(new Set$1$1)!=setTag$4||WeakMap$1$1&&getTag(new WeakMap$1$1)!=weakMapTag$1)&&(getTag=function(t){var e=baseGetTag(t),r=e==objectTag$2?t.constructor:void 0,s=r?toSource(r):"";if(s)switch(s){case dataViewCtorString:return dataViewTag$3;case mapCtorString:return mapTag$4;case promiseCtorString:return promiseTag;case setCtorString:return setTag$4;case weakMapCtorString:return weakMapTag$1}return e});var getTag$1=getTag,objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function initCloneArray(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&hasOwnProperty$2.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Uint8Array2=root$1.Uint8Array,Uint8Array$1=Uint8Array2;function cloneArrayBuffer(t){var e=new t.constructor(t.byteLength);return new Uint8Array$1(e).set(new Uint8Array$1(t)),e}function cloneDataView(t,e){var r=cloneArrayBuffer(t.buffer);return new t.constructor(r,t.byteOffset,t.byteLength)}var reFlags=/\w*$/;function cloneRegExp(t){var e=new t.constructor(t.source,reFlags.exec(t));return e.lastIndex=t.lastIndex,e}var symbolProto$1=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$1?symbolProto$1.valueOf:void 0;function cloneSymbol(t){return symbolValueOf$1?Object(symbolValueOf$1.call(t)):{}}function cloneTypedArray(t,e){var r=cloneArrayBuffer(t.buffer);return new t.constructor(r,t.byteOffset,t.length)}var boolTag$2="[object Boolean]",dateTag$2="[object Date]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$2="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag(t,e,r){var s=t.constructor;switch(e){case arrayBufferTag$2:return cloneArrayBuffer(t);case boolTag$2:case dateTag$2:return new s(+t);case dataViewTag$2:return cloneDataView(t);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(t);case mapTag$3:return new s;case numberTag$2:case stringTag$2:return new s(t);case regexpTag$2:return cloneRegExp(t);case setTag$3:return new s;case symbolTag$2:return cloneSymbol(t)}}function initCloneObject(t){return typeof t.constructor=="function"&&!isPrototype(t)?baseCreate$1(getPrototype$1(t)):{}}var mapTag$2="[object Map]";function baseIsMap(t){return isObjectLike(t)&&getTag$1(t)==mapTag$2}var nodeIsMap=nodeUtil$1&&nodeUtil$1.isMap,isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap,isMap$1=isMap,setTag$2="[object Set]";function baseIsSet(t){return isObjectLike(t)&&getTag$1(t)==setTag$2}var nodeIsSet=nodeUtil$1&&nodeUtil$1.isSet,isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,isSet$1=isSet,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag$1="[object Map]",numberTag$1="[object Number]",objectTag$1="[object Object]",regexpTag$1="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag$1]=cloneableTags[arrayTag$1]=cloneableTags[arrayBufferTag$1]=cloneableTags[dataViewTag$1]=cloneableTags[boolTag$1]=cloneableTags[dateTag$1]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag$1]=cloneableTags[numberTag$1]=cloneableTags[objectTag$1]=cloneableTags[regexpTag$1]=cloneableTags[setTag$1]=cloneableTags[stringTag$1]=cloneableTags[symbolTag$1]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0;cloneableTags[errorTag$1]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;function baseClone(t,e,r,s,o,d){var L;if(L!==void 0)return L;if(!isObject$1(t))return t;var ge=isArray$1(t);if(ge)L=initCloneArray(t);else{var Mt=getTag$1(t),er=Mt==funcTag||Mt==genTag;if(isBuffer$1(t))return cloneBuffer(t);if(Mt==objectTag$1||Mt==argsTag$1||er&&!o)L=er?{}:initCloneObject(t);else{if(!cloneableTags[Mt])return o?t:{};L=initCloneByTag(t,Mt)}}
vendor: 3,634 bytes, line 74
74d||(d=new Stack);var tr=d.get(t);if(tr)return tr;d.set(t,L),isSet$1(t)?t.forEach(function(nr){L.add(baseClone(nr,e,r,nr,t,d))}):isMap$1(t)&&t.forEach(function(nr,ar){L.set(ar,baseClone(nr,e,r,ar,t,d))});var ir=getAllKeys,rr=ge?void 0:ir(t);return arrayEach(rr||t,function(nr,ar){rr&&(ar=nr,nr=t[ar]),assignValue(L,ar,baseClone(nr,e,r,ar,t,d))}),L}var CLONE_DEEP_FLAG=1,CLONE_SYMBOLS_FLAG=4;function cloneDeep(t){return baseClone(t,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(t){return this.__data__.set(t,HASH_UNDEFINED),this}function setCacheHas(t){return this.__data__.has(t)}function SetCache(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new MapCache;++e<r;)this.add(t[e])}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;function arraySome(t,e){for(var r=-1,s=t==null?0:t.length;++r<s;)if(e(t[r],r,t))return!0;return!1}function cacheHas(t,e){return t.has(e)}var COMPARE_PARTIAL_FLAG$3=1,COMPARE_UNORDERED_FLAG$1=2;function equalArrays(t,e,r,s,o,d){var L=r&COMPARE_PARTIAL_FLAG$3,ge=t.length,Mt=e.length;if(ge!=Mt&&!(L&&Mt>ge))return!1;var er=d.get(t),tr=d.get(e);if(er&&tr)return er==e&&tr==t;var ir=-1,rr=!0,nr=r&COMPARE_UNORDERED_FLAG$1?new SetCache:void 0;for(d.set(t,e),d.set(e,t);++ir<ge;){var ar=t[ir],sr=e[ir];if(s)var lr=L?s(sr,ar,ir,e,t,d):s(ar,sr,ir,t,e,d);if(lr!==void 0){if(lr)continue;rr=!1;break}if(nr){if(!arraySome(e,function(cr,ur){if(!cacheHas(nr,ur)&&(ar===cr||o(ar,cr,r,s,d)))return nr.push(ur)})){rr=!1;break}}else if(!(ar===sr||o(ar,sr,r,s,d))){rr=!1;break}}return d.delete(t),d.delete(e),rr}function mapToArray(t){var e=-1,r=Array(t.size);return t.forEach(function(s,o){r[++e]=[o,s]}),r}function setToArray(t){var e=-1,r=Array(t.size);return t.forEach(function(s){r[++e]=s}),r}var COMPARE_PARTIAL_FLAG$2=1,COMPARE_UNORDERED_FLAG=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(t,e,r,s,o,d,L){switch(r){case dataViewTag:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case arrayBufferTag:return!(t.byteLength!=e.byteLength||!d(new Uint8Array$1(t),new Uint8Array$1(e)));case boolTag:case dateTag:case numberTag:return eq(+t,+e);case errorTag:return t.name==e.name&&t.message==e.message;case regexpTag:case stringTag:return t==e+"";case mapTag:var ge=mapToArray;case setTag:var Mt=s&COMPARE_PARTIAL_FLAG$2;if(ge||(ge=setToArray),t.size!=e.size&&!Mt)return!1;var er=L.get(t);if(er)return er==e;s|=COMPARE_UNORDERED_FLAG,L.set(t,e);var tr=equalArrays(ge(t),ge(e),s,o,d,L);return L.delete(t),tr;case symbolTag:if(symbolValueOf)return symbolValueOf.call(t)==symbolValueOf.call(e)}return!1}var COMPARE_PARTIAL_FLAG$1=1,objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function equalObjects(t,e,r,s,o,d){var L=r&COMPARE_PARTIAL_FLAG$1,ge=getAllKeys(t),Mt=ge.length,er=getAllKeys(e),tr=er.length;if(Mt!=tr&&!L)return!1;for(var ir=Mt;ir--;){var rr=ge[ir];if(!(L?rr in e:hasOwnProperty$1.call(e,rr)))return!1}var nr=d.get(t),ar=d.get(e);if(nr&&ar)return nr==e&&ar==t;var sr=!0;d.set(t,e),d.set(e,t);for(var lr=L;++ir<Mt;){rr=ge[ir];var cr=t[rr],ur=e[rr];if(s)var or=L?s(ur,cr,rr,e,t,d):s(cr,ur,rr,t,e,d);if(!(or===void 0?cr===ur||o(cr,ur,r,s,d):or)){sr=!1;break}
74lr||(lr=rr=="constructor")}if(sr&&!lr){var dr=t.constructor,hr=e.constructor;dr!=hr&&"constructor"in t&&"constructor"in e&&!(typeof dr=="function"&&dr instanceof dr&&typeof hr=="function"&&hr instanceof hr)&&(sr=!1)}return d.delete(t),d.delete(e),sr}var COMPARE_PARTIAL_FLAG=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function baseIsEqualDeep(t,e,r,s,o,d){var L=isArray$1(t),ge=isArray$1(e),Mt=L?arrayTag:getTag$1(t),er=ge?arrayTag:getTag$1(e);Mt=Mt==argsTag?objectTag:Mt,er=er==argsTag?objectTag:er;var tr=Mt==objectTag,ir=er==objectTag,rr=Mt==er;if(rr&&isBuffer$1(t)){if(!isBuffer$1(e))return!1;L=!0,tr=!1}if(rr&&!tr)return d||(d=new Stack),L||isTypedArray$1(t)?equalArrays(t,e,r,s,o,d):equalByTag(t,e,Mt,r,s,o,d);if(!(r&COMPARE_PARTIAL_FLAG)){var nr=tr&&hasOwnProperty.call(t,"__wrapped__"),ar=ir&&hasOwnProperty.call(e,"__wrapped__");if(nr||ar){var sr=nr?t.value():t,lr=ar?e.value():e;return d||(d=new Stack),o(sr,lr,r,s,d)}}return rr?(d||(d=new Stack),equalObjects(t,e,r,s,o,d)):!1}function baseIsEqual(t,e,r,s,o){return t===e?!0:t==null||e==null||!isObjectLike(t)&&!isObjectLike(e)?t!==t&&e!==e:baseIsEqualDeep(t,e,r,s,baseIsEqual,o)}function isEqual(t,e){return baseIsEqual(t,e)}var _export_sfc$1=(t,e)=>{const r=t.__vccOpts||t;for(const[s,o]of e)r[s]=o;return r};const _sfc_main$d=defineComponent({props:{animationData:{type:Object,default:()=>({})},animationLink:{type:String,default:""},loop:{type:[Boolean,Number],default:!0},autoPlay:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},speed:{type:Number,default:1},delay:{type:Number,default:0},direction:{type:String,default:"forward"},pauseOnHover:{type:Boolean,default:!1},playOnHover:{type:Boolean,default:!1},backgroundColor:{type:String,default:"transparent"},pauseAnimation:{type:Boolean,default:!1},noMargin:{type:Boolean,default:!1},scale:{type:Number,default:1},renderer:{type:String,default:"svg"},rendererSettings:{type:Object,default:()=>({})},assetsPath:{type:String,default:""}},emits:{onComplete:null,onLoopComplete:null,onEnterFrame:null,onSegmentStart:null,onAnimationLoaded:null},setup(t,{emit:e}){const r=ref$2(),s=ref$2();let o=null,d=1;watchEffect(async()=>{if(t.animationLink!="")try{const mr=await(await fetch(t.animationLink)).json();r.value=mr,nextTick(()=>L())}catch(pr){console.error(pr);return}else if(isEqual(t.animationData,{})===!1)r.value=cloneDeep(t.animationData),nextTick(()=>L());else throw new Error("You must provide either animationLink or animationData")});const L=()=>
74{if(!s.value||!r.value)return;o==null||o.destroy(),o=null;let pr=t.autoPlay,mr=t.loop;t.playOnHover&&(pr=!1),typeof mr=="number"&&mr>0&&(mr=mr-1),t.delay>0&&(pr=!1);const vr={container:s.value,renderer:t.renderer,loop:mr,autoplay:pr,animationData:r.value,assetsPath:t.assetsPath};isEqual(t.rendererSettings,{})===!1&&(vr.rendererSettings=t.rendererSettings),t.scale!==1&&(vr.rendererSettings=__spreadProps(__spreadValues({},vr.rendererSettings),{viewBoxOnly:!0})),o=Lottie.loadAnimation(vr),setTimeout(()=>{pr=t.autoPlay,t.playOnHover?o==null||o.pause():pr?o==null||o.play():o==null||o.pause(),e("onAnimationLoaded")},t.delay),o.setSpeed(t.speed),t.direction==="reverse"&&o.setDirection(-1),t.direction==="normal"&&o.setDirection(1),(t.pauseAnimation||t.playOnHover)&&o.pause(),o.addEventListener("loopComplete",()=>{t.direction==="alternate"&&(o==null||o.stop(),d=d===-1?1:-1,o==null||o.setDirection(d),o==null||o.play()),e("onLoopComplete")}),o.addEventListener("complete",()=>{e("onComplete")}),o.addEventListener("enterFrame",()=>{e("onEnterFrame")}),o.addEventListener("segmentStart",()=>{e("onSegmentStart")})},ge=computed(()=>{let pr=t.width,mr=t.height;return typeof t.width=="number"&&(pr=`${t.width}px`),typeof t.height=="number"&&(mr=`${t.height}px`),{"--lottie-animation-container-width":pr,"--lottie-animation-container-height":mr,"--lottie-animation-container-background-color":t.backgroundColor,"--lottie-animation-margin":t.noMargin?"0":"0 auto","--lottie-animation-scale":t.scale!=1?t.scale:""}}),Mt=()=>{o&&t.pauseOnHover&&o.pause(),o&&t.playOnHover&&o.play()},er=()=>{o&&t.pauseOnHover&&o.play(),o&&t.playOnHover&&o.pause()};return watch(()=>t.pauseAnimation,()=>{if((t.pauseOnHover||t.playOnHover)&&t.pauseAnimation){console.error("If you are using pauseAnimation prop for Vue3-Lottie, please remove the props pauseOnHover and playOnHover");return}o&&(t.pauseAnimation?o.pause():o.play())}),{lottieAnimationContainer:s,hoverEnded:er,hoverStarted:Mt,getCurrentStyle:ge,play:()=>{o&&o.play()},pause:()=>{o&&o.pause()},stop:()=>{o&&o.stop()},destroy:()=>{o&&o.destroy()},setSpeed:(pr=1)=>{if(pr<=0)throw new Error("Speed must be greater than 0");o&&o.setSpeed(pr)},setDirection:pr=>{o&&(pr==="forward"?o.setDirection(1):pr==="reverse"&&o.setDirection(-1))},goToAndStop:(pr,mr=!0)=>{o&&o.goToAndStop(pr,mr)},goToAndPlay:(pr,mr=!0)=>{o&&o.goToAndPlay(pr,mr)},playSegments:(pr,mr=!1)=>{o&&o.playSegments(pr,mr)},setSubFrame:(pr=!0)=>{o&&o.setSubframe(pr)},getDuration:(pr=!0)=>{if(o)return o.getDuration(pr)},updateDocumentData:(pr,mr=0)=>{o&&o.renderer.elements[mr].updateDocumentData(pr)}}}});function _sfc_render(t,e,r,s,o,d){return openBlock(),createElementBlock("div",{ref:"lottieAnimationContainer",class:"lottie-animation-container",style:normalizeStyle(t.getCurrentStyle),onMouseenter:e[0]||(e[0]=(...L)=>t.hoverStarted&&t.hoverStarted(...L)),onMouseleave:e[1]||(e[1]=(...L)=>t.hoverEnded&&t.hoverEnded(...L))},null,36)}
74var Vue3Lottie=_export_sfc$1(_sfc_main$d,[["render",_sfc_render]]),index={install(t,e){var r;const s=(r=e==null?void 0:e.name)!=null?r:"Vue3Lottie";t.component(s,Vue3Lottie)}};const lottiePlayer_client_gmQLTfQQDf=defineNuxtPlugin(t=>{t.vueApp.use(index,{name:"Vue3Lottie"})}),apollo_1ILFkzpYSr=defineNuxtPlugin(t=>{const e=useRuntimeConfig(),{$apollo:r}=useNuxtApp(),s=useRoute$1(),o=useCookie("token");let d;o.value?d=s.query.token?s.query.token:o.value:d=s.query.token?s.query.token:e.PREPR_ACCESS_TOKEN,o.value=d;const L=setContext(async(ir,rr)=>({})),ge=L.concat(createHttpLink({uri:`https://graphql.prepr.io/${d}`})),Mt=L.concat(createHttpLink({uri:`https://graphql.prepr.io/${d}`,headers:{"Prepr-Customer-Id":"visitor-id-ef3125af"}})),er=L.concat(createHttpLink({uri:`https://graphql.prepr.io/${d}`,headers:{"Prepr-Customer-Id":"visitor-id-5feb47f4"}})),tr=onError(ir=>{t.hook("apollo:error",rr=>{})});r.defaultClient.setLink(from([tr,ge])),r.clients.asegment.setLink(from([Mt])),r.clients.bsegment.setLink(from([er])),t.hook("apollo:error",ir=>{})}),auth_vT9JWWT9pN=defineNuxtPlugin(()=>{addRouteMiddleware("global-test",(t,e)=>{},{global:!0})});var define_process_env_default={};/** 75 * @license 76 * Copyright 2017 Google LLC 77 * 78 * Licensed under the Apache License, Version 2.0 (the "License"); 79 * you may not use this file except in compliance with the License. 80 * You may obtain a copy of the License at 81 * 82 * http://www.apache.org/licenses/LICENSE-2.0 83 * 84 * Unless required by applicable law or agreed to in writing, software 85 * distributed under the License is distributed on an "AS IS" BASIS, 86 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 87 * See the License for the specific language governing permissions and 88 * limitations under the License. 89 */const stringToByteArray$1=function(t){const e=[];let r=0;for(let s=0;s<t.length;s++){let o=t.charCodeAt(s);o<128?e[r++]=o:o<2048?(e[r++]=o>>6|192,e[r++]=o&63|128):(o&64512)===55296&&s+1<t.length&&(t.charCodeAt(s+1)&64512)===56320?(o=65536+((o&1023)<<10)+(t.charCodeAt(++s)&1023),e[r++]=o>>18|240,e[r++]=o>>12&63|128,e[r++]=o>>6&63|128,e[r++]=o&63|128):(e[r++]=o>>12|224,e[r++]=o>>6&63|128,e[r++]=o&63|128)}return e},byteArrayToString=function(t){const e=[];let r=0,s=0;for(;r<t.length;){const o=t[r++];if(o<128)e[s++]=String.fromCharCode(o);else if(o>191&&o<224){const d=t[r++];e[s++]=String.fromCharCode((o&31)<<6|d&63)}else if(o>239&&o<365){const d=t[r++],L=t[r++],ge=t[r++],Mt=((o&7)<<18|(d&63)<<12|(L&63)<<6|ge&63)-65536;e[s++]=String.fromCharCode(55296+(Mt>>10)),e[s++]=String.fromCharCode(56320+(Mt&1023))}else{const d=t[r++],L=t[r++];e[s++]=String.fromCharCode((o&15)<<12|(d&63)<<6|L&63)}}return e.join("")},base64={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:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,s=[];for(let o=0;o<t.length;o+=3){const d=t[o],L=o+1<t.length,ge=L?t[o+1]:0,Mt=o+2<t.length,er=Mt?t[o+2]:0,tr=d>>2,ir=(d&3)<<4|ge>>4;let rr=(ge&15)<<2|er>>6,nr=er&63;Mt||(nr=64,L||(rr=64)),s.push(r[tr],r[ir],r[rr],r[nr])}return s.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(stringToByteArray$1(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):byteArrayToString(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const r=e?this.charToByteMapWebSafe_:this.charToByteMap_,s=[];for(let o=0;o<t.length;){const d=r[t.charAt(o++)],ge=o<t.length?r[t.charAt(o)]:0;++o;const er=o<t.length?r[t.charAt(o)]:64;++o;const ir=o<t.length?r[t.charAt(o)]:64;if(++o,d==null||ge==null||er==null||ir==null)throw new DecodeBase64StringError;const rr=d<<2|ge>>4;if(s.push(rr),er!==64){const nr=ge<<4&240|er>>2;if(s.push(nr),ir!==64){const ar=er<<6&192|ir;s.push(ar)}}}return s},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};
89class DecodeBase64StringError extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const base64Encode=function(t){const e=stringToByteArray$1(t);return base64.encodeByteArray(e,!0)},base64urlEncodeWithoutPadding=function(t){return base64Encode(t).replace(/\./g,"")},base64Decode$1=function(t){try{return base64.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** 90 * @license 91 * Copyright 2022 Google LLC 92 * 93 * Licensed under the Apache License, Version 2.0 (the "License"); 94 * you may not use this file except in compliance with the License. 95 * You may obtain a copy of the License at 96 * 97 * http://www.apache.org/licenses/LICENSE-2.0 98 * 99 * Unless required by applicable law or agreed to in writing, software 100 * distributed under the License is distributed on an "AS IS" BASIS, 101 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 102 * See the License for the specific language governing permissions and 103 * limitations under the License. 104 */function getGlobal(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** 105 * @license 106 * Copyright 2022 Google LLC 107 * 108 * Licensed under the Apache License, Version 2.0 (the "License"); 109 * you may not use this file except in compliance with the License. 110 * You may obtain a copy of the License at 111 * 112 * http://www.apache.org/licenses/LICENSE-2.0 113 * 114 * Unless required by applicable law or agreed to in writing, software 115 * distributed under the License is distributed on an "AS IS" BASIS, 116 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 117 * See the License for the specific language governing permissions and 118 * limitations under the License. 119 */const getDefaultsFromGlobal=()=>getGlobal().__FIREBASE_DEFAULTS__,getDefaultsFromEnvVariable=()=>{if(typeof process>"u"||typeof define_process_env_default>"u")return;const t=define_process_env_default.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},getDefaultsFromCookie=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&base64Decode$1(t[1]);return e&&JSON.parse(e)},getDefaults=()=>{try{return getDefaultsFromGlobal()||getDefaultsFromEnvVariable()||getDefaultsFromCookie()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},getDefaultEmulatorHost=t=>{var e,r;return(r=(e=getDefaults())===null||e===void 0?void 0:e.emulatorHosts)===null||r===void 0?void 0:r[t]},getDefaultEmulatorHostnameAndPort=t=>{const e=getDefaultEmulatorHost(t);if(!e)return;const r=e.lastIndexOf(":");if(r<=0||r+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const s=parseInt(e.substring(r+1),10);return e[0]==="["?[e.substring(1,r-1),s]:[e.substring(0,r),s]},getDefaultAppConfig=()=>{var t;return(t=getDefaults())===null||t===void 0?void 0:t.config},getExperimentalSetting=t=>{var e;return(e=getDefaults())===null||e===void 0?void 0:e[`_${t}`]};/** 120 * @license 121 * Copyright 2017 Google LLC 122 * 123 * Licensed under the Apache License, Version 2.0 (the "License"); 124 * you may not use this file except in compliance with the License. 125 * You may obtain a copy of the License at 126 * 127 * http://www.apache.org/licenses/LICENSE-2.0 128 * 129 * Unless required by applicable law or agreed to in writing, software 130 * distributed under the License is distributed on an "AS IS" BASIS, 131 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 132 * See the License for the specific language governing permissions and 133 * limitations under the License. 134 */class Deferred{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}wrapCallback(e){return(r,s)=>{r?this.reject(r):this.resolve(s),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(r):e(r,s))}}}/** 135 * @license 136 * Copyright 2021 Google LLC 137 * 138 * Licensed under the Apache License, Version 2.0 (the "License"); 139 * you may not use this file except in compliance with the License. 140 * You may obtain a copy of the License at 141 * 142 * http://www.apache.org/licenses/LICENSE-2.0 143 * 144 * Unless required by applicable law or agreed to in writing, softw
144are 145 * distributed under the License is distributed on an "AS IS" BASIS, 146 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 147 * See the License for the specific language governing permissions and 148 * limitations under the License. 149 */function createMockUserToken(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const r={alg:"none",type:"JWT"},s=e||"demo-project",o=t.iat||0,d=t.sub||t.user_id;if(!d)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const L=Object.assign({iss:`https://securetoken.google.com/${s}`,aud:s,iat:o,exp:o+3600,auth_time:o,sub:d,user_id:d,firebase:{sign_in_provider:"custom",identities:{}}},t);return[base64urlEncodeWithoutPadding(JSON.stringify(r)),base64urlEncodeWithoutPadding(JSON.stringify(L)),""].join(".")}/** 150 * @license 151 * Copyright 2017 Google LLC 152 * 153 * Licensed under the Apache License, Version 2.0 (the "License"); 154 * you may not use this file except in compliance with the License. 155 * You may obtain a copy of the License at 156 * 157 * http://www.apache.org/licenses/LICENSE-2.0 158 * 159 * Unless required by applicable law or agreed to in writing, software 160 * distributed under the License is distributed on an "AS IS" BASIS, 161 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 162 * See the License for the specific language governing permissions and 163 * limitations under the License. 164 */function getUA(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function isMobileCordova(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA())}function isBrowserExtension(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function isReactNative(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function isIE(){const t=getUA();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function isIndexedDBAvailable(){try{return typeof indexedDB=="object"}catch{return!1}}function validateIndexedDBOpenable(){return new Promise((t,e)=>{try{let r=!0;const s="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(s);o.onsuccess=()=>{o.result.close(),r||self.indexedDB.deleteDatabase(s),t(!0)},o.onupgradeneeded=()=>{r=!1},o.onerror=()=>{var d;e(((d=o.error)===null||d===void 0?void 0:d.message)||"")}}catch(r){e(r)}})}function areCookiesEnabled(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/** 165 * @license 166 * Copyright 2017 Google LLC 167 * 168 * Licensed under the Apache License, Version 2.0 (the "License"); 169 * you may not use this file except in compliance with the License. 170 * You may obtain a copy of the License at 171 * 172 * http://www.apache.org/licenses/LICENSE-2.0 173 * 174 * Unless required by applicable law or agreed to in writing, software 175 * distributed under the License is distributed on an "AS IS" BASIS, 176 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 177 * See the License for the specific language governing permissions and 178 * limitations under the License. 179 */const ERROR_NAME="FirebaseError";class FirebaseError extends Error{constructor(e,r,s){super(r),this.code=e,this.customData=s,this.name=ERROR_NAME,Object.setPrototypeOf(this,FirebaseError.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,ErrorFactory.prototype.create)}}class ErrorFactory{constructor(e,r,s){this.service=e,this.serviceName=r,this.errors=s}create(e,...r){const s=r[0]||{},o=`${this.service}/${e}`,d=this.errors[e],L=d?replaceTemplate(d,s):"Error",ge=`${this.serviceName}: ${L} (${o}).`;return new FirebaseError(o,ge,s)}}function replaceTemplate(t,e){return t.replace(PATTERN,(r,s)=>{const o=e[s];return o!=null?String(o):`<${s}?>`})}const PATTERN=/\{\$([^}]+)}/g;function isEmpty(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function deepEqual(t,e){if(t===e)return!0;const r=Object.keys(t),s=Object.keys(e);for(const o of r){if(!s.includes(o))return!1;const d=t[o],L=e[o];
179if(isObject(d)&&isObject(L)){if(!deepEqual(d,L))return!1}else if(d!==L)return!1}for(const o of s)if(!r.includes(o))return!1;return!0}function isObject(t){return t!==null&&typeof t=="object"}/** 180 * @license 181 * Copyright 2017 Google LLC 182 * 183 * Licensed under the Apache License, Version 2.0 (the "License"); 184 * you may not use this file except in compliance with the License. 185 * You may obtain a copy of the License at 186 * 187 * http://www.apache.org/licenses/LICENSE-2.0 188 * 189 * Unless required by applicable law or agreed to in writing, software 190 * distributed under the License is distributed on an "AS IS" BASIS, 191 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 192 * See the License for the specific language governing permissions and 193 * limitations under the License. 194 */function querystring(t){const e=[];for(const[r,s]of Object.entries(t))Array.isArray(s)?s.forEach(o=>{e.push(encodeURIComponent(r)+"="+encodeURIComponent(o))}):e.push(encodeURIComponent(r)+"="+encodeURIComponent(s));return e.length?"&"+e.join("&"):""}function createSubscribe(t,e){const r=new ObserverProxy(t,e);return r.subscribe.bind(r)}class ObserverProxy{constructor(e,r){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=r,this.task.then(()=>{e(this)}).catch(s=>{this.error(s)})}next(e){this.forEachObserver(r=>{r.next(e)})}error(e){this.forEachObserver(r=>{r.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,r,s){let o;if(e===void 0&&r===void 0&&s===void 0)throw new Error("Missing Observer.");implementsAnyMethods(e,["next","error","complete"])?o=e:o={next:e,error:r,complete:s},o.next===void 0&&(o.next=noop$1),o.error===void 0&&(o.error=noop$1),o.complete===void 0&&(o.complete=noop$1);const d=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?o.error(this.finalError):o.complete()}catch{}}),this.observers.push(o),d}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let r=0;r<this.observers.length;r++)this.sendOne(r,e)}sendOne(e,r){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{r(this.observers[e])}catch(s){typeof console<"u"&&console.error&&console.error(s)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function implementsAnyMethods(t,e){if(typeof t!="object"||t===null)return!1;for(const r of e)if(r in t&&typeof t[r]=="function")return!0;return!1}function noop$1(){}/** 195 * @license 196 * Copyright 2019 Google LLC 197 * 198 * Licensed under the Apache License, Version 2.0 (the "License"); 199 * you may not use this file except in compliance with the License. 200 * You may obtain a copy of the License at 201 * 202 * http://www.apache.org/licenses/LICENSE-2.0 203 * 204 * Unless required by applicable law or agreed to in writing, software 205 * distributed under the License is distributed on an "AS IS" BASIS, 206 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 207 * See the License for the specific language governing permissions and 208 * limitations under the License. 209 */const DEFAULT_INTERVAL_MILLIS=1e3,DEFAULT_BACKOFF_FACTOR=2,MAX_VALUE_MILLIS=4*60*60*1e3,RANDOM_FACTOR=.5;function calculateBackoffMillis(t,e=DEFAULT_INTERVAL_MILLIS,r=DEFAULT_BACKOFF_FACTOR){const s=e*Math.pow(r,t),o=Math.round(RANDOM_FACTOR*s*(Math.random()-.5)*2);return Math.min(MAX_VALUE_MILLIS,s+o)}/** 210 * @license 211 * Copyright 2021 Google LLC 212 * 213 * Licensed under the Apache License, Version 2.0 (the "License"); 214 * you may not use this file except in compliance with the License. 215 * You may obtain a copy of the License at 216 * 217 * http://www.apache.org/licenses/LICENSE-2.0 218 * 219 * Unless required by applicable law or agreed to in writing, software 220 * distributed under the License is distributed on an "AS IS" BASIS, 221 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 222 * See the License for the specific language governing permissions and 223 * limitations under the License. 224 */function getModularInstance(t){return t&&t._delegate?t._delegate:t}class Component{constructor(e,r,s){this.name=e,this.instanceFactory=r,this.type=s,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}}/** 225 * @license 226 * Copyright 2019 Google LLC 227 * 228 * Licensed under the Apache License, Version 2.0 (the "License");
229 * you may not use this file except in compliance with the License. 230 * You may obtain a copy of the License at 231 * 232 * http://www.apache.org/licenses/LICENSE-2.0 233 * 234 * Unless required by applicable law or agreed to in writing, software 235 * distributed under the License is distributed on an "AS IS" BASIS, 236 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 237 * See the License for the specific language governing permissions and 238 * limitations under the License. 239 */const DEFAULT_ENTRY_NAME$1="[DEFAULT]";/** 240 * @license 241 * Copyright 2019 Google LLC 242 * 243 * Licensed under the Apache License, Version 2.0 (the "License"); 244 * you may not use this file except in compliance with the License. 245 * You may obtain a copy of the License at 246 * 247 * http://www.apache.org/licenses/LICENSE-2.0 248 * 249 * Unless required by applicable law or agreed to in writing, software 250 * distributed under the License is distributed on an "AS IS" BASIS, 251 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 252 * See the License for the specific language governing permissions and 253 * limitations under the License. 254 */class Provider{constructor(e,r){this.name=e,this.container=r,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const r=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(r)){const s=new Deferred;if(this.instancesDeferred.set(r,s),this.isInitialized(r)||this.shouldAutoInitialize())try{const o=this.getOrInitializeService({instanceIdentifier:r});o&&s.resolve(o)}catch{}}return this.instancesDeferred.get(r).promise}getImmediate(e){var r;const s=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),o=(r=e==null?void 0:e.optional)!==null&&r!==void 0?r:!1;if(this.isInitialized(s)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:s})}catch(d){if(o)return null;throw d}else{if(o)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(isComponentEager(e))try{this.getOrInitializeService({instanceIdentifier:DEFAULT_ENTRY_NAME$1})}catch{}for(const[r,s]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(r);try{const d=this.getOrInitializeService({instanceIdentifier:o});s.resolve(d)}catch{}}}}clearInstance(e=DEFAULT_ENTRY_NAME$1){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(r=>"INTERNAL"in r).map(r=>r.INTERNAL.delete()),...e.filter(r=>"_delete"in r).map(r=>r._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=DEFAULT_ENTRY_NAME$1){return this.instances.has(e)}getOptions(e=DEFAULT_ENTRY_NAME$1){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:r={}}=e,s=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(s))throw Error(`${this.name}(${s}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const o=this.getOrInitializeService({instanceIdentifier:s,options:r});for(const[d,L]of this.instancesDeferred.entries()){const ge=this.normalizeInstanceIdentifier(d);s===ge&&L.resolve(o)}return o}onInit(e,r){var s;const o=this.normalizeInstanceIdentifier(r),d=(s=this.onInitCallbacks.get(o))!==null&&s!==void 0?s:new Set;d.add(e),this.onInitCallbacks.set(o,d);const L=this.instances.get(o);return L&&e(L,o),()=>{d.delete(e)}}invokeOnInitCallbacks(e,r){const s=this.onInitCallbacks.get(r);if(s)for(const o of s)try{o(e,r)}catch{}}getOrInitializeService({instanceIdentifier:e,options:r={}}){let s=this.instances.get(e);if(!s&&this.component&&(s=this.component.instanceFactory(this.container,{instanceIdentifier:normalizeIdentifierForFactory(e),options:r}),this.instances.set(e,s),this.instancesOptions.set(e,r),this.invokeOnInitCallbacks(s,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,s)}catch{}return s||null}normalizeInstanceIdentifier(e=DEFAULT_ENTRY_NAME$1){return this.component?this.component.multipleInstances?e:DEFAULT_ENTRY_NAME$1:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function normalizeIdentifierForFactory(t){return t===DEFAULT_ENTRY_NAME$1?void 0:t}function isComponentEager(t){return t.instantiationMode==="EAGER"}/** 255 * @license 256 * Copyright 2019 Google LLC 257 * 258 * Licensed under the Apache License, Version 2.0 (the "License");
259 * you may not use this file except in compliance with the License. 260 * You may obtain a copy of the License at 261 * 262 * http://www.apache.org/licenses/LICENSE-2.0 263 * 264 * Unless required by applicable law or agreed to in writing, software 265 * distributed under the License is distributed on an "AS IS" BASIS, 266 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 267 * See the License for the specific language governing permissions and 268 * limitations under the License. 269 */class ComponentContainer{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const r=this.getProvider(e.name);if(r.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);r.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const r=new Provider(e,this);return this.providers.set(e,r),r}getProviders(){return Array.from(this.providers.values())}}/** 270 * @license 271 * Copyright 2017 Google LLC 272 * 273 * Licensed under the Apache License, Version 2.0 (the "License"); 274 * you may not use this file except in compliance with the License. 275 * You may obtain a copy of the License at 276 * 277 * http://www.apache.org/licenses/LICENSE-2.0 278 * 279 * Unless required by applicable law or agreed to in writing, software 280 * distributed under the License is distributed on an "AS IS" BASIS, 281 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 282 * See the License for the specific language governing permissions and 283 * limitations under the License. 284 */var LogLevel;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(LogLevel||(LogLevel={}));const levelStringToEnum={debug:LogLevel.DEBUG,verbose:LogLevel.VERBOSE,info:LogLevel.INFO,warn:LogLevel.WARN,error:LogLevel.ERROR,silent:LogLevel.SILENT},defaultLogLevel=LogLevel.INFO,ConsoleMethod={[LogLevel.DEBUG]:"log",[LogLevel.VERBOSE]:"log",[LogLevel.INFO]:"info",[LogLevel.WARN]:"warn",[LogLevel.ERROR]:"error"},defaultLogHandler=(t,e,...r)=>{if(e<t.logLevel)return;const s=new Date().toISOString(),o=ConsoleMethod[e];if(o)console[o](`[${s}] ${t.name}:`,...r);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class Logger{constructor(e){this.name=e,this._logLevel=defaultLogLevel,this._logHandler=defaultLogHandler,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in LogLevel))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?levelStringToEnum[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")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,LogLevel.DEBUG,...e),this._logHandler(this,LogLevel.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,LogLevel.VERBOSE,...e),this._logHandler(this,LogLevel.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,LogLevel.INFO,...e),this._logHandler(this,LogLevel.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,LogLevel.WARN,...e),this._logHandler(this,LogLevel.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,LogLevel.ERROR,...e),this._logHandler(this,LogLevel.ERROR,...e)}}const instanceOfAny=(t,e)=>e.some(r=>t instanceof r);let idbProxyableTypes,cursorAdvanceMethods;function getIdbProxyableTypes(){return idbProxyableTypes||(idbProxyableTypes=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function getCursorAdvanceMethods(){return cursorAdvanceMethods||(cursorAdvanceMethods=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const cursorRequestMap=new WeakMap,transactionDoneMap=new WeakMap,transactionStoreNamesMap=new WeakMap,transformCache=new WeakMap,reverseTransformCache=new WeakMap;function promisifyRequest(t){const e=new Promise((r,s)=>{const o=()=>{t.removeEventListener("success",d),t.removeEventListener("error",L)},d=()=>{r(wrap$1(t.result)),o()},L=()=>{s(t.error),o()};t.addEventListener("success",d),t.addEventListener("error",L)});return e.then(r=>{r instanceof IDBCursor&&cursorRequestMap.set(r,t)}).catch(()=>{}),reverseTransformCache.set(e,t),e}function cacheDonePromiseForTransaction(t){if(transactionDoneMap.has(t))return;const e=new Promise((r,s)=>{const o=()=>{t.removeEventListener("complete",d),t.removeEventListener("error",L),t.removeEventListener("abort",L)},d=()=>{r(),o()},L=()=>{s(t.error||new DOMException("AbortError","AbortError")),o()};t.addEventListener("complete",d),t.addEventListener("error",L),t.addEventListener("abort",L)});transactionDoneMap.set(t,e)}let idbProxyTraps={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return transactionDoneMap.get(t);if(e==="objectStoreNames")return t.objectStoreNames||transactionStoreNamesMap.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return wrap$1(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function replaceTraps(t){idbProxyTraps=t(idbProxyTraps)}function wrapFunction(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const s=t.call(unwrap(this),e,...r);return transactionStoreNamesMap.set(s,e.sort?e.sort():[e]),wrap$1(s)}:getCursorAdvanceMethods().includes(t)?function(...e){return t.apply(unwrap(this),e),wrap$1(cursorRequestMap.get(this))}:function(...e){return wrap$1(t.apply(unwrap(this),e))}}function transformCachableValue(t){return typeof t=="function"?wrapFunction(t):(t instanceof IDBTransaction&&cacheDonePromiseForTransaction(t),instanceOfAny(t,getIdbProxyableTypes())?new Proxy(t,idbProxyTraps):t)}function wrap$1(t){if(t instanceof IDBRequest)return promisifyRequest(t);if(transformCache.has(t))return transformCache.get(t);const e=transformCachableValue(t);return e!==t&&(transformCache.set(t,e),reverseTransformCache.set(e,t)),e}const unwrap=t=>reverseTransformCache.get(t);function openDB(t,e,{blocked:r,upgrade:s,blocking:o,terminated:d}={}){const L=indexedDB.open(t,e),ge=wrap$1(L);return s&&L.addEventListener("upgradeneeded",Mt=>{s(wrap$1(L.result),Mt.oldVersion,Mt.newVersion,wrap$1(L.transaction),Mt)}),r&&L.addEventListener("blocked",Mt=>r(Mt.oldVersion,Mt.newVersion,Mt)),ge.then(Mt=>{d&&Mt.addEventListener("close",()=>d()),o&&Mt.addEventListener("versionchange",er=>o(er.oldVersion,er.newVersion,er))}).catch(()=>{}),ge}const readMethods=["get","getKey","getAll","getAllKeys","count"],writeMethods=["put","add","delete","clear"],cachedMethods=new Map;function getMethod(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(cachedMethods.get(e))return cachedMethods.get(e);const r=e.replace(/FromIndex$/,""),s=e!==r,o=writeMethods.includes(r);if(!(r in(s?IDBIndex:IDBObjectStore).prototype)||!(o||readMethods.includes(r)))return;const d=async function(L,...ge){const Mt=this.transaction(L,o?"readwrite":"readonly");let er=Mt.store;
284return s&&(er=er.index(ge.shift())),(await Promise.all([er[r](...ge),o&&Mt.done]))[0]};return cachedMethods.set(e,d),d}replaceTraps(t=>({...t,get:(e,r,s)=>getMethod(e,r)||t.get(e,r,s),has:(e,r)=>!!getMethod(e,r)||t.has(e,r)}));/** 285 * @license 286 * Copyright 2019 Google LLC 287 * 288 * Licensed under the Apache License, Version 2.0 (the "License"); 289 * you may not use this file except in compliance with the License. 290 * You may obtain a copy of the License at 291 * 292 * http://www.apache.org/licenses/LICENSE-2.0 293 * 294 * Unless required by applicable law or agreed to in writing, software 295 * distributed under the License is distributed on an "AS IS" BASIS, 296 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 297 * See the License for the specific language governing permissions and 298 * limitations under the License. 299 */class PlatformLoggerServiceImpl{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(r=>{if(isVersionServiceProvider(r)){const s=r.getImmediate();return`${s.library}/${s.version}`}else return null}).filter(r=>r).join(" ")}}function isVersionServiceProvider(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const name$o="@firebase/app",version$1$1="0.10.1";/** 300 * @license 301 * Copyright 2019 Google LLC 302 * 303 * Licensed under the Apache License, Version 2.0 (the "License"); 304 * you may not use this file except in compliance with the License. 305 * You may obtain a copy of the License at 306 * 307 * http://www.apache.org/licenses/LICENSE-2.0 308 * 309 * Unless required by applicable law or agreed to in writing, software 310 * distributed under the License is distributed on an "AS IS" BASIS, 311 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 312 * See the License for the specific language governing permissions and 313 * limitations under the License. 314 */const logger$2=new Logger("@firebase/app"),name$n="@firebase/app-compat",name$m="@firebase/analytics-compat",name$l="@firebase/analytics",name$k="@firebase/app-check-compat",name$j="@firebase/app-check",name$i="@firebase/auth",name$h="@firebase/auth-compat",name$g="@firebase/database",name$f="@firebase/database-compat",name$e="@firebase/functions",name$d="@firebase/functions-compat",name$c="@firebase/installations",name$b="@firebase/installations-compat",name$a="@firebase/messaging",name$9="@firebase/messaging-compat",name$8="@firebase/performance",name$7="@firebase/performance-compat",name$6="@firebase/remote-config",name$5="@firebase/remote-config-compat",name$4$1="@firebase/storage",name$3$1="@firebase/storage-compat",name$2$1="@firebase/firestore",name$1$1="@firebase/firestore-compat",name$p="firebase",version$5="10.11.0";/** 315 * @license 316 * Copyright 2019 Google LLC 317 * 318 * Licensed under the Apache License, Version 2.0 (the "License"); 319 * you may not use this file except in compliance with the License. 320 * You may obtain a copy of the License at 321 * 322 * http://www.apache.org/licenses/LICENSE-2.0 323 * 324 * Unless required by applicable law or agreed to in writing, software 325 * distributed under the License is distributed on an "AS IS" BASIS, 326 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 327 * See the License for the specific language governing permissions and 328 * limitations under the License. 329 */const DEFAULT_ENTRY_NAME="[DEFAULT]",PLATFORM_LOG_STRING={[name$o]:"fire-core",[name$n]:"fire-core-compat",[name$l]:"fire-analytics",[name$m]:"fire-analytics-compat",[name$j]:"fire-app-check",[name$k]:"fire-app-check-compat",[name$i]:"fire-auth",[name$h]:"fire-auth-compat",[name$g]:"fire-rtdb",[name$f]:"fire-rtdb-compat",[name$e]:"fire-fn",[name$d]:"fire-fn-compat",[name$c]:"fire-iid",[name$b]:"fire-iid-compat",[name$a]:"fire-fcm",[name$9]:"fire-fcm-compat",[name$8]:"fire-perf",[name$7]:"fire-perf-compat",[name$6]:"fire-rc",[name$5]:"fire-rc-compat",[name$4$1]:"fire-gcs",[name$3$1]:"fire-gcs-compat",[name$2$1]:"fire-fst",[name$1$1]:"fire-fst-compat","fire-js":"fire-js",[name$p]:"fire-js-all"};/** 330 * @license 331 * Copyright 2019 Google LLC 332 * 333 * Licensed under the Apache License, Version 2.0 (the "License");
334 * you may not use this file except in compliance with the License. 335 * You may obtain a copy of the License at 336 * 337 * http://www.apache.org/licenses/LICENSE-2.0 338 * 339 * Unless required by applicable law or agreed to in writing, software 340 * distributed under the License is distributed on an "AS IS" BASIS, 341 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 342 * See the License for the specific language governing permissions and 343 * limitations under the License. 344 */const _apps=new Map,_serverApps=new Map,_components=new Map;function _addComponent(t,e){try{t.container.addComponent(e)}catch(r){logger$2.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,r)}}function _registerComponent(t){const e=t.name;if(_components.has(e))return logger$2.debug(`There were multiple attempts to register component ${e}.`),!1;_components.set(e,t);for(const r of _apps.values())_addComponent(r,t);for(const r of _serverApps.values())_addComponent(r,t);return!0}function _getProvider(t,e){const r=t.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),t.container.getProvider(e)}function _isFirebaseServerApp(t){return t.settings!==void 0}/** 345 * @license 346 * Copyright 2019 Google LLC 347 * 348 * Licensed under the Apache License, Version 2.0 (the "License"); 349 * you may not use this file except in compliance with the License. 350 * You may obtain a copy of the License at 351 * 352 * http://www.apache.org/licenses/LICENSE-2.0 353 * 354 * Unless required by applicable law or agreed to in writing, software 355 * distributed under the License is distributed on an "AS IS" BASIS, 356 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 357 * See the License for the specific language governing permissions and 358 * limitations under the License. 359 */const ERRORS$1={"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
359d-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."},ERROR_FACTORY$2=new ErrorFactory("app","Firebase",ERRORS$1);/** 360 * @license 361 * Copyright 2019 Google LLC 362 * 363 * Licensed under the Apache License, Version 2.0 (the "License"); 364 * you may not use this file except in compliance with the License. 365 * You may obtain a copy of the License at 366 * 367 * http://www.apache.org/licenses/LICENSE-2.0 368 * 369 * Unless required by applicable law or agreed to in writing, software 370 * distributed under the License is distributed on an "AS IS" BASIS, 371 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 372 * See the License for the specific language governing permissions and 373 * limitations under the License. 374 */class FirebaseAppImpl{constructor(e,r,s){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},r),this._name=r.name,this._automaticDataCollectionEnabled=r.automaticDataCollectionEnabled,this._container=s,this.container.addComponent(new Component("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 ERROR_FACTORY$2.create("app-deleted",{appName:this._name})}}/** 375 * @license 376 * Copyright 2019 Google LLC 377 * 378 * Licensed under the Apache License, Version 2.0 (the "License"); 379 * you may not use this file except in compliance with the License. 380 * You may obtain a copy of the License at 381 * 382 * http://www.apache.org/licenses/LICENSE-2.0 383 * 384 * Unless required by applicable law or agreed to in writing, software 385 * distributed under the License is distributed on an "AS IS" BASIS, 386 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 387 * See the License for the specific language governing permissions and 388 * limitations under the License. 389 */const SDK_VERSION=version$5;function initializeApp(t,e={}){let r=t;typeof e!="object"&&(e={name:e});const s=Object.assign({name:DEFAULT_ENTRY_NAME,automaticDataCollectionEnabled:!1},e),o=s.name;if(typeof o!="string"||!o)throw ERROR_FACTORY$2.create("bad-app-name",{appName:String(o)});if(r||(r=getDefaultAppConfig()),!r)throw ERROR_FACTORY$2.create("no-options");const d=_apps.get(o);if(d){if(deepEqual(r,d.options)&&deepEqual(s,d.config))return d;throw ERROR_FACTORY$2.create("duplicate-app",{appName:o})}const L=new ComponentContainer(o);for(const Mt of _components.values())L.addComponent(Mt);const ge=new FirebaseAppImpl(r,s,L);return _apps.set(o,ge),ge}function getApp(t=DEFAULT_ENTRY_NAME){const e=_apps.get(t);if(!e&&t===DEFAULT_ENTRY_NAME&&getDefaultAppConfig())return initializeApp();if(!e)throw ERROR_FACTORY$2.create("no-app",{appName:t});return e}function registerVersion(t,e,r){var s;let o=(s=PLATFORM_LOG_STRING[t])!==null&&s!==void 0?s:t;r&&(o+=`-${r}`);const d=o.match(/\s|\//),L=e.match(/\s|\//);if(d||L){const ge=[`Unable to register library "${o}" with version "${e}":`];d&&ge.push(`library name "${o}" contains illegal characters (whitespace or "/")`),d&&L&&ge.push("and"),L&&ge.push(`version name "${e}" contains illegal characters (whitespace or "/")`),logger$2.warn(ge.join(" "));return}_registerComponent(new Component(`${o}-version`,()=>({library:o,version:e}),"VERSION"))}/** 390 * @license 391 * Copyright 2021 Google LLC 392 * 393 * Licensed under the Apache License, Version 2.0 (the "License");
394 * you may not use this file except in compliance with the License. 395 * You may obtain a copy of the License at 396 * 397 * http://www.apache.org/licenses/LICENSE-2.0 398 * 399 * Unless required by applicable law or agreed to in writing, software 400 * distributed under the License is distributed on an "AS IS" BASIS, 401 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 402 * See the License for the specific language governing permissions and 403 * limitations under the License. 404 */const DB_NAME$1="firebase-heartbeat-database",DB_VERSION$1=1,STORE_NAME="firebase-heartbeat-store";let dbPromise$1=null;function getDbPromise$1(){return dbPromise$1||(dbPromise$1=openDB(DB_NAME$1,DB_VERSION$1,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(STORE_NAME)}catch(r){console.warn(r)}}}}).catch(t=>{throw ERROR_FACTORY$2.create("idb-open",{originalErrorMessage:t.message})})),dbPromise$1}async function readHeartbeatsFromIndexedDB(t){try{const r=(await getDbPromise$1()).transaction(STORE_NAME),s=await r.objectStore(STORE_NAME).get(computeKey(t));return await r.done,s}catch(e){if(e instanceof FirebaseError)logger$2.warn(e.message);else{const r=ERROR_FACTORY$2.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});logger$2.warn(r.message)}}}async function writeHeartbeatsToIndexedDB(t,e){try{const s=(await getDbPromise$1()).transaction(STORE_NAME,"readwrite");await s.objectStore(STORE_NAME).put(e,computeKey(t)),await s.done}catch(r){if(r instanceof FirebaseError)logger$2.warn(r.message);else{const s=ERROR_FACTORY$2.create("idb-set",{originalErrorMessage:r==null?void 0:r.message});logger$2.warn(s.message)}}}function computeKey(t){return`${t.name}!${t.options.appId}`}/** 405 * @license 406 * Copyright 2021 Google LLC 407 * 408 * Licensed under the Apache License, Version 2.0 (the "License"); 409 * you may not use this file except in compliance with the License. 410 * You may obtain a copy of the License at 411 * 412 * http://www.apache.org/licenses/LICENSE-2.0 413 * 414 * Unless required by applicable law or agreed to in writing, software 415 * distributed under the License is distributed on an "AS IS" BASIS, 416 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 417 * See the License for the specific language governing permissions and 418 * limitations under the License. 419 */const MAX_HEADER_BYTES=1024,STORED_HEARTBEAT_RETENTION_MAX_MILLIS=30*24*60*60*1e3;class HeartbeatServiceImpl{constructor(e){this.container=e,this._heartbeatsCache=null;const r=this.container.getProvider("app").getImmediate();this._storage=new HeartbeatStorageImpl(r),this._heartbeatsCachePromise=this._storage.read().then(s=>(this._heartbeatsCache=s,s))}async triggerHeartbeat(){var e,r;const o=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),d=getUTCDateString();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((r=this._heartbeatsCache)===null||r===void 0?void 0:r.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===d||this._heartbeatsCache.heartbeats.some(L=>L.date===d)))return this._heartbeatsCache.heartbeats.push({date:d,agent:o}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(L=>{const ge=new Date(L.date).valueOf();return Date.now()-ge<=STORED_HEARTBEAT_RETENTION_MAX_MILLIS}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const r=getUTCDateString(),{heartbeatsToSend:s,unsentEntries:o}=extractHeartbeatsForHeader(this._heartbeatsCache.heartbeats),d=base64urlEncodeWithoutPadding(JSON.stringify({version:2,heartbeats:s}));return this._heartbeatsCache.lastSentHeartbeatDate=r,o.length>0?(this._heartbeatsCache.heartbeats=o,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),d}}function getUTCDateString(){return new Date().toISOString().substring(0,10)}function extractHeartbeatsForHeader(t,e=MAX_HEADER_BYTES){const r=[];let s=t.slice();for(const o of t){const d=r.find(L=>
419L.agent===o.agent);if(d){if(d.dates.push(o.date),countBytes(r)>e){d.dates.pop();break}}else if(r.push({agent:o.agent,dates:[o.date]}),countBytes(r)>e){r.pop();break}s=s.slice(1)}return{heartbeatsToSend:r,unsentEntries:s}}class HeartbeatStorageImpl{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return isIndexedDBAvailable()?validateIndexedDBOpenable().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const r=await readHeartbeatsFromIndexedDB(this.app);return r!=null&&r.heartbeats?r:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var r;if(await this._canUseIndexedDBPromise){const o=await this.read();return writeHeartbeatsToIndexedDB(this.app,{lastSentHeartbeatDate:(r=e.lastSentHeartbeatDate)!==null&&r!==void 0?r:o.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var r;if(await this._canUseIndexedDBPromise){const o=await this.read();return writeHeartbeatsToIndexedDB(this.app,{lastSentHeartbeatDate:(r=e.lastSentHeartbeatDate)!==null&&r!==void 0?r:o.lastSentHeartbeatDate,heartbeats:[...o.heartbeats,...e.heartbeats]})}else return}}function countBytes(t){return base64urlEncodeWithoutPadding(JSON.stringify({version:2,heartbeats:t})).length}/** 420 * @license 421 * Copyright 2019 Google LLC 422 * 423 * Licensed under the Apache License, Version 2.0 (the "License"); 424 * you may not use this file except in compliance with the License. 425 * You may obtain a copy of the License at 426 * 427 * http://www.apache.org/licenses/LICENSE-2.0 428 * 429 * Unless required by applicable law or agreed to in writing, software 430 * distributed under the License is distributed on an "AS IS" BASIS, 431 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 432 * See the License for the specific language governing permissions and 433 * limitations under the License. 434 */function registerCoreComponents(t){_registerComponent(new Component("platform-logger",e=>new PlatformLoggerServiceImpl(e),"PRIVATE")),_registerComponent(new Component("heartbeat",e=>new HeartbeatServiceImpl(e),"PRIVATE")),registerVersion(name$o,version$1$1,t),registerVersion(name$o,version$1$1,"esm2017"),registerVersion("fire-js","")}registerCoreComponents("");var name$4="firebase",version$4="10.11.0";/** 435 * @license 436 * Copyright 2020 Google LLC 437 * 438 * Licensed under the Apache License, Version 2.0 (the "License"); 439 * you may not use this file except in compliance with the License. 440 * You may obtain a copy of the License at 441 * 442 * http://www.apache.org/licenses/LICENSE-2.0 443 * 444 * Unless required by applicable law or agreed to in writing, software 445 * distributed under the License is distributed on an "AS IS" BASIS, 446 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 447 * See the License for the specific language governing permissions and 448 * limitations under the License. 449 */registerVersion(name$4,version$4,"app");function _prodErrorMap(){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 prodErrorMap=_prodErrorMap,_DEFAULT_AUTH_ERROR_FACTORY=new ErrorFactory("auth","Firebase",_prodErrorMap());/** 450 * @license 451 * Copyright 2020 Google LLC 452 * 453 * Licensed under the Apache License, Version 2.0 (the "License"); 454 * you may not use this file except in compliance with the License. 455 * You may obtain a copy of the License at 456 * 457 * http://www.apache.org/licenses/LICENSE-2.0 458 * 459 * Unless required by applicable law or agreed to in writing, software 460 * distributed under the License is distributed on an "AS IS" BASIS, 461 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 462 * See the License for the specific language governing permissions and 463 * limitations under the License. 464 */const logClient=new Logger("@firebase/auth");function _logWarn(t,...e){logClient.logLevel<=LogLevel.WARN&&logClient.warn(`Auth (${SDK_VERSION}): ${t}`,...e)}function _logError(t,...e){logClient.logLevel<=LogLevel.ERROR&&logClient.error(`Auth (${SDK_VERSION}): ${t}`,...e)}/** 465 * @license 466 * Copyright 2020 Google LLC 467 * 468 * Licensed under the Apache License, Version 2.0 (the "License");
469 * you may not use this file except in compliance with the License. 470 * You may obtain a copy of the License at 471 * 472 * http://www.apache.org/licenses/LICENSE-2.0 473 * 474 * Unless required by applicable law or agreed to in writing, software 475 * distributed under the License is distributed on an "AS IS" BASIS, 476 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 477 * See the License for the specific language governing permissions and 478 * limitations under the License. 479 */function _fail(t,...e){throw createErrorInternal(t,...e)}function _createError(t,...e){return createErrorInternal(t,...e)}function _errorWithCustomMessage(t,e,r){const s=Object.assign(Object.assign({},prodErrorMap()),{[e]:r});return new ErrorFactory("auth","Firebase",s).create(e,{appName:t.name})}function _serverAppCurrentUserOperationNotSupportedError(t){return _errorWithCustomMessage(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function createErrorInternal(t,...e){if(typeof t!="string"){const r=e[0],s=[...e.slice(1)];return s[0]&&(s[0].appName=t.name),t._errorFactory.create(r,...s)}return _DEFAULT_AUTH_ERROR_FACTORY.create(t,...e)}function _assert(t,e,...r){if(!t)throw createErrorInternal(e,...r)}function debugFail(t){const e="INTERNAL ASSERTION FAILED: "+t;throw _logError(e),new Error(e)}function debugAssert(t,e){t||debugFail(e)}/** 480 * @license 481 * Copyright 2020 Google LLC 482 * 483 * Licensed under the Apache License, Version 2.0 (the "License"); 484 * you may not use this file except in compliance with the License. 485 * You may obtain a copy of the License at 486 * 487 * http://www.apache.org/licenses/LICENSE-2.0 488 * 489 * Unless required by applicable law or agreed to in writing, software 490 * distributed under the License is distributed on an "AS IS" BASIS, 491 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 492 * See the License for the specific language governing permissions and 493 * limitations under the License. 494 */function _getCurrentUrl(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function _isHttpOrHttps(){return _getCurrentScheme()==="http:"||_getCurrentScheme()==="https:"}function _getCurrentScheme(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||null}/** 495 * @license 496 * Copyright 2020 Google LLC 497 * 498 * Licensed under the Apache License, Version 2.0 (the "License"); 499 * you may not use this file except in compliance with the License. 500 * You may obtain a copy of the License at 501 * 502 * http://www.apache.org/licenses/LICENSE-2.0 503 * 504 * Unless required by applicable law or agreed to in writing, software 505 * distributed under the License is distributed on an "AS IS" BASIS, 506 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 507 * See the License for the specific language governing permissions and 508 * limitations under the License. 509 */function _isOnline(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(_isHttpOrHttps()||isBrowserExtension()||"connection"in navigator)?navigator.onLine:!0}function _getUserLanguage(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/** 510 * @license 511 * Copyright 2020 Google LLC 512 * 513 * Licensed under the Apache License, Version 2.0 (the "License"); 514 * you may not use this file except in compliance with the License. 515 * You may obtain a copy of the License at 516 * 517 * http://www.apache.org/licenses/LICENSE-2.0 518 * 519 * Unless required by applicable law or agreed to in writing, software 520 * distributed under the License is distributed on an "AS IS" BASIS, 521 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 522 * See the License for the specific language governing permissions and 523 * limitations under the License. 524 */class Delay{constructor(e,r){this.shortDelay=e,this.longDelay=r,debugAssert(r>e,"Short delay should be less than long delay!"),this.isMobile=isMobileCordova()||isReactNative()}get(){return _isOnline()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** 525 * @license 526 * Copyright 2020 Google LLC 527 * 528 * Licensed under the Apache License, Version 2.0 (the "License");
529 * you may not use this file except in compliance with the License. 530 * You may obtain a copy of the License at 531 * 532 * http://www.apache.org/licenses/LICENSE-2.0 533 * 534 * Unless required by applicable law or agreed to in writing, software 535 * distributed under the License is distributed on an "AS IS" BASIS, 536 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 537 * See the License for the specific language governing permissions and 538 * limitations under the License. 539 */function _emulatorUrl(t,e){debugAssert(t.emulator,"Emulator should always be set here");const{url:r}=t.emulator;return e?`${r}${e.startsWith("/")?e.slice(1):e}`:r}/** 540 * @license 541 * Copyright 2020 Google LLC 542 * 543 * Licensed under the Apache License, Version 2.0 (the "License"); 544 * you may not use this file except in compliance with the License. 545 * You may obtain a copy of the License at 546 * 547 * http://www.apache.org/licenses/LICENSE-2.0 548 * 549 * Unless required by applicable law or agreed to in writing, software 550 * distributed under the License is distributed on an "AS IS" BASIS, 551 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 552 * See the License for the specific language governing permissions and 553 * limitations under the License. 554 */class FetchProvider{static initialize(e,r,s){this.fetchImpl=e,r&&(this.headersImpl=r),s&&(this.responseImpl=s)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;debugFail("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;debugFail("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;debugFail("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** 555 * @license 556 * Copyright 2020 Google LLC 557 * 558 * Licensed under the Apache License, Version 2.0 (the "License"); 559 * you may not use this file except in compliance with the License. 560 * You may obtain a copy of the License at 561 * 562 * http://www.apache.org/licenses/LICENSE-2.0 563 * 564 * Unless required by applicable law or agreed to in writing, software 565 * distributed under the License is distributed on an "AS IS" BASIS, 566 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 567 * See the License for the specific language governing permissions and 568 * limitations under the License. 569 */const SERVER_ERROR_MAP={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
569aptcha-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"};/** 570 * @license 571 * Copyright 2020 Google LLC 572 * 573 * Licensed under the Apache License, Version 2.0 (the "License"); 574 * you may not use this file except in compliance with the License. 575 * You may obtain a copy of the License at 576 * 577 * http://www.apache.org/licenses/LICENSE-2.0 578 * 579 * Unless required by applicable law or agreed to in writing, software 580 * distributed under the License is distributed on an "AS IS" BASIS, 581 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 582 * See the License for the specific language governing permissions and 583 * limitations under the License. 584 */const DEFAULT_API_TIMEOUT_MS=new Delay(3e4,6e4);function _addTidIfNecessary(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function _performApiRequest(t,e,r,s,o={}){return _performFetchWithErrorHandling(t,o,async()=>{let d={},L={};s&&(e==="GET"?L=s:d={body:JSON.stringify(s)});const ge=querystring(Object.assign({key:t.config.apiKey},L)).slice(1),Mt=await t._getAdditionalHeaders();return Mt["Content-Type"]="application/json",t.languageCode&&(Mt["X-Firebase-Locale"]=t.languageCode),FetchProvider.fetch()(_getFinalTarget(t,t.config.apiHost,r,ge),Object.assign({method:e,headers:Mt,referrerPolicy:"no-referrer"},d))})}async function _performFetchWithErrorHandling(t,e,r){t._canInitEmulator=!1;const s=Object.assign(Object.assign({},SERVER_ERROR_MAP),e);try{const o=new NetworkTimeout(t),d=await Promise.race([r(),o.promise]);o.clearNetworkTimeout();const L=await d.json();if("needConfirmation"in L)throw _makeTaggedError(t,"account-exists-with-different-credential",L);if(d.ok&&!("errorMessage"in L))return L;{const ge=d.ok?L.errorMessage:L.error.message,[Mt,er]=ge.split(" : ");if(Mt==="FEDERATED_USER_ID_ALREADY_LINKED")throw _makeTaggedError(t,"credential-already-in-use",L);if(Mt==="EMAIL_EXISTS")throw _makeTaggedError(t,"email-already-in-use",L);if(Mt==="USER_DISABLED")throw _makeTaggedError(t,"user-disabled",L);const tr=s[Mt]||Mt.toLowerCase().replace(/[_\s]+/g,"-");if(er)throw _errorWithCustomMessage(t,tr,er);_fail(t,tr)}}catch(o){if(o instanceof FirebaseError)throw o;_fail(t,"network-request-failed",{message:String(o)})}}async function _performSignInRequest(t,e,r,s,o={}){const d=await _performApiRequest(t,e,r,s,o);return"mfaPendingCredential"in d&&_fail(t,"multi-factor-auth-required",{_serverResponse:d}),d}function _getFinalTarget(t,e,r,s){const o=`${e}${r}?${s}`;return t.config.emulator?_emulatorUrl(t.config,o):`${t.config.apiScheme}://${o}`}class NetworkTimeout{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((r,s)=>{this.timer=setTimeout(()=>s(_createError(this.auth,"network-request-failed")),DEFAULT_API_TIMEOUT_MS.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function _makeTaggedError(t,e,r){const s={appName:t.name};r.email&&(s.email=r.email),r.phoneNumber&&(s.phoneNumber=r.phoneNumber);const o=_createError(t,e,s);return o.customData._tokenResponse=r,o}/** 585 * @license 586 * Copyright 2020 Google LLC 587 * 588 * Licensed under the Apache License, Version 2.0 (the "License"); 589 * you may not use this file except in compliance with the License. 590 * You may obtain a copy of the License at 591 * 592 * http://www.apache.org/licenses/LICENSE-2.0 593 * 594 * Unless required by applicable law or agreed to in writing, software 595 * distributed under the License is distributed on an "AS IS" BASIS, 596 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 597 * See the License for the specific language governing permissions and 598 * limitations under the License. 599 */async function deleteAccount(t,e){return _performApiRequest(t,"POST","/v1/accounts:delete",e)}async function getAccountInfo(t,e){return _performApiRequest(t,"POST","/v1/accounts:lookup",e)}/** 600 * @license 601 * Copyright 2020 Google LLC 602 * 603 * Licensed under the Apache License, Version 2.0 (the "License");
604 * you may not use this file except in compliance with the License. 605 * You may obtain a copy of the License at 606 * 607 * http://www.apache.org/licenses/LICENSE-2.0 608 * 609 * Unless required by applicable law or agreed to in writing, software 610 * distributed under the License is distributed on an "AS IS" BASIS, 611 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 612 * See the License for the specific language governing permissions and 613 * limitations under the License. 614 */function utcTimestampToDateString(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function getIdTokenResult(t,e=!1){const r=getModularInstance(t),s=await r.getIdToken(e),o=_parseToken(s);_assert(o&&o.exp&&o.auth_time&&o.iat,r.auth,"internal-error");const d=typeof o.firebase=="object"?o.firebase:void 0,L=d==null?void 0:d.sign_in_provider;return{claims:o,token:s,authTime:utcTimestampToDateString(secondsStringToMilliseconds(o.auth_time)),issuedAtTime:utcTimestampToDateString(secondsStringToMilliseconds(o.iat)),expirationTime:utcTimestampToDateString(secondsStringToMilliseconds(o.exp)),signInProvider:L||null,signInSecondFactor:(d==null?void 0:d.sign_in_second_factor)||null}}function secondsStringToMilliseconds(t){return Number(t)*1e3}function _parseToken(t){const[e,r,s]=t.split(".");if(e===void 0||r===void 0||s===void 0)return _logError("JWT malformed, contained fewer than 3 sections"),null;try{const o=base64Decode$1(r);return o?JSON.parse(o):(_logError("Failed to decode base64 JWT payload"),null)}catch(o){return _logError("Caught error parsing JWT payload as JSON",o==null?void 0:o.toString()),null}}function _tokenExpiresIn(t){const e=_parseToken(t);return _assert(e,"internal-error"),_assert(typeof e.exp<"u","internal-error"),_assert(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/** 615 * @license 616 * Copyright 2020 Google LLC 617 * 618 * Licensed under the Apache License, Version 2.0 (the "License"); 619 * you may not use this file except in compliance with the License. 620 * You may obtain a copy of the License at 621 * 622 * http://www.apache.org/licenses/LICENSE-2.0 623 * 624 * Unless required by applicable law or agreed to in writing, software 625 * distributed under the License is distributed on an "AS IS" BASIS, 626 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 627 * See the License for the specific language governing permissions and 628 * limitations under the License. 629 */async function _logoutIfInvalidated(t,e,r=!1){if(r)return e;try{return await e}catch(s){throw s instanceof FirebaseError&&isUserInvalidated(s)&&t.auth.currentUser===t&&await t.auth.signOut(),s}}function isUserInvalidated({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/** 630 * @license 631 * Copyright 2020 Google LLC 632 * 633 * Licensed under the Apache License, Version 2.0 (the "License"); 634 * you may not use this file except in compliance with the License. 635 * You may obtain a copy of the License at 636 * 637 * http://www.apache.org/licenses/LICENSE-2.0 638 * 639 * Unless required by applicable law or agreed to in writing, software 640 * distributed under the License is distributed on an "AS IS" BASIS, 641 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 642 * See the License for the specific language governing permissions and 643 * limitations under the License. 644 */class ProactiveRefresh{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,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var r;if(e){const s=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),s}else{this.errorBackoff=3e4;const o=((r=this.user.stsTokenManager.expirationTime)!==null&&r!==void 0?r:0)-Date.now()-3e5;return Math.max(0,o)}}schedule(e=!1){if(!this.isRunning)return;const r=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},r)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(e==null?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** 645 * @license 646 * Copyright 2020 Google LLC 647 * 648 * Licensed under the Apache License, Version 2.0 (the "License");
649 * you may not use this file except in compliance with the License. 650 * You may obtain a copy of the License at 651 * 652 * http://www.apache.org/licenses/LICENSE-2.0 653 * 654 * Unless required by applicable law or agreed to in writing, software 655 * distributed under the License is distributed on an "AS IS" BASIS, 656 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 657 * See the License for the specific language governing permissions and 658 * limitations under the License. 659 */class UserMetadata{constructor(e,r){this.createdAt=e,this.lastLoginAt=r,this._initializeTime()}_initializeTime(){this.lastSignInTime=utcTimestampToDateString(this.lastLoginAt),this.creationTime=utcTimestampToDateString(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** 660 * @license 661 * Copyright 2019 Google LLC 662 * 663 * Licensed under the Apache License, Version 2.0 (the "License"); 664 * you may not use this file except in compliance with the License. 665 * You may obtain a copy of the License at 666 * 667 * http://www.apache.org/licenses/LICENSE-2.0 668 * 669 * Unless required by applicable law or agreed to in writing, software 670 * distributed under the License is distributed on an "AS IS" BASIS, 671 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 672 * See the License for the specific language governing permissions and 673 * limitations under the License. 674 */async function _reloadWithoutSaving(t){var e;const r=t.auth,s=await t.getIdToken(),o=await _logoutIfInvalidated(t,getAccountInfo(r,{idToken:s}));_assert(o==null?void 0:o.users.length,r,"internal-error");const d=o.users[0];t._notifyReloadListener(d);const L=!((e=d.providerUserInfo)===null||e===void 0)&&e.length?extractProviderData(d.providerUserInfo):[],ge=mergeProviderData(t.providerData,L),Mt=t.isAnonymous,er=!(t.email&&d.passwordHash)&&!(ge!=null&&ge.length),tr=Mt?er:!1,ir={uid:d.localId,displayName:d.displayName||null,photoURL:d.photoUrl||null,email:d.email||null,emailVerified:d.emailVerified||!1,phoneNumber:d.phoneNumber||null,tenantId:d.tenantId||null,providerData:ge,metadata:new UserMetadata(d.createdAt,d.lastLoginAt),isAnonymous:tr};Object.assign(t,ir)}async function reload(t){const e=getModularInstance(t);await _reloadWithoutSaving(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function mergeProviderData(t,e){return[...t.filter(s=>!e.some(o=>o.providerId===s.providerId)),...e]}function extractProviderData(t){return t.map(e=>{var{providerId:r}=e,s=__rest(e,["providerId"]);return{providerId:r,uid:s.rawId||"",displayName:s.displayName||null,email:s.email||null,phoneNumber:s.phoneNumber||null,photoURL:s.photoUrl||null}})}/** 675 * @license 676 * Copyright 2020 Google LLC 677 * 678 * Licensed under the Apache License, Version 2.0 (the "License"); 679 * you may not use this file except in compliance with the License. 680 * You may obtain a copy of the License at 681 * 682 * http://www.apache.org/licenses/LICENSE-2.0 683 * 684 * Unless required by applicable law or agreed to in writing, software 685 * distributed under the License is distributed on an "AS IS" BASIS, 686 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 687 * See the License for the specific language governing permissions and 688 * limitations under the License. 689 */async function requestStsToken(t,e){const r=await _performFetchWithErrorHandling(t,{},async()=>{const s=querystring({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:o,apiKey:d}=t.config,L=_getFinalTarget(t,o,"/v1/token",`key=${d}`),ge=await t._getAdditionalHeaders();return ge["Content-Type"]="application/x-www-form-urlencoded",FetchProvider.fetch()(L,{method:"POST",headers:ge,body:s})});return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}async function revokeToken(t,e){return _performApiRequest(t,"POST","/v2/accounts:revokeToken",_addTidIfNecessary(t,e))}/** 690 * @license 691 * Copyright 2020 Google LLC 692 * 693 * Licensed under the Apache License, Version 2.0 (the "License");
694 * you may not use this file except in compliance with the License. 695 * You may obtain a copy of the License at 696 * 697 * http://www.apache.org/licenses/LICENSE-2.0 698 * 699 * Unless required by applicable law or agreed to in writing, software 700 * distributed under the License is distributed on an "AS IS" BASIS, 701 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 702 * See the License for the specific language governing permissions and 703 * limitations under the License. 704 */class StsTokenManager{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){_assert(e.idToken,"internal-error"),_assert(typeof e.idToken<"u","internal-error"),_assert(typeof e.refreshToken<"u","internal-error");const r="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):_tokenExpiresIn(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,r)}updateFromIdToken(e){_assert(e.length!==0,"internal-error");const r=_tokenExpiresIn(e);this.updateTokensAndExpiration(e,null,r)}async getToken(e,r=!1){return!r&&this.accessToken&&!this.isExpired?this.accessToken:(_assert(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,r){const{accessToken:s,refreshToken:o,expiresIn:d}=await requestStsToken(e,r);this.updateTokensAndExpiration(s,o,Number(d))}updateTokensAndExpiration(e,r,s){this.refreshToken=r||null,this.accessToken=e||null,this.expirationTime=Date.now()+s*1e3}static fromJSON(e,r){const{refreshToken:s,accessToken:o,expirationTime:d}=r,L=new StsTokenManager;return s&&(_assert(typeof s=="string","internal-error",{appName:e}),L.refreshToken=s),o&&(_assert(typeof o=="string","internal-error",{appName:e}),L.accessToken=o),d&&(_assert(typeof d=="number","internal-error",{appName:e}),L.expirationTime=d),L}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 StsTokenManager,this.toJSON())}_performRefresh(){return debugFail("not implemented")}}/** 705 * @license 706 * Copyright 2020 Google LLC 707 * 708 * Licensed under the Apache License, Version 2.0 (the "License"); 709 * you may not use this file except in compliance with the License. 710 * You may obtain a copy of the License at 711 * 712 * http://www.apache.org/licenses/LICENSE-2.0 713 * 714 * Unless required by applicable law or agreed to in writing, software 715 * distributed under the License is distributed on an "AS IS" BASIS, 716 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 717 * See the License for the specific language governing permissions and 718 * limitations under the License. 719 */function assertStringOrUndefined(t,e){_assert(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class UserImpl{constructor(e){var{uid:r,auth:s,stsTokenManager:o}=e,d=__rest(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new ProactiveRefresh(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=r,this.auth=s,this.stsTokenManager=o,this.accessToken=o.accessToken,this.displayName=d.displayName||null,this.email=d.email||null,this.emailVerified=d.emailVerified||!1,this.phoneNumber=d.phoneNumber||null,this.photoURL=d.photoURL||null,this.isAnonymous=d.isAnonymous||!1,this.tenantId=d.tenantId||null,this.providerData=d.providerData?[...d.providerData]:[],this.metadata=new UserMetadata(d.createdAt||void 0,d.lastLoginAt||void 0)}async getIdToken(e){const r=await _logoutIfInvalidated(this,this.stsTokenManager.getToken(this.auth,e));return _assert(r,this.auth,"internal-error"),this.accessToken!==r&&(this.accessToken=r,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),r}getIdTokenResult(e){return getIdTokenResult(this,e)}reload(){return reload(this)}_assign(e){this!==e&&(_assert(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
719otoURL,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(r=>Object.assign({},r)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const r=new UserImpl(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return r.metadata._copy(this.metadata),r}_onReload(e){_assert(!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,r=!1){let s=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),s=!0),r&&await _reloadWithoutSaving(this),await this.auth._persistUserIfCurrent(this),s&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(_isFirebaseServerApp(this.auth.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this.auth));const e=await this.getIdToken();return await _logoutIfInvalidated(this,deleteAccount(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,r){var s,o,d,L,ge,Mt,er,tr;const ir=(s=r.displayName)!==null&&s!==void 0?s:void 0,rr=(o=r.email)!==null&&o!==void 0?o:void 0,nr=(d=r.phoneNumber)!==null&&d!==void 0?d:void 0,ar=(L=r.photoURL)!==null&&L!==void 0?L:void 0,sr=(ge=r.tenantId)!==null&&ge!==void 0?ge:void 0,lr=(Mt=r._redirectEventId)!==null&&Mt!==void 0?Mt:void 0,cr=(er=r.createdAt)!==null&&er!==void 0?er:void 0,ur=(tr=r.lastLoginAt)!==null&&tr!==void 0?tr:void 0,{uid:or,emailVerified:dr,isAnonymous:hr,providerData:pr,stsTokenManager:mr}=r;_assert(or&&mr,e,"internal-error");const vr=StsTokenManager.fromJSON(this.name,mr);_assert(typeof or=="string",e,"internal-error"),assertStringOrUndefined(ir,e.name),assertStringOrUndefined(rr,e.name),_assert(typeof dr=="boolean",e,"internal-error"),_assert(typeof hr=="boolean",e,"internal-error"),assertStringOrUndefined(nr,e.name),assertStringOrUndefined(ar,e.name),assertStringOrUndefined(sr,e.name),assertStringOrUndefined(lr,e.name),assertStringOrUndefined(cr,e.name),assertStringOrUndefined(ur,e.name);const Er=new UserImpl({uid:or,auth:e,email:rr,emailVerified:dr,displayName:ir,isAnonymous:hr,photoURL:ar,phoneNumber:nr,tenantId:sr,stsTokenManager:vr,createdAt:cr,lastLoginAt:ur});return pr&&Array.isArray(pr)&&(Er.providerData=pr.map(Cr=>Object.assign({},Cr))),lr&&(Er._redirectEventId=lr),Er}static async _fromIdTokenResponse(e,r,s=!1){const o=new StsTokenManager;o.updateFromServerResponse(r);const d=new UserImpl({uid:r.localId,auth:e,stsTokenManager:o,isAnonymous:s});return await _reloadWithoutSaving(d),d}static async _fromGetAccountInfoResponse(e,r,s){const o=r.users[0];_assert(o.localId!==void 0,"internal-error");const d=o.providerUserInfo!==void 0?extractProviderData(o.providerUserInfo):[],L=!(o.email&&o.passwordHash)&&!(d!=null&&d.length),ge=new StsTokenManager;ge.updateFromIdToken(s);const Mt=new UserImpl({uid:o.localId,auth:e,stsTokenManager:ge,isAnonymous:L}),er={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:d,metadata:new UserMetadata(o.createdAt,o.lastLoginAt),isAnonymous:!(o.email&&o.passwordHash)&&!(d!=null&&d.length)};return Object.assign(Mt,er),Mt}}/** 720 * @license 721 * Copyright 2020 Google LLC 722 * 723 * Licensed under the Apache License, Version 2.0 (the "License");
724 * you may not use this file except in compliance with the License. 725 * You may obtain a copy of the License at 726 * 727 * http://www.apache.org/licenses/LICENSE-2.0 728 * 729 * Unless required by applicable law or agreed to in writing, software 730 * distributed under the License is distributed on an "AS IS" BASIS, 731 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 732 * See the License for the specific language governing permissions and 733 * limitations under the License. 734 */const instanceCache=new Map;function _getInstance(t){debugAssert(t instanceof Function,"Expected a class definition");let e=instanceCache.get(t);return e?(debugAssert(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,instanceCache.set(t,e),e)}/** 735 * @license 736 * Copyright 2019 Google LLC 737 * 738 * Licensed under the Apache License, Version 2.0 (the "License"); 739 * you may not use this file except in compliance with the License. 740 * You may obtain a copy of the License at 741 * 742 * http://www.apache.org/licenses/LICENSE-2.0 743 * 744 * Unless required by applicable law or agreed to in writing, software 745 * distributed under the License is distributed on an "AS IS" BASIS, 746 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 747 * See the License for the specific language governing permissions and 748 * limitations under the License. 749 */class InMemoryPersistence{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,r){this.storage[e]=r}async _get(e){const r=this.storage[e];return r===void 0?null:r}async _remove(e){delete this.storage[e]}_addListener(e,r){}_removeListener(e,r){}}InMemoryPersistence.type="NONE";const inMemoryPersistence=InMemoryPersistence;/** 750 * @license 751 * Copyright 2019 Google LLC 752 * 753 * Licensed under the Apache License, Version 2.0 (the "License"); 754 * you may not use this file except in compliance with the License. 755 * You may obtain a copy of the License at 756 * 757 * http://www.apache.org/licenses/LICENSE-2.0 758 * 759 * Unless required by applicable law or agreed to in writing, software 760 * distributed under the License is distributed on an "AS IS" BASIS, 761 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 762 * See the License for the specific language governing permissions and 763 * limitations under the License. 764 */function _persistenceKeyName(t,e,r){return`firebase:${t}:${e}:${r}`}class PersistenceUserManager{constructor(e,r,s){this.persistence=e,this.auth=r,this.userKey=s;const{config:o,name:d}=this.auth;this.fullUserKey=_persistenceKeyName(this.userKey,o.apiKey,d),this.fullPersistenceKey=_persistenceKeyName("persistence",o.apiKey,d),this.boundEventHandler=r._onStorageEvent.bind(r),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?UserImpl._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 r=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,r)return this.setCurrentUser(r)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,r,s="authUser"){if(!r.length)return new PersistenceUserManager(_getInstance(inMemoryPersistence),e,s);const o=(await Promise.all(r.map(async er=>{if(await er._isAvailable())return er}))).filter(er=>er);let d=o[0]||_getInstance(inMemoryPersistence);const L=_persistenceKeyName(s,e.config.apiKey,e.name);let ge=null;for(const er of r)try{const tr=await er._get(L);if(tr){const ir=UserImpl._fromJSON(e,tr);er!==d&&(ge=ir),d=er;break}}catch{}const Mt=o.filter(er=>er._shouldAllowMigration);return!d._shouldAllowMigration||!Mt.length?new PersistenceUserManager(d,e,s):(d=Mt[0],ge&&await d._set(L,ge.toJSON()),await Promise.all(r.map(async er=>{if(er!==d)try{await er._remove(L)}catch{}})),new PersistenceUserManager(d,e,s))}}/** 765 * @license 766 * Copyright 2020 Google LLC 767 * 768 * Licensed under the Apache License, Version 2.0 (the "License");
769 * you may not use this file except in compliance with the License. 770 * You may obtain a copy of the License at 771 * 772 * http://www.apache.org/licenses/LICENSE-2.0 773 * 774 * Unless required by applicable law or agreed to in writing, software 775 * distributed under the License is distributed on an "AS IS" BASIS, 776 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 777 * See the License for the specific language governing permissions and 778 * limitations under the License. 779 */function _getBrowserName(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(_isIEMobile(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(_isFirefox(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(_isBlackBerry(e))return"Blackberry";if(_isWebOS(e))return"Webos";if(_isSafari(e))return"Safari";if((e.includes("chrome/")||_isChromeIOS(e))&&!e.includes("edge/"))return"Chrome";if(_isAndroid(e))return"Android";{const r=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,s=t.match(r);if((s==null?void 0:s.length)===2)return s[1]}return"Other"}function _isFirefox(t=getUA()){return/firefox\//i.test(t)}function _isSafari(t=getUA()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function _isChromeIOS(t=getUA()){return/crios\//i.test(t)}function _isIEMobile(t=getUA()){return/iemobile/i.test(t)}function _isAndroid(t=getUA()){return/android/i.test(t)}function _isBlackBerry(t=getUA()){return/blackberry/i.test(t)}function _isWebOS(t=getUA()){return/webos/i.test(t)}function _isIOS(t=getUA()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function _isIOSStandalone(t=getUA()){var e;return _isIOS(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function _isIE10(){return isIE()&&document.documentMode===10}function _isMobileBrowser(t=getUA()){return _isIOS(t)||_isAndroid(t)||_isWebOS(t)||_isBlackBerry(t)||/windows phone/i.test(t)||_isIEMobile(t)}function _isIframe(){try{return!!(window&&window!==window.top)}catch{return!1}}/** 780 * @license 781 * Copyright 2020 Google LLC 782 * 783 * Licensed under the Apache License, Version 2.0 (the "License"); 784 * you may not use this file except in compliance with the License. 785 * You may obtain a copy of the License at 786 * 787 * http://www.apache.org/licenses/LICENSE-2.0 788 * 789 * Unless required by applicable law or agreed to in writing, software 790 * distributed under the License is distributed on an "AS IS" BASIS, 791 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 792 * See the License for the specific language governing permissions and 793 * limitations under the License. 794 */function _getClientVersion(t,e=[]){let r;switch(t){case"Browser":r=_getBrowserName(getUA());break;case"Worker":r=`${_getBrowserName(getUA())}-${t}`;break;default:r=t}const s=e.length?e.join(","):"FirebaseCore-web";return`${r}/JsCore/${SDK_VERSION}/${s}`}/** 795 * @license 796 * Copyright 2022 Google LLC 797 * 798 * Licensed under the Apache License, Version 2.0 (the "License"); 799 * you may not use this file except in compliance with the License. 800 * You may obtain a copy of the License at 801 * 802 * http://www.apache.org/licenses/LICENSE-2.0 803 * 804 * Unless required by applicable law or agreed to in writing, software 805 * distributed under the License is distributed on an "AS IS" BASIS, 806 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 807 * See the License for the specific language governing permissions and 808 * limitations under the License. 809 */class AuthMiddlewareQueue{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,r){const s=d=>new Promise((L,ge)=>{try{const Mt=e(d);L(Mt)}catch(Mt){ge(Mt)}});s.onAbort=r,this.queue.push(s);const o=this.queue.length-1;return()=>{this.queue[o]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const r=[];try{for(const s of this.queue)await s(e),s.onAbort&&r.push(s.onAbort)}catch(s){r.reverse();for(const o of r)try{o()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:s==null?void 0:s.message})}}}/** 810 * @license 811 * Copyright 2023 Google LLC 812 * 813 * Licensed under the Apache License, Version 2.0 (the "License");
814 * you may not use this file except in compliance with the License. 815 * You may obtain a copy of the License at 816 * 817 * http://www.apache.org/licenses/LICENSE-2.0 818 * 819 * Unless required by applicable law or agreed to in writing, software 820 * distributed under the License is distributed on an "AS IS" BASIS, 821 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 822 * See the License for the specific language governing permissions and 823 * limitations under the License. 824 */async function _getPasswordPolicy(t,e={}){return _performApiRequest(t,"GET","/v2/passwordPolicy",_addTidIfNecessary(t,e))}/** 825 * @license 826 * Copyright 2023 Google LLC 827 * 828 * Licensed under the Apache License, Version 2.0 (the "License"); 829 * you may not use this file except in compliance with the License. 830 * You may obtain a copy of the License at 831 * 832 * http://www.apache.org/licenses/LICENSE-2.0 833 * 834 * Unless required by applicable law or agreed to in writing, software 835 * distributed under the License is distributed on an "AS IS" BASIS, 836 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 837 * See the License for the specific language governing permissions and 838 * limitations under the License. 839 */const MINIMUM_MIN_PASSWORD_LENGTH=6;class PasswordPolicyImpl{constructor(e){var r,s,o,d;const L=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(r=L.minPasswordLength)!==null&&r!==void 0?r:MINIMUM_MIN_PASSWORD_LENGTH,L.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=L.maxPasswordLength),L.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=L.containsLowercaseCharacter),L.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=L.containsUppercaseCharacter),L.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=L.containsNumericCharacter),L.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=L.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(o=(s=e.allowedNonAlphanumericCharacters)===null||s===void 0?void 0:s.join(""))!==null&&o!==void 0?o:"",this.forceUpgradeOnSignin=(d=e.forceUpgradeOnSignin)!==null&&d!==void 0?d:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var r,s,o,d,L,ge;const Mt={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,Mt),this.validatePasswordCharacterOptions(e,Mt),Mt.isValid&&(Mt.isValid=(r=Mt.meetsMinPasswordLength)!==null&&r!==void 0?r:!0),Mt.isValid&&(Mt.isValid=(s=Mt.meetsMaxPasswordLength)!==null&&s!==void 0?s:!0),Mt.isValid&&(Mt.isValid=(o=Mt.containsLowercaseLetter)!==null&&o!==void 0?o:!0),Mt.isValid&&(Mt.isValid=(d=Mt.containsUppercaseLetter)!==null&&d!==void 0?d:!0),Mt.isValid&&(Mt.isValid=(L=Mt.containsNumericCharacter)!==null&&L!==void 0?L:!0),Mt.isValid&&(Mt.isValid=(ge=Mt.containsNonAlphanumericCharacter)!==null&&ge!==void 0?ge:!0),Mt}validatePasswordLengthOptions(e,r){const s=this.customStrengthOptions.minPasswordLength,o=this.customStrengthOptions.maxPasswordLength;s&&(r.meetsMinPasswordLength=e.length>=s),o&&(r.meetsMaxPasswordLength=e.length<=o)}validatePasswordCharacterOptions(e,r){this.updatePasswordCharacterOptionsStatuses(r,!1,!1,!1,!1);let s;for(let o=0;o<e.length;o++)s=e.charAt(o),this.updatePasswordCharacterOptionsStatuses(r,s>="a"&&s<="z",s>="A"&&s<="Z",s>="0"&&s<="9",this.allowedNonAlphanumericCharacters.includes(s))}updatePasswordCharacterOptionsStatuses(e,r,s,o,d){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=r)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=s)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=o)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=d))}}/** 840 * @license 841 * Copyright 2020 Google LLC 842 * 843 * Licensed under the Apache License, Version 2.0 (the "License");
844 * you may not use this file except in compliance with the License. 845 * You may obtain a copy of the License at 846 * 847 * http://www.apache.org/licenses/LICENSE-2.0 848 * 849 * Unless required by applicable law or agreed to in writing, software 850 * distributed under the License is distributed on an "AS IS" BASIS, 851 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 852 * See the License for the specific language governing permissions and 853 * limitations under the License. 854 */class AuthImpl{constructor(e,r,s,o){this.app=e,this.heartbeatServiceProvider=r,this.appCheckServiceProvider=s,this.config=o,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Subscription(this),this.idTokenSubscription=new Subscription(this),this.beforeStateQueue=new AuthMiddlewareQueue(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=_DEFAULT_AUTH_ERROR_FACTORY,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=o.sdkClientVersion}_initializeWithPersistence(e,r){return r&&(this._popupRedirectResolver=_getInstance(r)),this._initializationPromise=this.queue(async()=>{var s,o;if(!this._deleted&&(this.persistenceManager=await PersistenceUserManager.create(this,e),!this._deleted)){if(!((s=this._popupRedirectResolver)===null||s===void 0)&&s._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(r),this.lastNotifiedUid=((o=this.currentUser)===null||o===void 0?void 0:o.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{const r=await getAccountInfo(this,{idToken:e}),s=await UserImpl._fromGetAccountInfoResponse(this,r,e);await this.directlySetCurrentUser(s)}catch(r){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",r),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var r;if(_isFirebaseServerApp(this.app)){const L=this.app.settings.authIdToken;return L?new Promise(ge=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(L).then(ge,ge))}):this.directlySetCurrentUser(null)}const s=await this.assertedPersistence.getCurrentUser();let o=s,d=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const L=(r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId,ge=o==null?void 0:o._redirectEventId,Mt=await this.tryRedirectSignIn(e);(!L||L===ge)&&(Mt!=null&&Mt.user)&&(o=Mt.user,d=!0)}if(!o)return this.directlySetCurrentUser(null);if(!o._redirectEventId){if(d)try{await this.beforeStateQueue.runMiddleware(o)}catch(L){o=s,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(L))}return o?this.reloadAndSetCurrentUserOrClear(o):this.directlySetCurrentUser(null)}return _assert(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 r=null;try{r=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return r}async reloadAndSetCurrentUserOrClear(e){try{await _reloadWithoutSaving(e)}catch(r){if((r==null?void 0:r.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=_getUserLanguage()}async _delete(){this._deleted=!0}
854async updateCurrentUser(e){if(_isFirebaseServerApp(this.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this));const r=e?getModularInstance(e):null;return r&&_assert(r.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(r&&r._clone(this))}async _updateCurrentUser(e,r=!1){if(!this._deleted)return e&&_assert(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),r||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return _isFirebaseServerApp(this.app)?Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return _isFirebaseServerApp(this.app)?Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(_getInstance(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const r=this._getPasswordPolicyInternal();return r.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):r.validatePassword(e)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await _getPasswordPolicy(this),r=new PasswordPolicyImpl(e);this.tenantId===null?this._projectPasswordPolicy=r:this._tenantPasswordPolicies[this.tenantId]=r}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new ErrorFactory("auth","Firebase",e())}onAuthStateChanged(e,r,s){return this.registerStateListener(this.authStateSubscription,e,r,s)}beforeAuthStateChanged(e,r){return this.beforeStateQueue.pushCallback(e,r)}onIdTokenChanged(e,r,s){return this.registerStateListener(this.idTokenSubscription,e,r,s)}authStateReady(){return new Promise((e,r)=>{if(this.currentUser)e();else{const s=this.onAuthStateChanged(()=>{s(),e()},r)}})}async revokeAccessToken(e){if(this.currentUser){const r=await this.currentUser.getIdToken(),s={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:r};this.tenantId!=null&&(s.tenantId=this.tenantId),await revokeToken(this,s)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,r){const s=await this.getOrInitRedirectPersistenceManager(r);return e===null?s.removeCurrentUser():s.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const r=e&&_getInstance(e)||this._popupRedirectResolver;_assert(r,this,"argument-error"),this.redirectPersistenceManager=await PersistenceUserManager.create(this,[_getInstance(r._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var r,s;return this._isInitialized&&await this.queue(async()=>{}),((r=this._currentUser)===null||r===void 0?void 0:r._redirectEventId)===e?this._currentUser:((s=this.redirectUser)===null||s===void 0?void 0:s._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,r;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const s=(r=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&r!==void 0?r:null;this.lastNotifiedUid!==s&&(this.lastNotifiedUid=s,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,r,s,o){if(this._deleted)return()=>{};const d=typeof r=="function"?r:r.next.bind(r);let L=!1;const ge=this._isInitialized?Promise.resolve():this._initializationPromise;if(_assert(ge,this,"internal-error"),ge.then(()=>{L||d(this.currentUser)}),typeof r=="function"){const Mt=e.addObserver(r,s,o);return()=>{L=!0,Mt()}}else{const Mt=e.addObserver(r);return()=>{L=!0,Mt()}}}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 _assert(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=_getClientVersion(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const r={"X-Client-Version":this.clientVersion};this.app.options.appId&&(r["X-Firebase-gmpid"]=this.app.options.appId);const s=await((e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader());s&&(r["X-Firebase-Client"]=s);const o=await this._getAppCheckToken();return o&&(r["X-Firebase-AppCheck"]=o),r}async _getAppCheckToken(){var e;const r=await((e=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getToken());return r!=null&&r.error&&_logWarn(`Error while retrieving App Check token: ${r.error}`),r==null?void 0:r.token}}function _castAuth(t){return getModularInstance(t)}class Subscription{constructor(e){this.auth=e,this.observer=null,this.addObserver=createSubscribe(r=>this.observer=r)}get next(){return _assert(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** 855 * @license 856 * Copyright 2020 Google LLC 857 * 858 * Licensed under the Apache License, Version 2.0 (the "License");
859 * you may not use this file except in compliance with the License. 860 * You may obtain a copy of the License at 861 * 862 * http://www.apache.org/licenses/LICENSE-2.0 863 * 864 * Unless required by applicable law or agreed to in writing, software 865 * distributed under the License is distributed on an "AS IS" BASIS, 866 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 867 * See the License for the specific language governing permissions and 868 * limitations under the License. 869 */let externalJSProvider={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function _setExternalJSProvider(t){externalJSProvider=t}function _loadJS(t){return externalJSProvider.loadJS(t)}function _gapiScriptUrl(){return externalJSProvider.gapiScript}function _generateCallbackName(t){return`__${t}${Math.floor(Math.random()*1e6)}`}/** 870 * @license 871 * Copyright 2020 Google LLC 872 * 873 * Licensed under the Apache License, Version 2.0 (the "License"); 874 * you may not use this file except in compliance with the License. 875 * You may obtain a copy of the License at 876 * 877 * http://www.apache.org/licenses/LICENSE-2.0 878 * 879 * Unless required by applicable law or agreed to in writing, software 880 * distributed under the License is distributed on an "AS IS" BASIS, 881 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 882 * See the License for the specific language governing permissions and 883 * limitations under the License. 884 */function initializeAuth(t,e){const r=_getProvider(t,"auth");if(r.isInitialized()){const o=r.getImmediate(),d=r.getOptions();if(deepEqual(d,e??{}))return o;_fail(o,"already-initialized")}return r.initialize({options:e})}function _initializeAuthInstance(t,e){const r=(e==null?void 0:e.persistence)||[],s=(Array.isArray(r)?r:[r]).map(_getInstance);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(s,e==null?void 0:e.popupRedirectResolver)}function connectAuthEmulator(t,e,r){const s=_castAuth(t);_assert(s._canInitEmulator,s,"emulator-config-failed"),_assert(/^https?:\/\//.test(e),s,"invalid-emulator-scheme");const o=!1,d=extractProtocol(e),{host:L,port:ge}=extractHostAndPort(e),Mt=ge===null?"":`:${ge}`;s.config.emulator={url:`${d}//${L}${Mt}/`},s.settings.appVerificationDisabledForTesting=!0,s.emulatorConfig=Object.freeze({host:L,port:ge,protocol:d.replace(":",""),options:Object.freeze({disableWarnings:o})}),emitEmulatorWarning()}function extractProtocol(t){const e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function extractHostAndPort(t){const e=extractProtocol(t),r=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!r)return{host:"",port:null};const s=r[2].split("@").pop()||"",o=/^(\[[^\]]+\])(:|$)/.exec(s);if(o){const d=o[1];return{host:d,port:parsePort(s.substr(d.length+1))}}else{const[d,L]=s.split(":");return{host:d,port:parsePort(L)}}}function parsePort(t){if(!t)return null;const e=Number(t);return isNaN(e)?null:e}function emitEmulatorWarning(){function t(){const e=document.createElement("p"),r=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",r.position="fixed",r.width="100%",r.backgroundColor="#ffffff",r.border=".1em solid #000000",r.color="#b50000",r.bottom="0px",r.left="0px",r.margin="0px",r.zIndex="10000",r.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}/** 885 * @license 886 * Copyright 2020 Google LLC 887 * 888 * Licensed under the Apache License, Version 2.0 (the "License"); 889 * you may not use this file except in compliance with the License. 890 * You may obtain a copy of the License at 891 * 892 * http://www.apache.org/licenses/LICENSE-2.0 893 * 894 * Unless required by applicable law or agreed to in writing, software 895 * distributed under the License is distributed on an "AS IS" BASIS, 896 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 897 * See the License for the specific language governing permissions and 898 * limitations under the License. 899 */class AuthCredential{constructor(e,r){this.providerId=e,this.signInMethod=r}toJSON(){return debugFail("not implemented")}_getIdTokenResponse(e){return debugFail("not implemented")}_linkToIdToken(e,r){return debugFail("not implemented")}_getReauthenticationResolver(e){return debugFail("not implemented")}}/** 900 * @license 901 * Copyright 2020 Google LLC 902 * 903 * Licensed under the Apache License, Version 2.0 (the "License");
904 * you may not use this file except in compliance with the License. 905 * You may obtain a copy of the License at 906 * 907 * http://www.apache.org/licenses/LICENSE-2.0 908 * 909 * Unless required by applicable law or agreed to in writing, software 910 * distributed under the License is distributed on an "AS IS" BASIS, 911 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 912 * See the License for the specific language governing permissions and 913 * limitations under the License. 914 */async function signInWithIdp(t,e){return _performSignInRequest(t,"POST","/v1/accounts:signInWithIdp",_addTidIfNecessary(t,e))}/** 915 * @license 916 * Copyright 2020 Google LLC 917 * 918 * Licensed under the Apache License, Version 2.0 (the "License"); 919 * you may not use this file except in compliance with the License. 920 * You may obtain a copy of the License at 921 * 922 * http://www.apache.org/licenses/LICENSE-2.0 923 * 924 * Unless required by applicable law or agreed to in writing, software 925 * distributed under the License is distributed on an "AS IS" BASIS, 926 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 927 * See the License for the specific language governing permissions and 928 * limitations under the License. 929 */const IDP_REQUEST_URI$1="http://localhost";class OAuthCredential extends AuthCredential{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const r=new OAuthCredential(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(r.idToken=e.idToken),e.accessToken&&(r.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(r.nonce=e.nonce),e.pendingToken&&(r.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(r.accessToken=e.oauthToken,r.secret=e.oauthTokenSecret):_fail("argument-error"),r}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
929once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const r=typeof e=="string"?JSON.parse(e):e,{providerId:s,signInMethod:o}=r,d=__rest(r,["providerId","signInMethod"]);if(!s||!o)return null;const L=new OAuthCredential(s,o);return L.idToken=d.idToken||void 0,L.accessToken=d.accessToken||void 0,L.secret=d.secret,L.nonce=d.nonce,L.pendingToken=d.pendingToken||null,L}_getIdTokenResponse(e){const r=this.buildRequest();return signInWithIdp(e,r)}_linkToIdToken(e,r){const s=this.buildRequest();return s.idToken=r,signInWithIdp(e,s)}_getReauthenticationResolver(e){const r=this.buildRequest();return r.autoCreate=!1,signInWithIdp(e,r)}buildRequest(){const e={requestUri:IDP_REQUEST_URI$1,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const r={};this.idToken&&(r.id_token=this.idToken),this.accessToken&&(r.access_token=this.accessToken),this.secret&&(r.oauth_token_secret=this.secret),r.providerId=this.providerId,this.nonce&&!this.pendingToken&&(r.nonce=this.nonce),e.postBody=querystring(r)}return e}}/** 930 * @license 931 * Copyright 2020 Google LLC 932 * 933 * Licensed under the Apache License, Version 2.0 (the "License"); 934 * you may not use this file except in compliance with the License. 935 * You may obtain a copy of the License at 936 * 937 * http://www.apache.org/licenses/LICENSE-2.0 938 * 939 * Unless required by applicable law or agreed to in writing, software 940 * distributed under the License is distributed on an "AS IS" BASIS, 941 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 942 * See the License for the specific language governing permissions and 943 * limitations under the License. 944 */class FederatedAuthProvider{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}}/** 945 * @license 946 * Copyright 2019 Google LLC 947 * 948 * Licensed under the Apache License, Version 2.0 (the "License"); 949 * you may not use this file except in compliance with the License. 950 * You may obtain a copy of the License at 951 * 952 * http://www.apache.org/licenses/LICENSE-2.0 953 * 954 * Unless required by applicable law or agreed to in writing, software 955 * distributed under the License is distributed on an "AS IS" BASIS, 956 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 957 * See the License for the specific language governing permissions and 958 * limitations under the License. 959 */class BaseOAuthProvider extends FederatedAuthProvider{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/** 960 * @license 961 * Copyright 2020 Google LLC 962 * 963 * Licensed under the Apache License, Version 2.0 (the "License"); 964 * you may not use this file except in compliance with the License. 965 * You may obtain a copy of the License at 966 * 967 * http://www.apache.org/licenses/LICENSE-2.0 968 * 969 * Unless required by applicable law or agreed to in writing, software 970 * distributed under the License is distributed on an "AS IS" BASIS, 971 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 972 * See the License for the specific language governing permissions and 973 * limitations under the License. 974 */class FacebookAuthProvider extends BaseOAuthProvider{constructor(){super("facebook.com")}static credential(e){return OAuthCredential._fromParams({providerId:FacebookAuthProvider.PROVIDER_ID,signInMethod:FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return FacebookAuthProvider.credentialFromTaggedObject(e)}static credentialFromError(e){return FacebookAuthProvider.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return FacebookAuthProvider.credential(e.oauthAccessToken)}catch{return null}}}FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD="facebook.com";FacebookAuthProvider.PROVIDER_ID="facebook.com";/** 975 * @license 976 * Copyright 2020 Google LLC 977 * 978 * Licensed under the Apache License, Version 2.0 (the "License");
979 * you may not use this file except in compliance with the License. 980 * You may obtain a copy of the License at 981 * 982 * http://www.apache.org/licenses/LICENSE-2.0 983 * 984 * Unless required by applicable law or agreed to in writing, software 985 * distributed under the License is distributed on an "AS IS" BASIS, 986 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 987 * See the License for the specific language governing permissions and 988 * limitations under the License. 989 */class GoogleAuthProvider extends BaseOAuthProvider{constructor(){super("google.com"),this.addScope("profile")}static credential(e,r){return OAuthCredential._fromParams({providerId:GoogleAuthProvider.PROVIDER_ID,signInMethod:GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:r})}static credentialFromResult(e){return GoogleAuthProvider.credentialFromTaggedObject(e)}static credentialFromError(e){return GoogleAuthProvider.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:r,oauthAccessToken:s}=e;if(!r&&!s)return null;try{return GoogleAuthProvider.credential(r,s)}catch{return null}}}GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD="google.com";GoogleAuthProvider.PROVIDER_ID="google.com";/** 990 * @license 991 * Copyright 2020 Google LLC 992 * 993 * Licensed under the Apache License, Version 2.0 (the "License"); 994 * you may not use this file except in compliance with the License. 995 * You may obtain a copy of the License at 996 * 997 * http://www.apache.org/licenses/LICENSE-2.0 998 * 999 * Unless required by applicable law or agreed to in writing, software 1000 * distributed under the License is distributed on an "AS IS" BASIS, 1001 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1002 * See the License for the specific language governing permissions and 1003 * limitations under the License. 1004 */class GithubAuthProvider extends BaseOAuthProvider{constructor(){super("github.com")}static credential(e){return OAuthCredential._fromParams({providerId:GithubAuthProvider.PROVIDER_ID,signInMethod:GithubAuthProvider.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return GithubAuthProvider.credentialFromTaggedObject(e)}static credentialFromError(e){return GithubAuthProvider.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return GithubAuthProvider.credential(e.oauthAccessToken)}catch{return null}}}GithubAuthProvider.GITHUB_SIGN_IN_METHOD="github.com";GithubAuthProvider.PROVIDER_ID="github.com";/** 1005 * @license 1006 * Copyright 2020 Google LLC 1007 * 1008 * Licensed under the Apache License, Version 2.0 (the "License"); 1009 * you may not use this file except in compliance with the License. 1010 * You may obtain a copy of the License at 1011 * 1012 * http://www.apache.org/licenses/LICENSE-2.0 1013 * 1014 * Unless required by applicable law or agreed to in writing, software 1015 * distributed under the License is distributed on an "AS IS" BASIS, 1016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1017 * See the License for the specific language governing permissions and 1018 * limitations under the License. 1019 */class TwitterAuthProvider extends BaseOAuthProvider{constructor(){super("twitter.com")}static credential(e,r){return OAuthCredential._fromParams({providerId:TwitterAuthProvider.PROVIDER_ID,signInMethod:TwitterAuthProvider.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:r})}static credentialFromResult(e){return TwitterAuthProvider.credentialFromTaggedObject(e)}static credentialFromError(e){return TwitterAuthProvider.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:r,oauthTokenSecret:s}=e;if(!r||!s)return null;try{return TwitterAuthProvider.credential(r,s)}catch{return null}}}TwitterAuthProvider.TWITTER_SIGN_IN_METHOD="twitter.com";TwitterAuthProvider.PROVIDER_ID="twitter.com";/** 1020 * @license 1021 * Copyright 2020 Google LLC 1022 * 1023 * Licensed under the Apache License, Version 2.0 (the "License");
1024 * you may not use this file except in compliance with the License. 1025 * You may obtain a copy of the License at 1026 * 1027 * http://www.apache.org/licenses/LICENSE-2.0 1028 * 1029 * Unless required by applicable law or agreed to in writing, software 1030 * distributed under the License is distributed on an "AS IS" BASIS, 1031 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1032 * See the License for the specific language governing permissions and 1033 * limitations under the License. 1034 */class UserCredentialImpl{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,r,s,o=!1){const d=await UserImpl._fromIdTokenResponse(e,s,o),L=providerIdForResponse(s);return new UserCredentialImpl({user:d,providerId:L,_tokenResponse:s,operationType:r})}static async _forOperation(e,r,s){await e._updateTokensIfNecessary(s,!0);const o=providerIdForResponse(s);return new UserCredentialImpl({user:e,providerId:o,_tokenResponse:s,operationType:r})}}function providerIdForResponse(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/** 1035 * @license 1036 * Copyright 2020 Google LLC 1037 * 1038 * Licensed under the Apache License, Version 2.0 (the "License"); 1039 * you may not use this file except in compliance with the License. 1040 * You may obtain a copy of the License at 1041 * 1042 * http://www.apache.org/licenses/LICENSE-2.0 1043 * 1044 * Unless required by applicable law or agreed to in writing, software 1045 * distributed under the License is distributed on an "AS IS" BASIS, 1046 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1047 * See the License for the specific language governing permissions and 1048 * limitations under the License. 1049 */class MultiFactorError extends FirebaseError{constructor(e,r,s,o){var d;super(r.code,r.message),this.operationType=s,this.user=o,Object.setPrototypeOf(this,MultiFactorError.prototype),this.customData={appName:e.name,tenantId:(d=e.tenantId)!==null&&d!==void 0?d:void 0,_serverResponse:r.customData._serverResponse,operationType:s}}static _fromErrorAndOperation(e,r,s,o){return new MultiFactorError(e,r,s,o)}}function _processCredentialSavingMfaContextIfNecessary(t,e,r,s){return(e==="reauthenticate"?r._getReauthenticationResolver(t):r._getIdTokenResponse(t)).catch(d=>{throw d.code==="auth/multi-factor-auth-required"?MultiFactorError._fromErrorAndOperation(t,d,e,s):d})}async function _link$1(t,e,r=!1){const s=await _logoutIfInvalidated(t,e._linkToIdToken(t.auth,await t.getIdToken()),r);return UserCredentialImpl._forOperation(t,"link",s)}/** 1050 * @license 1051 * Copyright 2019 Google LLC 1052 * 1053 * Licensed under the Apache License, Version 2.0 (the "License"); 1054 * you may not use this file except in compliance with the License. 1055 * You may obtain a copy of the License at 1056 * 1057 * http://www.apache.org/licenses/LICENSE-2.0 1058 * 1059 * Unless required by applicable law or agreed to in writing, software 1060 * distributed under the License is distributed on an "AS IS" BASIS, 1061 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1062 * See the License for the specific language governing permissions and 1063 * limitations under the License. 1064 */async function _reauthenticate(t,e,r=!1){const{auth:s}=t;if(_isFirebaseServerApp(s.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(s));const o="reauthenticate";try{const d=await _logoutIfInvalidated(t,_processCredentialSavingMfaContextIfNecessary(s,o,e,t),r);_assert(d.idToken,s,"internal-error");const L=_parseToken(d.idToken);_assert(L,s,"internal-error");const{sub:ge}=L;return _assert(t.uid===ge,s,"user-mismatch"),UserCredentialImpl._forOperation(t,o,d)}catch(d){throw(d==null?void 0:d.code)==="auth/user-not-found"&&_fail(s,"user-mismatch"),d}}/** 1065 * @license 1066 * Copyright 2020 Google LLC 1067 * 1068 * Licensed under the Apache License, Version 2.0 (the "License"); 1069 * you may not use this file except in compliance with the License. 1070 * You may obtain a copy of the License at 1071 * 1072 * http://www.apache.org/licenses/LICENSE-2.0 1073 * 1074 * Unless required by applicable law or agreed to in writing, softw
1074are 1075 * distributed under the License is distributed on an "AS IS" BASIS, 1076 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1077 * See the License for the specific language governing permissions and 1078 * limitations under the License. 1079 */async function _signInWithCredential(t,e,r=!1){if(_isFirebaseServerApp(t.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(t));const s="signIn",o=await _processCredentialSavingMfaContextIfNecessary(t,s,e),d=await UserCredentialImpl._fromIdTokenResponse(t,s,o);return r||await t._updateCurrentUser(d.user),d}function onIdTokenChanged(t,e,r,s){return getModularInstance(t).onIdTokenChanged(e,r,s)}function beforeAuthStateChanged(t,e,r){return getModularInstance(t).beforeAuthStateChanged(e,r)}const STORAGE_AVAILABLE_KEY="__sak";/** 1080 * @license 1081 * Copyright 2019 Google LLC 1082 * 1083 * Licensed under the Apache License, Version 2.0 (the "License"); 1084 * you may not use this file except in compliance with the License. 1085 * You may obtain a copy of the License at 1086 * 1087 * http://www.apache.org/licenses/LICENSE-2.0 1088 * 1089 * Unless required by applicable law or agreed to in writing, software 1090 * distributed under the License is distributed on an "AS IS" BASIS, 1091 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1092 * See the License for the specific language governing permissions and 1093 * limitations under the License. 1094 */class BrowserPersistenceClass{constructor(e,r){this.storageRetriever=e,this.type=r}_isAvailable(){try{return this.storage?(this.storage.setItem(STORAGE_AVAILABLE_KEY,"1"),this.storage.removeItem(STORAGE_AVAILABLE_KEY),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,r){return this.storage.setItem(e,JSON.stringify(r)),Promise.resolve()}_get(e){const r=this.storage.getItem(e);return Promise.resolve(r?JSON.parse(r):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/** 1095 * @license 1096 * Copyright 2020 Google LLC 1097 * 1098 * Licensed under the Apache License, Version 2.0 (the "License"); 1099 * you may not use this file except in compliance with the License. 1100 * You may obtain a copy of the License at 1101 * 1102 * http://www.apache.org/licenses/LICENSE-2.0 1103 * 1104 * Unless required by applicable law or agreed to in writing, software 1105 * distributed under the License is distributed on an "AS IS" BASIS, 1106 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1107 * See the License for the specific language governing permissions and 1108 * limitations under the License. 1109 */function _iframeCannotSyncWebStorage(){const t=getUA();return _isSafari(t)||_isIOS(t)}const _POLLING_INTERVAL_MS$1=1e3,IE10_LOCAL_STORAGE_SYNC_DELAY=10;class BrowserLocalPersistence extends BrowserPersistenceClass{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,r)=>this.onStorageEvent(e,r),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=_iframeCannotSyncWebStorage()&&_isIframe(),this.fallbackToPolling=_isMobileBrowser(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const r of Object.keys(this.listeners)){const s=this.storage.getItem(r),o=this.localCache[r];s!==o&&e(r,o,s)}}onStorageEvent(e,r=!1){if(!e.key){this.forAllChangedKeys((L,ge,Mt)=>{this.notifyListeners(L,Mt)});return}const s=e.key;if(r?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const L=this.storage.getItem(s);if(e.newValue!==L)e.newValue!==null?this.storage.setItem(s,e.newValue):this.storage.removeItem(s);else if(this.localCache[s]===e.newValue&&!r)return}const o=()=>{const L=this.storage.getItem(s);!r&&this.localCache[s]===L||this.notifyListeners(s,L)},d=this.storage.getItem(s);_isIE10()&&d!==e.newValue&&e.newValue!==e.oldValue?setTimeout(o,IE10_LOCAL_STORAGE_SYNC_DELAY):o()}notifyListeners(e,r){this.localCache[e]=r;const s=this.listeners[e];if(s)for(const o of Array.from(s))o(r&&JSON.parse(r))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,r,s)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:r,newValue:s}),!0)})},_POLLING_INTERVAL_MS$1)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,r){Object.keys(this.listeners).length===0&&(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(r)}_removeListener(e,r){this.listeners[e]&&(this.listeners[e].delete(r),this.listeners[e].size===0&&delete this.listeners[e]),Ob
1109ject.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,r){await super._set(e,r),this.localCache[e]=JSON.stringify(r)}async _get(e){const r=await super._get(e);return this.localCache[e]=JSON.stringify(r),r}async _remove(e){await super._remove(e),delete this.localCache[e]}}BrowserLocalPersistence.type="LOCAL";const browserLocalPersistence=BrowserLocalPersistence;/** 1110 * @license 1111 * Copyright 2020 Google LLC 1112 * 1113 * Licensed under the Apache License, Version 2.0 (the "License"); 1114 * you may not use this file except in compliance with the License. 1115 * You may obtain a copy of the License at 1116 * 1117 * http://www.apache.org/licenses/LICENSE-2.0 1118 * 1119 * Unless required by applicable law or agreed to in writing, software 1120 * distributed under the License is distributed on an "AS IS" BASIS, 1121 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1122 * See the License for the specific language governing permissions and 1123 * limitations under the License. 1124 */class BrowserSessionPersistence extends BrowserPersistenceClass{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,r){}_removeListener(e,r){}}BrowserSessionPersistence.type="SESSION";const browserSessionPersistence=BrowserSessionPersistence;/** 1125 * @license 1126 * Copyright 2019 Google LLC 1127 * 1128 * Licensed under the Apache License, Version 2.0 (the "License"); 1129 * you may not use this file except in compliance with the License. 1130 * You may obtain a copy of the License at 1131 * 1132 * http://www.apache.org/licenses/LICENSE-2.0 1133 * 1134 * Unless required by applicable law or agreed to in writing, software 1135 * distributed under the License is distributed on an "AS IS" BASIS, 1136 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1137 * See the License for the specific language governing permissions and 1138 * limitations under the License. 1139 */function _allSettled(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(r){return{fulfilled:!1,reason:r}}}))}/** 1140 * @license 1141 * Copyright 2019 Google LLC 1142 * 1143 * Licensed under the Apache License, Version 2.0 (the "License"); 1144 * you may not use this file except in compliance with the License. 1145 * You may obtain a copy of the License at 1146 * 1147 * http://www.apache.org/licenses/LICENSE-2.0 1148 * 1149 * Unless required by applicable law or agreed to in writing, software 1150 * distributed under the License is distributed on an "AS IS" BASIS, 1151 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1152 * See the License for the specific language governing permissions and 1153 * limitations under the License. 1154 */class Receiver{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const r=this.receivers.find(o=>o.isListeningto(e));if(r)return r;const s=new Receiver(e);return this.receivers.push(s),s}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const r=e,{eventId:s,eventType:o,data:d}=r.data,L=this.handlersMap[o];if(!(L!=null&&L.size))return;r.ports[0].postMessage({status:"ack",eventId:s,eventType:o});const ge=Array.from(L).map(async er=>er(r.origin,d)),Mt=await _allSettled(ge);r.ports[0].postMessage({status:"done",eventId:s,eventType:o,response:Mt})}_subscribe(e,r){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(r)}_unsubscribe(e,r){this.handlersMap[e]&&r&&this.handlersMap[e].delete(r),(!r||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Receiver.receivers=[];/** 1155 * @license 1156 * Copyright 2020 Google LLC 1157 * 1158 * Licensed under the Apache License, Version 2.0 (the "License"); 1159 * you may not use this file except in compliance with the License. 1160 * You may obtain a copy of the License at 1161 * 1162 * http://www.apache.org/licenses/LICENSE-2.0 1163 * 1164 * Unless required by applicable law or agreed to in writing, software 1165 * distributed under the License is distributed on an "AS IS" BASIS, 1166 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1167 * See the License for the specific language governing permissions and 1168 * limitations under the License. 1169 */function _generateEventId(t="",e=10){let r="";for(let s=0;s<e;s++)r+=Math.floor(Math.random()*10);return t+r}/** 1170 * @license 1171 * Copyright 2019 Google LLC 1172 * 1173 * Licensed under the Apache License, Version 2.0 (the "License");
1174 * you may not use this file except in compliance with the License. 1175 * You may obtain a copy of the License at 1176 * 1177 * http://www.apache.org/licenses/LICENSE-2.0 1178 * 1179 * Unless required by applicable law or agreed to in writing, software 1180 * distributed under the License is distributed on an "AS IS" BASIS, 1181 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1182 * See the License for the specific language governing permissions and 1183 * limitations under the License. 1184 */class Sender{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,r,s=50){const o=typeof MessageChannel<"u"?new MessageChannel:null;if(!o)throw new Error("connection_unavailable");let d,L;return new Promise((ge,Mt)=>{const er=_generateEventId("",20);o.port1.start();const tr=setTimeout(()=>{Mt(new Error("unsupported_event"))},s);L={messageChannel:o,onMessage(ir){const rr=ir;if(rr.data.eventId===er)switch(rr.data.status){case"ack":clearTimeout(tr),d=setTimeout(()=>{Mt(new Error("timeout"))},3e3);break;case"done":clearTimeout(d),ge(rr.data.response);break;default:clearTimeout(tr),clearTimeout(d),Mt(new Error("invalid_response"));break}}},this.handlers.add(L),o.port1.addEventListener("message",L.onMessage),this.target.postMessage({eventType:e,eventId:er,data:r},[o.port2])}).finally(()=>{L&&this.removeMessageHandler(L)})}}/** 1185 * @license 1186 * Copyright 2020 Google LLC 1187 * 1188 * Licensed under the Apache License, Version 2.0 (the "License"); 1189 * you may not use this file except in compliance with the License. 1190 * You may obtain a copy of the License at 1191 * 1192 * http://www.apache.org/licenses/LICENSE-2.0 1193 * 1194 * Unless required by applicable law or agreed to in writing, software 1195 * distributed under the License is distributed on an "AS IS" BASIS, 1196 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1197 * See the License for the specific language governing permissions and 1198 * limitations under the License. 1199 */function _window(){return window}function _setWindowLocation(t){_window().location.href=t}/** 1200 * @license 1201 * Copyright 2020 Google LLC. 1202 * 1203 * Licensed under the Apache License, Version 2.0 (the "License"); 1204 * you may not use this file except in compliance with the License. 1205 * You may obtain a copy of the License at 1206 * 1207 * http://www.apache.org/licenses/LICENSE-2.0 1208 * 1209 * Unless required by applicable law or agreed to in writing, software 1210 * distributed under the License is distributed on an "AS IS" BASIS, 1211 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1212 * See the License for the specific language governing permissions and 1213 * limitations under the License. 1214 */function _isWorker(){return typeof _window().WorkerGlobalScope<"u"&&typeof _window().importScripts=="function"}async function _getActiveServiceWorker(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function _getServiceWorkerController(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function _getWorkerGlobalScope(){return _isWorker()?self:null}/** 1215 * @license 1216 * Copyright 2019 Google LLC 1217 * 1218 * Licensed under the Apache License, Version 2.0 (the "License"); 1219 * you may not use this file except in compliance with the License. 1220 * You may obtain a copy of the License at 1221 * 1222 * http://www.apache.org/licenses/LICENSE-2.0 1223 * 1224 * Unless required by applicable law or agreed to in writing, software 1225 * distributed under the License is distributed on an "AS IS" BASIS, 1226 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1227 * See the License for the specific language governing permissions and 1228 * limitations under the License. 1229 */const DB_NAME="firebaseLocalStorageDb",DB_VERSION=1,DB_OBJECTSTORE_NAME="firebaseLocalStorage",DB_DATA_KEYPATH="fbase_key";class DBPromise{constructor(e){this.request=e}toPromise(){return new Promise((e,r)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{r(this.request.error)})})}}function getObjectStore(t,e){return t.transaction([DB_OBJECTSTORE_NAME],e?"readwrite":"readonly").objectStore(DB_OBJECTSTORE_NAME)}function _deleteDatabase(){const t=indexedDB.deleteDatabase(DB_NAME);
1229return new DBPromise(t).toPromise()}function _openDatabase(){const t=indexedDB.open(DB_NAME,DB_VERSION);return new Promise((e,r)=>{t.addEventListener("error",()=>{r(t.error)}),t.addEventListener("upgradeneeded",()=>{const s=t.result;try{s.createObjectStore(DB_OBJECTSTORE_NAME,{keyPath:DB_DATA_KEYPATH})}catch(o){r(o)}}),t.addEventListener("success",async()=>{const s=t.result;s.objectStoreNames.contains(DB_OBJECTSTORE_NAME)?e(s):(s.close(),await _deleteDatabase(),e(await _openDatabase()))})})}async function _putObject(t,e,r){const s=getObjectStore(t,!0).put({[DB_DATA_KEYPATH]:e,value:r});return new DBPromise(s).toPromise()}async function getObject(t,e){const r=getObjectStore(t,!1).get(e),s=await new DBPromise(r).toPromise();return s===void 0?null:s.value}function _deleteObject(t,e){const r=getObjectStore(t,!0).delete(e);return new DBPromise(r).toPromise()}const _POLLING_INTERVAL_MS=800,_TRANSACTION_RETRY_COUNT=3;class IndexedDBLocalPersistence{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:(this.db=await _openDatabase(),this.db)}async _withRetries(e){let r=0;for(;;)try{const s=await this._openDb();return await e(s)}catch(s){if(r++>_TRANSACTION_RETRY_COUNT)throw s;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return _isWorker()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Receiver._getInstance(_getWorkerGlobalScope()),this.receiver._subscribe("keyChanged",async(e,r)=>({keyProcessed:(await this._poll()).includes(r.key)})),this.receiver._subscribe("ping",async(e,r)=>["keyChanged"])}async initializeSender(){var e,r;if(this.activeServiceWorker=await _getActiveServiceWorker(),!this.activeServiceWorker)return;this.sender=new Sender(this.activeServiceWorker);const s=await this.sender._send("ping",{},800);s&&!((e=s[0])===null||e===void 0)&&e.fulfilled&&!((r=s[0])===null||r===void 0)&&r.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||_getServiceWorkerController()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await _openDatabase();return await _putObject(e,STORAGE_AVAILABLE_KEY,"1"),await _deleteObject(e,STORAGE_AVAILABLE_KEY),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,r){return this._withPendingWrite(async()=>(await this._withRetries(s=>_putObject(s,e,r)),this.localCache[e]=r,this.notifyServiceWorker(e)))}async _get(e){const r=await this._withRetries(s=>getObject(s,e));return this.localCache[e]=r,r}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(r=>_deleteObject(r,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(o=>{const d=getObjectStore(o,!1).getAll();return new DBPromise(d).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const r=[],s=new Set;if(e.length!==0)for(const{fbase_key:o,value:d}of e)s.add(o),JSON.stringify(this.localCache[o])!==JSON.stringify(d)&&(this.notifyListeners(o,d),r.push(o));for(const o of Object.keys(this.localCache))this.localCache[o]&&!s.has(o)&&(this.notifyListeners(o,null),r.push(o));return r}notifyListeners(e,r){this.localCache[e]=r;const s=this.listeners[e];if(s)for(const o of Array.from(s))o(r)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),_POLLING_INTERVAL_MS)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,r){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(r)}_removeListener(e,r){this.listeners[e]&&(this.listeners[e].delete(r),this.listeners[e].size===0&&delete this.listeners[e]),Ob
vendor: 4,640 bytes, lines 1229-1278
1229ject.keys(this.listeners).length===0&&this.stopPolling()}}IndexedDBLocalPersistence.type="LOCAL";const indexedDBLocalPersistence=IndexedDBLocalPersistence;new Delay(3e4,6e4);/** 1230 * @license 1231 * Copyright 2021 Google LLC 1232 * 1233 * Licensed under the Apache License, Version 2.0 (the "License"); 1234 * you may not use this file except in compliance with the License. 1235 * You may obtain a copy of the License at 1236 * 1237 * http://www.apache.org/licenses/LICENSE-2.0 1238 * 1239 * Unless required by applicable law or agreed to in writing, software 1240 * distributed under the License is distributed on an "AS IS" BASIS, 1241 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1242 * See the License for the specific language governing permissions and 1243 * limitations under the License. 1244 */function _withDefaultResolver(t,e){return e?_getInstance(e):(_assert(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/** 1245 * @license 1246 * Copyright 2019 Google LLC 1247 * 1248 * Licensed under the Apache License, Version 2.0 (the "License"); 1249 * you may not use this file except in compliance with the License. 1250 * You may obtain a copy of the License at 1251 * 1252 * http://www.apache.org/licenses/LICENSE-2.0 1253 * 1254 * Unless required by applicable law or agreed to in writing, software 1255 * distributed under the License is distributed on an "AS IS" BASIS, 1256 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1257 * See the License for the specific language governing permissions and 1258 * limitations under the License. 1259 */class IdpCredential extends AuthCredential{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return signInWithIdp(e,this._buildIdpRequest())}_linkToIdToken(e,r){return signInWithIdp(e,this._buildIdpRequest(r))}_getReauthenticationResolver(e){return signInWithIdp(e,this._buildIdpRequest())}_buildIdpRequest(e){const r={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&&(r.idToken=e),r}}function _signIn(t){return _signInWithCredential(t.auth,new IdpCredential(t),t.bypassAuthState)}function _reauth(t){const{auth:e,user:r}=t;return _assert(r,e,"internal-error"),_reauthenticate(r,new IdpCredential(t),t.bypassAuthState)}async function _link(t){const{auth:e,user:r}=t;return _assert(r,e,"internal-error"),_link$1(r,new IdpCredential(t),t.bypassAuthState)}/** 1260 * @license 1261 * Copyright 2020 Google LLC 1262 * 1263 * Licensed under the Apache License, Version 2.0 (the "License"); 1264 * you may not use this file except in compliance with the License. 1265 * You may obtain a copy of the License at 1266 * 1267 * http://www.apache.org/licenses/LICENSE-2.0 1268 * 1269 * Unless required by applicable law or agreed to in writing, software 1270 * distributed under the License is distributed on an "AS IS" BASIS, 1271 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1272 * See the License for the specific language governing permissions and 1273 * limitations under the License. 1274 */class AbstractPopupRedirectOperation{constructor(e,r,s,o,d=!1){this.auth=e,this.resolver=s,this.user=o,this.bypassAuthState=d,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(r)?r:[r]}execute(){return new Promise(async(e,r)=>{this.pendingPromise={resolve:e,reject:r};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(s){this.reject(s)}})}async onAuthEvent(e){const{urlResponse:r,sessionId:s,postBody:o,tenantId:d,error:L,type:ge}=e;if(L){this.reject(L);return}const Mt={auth:this.auth,requestUri:r,sessionId:s,tenantId:d||void 0,postBody:o||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(ge)(Mt))}catch(er){this.reject(er)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return _signIn;case"linkViaPopup":case"linkViaRedirect":return _link;case"reauthViaPopup":case"reauthViaRedirect":return _reauth;default:_fail(this.auth,"internal-error")}}resolve(e){debugAssert(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){debugAssert(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()}}/** 1275 * @license 1276 * Copyright 2020 Google LLC 1277 * 1278 * Licensed under the Apache License, Version 2.0 (the "License");
1279 * you may not use this file except in compliance with the License. 1280 * You may obtain a copy of the License at 1281 * 1282 * http://www.apache.org/licenses/LICENSE-2.0 1283 * 1284 * Unless required by applicable law or agreed to in writing, software 1285 * distributed under the License is distributed on an "AS IS" BASIS, 1286 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1287 * See the License for the specific language governing permissions and 1288 * limitations under the License. 1289 */const _POLL_WINDOW_CLOSE_TIMEOUT=new Delay(2e3,1e4);class PopupOperation extends AbstractPopupRedirectOperation{constructor(e,r,s,o,d){super(e,r,o,d),this.provider=s,this.authWindow=null,this.pollId=null,PopupOperation.currentPopupAction&&PopupOperation.currentPopupAction.cancel(),PopupOperation.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return _assert(e,this.auth,"internal-error"),e}async onExecution(){debugAssert(this.filter.length===1,"Popup operations only handle one event");const e=_generateEventId();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(r=>{this.reject(r)}),this.resolver._isIframeWebStorageSupported(this.auth,r=>{r||this.reject(_createError(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(_createError(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,PopupOperation.currentPopupAction=null}pollUserCancellation(){const e=()=>{var r,s;if(!((s=(r=this.authWindow)===null||r===void 0?void 0:r.window)===null||s===void 0)&&s.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(_createError(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,_POLL_WINDOW_CLOSE_TIMEOUT.get())};e()}}PopupOperation.currentPopupAction=null;/** 1290 * @license 1291 * Copyright 2020 Google LLC 1292 * 1293 * Licensed under the Apache License, Version 2.0 (the "License"); 1294 * you may not use this file except in compliance with the License. 1295 * You may obtain a copy of the License at 1296 * 1297 * http://www.apache.org/licenses/LICENSE-2.0 1298 * 1299 * Unless required by applicable law or agreed to in writing, software 1300 * distributed under the License is distributed on an "AS IS" BASIS, 1301 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1302 * See the License for the specific language governing permissions and 1303 * limitations under the License. 1304 */const PENDING_REDIRECT_KEY="pendingRedirect",redirectOutcomeMap=new Map;class RedirectAction extends AbstractPopupRedirectOperation{constructor(e,r,s=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],r,void 0,s),this.eventId=null}async execute(){let e=redirectOutcomeMap.get(this.auth._key());if(!e){try{const s=await _getAndClearPendingRedirectStatus(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(s)}catch(r){e=()=>Promise.reject(r)}redirectOutcomeMap.set(this.auth._key(),e)}return this.bypassAuthState||redirectOutcomeMap.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const r=await this.auth._redirectUserForId(e.eventId);if(r)return this.user=r,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function _getAndClearPendingRedirectStatus(t,e){const r=pendingRedirectKey(e),s=resolverPersistence(t);if(!await s._isAvailable())return!1;const o=await s._get(r)==="true";return await s._remove(r),o}function _overrideRedirectResult(t,e){redirectOutcomeMap.set(t._key(),e)}function resolverPersistence(t){return _getInstance(t._redirectPersistence)}function pendingRedirectKey(t){return _persistenceKeyName(PENDING_REDIRECT_KEY,t.config.apiKey,t.name)}async function _getRedirectResult(t,e,r=!1){if(_isFirebaseServerApp(t.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(t));const s=_castAuth(t),o=_withDefaultResolver(s,e),L=await new RedirectAction(s,o,r).execute();return L&&!r&&(delete L.user._redirectEventId,await s._persistUserIfCurrent(L.user),await s._setRedirectUser(null,e)),L}/** 1305 * @license 1306 * Copyright 2020 Google LLC 1307 * 1308 * Licensed under the Apache License, Version 2.0 (the "License");
1309 * you may not use this file except in compliance with the License. 1310 * You may obtain a copy of the License at 1311 * 1312 * http://www.apache.org/licenses/LICENSE-2.0 1313 * 1314 * Unless required by applicable law or agreed to in writing, software 1315 * distributed under the License is distributed on an "AS IS" BASIS, 1316 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1317 * See the License for the specific language governing permissions and 1318 * limitations under the License. 1319 */const EVENT_DUPLICATION_CACHE_DURATION_MS=10*60*1e3;class AuthEventManager{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 r=!1;return this.consumers.forEach(s=>{this.isEventForConsumer(e,s)&&(r=!0,this.sendToConsumer(e,s),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!isRedirectEvent(e)||(this.hasHandledPotentialRedirect=!0,r||(this.queuedRedirectEvent=e,r=!0)),r}sendToConsumer(e,r){var s;if(e.error&&!isNullRedirectEvent(e)){const o=((s=e.error.code)===null||s===void 0?void 0:s.split("auth/")[1])||"internal-error";r.onError(_createError(this.auth,o))}else r.onAuthEvent(e)}isEventForConsumer(e,r){const s=r.eventId===null||!!e.eventId&&e.eventId===r.eventId;return r.filter.includes(e.type)&&s}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=EVENT_DUPLICATION_CACHE_DURATION_MS&&this.cachedEventUids.clear(),this.cachedEventUids.has(eventUid(e))}saveEventToCache(e){this.cachedEventUids.add(eventUid(e)),this.lastProcessedEventTime=Date.now()}}function eventUid(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function isNullRedirectEvent({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function isRedirectEvent(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return isNullRedirectEvent(t);default:return!1}}/** 1320 * @license 1321 * Copyright 2020 Google LLC 1322 * 1323 * Licensed under the Apache License, Version 2.0 (the "License"); 1324 * you may not use this file except in compliance with the License. 1325 * You may obtain a copy of the License at 1326 * 1327 * http://www.apache.org/licenses/LICENSE-2.0 1328 * 1329 * Unless required by applicable law or agreed to in writing, software 1330 * distributed under the License is distributed on an "AS IS" BASIS, 1331 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1332 * See the License for the specific language governing permissions and 1333 * limitations under the License. 1334 */async function _getProjectConfig(t,e={}){return _performApiRequest(t,"GET","/v1/projects",e)}/** 1335 * @license 1336 * Copyright 2020 Google LLC 1337 * 1338 * Licensed under the Apache License, Version 2.0 (the "License"); 1339 * you may not use this file except in compliance with the License. 1340 * You may obtain a copy of the License at 1341 * 1342 * http://www.apache.org/licenses/LICENSE-2.0 1343 * 1344 * Unless required by applicable law or agreed to in writing, software 1345 * distributed under the License is distributed on an "AS IS" BASIS, 1346 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1347 * See the License for the specific language governing permissions and 1348 * limitations under the License. 1349 */const IP_ADDRESS_REGEX=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,HTTP_REGEX=/^https?/;async function _validateOrigin(t){if(t.config.emulator)return;const{authorizedDomains:e}=await _getProjectConfig(t);for(const r of e)try{if(matchDomain(r))return}catch{}_fail(t,"unauthorized-domain")}function matchDomain(t){const e=_getCurrentUrl(),{protocol:r,hostname:s}=new URL(e);if(t.startsWith("chrome-extension://")){const L=new URL(t);return L.hostname===""&&s===""?r==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):r==="chrome-extension:"&&L.hostname===s}if(!HTTP_REGEX.test(r))return!1;if(IP_ADDRESS_REGEX.test(t))return s===t;const o=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(s)}/** 1350 * @license 1351 * Copyright 2020 Google LLC. 1352 * 1353 * Licensed under the Apache License, Version 2.0 (the "License");
1354 * you may not use this file except in compliance with the License. 1355 * You may obtain a copy of the License at 1356 * 1357 * http://www.apache.org/licenses/LICENSE-2.0 1358 * 1359 * Unless required by applicable law or agreed to in writing, software 1360 * distributed under the License is distributed on an "AS IS" BASIS, 1361 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1362 * See the License for the specific language governing permissions and 1363 * limitations under the License. 1364 */const NETWORK_TIMEOUT=new Delay(3e4,6e4);function resetUnloadedGapiModules(){const t=_window().___jsl;if(t!=null&&t.H){for(const e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let r=0;r<t.CP.length;r++)t.CP[r]=null}}function loadGapi(t){return new Promise((e,r)=>{var s,o,d;function L(){resetUnloadedGapiModules(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{resetUnloadedGapiModules(),r(_createError(t,"network-request-failed"))},timeout:NETWORK_TIMEOUT.get()})}if(!((o=(s=_window().gapi)===null||s===void 0?void 0:s.iframes)===null||o===void 0)&&o.Iframe)e(gapi.iframes.getContext());else if(!((d=_window().gapi)===null||d===void 0)&&d.load)L();else{const ge=_generateCallbackName("iframefcb");return _window()[ge]=()=>{gapi.load?L():r(_createError(t,"network-request-failed"))},_loadJS(`${_gapiScriptUrl()}?onload=${ge}`).catch(Mt=>r(Mt))}}).catch(e=>{throw cachedGApiLoader=null,e})}let cachedGApiLoader=null;function _loadGapi(t){return cachedGApiLoader=cachedGApiLoader||loadGapi(t),cachedGApiLoader}/** 1365 * @license 1366 * Copyright 2020 Google LLC. 1367 * 1368 * Licensed under the Apache License, Version 2.0 (the "License"); 1369 * you may not use this file except in compliance with the License. 1370 * You may obtain a copy of the License at 1371 * 1372 * http://www.apache.org/licenses/LICENSE-2.0 1373 * 1374 * Unless required by applicable law or agreed to in writing, software 1375 * distributed under the License is distributed on an "AS IS" BASIS, 1376 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1377 * See the License for the specific language governing permissions and 1378 * limitations under the License. 1379 */const PING_TIMEOUT=new Delay(5e3,15e3),IFRAME_PATH="__/auth/iframe",EMULATED_IFRAME_PATH="emulator/auth/iframe",IFRAME_ATTRIBUTES={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},EID_FROM_APIHOST=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function getIframeUrl(t){const e=t.config;_assert(e.authDomain,t,"auth-domain-config-required");const r=e.emulator?_emulatorUrl(e,EMULATED_IFRAME_PATH):`https://${t.config.authDomain}/${IFRAME_PATH}`,s={apiKey:e.apiKey,appName:t.name,v:SDK_VERSION},o=EID_FROM_APIHOST.get(t.config.apiHost);o&&(s.eid=o);const d=t._getFrameworks();return d.length&&(s.fw=d.join(",")),`${r}?${querystring(s).slice(1)}`}async function _openIframe(t){const e=await _loadGapi(t),r=_window().gapi;return _assert(r,t,"internal-error"),e.open({where:document.body,url:getIframeUrl(t),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:IFRAME_ATTRIBUTES,dontclear:!0},s=>new Promise(async(o,d)=>{await s.restyle({setHideOnLeave:!1});const L=_createError(t,"network-request-failed"),ge=_window().setTimeout(()=>{d(L)},PING_TIMEOUT.get());function Mt(){_window().clearTimeout(ge),o(s)}s.ping(Mt).then(Mt,()=>{d(L)})}))}/** 1380 * @license 1381 * Copyright 2020 Google LLC. 1382 * 1383 * Licensed under the Apache License, Version 2.0 (the "License"); 1384 * you may not use this file except in compliance with the License. 1385 * You may obtain a copy of the License at 1386 * 1387 * http://www.apache.org/licenses/LICENSE-2.0 1388 * 1389 * Unless required by applicable law or agreed to in writing, software 1390 * distributed under the License is distributed on an "AS IS" BASIS, 1391 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1392 * See the License for the specific language governing permissions and 1393 * limitations under the License. 1394 */const BASE_POPUP_OPTIONS={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},DEFAULT_WIDTH=500,DEFAULT_HEIGHT=600,TARGET_BLANK="_blank",FIREFOX_EMPTY_URL="http://localhost";class AuthPopup{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function _open(t,e,r,s=DEFAULT_WIDTH,o=DEFAULT_HEIGHT){const d=Math.max((window.screen.availHeight-o)/2,0).toString(),L=Math.max((window.screen.availWi
1394dth-s)/2,0).toString();let ge="";const Mt=Object.assign(Object.assign({},BASE_POPUP_OPTIONS),{width:s.toString(),height:o.toString(),top:d,left:L}),er=getUA().toLowerCase();r&&(ge=_isChromeIOS(er)?TARGET_BLANK:r),_isFirefox(er)&&(e=e||FIREFOX_EMPTY_URL,Mt.scrollbars="yes");const tr=Object.entries(Mt).reduce((rr,[nr,ar])=>`${rr}${nr}=${ar},`,"");if(_isIOSStandalone(er)&&ge!=="_self")return openAsNewWindowIOS(e||"",ge),new AuthPopup(null);const ir=window.open(e||"",ge,tr);_assert(ir,t,"popup-blocked");try{ir.focus()}catch{}return new AuthPopup(ir)}function openAsNewWindowIOS(t,e){const r=document.createElement("a");r.href=t,r.target=e;const s=document.createEvent("MouseEvent");s.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),r.dispatchEvent(s)}/** 1395 * @license 1396 * Copyright 2021 Google LLC 1397 * 1398 * Licensed under the Apache License, Version 2.0 (the "License"); 1399 * you may not use this file except in compliance with the License. 1400 * You may obtain a copy of the License at 1401 * 1402 * http://www.apache.org/licenses/LICENSE-2.0 1403 * 1404 * Unless required by applicable law or agreed to in writing, software 1405 * distributed under the License is distributed on an "AS IS" BASIS, 1406 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1407 * See the License for the specific language governing permissions and 1408 * limitations under the License. 1409 */const WIDGET_PATH="__/auth/handler",EMULATOR_WIDGET_PATH="emulator/auth/handler",FIREBASE_APP_CHECK_FRAGMENT_ID=encodeURIComponent("fac");async function _getRedirectUrl(t,e,r,s,o,d){_assert(t.config.authDomain,t,"auth-domain-config-required"),_assert(t.config.apiKey,t,"invalid-api-key");const L={apiKey:t.config.apiKey,appName:t.name,authType:r,redirectUrl:s,v:SDK_VERSION,eventId:o};if(e instanceof FederatedAuthProvider){e.setDefaultLanguage(t.languageCode),L.providerId=e.providerId||"",isEmpty(e.getCustomParameters())||(L.customParameters=JSON.stringify(e.getCustomParameters()));for(const[tr,ir]of Object.entries({}))L[tr]=ir}if(e instanceof BaseOAuthProvider){const tr=e.getScopes().filter(ir=>ir!=="");tr.length>0&&(L.scopes=tr.join(","))}t.tenantId&&(L.tid=t.tenantId);const ge=L;for(const tr of Object.keys(ge))ge[tr]===void 0&&delete ge[tr];const Mt=await t._getAppCheckToken(),er=Mt?`#${FIREBASE_APP_CHECK_FRAGMENT_ID}=${encodeURIComponent(Mt)}`:"";return`${getHandlerBase(t)}?${querystring(ge).slice(1)}${er}`}function getHandlerBase({config:t}){return t.emulator?_emulatorUrl(t,EMULATOR_WIDGET_PATH):`https://${t.authDomain}/${WIDGET_PATH}`}/** 1410 * @license 1411 * Copyright 2020 Google LLC 1412 * 1413 * Licensed under the Apache License, Version 2.0 (the "License"); 1414 * you may not use this file except in compliance with the License. 1415 * You may obtain a copy of the License at 1416 * 1417 * http://www.apache.org/licenses/LICENSE-2.0 1418 * 1419 * Unless required by applicable law or agreed to in writing, software 1420 * distributed under the License is distributed on an "AS IS" BASIS, 1421 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1422 * See the License for the specific language governing permissions and 1423 * limitations under the License. 1424 */const WEB_STORAGE_SUPPORT_KEY="webStorageSupport";class BrowserPopupRedirectResolver{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=browserSessionPersistence,this._completeRedirectFn=_getRedirectResult,this._overrideRedirectResult=_overrideRedirectResult}async _openPopup(e,r,s,o){var d;debugAssert((d=this.eventManagers[e._key()])===null||d===void 0?void 0:d.manager,"_initialize() not called before _openPopup()");const L=await _getRedirectUrl(e,r,s,_getCurrentUrl(),o);return _open(e,L,_generateEventId())}async _openRedirect(e,r,s,o){await this._originValidation(e);const d=await _getRedirectUrl(e,r,s,_getCurrentUrl(),o);return _setWindowLocation(d),new Promise(()=>{})}_initialize(e){const r=e._key();if(this.eventManagers[r]){const{manager:o,promise:d}=this.eventManagers[r];return o?Promise.resolve(o):(debugAssert(d,"If manager is not set, promise should be"),d)}const s=this.initAndGetManager(e);return this.eventManagers[r]={promise:s},s.catch(()=>{delete this.eventManagers[r]}),s}async initAndGetManager(e){const r=await _openIframe(e),s=new AuthEventManager(e);return r.register("authEvent",o=>
1424(_assert(o==null?void 0:o.authEvent,e,"invalid-auth-event"),{status:s.onEvent(o.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:s},this.iframes[e._key()]=r,s}_isIframeWebStorageSupported(e,r){this.iframes[e._key()].send(WEB_STORAGE_SUPPORT_KEY,{type:WEB_STORAGE_SUPPORT_KEY},o=>{var d;const L=(d=o==null?void 0:o[0])===null||d===void 0?void 0:d[WEB_STORAGE_SUPPORT_KEY];L!==void 0&&r(!!L),_fail(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const r=e._key();return this.originValidationPromises[r]||(this.originValidationPromises[r]=_validateOrigin(e)),this.originValidationPromises[r]}get _shouldInitProactively(){return _isMobileBrowser()||_isSafari()||_isIOS()}}const browserPopupRedirectResolver=BrowserPopupRedirectResolver;var name$3="@firebase/auth",version$3="1.7.1";/** 1425 * @license 1426 * Copyright 2020 Google LLC 1427 * 1428 * Licensed under the Apache License, Version 2.0 (the "License"); 1429 * you may not use this file except in compliance with the License. 1430 * You may obtain a copy of the License at 1431 * 1432 * http://www.apache.org/licenses/LICENSE-2.0 1433 * 1434 * Unless required by applicable law or agreed to in writing, software 1435 * distributed under the License is distributed on an "AS IS" BASIS, 1436 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1437 * See the License for the specific language governing permissions and 1438 * limitations under the License. 1439 */class AuthInterop{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const r=this.auth.onIdTokenChanged(s=>{e((s==null?void 0:s.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,r),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const r=this.internalListeners.get(e);r&&(this.internalListeners.delete(e),r(),this.updateProactiveRefresh())}assertAuthConfigured(){_assert(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** 1440 * @license 1441 * Copyright 2020 Google LLC 1442 * 1443 * Licensed under the Apache License, Version 2.0 (the "License"); 1444 * you may not use this file except in compliance with the License. 1445 * You may obtain a copy of the License at 1446 * 1447 * http://www.apache.org/licenses/LICENSE-2.0 1448 * 1449 * Unless required by applicable law or agreed to in writing, software 1450 * distributed under the License is distributed on an "AS IS" BASIS, 1451 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1452 * See the License for the specific language governing permissions and 1453 * limitations under the License. 1454 */function getVersionForPlatform(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function registerAuth(t){_registerComponent(new Component("auth",(e,{options:r})=>{const s=e.getProvider("app").getImmediate(),o=e.getProvider("heartbeat"),d=e.getProvider("app-check-internal"),{apiKey:L,authDomain:ge}=s.options;_assert(L&&!L.includes(":"),"invalid-api-key",{appName:s.name});const Mt={apiKey:L,authDomain:ge,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:_getClientVersion(t)},er=new AuthImpl(s,o,d,Mt);return _initializeAuthInstance(er,r),er},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,r,s)=>{e.getProvider("auth-internal").initialize()})),_registerComponent(new Component("auth-internal",e=>{const r=_castAuth(e.getProvider("auth").getImmediate());return(s=>new AuthInterop(s))(r)},"PRIVATE").setInstantiationMode("EXPLICIT")),registerVersion(name$3,version$3,getVersionForPlatform(t)),registerVersion(name$3,version$3,"esm2017")}/** 1455 * @license 1456 * Copyright 2021 Google LLC 1457 * 1458 * Licensed under the Apache License, Version 2.0 (the "License");
1459 * you may not use this file except in compliance with the License. 1460 * You may obtain a copy of the License at 1461 * 1462 * http://www.apache.org/licenses/LICENSE-2.0 1463 * 1464 * Unless required by applicable law or agreed to in writing, software 1465 * distributed under the License is distributed on an "AS IS" BASIS, 1466 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1467 * See the License for the specific language governing permissions and 1468 * limitations under the License. 1469 */const DEFAULT_ID_TOKEN_MAX_AGE=5*60,authIdTokenMaxAge=getExperimentalSetting("authIdTokenMaxAge")||DEFAULT_ID_TOKEN_MAX_AGE;let lastPostedIdToken=null;const mintCookieFactory=t=>async e=>{const r=e&&await e.getIdTokenResult(),s=r&&(new Date().getTime()-Date.parse(r.issuedAtTime))/1e3;if(s&&s>authIdTokenMaxAge)return;const o=r==null?void 0:r.token;lastPostedIdToken!==o&&(lastPostedIdToken=o,await fetch(t,{method:o?"POST":"DELETE",headers:o?{Authorization:`Bearer ${o}`}:{}}))};function getAuth(t=getApp()){const e=_getProvider(t,"auth");if(e.isInitialized())return e.getImmediate();const r=initializeAuth(t,{popupRedirectResolver:browserPopupRedirectResolver,persistence:[indexedDBLocalPersistence,browserLocalPersistence,browserSessionPersistence]}),s=getExperimentalSetting("authTokenSyncURL");if(s&&typeof isSecureContext=="boolean"&&isSecureContext){const d=new URL(s,location.origin);if(location.origin===d.origin){const L=mintCookieFactory(d.toString());beforeAuthStateChanged(r,L,()=>L(r.currentUser)),onIdTokenChanged(r,ge=>L(ge))}}const o=getDefaultEmulatorHost("auth");return o&&connectAuthEmulator(r,`http://${o}`),r}function getScriptParentElement(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}_setExternalJSProvider({loadJS(t){return new Promise((e,r)=>{const s=document.createElement("script");s.setAttribute("src",t),s.onload=e,s.onerror=o=>{const d=_createError("internal-error");d.customData=o,r(d)},s.type="text/javascript",s.charset="UTF-8",getScriptParentElement().appendChild(s)})},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="});registerAuth("Browser");/** 1470 * @license 1471 * Copyright 2017 Google LLC 1472 * 1473 * Licensed under the Apache License, Version 2.0 (the "License"); 1474 * you may not use this file except in compliance with the License. 1475 * You may obtain a copy of the License at 1476 * 1477 * http://www.apache.org/licenses/LICENSE-2.0 1478 * 1479 * Unless required by applicable law or agreed to in writing, software 1480 * distributed under the License is distributed on an "AS IS" BASIS, 1481 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1482 * See the License for the specific language governing permissions and 1483 * limitations under the License. 1484 */const DEFAULT_HOST="firebasestorage.googleapis.com",CONFIG_STORAGE_BUCKET_KEY="storageBucket",DEFAULT_MAX_OPERATION_RETRY_TIME=2*60*1e3,DEFAULT_MAX_UPLOAD_RETRY_TIME=10*60*1e3;/** 1485 * @license 1486 * Copyright 2017 Google LLC 1487 * 1488 * Licensed under the Apache License, Version 2.0 (the "License"); 1489 * you may not use this file except in compliance with the License. 1490 * You may obtain a copy of the License at 1491 * 1492 * http://www.apache.org/licenses/LICENSE-2.0 1493 * 1494 * Unless required by applicable law or agreed to in writing, software 1495 * distributed under the License is distributed on an "AS IS" BASIS, 1496 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1497 * See the License for the specific language governing permissions and 1498 * limitations under the License. 1499 */class StorageError extends FirebaseError{constructor(e,r,s=0){super(prependCode(e),`Firebase Storage: ${r} (${prependCode(e)})`),this.status_=s,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,StorageError.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return prependCode(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage} 1500${this.customData.serverResponse}`:this.message=this._baseMessage}}var StorageErrorCode;(function(t){t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVA
1500LID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(StorageErrorCode||(StorageErrorCode={}));function prependCode(t){return"storage/"+t}function unknown(){const t="An unknown error occurred, please check the error payload for server response.";return new StorageError(StorageErrorCode.UNKNOWN,t)}function objectNotFound(t){return new StorageError(StorageErrorCode.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function quotaExceeded(t){return new StorageError(StorageErrorCode.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function unauthenticated(){const t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new StorageError(StorageErrorCode.UNAUTHENTICATED,t)}function unauthorizedApp(){return new StorageError(StorageErrorCode.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function unauthorized(t){return new StorageError(StorageErrorCode.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function retryLimitExceeded(){return new StorageError(StorageErrorCode.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function canceled(){return new StorageError(StorageErrorCode.CANCELED,"User canceled the upload/download.")}
1500function invalidUrl(t){return new StorageError(StorageErrorCode.INVALID_URL,"Invalid URL '"+t+"'.")}function invalidDefaultBucket(t){return new StorageError(StorageErrorCode.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function noDefaultBucket(){return new StorageError(StorageErrorCode.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+CONFIG_STORAGE_BUCKET_KEY+"' property when initializing the app?")}function cannotSliceBlob(){return new StorageError(StorageErrorCode.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function noDownloadURL(){return new StorageError(StorageErrorCode.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function missingPolyFill(t){return new StorageError(StorageErrorCode.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function invalidArgument(t){return new StorageError(StorageErrorCode.INVALID_ARGUMENT,t)}function appDeleted(){return new StorageError(StorageErrorCode.APP_DELETED,"The Firebase app was deleted.")}
vendor: 4,112 bytes, lines 1500-1540
1500function invalidRootOperation(t){return new StorageError(StorageErrorCode.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function invalidFormat(t,e){return new StorageError(StorageErrorCode.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function internalError(t){throw new StorageError(StorageErrorCode.INTERNAL_ERROR,"Internal error: "+t)}/** 1501 * @license 1502 * Copyright 2017 Google LLC 1503 * 1504 * Licensed under the Apache License, Version 2.0 (the "License"); 1505 * you may not use this file except in compliance with the License. 1506 * You may obtain a copy of the License at 1507 * 1508 * http://www.apache.org/licenses/LICENSE-2.0 1509 * 1510 * Unless required by applicable law or agreed to in writing, software 1511 * distributed under the License is distributed on an "AS IS" BASIS, 1512 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1513 * See the License for the specific language governing permissions and 1514 * limitations under the License. 1515 */class Location{constructor(e,r){this.bucket=e,this.path_=r}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,r){let s;try{s=Location.makeFromUrl(e,r)}catch{return new Location(e,"")}if(s.path==="")return s;throw invalidDefaultBucket(e)}static makeFromUrl(e,r){let s=null;const o="([A-Za-z0-9.\\-_]+)";function d(dr){dr.path.charAt(dr.path.length-1)==="/"&&(dr.path_=dr.path_.slice(0,-1))}const L="(/(.*))?$",ge=new RegExp("^gs://"+o+L,"i"),Mt={bucket:1,path:3};function er(dr){dr.path_=decodeURIComponent(dr.path)}const tr="v[A-Za-z0-9_]+",ir=r.replace(/[.]/g,"\\."),rr="(/([^?#]*).*)?$",nr=new RegExp(`^https?://${ir}/${tr}/b/${o}/o${rr}`,"i"),ar={bucket:1,path:3},sr=r===DEFAULT_HOST?"(?:storage.googleapis.com|storage.cloud.google.com)":r,lr="([^?#]*)",cr=new RegExp(`^https?://${sr}/${o}/${lr}`,"i"),or=[{regex:ge,indices:Mt,postModify:d},{regex:nr,indices:ar,postModify:er},{regex:cr,indices:{bucket:1,path:2},postModify:er}];for(let dr=0;dr<or.length;dr++){const hr=or[dr],pr=hr.regex.exec(e);if(pr){const mr=pr[hr.indices.bucket];let vr=pr[hr.indices.path];vr||(vr=""),s=new Location(mr,vr),hr.postModify(s);break}}if(s==null)throw invalidUrl(e);return s}}class FailRequest{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}/** 1516 * @license 1517 * Copyright 2017 Google LLC 1518 * 1519 * Licensed under the Apache License, Version 2.0 (the "License"); 1520 * you may not use this file except in compliance with the License. 1521 * You may obtain a copy of the License at 1522 * 1523 * http://www.apache.org/licenses/LICENSE-2.0 1524 * 1525 * Unless required by applicable law or agreed to in writing, software 1526 * distributed under the License is distributed on an "AS IS" BASIS, 1527 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1528 * See the License for the specific language governing permissions and 1529 * limitations under the License. 1530 */function start(t,e,r){let s=1,o=null,d=null,L=!1,ge=0;function Mt(){return ge===2}let er=!1;function tr(...lr){er||(er=!0,e.apply(null,lr))}function ir(lr){o=setTimeout(()=>{o=null,t(nr,Mt())},lr)}function rr(){d&&clearTimeout(d)}function nr(lr,...cr){if(er){rr();return}if(lr){rr(),tr.call(null,lr,...cr);return}if(Mt()||L){rr(),tr.call(null,lr,...cr);return}s<64&&(s*=2);let or;ge===1?(ge=2,or=0):or=(s+Math.random())*1e3,ir(or)}let ar=!1;function sr(lr){ar||(ar=!0,rr(),!er&&(o!==null?(lr||(ge=2),clearTimeout(o),ir(0)):lr||(ge=1)))}return ir(0),d=setTimeout(()=>{L=!0,sr(!0)},r),sr}function stop(t){t(!1)}/** 1531 * @license 1532 * Copyright 2017 Google LLC 1533 * 1534 * Licensed under the Apache License, Version 2.0 (the "License"); 1535 * you may not use this file except in compliance with the License. 1536 * You may obtain a copy of the License at 1537 * 1538 * http://www.apache.org/licenses/LICENSE-2.0 1539 * 1540 * Unless required by applicable law or agreed to in writing, softw
1540are 1541 * distributed under the License is distributed on an "AS IS" BASIS, 1542 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1543 * See the License for the specific language governing permissions and 1544 * limitations under the License. 1545 */function isJustDef(t){return t!==void 0}function isNonArrayObject(t){return typeof t=="object"&&!Array.isArray(t)}function isString(t){return typeof t=="string"||t instanceof String}function isNativeBlob(t){return isNativeBlobDefined()&&t instanceof Blob}function isNativeBlobDefined(){return typeof Blob<"u"}function validateNumber(t,e,r,s){if(s<e)throw invalidArgument(`Invalid value for '${t}'. Expected ${e} or greater.`);if(s>r)throw invalidArgument(`Invalid value for '${t}'. Expected ${r} or less.`)}/** 1546 * @license 1547 * Copyright 2017 Google LLC 1548 * 1549 * Licensed under the Apache License, Version 2.0 (the "License"); 1550 * you may not use this file except in compliance with the License. 1551 * You may obtain a copy of the License at 1552 * 1553 * http://www.apache.org/licenses/LICENSE-2.0 1554 * 1555 * Unless required by applicable law or agreed to in writing, software 1556 * distributed under the License is distributed on an "AS IS" BASIS, 1557 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1558 * See the License for the specific language governing permissions and 1559 * limitations under the License. 1560 */function makeUrl(t,e,r){let s=e;return r==null&&(s=`https://${e}`),`${r}://${s}/v0${t}`}function makeQueryString(t){const e=encodeURIComponent;let r="?";for(const s in t)if(t.hasOwnProperty(s)){const o=e(s)+"="+e(t[s]);r=r+o+"&"}return r=r.slice(0,-1),r}/** 1561 * @license 1562 * Copyright 2017 Google LLC 1563 * 1564 * Licensed under the Apache License, Version 2.0 (the "License"); 1565 * you may not use this file except in compliance with the License. 1566 * You may obtain a copy of the License at 1567 * 1568 * http://www.apache.org/licenses/LICENSE-2.0 1569 * 1570 * Unless required by applicable law or agreed to in writing, software 1571 * distributed under the License is distributed on an "AS IS" BASIS, 1572 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1573 * See the License for the specific language governing permissions and 1574 * limitations under the License. 1575 */var ErrorCode;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(ErrorCode||(ErrorCode={}));/** 1576 * @license 1577 * Copyright 2022 Google LLC 1578 * 1579 * Licensed under the Apache License, Version 2.0 (the "License"); 1580 * you may not use this file except in compliance with the License. 1581 * You may obtain a copy of the License at 1582 * 1583 * http://www.apache.org/licenses/LICENSE-2.0 1584 * 1585 * Unless required by applicable law or agreed to in writing, software 1586 * distributed under the License is distributed on an "AS IS" BASIS, 1587 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1588 * See the License for the specific language governing permissions and 1589 * limitations under the License. 1590 */function isRetryStatusCode(t,e){const r=t>=500&&t<600,o=[408,429].indexOf(t)!==-1,d=e.indexOf(t)!==-1;return r||o||d}/** 1591 * @license 1592 * Copyright 2017 Google LLC 1593 * 1594 * Licensed under the Apache License, Version 2.0 (the "License"); 1595 * you may not use this file except in compliance with the License. 1596 * You may obtain a copy of the License at 1597 * 1598 * http://www.apache.org/licenses/LICENSE-2.0 1599 * 1600 * Unless required by applicable law or agreed to in writing, software 1601 * distributed under the License is distributed on an "AS IS" BASIS, 1602 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1603 * See the License for the specific language governing permissions and 1604 * limitations under the License. 1605 */class NetworkRequest{constructor(e,r,s,o,d,L,ge,Mt,er,tr,ir,rr=!0){this.url_=e,this.method_=r,this.headers_=s,this.body_=o,this.successCodes_=d,this.additionalRetryCodes_=L,this.callback_=ge,this.errorCallback_=Mt,this.timeout_=er,this.progressCallback_=tr,this.connectionFactory_=ir,this.retry=rr,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((nr,ar)=>{this.resolve_=nr,this.reject_=ar,this.start_()})}start_(){const e=(s,o)=>
1605{if(o){s(!1,new RequestEndStatus(!1,null,!0));return}const d=this.connectionFactory_();this.pendingConnection_=d;const L=ge=>{const Mt=ge.loaded,er=ge.lengthComputable?ge.total:-1;this.progressCallback_!==null&&this.progressCallback_(Mt,er)};this.progressCallback_!==null&&d.addUploadProgressListener(L),d.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&d.removeUploadProgressListener(L),this.pendingConnection_=null;const ge=d.getErrorCode()===ErrorCode.NO_ERROR,Mt=d.getStatus();if(!ge||isRetryStatusCode(Mt,this.additionalRetryCodes_)&&this.retry){const tr=d.getErrorCode()===ErrorCode.ABORT;s(!1,new RequestEndStatus(!1,null,tr));return}const er=this.successCodes_.indexOf(Mt)!==-1;s(!0,new RequestEndStatus(er,d))})},r=(s,o)=>{const d=this.resolve_,L=this.reject_,ge=o.connection;if(o.wasSuccessCode)try{const Mt=this.callback_(ge,ge.getResponse());isJustDef(Mt)?d(Mt):d()}catch(Mt){L(Mt)}else if(ge!==null){const Mt=unknown();Mt.serverResponse=ge.getErrorText(),this.errorCallback_?L(this.errorCallback_(ge,Mt)):L(Mt)}else if(o.canceled){const Mt=this.appDelete_?appDeleted():canceled();L(Mt)}else{const Mt=retryLimitExceeded();L(Mt)}};this.canceled_?r(!1,new RequestEndStatus(!1,null,!0)):this.backoffId_=start(e,r,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&stop(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class RequestEndStatus{constructor(e,r,s){this.wasSuccessCode=e,this.connection=r,this.canceled=!!s}}function addAuthHeader_(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function addVersionHeader_(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function addGmpidHeader_(t,e){e&&(t["X-Firebase-GMPID"]=e)}function addAppCheckHeader_(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}function makeRequest(t,e,r,s,o,d,L=!0){const ge=makeQueryString(t.urlParams),Mt=t.url+ge,er=Object.assign({},t.headers);return addGmpidHeader_(er,e),addAuthHeader_(er,r),addVersionHeader_(er,d),addAppCheckHeader_(er,s),new NetworkRequest(Mt,t.method,er,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,o,L)}/** 1606 * @license 1607 * Copyright 2017 Google LLC 1608 * 1609 * Licensed under the Apache License, Version 2.0 (the "License"); 1610 * you may not use this file except in compliance with the License. 1611 * You may obtain a copy of the License at 1612 * 1613 * http://www.apache.org/licenses/LICENSE-2.0 1614 * 1615 * Unless required by applicable law or agreed to in writing, software 1616 * distributed under the License is distributed on an "AS IS" BASIS, 1617 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1618 * See the License for the specific language governing permissions and 1619 * limitations under the License. 1620 */function getBlobBuilder(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function getBlob$1(...t){const e=getBlobBuilder();if(e!==void 0){const r=new e;for(let s=0;s<t.length;s++)r.append(t[s]);return r.getBlob()}else{if(isNativeBlobDefined())return new Blob(t);throw new StorageError(StorageErrorCode.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}}function sliceBlob(t,e,r){return t.webkitSlice?t.webkitSlice(e,r):t.mozSlice?t.mozSlice(e,r):t.slice?t.slice(e,r):null}/** 1621 * @license 1622 * Copyright 2021 Google LLC 1623 * 1624 * Licensed under the Apache License, Version 2.0 (the "License"); 1625 * you may not use this file except in compliance with the License. 1626 * You may obtain a copy of the License at 1627 * 1628 * http://www.apache.org/licenses/LICENSE-2.0 1629 * 1630 * Unless required by applicable law or agreed to in writing, software 1631 * distributed under the License is distributed on an "AS IS" BASIS, 1632 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1633 * See the License for the specific language governing permissions and 1634 * limitations under the License. 1635 */function decodeBase64(t){if(typeof atob>"u")throw missingPolyFill("base-64");return atob(t)}/** 1636 * @license 1637 * Copyright 2017 Google LLC 1638 * 1639 * Licensed under the Apache License, Version 2.0 (the "License");
1640 * you may not use this file except in compliance with the License. 1641 * You may obtain a copy of the License at 1642 * 1643 * http://www.apache.org/licenses/LICENSE-2.0 1644 * 1645 * Unless required by applicable law or agreed to in writing, software 1646 * distributed under the License is distributed on an "AS IS" BASIS, 1647 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1648 * See the License for the specific language governing permissions and 1649 * limitations under the License. 1650 */const StringFormat={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class StringData{constructor(e,r){this.data=e,this.contentType=r||null}}function dataFromString(t,e){switch(t){case StringFormat.RAW:return new StringData(utf8Bytes_(e));case StringFormat.BASE64:case StringFormat.BASE64URL:return new StringData(base64Bytes_(t,e));case StringFormat.DATA_URL:return new StringData(dataURLBytes_(e),dataURLContentType_(e))}throw unknown()}function utf8Bytes_(t){const e=[];for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);if(s<=127)e.push(s);else if(s<=2047)e.push(192|s>>6,128|s&63);else if((s&64512)===55296)if(!(r<t.length-1&&(t.charCodeAt(r+1)&64512)===56320))e.push(239,191,189);else{const d=s,L=t.charCodeAt(++r);s=65536|(d&1023)<<10|L&1023,e.push(240|s>>18,128|s>>12&63,128|s>>6&63,128|s&63)}else(s&64512)===56320?e.push(239,191,189):e.push(224|s>>12,128|s>>6&63,128|s&63)}return new Uint8Array(e)}function percentEncodedBytes_(t){let e;try{e=decodeURIComponent(t)}catch{throw invalidFormat(StringFormat.DATA_URL,"Malformed data URL.")}return utf8Bytes_(e)}function base64Bytes_(t,e){switch(t){case StringFormat.BASE64:{const o=e.indexOf("-")!==-1,d=e.indexOf("_")!==-1;if(o||d)throw invalidFormat(t,"Invalid character '"+(o?"-":"_")+"' found: is it base64url encoded?");break}case StringFormat.BASE64URL:{const o=e.indexOf("+")!==-1,d=e.indexOf("/")!==-1;if(o||d)throw invalidFormat(t,"Invalid character '"+(o?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let r;try{r=decodeBase64(e)}catch(o){throw o.message.includes("polyfill")?o:invalidFormat(t,"Invalid character found")}const s=new Uint8Array(r.length);for(let o=0;o<r.length;o++)s[o]=r.charCodeAt(o);return s}class DataURLParts{constructor(e){this.base64=!1,this.contentType=null;const r=e.match(/^data:([^,]+)?,/);if(r===null)throw invalidFormat(StringFormat.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");const s=r[1]||null;s!=null&&(this.base64=endsWith(s,";base64"),this.contentType=this.base64?s.substring(0,s.length-7):s),this.rest=e.substring(e.indexOf(",")+1)}}function dataURLBytes_(t){const e=new DataURLParts(t);return e.base64?base64Bytes_(StringFormat.BASE64,e.rest):percentEncodedBytes_(e.rest)}function dataURLContentType_(t){return new DataURLParts(t).contentType}function endsWith(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}/** 1651 * @license 1652 * Copyright 2017 Google LLC 1653 * 1654 * Licensed under the Apache License, Version 2.0 (the "License"); 1655 * you may not use this file except in compliance with the License. 1656 * You may obtain a copy of the License at 1657 * 1658 * http://www.apache.org/licenses/LICENSE-2.0 1659 * 1660 * Unless required by applicable law or agreed to in writing, software 1661 * distributed under the License is distributed on an "AS IS" BASIS, 1662 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1663 * See the License for the specific language governing permissions and 1664 * limitations under the License. 1665 */class FbsBlob{constructor(e,r){let s=0,o="";isNativeBlob(e)?(this.data_=e,s=e.size,o=e.type):e instanceof ArrayBuffer?(r?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),s=this.data_.length):e instanceof Uint8Array&&(r?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),s=e.length),this.size_=s,this.type_=o}size(){return this.size_}type(){return this.type_}slice(e,r){if(isNativeBlob(this.data_)){const s=this.data_,o=sliceBlob(s,e,r);return o===null?null:new FbsBlob(o)}else{const s=new Uint8Array(this.data_.buffer,e,r-e);return new FbsBlob(s,!0)}}static getBlob(...e){if(isNativeBlobDefined()){const r=e.map(s=>s instanceof FbsBlob?s.data_:s);return new FbsBlob(getBlob$1.apply(null,r))}else{const r=e.map(L=>isString(L)?dataFromString(StringFormat.RAW,L).data:L.data_);let s=0;r.forEach(L=>{s+=L.byteLength});const o=new Uint8Array(s);let d=0;return r.forEach(L=>{for(let ge=0;ge<L.length;ge++)o[d++]=L[ge]}),new FbsBlob(o,!0)}}uploadData(){return this.data_}}/** 1666 * @license 1667 * Copyright 2017 Google LLC 1668 * 1669 * Licensed under the Apache License, Version 2.0 (the "License");
1670 * you may not use this file except in compliance with the License. 1671 * You may obtain a copy of the License at 1672 * 1673 * http://www.apache.org/licenses/LICENSE-2.0 1674 * 1675 * Unless required by applicable law or agreed to in writing, software 1676 * distributed under the License is distributed on an "AS IS" BASIS, 1677 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1678 * See the License for the specific language governing permissions and 1679 * limitations under the License. 1680 */function jsonObjectOrNull(t){let e;try{e=JSON.parse(t)}catch{return null}return isNonArrayObject(e)?e:null}/** 1681 * @license 1682 * Copyright 2017 Google LLC 1683 * 1684 * Licensed under the Apache License, Version 2.0 (the "License"); 1685 * you may not use this file except in compliance with the License. 1686 * You may obtain a copy of the License at 1687 * 1688 * http://www.apache.org/licenses/LICENSE-2.0 1689 * 1690 * Unless required by applicable law or agreed to in writing, software 1691 * distributed under the License is distributed on an "AS IS" BASIS, 1692 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1693 * See the License for the specific language governing permissions and 1694 * limitations under the License. 1695 */function parent(t){if(t.length===0)return null;const e=t.lastIndexOf("/");return e===-1?"":t.slice(0,e)}function child(t,e){const r=e.split("/").filter(s=>s.length>0).join("/");return t.length===0?r:t+"/"+r}function lastComponent(t){const e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}/** 1696 * @license 1697 * Copyright 2017 Google LLC 1698 * 1699 * Licensed under the Apache License, Version 2.0 (the "License"); 1700 * you may not use this file except in compliance with the License. 1701 * You may obtain a copy of the License at 1702 * 1703 * http://www.apache.org/licenses/LICENSE-2.0 1704 * 1705 * Unless required by applicable law or agreed to in writing, software 1706 * distributed under the License is distributed on an "AS IS" BASIS, 1707 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1708 * See the License for the specific language governing permissions and 1709 * limitations under the License. 1710 */function noXform_(t,e){return e}class Mapping{constructor(e,r,s,o){this.server=e,this.local=r||e,this.writable=!!s,this.xform=o||noXform_}}let mappings_=null;function xformPath(t){return!isString(t)||t.length<2?t:lastComponent(t)}function getMappings(){if(mappings_)return mappings_;const t=[];t.push(new Mapping("bucket")),t.push(new Mapping("generation")),t.push(new Mapping("metageneration")),t.push(new Mapping("name","fullPath",!0));function e(d,L){return xformPath(L)}const r=new Mapping("name");r.xform=e,t.push(r);function s(d,L){return L!==void 0?Number(L):L}const o=new Mapping("size");return o.xform=s,t.push(o),t.push(new Mapping("timeCreated")),t.push(new Mapping("updated")),t.push(new Mapping("md5Hash",null,!0)),t.push(new Mapping("cacheControl",null,!0)),t.push(new Mapping("contentDisposition",null,!0)),t.push(new Mapping("contentEncoding",null,!0)),t.push(new Mapping("contentLanguage",null,!0)),t.push(new Mapping("contentType",null,!0)),t.push(new Mapping("metadata","customMetadata",!0)),mappings_=t,mappings_}function addRef(t,e){function r(){const s=t.bucket,o=t.fullPath,d=new Location(s,o);return e._makeStorageReference(d)}Object.defineProperty(t,"ref",{get:r})}function fromResource(t,e,r){const s={};s.type="file";const o=r.length;for(let d=0;d<o;d++){const L=r[d];s[L.local]=L.xform(s,e[L.server])}return addRef(s,t),s}function fromResourceString(t,e,r){const s=jsonObjectOrNull(e);return s===null?null:fromResource(t,s,r)}function downloadUrlFromResourceString(t,e,r,s){const o=jsonObjectOrNull(e);if(o===null||!isString(o.downloadTokens))return null;const d=o.downloadTokens;if(d.length===0)return null;const L=encodeURIComponent;return d.split(",").map(er=>{const tr=t.bucket,ir=t.fullPath,rr="/b/"+L(tr)+"/o/"+L(ir),nr=makeUrl(rr,r,s),ar=makeQueryString({alt:"media",token:er});return nr+ar})[0]}function toResourceString(t,e){const r={},s=e.length;for(let o=0;o<s;o++){const d=e[o];d.writable&&(r[d.server]=t[d.local])}return JSON.stringify(r)}class RequestInfo{constructor(e,r,s,o){this.url=e,this.method=r,this.handler=s,this.timeout=o,this.urlParam
vendor: 4,809 bytes, lines 1710-1737
1710s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/** 1711 * @license 1712 * Copyright 2017 Google LLC 1713 * 1714 * Licensed under the Apache License, Version 2.0 (the "License"); 1715 * you may not use this file except in compliance with the License. 1716 * You may obtain a copy of the License at 1717 * 1718 * http://www.apache.org/licenses/LICENSE-2.0 1719 * 1720 * Unless required by applicable law or agreed to in writing, software 1721 * distributed under the License is distributed on an "AS IS" BASIS, 1722 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1723 * See the License for the specific language governing permissions and 1724 * limitations under the License. 1725 */function handlerCheck(t){if(!t)throw unknown()}function metadataHandler(t,e){function r(s,o){const d=fromResourceString(t,o,e);return handlerCheck(d!==null),d}return r}function downloadUrlHandler(t,e){function r(s,o){const d=fromResourceString(t,o,e);return handlerCheck(d!==null),downloadUrlFromResourceString(d,o,t.host,t._protocol)}return r}function sharedErrorHandler(t){function e(r,s){let o;return r.getStatus()===401?r.getErrorText().includes("Firebase App Check token is invalid")?o=unauthorizedApp():o=unauthenticated():r.getStatus()===402?o=quotaExceeded(t.bucket):r.getStatus()===403?o=unauthorized(t.path):o=s,o.status=r.getStatus(),o.serverResponse=s.serverResponse,o}return e}function objectErrorHandler(t){const e=sharedErrorHandler(t);function r(s,o){let d=e(s,o);return s.getStatus()===404&&(d=objectNotFound(t.path)),d.serverResponse=o.serverResponse,d}return r}function getMetadata$2(t,e,r){const s=e.fullServerUrl(),o=makeUrl(s,t.host,t._protocol),d="GET",L=t.maxOperationRetryTime,ge=new RequestInfo(o,d,metadataHandler(t,r),L);return ge.errorHandler=objectErrorHandler(e),ge}function getDownloadUrl(t,e,r){const s=e.fullServerUrl(),o=makeUrl(s,t.host,t._protocol),d="GET",L=t.maxOperationRetryTime,ge=new RequestInfo(o,d,downloadUrlHandler(t,r),L);return ge.errorHandler=objectErrorHandler(e),ge}function determineContentType_(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function metadataForUpload_(t,e,r){const s=Object.assign({},r);return s.fullPath=t.path,s.size=e.size(),s.contentType||(s.contentType=determineContentType_(null,e)),s}function multipartUpload(t,e,r,s,o){const d=e.bucketOnlyServerUrl(),L={"X-Goog-Upload-Protocol":"multipart"};function ge(){let or="";for(let dr=0;dr<2;dr++)or=or+Math.random().toString().slice(2);return or}const Mt=ge();L["Content-Type"]="multipart/related; boundary="+Mt;const er=metadataForUpload_(e,s,o),tr=toResourceString(er,r),ir="--"+Mt+`\r 1726Content-Type: application/json; charset=utf-8\r 1727\r 1728`+tr+`\r 1729--`+Mt+`\r 1730Content-Type: `+er.contentType+`\r 1731\r 1732`,rr=`\r 1733--`+Mt+"--",nr=FbsBlob.getBlob(ir,s,rr);if(nr===null)throw cannotSliceBlob();const ar={name:er.fullPath},sr=makeUrl(d,t.host,t._protocol),lr="POST",cr=t.maxUploadRetryTime,ur=new RequestInfo(sr,lr,metadataHandler(t,r),cr);return ur.urlParams=ar,ur.headers=L,ur.body=nr.uploadData(),ur.errorHandler=sharedErrorHandler(e),ur}class XhrConnection{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=ErrorCode.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=ErrorCode.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=ErrorCode.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,r,s,o){if(this.sent_)throw internalError("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(r,e,!0),o!==void 0)for(const d in o)o.hasOwnProperty(d)&&this.xhr_.setRequestHeader(d,o[d].toString());return s!==void 0?this.xhr_.send(s):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw internalError("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw internalError("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw internalError("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw internalError("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}}class XhrTextConnection extends XhrConnection{initXhr(){this.xhr_.responseType="text"}}function newTextConnection(){return new XhrTextConnection}/** 1734 * @license 1735 * Copyright 2019 Google LLC 1736 * 1737 * Licensed under the Apache License, Version 2.0 (the "License");
1738 * you may not use this file except in compliance with the License. 1739 * You may obtain a copy of the License at 1740 * 1741 * http://www.apache.org/licenses/LICENSE-2.0 1742 * 1743 * Unless required by applicable law or agreed to in writing, software 1744 * distributed under the License is distributed on an "AS IS" BASIS, 1745 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1746 * See the License for the specific language governing permissions and 1747 * limitations under the License. 1748 */class Reference{constructor(e,r){this._service=e,r instanceof Location?this._location=r:this._location=Location.makeFromUrl(r,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,r){return new Reference(e,r)}get root(){const e=new Location(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return lastComponent(this._location.path)}get storage(){return this._service}get parent(){const e=parent(this._location.path);if(e===null)return null;const r=new Location(this._location.bucket,e);return new Reference(this._service,r)}_throwIfRoot(e){if(this._location.path==="")throw invalidRootOperation(e)}}function uploadBytes$1(t,e,r){t._throwIfRoot("uploadBytes");const s=multipartUpload(t.storage,t._location,getMappings(),new FbsBlob(e,!0),r);return t.storage.makeRequestWithTokens(s,newTextConnection).then(o=>({metadata:o,ref:t}))}function uploadString$1(t,e,r=StringFormat.RAW,s){t._throwIfRoot("uploadString");const o=dataFromString(r,e),d=Object.assign({},s);return d.contentType==null&&o.contentType!=null&&(d.contentType=o.contentType),uploadBytes$1(t,o.data,d)}function getMetadata$1(t){t._throwIfRoot("getMetadata");const e=getMetadata$2(t.storage,t._location,getMappings());return t.storage.makeRequestWithTokens(e,newTextConnection)}function getDownloadURL$1(t){t._throwIfRoot("getDownloadURL");const e=getDownloadUrl(t.storage,t._location,getMappings());return t.storage.makeRequestWithTokens(e,newTextConnection).then(r=>{if(r===null)throw noDownloadURL();return r})}function _getChild$1(t,e){const r=child(t._location.path,e),s=new Location(t._location.bucket,r);return new Reference(t.storage,s)}/** 1749 * @license 1750 * Copyright 2017 Google LLC 1751 * 1752 * Licensed under the Apache License, Version 2.0 (the "License"); 1753 * you may not use this file except in compliance with the License. 1754 * You may obtain a copy of the License at 1755 * 1756 * http://www.apache.org/licenses/LICENSE-2.0 1757 * 1758 * Unless required by applicable law or agreed to in writing, software 1759 * distributed under the License is distributed on an "AS IS" BASIS, 1760 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1761 * See the License for the specific language governing permissions and 1762 * limitations under the License. 1763 */function isUrl(t){return/^[A-Za-z]+:\/\//.test(t)}function refFromURL(t,e){return new Reference(t,e)}function refFromPath(t,e){if(t instanceof FirebaseStorageImpl){const r=t;if(r._bucket==null)throw noDefaultBucket();const s=new Reference(r,r._bucket);return e!=null?refFromPath(s,e):s}else return e!==void 0?_getChild$1(t,e):t}function ref$1(t,e){if(e&&isUrl(e)){if(t instanceof FirebaseStorageImpl)return refFromURL(t,e);throw invalidArgument("To use ref(service, url), the first argument must be a Storage instance.")}else return refFromPath(t,e)}function extractBucket(t,e){const r=e==null?void 0:e[CONFIG_STORAGE_BUCKET_KEY];return r==null?null:Location.makeFromBucketSpec(r,t)}function connectStorageEmulator$1(t,e,r,s={}){t.host=`${e}:${r}`,t._protocol="http";const{mockUserToken:o}=s;o&&(t._overrideAuthToken=typeof o=="string"?o:createMockUserToken(o,t.app.options.projectId))}class FirebaseStorageImpl{constructor(e,r,s,o,d){this.app=e,this._authProvider=r,this._appCheckProvider=s,this._url=o,this._firebaseVersion=d,this._bucket=null,this._host=DEFAULT_HOST,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=DEFAULT_MAX_OPERATION_RETRY_TIME,this._maxUploadRetryTime=DEFAULT_MAX_UPLOAD_RETRY_TIME,this._requests=new Set,o!=null?this._bucket=Location.makeFromBucketSpec(o,this._host):this._bucket=extractBucket(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=Location.makeFromBucketSpec(this._url,e):this._bucket=extractBucket(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){validateNumber("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){validateNumber("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const r=await e.getToken();if(r!==null)return r.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});
1763return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new Reference(this,e)}_makeRequest(e,r,s,o,d=!0){if(this._deleted)return new FailRequest(appDeleted());{const L=makeRequest(e,this._appId,s,o,r,this._firebaseVersion,d);return this._requests.add(L),L.getPromise().then(()=>this._requests.delete(L),()=>this._requests.delete(L)),L}}async makeRequestWithTokens(e,r){const[s,o]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,r,s,o).getPromise()}}const name$2="@firebase/storage",version$2="0.12.4";/** 1764 * @license 1765 * Copyright 2020 Google LLC 1766 * 1767 * Licensed under the Apache License, Version 2.0 (the "License"); 1768 * you may not use this file except in compliance with the License. 1769 * You may obtain a copy of the License at 1770 * 1771 * http://www.apache.org/licenses/LICENSE-2.0 1772 * 1773 * Unless required by applicable law or agreed to in writing, software 1774 * distributed under the License is distributed on an "AS IS" BASIS, 1775 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1776 * See the License for the specific language governing permissions and 1777 * limitations under the License. 1778 */const STORAGE_TYPE="storage";function uploadString(t,e,r,s){return t=getModularInstance(t),uploadString$1(t,e,r,s)}function getMetadata(t){return t=getModularInstance(t),getMetadata$1(t)}function getDownloadURL(t){return t=getModularInstance(t),getDownloadURL$1(t)}function ref(t,e){return t=getModularInstance(t),ref$1(t,e)}function getStorage(t=getApp(),e){t=getModularInstance(t);const s=_getProvider(t,STORAGE_TYPE).getImmediate({identifier:e}),o=getDefaultEmulatorHostnameAndPort("storage");return o&&connectStorageEmulator(s,...o),s}function connectStorageEmulator(t,e,r,s={}){connectStorageEmulator$1(t,e,r,s)}function factory$1(t,{instanceIdentifier:e}){const r=t.getProvider("app").getImmediate(),s=t.getProvider("auth-internal"),o=t.getProvider("app-check-internal");return new FirebaseStorageImpl(r,s,o,e,SDK_VERSION)}function registerStorage(){_registerComponent(new Component(STORAGE_TYPE,factory$1,"PUBLIC").setMultipleInstances(!0)),registerVersion(name$2,version$2,""),registerVersion(name$2,version$2,"esm2017")}registerStorage();const name$1="@firebase/installations",version$1="0.6.6";/** 1779 * @license 1780 * Copyright 2019 Google LLC 1781 * 1782 * Licensed under the Apache License, Version 2.0 (the "License"); 1783 * you may not use this file except in compliance with the License. 1784 * You may obtain a copy of the License at 1785 * 1786 * http://www.apache.org/licenses/LICENSE-2.0 1787 * 1788 * Unless required by applicable law or agreed to in writing, software 1789 * distributed under the License is distributed on an "AS IS" BASIS, 1790 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1791 * See the License for the specific language governing permissions and 1792 * limitations under the License. 1793 */const PENDING_TIMEOUT_MS=1e4,PACKAGE_VERSION=`w:${version$1}`,INTERNAL_AUTH_VERSION="FIS_v2",INSTALLATIONS_API_URL="https://firebaseinstallations.googleapis.com/v1",TOKEN_EXPIRATION_BUFFER=60*60*1e3,SERVICE="installations",SERVICE_NAME="Installations";/** 1794 * @license 1795 * Copyright 2019 Google LLC 1796 * 1797 * Licensed under the Apache License, Version 2.0 (the "License"); 1798 * you may not use this file except in compliance with the License. 1799 * You may obtain a copy of the License at 1800 * 1801 * http://www.apache.org/licenses/LICENSE-2.0 1802 * 1803 * Unless required by applicable law or agreed to in writing, software 1804 * distributed under the License is distributed on an "AS IS" BASIS, 1805 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1806 * See the License for the specific language governing permissions and 1807 * limitations under the License. 1808 */const ERROR_DESCRIPTION_MAP={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."},ERROR_FACTORY$1=new ErrorFactory(SERVICE,SERVICE_NAME,ERROR_DESCRIPTION_MAP);function isServerError(t){return t instanceof FirebaseError&&t.code.includes("request-failed")}/** 1809 * @license 1810 * Copyright 2019 Google LLC 1811 * 1812 * Licensed under the Apache License, Version 2.0 (the "License");
1813 * you may not use this file except in compliance with the License. 1814 * You may obtain a copy of the License at 1815 * 1816 * http://www.apache.org/licenses/LICENSE-2.0 1817 * 1818 * Unless required by applicable law or agreed to in writing, software 1819 * distributed under the License is distributed on an "AS IS" BASIS, 1820 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1821 * See the License for the specific language governing permissions and 1822 * limitations under the License. 1823 */function getInstallationsEndpoint({projectId:t}){return`${INSTALLATIONS_API_URL}/projects/${t}/installations`}function extractAuthTokenInfoFromResponse(t){return{token:t.token,requestStatus:2,expiresIn:getExpiresInFromResponseExpiresIn(t.expiresIn),creationTime:Date.now()}}async function getErrorFromResponse(t,e){const s=(await e.json()).error;return ERROR_FACTORY$1.create("request-failed",{requestName:t,serverCode:s.code,serverMessage:s.message,serverStatus:s.status})}function getHeaders$1({apiKey:t}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function getHeadersWithAuth(t,{refreshToken:e}){const r=getHeaders$1(t);return r.append("Authorization",getAuthorizationHeader(e)),r}async function retryIfServerError(t){const e=await t();return e.status>=500&&e.status<600?t():e}function getExpiresInFromResponseExpiresIn(t){return Number(t.replace("s","000"))}function getAuthorizationHeader(t){return`${INTERNAL_AUTH_VERSION} ${t}`}/** 1824 * @license 1825 * Copyright 2019 Google LLC 1826 * 1827 * Licensed under the Apache License, Version 2.0 (the "License"); 1828 * you may not use this file except in compliance with the License. 1829 * You may obtain a copy of the License at 1830 * 1831 * http://www.apache.org/licenses/LICENSE-2.0 1832 * 1833 * Unless required by applicable law or agreed to in writing, software 1834 * distributed under the License is distributed on an "AS IS" BASIS, 1835 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1836 * See the License for the specific language governing permissions and 1837 * limitations under the License. 1838 */async function createInstallationRequest({appConfig:t,heartbeatServiceProvider:e},{fid:r}){const s=getInstallationsEndpoint(t),o=getHeaders$1(t),d=e.getImmediate({optional:!0});if(d){const er=await d.getHeartbeatsHeader();er&&o.append("x-firebase-client",er)}const L={fid:r,authVersion:INTERNAL_AUTH_VERSION,appId:t.appId,sdkVersion:PACKAGE_VERSION},ge={method:"POST",headers:o,body:JSON.stringify(L)},Mt=await retryIfServerError(()=>fetch(s,ge));if(Mt.ok){const er=await Mt.json();return{fid:er.fid||r,registrationStatus:2,refreshToken:er.refreshToken,authToken:extractAuthTokenInfoFromRe
1838sponse(er.authToken)}}else throw await getErrorFromResponse("Create Installation",Mt)}/** 1839 * @license 1840 * Copyright 2019 Google LLC 1841 * 1842 * Licensed under the Apache License, Version 2.0 (the "License"); 1843 * you may not use this file except in compliance with the License. 1844 * You may obtain a copy of the License at 1845 * 1846 * http://www.apache.org/licenses/LICENSE-2.0 1847 * 1848 * Unless required by applicable law or agreed to in writing, software 1849 * distributed under the License is distributed on an "AS IS" BASIS, 1850 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1851 * See the License for the specific language governing permissions and 1852 * limitations under the License. 1853 */function sleep(t){return new Promise(e=>{setTimeout(e,t)})}/** 1854 * @license 1855 * Copyright 2019 Google LLC 1856 * 1857 * Licensed under the Apache License, Version 2.0 (the "License"); 1858 * you may not use this file except in compliance with the License. 1859 * You may obtain a copy of the License at 1860 * 1861 * http://www.apache.org/licenses/LICENSE-2.0 1862 * 1863 * Unless required by applicable law or agreed to in writing, software 1864 * distributed under the License is distributed on an "AS IS" BASIS, 1865 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1866 * See the License for the specific language governing permissions and 1867 * limitations under the License. 1868 */function bufferToBase64UrlSafe(t){return btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")}/** 1869 * @license 1870 * Copyright 2019 Google LLC 1871 * 1872 * Licensed under the Apache License, Version 2.0 (the "License"); 1873 * you may not use this file except in compliance with the License. 1874 * You may obtain a copy of the License at 1875 * 1876 * http://www.apache.org/licenses/LICENSE-2.0 1877 * 1878 * Unless required by applicable law or agreed to in writing, software 1879 * distributed under the License is distributed on an "AS IS" BASIS, 1880 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1881 * See the License for the specific language governing permissions and 1882 * limitations under the License. 1883 */const VALID_FID_PATTERN=/^[cdef][\w-]{21}$/,INVALID_FID="";function generateFid(){try{const t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;const r=encode(t);return VALID_FID_PATTERN.test(r)?r:INVALID_FID}catch{return INVALID_FID}}function encode(t){return bufferToBase64UrlSafe(t).substr(0,22)}/** 1884 * @license 1885 * Copyright 2019 Google LLC 1886 * 1887 * Licensed under the Apache License, Version 2.0 (the "License"); 1888 * you may not use this file except in compliance with the License. 1889 * You may obtain a copy of the License at 1890 * 1891 * http://www.apache.org/licenses/LICENSE-2.0 1892 * 1893 * Unless required by applicable law or agreed to in writing, software 1894 * distributed under the License is distributed on an "AS IS" BASIS, 1895 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1896 * See the License for the specific language governing permissions and 1897 * limitations under the License. 1898 */function getKey(t){return`${t.appName}!${t.appId}`}/** 1899 * @license 1900 * Copyright 2019 Google LLC 1901 * 1902 * Licensed under the Apache License, Version 2.0 (the "License"); 1903 * you may not use this file except in compliance with the License. 1904 * You may obtain a copy of the License at 1905 * 1906 * http://www.apache.org/licenses/LICENSE-2.0 1907 * 1908 * Unless required by applicable law or agreed to in writing, software 1909 * distributed under the License is distributed on an "AS IS" BASIS, 1910 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1911 * See the License for the specific language governing permissions and 1912 * limitations under the License. 1913 */const fidChangeCallbacks=new Map;function fidChanged(t,e){const r=getKey(t);callFidChangeCallbacks(r,e),broadcastFidChange(r,e)}function callFidChangeCallbacks(t,e){const r=fidChangeCallbacks.get(t);if(r)for(const s of r)s(e)}function broadcastFidChange(t,e){const r=getBroadcastChannel();r&&r.postMessage({key:t,fid:e}),closeBroadcastChannel()}let broadcastChannel=null;function getBroadcastChannel(){return!broadcastChannel&&"BroadcastChannel"in self&&(broadcastChannel=new BroadcastChannel("[Firebase] FID Change"),broadcastChannel.onmessage=t=>{callFidChangeCallbacks(t.data.key,t.data.fid)}),broadcastChannel}function closeBroadcastChannel(){fidChangeCallbacks.size===0&&broadcastChannel&&(broadcastChannel.close(),broadcastChannel=null)}/** 1914 * @license 1915 * Copyright 2019 Google LLC 1916 * 1917 * Licensed under the Apache License, Version 2.0 (the "License");
1918 * you may not use this file except in compliance with the License. 1919 * You may obtain a copy of the License at 1920 * 1921 * http://www.apache.org/licenses/LICENSE-2.0 1922 * 1923 * Unless required by applicable law or agreed to in writing, software 1924 * distributed under the License is distributed on an "AS IS" BASIS, 1925 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1926 * See the License for the specific language governing permissions and 1927 * limitations under the License. 1928 */const DATABASE_NAME="firebase-installations-database",DATABASE_VERSION=1,OBJECT_STORE_NAME="firebase-installations-store";let dbPromise=null;function getDbPromise(){return dbPromise||(dbPromise=openDB(DATABASE_NAME,DATABASE_VERSION,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(OBJECT_STORE_NAME)}}})),dbPromise}async function set(t,e){const r=getKey(t),o=(await getDbPromise()).transaction(OBJECT_STORE_NAME,"readwrite"),d=o.objectStore(OBJECT_STORE_NAME),L=await d.get(r);return await d.put(e,r),await o.done,(!L||L.fid!==e.fid)&&fidChanged(t,e.fid),e}async function remove(t){const e=getKey(t),s=(await getDbPromise()).transaction(OBJECT_STORE_NAME,"readwrite");await s.objectStore(OBJECT_STORE_NAME).delete(e),await s.done}async function update(t,e){const r=getKey(t),o=(await getDbPromise()).transaction(OBJECT_STORE_NAME,"readwrite"),d=o.objectStore(OBJECT_STORE_NAME),L=await d.get(r),ge=e(L);return ge===void 0?await d.delete(r):await d.put(ge,r),await o.done,ge&&(!L||L.fid!==ge.fid)&&fidChanged(t,ge.fid),ge}/** 1929 * @license 1930 * Copyright 2019 Google LLC 1931 * 1932 * Licensed under the Apache License, Version 2.0 (the "License"); 1933 * you may not use this file except in compliance with the License. 1934 * You may obtain a copy of the License at 1935 * 1936 * http://www.apache.org/licenses/LICENSE-2.0 1937 * 1938 * Unless required by applicable law or agreed to in writing, software 1939 * distributed under the License is distributed on an "AS IS" BASIS, 1940 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1941 * See the License for the specific language governing permissions and 1942 * limitations under the License. 1943 */async function getInstallationEntry(t){let e;const r=await update(t.appConfig,s=>{const o=updateOrCreateInstallationEntry(s),d=triggerRegistrationIfNecessary(t,o);return e=d.registrationPromise,d.installationEntry});return r.fid===INVALID_FID?{installationEntry:await e}:{installationEntry:r,registrationPromise:e}}function updateOrCreateInstallationEntry(t){const e=t||{fid:generateFid(),registrationStatus:0};return clearTimedOutRequest(e)}function triggerRegistrationIfNecessary(t,e){if(e.registrationStatus===0){if(!navigator.onLine){const o=Promise.reject(ERROR_FACTORY$1.create("app-offline"));return{installationEntry:e,registrationPromise:o}}const r={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},s=registerInstallation(t,r);return{installationEntry:r,registrationPromise:s}}else return e.registrationStatus===1?{installationEntry:e,registrationPromise:waitUntilFidRegistration(t)}:{installationEntry:e}}async function registerInstallation(t,e){try{const r=await createInstallationRequest(t,e);return set(t.appConfig,r)}catch(r){throw isServerError(r)&&r.customData.serverCode===409?await remove(t.appConfig):await set(t.appConfig,{fid:e.fid,registrationStatus:0}),r}}async function waitUntilFidRegistration(t){let e=await updateInstallationRequest(t.appConfig);for(;e.registrationStatus===1;)await sleep(100),e=await updateInstallationRequest(t.appConfig);if(e.registrationStatus===0){const{installationEntry:r,registrationPromise:s}=await getInstallationEntry(t);return s||r}return e}function updateInstallationRequest(t){return update(t,e=>{if(!e)throw ERROR_FACTORY$1.create("installation-not-found");return clearTimedOutRequest(e)})}function clearTimedOutRequest(t){return hasInstallationRequestTimedOut(t)?{fid:t.fid,registrationStatus:0}:t}function hasInstallationRequestTimedOut(t){return t.registrationStatus===1&&t.registrationTime+PENDING_TIMEOUT_MS<Date.now()}/** 1944 * @license 1945 * Copyright 2019 Google LLC 1946 * 1947 * Licensed under the Apache License, Version 2.0 (the "License");
1948 * you may not use this file except in compliance with the License. 1949 * You may obtain a copy of the License at 1950 * 1951 * http://www.apache.org/licenses/LICENSE-2.0 1952 * 1953 * Unless required by applicable law or agreed to in writing, software 1954 * distributed under the License is distributed on an "AS IS" BASIS, 1955 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1956 * See the License for the specific language governing permissions and 1957 * limitations under the License. 1958 */async function generateAuthTokenRequest({appConfig:t,heartbeatServiceProvider:e},r){const s=getGenerateAuthTokenEndpoint(t,r),o=getHeadersWithAuth(t,r),d=e.getImmediate({optional:!0});if(d){const er=await d.getHeartbeatsHeader();er&&o.append("x-firebase-client",er)}const L={installation:{sdkVersion:PACKAGE_VERSION,appId:t.appId}},ge={method:"POST",headers:o,body:JSON.stringify(L)},Mt=await retryIfServerError(()=>fetch(s,ge));if(Mt.ok){const er=await Mt.json();return extractAuthTokenInfoFromResponse(er)}else throw await getErrorFromResponse("Generate Auth Token",Mt)}function getGenerateAuthTokenEndpoint(t,{fid:e}){return`${getInstallationsEndpoint(t)}/${e}/authTokens:generate`}/** 1959 * @license 1960 * Copyright 2019 Google LLC 1961 * 1962 * Licensed under the Apache License, Version 2.0 (the "License"); 1963 * you may not use this file except in compliance with the License. 1964 * You may obtain a copy of the License at 1965 * 1966 * http://www.apache.org/licenses/LICENSE-2.0 1967 * 1968 * Unless required by applicable law or agreed to in writing, software 1969 * distributed under the License is distributed on an "AS IS" BASIS, 1970 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1971 * See the License for the specific language governing permissions and 1972 * limitations under the License. 1973 */async function refreshAuthToken(t,e=!1){let r;const s=await update(t.appConfig,d=>{if(!isEntryRegistered(d))throw ERROR_FACTORY$1.create("not-registered");const L=d.authToken;if(!e&&isAuthTokenValid(L))return d;if(L.requestStatus===1)return r=waitUntilAuthTokenRequest(t,e),d;{if(!navigator.onLine)throw ERROR_FACTORY$1.create("app-offline");const ge=makeAuthTokenRequestInProgressEntry(d);return r=fetchAuthTokenFromServer(t,ge),ge}});return r?await r:s.authToken}async function waitUntilAuthTokenRequest(t,e){let r=await updateAuthTokenRequest(t.appConfig);for(;r.authToken.requestStatus===1;)await sleep(100),r=await updateAuthTokenRequest(t.appConfig);const s=r.authToken;return s.requestStatus===0?refreshAuthToken(t,e):s}function updateAuthTokenRequest(t){return update(t,e=>{if(!isEntryRegistered(e))throw ERROR_FACTORY$1.create("not-registered");const r=e.authToken;return hasAuthTokenRequestTimedOut(r)?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}async function fetchAuthTokenFromServer(t,e){try{const r=await generateAuthTokenRequest(t,e),s=Object.assign(Object.assign({},e),{authToken:r});return await set(t.appConfig,s),r}catch(r){if(isServerError(r)&&(r.customData.serverCode===401||r.customData.serverCode===404))await remove(t.appConfig);else{const s=Object.assign(Object.assign({},e),{authToken:{requestStatus:0}});await set(t.appConfig,s)}throw r}}function isEntryRegistered(t){return t!==void 0&&t.registrationStatus===2}function isAuthTokenValid(t){return t.requestStatus===2&&!isAuthTokenExpired(t)}function isAuthTokenExpired(t){const e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+TOKEN_EXPIRATION_BUFFER}function makeAuthTokenRequestInProgressEntry(t){const e={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},t),{authToken:e})}function hasAuthTokenRequestTimedOut(t){return t.requestStatus===1&&t.requestTime+PENDING_TIMEOUT_MS<Date.now()}/** 1974 * @license 1975 * Copyright 2019 Google LLC 1976 * 1977 * Licensed under the Apache License, Version 2.0 (the "License"); 1978 * you may not use this file except in compliance with the License. 1979 * You may obtain a copy of the License at 1980 * 1981 * http://www.apache.org/licenses/LICENSE-2.0 1982 * 1983 * Unless required by applicable law or agreed to in writing, software 1984 * distributed under the License is distributed on an "AS IS" BASIS, 1985 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1986 * See the License for the specific language governing permissions and 1987 * limitations under the License. 1988 */async function getId(t){const e=t,{installationEntry:r,registrationPromise:s}=await getInstallationEntry(e);return s?s.catch(console.error):refreshAuthToken(e).catch(console.error),r.fid}/** 1989 * @license 1990 * Copyright 2019 Google LLC 1991 * 1992 * Licensed under the Apache License, Version 2.0 (the "License");
1993 * you may not use this file except in compliance with the License. 1994 * You may obtain a copy of the License at 1995 * 1996 * http://www.apache.org/licenses/LICENSE-2.0 1997 * 1998 * Unless required by applicable law or agreed to in writing, software 1999 * distributed under the License is distributed on an "AS IS" BASIS, 2000 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2001 * See the License for the specific language governing permissions and 2002 * limitations under the License. 2003 */async function getToken(t,e=!1){const r=t;return await completeInstallationRegistration(r),(await refreshAuthToken(r,e)).token}async function completeInstallationRegistration(t){const{registrationPromise:e}=await getInstallationEntry(t);e&&await e}/** 2004 * @license 2005 * Copyright 2019 Google LLC 2006 * 2007 * Licensed under the Apache License, Version 2.0 (the "License"); 2008 * you may not use this file except in compliance with the License. 2009 * You may obtain a copy of the License at 2010 * 2011 * http://www.apache.org/licenses/LICENSE-2.0 2012 * 2013 * Unless required by applicable law or agreed to in writing, software 2014 * distributed under the License is distributed on an "AS IS" BASIS, 2015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2016 * See the License for the specific language governing permissions and 2017 * limitations under the License. 2018 */function extractAppConfig(t){if(!t||!t.options)throw getMissingValueError("App Configuration");if(!t.name)throw getMissingValueError("App Name");const e=["projectId","apiKey","appId"];for(const r of e)if(!t.options[r])throw getMissingValueError(r);return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}function getMissingValueError(t){return ERROR_FACTORY$1.create("missing-app-config-values",{valueName:t})}/** 2019 * @license 2020 * Copyright 2020 Google LLC 2021 * 2022 * Licensed under the Apache License, Version 2.0 (the "License"); 2023 * you may not use this file except in compliance with the License. 2024 * You may obtain a copy of the License at 2025 * 2026 * http://www.apache.org/licenses/LICENSE-2.0 2027 * 2028 * Unless required by applicable law or agreed to in writing, software 2029 * distributed under the License is distributed on an "AS IS" BASIS, 2030 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2031 * See the License for the specific language governing permissions and 2032 * limitations under the License. 2033 */const INSTALLATIONS_NAME="installations",INSTALLATIONS_NAME_INTERNAL="installations-internal",publicFactory=t=>{const e=t.getProvider("app").getImmediate(),r=extractAppConfig(e),s=_getProvider(e,"heartbeat");return{app:e,appConfig:r,heartbeatServiceProvider:s,_delete:()=>Promise.resolve()}},internalFactory=t=>{const e=t.getProvider("app").getImmediate(),r=_getProvider(e,INSTALLATIONS_NAME).getImmediate();return{getId:()=>getId(r),getToken:o=>getToken(r,o)}};function registerInstallations(){_registerComponent(new Component(INSTALLATIONS_NAME,publicFactory,"PUBLIC")),_registerComponent(new Component(INSTALLATIONS_NAME_INTERNAL,internalFactory,"PRIVATE"))}registerInstallations();registerVersion(name$1,version$1);registerVersion(name$1,version$1,"esm2017");/** 2034 * @license 2035 * Copyright 2019 Google LLC 2036 * 2037 * Licensed under the Apache License, Version 2.0 (the "License"); 2038 * you may not use this file except in compliance with the License. 2039 * You may obtain a copy of the License at 2040 * 2041 * http://www.apache.org/licenses/LICENSE-2.0 2042 * 2043 * Unless required by applicable law or agreed to in writing, software 2044 * distributed under the License is distributed on an "AS IS" BASIS, 2045 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2046 * See the License for the specific language governing permissions and 2047 * limitations under the License. 2048 */const ANALYTICS_TYPE="analytics",GA_FID_KEY="firebase_id",ORIGIN_KEY="origin",FETCH_TIMEOUT_MILLIS=60*1e3,DYNAMIC_CONFIG_URL="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",GTAG_URL="https://www.googletagmanager.com/gtag/js";/** 2049 * @license 2050 * Copyright 2019 Google LLC 2051 * 2052 * Licensed under the Apache License, Version 2.0 (the "License");
2053 * you may not use this file except in compliance with the License. 2054 * You may obtain a copy of the License at 2055 * 2056 * http://www.apache.org/licenses/LICENSE-2.0 2057 * 2058 * Unless required by applicable law or agreed to in writing, software 2059 * distributed under the License is distributed on an "AS IS" BASIS, 2060 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2061 * See the License for the specific language governing permissions and 2062 * limitations under the License. 2063 */const logger$1=new Logger("@firebase/analytics");/** 2064 * @license 2065 * Copyright 2019 Google LLC 2066 * 2067 * Licensed under the Apache License, Version 2.0 (the "License"); 2068 * you may not use this file except in compliance with the License. 2069 * You may obtain a copy of the License at 2070 * 2071 * http://www.apache.org/licenses/LICENSE-2.0 2072 * 2073 * Unless required by applicable law or agreed to in writing, software 2074 * distributed under the License is distributed on an "AS IS" BASIS, 2075 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2076 * See the License for the specific language governing permissions and 2077 * limitations under the License. 2078 */const ERRORS={"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."},ERROR_FACTORY=new ErrorFactory("analytics","Analytics",ERRORS);/** 2079 * @license 2080 * Copyright 2019 Google LLC 2081 * 2082 * Licensed under the Apache License, Version 2.0 (the "License"); 2083 * you may not use this file except in compliance with the License. 2084 * You may obtain a copy of the License at 2085 * 2086 * http://www.apache.org/licenses/LICENSE-2.0 2087 * 2088 * Unless required by applicable law or agreed to in writing, software 2089 * distributed under the License is distributed on an "AS IS" BASIS, 2090 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2091 * See the License for the specific language governing permissions and 2092 * limitations under the License. 2093 */function createGtagTrustedTypesScriptURL(t){if(!t.startsWith(GTAG_URL)){const e=ERROR_FACTORY.create("invalid-gtag-resource",{gtagURL:t});return logger$1.warn(e.message),""}return t}function promiseAllSettled(t){return Promise.all(t.map(e=>e.catch(r=>r)))}function createTrustedTypesPolicy(t,e){let r;return window.trustedTypes&&(r=window.trustedTypes.createPolicy(t,e)),r}function insertScriptTag(t,e){const r=createTrustedTypesPolicy("firebase-js-sdk-policy",{createScriptURL:createGtagTrustedTypesScriptURL}),s=document.createElement("script"),o=`${GTAG_URL}?l=${t}&id=${e}`;s.src=r?r==null?void 0:r.createScriptURL(o):o,s.async=!0,document.head.appendChild(s)}function getOrCreateDataLayer(t){let e=[];return Array.isArray(window[t])?e=window[t]:window[t]=e,e}async function gtagOnConfig(t,e,r,s,o,d){const L=s[o];try{if(L)await e[L];else{const Mt=(await promiseAllSettled(r)).find(er=>er.measurementId===o);Mt&&await e[Mt.appId]}}catch(ge){logger$1.error(ge)}t("config",o,d)}async function gtagOnEvent(t,e,r,s,o){try{let d=[];if(o&&o.send_to){let L=o.send_to;Array.isArray(L)||(L=[L]);const ge=await promiseAllSettled(r);for(const Mt of L){const er=ge.find(ir=>ir.measurementId===Mt),tr=er&&e[er.appId];if(tr)d.push(tr);else{d=[];break}}}
2093d.length===0&&(d=Object.values(e)),await Promise.all(d),t("event",s,o||{})}catch(d){logger$1.error(d)}}function wrapGtag(t,e,r,s){async function o(d,...L){try{if(d==="event"){const[ge,Mt]=L;await gtagOnEvent(t,e,r,ge,Mt)}else if(d==="config"){const[ge,Mt]=L;await gtagOnConfig(t,e,r,s,ge,Mt)}else if(d==="consent"){const[ge]=L;t("consent","update",ge)}else if(d==="get"){const[ge,Mt,er]=L;t("get",ge,Mt,er)}else if(d==="set"){const[ge]=L;t("set",ge)}else t(d,...L)}catch(ge){logger$1.error(ge)}}return o}function wrapOrCreateGtag(t,e,r,s,o){let d=function(...L){window[s].push(arguments)};return window[o]&&typeof window[o]=="function"&&(d=window[o]),window[o]=wrapGtag(d,t,e,r),{gtagCore:d,wrappedGtag:window[o]}}function findGtagScriptOnPage(t){const e=window.document.getElementsByTagName("script");for(const r of Object.values(e))if(r.src&&r.src.includes(GTAG_URL)&&r.src.includes(t))return r;return null}/** 2094 * @license 2095 * Copyright 2020 Google LLC 2096 * 2097 * Licensed under the Apache License, Version 2.0 (the "License"); 2098 * you may not use this file except in compliance with the License. 2099 * You may obtain a copy of the License at 2100 * 2101 * http://www.apache.org/licenses/LICENSE-2.0 2102 * 2103 * Unless required by applicable law or agreed to in writing, software 2104 * distributed under the License is distributed on an "AS IS" BASIS, 2105 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2106 * See the License for the specific language governing permissions and 2107 * limitations under the License. 2108 */const LONG_RETRY_FACTOR=30,BASE_INTERVAL_MILLIS=1e3;class RetryData{constructor(e={},r=BASE_INTERVAL_MILLIS){this.throttleMetadata=e,this.intervalMillis=r}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,r){this.throttleMetadata[e]=r}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}}const defaultRetryData=new RetryData;function getHeaders(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}async function fetchDynamicConfig(t){var e;const{appId:r,apiKey:s}=t,o={method:"GET",headers:getHeaders(s)},d=DYNAMIC_CONFIG_URL.replace("{app-id}",r),L=await fetch(d,o);if(L.status!==200&&L.status!==304){let ge="";try{const Mt=await L.json();!((e=Mt.error)===null||e===void 0)&&e.message&&(ge=Mt.error.message)}catch{}throw ERROR_FACTORY.create("config-fetch-failed",{httpStatus:L.status,responseMessage:ge})}return L.json()}async function fetchDynamicConfigWithRetry(t,e=defaultRetryData,r){const{appId:s,apiKey:o,measurementId:d}=t.options;if(!s)throw ERROR_FACTORY.create("no-app-id");if(!o){if(d)return{measurementId:d,appId:s};throw ERROR_FACTORY.create("no-api-key")}const L=e.getThrottleMetadata(s)||{backoffCount:0,throttleEndTimeMillis:Date.now()},ge=new AnalyticsAbortSignal;return setTimeout(async()=>{ge.abort()},FETCH_TIMEOUT_MILLIS),attemptFetchDynamicConfigWithRetry({appId:s,apiKey:o,measurementId:d},L,ge,e)}async function attemptFetchDynamicConfigWithRetry(t,{throttleEndTimeMillis:e,backoffCount:r},s,o=defaultRetryData){var d;const{appId:L,measurementId:ge}=t;try{await setAbortableTimeout(s,e)}catch(Mt){if(ge)return logger$1.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${ge} provided in the "measurementId" field in the local Firebase config. [${Mt==null?void 0:Mt.message}]`),{appId:L,measurementId:ge};throw Mt}try{const Mt=await fetchDynamicConfig(t);return o.deleteThrottleMetadata(L),Mt}catch(Mt){const er=Mt;if(!isRetriableError(er)){if(o.deleteThrottleMetadata(L),ge)return logger$1.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${ge} provided in the "measurementId" field in the local Firebase config. [${er==null?void 0:er.message}]`),{appId:L,measurementId:ge};throw Mt}const tr=Number((d=er==null?void 0:er.customData)===null||d===void 0?void 0:d.httpStatus)===503?calculateBackoffMillis(r,o.intervalMillis,LONG_RETRY_FACTOR):calculateBackoffMillis(r,o.intervalMillis),ir={throttleEndTimeMillis:Date.now()+tr,backoffCount:r+1};return o.setThrottleMetadata(L,ir),logger$1.debug(`Calling attemptFetch again in ${tr} millis`),attemptFetchDynamicConfigWithRetry(t,ir,s,o)}}function setAbortableTimeout(t,e){return new Promise((r,s)=>{const o=Math.max(e-Date.now(),0),d=setTimeout(r,o);t.addEventListener(()=>{clearTimeout(d),s(ERROR_FACTORY.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}function isRetriableError(t){if(!(t instanceof FirebaseError)||!t.customData)return!1;const e=Number(t.customData.httpStatus);return e===429||e===500||e===503||e===504}class AnalyticsAbortSignal{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}
2108abort(){this.listeners.forEach(e=>e())}}async function logEvent$1(t,e,r,s,o){if(o&&o.global){t("event",r,s);return}else{const d=await e,L=Object.assign(Object.assign({},s),{send_to:d});t("event",r,L)}}/** 2109 * @license 2110 * Copyright 2020 Google LLC 2111 * 2112 * Licensed under the Apache License, Version 2.0 (the "License"); 2113 * you may not use this file except in compliance with the License. 2114 * You may obtain a copy of the License at 2115 * 2116 * http://www.apache.org/licenses/LICENSE-2.0 2117 * 2118 * Unless required by applicable law or agreed to in writing, software 2119 * distributed under the License is distributed on an "AS IS" BASIS, 2120 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2121 * See the License for the specific language governing permissions and 2122 * limitations under the License. 2123 */async function validateIndexedDB(){if(isIndexedDBAvailable())try{await validateIndexedDBOpenable()}catch(t){return logger$1.warn(ERROR_FACTORY.create("indexeddb-unavailable",{errorInfo:t==null?void 0:t.toString()}).message),!1}else return logger$1.warn(ERROR_FACTORY.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function _initializeAnalytics(t,e,r,s,o,d,L){var ge;const Mt=fetchDynamicConfigWithRetry(t);Mt.then(nr=>{r[nr.measurementId]=nr.appId,t.options.measurementId&&nr.measurementId!==t.options.measurementId&&logger$1.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${nr.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(nr=>logger$1.error(nr)),e.push(Mt);const er=validateIndexedDB().then(nr=>{if(nr)return s.getId()}),[tr,ir]=await Promise.all([Mt,er]);findGtagScriptOnPage(d)||insertScriptTag(d,tr.measurementId),o("js",new Date);const rr=(ge=L==null?void 0:L.config)!==null&&ge!==void 0?ge:{};return rr[ORIGIN_KEY]="firebase",rr.update=!0,ir!=null&&(rr[GA_FID_KEY]=ir),o("config",tr.measurementId,rr),tr.measurementId}/** 2124 * @license 2125 * Copyright 2019 Google LLC 2126 * 2127 * Licensed under the Apache License, Version 2.0 (the "License"); 2128 * you may not use this file except in compliance with the License. 2129 * You may obtain a copy of the License at 2130 * 2131 * http://www.apache.org/licenses/LICENSE-2.0 2132 * 2133 * Unless required by applicable law or agreed to in writing, software 2134 * distributed under the License is distributed on an "AS IS" BASIS, 2135 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2136 * See the License for the specific language governing permissions and 2137 * limitations under the License. 2138 */class AnalyticsService{constructor(e){this.app=e}_delete(){return delete initializationPromisesMap[this.app.options.appId],Promise.resolve()}}let initializationPromisesMap={},dynamicConfigPromisesList=[];const measurementIdToAppId={};let dataLayerName="dataLayer",gtagName="gtag",gtagCoreFunction,wrappedGtagFunction,globalInitDone=!1;function warnOnBrowserContextMismatch(){const t=[];if(isBrowserExtension()&&t.push("This is a browser extension environment."),areCookiesEnabled()||t.push("Cookies are not available."),t.length>0){const e=t.map((s,o)=>`(${o+1}) ${s}`).join(" "),r=ERROR_FACTORY.create("invalid-analytics-context",{errorInfo:e});logger$1.warn(r.message)}}function factory(t,e,r){warnOnBrowserContextMismatch();const s=t.options.appId;if(!s)throw ERROR_FACTORY.create("no-app-id");if(!t.options.apiKey)if(t.options.measurementId)logger$1.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${t.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw ERROR_FACTORY.create("no-api-key");if(initializationPromisesMap[s]!=null)throw ERROR_FACTORY.create("already-exists",{id:s});if(!globalInitDone){getOrCreateDataLayer(dataLayerName);const{wrappedGtag:d,gtagCore:L}=wrapOrCreateGtag(initializationPromisesMap,dynamicConfigPromisesList,measurementIdToAppId,dataLayerName,gtagName);wrappedGtagFunction=d,gtagCoreFunction=L,globalInitDone=!0}return initializationPromisesMap[s]=_initializeAnalytics(t,dynamicConfigPromisesList,measurementIdToAppId,e,gtagCoreFunction,dataLayerName,r),new AnalyticsService(t)}function getAnalytics(t=getApp()){t=getModularInstance(t);const e=_getProvider(t,ANALYTICS_TYPE);return e.isInitialized()?e.getImmediate():initializeAnalytics(t)}function initializeAnalytics(t,e={}){const r=_getProvider(t,ANALYTICS_TYPE);if(r.isInitialized()){const o=r.getImmediate();if(deepEqual(e,r.getOptions()))return o;throw ERROR_FACTORY.create("already-initialized")}return r.initialize({options:e})}async function isSupported$1(){if(isBrowserExtension()||!areCookiesEnabled()||!isIndexedDBAvailable())return!1;try{return await validateIndexedDBOpenable()}catch{return!1}}function logEvent(t,e,r,s){t=getModularInstance(t),logEvent$1(wrappedGtagFunction,initializationPromisesMap[t.app.options.appId],e,r,s).catch(o=>logger$1.error(o))}const name="@firebase/analytics",version="0.10.2";function registerAnalytics(){_registerComponent(new Component(ANALYTICS_TYPE,(e,{options:r})=>{const s=e.getProvider("app").getImmediate(),o=e.getProvider("installations-internal").getImmediate();return factory(s,o,r)},"PUBLIC")),_registerComponent(new Component("analytics-internal",t,"PRIVATE")),registerVersion(name,version),registerVersion(name,version,"esm2017");function t(e){try{const r=e.getProvider(ANALYTICS_TYPE).getImmediate();return{logEvent:(s,o,d)=>logEvent(r,s,o,d)}}catch(r){throw ERROR_FACTORY.create("interop-component-reg-failed",{reason:r})}}}registerAnalytics();const firebase_client_zXNDa0wxFH=defineNuxtPlugin(t=>{const e=useRuntimeConfig(),r={apiKey:e.public.firebaseAPIKey,projectId:e.public.FBProjectID,appId:e.public.FBAppID,storageBucket:e.public.FBStorageBucket},s=initializeApp(r);isSupported$1().then(L=>L?getAnalytics(s):null),getAuth(s);const o=getStorage(s),d=async(L,ge)=>{const Mt=ref(o,L),er=await uploadString(Mt,ge,"base64");if(er){console.log("Uploaded a file!");const tr=await getDownloadURL(er.ref),ir=await getMetadata(er.ref);return{snapshot:er,downloadURL:tr,metadata:ir}}};t.vueApp.provide("uploadFile",d),t.provide("uploadFile",d)});function _assertThisInitialized(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*! 2139 * GSAP 3.12.5 2140 * https://gsap.com 2141 * 2142 * @license Copyright 2008-2024, GreenSock. All rights reserved. 2143 * Subject to the terms at https://gsap.com/standard-license or for 2144 * Club GSAP members, the agreement issued with that membership. 2145 * @author: Jack Doyle, [email protected] 2146*/var _config={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_defaults$1={duration:.5,overwrite:!1,delay:0},_suppressOverwrites$1,_reverting$1,_context$2,_bigNum$1=1e8,_tinyNum=1/_bigNum$1,_2PI=Math.PI*2,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString$1=function t(e){return typeof e=="string"},_isFunction$1=function t(e){return typeof e=="function"},_isNumber$1=function t(e){return typeof e=="number"},_isUndefined=function t(e){return typeof e>"u"},_isObject$1=function t(e){return typeof e=="object"},_isNotFalse=function t(e){return e!==!1},_windowExists$2=function t(){return typeof window<"u"},_isFuncOrString=function t(e){return _isFunction$1(e)||_isString$1(e)},_isTypedArray=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win$3,_coreInitted$2,_doc$3,_globals={},_installScope={},_coreReady,_install=function t(e){return(_installScope=_merge(e,_globals))&&gsap$2},_missingPlugin=function t(e,r){return console.warn("Invalid property",e,"set to",r,"Missing plugin? gsap.registerPlugin()")}
vendor: 16,771 bytes, line 2146
2146,_warn=function t(e,r){return!r&&console.warn(e)},_addGlobal=function t(e,r){return e&&(_globals[e]=r)&&_installScope&&(_installScope[e]=r)||_globals},_emptyFunc=function t(){return 0},_startAtRevertConfig={suppressEvents:!0,isStart:!0,kill:!1},_revertConfigNoKill={suppressEvents:!0,kill:!1},_revertConfig={suppressEvents:!0},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames="",_harness=function t(e){var r=e[0],s,o;if(_isObject$1(r)||_isFunction$1(r)||(e=[e]),!(s=(r._gsap||{}).harness)){for(o=_harnessPlugins.length;o--&&!_harnessPlugins[o].targetTest(r););s=_harnessPlugins[o]}for(o=e.length;o--;)e[o]&&(e[o]._gsap||(e[o]._gsap=new GSCache(e[o],s)))||e.splice(o,1);return e},_getCache=function t(e){return e._gsap||_harness(toArray(e))[0]._gsap},_getProperty=function t(e,r,s){return(s=e[r])&&_isFunction$1(s)?e[r]():_isUndefined(s)&&e.getAttribute&&e.getAttribute(r)||s},_forEachName=function t(e,r){return(e=e.split(",")).forEach(r)||e},_round$1=function t(e){return Math.round(e*1e5)/1e5||0},_roundPrecise=function t(e){return Math.round(e*1e7)/1e7||0},_parseRelative=function t(e,r){var s=r.charAt(0),o=parseFloat(r.substr(2));return e=parseFloat(e),s==="+"?e+o:s==="-"?e-o:s==="*"?e*o:e/o},_arrayContainsAny=function t(e,r){for(var s=r.length,o=0;e.indexOf(r[o])<0&&++o<s;);return o<s},_lazyRender=function t(){var e=_lazyTweens.length,r=_lazyTweens.slice(0),s,o;for(_lazyLookup={},_lazyTweens.length=0,s=0;s<e;s++)o=r[s],o&&o._lazy&&(o.render(o._lazy[0],o._lazy[1],!0)._lazy=0)},_lazySafeRender=function t(e,r,s,o){_lazyTweens.length&&!_reverting$1&&_lazyRender(),e.render(r,s,_reverting$1&&r<0&&(e._initted||e._startAt)),_lazyTweens.length&&!_reverting$1&&_lazyRender()},_numericIfPossible=function t(e){var r=parseFloat(e);return(r||r===0)&&(e+"").match(_delimitedValueExp).length<2?r:_isString$1(e)?e.trim():e},_passThrough$1=function t(e){return e},_setDefaults$1=function t(e,r){for(var s in r)s in e||(e[s]=r[s]);return e},_setKeyframeDefaults=function t(e){return function(r,s){for(var o in s)o in r||o==="duration"&&e||o==="ease"||(r[o]=s[o])}},_merge=function t(e,r){for(var s in r)e[s]=r[s];return e},_mergeDeep=function t(e,r){for(var s in r)s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(e[s]=_isObject$1(r[s])?t(e[s]||(e[s]={}),r[s]):r[s]);return e},_copyExcluding=function t(e,r){var s={},o;for(o in e)o in r||(s[o]=e[o]);return s},_inheritDefaults=function t(e){var r=e.parent||_globalTimeline,s=e.keyframes?_setKeyframeDefaults(_isArray(e.keyframes)):_setDefaults$1;if(_isNotFalse(e.inherit))for(;r;)s(e,r.vars.defaults),r=r.parent||r._dp;return e},_arraysMatch=function t(e,r){for(var s=e.length,o=s===r.length;o&&s--&&e[s]===r[s];);return s<0},_addLinkedListItem=function t(e,r,s,o,d){var L=e[o],ge;if(d)for(ge=r[d];L&&L[d]>ge;)L=L._prev;return L?(r._next=L._next,L._next=r):(r._next=e[s],e[s]=r),r._next?r._next._prev=r:e[o]=r,r._prev=L,r.parent=r._dp=e,r},_removeLinkedListItem=function t(e,r,s,o){s===void 0&&(s="_first"),o===void 0&&(o="_last");var d=r._prev,L=r._next;d?d._next=L:e[s]===r&&(e[s]=L),L?L._prev=d:e[o]===r&&(e[o]=d),r._next=r._prev=r.parent=null},_removeFromParent=function t(e,r){e.parent&&(!r||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},_uncache=function t(e,r){if(e&&(!r||r._end>e._dur||r._start<0))for(var s=e;s;)s._dirty=1,s=s.parent;return e},_recacheAncestors=function t(e){for(var r=e.parent;r&&r.parent;)r._dirty=1,r.totalDuration(),r=r.parent;return e},_rewindStartAt=function t(e,r,s,o){return e._startAt&&(_reverting$1?e._startAt.revert(_revertConfigNoKill):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(r,!0,o))},_hasNoPausedAncestors=function t(e){return!e||e._ts&&t(e.parent)},_elapsedCycleDuration=function t(e){return e._repeat?_animationCycle(e._tTime,e=e.duration()+e._rDelay)*e:0},_animationCycle=function t(e,r){var s=Math.floor(e/=r);return e&&s===e?s-1:s},_parentToChildTotalTime=function t(e,r){return(e-r._start)*r._ts+(r._ts>=0?0:r._dirty?r.totalDuration():r._tDur)},_setEnd=function t(e){return e._end=_roundPrecise(e._start+(e._tDur/Math.abs(e._ts||e._rts||_tinyNum)||0))},_alignPlayhead=function t(e,r){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=_roundPrecise(s._time-(e._ts>0?r/e._ts:((e._dirty?e.totalDuration():e._tDur)-r)/-e._ts)),_setEnd(e),s._dirty||_uncache(s,e)),e},_postAddChecks=function t(e,r){var s;if((r._time||!r._dur&&r._initted||r._start<e._time&&(r._dur||!r.add))&&(s=_parentToChildTotalTime(e.rawTime(),r),(!r._dur||_clamp$1(0,r.totalDuration(),s)-r._tTime>_tinyNum)&&r.render(s,!0)),_uncache(e,r)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(s=e;s._dp;)s.rawTime()>=0&&s.totalTime(s._tTime),s=s._dp;e._zTime=-_tinyNum}},_addToTimeline=function t(e,r,s,o){return r.parent&&_removeFromParent(r),r._start=_roundPrecise((_isNumber$1(s)?s:s||e!==_globalTimeline?_parsePosition$1(e,s,r):e._time)+r._delay),r._end=_roundPrecise(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),_addLinkedListItem(e,r,"_first","_last",e._sort?"_start":0),_isFromOrFromStart(r)||(e._recent=r),o||_postAddChecks(e,r),e._ts<0&&_alignPlayhead(e,e._tTime),e},_scrollTrigger=function t(e,r){return(_globals.ScrollTrigger||_missingPlugin("scrollTrigger",r))&&_globals.ScrollTrigger.create(r,e)},_attemptInitTween=function t(e,r,s,o,d){if(_initTween(e,r,d),!e._initted)return 1;if(!s&&e._pt&&!_reverting$1&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&_lastRenderedFrame!==_ticker.frame)return _lazyTweens.push(e),e._lazy=[d,o],1},_parentPlayheadIsBeforeStart=function t(e){var r=e.parent;return r&&r._ts&&r._initted&&!r._lock&&(r.rawTime()<0||t(r))},_isFromOrFromStart=function t(e){var r=e.data;return r==="isFromStart"||r==="isStart"},_renderZeroDurationTween=function t(e,r,s,o){var d=e.ratio,L=r<0||!r&&(!e._start&&_parentPlayheadIsBeforeStart(e)&&!(!e._initted&&_isFromOrFromStart(e))||(e._ts<0||e._dp._ts<0)&&!_isFromOrFromStart(e))?0:1,ge=e._rDelay,Mt=0,er,tr,ir;if(ge&&e._repeat&&(Mt=_clamp$1(0,e._tDur,r),tr=_animationCycle(Mt,ge),e._yoyo&&tr&1&&(L=1-L),tr!==_animationCycle(e._tTime,ge)&&(d=1-L,e.vars.repeatRefresh&&e._initted&&e.invalidate())),L!==d||_reverting$1||o||e._zTime===_tinyNum||!r&&e._zTime){if(!e._initted&&_attemptInitTween(e,r,o,s,Mt))return;for(ir=e._zTime,e._zTime=r||(s?_tinyNum:0),s||(s=r&&!ir),e.ratio=L,e._from&&(L=1-L),e._time=0,e._tTime=Mt,er=e._pt;er;)er.r(L,er.d),er=er._next;r<0&&_rewindStartAt(e,r,s,!0),e._onUpdate&&!s&&_callback$1(e,"onUpdate"),Mt&&e._repeat&&!s&&e.parent&&_callback$1(e,"onRepeat"),(r>=e._tDur||r<0)&&e.ratio===L&&(L&&_removeFromParent(e,1),!s&&!_reverting$1&&(_callback$1(e,L?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=r)},_findNextPauseTween=function t(e,r,s){var o;if(s>r)for(o=e._first;o&&o._start<=s;){if(o.data==="isPause"&&o._start>r)return o;o=o._next}else for(o=e._last;o&&o._start>=s;){if(o.data==="isPause"&&o._start<r)return o;o=o._prev}},_setDuration=function t(e,r,s,o){var d=e._repeat,L=_roundPrecise(r)||0,ge=e._tTime/e._tDur;return ge&&!o&&(e._time*=L/e._dur),e._dur=L,e._tDur=d?d<0?1e10:_roundPrecise(L*(d+1)+e._rDelay*d):L,ge>0&&!o&&_alignPlayhead(e,e._tTime=e._tDur*ge),e.parent&&_setEnd(e),s||_uncache(e.parent,e),e},_onUpdateTotalDuration=function t(e){return e instanceof Timeline?_uncache(e):_setDuration(e,e._dur)},_zeroPosition={_start:0,endTime:_emptyFunc,totalDuration:_emptyFunc},_parsePosition$1=function t(e,r,s){var o=e.labels,d=e._recent||_zeroPosition,L=e.duration()>=_bigNum$1?d.endTime(!1):e._dur,ge,Mt,er;return _isString$1(r)&&(isNaN(r)||r in o)?(Mt=r.charAt(0),er=r.substr(-1)==="%",ge=r.indexOf("="),Mt==="<"||Mt===">"?(ge>=0&&(r=r.replace(/=/,"")),(Mt==="<"?d._start:d.endTime(d._repeat>=0))+(parseFloat(r.substr(1))||0)*(er?(ge<0?d:s).totalDuration()/100:1)):ge<0?(r in o||(o[r]=L),o[r]):(Mt=parseFloat(r.charAt(ge-1)+r.substr(ge+1)),er&&s&&(Mt=Mt/100*(_isArray(s)?s[0]:s).totalDuration()),ge>1?t(e,r.substr(0,ge-1),s)+Mt:L+Mt)):r==null?L:+r},_createTweenType=function t(e,r,s){var o=_isNumber$1(r[1]),d=(o?2:1)+(e<2?0:1),L=r[d],ge,Mt;if(o&&(L.duration=r[1]),L.parent=s,e){for(ge=L,Mt=s;Mt&&!("immediateRender"in ge);)ge=Mt.vars.defaults||{},Mt=_isNotFalse(Mt.vars.inherit)&&Mt.parent;L.immediateRender=_isNotFalse(ge.immediateRender),e<2?L.runBackwards=1:L.startAt=r[d-1]}return new Tween(r[0],L,r[d+1])},_conditionalReturn=function t(e,r){return e||e===0?r(e):r},_clamp$1=function t(e,r,s){return s<e?e:s>r?r:s},getUnit=function t(e,r){return!_isString$1(e)||!(r=_unitExp.exec(e))?"":r[1]},clamp=function t(e,r,s){return _conditionalReturn(s,function(o){return _clamp$1(e,r,o)})},_slice=[].slice,_isArrayLike=function t(e,r){return e&&_isObject$1(e)&&"length"in e&&(!r&&!e.length||e.length-1 in e&&_isObject$1(e[0]))&&!e.nodeType&&e!==_win$3},_flatten=function t(e,r,s){return s===void 0&&(s=[]),e.forEach(function(o){var d;return _isString$1(o)&&!r||_isArrayLike(o,1)?(d=s).push.apply(d,toArray(o)):s.push(o)})||s},toArray=function t(e,r,s){return _context$2&&!r&&_context$2.selector?_context$2.selector(e):_isString$1(e)&&!s&&(_coreInitted$2||!_wake())?_slice.call((r||_doc$3).querySelectorAll(e),0):_isArray(e)?_flatten(e,s):_isArrayLike(e)?_slice.call(e,0):e?[e]:[]},selector=function t(e){return e=toArray(e)[0]||_warn("Invalid scope")||{},function(r){var s=e.current||e.nativeElement||e;return toArray(r,s.querySelectorAll?s:s===e?_warn("Invalid scope")||_doc$3.createElement("div"):e)}},shuffle=function t(e){return e.sort(function(){return .5-Math.random()})},distribute=function t(e){if(_isFunction$1(e))return e;var r=_isObject$1(e)?e:{each:e},s=_parseEase(r.ease),o=r.from||0,d=parseFloat(r.base)||0,L={},ge=o>0&&o<1,Mt=isNaN(o)||ge,er=r.axis,tr=o,ir=o;return _isString$1(o)?tr=ir={center:.5,edges:.5,end:1}[o]||0:!ge&&Mt&&(tr=o[0],ir=o[1]),function(rr,nr,ar){var sr=(ar||r).length,lr=L[sr],cr,ur,or,dr,hr,pr,mr,vr,Er;if(!lr){if(Er=r.grid==="auto"?0:(r.grid||[1,_bigNum$1])[1],!Er){for(mr=-_bigNum$1;mr<(mr=ar[Er++].getBoundingClientRect().left)&&Er<sr;);Er<sr&&Er--}for(lr=L[sr]=[],cr=Mt?Math.min(Er,sr)*tr-.5:o%Er,ur=Er===_bigNum$1?0:Mt?sr*ir/Er-.5:o/Er|0,mr=0,vr=_bigNum$1,pr=0;pr<sr;pr++)or=pr%Er-cr,dr=ur-(pr/Er|0),lr[pr]=hr=er?Math.abs(er==="y"?dr:or):_sqrt(or*or+dr*dr),hr>mr&&(mr=hr),hr<vr&&(vr=hr);o==="random"&&shuffle(lr),lr.max=mr-vr,lr.min=vr,lr.v=sr=(parseFloat(r.amount)||parseFloat(r.each)*(Er>sr?sr-1:er?er==="y"?sr/Er:Er:Math.max(Er,sr/Er))||0)*(o==="edges"?-1:1),lr.b=sr<0?d-sr:d,lr.u=getUnit(r.amount||r.each)||0,s=s&&sr<0?_invertEase(s):s}return sr=(lr[rr]-lr.min)/lr.max||0,_roundPrecise(lr.b+(s?s(sr):sr)*lr.v)+lr.u}},_roundModifier=function t(e){var r=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var o=_roundPrecise(Math.round(parseFloat(s)/e)*e*r);return(o-o%1)/r+(_isNumber$1(s)?0:getUnit(s))}},snap=function t(e,r){var s=_isArray(e),o,d;return!s&&_isObject$1(e)&&(o=s=e.radius||_bigNum$1,e.values?(e=toArray(e.values),(d=!_isNumber$1(e[0]))&&(o*=o)):e=_roundModifier(e.increment)),_conditionalReturn(r,s?_isFunction$1(e)?function(L){return d=e(L),Math.abs(d-L)<=o?d:L}:function(L){for(var ge=parseFloat(d?L.x:L),Mt=parseFloat(d?L.y:0),er=_bigNum$1,tr=0,ir=e.length,rr,nr;ir--;)d?(rr=e[ir].x-ge,nr=e[ir].y-Mt,rr=rr*rr+nr*nr):rr=Math.abs(e[ir]-ge),rr<er&&(er=rr,tr=ir);return tr=!o||er<=o?e[tr]:L,d||tr===L||_isNumber$1(L)?tr:tr+getUnit(L)}:_roundModifier(e))},random=function t(e,r,s,o){return _conditionalReturn(_isArray(e)?!r:s===!0?!!(s=0):!o,function(){return _isArray(e)?e[~~(Math.random()*e.length)]:(s=s||1e-5)&&(o=s<1?Math.pow(10,(s+"").length-2):1)&&Math.floor(Math.round((e-s/2+Math.random()*(r-e+s*.99))/s)*s*o)/o})},pipe=function t(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return function(o){return r.reduce(function(d,L){return L(d)},o)}},unitize=function t(e,r){return function(s){return e(parseFloat(s))+(r||getUnit(s))}},normalize=function t(e,r,s){return mapRange(e,r,0,1,s)},_wrapArray=function t(e,r,s){return _conditionalReturn(s,function(o){return e[~~r(o)]})},wrap=function t(e,r,s){var o=r-e;return _isArray(e)?_wrapArray(e,t(0,e.length),r):_conditionalReturn(s,function(d){return(o+(d-e)%o)%o+e})},wrapYoyo=function t(e,r,s){var o=r-e,d=o*2;return _isArray(e)?_wrapArray(e,t(0,e.length-1),r):_conditionalReturn(s,function(L){return L=(d+(L-e)%d)%d||0,e+(L>o?d-L:L)})},_replaceRandom=function t(e){for(var r=0,s="",o,d,L,ge;~(o=e.indexOf("random(",r));)L=e.indexOf(")",o),ge=e.charAt(o+7)==="[",d=e.substr(o+7,L-o-7).match(ge?_delimitedValueExp:_strictNumExp),s+=e.substr(r,o-r)+random(ge?d:+d[0],ge?0:+d[1],+d[2]||1e-5),r=L+1;return s+e.substr(r,e.length-r)},mapRange=function t(e,r,s,o,d){var L=r-e,ge=o-s;return _conditionalReturn(d,function(Mt){return s+((Mt-e)/L*ge||0)})},interpolate=function t(e,r,s,o){var d=isNaN(e+r)?0:function(nr){return(1-nr)*e+nr*r};if(!d){var L=_isString$1(e),ge={},Mt,er,tr,ir,rr;if(s===!0&&(o=1)&&(s=null),L)e={p:e},r={p:r};else if(_isArray(e)&&!_isArray(r)){for(tr=[],ir=e.length,rr=ir-2,er=1;er<ir;er++)tr.push(t(e[er-1],e[er]));ir--,d=function(ar){ar*=ir;var sr=Math.min(rr,~~ar);return tr[sr](ar-sr)},s=r}else o||(e=_merge(_isArray(e)?[]:{},e));if(!tr){for(Mt in r)_addPropTween.call(ge,e,Mt,"get",r[Mt]);d=function(ar){return _renderPropTweens(ar,ge)||(L?e.p:e)}}}return _conditionalReturn(s,d)},_getLabelInDirection=function t(e,r,s){var o=e.labels,d=_bigNum$1,L,ge,Mt;for(L in o)ge=o[L]-r,ge<0==!!s&&ge&&d>(ge=Math.abs(ge))&&(Mt=L,d=ge);return Mt},_callback$1=function t(e,r,s){var o=e.vars,d=o[r],L=_context$2,ge=e._ctx,Mt,er,tr;if(d)return Mt=o[r+"Params"],er=o.callbackScope||e,s&&_lazyTweens.length&&_lazyRender(),ge&&(_context$2=ge),tr=Mt?d.apply(er,Mt):d.call(er),_context$2=L,tr},_interrupt=function t(e){return _removeFromParent(e),e.scrollTrigger&&e.scrollTrigger.kill(!!_reverting$1),e.progress()<1&&_callback$1(e,"onInterrupt"),e},_quickTween,_registerPluginQueue=[],_createPlugin=function t(e){if(e)if(e=!e.name&&e.default||e,_windowExists$2()||e.headless){var r=e.name,s=_isFunction$1(e),o=r&&!s&&e.init?function(){this._props=[]}:e,d={init:_emptyFunc,render:_renderPropTweens,add:_addPropTween,kill:_killPropTweensOf,modifier:_addPluginModifier,rawVars:0},L={targetTest:0,get:0,getSetter:_getSetter,aliases:{},register:0};if(_wake(),e!==o){if(_plugins[r])return;_setDefaults$1(o,_setDefaults$1(_copyExcluding(e,d),L)),_merge(o.prototype,_merge(d,_copyExcluding(e,L))),_plugins[o.prop=r]=o,e.targetTest&&(_harnessPlugins.push(o),_reservedProps[r]=1),r=(r==="css"?"CSS":r.charAt(0).toUpperCase()+r.substr(1))+"Plugin"}_addGlobal(r,o),e.register&&e.register(gsap$2,o,PropTween)}else _registerPluginQueue.push(e)},_255=255,_colorLookup={aqua:[0,_255,_255],lime:[0,_255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_255],navy:[0,0,128],white:[_255,_255,_255],olive:[128,128,0],yellow:[_255,_255,0],orange:[_255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_255,0,0],pink:[_255,192,203],cyan:[0,_255,_255],transparent:[_255,_255,_255,0]},_hue=function t(e,r,s){return e+=e<0?1:e>1?-1:0,(e*6<1?r+(s-r)*e*6:e<.5?s:e*3<2?r+(s-r)*(2/3-e)*6:r)*_255+.5|0},splitColor=function t(e,r,s){var o=e?_isNumber$1(e)?[e>>16,e>>8&_255,e&_255]:0:_colorLookup.black,d,L,ge,Mt,er,tr,ir,rr,nr,ar;if(!o){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),_colorLookup[e])o=_colorLookup[e];else if(e.charAt(0)==="#"){if(e.length<6&&(d=e.charAt(1),L=e.charAt(2),ge=e.charAt(3),e="#"+d+d+L+L+ge+ge+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return o=parseInt(e.substr(1,6),16),[o>>16,o>>8&_255,o&_255,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),o=[e>>16,e>>8&_255,e&_255]}else if(e.substr(0,3)==="hsl"){if(o=ar=e.match(_strictNumExp),!r)Mt=+o[0]%360/360,er=+o[1]/100,tr=+o[2]/100,L=tr<=.5?tr*(er+1):tr+er-tr*er,d=tr*2-L,o.length>3&&(o[3]*=1),o[0]=_hue(Mt+1/3,d,L),o[1]=_hue(Mt,d,L),o[2]=_hue(Mt-1/3,d,L);else if(~e.indexOf("="))return o=e.match(_numExp),s&&o.length<4&&(o[3]=1),o}else o=e.match(_strictNumExp)||_colorLookup.transparent;o=o.map(Number)}return r&&!ar&&(d=o[0]/_255,L=o[1]/_255,ge=o[2]/_255,ir=Math.max(d,L,ge),rr=Math.min(d,L,ge),tr=(ir+rr)/2,ir===rr?Mt=er=0:(nr=ir-rr,er=tr>.5?nr/(2-ir-rr):nr/(ir+rr),Mt=ir===d?(L-ge)/nr+(L<ge?6:0):ir===L?(ge-d)/nr+2:(d-L)/nr+4,Mt*=60),o[0]=~~(Mt+.5),o[1]=~~(er*100+.5),o[2]=~~(tr*100+.5)),s&&o.length<4&&(o[3]=1),o},_colorOrderData=function t(e){var r=[],s=[],o=-1;return e.split(_colorExp).forEach(function(d){var L=d.match(_numWithUnitExp)||[];r.push.apply(r,L),s.push(o+=L.length+1)}),r.c=s,r},_formatColors=function t(e,r,s){var o="",d=(e+o).match(_colorExp),L=r?"hsla(":"rgba(",ge=0,Mt,er,tr,ir;if(!d)return e;if(d=d.map(function(rr){return(rr=splitColor(rr,r,1))&&L+(r?rr[0]+","+rr[1]+"
2146%,"+rr[2]+"%,"+rr[3]:rr.join(","))+")"}),s&&(tr=_colorOrderData(e),Mt=s.c,Mt.join(o)!==tr.c.join(o)))for(er=e.replace(_colorExp,"1").split(_numWithUnitExp),ir=er.length-1;ge<ir;ge++)o+=er[ge]+(~Mt.indexOf(ge)?d.shift()||L+"0,0,0,0)":(tr.length?tr:d.length?d:s).shift());if(!er)for(er=e.split(_colorExp),ir=er.length-1;ge<ir;ge++)o+=er[ge]+d[ge];return o+er[ir]},_colorExp=function(){var t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in _colorLookup)t+="|"+e+"\\b";return new RegExp(t+")","gi")}(),_hslExp=/hsl[a]?\(/,_colorStringFilter=function t(e){var r=e.join(" "),s;if(_colorExp.lastIndex=0,_colorExp.test(r))return s=_hslExp.test(r),e[1]=_formatColors(e[1],s),e[0]=_formatColors(e[0],s,_colorOrderData(e[1])),!0},_tickerActive,_ticker=function(){var t=Date.now,e=500,r=33,s=t(),o=s,d=1e3/240,L=d,ge=[],Mt,er,tr,ir,rr,nr,ar=function sr(lr){var cr=t()-o,ur=lr===!0,or,dr,hr,pr;if((cr>e||cr<0)&&(s+=cr-r),o+=cr,hr=o-s,or=hr-L,(or>0||ur)&&(pr=++ir.frame,rr=hr-ir.time*1e3,ir.time=hr=hr/1e3,L+=or+(or>=d?4:d-or),dr=1),ur||(Mt=er(sr)),dr)for(nr=0;nr<ge.length;nr++)ge[nr](hr,rr,pr,lr)};return ir={time:0,frame:0,tick:function(){ar(!0)},deltaRatio:function(lr){return rr/(1e3/(lr||60))},wake:function(){_coreReady&&(!_coreInitted$2&&_windowExists$2()&&(_win$3=_coreInitted$2=window,_doc$3=_win$3.document||{},_globals.gsap=gsap$2,(_win$3.gsapVersions||(_win$3.gsapVersions=[])).push(gsap$2.version),_install(_installScope||_win$3.GreenSockGlobals||!_win$3.gsap&&_win$3||{}),_registerPluginQueue.forEach(_createPlugin)),tr=typeof requestAnimationFrame<"u"&&requestAnimationFrame,Mt&&ir.sleep(),er=tr||function(lr){return setTimeout(lr,L-ir.time*1e3+1|0)},_tickerActive=1,ar(2))},sleep:function(){(tr?cancelAnimationFrame:clearTimeout)(Mt),_tickerActive=0,er=_emptyFunc},lagSmoothing:function(lr,cr){e=lr||1/0,r=Math.min(cr||33,e)},fps:function(lr){d=1e3/(lr||240),L=ir.time*1e3+d},add:function(lr,cr,ur){var or=cr?function(dr,hr,pr,mr){lr(dr,hr,pr,mr),ir.remove(or)}:lr;return ir.remove(lr),ge[ur?"unshift":"push"](or),_wake(),or},remove:function(lr,cr){~(cr=ge.indexOf(lr))&&ge.splice(cr,1)&&nr>=cr&&nr--},_listeners:ge},ir}(),_wake=function t(){return!_tickerActive&&_ticker.wake()},_easeMap={},_customEaseExp=/^[\d.\-M][\d.\-,\s]/,_quotesExp=/["']/g,_parseObjectInString=function t(e){for(var r={},s=e.substr(1,e.length-3).split(":"),o=s[0],d=1,L=s.length,ge,Mt,er;d<L;d++)Mt=s[d],ge=d!==L-1?Mt.lastIndexOf(","):Mt.length,er=Mt.substr(0,ge),r[o]=isNaN(er)?er.replace(_quotesExp,"").trim():+er,o=Mt.substr(ge+1).trim();return r},_valueInParentheses=function t(e){var r=e.indexOf("(")+1,s=e.indexOf(")"),o=e.indexOf("(",r);return e.substring(r,~o&&o<s?e.indexOf(")",s+1):s)},_configEaseFromString=function t(e){var r=(e+"").split("("),s=_easeMap[r[0]];return s&&r.length>1&&s.config?s.config.apply(null,~e.indexOf("{")?[_parseObjectInString(r[1])]:_valueInParentheses(e).split(",").map(_numericIfPossible)):_easeMap._CE&&_customEaseExp.test(e)?_easeMap._CE("",e):s},_invertEase=function t(e){return function(r){return 1-e(1-r)}},_propagateYoyoEase=function t(e,r){for(var s=e._first,o;s;)s instanceof Timeline?t(s,r):s.vars.yoyoEase&&(!s._yoyo||!s._repeat)&&s._yoyo!==r&&(s.timeline?t(s.timeline,r):(o=s._ease,s._ease=s._yEase,s._yEase=o,s._yoyo=r)),s=s._next},_parseEase=function t(e,r){return e&&(_isFunction$1(e)?e:_easeMap[e]||_configEaseFromString(e))||r},_insertEase=function t(e,r,s,o){s===void 0&&(s=function(Mt){return 1-r(1-Mt)}),o===void 0&&(o=function(Mt){return Mt<.5?r(Mt*2)/2:1-r((1-Mt)*2)/2});var d={easeIn:r,easeOut:s,easeInOut:o},L;return _forEachName(e,function(ge){_easeMap[ge]=_globals[ge]=d,_easeMap[L=ge.toLowerCase()]=s;for(var Mt in d)_easeMap[L+(Mt==="easeIn"?".in":Mt==="easeOut"?".out":".inOut")]=_easeMap[ge+"."+Mt]=d[Mt]}),d},_easeInOutFromOut=function t(e){return function(r){return r<.5?(1-e(1-r*2))/2:.5+e((r-.5)*2)/2}},_configElastic=function t(e,r,s){var o=r>=1?r:1,d=(s||(e?.3:.45))/(r<1?r:1),L=d/_2PI*(Math.asin(1/o)||0),ge=function(tr){return tr===1?1:o*Math.pow(2,-10*tr)*_sin((tr-L)*d)+1},Mt=e==="out"?ge:e==="in"?function(er){return 1-ge(1-er)}:_easeInOutFromOut(ge);return d=_2PI/d,Mt.config=function(er,tr){return t(e,er,tr)},Mt},_configBack=function t(e,r){r===void 0&&(r=1.70158);var s=function(L){return L?--L*L*((r+1)*L+r)+1:0},o=e==="out"?s:e==="in"?function(d){return 1-s(1-d)}:_easeInOutFromOut(s);return o.config=function(d){return t(e,d)},o};_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;_insertEase(t+",Power"+(r-1),e?function(s){return Math.pow(s,r)}:function(s){return s},function(s){return 1-Math.pow(1-s,r)},function(s){return s<.5?Math.pow(s*2,r)/2:1-Math.pow((1-s)*2,r)/2})});_easeMap.Linear.easeNone=_easeMap.none=_easeMap.Linear.easeIn;_insertEase("Elastic",_configElastic("in"),_configElastic("out"),_configElastic());(function(t,e){var r=1/e,s=2*r,o=2.5*r,d=function(ge){return ge<r?t*ge*ge:ge<s?t*Math.pow(ge-1.5/e,2)+.75:ge<o?t*(ge-=2.25/e)*ge+.9375:t*Math.pow(ge-2.625/e,2)+.984375};_insertEase("Bounce",function(L){return 1-d(1-L)},d)})(7.5625,2.75);_insertEase("Expo",function(t){return t?Math.pow(2,10*(t-1)):0});_insertEase("Circ",function(t){return-(_sqrt(1-t*t)-1)});_insertEase("Sine",function(t){return t===1?1:-_cos(t*_HALF_PI)+1});_insertEase("Back",_configBack("in"),_configBack("out"),_configBack());_easeMap.SteppedEase=_easeMap.steps=_globals.SteppedEase={config:function t(e,r){e===void 0&&(e=1);var s=1/e,o=e+(r?0:1),d=r?1:0,L=1-_tinyNum;return function(ge){return((o*_clamp$1(0,L,ge)|0)+d)*s}}};_defaults$1.ease=_easeMap["quad.out"];_forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return _callbackNames+=t+","+t+"Param
2146s,"});var GSCache=function t(e,r){this.id=_gsID++,e._gsap=this,this.target=e,this.harness=r,this.get=r?r.get:_getProperty,this.set=r?r.getSetter:_getSetter},Animation=function(){function t(r){this.vars=r,this._delay=+r.delay||0,(this._repeat=r.repeat===1/0?-2:r.repeat||0)&&(this._rDelay=r.repeatDelay||0,this._yoyo=!!r.yoyo||!!r.yoyoEase),this._ts=1,_setDuration(this,+r.duration,1,1),this.data=r.data,_context$2&&(this._ctx=_context$2,_context$2.data.push(this)),_tickerActive||_ticker.wake()}var e=t.prototype;return e.delay=function(s){return s||s===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+s-this._delay),this._delay=s,this):this._delay},e.duration=function(s){return arguments.length?this.totalDuration(this._repeat>0?s+(s+this._rDelay)*this._repeat:s):this.totalDuration()&&this._dur},e.totalDuration=function(s){return arguments.length?(this._dirty=0,_setDuration(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,o){if(_wake(),!arguments.length)return this._tTime;var d=this._dp;if(d&&d.smoothChildTiming&&this._ts){for(_alignPlayhead(this,s),!d._dp||d.parent||_postAddChecks(d,this);d&&d.parent;)d.parent._time!==d._start+(d._ts>=0?d._tTime/d._ts:(d.totalDuration()-d._tTime)/-d._ts)&&d.totalTime(d._tTime,!0),d=d.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&s<this._tDur||this._ts<0&&s>0||!this._tDur&&!s)&&_addToTimeline(this._dp,this,this._start-this._delay)}return(this._tTime!==s||!this._dur&&!o||this._initted&&Math.abs(this._zTime)===_tinyNum||!s&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=s),_lazySafeRender(this,s,o)),this},e.time=function(s,o){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+_elapsedCycleDuration(this))%(this._dur+this._rDelay)||(s?this._dur:0),o):this._time},e.totalProgress=function(s,o){return arguments.length?this.totalTime(this.totalDuration()*s,o):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(s,o){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-s:s)+_elapsedCycleDuration(this),o):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(s,o){var d=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(s-1)*d,o):this._repeat?_animationCycle(this._tTime,d)+1:1},e.timeScale=function(s,o){if(!arguments.length)return this._rts===-_tinyNum?0:this._rts;if(this._rts===s)return this;var d=this.parent&&this._ts?_parentToChildTotalTime(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-_tinyNum?0:this._rts,this.totalTime(_clamp$1(-Math.abs(this._delay),this._tDur,d),o!==!1),_setEnd(this),_recacheAncestors(this)},e.paused=function(s){return arguments.length?(this._ps!==s&&(this._ps=s,s?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(_wake(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==_tinyNum&&(this._tTime-=_tinyNum)))),this):this._ps},e.startTime=function(s){if(arguments.length){this._start=s;var o=this.parent||this._dp;return o&&(o._sort||!this.parent)&&_addToTimeline(o,this,s-this._delay),this}return this._start},e.endTime=function(s){return this._start+(_isNotFalse(s)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(s){var o=this.parent||this._dp;return o?s&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?_parentToChildTotalTime(o.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=_revertConfig);var o=_reverting$1;return _reverting$1=s,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),_reverting$1=o,this},e.globalTime=function(s){for(var o=this,d=arguments.length?s:o.rawTime();o;)d=o._start+d/(Math.abs(o._ts)||1),o=o._dp;return!this.parent&&this._sat?this._sat.globalTime(s):d},e.repeat=function(s){return arguments.length?(this._repeat=s===1/0?-2:s,_onUpdateTotalDuration(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var o=this._time;
vendor: 59,820 bytes, lines 2146-2154
2146return this._rDelay=s,_onUpdateTotalDuration(this),o?this.time(o):this}return this._rDelay},e.yoyo=function(s){return arguments.length?(this._yoyo=s,this):this._yoyo},e.seek=function(s,o){return this.totalTime(_parsePosition$1(this,s),_isNotFalse(o))},e.restart=function(s,o){return this.play().totalTime(s?-this._delay:0,_isNotFalse(o))},e.play=function(s,o){return s!=null&&this.seek(s,o),this.reversed(!1).paused(!1)},e.reverse=function(s,o){return s!=null&&this.seek(s||this.totalDuration(),o),this.reversed(!0).paused(!1)},e.pause=function(s,o){return s!=null&&this.seek(s,o),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(s){return arguments.length?(!!s!==this.reversed()&&this.timeScale(-this._rts||(s?-_tinyNum:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-_tinyNum,this},e.isActive=function(){var s=this.parent||this._dp,o=this._start,d;return!!(!s||this._ts&&this._initted&&s.isActive()&&(d=s.rawTime(!0))>=o&&d<this.endTime(!0)-_tinyNum)},e.eventCallback=function(s,o,d){var L=this.vars;return arguments.length>1?(o?(L[s]=o,d&&(L[s+"Params"]=d),s==="onUpdate"&&(this._onUpdate=o)):delete L[s],this):L[s]},e.then=function(s){var o=this;return new Promise(function(d){var L=_isFunction$1(s)?s:_passThrough$1,ge=function(){var er=o.then;o.then=null,_isFunction$1(L)&&(L=L(o))&&(L.then||L===o)&&(o.then=er),d(L),o.then=er};o._initted&&o.totalProgress()===1&&o._ts>=0||!o._tTime&&o._ts<0?ge():o._prom=ge})},e.kill=function(){_interrupt(this)},t}();_setDefaults$1(Animation.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:-_tinyNum,_prom:0,_ps:!1,_rts:1});var Timeline=function(t){_inheritsLoose(e,t);function e(s,o){var d;return s===void 0&&(s={}),d=t.call(this,s)||this,d.labels={},d.smoothChildTiming=!!s.smoothChildTiming,d.autoRemoveChildren=!!s.autoRemoveChildren,d._sort=_isNotFalse(s.sortChildren),_globalTimeline&&_addToTimeline(s.parent||_globalTimeline,_assertThisInitialized(d),o),s.reversed&&d.reverse(),s.paused&&d.paused(!0),s.scrollTrigger&&_scrollTrigger(_assertThisInitialized(d),s.scrollTrigger),d}var r=e.prototype;return r.to=function(o,d,L){return _createTweenType(0,arguments,this),this},r.from=function(o,d,L){return _createTweenType(1,arguments,this),this},r.fromTo=function(o,d,L,ge){return _createTweenType(2,arguments,this),this},r.set=function(o,d,L){return d.duration=0,d.parent=this,_inheritDefaults(d).repeatDelay||(d.repeat=0),d.immediateRender=!!d.immediateRender,new Tween(o,d,_parsePosition$1(this,L),1),this},r.call=function(o,d,L){return _addToTimeline(this,Tween.delayedCall(0,o,d),L)},r.staggerTo=function(o,d,L,ge,Mt,er,tr){return L.duration=d,L.stagger=L.stagger||ge,L.onComplete=er,L.onCompleteParams=tr,L.parent=this,new Tween(o,L,_parsePosition$1(this,Mt)),this},r.staggerFrom=function(o,d,L,ge,Mt,er,tr){return L.runBackwards=1,_inheritDefaults(L).immediateRender=_isNotFalse(L.immediateRender),this.staggerTo(o,d,L,ge,Mt,er,tr)},r.staggerFromTo=function(o,d,L,ge,Mt,er,tr,ir){return ge.startAt=L,_inheritDefaults(ge).immediateRender=_isNotFalse(ge.immediateRender),this.staggerTo(o,d,ge,Mt,er,tr,ir)},r.render=function(o,d,L){var ge=this._time,Mt=this._dirty?this.totalDuration():this._tDur,er=this._dur,tr=o<=0?0:_roundPrecise(o),ir=this._zTime<0!=o<0&&(this._initted||!er),rr,nr,ar,sr,lr,cr,ur,or,dr,hr,pr,mr;if(this!==_globalTimeline&&tr>Mt&&o>=0&&(tr=Mt),tr!==this._tTime||L||ir){if(ge!==this._time&&er&&(tr+=this._time-ge,o+=this._time-ge),rr=tr,dr=this._start,or=this._ts,cr=!or,ir&&(er||(ge=this._zTime),(o||!d)&&(this._zTime=o)),this._repeat){if(pr=this._yoyo,lr=er+this._rDelay,this._repeat<-1&&o<0)return this.totalTime(lr*100+o,d,L);if(rr=_roundPrecise(tr%lr),tr===Mt?(sr=this._repeat,rr=er):(sr=~~(tr/lr),sr&&sr===tr/lr&&(rr=er,sr--),rr>er&&(rr=er)),hr=_animationCycle(this._tTime,lr),!ge&&this._tTime&&hr!==sr&&this._tTime-hr*lr-this._dur<=0&&(hr=sr),pr&&sr&1&&(rr=er-rr,mr=1),sr!==hr&&!this._lock){var vr=pr&&hr&1,Er=vr===(pr&&sr&1);if(sr<hr&&(vr=!vr),ge=vr?0:tr%er?er:tr,this._lock=1,this.render(ge||(mr?0:_roundPrecise(sr*lr)),d,!er)._lock=0,this._tTime=tr,!d&&this.parent&&_callback$1(this,"onRepeat"),this.vars.repeatRefresh&&!mr&&(this.invalidate()._lock=1),ge&&ge!==this._time||cr!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(er=this._dur,Mt=this._tDur,Er&&(this._lock=2,ge=vr?er:-1e-4,this.render(ge,!0),this.vars.repeatRefresh&&!mr&&this.invalidate()),this._lock=0,!this._ts&&!cr)return this;_propagateYoyoEase(this,mr)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(ur=_findNextPauseTween(this,_roundPrecise(ge),_roundPrecise(rr)),ur&&(tr-=rr-(rr=ur._start))),this._tTime=tr,this._time=rr,this._act=!or,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=o,ge=0),!ge&&rr&&!d&&!sr&&(_callback$1(this,"onStart"),this._tTime!==tr))return this;if(rr>=ge&&o>=0)for(nr=this._first;nr;){if(ar=nr._next,(nr._act||rr>=nr._start)&&nr._ts&&ur!==nr){if(nr.parent!==this)return this.render(o,d,L);if(nr.render(nr._ts>0?(rr-nr._start)*nr._ts:(nr._dirty?nr.totalDuration():nr._tDur)+(rr-nr._start)*nr._ts,d,L),rr!==this._time||!this._ts&&!cr){ur=0,ar&&(tr+=this._zTime=-_tinyNum);break}}nr=ar}else{nr=this._last;for(var Cr=o<0?o:rr;nr;){if(ar=nr._prev,(nr._act||Cr<=nr._end)&&nr._ts&&ur!==nr){if(nr.parent!==this)return this.render(o,d,L);if(nr.render(nr._ts>0?(Cr-nr._start)*nr._ts:(nr._dirty?nr.totalDuration():nr._tDur)+(Cr-nr._start)*nr._ts,d,L||_reverting$1&&(nr._initted||nr._startAt)),rr!==this._time||!this._ts&&!cr){ur=0,ar&&(tr+=this._zTime=Cr?-_tinyNum:_tinyNum);break}}nr=ar}}if(ur&&!d&&(this.pause(),ur.render(rr>=ge?0:-_tinyNum)._zTime=rr>=ge?1:-1,this._ts))return this._start=dr,_setEnd(this),this.render(o,d,L);this._onUpdate&&!d&&_callback$1(this,"onUpdate",!0),(tr===Mt&&this._tTime>=this.totalDuration()||!tr&&ge)&&(dr===this._start||Math.abs(or)!==Math.abs(this._ts))&&(this._lock||((o||!er)&&(tr===Mt&&this._ts>0||!tr&&this._ts<0)&&_removeFromParent(this,1),!d&&!(o<0&&!ge)&&(tr||ge||!Mt)&&(_callback$1(this,tr===Mt&&o>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(tr<Mt&&this.timeScale()>0)&&this._prom())))}return this},r.add=function(o,d){var L=this;if(_isNumber$1(d)||(d=_parsePosition$1(this,d,o)),!(o instanceof Animation)){if(_isArray(o))return o.forEach(function(ge){return L.add(ge,d)}),this;if(_isString$1(o))return this.addLabel(o,d);if(_isFunction$1(o))o=Tween.delayedCall(0,o);else return this}return this!==o?_addToTimeline(this,o,d):this},r.getChildren=function(o,d,L,ge){o===void 0&&(o=!0),d===void 0&&(d=!0),L===void 0&&(L=!0),ge===void 0&&(ge=-_bigNum$1);for(var Mt=[],er=this._first;er;)er._start>=ge&&(er instanceof Tween?d&&Mt.push(er):(L&&Mt.push(er),o&&Mt.push.apply(Mt,er.getChildren(!0,d,L)))),er=er._next;return Mt},r.getById=function(o){for(var d=this.getChildren(1,1,1),L=d.length;L--;)if(d[L].vars.id===o)return d[L]},r.remove=function(o){return _isString$1(o)?this.removeLabel(o):_isFunction$1(o)?this.killTweensOf(o):(_removeLinkedListItem(this,o),o===this._recent&&(this._recent=this._last),_uncache(this))},r.totalTime=function(o,d){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_roundPrecise(_ticker.time-(this._ts>0?o/this._ts:(this.totalDuration()-o)/-this._ts))),t.prototype.totalTime.call(this,o,d),this._forcing=0,this):this._tTime},r.addLabel=function(o,d){return this.labels[o]=_parsePosition$1(this,d),this},r.removeLabel=function(o){return delete this.labels[o],this},r.addPause=function(o,d,L){var ge=Tween.delayedCall(0,d||_emptyFunc,L);return ge.data="isPause",this._hasPause=1,_addToTimeline(this,ge,_parsePosition$1(this,o))},r.removePause=function(o){var d=this._first;for(o=_parsePosition$1(this,o);d;)d._start===o&&d.data==="isPause"&&_removeFromParent(d),d=d._next},r.killTweensOf=function(o,d,L){for(var ge=this.getTweensOf(o,L),Mt=ge.length;Mt--;)_overwritingTween!==ge[Mt]&&ge[Mt].kill(o,d);return this},r.getTweensOf=function(o,d){for(var L=[],ge=toArray(o),Mt=this._first,er=_isNumber$1(d),tr;Mt;)Mt instanceof Tween?_arrayContainsAny(Mt._targets,ge)&&(er?(!_overwritingTween||Mt._initted&&Mt._ts)&&Mt.globalTime(0)<=d&&Mt.globalTime(Mt.totalDuration())>d:!d||Mt.isActive())&&L.push(Mt):(tr=Mt.getTweensOf(ge,d)).length&&L.push.apply(L,tr),Mt=Mt._next;return L},r.tweenTo=function(o,d){d=d||{};var L=this,ge=_parsePosition$1(L,o),Mt=d,er=Mt.startAt,tr=Mt.onStart,ir=Mt.onStartParams,rr=Mt.immediateRender,nr,ar=Tween.to(L,_setDefaults$1({ease:d.ease||"none",lazy:!1,immediateRender:!1,time:ge,overwrite:"auto",duration:d.duration||Math.abs((ge-(er&&"time"in er?er.time:L._time))/L.timeScale())||_tinyNum,onStart:function(){if(L.pause(),!nr){var lr=d.duration||Math.abs((ge-(er&&"time"in er?er.time:L._time))/L.timeScale());ar._dur!==lr&&_setDuration(ar,lr,0,1).render(ar._time,!0,!0),nr=1}tr&&tr.apply(ar,ir||[])}},d));return rr?ar.render(0):ar},r.tweenFromTo=function(o,d,L){return this.tweenTo(d,_setDefaults$1({startAt:{time:_parsePosition$1(this,o)}},L))},r.recent=function(){return this._recent},r.nextLabel=function(o){return o===void 0&&(o=this._time),_getLabelInDirection(this,_parsePosition$1(this,o))},r.previousLabel=function(o){return o===void 0&&(o=this._time),_getLabelInDirection(this,_parsePosition$1(this,o),1)},r.currentLabel=function(o){return arguments.length?this.seek(o,!0):this.previousLabel(this._time+_tinyNum)},r.shiftChildren=function(o,d,L){L===void 0&&(L=0);for(var ge=this._first,Mt=this.labels,er;ge;)ge._start>=L&&(ge._start+=o,ge._end+=o),ge=ge._next;if(d)for(er in Mt)Mt[er]>=L&&(Mt[er]+=o);return _uncache(this)},r.invalidate=function(o){var d=this._first;for(this._lock=0;d;)d.invalidate(o),d=d._next;return t.prototype.invalidate.call(this,o)},r.clear=function(o){o===void 0&&(o=!0);for(var d=this._first,L;d;)L=d._next,this.remove(d),d=L;return this._dp&&(this._time=this._tTime=this._pTime=0),o&&(this.labels={}),_uncache(this)},r.totalDuration=function(o){var d=0,L=this,ge=L._last,Mt=_bigNum$1,er,tr,ir;if(arguments.length)return L.timeScale((L._repeat<0?L.duration():L.totalDuration())/(L.reversed()?-o:o));if(L._dirty){for(ir=L.parent;ge;)er=ge._prev,ge._dirty&&ge.totalDuration(),tr=ge._start,tr>Mt&&L._sort&&ge._ts&&!L._lock?(L._lock=1,_addToTimeline(L,ge,tr-ge._delay,1)._lock=0):Mt=tr,tr<0&&ge._ts&&(d-=tr,(!ir&&!L._dp||ir&&ir.smoothChildTiming)&&(L._start+=tr/L._ts,L._time-=tr,L._tTime-=tr),L.shiftChildren(-tr,!1,-1/0),Mt=0),ge._end>d&&ge._ts&&(d=ge._end),ge=er;_setDuration(L,L===_globalTimeline&&L._time>d?L._time:d,1,1),L._dirty=0}return L._tDur},e.updateRoot=function(o){if(_globalTimeline._ts&&(_lazySafeRender(_globalTimeline,_parentToChildTotalTime(o,_globalTimeline)),_lastRenderedFrame=_ticker.frame),_ticker.frame>=_nextGCFrame){_nextGCFrame+=_config.autoSleep||120;var d=_globalTimeline._first;if((!d||!d._ts)&&_config.autoSleep&&_ticker._listeners.length<2){for(;d&&!d._ts;)d=d._next;d||_ticker.sleep()}}},e}(Animation);_setDefaults$1(Timeline.prototype,{_lock:0,_hasPause:0,_forcing:0});var _addComplexStringPropTween=function t(e,r,s,o,d,L,ge){var Mt=new PropTween(this._pt,e,r,0,1,_renderComplexString,null,d),er=0,tr=0,ir,rr,nr,ar,sr,lr,cr,ur;for(Mt.b=s,Mt.e=o,s+="",o+="",(cr=~o.indexOf("random("))&&(o=_replaceRandom(o)),L&&(ur=[s,o],L(ur,e,r),s=ur[0],o=ur[1]),rr=s.match(_complexStringNumExp)||[];ir=_complexStringNumExp.exec(o);)ar=ir[0],sr=o.substring(er,ir.index),nr?nr=(nr+1)%5:sr.substr(-5)==="rgba("&&(nr=1),ar!==rr[tr++]&&(lr=parseFloat(rr[tr-1])||0,Mt._pt={_next:Mt._pt,p:sr||tr===1?sr:",",s:lr,c:ar.charAt(1)==="="?_parseRelative(lr,ar)-lr:parseFloat(ar)-lr,m:nr&&nr<4?Math.round:0},er=_complexStringNumExp.lastIndex);return Mt.c=er<o.length?o.substring(er,o.length):"",Mt.fp=ge,(_relExp.test(o)||cr)&&(Mt.e=0),this._pt=Mt,Mt},_addPropTween=function t(e,r,s,o,d,L,ge,Mt,er,tr){_isFunction$1(o)&&(o=o(d||0,e,L));var ir=e[r],rr=s!=="get"?s:_isFunction$1(ir)?er?e[r.indexOf("set")||!_isFunction$1(e["get"+r.substr(3)])?r:"get"+r.substr(3)](er):e[r]():ir,nr=_isFunction$1(ir)?er?_setterFuncWithParam:_setterFunc:_setterPlain,ar;if(_isString$1(o)&&(~o.indexOf("random(")&&(o=_replaceRandom(o)),o.charAt(1)==="="&&(ar=_parseRelative(rr,o)+(getUnit(rr)||0),(ar||ar===0)&&(o=ar))),!tr||rr!==o||_forceAllPropTweens)return!isNaN(rr*o)&&o!==""?(ar=new PropTween(this._pt,e,r,+rr||0,o-(rr||0),typeof ir=="boolean"?_renderBoolean:_renderPlain,0,nr),er&&(ar.fp=er),ge&&ar.modifier(ge,this,e),this._pt=ar):(!ir&&!(r in e)&&_missingPlugin(r,o),_addComplexStringPropTween.call(this,e,r,rr,o,nr,Mt||_config.stringFilter,er))},_processVars=function t(e,r,s,o,d){if(_isFunction$1(e)&&(e=_parseFuncOrString(e,d,r,s,o)),!_isObject$1(e)||e.style&&e.nodeType||_isArray(e)||_isTypedArray(e))return _isString$1(e)?_parseFuncOrString(e,d,r,s,o):e;var L={},ge;for(ge in e)L[ge]=_parseFuncOrString(e[ge],d,r,s,o);return L},_checkPlugin=function t(e,r,s,o,d,L){var ge,Mt,er,tr;if(_plugins[e]&&(ge=new _plugins[e]).init(d,ge.rawVars?r[e]:_processVars(r[e],o,d,L,s),s,o,L)!==!1&&(s._pt=Mt=new PropTween(s._pt,d,e,0,1,ge.render,ge,0,ge.priority),s!==_quickTween))for(er=s._ptLookup[s._targets.indexOf(d)],tr=ge._props.length;tr--;)er[ge._props[tr]]=Mt;return ge},_overwritingTween,_forceAllPropTweens,_initTween=function t(e,r,s){var o=e.vars,d=o.ease,L=o.startAt,ge=o.immediateRender,Mt=o.lazy,er=o.onUpdate,tr=o.runBackwards,ir=o.yoyoEase,rr=o.keyframes,nr=o.autoRevert,ar=e._dur,sr=e._startAt,lr=e._targets,cr=e.parent,ur=cr&&cr.data==="nested"?cr.vars.targets:lr,or=e._overwrite==="auto"&&!_suppressOverwrites$1,dr=e.timeline,hr,pr,mr,vr,Er,Cr,Pr,kr,Mr,Ur,$r,yr,xr;if(dr&&(!rr||!d)&&(d="none"),e._ease=_parseEase(d,_defaults$1.ease),e._yEase=ir?_invertEase(_parseEase(ir===!0?d:ir,_defaults$1.ease)):0,ir&&e._yoyo&&!e._repeat&&(ir=e._yEase,e._yEase=e._ease,e._ease=ir),e._from=!dr&&!!o.runBackwards,!dr||rr&&!o.stagger){if(kr=lr[0]?_getCache(lr[0]).harness:0,yr=kr&&o[kr.prop],hr=_copyExcluding(o,_reservedProps),sr&&(sr._zTime<0&&sr.progress(1),r<0&&tr&&ge&&!nr?sr.render(-1,!0):sr.revert(tr&&ar?_revertConfigNoKill:_startAtRevertConfig),sr._lazy=0),L){if(_removeFromParent(e._startAt=Tween.set(lr,_setDefaults$1({data:"isStart",overwrite:!1,parent:cr,immediateRender:!0,lazy:!sr&&_isNotFalse(Mt),startAt:null,delay:0,onUpdate:er&&function(){return _callback$1(e,"onUpdate")},stagger:0},L))),e._startAt._dp=0,e._startAt._sat=e,r<0&&(_reverting$1||!ge&&!nr)&&e._startAt.revert(_revertConfigNoKill),ge&&ar&&r<=0&&s<=0){r&&(e._zTime=r);return}}else if(tr&&ar&&!sr){if(r&&(ge=!1),mr=_setDefaults$1({overwrite:!1,data:"isFromStart",lazy:ge&&!sr&&_isNotFalse(Mt),immediateRender:ge,stagger:0,parent:cr},hr),yr&&(mr[kr.prop]=yr),_removeFromParent(e._startAt=Tween.set(lr,mr)),e._startAt._dp=0,e._startAt._sat=e,r<0&&(_reverting$1?e._startAt.revert(_revertConfigNoKill):e._startAt.render(-1,!0)),e._zTime=r,!ge)t(e._startAt,_tinyNum,_tinyNum);else if(!r)return}for(e._pt=e._ptCache=0,Mt=ar&&_isNotFalse(Mt)||Mt&&!ar,pr=0;pr<lr.length;pr++){if(Er=lr[pr],Pr=Er._gsap||_harness(lr)[pr]._gsap,e._ptLookup[pr]=Ur={},_lazyLookup[Pr.id]&&_lazyTweens.length&&_lazyRender(),$r=ur===lr?pr:ur.indexOf(Er),kr&&(Mr=new kr).init(Er,yr||hr,e,$r,ur)!==!1&&(e._pt=vr=new PropTween(e._pt,Er,Mr.name,0,1,Mr.render,Mr,0,Mr.priority),Mr._props.forEach(function(gr){Ur[gr]=vr}),Mr.priority&&(Cr=1)),!kr||yr)for(mr in hr)_plugins[mr]&&(Mr=_checkPlugin(mr,hr,e,$r,Er,ur))?Mr.priority&&(Cr=1):Ur[mr]=vr=_addPropTween.call(e,Er,mr,"get",hr[mr],$r,ur,0,o.stringFilter);e._op&&e._op[pr]&&e.kill(Er,e._op[pr]),or&&e._pt&&(_overwritingTween=e,_globalTimeline.killTweensOf(Er,Ur,e.globalTime(r)),xr=!e.parent,_overwritingTween=0),e._pt&&Mt&&(_lazyLookup[Pr.id]=1)}Cr&&_sortPropTweensByPriority(e),e._onInit&&e._onInit(e)}e._onUpdate=er,e._initted=(!e._op||e._pt)&&!xr,rr&&r<=0&&dr.render(_bigNum$1,!0,!0)},_updatePropTweens=function t(e,r,s,o,d,L,ge,Mt){var er=(e._pt&&e._ptCache||(e._ptCache={}))[r],tr,ir,rr,nr;if(!er)for(er=e._ptCache[r]=[],rr=e._ptLookup,nr=e._targets.length;nr--;){if(tr=rr[nr][r],tr&&tr.d&&tr.d._pt)for(tr=tr.d._pt;tr&&tr.p!==r&&tr.fp!==r;)tr=tr._next;if(!tr)return _forceAllPropTweens=1,e.vars[r]="+=0",_initTween(e,ge),_forceAllPropTweens=0,Mt?_warn(r+" not eligible for reset"):1;er.push(tr)}for(nr=er.length;nr--;)ir=er[nr],tr=ir._pt||ir,tr.s=(o||o===0)&&!d?o:tr.s+(o||0)+L*tr.c,tr.c=s-tr.s,ir.e&&(ir.e=_round$1(s)+getUnit(ir.e)),ir.b&&(ir.b=tr.s+getUnit(ir.b))},_addAliasesToVars=function t(e,r){var s=e[0]?_getCache(e[0]).harness:0,o=s&&s.aliases,d,L,ge,Mt;if(!o)return r;d=_merge({},r);for(L in o)if(L in d)for(Mt=o[L].split(","),ge=Mt.length;ge--;)d[Mt[ge]]=d[L];return d},_parseKeyframe=function t(e,r,s,o){var d=r.ease||o||"power1.inOut",L,ge;if(_isArray(r))ge=s[e]||(s[e]=[]),r.forEach(function(Mt,er){return ge.push({t:er/(r.length-1)*100,v:Mt,e:d})});else for(L in r)ge=s[L]||(s[L]=[]),L==="ease"||ge.push({t:parseFloat(e),v:r[L],e:d})},_parseFuncOrString=function t(e,r,s,o,d){return _isFunction$1(e)?e.call(r,s,o,d):_isString$1(e)&&~e.indexOf("random(")?_replaceRandom(e):e},_staggerTweenProps=_callbackNames+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",_staggerPropsToSkip={};_forEachName(_staggerTweenProps+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return _staggerPropsToSkip[t]=1});var Tween=function(t){_inheritsLoose(e,t);function e(s,o,d,L){var ge;typeof o=="number"&&(d.duration=o,o=d,d=null),ge=t.call(this,L?o:_inheritDefaults(o))||this;var Mt=ge.vars,er=Mt.duration,tr=Mt.delay,ir=Mt.immediateRender,rr=Mt.stagger,nr=Mt.overwrite,ar=Mt.keyframes,sr=Mt.defaults,lr=Mt.scrollTrigger,cr=Mt.yoyoEase,ur=o.parent||_globalTimeline,or=(_isArray(s)||_isTypedArray(s)?_isNumber$1(s[0]):"length"in o)?[s]:toArray(s),dr,hr,pr,mr,vr,Er,Cr,Pr;if(ge._targets=or.length?_harness(or):_warn("GSAP target "+s+" not found. https://gsap.com",!_config.nullTargetWarn)||[],ge._ptLookup=[],ge._overwrite=nr,ar||rr||_isFuncOrString(er)||_isFuncOrString(tr)){if(o=ge.vars,dr=ge.timeline=new Timeline({data:"nested",defaults:sr||{},targets:ur&&ur.data==="nested"?ur.vars.targets:or}),dr.kill(),dr.parent=dr._dp=_assertThisInitialized(ge),dr._start=0,rr||_isFuncOrString(er)||_isFuncOrString(tr)){if(mr=or.length,Cr=rr&&distribute(rr),_isObject$1(rr))for(vr in rr)~_staggerTweenProps.indexOf(vr)&&(Pr||(Pr={}),Pr[vr]=rr[vr]);for(hr=0;hr<mr;hr++)pr=_copyExcluding(o,_staggerPropsToSkip),pr.stagger=0,cr&&(pr.yoyoEase=cr),Pr&&_merge(pr,Pr),Er=or[hr],pr.duration=+_parseFuncOrString(er,_assertThisInitialized(ge),hr,Er,or),pr.delay=(+_parseFuncOrString(tr,_assertThisInitialized(ge),hr,Er,or)||0)-ge._delay,!rr&&mr===1&&pr.delay&&(ge._delay=tr=pr.delay,ge._start+=tr,pr.delay=0),dr.to(Er,pr,Cr?Cr(hr,Er,or):0),dr._ease=_easeMap.none;dr.duration()?er=tr=0:ge.timeline=0}else if(ar){_inheritDefaults(_setDefaults$1(dr.vars.defaults,{ease:"none"})),dr._ease=_parseEase(ar.ease||o.ease||"none");var kr=0,Mr,Ur,$r;if(_isArray(ar))ar.forEach(function(yr){return dr.to(or,yr,">")}),dr.duration();else{pr={};for(vr in ar)vr==="ease"||vr==="easeEach"||_parseKeyframe(vr,ar[vr],pr,ar.easeEach);for(vr in pr)for(Mr=pr[vr].sort(function(yr,xr){return yr.t-xr.t}),kr=0,hr=0;hr<Mr.length;hr++)Ur=Mr[hr],$r={ease:Ur.e,duration:(Ur.t-(hr?Mr[hr-1].t:0))/100*er},$r[vr]=Ur.v,dr.to(or,$r,kr),kr+=$r.duration;dr.duration()<er&&dr.to({},{duration:er-dr.duration()})}}er||ge.duration(er=dr.duration())}else ge.timeline=0;return nr===!0&&!_suppressOverwrites$1&&(_overwritingTween=_assertThisInitialized(ge),_globalTimeline.killTweensOf(or),_overwritingTween=0),_addToTimeline(ur,_assertThisInitialized(ge),d),o.reversed&&ge.reverse(),o.paused&&ge.paused(!0),(ir||!er&&!ar&&ge._start===_roundPrecise(ur._time)&&_isNotFalse(ir)&&_hasNoPausedAncestors(_assertThisInitialized(ge))&&ur.data!=="nested")&&(ge._tTime=-_tinyNum,ge.render(Math.max(0,-tr)||0)),lr&&_scrollTrigger(_assertThisInitialized(ge),lr),ge}var r=e.prototype;return r.render=function(o,d,L){var ge=this._time,Mt=this._tDur,er=this._dur,tr=o<0,ir=o>Mt-_tinyNum&&!tr?Mt:o<_tinyNum?0:o,rr,nr,ar,sr,lr,cr,ur,or,dr;if(!er)_renderZeroDurationTween(this,o,d,L);else if(ir!==this._tTime||!o||L||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==tr){if(rr=ir,or=this.timeline,this._repeat){if(sr=er+this._rDelay,this._repeat<-1&&tr)return this.totalTime(sr*100+o,d,L);if(rr=_roundPrecise(ir%sr),ir===Mt?(ar=this._repeat,rr=er):(ar=~~(ir/sr),ar&&ar===_roundPrecise(ir/sr)&&(rr=er,ar--),rr>er&&(rr=er)),cr=this._yoyo&&ar&1,cr&&(dr=this._yEase,rr=er-rr),lr=_animationCycle(this._tTime,sr),rr===ge&&!L&&this._initted&&ar===lr)return this._tTime=ir,this;ar!==lr&&(or&&this._yEase&&_propagateYoyoEase(or,cr),this.vars.repeatRefresh&&!cr&&!this._lock&&this._time!==sr&&this._initted&&(this._lock=L=1,this.render(_roundPrecise(sr*ar),!0).invalidate()._lock=0))}if(!this._initted){if(_attemptInitTween(this,tr?o:rr,L,d,ir))return this._tTime=0,this;if(ge!==this._time&&!(L&&this.vars.repeatRefresh&&ar!==lr))return this;if(er!==this._dur)return this.render(o,d,L)}if(this._tTime=ir,this._time=rr,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=ur=(dr||this._ease)(rr/er),this._from&&(this.ratio=ur=1-ur),rr&&!ge&&!d&&!ar&&(_callback$1(this,"onStart"),this._tTime!==ir))return this;for(nr=this._pt;nr;)nr.r(ur,nr.d),nr=nr._next;or&&or.render(o<0?o:or._dur*or._ease(rr/this._dur),d,L)||this._startAt&&(this._zTime=o),this._onUpdate&&!d&&(tr&&_rewindStartAt(this,o,d,L),_callback$1(this,"onUpdate")),this._repeat&&ar!==lr&&this.vars.onRepeat&&!d&&this.parent&&_callback$1(this,"onRepeat"),(ir===this._tDur||!ir)&&this._tTime===ir&&(tr&&!this._onUpdate&&_rewindStartAt(this,o,!0,!0),(o||!er)&&(ir===this._tDur&&this._ts>0||!ir&&this._ts<0)&&_removeFromParent(this,1),!d&&!(tr&&!ge)&&(ir||ge||cr)&&(_callback$1(this,ir===Mt?"onComplete":"onReverseComplete",!0),this._prom&&!(ir<Mt&&this.timeScale()>0)&&this._prom()))}return this},r.targets=function(){return this._targets},r.invalidate=function(o){return(!o||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(o),t.prototype.invalidate.call(this,o)},r.resetTo=function(o,d,L,ge,Mt){_tickerActive||_ticker.wake(),this._ts||this.play();var er=Math.min(this._dur,(this._dp._time-this._start)*this._ts),tr;return this._initted||_initTween(this,er),tr=this._ease(er/this._dur),_updatePropTweens(this,o,d,L,ge,tr,er,Mt)?this.resetTo(o,d,L,ge,1):(_alignPlayhead(this,0),this.parent||_addLinkedListItem(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},r.kill=function(o,d){if(d===void 0&&(d="all"),!o&&(!d||d==="all"))return this._lazy=this._pt=0,this.parent?_interrupt(this):this;if(this.timeline){var L=this.timeline.totalDuration();return this.timeline.killTweensOf(o,d,_overwritingTween&&_overwritingTween.vars.overwrite!==!0)._first||_interrupt(this),this.parent&&L!==this.timeline.totalDuration()&&_setDuration(this,this._dur*this.timeline._tDur/L,0,1),this}var ge=this._targets,Mt=o?toArray(o):ge,er=this._ptLookup,tr=this._pt,ir,rr,nr,ar,sr,lr,cr;if((!d||d==="all")&&_arraysMatch(ge,Mt))return d==="all"&&(this._pt=0),_interrupt(this);for(ir=this._op=this._op||[],d!=="all"&&(_isString$1(d)&&(sr={},_forEachName(d,function(ur){return sr[ur]=1}),d=sr),d=_addAliasesToVars(ge,d)),cr=ge.length;cr--;)if(~Mt.indexOf(ge[cr])){rr=er[cr],d==="all"?(ir[cr]=d,ar=rr,nr={}):(nr=ir[cr]=ir[cr]||{},ar=d);for(sr in ar)lr=rr&&rr[sr],lr&&((!("kill"in lr.d)||lr.d.kill(sr)===!0)&&_removeLinkedListItem(this,lr,"_pt"),delete rr[sr]),nr!=="all"&&(nr[sr]=1)}return this._initted&&!this._pt&&tr&&_interrupt(this),this},e.to=function(o,d){return new e(o,d,arguments[2])},e.from=function(o,d){return _createTweenType(1,arguments)},e.delayedCall=function(o,d,L,ge){return new e(d,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:o,onComplete:d,onReverseComplete:d,onCompleteParams:L,onReverseCompleteParams:L,callbackScope:ge})},e.fromTo=function(o,d,L){return _createTweenType(2,arguments)},e.set=function(o,d){return d.duration=0,d.repeatDelay||(d.repeat=0),new e(o,d)},e.killTweensOf=function(o,d,L){return _globalTimeline.killTweensOf(o,d,L)},e}(Animation);_setDefaults$1(Tween.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});_forEachName("staggerTo,staggerFrom,staggerFromTo",function(t){Tween[t]=function(){var e=new Timeline,r=_slice.call(arguments,0);return r.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,r)}});var _setterPlain=function t(e,r,s){return e[r]=s},_setterFunc=function t(e,r,s){return e[r](s)},_setterFuncWithParam=function t(e,r,s,o){return e[r](o.fp,s)},_setterAttribute=function t(e,r,s){return e.setAttribute(r,s)},_getSetter=function t(e,r){return _isFunction$1(e[r])?_setterFunc:_isUndefined(e[r])&&e.setAttribute?_setterAttribute:_setterPlain},_renderPlain=function t(e,r){return r.set(r.t,r.p,Math.round((r.s+r.c*e)*1e6)/1e6,r)},_renderBoolean=function t(e,r){return r.set(r.t,r.p,!!(r.s+r.c*e),r)},_renderComplexString=function t(e,r){var s=r._pt,o="";if(!e&&r.b)o=r.b;else if(e===1&&r.e)o=r.e;else{for(;s;)o=s.p+(s.m?s.m(s.s+s.c*e):Math.round((s.s+s.c*e)*1e4)/1e4)+o,s=s._next;o+=r.c}r.set(r.t,r.p,o,r)},_renderPropTweens=function t(e,r){for(var s=r._pt;s;)s.r(e,s.d),s=s._next},_addPluginModifier=function t(e,r,s,o){for(var d=this._pt,L;d;)L=d._next,d.p===o&&d.modifier(e,r,s),d=L},_killPropTweensOf=function t(e){for(var r=this._pt,s,o;r;)o=r._next,r.p===e&&!r.op||r.op===e?_removeLinkedListItem(this,r,"_pt"):r.dep||(s=1),r=o;return!s},_setterWithModifier=function t(e,r,s,o){o.mSet(e,r,o.m.call(o.tween,s,o.mt),o)},_sortPropTweensByPriority=function t(e){for(var r=e._pt,s,o,d,L;r;){for(s=r._next,o=d;o&&o.pr>r.pr;)o=o._next;(r._prev=o?o._prev:L)?r._prev._next=r:d=r,(r._next=o)?o._prev=r:L=r,r=s}e._pt=d},PropTween=function(){function t(r,s,o,d,L,ge,Mt,er,tr){this.t=s,this.s=d,this.c=L,this.p=o,this.r=ge||_renderPlain,this.d=Mt||this,this.set=er||_setterPlain,this.pr=tr||0,this._next=r,r&&(r._prev=this)}var e=t.prototype;return e.modifier=function(s,o,d){this.mSet=this.mSet||this.set,this.set=_setterWithModifier,this.m=s,this.mt=d,this.tween=o},t}();_forEachName(_callbackNames+"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(t){return _reservedProps[t]=1});_globals.TweenMax=_globals.TweenLite=Tween;_globals.TimelineLite=_globals.TimelineMax=Timeline;_globalTimeline=new Timeline({sortChildren:!1,defaults:_defaults$1,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});_config.stringFilter=_colorStringFilter;var _media=[],_listeners$1={},_emptyArray$1=[],_lastMediaTime=0,_contextID=0,_dispatch$1=function t(e){return(_listeners$1[e]||_emptyArray$1).map(function(r){return r()})},_onMediaChange=function t(){var e=Date.now(),r=[];e-_lastMediaTime>2&&(_dispatch$1("matchMediaInit"),_media.forEach(function(s){var o=s.queries,d=s.conditions,L,ge,Mt,er;for(ge in o)L=_win$3.matchMedia(o[ge]).matches,L&&(Mt=1),L!==d[ge]&&(d[ge]=L,er=1);er&&(s.revert(),Mt&&r.push(s))}),_dispatch$1("matchMediaRevert"),r.forEach(function(s){return s.onMatch(s,function(o){return s.add(null,o)})}),_lastMediaTime=e,_dispatch$1("matchMedia"))},Context=function(){function t(r,s){this.selector=s&&selector(s),this.data=[],this._r=[],this.isReverted=!1,this.id=_contextID++,r&&this.add(r)}var e=t.prototype;return e.add=function(s,o,d){_isFunction$1(s)&&(d=o,o=s,s=_isFunction$1);var L=this,ge=function(){var er=_context$2,tr=L.selector,ir;return er&&er!==L&&er.data.push(L),d&&(L.selector=selector(d)),_context$2=L,ir=o.apply(L,arguments),_isFunction$1(ir)&&L._r.push(ir),_context$2=er,L.selector=tr,L.isReverted=!1,ir};return L.last=ge,s===_isFunction$1?ge(L,function(Mt){return L.add(null,Mt)}):s?L[s]=ge:ge},e.ignore=function(s){var o=_context$2;_context$2=null,s(this),_context$2=o},e.getTweens=function(){var s=[];return this.data.forEach(function(o){return o instanceof t?s.push.apply(s,o.getTweens()):o instanceof Tween&&!(o.parent&&o.parent.data==="nested")&&s.push(o)}),s},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(s,o){var d=this;if(s?function(){for(var ge=d.getTweens(),Mt=d.data.length,er;Mt--;)er=d.data[Mt],er.data==="isFlip"&&(er.revert(),er.getChildren(!0,!0,!1).forEach(function(tr){return ge.splice(ge.indexOf(tr),1)}));for(ge.map(function(tr){return{g:tr._dur||tr._delay||tr._sat&&!tr._sat.vars.immediateRender?tr.globalTime(0):-1/0,t:tr}}).sort(function(tr,ir){return ir.g-tr.g||-1/0}).forEach(function(tr){return tr.t.revert(s)}),Mt=d.data.length;Mt--;)er=d.data[Mt],er instanceof Timeline?er.data!=="nested"&&(er.scrollTrigger&&er.scrollTrigger.revert(),er.kill()):!(er instanceof Tween)&&er.revert&&er.revert(s);d._r.forEach(function(tr){return tr(s,d)}),d.isReverted=!0}():this.data.forEach(function(ge){return ge.kill&&ge.kill()}),this.clear(),o)for(var L=_media.length;L--;)_media[L].id===this.id&&_media.splice(L,1)},e.revert=function(s){this.kill(s||{})},t}(),MatchMedia=function(){function t(r){this.contexts=[],this.scope=r,_context$2&&_context$2.data.push(this)}var e=t.prototype;return e.add=function(s,o,d){_isObject$1(s)||(s={matches:s});var L=new Context(0,d||this.scope),ge=L.conditions={},Mt,er,tr;_context$2&&!L.selector&&(L.selector=_context$2.selector),this.contexts.push(L),o=L.add("onMatch",o),L.queries=s;for(er in s)er==="all"?tr=1:(Mt=_win$3.matchMedia(s[er]),Mt&&(_media.indexOf(L)<0&&_media.push(L),(ge[er]=Mt.matches)&&(tr=1),Mt.addListener?Mt.addListener(_onMediaChange):Mt.addEventListener("change",_onMediaChange)));return tr&&o(L,function(ir){return L.add(null,ir)}),this},e.revert=function(s){this.kill(s||{})},e.kill=function(s){this.contexts.forEach(function(o){return o.kill(s,!0)})},t}(),_gsap={registerPlugin:function t(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];r.forEach(function(o){return _createPlugin(o)})},timeline:function t(e){return new Timeline(e)},getTweensOf:function t(e,r){return _globalTimeline.getTweensOf(e,r)},getProperty:function t(e,r,s,o){_isString$1(e)&&(e=toArray(e)[0]);var d=_getCache(e||{}).get,L=s?_passThrough$1:_numericIfPossible;return s==="native"&&(s=""),e&&(r?L((_plugins[r]&&_plugins[r].get||d)(e,r,s,o)):function(ge,Mt,er){return L((_plugins[ge]&&_plugins[ge].get||d)(e,ge,Mt,er))})},quickSetter:function t(e,r,s){if(e=toArray(e),e.length>1){var o=e.map(function(tr){return gsap$2.quickSetter(tr,r,s)}),d=o.length;return function(tr){for(var ir=d;ir--;)o[ir](tr)}}e=e[0]||{};var L=_plugins[r],ge=_getCache(e),Mt=ge.harness&&(ge.harness.aliases||{})[r]||r,er=L?function(tr){var ir=new L;_quickTween._pt=0,ir.init(e,s?tr+s:tr,_quickTween,0,[e]),ir.render(1,ir),_quickTween._pt&&_renderPropTweens(1,_quickTween)}:ge.set(e,Mt);return L?er:function(tr){return er(e,Mt,s?tr+s:tr,ge,1)}},quickTo:function t(e,r,s){var o,d=gsap$2.to(e,_merge((o={},o[r]="+=0.1",o.paused=!0,o),s||{})),L=function(Mt,er,tr){return d.resetTo(r,Mt,er,tr)};return L.tween=d,L},isTweening:function t(e){return _globalTimeline.getTweensOf(e,!0).length>0},defaults:function t(e){return e&&e.ease&&(e.ease=_parseEase(e.ease,_defaults$1.ease)),_mergeDeep(_defaults$1,e||{})},config:function t(e){return _mergeDeep(_config,e||{})},registerEffect:function t(e){var r=e.name,s=e.effect,o=e.plugins,d=e.defaults,L=e.extendTimeline;(o||"").split(",").forEach(function(ge){return ge&&!_plugins[ge]&&!_globals[ge]&&_warn(r+" effect requires "+ge+" plugin.")}),_effects[r]=function(ge,Mt,er){return s(toArray(ge),_setDefaults$1(Mt||{},d),er)},L&&(Timeline.prototype[r]=function(ge,Mt,er){return this.add(_effects[r](ge,_isObject$1(Mt)?Mt:(er=Mt)&&{},this),er)})},registerEase:function t(e,r){_easeMap[e]=_parseEase(r)},parseEase:function t(e,r){return arguments.length?_parseEase(e,r):_easeMap},getById:function t(e){return _globalTimeline.getById(e)},exportRoot:function t(e,r){e===void 0&&(e={});var s=new Timeline(e),o,d;for(s.smoothChildTiming=_isNotFalse(e.smoothChildTiming),_globalTimeline.remove(s),s._dp=0,s._time=s._tTime=_globalTimeline._time,o=_globalTimeline._first;o;)d=o._next,(r||!(!o._dur&&o instanceof Tween&&o.vars.onComplete===o._targets[0]))&&_addToTimeline(s,o,o._start-o._delay),o=d;return _addToTimeline(_globalTimeline,s,0),s},context:function t(e,r){return e?new Context(e,r):_context$2},matchMedia:function t(e){return new MatchMedia(e)},matchMediaRefresh:function t(){return _media.forEach(function(e){var r=e.conditions,s,o;for(o in r)r[o]&&(r[o]=!1,s=1);s&&e.revert()})||_onMediaChange()},addEventListener:function t(e,r){var s=_listeners$1[e]||(_listeners$1[e]=[]);~s.indexOf(r)||s.push(r)},removeEventListener:function t(e,r){var s=_listeners$1[e],o=s&&s.indexOf(r);o>=0&&s.splice(o,1)},utils:{wrap,wrapYoyo,distribute,random,snap,normalize,getUnit,clamp,splitColor,toArray,selector,mapRange,pipe,unitize,interpolate,shuffle},install:_install,effects:_effects,ticker:_ticker,updateRoot:Timeline.updateRoot,plugins:_plugins,globalTimeline:_globalTimeline,core:{PropTween,globals:_addGlobal,Tween,Timeline,Animation,getCache:_getCache,_removeLinkedListItem,reverting:function t(){return _reverting$1},context:function t(e){return e&&_context$2&&(_context$2.data.push(e),e._ctx=_context$2),_context$2},suppressOverwrites:function t(e){return _suppressOverwrites$1=e}}};_forEachName("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return _gsap[t]=Tween[t]});_ticker.add(Timeline.updateRoot);_quickTween=_gsap.to({},{duration:0});var _getPluginPropTween=function t(e,r){for(var s=e._pt;s&&s.p!==r&&s.op!==r&&s.fp!==r;)s=s._next;return s},_addModifiers=function t(e,r){var s=e._targets,o,d,L;for(o in r)for(d=s.length;d--;)L=e._ptLookup[d][o],L&&(L=L.d)&&(L._pt&&(L=_getPluginPropTween(L,o)),L&&L.modifier&&L.modifier(r[o],e,s[d],o))},_buildModifierPlugin=function t(e,r){return{name:e,rawVars:1,init:function(o,d,L){L._onInit=function(ge){var Mt,er;if(_isString$1(d)&&(Mt={},_forEachName(d,function(tr){return Mt[tr]=1}),d=Mt),r){Mt={};for(er in d)Mt[er]=r(d[er]);d=Mt}_addModifiers(ge,d)}}}},gsap$2=_gsap.registerPlugin({name:"attr",init:function t(e,r,s,o,d){var L,ge,Mt;this.tween=s;for(L in r)Mt=e.getAttribute(L)||"",ge=this.add(e,"setAttribute",(Mt||0)+"",r[L],o,d,0,0,L),ge.op=L,ge.b=Mt,this._props.push(L)},render:function t(e,r){for(var s=r._pt;s;)_reverting$1?s.set(s.t,s.p,s.b,s):s.r(e,s.d),s=s._next}},{name:"endArray",init:function t(e,r){for(var s=r.length;s--;)this.add(e,s,e[s]||0,r[s],0,0,0,0,0,1)}},_buildModifierPlugin("roundProps",_roundModifier),_buildModifierPlugin("modifiers"),_buildModifierPlugin("snap",snap))||_gsap;Tween.version=Timeline.version=gsap$2.version="3.12.5";_coreReady=1;_windowExists$2()&&_wake();_easeMap.Power0;_easeMap.Power1;_easeMap.Power2;_easeMap.Power3;_easeMap.Power4;_easeMap.Linear;_easeMap.Quad;_easeMap.Cubic;_easeMap.Quart;_easeMap.Quint;_easeMap.Strong;_easeMap.Elastic;_easeMap.Back;_easeMap.SteppedEase;_easeMap.Bounce;_easeMap.Sine;_easeMap.Expo;_easeMap.Circ;/*! 2147 * CSSPlugin 3.12.5 2148 * https://gsap.com 2149 * 2150 * Copyright 2008-2024, GreenSock. All rights reserved. 2151 * Subject to the terms at https://gsap.com/standard-license or for 2152 * Club GSAP members, the agreement issued with that membership. 2153 * @author: Jack Doyle, [email protected] 2154*/var _win$2,_doc$2,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists$1=function t(){return typeof window<"u"},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp$1=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function t(e,r){return r.set(r.t,r.p,Math.round((r.s+r.c*e)*1e4)/1e4+r.u,r)},_renderPropWithEnd=function t(e,r){return r.set(r.t,r.p,e===1?r.e:Math.round((r.s+r.c*e)*1e4)/1e4+r.u,r)},_renderCSSPropWithBeginning=function t(e,r){return r.set(r.t,r.p,e?Math.round((r.s+r.c*e)*1e4)/1e4+r.u:r.b,r)},_renderRoundedCSSProp=function t(e,r){var s=r.s+r.c*e;r.set(r.t,r.p,~~(s+(s<0?-.5:.5))+r.u,r)},_renderNonTweeningValue=function t(e,r){return r.set(r.t,r.p,e?r.e:r.b,r)},_renderNonTweeningValueOnlyAtEnd=function t(e,r){return r.set(r.t,r.p,e!==1?r.b:r.e,r)},_setterCSSStyle=function t(e,r,s){return e.style[r]=s},_setterCSSProp=function t(e,r,s){return e.style.setProperty(r,s)},_setterTransform=function t(e,r,s){return e._gsap[r]=s},_setterScale=function t(e,r,s){return e._gsap.scaleX=e._gsap.scaleY=s},_setterScaleWithRender=function t(e,r,s,o,d){var L=e._gsap;L.scaleX=L.scaleY=s,L.renderTransform(d,L)},_setterTransformWithRender=function t(e,r,s,o,d){var L=e._gsap;L[r]=s,L.renderTransform(d,L)},_transformProp$1="transform",_transformOriginProp=_transformProp$1+"Origin",_saveStyle=function t(e,r){var s=this,o=this.target,d=o.style,L=o._gsap;if(e in _transformProps&&d){if(this.tfm=this.tfm||{},e!=="transform")e=_propertyAliases[e]||e,~e.indexOf(",")?e.split(",").forEach(function(ge){return s.tfm[ge]=_get(o,ge)}):this.tfm[e]=L.x?L[e]:_get(o,e),e===_transformOriginProp&&(this.tfm.zOrigin=L.zOrigin);else return _propertyAliases.transform.split(",").forEach(function(ge){return t.call(s,ge,r)});if(this.props.indexOf(_transformProp$1)>=0)return;L.svg&&(this.svgo=o.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,r,"")),e=_transformProp$1}(d||r)&&this.props.push(e,r,d[e])},_removeIndependentTransforms=function t(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},_revertStyle=function t(){var e=this.props,r=this.target,s=r.style,o=r._gsap,d,L;for(d=0;d<e.length;d+=3)e[d+1]?r[e[d]]=e[d+2]:e[d+2]?s[e[d]]=e[d+2]:s.removeProperty(e[d].substr(0,2)==="--"?e[d]:e[d].replace(_capsExp$1,"-$1").toLowerCase());if(this.tfm){for(L in this.tfm)o[L]=this.tfm[L];o.svg&&(o.renderTransform(),r.setAttribute("data-svg-origin",this.svgo||"")),d=_reverting(),(!d||!d.isStart)&&!s[_transformProp$1]&&(_removeIndependentTransforms(s),o.zOrigin&&s[_transformOriginProp]&&(s[_transformOriginProp]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},_getStyleSaver=function t(e,r){var s={target:e,props:[],revert:_revertStyle,save:_saveStyle};return e._gsap||gsap$2.core.getCache(e),r&&r.split(",").forEach(function(o){return s.save(o)}),s},_supports3D,_createElement=function t(e,r){var s=_doc$2.createElementNS?_doc$2.createElementNS((r||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):_doc$2.createElement(e);return s&&s.style?s:_doc$2.createElement(e)},_getComputedProperty=function t(e,r,s){var o=getComputedStyle(e);return o[r]||o.getPropertyValue(r.replace(_capsExp$1,"-$1").toLowerCase())||o.getPropertyValue(r)||!s&&t(e,_checkPropPrefix(r)||r,1)||""},_prefixes="O,Moz,ms,Ms,Webkit".split(","),_checkPropPrefix=function t(e,r,s){var o=r||_tempDiv,d=o.style,L=5;if(e in d&&!s)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);L--&&!(_prefixes[L]+e in d););return L<0?null:(L===3?"ms":L>=0?_prefixes[L]:"")+e},_initCore$1=function t(){_windowExists$1()&&window.document&&(_win$2=window,_doc$2=_win$2.document,_docElement=_doc$2.documentElement,_tempDiv=_createElement("div")||{style:{}},_createElement("div"),_transformProp$1=_checkPropPrefix(_transformProp$1),_transformOriginProp=_transformProp$1+"Origin",_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_supports3D=!!_checkPropPrefix("perspective"),_reverting=gsap$2.core.reverting,_pluginInitted=1)},_getBBoxHack=function t(e){var r=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=this.parentNode,o=this.nextSibling,d=this.style.cssText,L;if(_docElement.appendChild(r),r.appendChild(this),this.style.display="block",e)try{L=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch{}else this._gsapBBox&&(L=this._gsapBBox());return s&&(o?s.insertBefore(this,o):s.appendChild(this)),_docElement.removeChild(r),this.style.cssText=d,L},_getAttributeFallbacks=function t(e,r){for(var s=r.length;s--;)if(e.hasAttribute(r[s]))return e.getAttribute(r[s])},_getBBox=function t(e){var r;try{r=e.getBBox()}catch{r=_getBBoxHack.call(e,!0)}return r&&(r.width||r.height)||e.getBBox===_getBBoxHack||(r=_getBBoxHack.call(e,!0)),r&&!r.width&&!r.x&&!r.y?{x:+_getAttributeFallbacks(e,["x","cx","x1"])||0,y:+_getAttributeFallbacks(e,["y","cy","y1"])||0,width:0,height:0}:r},_isSVG=function t(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&_getBBox(e))},_removeProperty=function t(e,r){if(r){var s=e.style,o;r in _transformProps&&r!==_transformOriginProp&&(r=_transformProp$1),s.removeProperty?(o=r.substr(0,2),(o==="ms"||r.substr(0,6)==="webkit")&&(r="-"+r),s.removeProperty(o==="--"?r:r.replace(_capsExp$1,"-$1").toLowerCase())):s.removeAttribute(r)}},_addNonTweeningPT=function t(e,r,s,o,d,L){var ge=new PropTween(e._pt,r,s,0,1,L?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return e._pt=ge,ge.b=o,ge.e=d,e._props.push(s),ge},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function t(e,r,s,o){var d=parseFloat(s)||0,L=(s+"").trim().substr((d+"").length)||"px",ge=_tempDiv.style,Mt=_horizontalExp.test(r),er=e.tagName.toLowerCase()==="svg",tr=(er?"client":"offset")+(Mt?"Width":"Height"),ir=100,rr=o==="px",nr=o==="%",ar,sr,lr,cr;if(o===L||!d||_nonConvertibleUnits[o]||_nonConvertibleUnits[L])return d;if(L!=="px"&&!rr&&(d=t(e,r,s,"px")),cr=e.getCTM&&_isSVG(e),(nr||L==="%")&&(_transformProps[r]||~r.indexOf("adius")))return ar=cr?e.getBBox()[Mt?"width":"height"]:e[tr],_round$1(nr?d/ar*ir:d/100*ar);if(ge[Mt?"width":"height"]=ir+(rr?L:o),sr=~r.indexOf("adius")||o==="em"&&e.appendChild&&!er?e:e.parentNode,cr&&(sr=(e.ownerSVGElement||{}).parentNode),(!sr||sr===_doc$2||!sr.appendChild)&&(sr=_doc$2.body),lr=sr._gsap,lr&&nr&&lr.width&&Mt&&lr.time===_ticker.time&&!lr.uncache)return _round$1(d/lr.width*ir);if(nr&&(r==="height"||r==="width")){var ur=e.style[r];e.style[r]=ir+o,ar=e[tr],ur?e.style[r]=ur:_removeProperty(e,r)}else(nr||L==="%")&&!_nonStandardLayouts[_getComputedProperty(sr,"display")]&&(ge.position=_getComputedProperty(e,"position")),sr===e&&(ge.position="static"),sr.appendChild(_tempDiv),ar=_tempDiv[tr],sr.removeChild(_tempDiv),ge.position="absolute";return Mt&&nr&&(lr=_getCache(sr),lr.time=_ticker.time,lr.width=sr[tr]),_round$1(rr?ar*d/ir:ar&&d?ir/ar*d:0)},_get=function t(e,r,s,o){var d;return _pluginInitted||_initCore$1(),r in _propertyAliases&&r!=="transform"&&(r=_propertyAliases[r],~r.indexOf(",")&&(r=r.split(",")[0])),_transformProps[r]&&r!=="transform"?(d=_parseTransform(e,o),d=r!=="transformOrigin"?d[r]:d.svg?d.origin:_firstTwoOnly(_getComputedProperty(e,_transformOriginProp))+" "+d.zOrigin+"px"):(d=e.style[r],(!d||d==="auto"||o||~(d+"").indexOf("calc("))&&(d=_specialProps[r]&&_specialProps[r](e,r,s)||_getComputedProperty(e,r)||_getProperty(e,r)||(r==="opacity"?1:0))),s&&!~(d+"").trim().indexOf(" ")?_convertToUnit(e,r,d,s)+s:d},_tweenComplexCSSString=function t(e,r,s,o){if(!s||s==="none"){var d=_checkPropPrefix(r,e,1),L=d&&_getComputedProperty(e,d,1);L&&L!==s?(r=d,s=L):r==="borderColor"&&(s=_getComputedProperty(e,"borderTopColor"))}var ge=new PropTween(this._pt,e.style,r,0,1,_renderComplexString),Mt=0,er=0,tr,ir,rr,nr,ar,sr,lr,cr,ur,or,dr,hr;if(ge.b=s,ge.e=o,s+="",o+="",o==="auto"&&(sr=e.style[r],e.style[r]=o,o=_getComputedProperty(e,r)||o,sr?e.style[r]=sr:_removeProperty(e,r)),tr=[s,o],_colorStringFilter(tr),s=tr[0],o=tr[1],rr=s.match(_numWithUnitExp)||[],hr=o.match(_numWithUnitExp)||[],hr.length){for(;ir=_numWithUnitExp.exec(o);)lr=ir[0],ur=o.substring(Mt,ir.index),ar?ar=(ar+1)%5:(ur.substr(-5)==="rgba("||ur.substr(-5)==="hsla(")&&(ar=1),lr!==(sr=rr[er++]||"")&&(nr=parseFloat(sr)||0,dr=sr.substr((nr+"").length),lr.charAt(1)==="="&&(lr=_parseRelative(nr,lr)+dr),cr=parseFloat(lr),or=lr.substr((cr+"").length),Mt=_numWithUnitExp.lastIndex-or.length,or||(or=or||_config.units[r]||dr,Mt===o.length&&(o+=or,ge.e+=or)),dr!==or&&(nr=_convertToUnit(e,r,sr,or)||0),ge._pt={_next:ge._pt,p:ur||er===1?ur:",",s:nr,c:cr-nr,m:ar&&ar<4||r==="zIndex"?Math.round:0});ge.c=Mt<o.length?o.substring(Mt,o.length):""}else ge.r=r==="display"&&o==="none"?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue;return _relExp.test(o)&&(ge.e=0),this._pt=ge,ge},_keywordToPercent={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_convertKeywordsToPercentages=function t(e){var r=e.split(" "),s=r[0],o=r[1]||"50%";return(s==="top"||s==="bottom"||o==="left"||o==="right")&&(e=s,s=o,o=e),r[0]=_keywordToPercent[s]||s,r[1]=_keywordToPercent[o]||o,r.join(" ")},_renderClearProps=function t(e,r){if(r.tween&&r.tween._time===r.tween._dur){var s=r.t,o=s.style,d=r.u,L=s._gsap,ge,Mt,er;if(d==="all"||d===!0)o.cssText="",Mt=1;else for(d=d.split(","),er=d.length;--er>-1;)ge=d[er],_transformProps[ge]&&(Mt=1,ge=ge==="transformOrigin"?_transformOriginProp:_transformProp$1),_removeProperty(s,ge);Mt&&(_removeProperty(s,_transformProp$1),L&&(L.svg&&s.removeAttribute("transform"),_parseTransform(s,1),L.uncache=1,_removeIndependentTransforms(o)))}},_specialProps={clearProps:function t(e,r,s,o,d){if(d.data!=="isFromStart"){var L=e._pt=new PropTween(e._pt,r,s,0,0,_renderClearProps);return L.u=o,L.pr=-10,L.tween=d,e._props.push(s),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function t(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},_getComputedTransformMatrixAsArray=function t(e){var r=_getComputedProperty(e,_transformProp$1);return _isNullTransform(r)?_identity2DMatrix:r.substr(7).match(_numExp).map(_round$1)},_getMatrix=function t(e,r){var s=e._gsap||_getCache(e),o=e.style,d=_getComputedTransformMatrixAsArray(e),L,ge,Mt,er;return s.svg&&e.getAttribute("transform")?(Mt=e.transform.baseVal.consolidate().matrix,d=[Mt.a,Mt.b,Mt.c,Mt.d,Mt.e,Mt.f],d.join(",")==="1,0,0,1,0,0"?_identity2DMatrix:d):(d===_identity2DMatrix&&!e.offsetParent&&e!==_docElement&&!s.svg&&(Mt=o.display,o.display="block",L=e.parentNode,(!L||!e.offsetParent)&&(er=1,ge=e.nextElementSibling,_docElement.appendChild(e)),d=_getComputedTransformMatrixAsArray(e),Mt?o.display=Mt:_removeProperty(e,"display"),er&&(ge?L.insertBefore(e,ge):L?L.appendChild(e):_docElement.removeChild(e))),r&&d.length>6?[d[0],d[1],d[4],d[5],d[12],d[13]]:d)},_applySVGOrigin=function t(e,r,s,o,d,L){var ge=e._gsap,Mt=d||_getMatrix(e,!0),er=ge.xOrigin||0,tr=ge.yOrigin||0,ir=ge.xOffset||0,rr=ge.yOffset||0,nr=Mt[0],ar=Mt[1],sr=Mt[2],lr=Mt[3],cr=Mt[4],ur=Mt[5],or=r.split(" "),dr=parseFloat(or[0])||0,hr=parseFloat(or[1])||0,pr,mr,vr,Er;s?Mt!==_identity2DMatrix&&(mr=nr*lr-ar*sr)&&(vr=dr*(lr/mr)+hr*(-sr/mr)+(sr*ur-lr*cr)/mr,Er=dr*(-ar/mr)+hr*(nr/mr)-(nr*ur-ar*cr)/mr,dr=vr,hr=Er):(pr=_getBBox(e),dr=pr.x+(~or[0].indexOf("%")?dr/100*pr.width:dr),hr=pr.y+(~(or[1]||or[0]).indexOf("%")?hr/100*pr.height:hr)),o||o!==!1&&ge.smooth?(cr=dr-er,ur=hr-tr,ge.xOffset=ir+(cr*nr+ur*sr)-cr,ge.yOffset=rr+(cr*ar+ur*lr)-ur):ge.xOffset=ge.yOffset=0,ge.xOrigin=dr,ge.yOrigin=hr,ge.smooth=!!o,ge.origin=r,ge.originIsAbsolute=!!s,e.style[_transformOriginProp]="0px 0px",L&&(_addNonTweeningPT(L,ge,"xOrigin",er,dr),_addNonTweeningPT(L,ge,"yOrigin",tr,hr),_addNonTweeningPT(L,ge,"xOffset",ir,ge.xOffset),_addNonTweeningPT(L,ge,"yOffset",rr,ge.yOffset)),e.setAttribute("data-svg-origin",dr+" "+hr)},_parseTransform=function t(e,r){var s=e._gsap||new GSCache(e);if("x"in s&&!r&&!s.uncache)return s;var o=e.style,d=s.scaleX<0,L="px",ge="deg",Mt=getComputedStyle(e),er=_getComputedProperty(e,_transformOriginProp)||"0",tr,ir,rr,nr,ar,sr,lr,cr,ur,or,dr,hr,pr,mr,vr,Er,Cr,Pr,kr,Mr,Ur,$r,yr,xr,gr,_r,wr,Ir,Hr,Yr,Jr,xi;return tr=ir=rr=sr=lr=cr=ur=or=dr=0,nr=ar=1,s.svg=!!(e.getCTM&&_isSVG(e)),Mt.translate&&((Mt.translate!=="none"||Mt.scale!=="none"||Mt.rotate!=="none")&&(o[_transformProp$1]=(Mt.translate!=="none"?"translate3d("+(Mt.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(Mt.rotate!=="none"?"rotate("+Mt.rotate+") ":"")+(Mt.scale!=="none"?"scale("+Mt.scale.split(" ").join(",")+") ":"")+(Mt[_transformProp$1]!=="none"?Mt[_transformProp$1]:"")),o.scale=o.rotate=o.translate="none"),mr=_getMatrix(e,s.svg),s.svg&&(s.uncache?(gr=e.getBBox(),er=s.xOrigin-gr.x+"px "+(s.yOrigin-gr.y)+"px",xr=""):xr=!r&&e.getAttribute("data-svg-origin"),_applySVGOrigin(e,xr||er,!!xr||s.originIsAbsolute,s.smooth!==!1,mr)),hr=s.xOrigin||0,pr=s.yOrigin||0,mr!==_identity2DMatrix&&(Pr=mr[0],kr=mr[1],Mr=mr[2],Ur=mr[3],tr=$r=mr[4],ir=yr=mr[5],mr.length===6?(nr=Math.sqrt(Pr*Pr+kr*kr),ar=Math.sqrt(Ur*Ur+Mr*Mr),sr=Pr||kr?_atan2(kr,Pr)*_RAD2DEG:0,ur=Mr||Ur?_atan2(Mr,Ur)*_RAD2DEG+sr:0,ur&&(ar*=Math.abs(Math.cos(ur*_DEG2RAD))),s.svg&&(tr-=hr-(hr*Pr+pr*Mr),ir-=pr-(hr*kr+pr*Ur))):(xi=mr[6],Yr=mr[7],wr=mr[8],Ir=mr[9],Hr=mr[10],Jr=mr[11],tr=mr[12],ir=mr[13],rr=mr[14],vr=_atan2(xi,Hr),lr=vr*_RAD2DEG,vr&&(Er=Math.cos(-vr),Cr=Math.sin(-vr),xr=$r*Er+wr*Cr,gr=yr*Er+Ir*Cr,_r=xi*Er+Hr*Cr,wr=$r*-Cr+wr*Er,Ir=yr*-Cr+Ir*Er,Hr=xi*-Cr+Hr*Er,Jr=Yr*-Cr+Jr*Er,$r=xr,yr=gr,xi=_r),vr=_atan2(-Mr,Hr),cr=vr*_RAD2DEG,vr&&(Er=Math.cos(-vr),Cr=Math.sin(-vr),xr=Pr*Er-wr*Cr,gr=kr*Er-Ir*Cr,_r=Mr*Er-Hr*Cr,Jr=Ur*Cr+Jr*Er,Pr=xr,kr=gr,Mr=_r),vr=_atan2(kr,Pr),sr=vr*_RAD2DEG,vr&&(Er=Math.cos(vr),Cr=Math.sin(vr),xr=Pr*Er+kr*Cr,gr=$r*Er+yr*Cr,kr=kr*Er-Pr*Cr,yr=yr*Er-$r*Cr,Pr=xr,$r=gr),lr&&Math.abs(lr)+Math.abs(sr)>359.9&&(lr=sr=0,cr=180-cr),nr=_round$1(Math.sqrt(Pr*Pr+kr*kr+Mr*Mr)),ar=_round$1(Math.sqrt(yr*yr+xi*xi)),vr=_atan2($r,yr),ur=Math.abs(vr)>2e-4?vr*_RAD2DEG:0,dr=Jr?1/(Jr<0?-Jr:Jr):0),s.svg&&(xr=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(e,_transformProp$1)),xr&&e.setAttribute("transform",xr))),Math.abs(ur)>90&&Math.abs(ur)<270&&(d?(nr*=-1,ur+=sr<=0?180:-180,sr+=sr<=0?180:-180):(ar*=-1,ur+=ur<=0?180:-180)),r=r||s.uncache,s.x=tr-((s.xPercent=tr&&(!r&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-tr)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+L,s.y=ir-((s.yPercent=ir&&(!r&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-ir)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+L,s.z=rr+L,s.scaleX=_round$1(nr),s.scaleY=_round$1(ar),s.rotation=_round$1(sr)+ge,s.rotationX=_round$1(lr)+ge,s.rotationY=_round$1(cr)+ge,s.skewX=ur+ge,s.skewY=or+ge,s.transformPerspective=dr+L,(s.zOrigin=parseFloat(er.split(" ")[2])||!r&&s.zOrigin||0)&&(o[_transformOriginProp]=_firstTwoOnly(er)),s.xOffset=s.yOffset=0,s.force3D=_config.force3D,s.renderTransform=s.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,s.uncache=0,s},_firstTwoOnly=function t(e){return(e=e.split(" "))[0]+" "+e[1]},_addPxTranslate=function t(e,r,s){var o=getUnit(r);return _round$1(parseFloat(r)+parseFloat(_convertToUnit(e,"x",s+"px",o)))+o},_renderNon3DTransforms=function t(e,r){r.z="0px",r.rotationY=r.rotationX="0deg",r.force3D=0,_renderCSSTransforms(e,r)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function t(e,r){var s=r||this,o=s.xPercent,d=s.yPercent,L=s.x,ge=s.y,Mt=s.z,er=s.rotation,tr=s.rotationY,ir=s.rotationX,rr=s.skewX,nr=s.skewY,ar=s.scaleX,sr=s.scaleY,lr=s.transformPerspective,cr=s.force3D,ur=s.target,or=s.zOrigin,dr="",hr=cr==="auto"&&e&&e!==1||cr===!0;if(or&&(ir!==_zeroDeg||tr!==_zeroDeg)){var pr=parseFloat(tr)*_DEG2RAD,mr=Math.sin(pr),vr=Math.cos(pr),Er;pr=parseFloat(ir)*_DEG2RAD,Er=Math.cos(pr),L=_addPxTranslate(ur,L,mr*Er*-or),ge=_addPxTranslate(ur,ge,-Math.sin(pr)*-or),Mt=_addPxTranslate(ur,Mt,vr*Er*-or+or)}lr!==_zeroPx&&(dr+="perspective("+lr+_endParenthesis),(o||d)&&(dr+="translate("+o+"%, "+d+"%) "),(hr||L!==_zeroPx||ge!==_zeroPx||Mt!==_zeroPx)&&(dr+=Mt!==_zeroPx||hr?"translate3d("+L+", "+ge+", "+Mt+") ":"translate("+L+", "+ge+_endParenthesis),er!==_zeroDeg&&(dr+="rotate("+er+_endParenthesis),tr!==_zeroDeg&&(dr+="rotateY("+tr+_endParenthesis),ir!==_zeroDeg&&(dr+="rotateX("+ir+_endParenthesis),(rr!==_zeroDeg||nr!==_zeroDeg)&&(dr+="skew("+rr+", "+nr+_endParenthesis),(ar!==1||sr!==1)&&(dr+="scale("+ar+", "+sr+_endParenthesis),ur.style[_transformProp$1]=dr||"translate(0, 0)"},_renderSVGTransforms=function t(e,r){var s=r||this,o=s.xPercent,d=s.yPercent,L=s.x,ge=s.y,Mt=s.rotation,er=s.skewX,tr=s.skewY,ir=s.scaleX,rr=s.scaleY,nr=s.target,ar=s.xOrigin,sr=s.yOrigin,lr=s.xOffset,cr=s.yOffset,ur=s.forceCSS,or=parseFloat(L),dr=parseFloat(ge),hr,pr,mr,vr,Er;Mt=parseFloat(Mt),er=parseFloat(er),tr=parseFloat(tr),tr&&(tr=parseFloat(tr),er+=tr,Mt+=tr),Mt||er?(Mt*=_DEG2RAD,er*=_DEG2RAD,hr=Math.cos(Mt)*ir,pr=Math.sin(Mt)*ir,mr=Math.sin(Mt-er)*-rr,vr=Math.cos(Mt-er)*rr,er&&(tr*=_DEG2RAD,Er=Math.tan(er-tr),Er=Math.sqrt(1+Er*Er),mr*=Er,vr*=Er,tr&&(Er=Math.tan(tr),Er=Math.sqrt(1+Er*Er),hr*=Er,pr*=Er)),hr=_round$1(hr),pr=_round$1(pr),mr=_round$1(mr),vr=_round$1(vr)):(hr=ir,vr=rr,pr=mr=0),(or&&!~(L+"").indexOf("px")||dr&&!~(ge+"").indexOf("px"))&&(or=_convertToUnit(nr,"x",L,"px"),dr=_convertToUnit(nr,"y",ge,"px")),(ar||sr||lr||cr)&&(or=_round$1(or+ar-(ar*hr+sr*mr)+lr),dr=_round$1(dr+sr-(ar*pr+sr*vr)+cr)),(o||d)&&(Er=nr.getBBox(),or=_round$1(or+o/100*Er.width),dr=_round$1(dr+d/100*Er.height)),Er="matrix("+hr+","+pr+","+mr+","+vr+","+or+","+dr+")",nr.setAttribute("transform",Er),ur&&(nr.style[_transformProp$1]=Er)},_addRotationalPropTween=function t(e,r,s,o,d){var L=360,ge=_isString$1(d),Mt=parseFloat(d)*(ge&&~d.indexOf("rad")?_RAD2DEG:1),er=Mt-o,tr=o+er+"deg",ir,rr;return ge&&(ir=d.split("_")[1],ir==="short"&&(er%=L,er!==er%(L/2)&&(er+=er<0?L:-L)),ir==="cw"&&er<0?er=(er+L*_bigNum)%L-~~(er/L)*L:ir==="ccw"&&er>0&&(er=(er-L*_bigNum)%L-~~(er/L)*L)),e._pt=rr=new PropTween(e._pt,r,s,o,er,_renderPropWithEnd),rr.e=tr,rr.u="deg",e._props.push(s),rr},_assign=function t(e,r){for(var s in r)e[s]=r[s];return e},_addRawTransformPTs=function t(e,r,s){var o=_assign({},s._gsap),d="perspective,force3D,transformOrigin,svgOrigin",L=s.style,ge,Mt,er,tr,ir,rr,nr,ar;o.svg?(er=s.getAttribute("transform"),s.setAttribute("transform",""),L[_transformProp$1]=r,ge=_parseTransform(s,1),_removeProperty(s,_transformProp$1),s.setAttribute("transform",er)):(er=getComputedStyle(s)[_transformProp$1],L[_transformProp$1]=r,ge=_parseTransform(s,1),L[_transformProp$1]=er);for(Mt in _transformProps)er=o[Mt],tr=ge[Mt],er!==tr&&d.indexOf(Mt)<0&&(nr=getUnit(er),ar=getUnit(tr),ir=nr!==ar?_convertToUnit(s,Mt,er,ar):parseFloat(er),rr=parseFloat(tr),e._pt=new PropTween(e._pt,ge,Mt,ir,rr-ir,_renderCSSProp),e._pt.u=ar||0,e._props.push(Mt));_assign(ge,o)};_forEachName("padding,margin,Width,Radius",function(t,e){var r="Top",s="Right",o="Bottom",d="Left",L=(e<3?[r,s,o,d]:[r+d,r+s,o+s,o+d]).map(function(ge){return e<2?t+ge:"border"+ge+t});_specialProps[e>1?"border"+t:t]=function(ge,Mt,er,tr,ir){var rr,nr;if(arguments.length<4)return rr=L.map(function(ar){return _get(ge,ar,er)}),nr=rr.join(" "),nr.split(rr[0]).length===5?rr[0]:nr;rr=(tr+"").split(" "),nr={},L.forEach(function(ar,sr){return nr[ar]=rr[sr]=rr[sr]||rr[(sr-1)/2|0]}),ge.init(Mt,nr,ir)}});var CSSPlugin={name:"css",register:_initCore$1,targetTest:function t(e){return e.style&&e.nodeType},init:function t(e,r,s,o,d){var L=this._props,ge=e.style,Mt=s.vars.startAt,er,tr,ir,rr,nr,ar,sr,lr,cr,ur,or,dr,hr,pr,mr,vr;_pluginInitted||_initCore$1(),this.styles=this.styles||_getStyleSaver(e),vr=this.styles.props,this.tween=s;for(sr in r)if(sr!=="autoRound"&&(tr=r[sr],!(_plugins[sr]&&_checkPlugin(sr,r,s,o,e,d)))){if(nr=typeof tr,ar=_specialProps[sr],nr==="function"&&(tr=tr.call(s,o,e,d),nr=typeof tr),nr==="string"&&~tr.indexOf("random(")&&(tr=_replaceRandom(tr)),ar)ar(this,e,sr,tr,s)&&(mr=1);else if(sr.substr(0,2)==="--")er=(getComputedStyle(e).getPropertyValue(sr)+"").trim(),tr+="",_colorExp.lastIndex=0,_colorExp.test(er)||(lr=getUnit(er),cr=getUnit(tr)),cr?lr!==cr&&(er=_convertToUnit(e,sr,er,cr)+cr):lr&&(tr+=lr),this.add(ge,"setProperty",er,tr,o,d,0,0,sr),L.push(sr),vr.push(sr,0,ge[sr]);else if(nr!=="undefined"){if(Mt&&sr in Mt?(er=typeof Mt[sr]=="function"?Mt[sr].call(s,o,e,d):Mt[sr],_isString$1(er)&&~er.indexOf("random(")&&(er=_replaceRandom(er)),getUnit(er+"")||er==="auto"||(er+=_config.units[sr]||getUnit(_get(e,sr))||""),(er+"").charAt(1)==="="&&(er=_get(e,sr))):er=_get(e,sr),rr=parseFloat(er),ur=nr==="string"&&tr.charAt(1)==="="&&tr.substr(0,2),ur&&(tr=tr.substr(2)),ir=parseFloat(tr),sr in _propertyAliases&&(sr==="autoAlpha"&&(rr===1&&_get(e,"visibility")==="hidden"&&ir&&(rr=0),vr.push("visibility",0,ge.visibility),_addNonTweeningPT(this,ge,"visibility",rr?"inherit":"hidden",ir?"inherit":"hidden",!ir)),sr!=="scale"&&sr!=="transform"&&(sr=_propertyAliases[sr],~sr.indexOf(",")&&(sr=sr.split(",")[0]))),or=sr in _transformProps,or){if(this.styles.save(sr),dr||(hr=e._gsap,hr.renderTransform&&!r.parseTransform||_parseTransform(e,r.parseTransform),pr=r.smoothOrigin!==!1&&hr.smooth,dr=this._pt=new PropTween(this._pt,ge,_transformProp$1,0,1,hr.renderTransform,hr,0,-1),dr.dep=1),sr==="scale")this._pt=new PropTween(this._pt,hr,"scaleY",hr.scaleY,(ur?_parseRelative(hr.scaleY,ur+ir):ir)-hr.scaleY||0,_renderCSSProp),this._pt.u=0,L.push("scaleY",sr),sr+="X";else if(sr==="transformOrigin"){vr.push(_transformOriginProp,0,ge[_transformOriginProp]),tr=_convertKeywordsToPercentages(tr),hr.svg?_applySVGOrigin(e,tr,0,pr,0,this):(cr=parseFloat(tr.split(" ")[2])||0,cr!==hr.zOrigin&&_addNonTweeningPT(this,hr,"zOrigin",hr.zOrigin,cr),_addNonTweeningPT(this,ge,sr,_firstTwoOnly(er),_firstTwoOnly(tr)));continue}else if(sr==="svgOrigin"){_applySVGOrigin(e,tr,1,pr,0,this);continue}else if(sr in _rotationalProperties){_addRotationalPropTween(this,hr,sr,rr,ur?_parseRelative(rr,ur+tr):tr);continue}else if(sr==="smoothOrigin"){_addNonTweeningPT(this,hr,"smooth",hr.smooth,tr);continue}else if(sr==="force3D"){hr[sr]=tr;continue}else if(sr==="transform"){_addRawTransformPTs(this,tr,e);continue}}else sr in ge||(sr=_checkPropPrefix(sr)||sr);if(or||(ir||ir===0)&&(rr||rr===0)&&!_complexExp.test(tr)&&sr in ge)lr=(er+"").substr((rr+"").length),ir||(ir=0),cr=getUnit(tr)||(sr in _config.units?_config.units[sr]:lr),lr!==cr&&(rr=_convertToUnit(e,sr,er,cr)),this._pt=new PropTween(this._pt,or?hr:ge,sr,rr,(ur?_parseRelative(rr,ur+ir):ir)-rr,!or&&(cr==="px"||sr==="zIndex")&&r.autoRound!==!1?_renderRoundedCSSProp:_renderCSSProp),this._pt.u=cr||0,lr!==cr&&cr!=="%"&&(this._pt.b=er,this._pt.r=_renderCSSPropWithBeginning);else if(sr in ge)_tweenComplexCSSString.call(this,e,sr,er,ur?ur+tr:tr);else if(sr in e)this.add(e,sr,er||e[sr],ur?ur+tr:tr,o,d);else if(sr!=="parseTransform"){_missingPlugin(sr,tr);continue}or||(sr in ge?vr.push(sr,0,ge[sr]):vr.push(sr,1,er||e[sr])),L.push(sr)}}mr&&_sortPropTweensByPriority(this)},render:function t(e,r){if(r.tween._time||!_reverting())for(var s=r._pt;s;)s.r(e,s.d),s=s._next;else r.styles.revert()},get:_get,aliases:_propertyAliases,getSetter:function t(e,r,s){var o=_propertyAliases[r];return o&&o.indexOf(",")<0&&(r=o),r in _transformProps&&r!==_transformOriginProp&&(e._gsap.x||_get(e,"x"))?s&&_recentSetterPlugin===s?r==="scale"?_setterScale:_setterTransform:(_recentSetterPlugin=s||{})&&(r==="scale"?_setterScaleWithRender:_setterTransformWithRender):e.style&&!_isUndefined(e.style[r])?_setterCSSStyle:~r.indexOf("-")?_setterCSSProp:_getSetter(e,r)},core:{_removeProperty,_getMatrix}};gsap$2.utils.checkPrefix=_checkPropPrefix;gsap$2.core.getStyleSaver=_getStyleSaver;(function(t,e,r,s){var o=_forEachName(t+","+e+","+r,function(d){_transformProps[d]=1});_forEachName(e,function(d){_config.units[d]="deg",_rotationalProperties[d]=1}),_propertyAliases[o[13]]=t+","+e,_forEachName(s,function(d){var L=d.split(":");_propertyAliases[L[1]]=o[L[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){_
vendor: 6,867 bytes, lines 2154-2162
2154config.units[t]="px"});gsap$2.registerPlugin(CSSPlugin);var gsapWithCSS=gsap$2.registerPlugin(CSSPlugin)||gsap$2;gsapWithCSS.core.Tween;function _defineProperties(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),t}/*! 2155 * Observer 3.12.5 2156 * https://gsap.com 2157 * 2158 * @license Copyright 2008-2024, GreenSock. All rights reserved. 2159 * Subject to the terms at https://gsap.com/standard-license or for 2160 * Club GSAP members, the agreement issued with that membership. 2161 * @author: Jack Doyle, [email protected] 2162*/var gsap$1,_coreInitted$1,_win$1,_doc$1,_docEl$1,_body$1,_isTouch,_pointerType,ScrollTrigger$1,_root$1,_normalizer$1,_eventTypes,_context$1,_getGSAP$1=function t(){return gsap$1||typeof window<"u"&&(gsap$1=window.gsap)&&gsap$1.registerPlugin&&gsap$1},_startup$1=1,_observers=[],_scrollers=[],_proxies=[],_getTime$1=Date.now,_bridge=function t(e,r){return r},_integrate=function t(){var e=ScrollTrigger$1.core,r=e.bridge||{},s=e._scrollers,o=e._proxies;s.push.apply(s,_scrollers),o.push.apply(o,_proxies),_scrollers=s,_proxies=o,_bridge=function(L,ge){return r[L](ge)}},_getProxyProp=function t(e,r){return~_proxies.indexOf(e)&&_proxies[_proxies.indexOf(e)+1][r]},_isViewport$1=function t(e){return!!~_root$1.indexOf(e)},_addListener$1=function t(e,r,s,o,d){return e.addEventListener(r,s,{passive:o!==!1,capture:!!d})},_removeListener$1=function t(e,r,s,o){return e.removeEventListener(r,s,!!o)},_scrollLeft="scrollLeft",_scrollTop="scrollTop",_onScroll$1=function t(){return _normalizer$1&&_normalizer$1.isPressed||_scrollers.cache++},_scrollCacheFunc=function t(e,r){var s=function o(d){if(d||d===0){_startup$1&&(_win$1.history.scrollRestoration="manual");var L=_normalizer$1&&_normalizer$1.isPressed;d=o.v=Math.round(d)||(_normalizer$1&&_normalizer$1.iOS?1:0),e(d),o.cacheID=_scrollers.cache,L&&_bridge("ss",d)}else(r||_scrollers.cache!==o.cacheID||_bridge("ref"))&&(o.cacheID=_scrollers.cache,o.v=e());return o.v+o.offset};return s.offset=0,e&&s},_horizontal={s:_scrollLeft,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:_scrollCacheFunc(function(t){return arguments.length?_win$1.scrollTo(t,_vertical.sc()):_win$1.pageXOffset||_doc$1[_scrollLeft]||_docEl$1[_scrollLeft]||_body$1[_scrollLeft]||0})},_vertical={s:_scrollTop,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:_horizontal,sc:_scrollCacheFunc(function(t){return arguments.length?_win$1.scrollTo(_horizontal.sc(),t):_win$1.pageYOffset||_doc$1[_scrollTop]||_docEl$1[_scrollTop]||_body$1[_scrollTop]||0})},_getTarget=function t(e,r){return(r&&r._ctx&&r._ctx.selector||gsap$1.utils.toArray)(e)[0]||(typeof e=="string"&&gsap$1.config().nullTargetWarn!==!1?console.warn("Element not found:",e):null)},_getScrollFunc=function t(e,r){var s=r.s,o=r.sc;_isViewport$1(e)&&(e=_doc$1.scrollingElement||_docEl$1);var d=_scrollers.indexOf(e),L=o===_vertical.sc?1:2;!~d&&(d=_scrollers.push(e)-1),_scrollers[d+L]||_addListener$1(e,"scroll",_onScroll$1);var ge=_scrollers[d+L],Mt=ge||(_scrollers[d+L]=_scrollCacheFunc(_getProxyProp(e,s),!0)||(_isViewport$1(e)?o:_scrollCacheFunc(function(er){return arguments.length?e[s]=er:e[s]})));return Mt.target=e,ge||(Mt.smooth=gsap$1.getProperty(e,"scrollBehavior")==="smooth"),Mt},_getVelocityProp=function t(e,r,s){var o=e,d=e,L=_getTime$1(),ge=L,Mt=r||50,er=Math.max(500,Mt*3),tr=function(ar,sr){var lr=_getTime$1();sr||lr-L>Mt?(d=o,o=ar,ge=L,L=lr):s?o+=ar:o=d+(ar-d)/(lr-ge)*(L-ge)},ir=function(){d=o=s?0:o,ge=L=0},rr=function(ar){var sr=ge,lr=d,cr=_getTime$1();return(ar||ar===0)&&ar!==o&&tr(ar),L===ge||cr-ge>er?0:(o+(s?lr:-lr))/((s?cr:L)-sr)*1e3};return{update:tr,reset:ir,getVelocity:rr}},_getEvent=function t(e,r){return r&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},_getAbsoluteMax=function t(e){var r=Math.max.apply(Math,e),s=Math.min.apply(Math,e);return Math.abs(r)>=Math.abs(s)?r:s},_setScrollTrigger=function t(){ScrollTrigger$1=gsap$1.core.globals().ScrollTrigger,ScrollTrigger$1&&ScrollTrigger$1.core&&_integrate()},_initCore=function t(e){return gsap$1=e||_getGSAP$1(),!_coreInitted$1&&gsap$1&&typeof document<"u"&&document.body&&(_win$1=window,_doc$1=document,_docEl$1=_doc$1.documentElement,_body$1=_doc$1.body,_root$1=[_win$1,_doc$1,_docEl$1,_body$1],gsap$1.utils.clamp,_context$1=gsap$1.core.context||function(){},_pointerType="onpointerenter"in _body$1?"pointer":"mouse",_isTouch=Observer.isTouch=_win$1.matchMedia&&_win$1.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in _win$1||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,_eventTypes=Observer.eventTypes=("ontouchstart"in _docEl$1?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in _docEl$1?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return _startup$1=0},500),_setScrollTrigger(),_coreInitted$1=1),_coreInitted$1};_horizontal.op=_vertical;_scrollers.cache=0;var Observer=function(){function t(r){this.init(r)}var e=t.prototype;return e.init=function(s){_coreInitted$1||_initCore(gsap$1)||console.warn("Please gsap.registerPlugin(Observer)"),ScrollTrigger$1||_setScrollTrigger();var o=s.tolerance,d=s.dragMinimum,L=s.type,ge=s.target,Mt=s.lineHeight,er=s.debounce,tr=s.preventDefault,ir=s.onStop,rr=s.onStopDelay,nr=s.ignore,ar=s.wheelSpeed,sr=s.event,lr=s.onDragStart,cr=s.onDragEnd,ur=s.onDrag,or=s.onPress,dr=s.onRelease,hr=s.onRight,pr=s.onLeft,mr=s.onUp,vr=s.onDown,Er=s.onChangeX,Cr=s.onChangeY,Pr=s.onChange,kr=s.onToggleX,Mr=s.onToggleY,Ur=s.onHover,$r=s.onHoverEnd,yr=s.onMove,xr=s.ignoreCheck,gr=s.isNormalizer,_r=s.onGestureStart,wr=s.onGestureEnd,Ir=s.onWheel,Hr=s.onEnable,Yr=s.onDisable,Jr=s.onClick,xi=s.scrollSpeed,di=s.capture,Vr=s.allowClicks,Zr=s.lockAxis,Qr=s.onLockAxis;this.target=ge=_getTarget(ge)||_docEl$1,this.vars=s,nr&&(nr=gsap$1.utils.toArray(nr)),o=o||1e-9,d=d||0,ar=ar||1,xi=xi||1,L=L||"wheel,touch,pointer",er=er!==!1,Mt||(Mt=parseFloat(_win$1.getComputedStyle(_body$1).lineHeight)||22);var Ai,Mi,Dr,Lr,Nr,Wr,qr,Fr=this,Ti=0,Xr=0,Si=s.passive||!tr,jr=_getScrollFunc(ge,_horizontal),wi=_getScrollFunc(ge,_vertical),ki=jr(),Ii=wi(),Pi=~L.indexOf("touch")&&!~L.indexOf("pointer")&&_eventTypes[0]==="pointerdown",Di=_isViewport$1(ge),Oi=ge.ownerDocument||_doc$1,Wi=[0,0,0],Zi=[0,0,0],en=0,un=function(){return en=_getTime$1()},fn=function(Ki,ln){return(Fr.event=Ki)&&nr&&~nr.indexOf(Ki.target)||ln&&Pi&&Ki.pointerType!=="touch"||xr&&xr(Ki,ln)},an=function(){Fr._vx.reset(),Fr._vy.reset(),Mi.pause(),ir&&ir(Fr)},mn=function(){var Ki=Fr.deltaX=_getAbsoluteMax(Wi),ln=Fr.deltaY=_getAbsoluteMax(Zi),Ri=Math.abs(Ki)>=o,Xi=Math.abs(ln)>=o;Pr&&(Ri||Xi)&&Pr(Fr,Ki,ln,Wi,Zi),Ri&&(hr&&Fr.deltaX>
vendor: 6,290 bytes, lines 2162-2170
21620&&hr(Fr),pr&&Fr.deltaX<0&&pr(Fr),Er&&Er(Fr),kr&&Fr.deltaX<0!=Ti<0&&kr(Fr),Ti=Fr.deltaX,Wi[0]=Wi[1]=Wi[2]=0),Xi&&(vr&&Fr.deltaY>0&&vr(Fr),mr&&Fr.deltaY<0&&mr(Fr),Cr&&Cr(Fr),Mr&&Fr.deltaY<0!=Xr<0&&Mr(Fr),Xr=Fr.deltaY,Zi[0]=Zi[1]=Zi[2]=0),(Lr||Dr)&&(yr&&yr(Fr),Dr&&(ur(Fr),Dr=!1),Lr=!1),Wr&&!(Wr=!1)&&Qr&&Qr(Fr),Nr&&(Ir(Fr),Nr=!1),Ai=0},on=function(Ki,ln,Ri){Wi[Ri]+=Ki,Zi[Ri]+=ln,Fr._vx.update(Ki),Fr._vy.update(ln),er?Ai||(Ai=requestAnimationFrame(mn)):mn()},Pn=function(Ki,ln){Zr&&!qr&&(Fr.axis=qr=Math.abs(Ki)>Math.abs(ln)?"x":"y",Wr=!0),qr!=="y"&&(Wi[2]+=Ki,Fr._vx.update(Ki,!0)),qr!=="x"&&(Zi[2]+=ln,Fr._vy.update(ln,!0)),er?Ai||(Ai=requestAnimationFrame(mn)):mn()},Un=function(Ki){if(!fn(Ki,1)){Ki=_getEvent(Ki,tr);var ln=Ki.clientX,Ri=Ki.clientY,Xi=ln-Fr.x,Bi=Ri-Fr.y,Yi=Fr.isDragging;Fr.x=ln,Fr.y=Ri,(Yi||Math.abs(Fr.startX-ln)>=d||Math.abs(Fr.startY-Ri)>=d)&&(ur&&(Dr=!0),Yi||(Fr.isDragging=!0),Pn(Xi,Bi),Yi||lr&&lr(Fr))}},Xn=Fr.onPress=function(Qi){fn(Qi,1)||Qi&&Qi.button||(Fr.axis=qr=null,Mi.pause(),Fr.isPressed=!0,Qi=_getEvent(Qi),Ti=Xr=0,Fr.startX=Fr.x=Qi.clientX,Fr.startY=Fr.y=Qi.clientY,Fr._vx.reset(),Fr._vy.reset(),_addListener$1(gr?ge:Oi,_eventTypes[1],Un,Si,!0),Fr.deltaX=Fr.deltaY=0,or&&or(Fr))},tn=Fr.onRelease=function(Qi){if(!fn(Qi,1)){_removeListener$1(gr?ge:Oi,_eventTypes[1],Un,!0);var Ki=!isNaN(Fr.y-Fr.startY),ln=Fr.isDragging,Ri=ln&&(Math.abs(Fr.x-Fr.startX)>3||Math.abs(Fr.y-Fr.startY)>3),Xi=_getEvent(Qi);!Ri&&Ki&&(Fr._vx.reset(),Fr._vy.reset(),tr&&Vr&&gsap$1.delayedCall(.08,function(){if(_getTime$1()-en>300&&!Qi.defaultPrevented){if(Qi.target.click)Qi.target.click();else if(Oi.createEvent){var Bi=Oi.createEvent("MouseEvents");Bi.initMouseEvent("click",!0,!0,_win$1,1,Xi.screenX,Xi.screenY,Xi.clientX,Xi.clientY,!1,!1,!1,!1,0,null),Qi.target.dispatchEvent(Bi)}}})),Fr.isDragging=Fr.isGesturing=Fr.isPressed=!1,ir&&ln&&!gr&&Mi.restart(!0),cr&&ln&&cr(Fr),dr&&dr(Fr,Ri)}},Jn=function(Ki){return Ki.touches&&Ki.touches.length>1&&(Fr.isGesturing=!0)&&_r(Ki,Fr.isDragging)},Vn=function(){return(Fr.isGesturing=!1)||wr(Fr)},Fn=function(Ki){if(!fn(Ki)){var ln=jr(),Ri=wi();on((ln-ki)*xi,(Ri-Ii)*xi,1),ki=ln,Ii=Ri,ir&&Mi.restart(!0)}},Gn=function(Ki){if(!fn(Ki)){Ki=_getEvent(Ki,tr),Ir&&(Nr=!0);var ln=(Ki.deltaMode===1?Mt:Ki.deltaMode===2?_win$1.innerHeight:1)*ar;on(Ki.deltaX*ln,Ki.deltaY*ln,0),ir&&!gr&&Mi.restart(!0)}},Yn=function(Ki){if(!fn(Ki)){var ln=Ki.clientX,Ri=Ki.clientY,Xi=ln-Fr.x,Bi=Ri-Fr.y;Fr.x=ln,Fr.y=Ri,Lr=!0,ir&&Mi.restart(!0),(Xi||Bi)&&Pn(Xi,Bi)}},Zn=function(Ki){Fr.event=Ki,Ur(Fr)},Kn=function(Ki){Fr.event=Ki,$r(Fr)},rs=function(Ki){return fn(Ki)||_getEvent(Ki,tr)&&Jr(Fr)};Mi=Fr._dc=gsap$1.delayedCall(rr||.25,an).pause(),Fr.deltaX=Fr.deltaY=0,Fr._vx=_getVelocityProp(0,50,!0),Fr._vy=_getVelocityProp(0,50,!0),Fr.scrollX=jr,Fr.scrollY=wi,Fr.isDragging=Fr.isGesturing=Fr.isPressed=!1,_context$1(this),Fr.enable=function(Qi){return Fr.isEnabled||(_addListener$1(Di?Oi:ge,"scroll",_onScroll$1),L.indexOf("scroll")>=0&&_addListener$1(Di?Oi:ge,"scroll",Fn,Si,di),L.indexOf("wheel")>=0&&_addListener$1(ge,"wheel",Gn,Si,di),(L.indexOf("touch")>=0&&_isTouch||L.indexOf("pointer")>=0)&&(_addListener$1(ge,_eventTypes[0],Xn,Si,di),_addListener$1(Oi,_eventTypes[2],tn),_addListener$1(Oi,_eventTypes[3],tn),Vr&&_addListener$1(ge,"click",un,!0,!0),Jr&&_addListener$1(ge,"click",rs),_r&&_addListener$1(Oi,"gesturestart",Jn),wr&&_addListener$1(Oi,"gestureend",Vn),Ur&&_addListener$1(ge,_pointerType+"enter",Zn),$r&&_addListener$1(ge,_pointerType+"leave",Kn),yr&&_addListener$1(ge,_pointerType+"move",Yn)),Fr.isEnabled=!0,Qi&&Qi.type&&Xn(Qi),Hr&&Hr(Fr)),Fr},Fr.disable=function(){Fr.isEnabled&&(_observers.filter(function(Qi){return Qi!==Fr&&_isViewport$1(Qi.target)}).length||_removeListener$1(Di?Oi:ge,"scroll",_onScroll$1),Fr.isPressed&&(Fr._vx.reset(),Fr._vy.reset(),_removeListener$1(gr?ge:Oi,_eventTypes[1],Un,!0)),_removeListener$1(Di?Oi:ge,"scroll",Fn,di),_removeListener$1(ge,"wheel",Gn,di),_removeListener$1(ge,_eventTypes[0],Xn,di),_removeListener$1(Oi,_eventTypes[2],tn),_removeListener$1(Oi,_eventTypes[3],tn),_removeListener$1(ge,"click",un,!0),_removeListener$1(ge,"click",rs),_removeListener$1(Oi,"gesturestart",Jn),_removeListener$1(Oi,"gestureend",Vn),_removeListener$1(ge,_pointerType+"enter",Zn),_removeListener$1(ge,_pointerType+"leave",Kn),_removeListener$1(ge,_pointerType+"move",Yn),Fr.isEnabled=Fr.isPressed=Fr.isDragging=!1,Yr&&Yr(Fr))},Fr.kill=Fr.revert=function(){Fr.disable();var Qi=_observers.indexOf(Fr);Qi>=0&&_observers.splice(Qi,1),_normalizer$1===Fr&&(_normalizer$1=0)},_observers.push(Fr),gr&&_isViewport$1(ge)&&(_normalizer$1=Fr),Fr.enable(sr)},_createClass(t,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),t}();Observer.version="3.12.5";Observer.create=function(t){return new Observer(t)};Observer.register=_initCore;Observer.getAll=function(){return _observers.slice()};Observer.getById=function(t){return _observers.filter(function(e){return e.vars.id===t})[0]};_getGSAP$1()&&gsap$1.registerPlugin(Observer);/*! 2163 * ScrollTrigger 3.12.5 2164 * https://gsap.com 2165 * 2166 * @license Copyright 2008-2024, GreenSock. All rights reserved. 2167 * Subject to the terms at https://gsap.com/standard-license or for 2168 * Club GSAP members, the agreement issued with that membership. 2169 * @author: Jack Doyle, [email protected] 2170*/var gsap,_coreInitted,_win,_doc,_docEl,_body,_root,_resizeDelay,_toArray,_clamp,_time2,_syncInterval,_refreshing,_pointerIsDown,_transformProp,_i,_prevWidth,_prevHeight,_autoRefresh,_sort,_suppressOverwrites,_ignoreResize,_normalizer,_ignoreMobileResize,_baseScreenHeight,_baseScreenWidth,_fixIOSBug,_context,_scrollRestoration,_div100vh,_100vh,_isReverted,_clampingMax,_limitCallbacks,_startup=1,_getTime=Date.now,_time1=_getTime(),_lastScrollTime=0,_enabled=0,_parseClamp=function t(e,r,s){var o=_isString(e)&&(e.substr(0,6)==="clamp("||e.indexOf("max")>-1);return s["_"+r+"Clamp"]=o,o?e.substr(6,e.length-7):e},_keepClamp=function t(e,r){return r&&(!_isString(e)||e.substr(0,6)!=="clamp(")?"clamp("+e+")":e},_rafBugFix=function t(){return _enabled&&requestAnimationFrame(t)},_pointerDownHandler=function t(){return _pointerIsDown=1},_pointerUpHandler=function t(){return _pointerIsDown=0},_passThrough=function t(e){return e}
vendor: 33,474 bytes, line 2170
2170,_round=function t(e){return Math.round(e*1e5)/1e5||0},_windowExists=function t(){return typeof window<"u"},_getGSAP=function t(){return gsap||_windowExists()&&(gsap=window.gsap)&&gsap.registerPlugin&&gsap},_isViewport=function t(e){return!!~_root.indexOf(e)},_getViewportDimension=function t(e){return(e==="Height"?_100vh:_win["inner"+e])||_docEl["client"+e]||_body["client"+e]},_getBoundsFunc=function t(e){return _getProxyProp(e,"getBoundingClientRect")||(_isViewport(e)?function(){return _winOffsets.width=_win.innerWidth,_winOffsets.height=_100vh,_winOffsets}:function(){return _getBounds(e)})},_getSizeFunc=function t(e,r,s){var o=s.d,d=s.d2,L=s.a;return(L=_getProxyProp(e,"getBoundingClientRect"))?function(){return L()[o]}:function(){return(r?_getViewportDimension(d):e["client"+d])||0}},_getOffsetsFunc=function t(e,r){return!r||~_proxies.indexOf(e)?_getBoundsFunc(e):function(){return _winOffsets}},_maxScroll=function t(e,r){var s=r.s,o=r.d2,d=r.d,L=r.a;return Math.max(0,(s="scroll"+o)&&(L=_getProxyProp(e,s))?L()-_getBoundsFunc(e)()[d]:_isViewport(e)?(_docEl[s]||_body[s])-_getViewportDimension(o):e[s]-e["offset"+o])},_iterateAutoRefresh=function t(e,r){for(var s=0;s<_autoRefresh.length;s+=3)(!r||~r.indexOf(_autoRefresh[s+1]))&&e(_autoRefresh[s],_autoRefresh[s+1],_autoRefresh[s+2])},_isString=function t(e){return typeof e=="string"},_isFunction=function t(e){return typeof e=="function"},_isNumber=function t(e){return typeof e=="number"},_isObject=function t(e){return typeof e=="object"},_endAnimation=function t(e,r,s){return e&&e.progress(r?0:1)&&s&&e.pause()},_callback=function t(e,r){if(e.enabled){var s=e._ctx?e._ctx.add(function(){return r(e)}):r(e);s&&s.totalTime&&(e.callbackAnimation=s)}},_abs=Math.abs,_left="left",_top="top",_right="right",_bottom="bottom",_width="width",_height="height",_Right="Right",_Left="Left",_Top="Top",_Bottom="Bottom",_padding="padding",_margin="margin",_Width="Width",_Height="Height",_px="px",_getComputedStyle=function t(e){return _win.getComputedStyle(e)},_makePositionable=function t(e){var r=_getComputedStyle(e).position;e.style.position=r==="absolute"||r==="fixed"?r:"relative"},_setDefaults=function t(e,r){for(var s in r)s in e||(e[s]=r[s]);return e},_getBounds=function t(e,r){var s=r&&_getComputedStyle(e)[_transformProp]!=="matrix(1, 0, 0, 1, 0, 0)"&&gsap.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),o=e.getBoundingClientRect();return s&&s.progress(0).kill(),o},_getSize=function t(e,r){var s=r.d2;return e["offset"+s]||e["client"+s]||0},_getLabelRatioArray=function t(e){var r=[],s=e.labels,o=e.duration(),d;for(d in s)r.push(s[d]/o);return r},_getClosestLabel=function t(e){return function(r){return gsap.utils.snap(_getLabelRatioArray(e),r)}},_snapDirectional=function t(e){var r=gsap.utils.snap(e),s=Array.isArray(e)&&e.slice(0).sort(function(o,d){return o-d});return s?function(o,d,L){L===void 0&&(L=.001);var ge;if(!d)return r(o);if(d>0){for(o-=L,ge=0;ge<s.length;ge++)if(s[ge]>=o)return s[ge];return s[ge-1]}else for(ge=s.length,o+=L;ge--;)if(s[ge]<=o)return s[ge];return s[0]}:function(o,d,L){L===void 0&&(L=.001);var ge=r(o);return!d||Math.abs(ge-o)<L||ge-o<0==d<0?ge:r(d<0?o-e:o+e)}},_getLabelAtDirection=function t(e){return function(r,s){return _snapDirectional(_getLabelRatioArray(e))(r,s.direction)}},_multiListener=function t(e,r,s,o){return s.split(",").forEach(function(d){return e(r,d,o)})},_addListener=function t(e,r,s,o,d){return e.addEventListener(r,s,{passive:!o,capture:!!d})},_removeListener=function t(e,r,s,o){return e.removeEventListener(r,s,!!o)},_wheelListener=function t(e,r,s){s=s&&s.wheelHandler,s&&(e(r,"wheel",s),e(r,"touchmove",s))},_markerDefaults={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},_defaults={toggleActions:"play",anticipatePin:0},_keywords={top:0,left:0,center:.5,bottom:1,right:1},_offsetToPx=function t(e,r){if(_isString(e)){var s=e.indexOf("="),o=~s?+(e.charAt(s-1)+1)*parseFloat(e.substr(s+1)):0;~s&&(e.indexOf("%")>s&&(o*=r/100),e=e.substr(0,s-1)),e=o+(e in _keywords?_keywords[e]*r:~e.indexOf("%")?parseFloat(e)*r/100:parseFloat(e)||0)}return e},_createMarker=function t(e,r,s,o,d,L,ge,Mt){var er=d.startColor,tr=d.endColor,ir=d.fontSize,rr=d.indent,nr=d.fontWeight,ar=_doc.createElement("div"),sr=_isViewport(s)||_getProxyProp(s,"pinType")==="fixed",lr=e.indexOf("scroller")!==-1,cr=sr?_body:s,ur=e.indexOf("start")!==-1,or=ur?er:tr,dr="border-color:"+or+";font-size:"+ir+";color:"+or+";font-weight:"+nr+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return dr+="position:"+((lr||Mt)&&sr?"fixed;":"absolute;"),(lr||Mt||!sr)&&(dr+=(o===_vertical?_right:_bottom)+":"+(L+parseFloat(rr))+"px;"),ge&&(dr+="box-sizing:border-box;text-align:left;width:"+ge.offsetWidth+"px;"),ar._isStart=ur,ar.setAttribute("class","gsap-marker-"+e+(r?" marker-"+r:"")),ar.style.cssText=dr,ar.innerText=r||r===0?e+"-"+r:e,cr.children[0]?cr.insertBefore(ar,cr.children[0]):cr.appendChild(ar),ar._offset=ar["offset"+o.op.d2],_positionMarker(ar,0,o,ur),ar},_positionMarker=function t(e,r,s,o){var d={display:"block"},L=s[o?"os2":"p2"],ge=s[o?"p2":"os2"];e._isFlipped=o,d[s.a+"Percent"]=o?-100:0,d[s.a]=o?"1px":0,d["border"+L+_Width]=1,d["border"+ge+_Width]=0,d[s.p]=r+"px",gsap.set(e,d)},_triggers=[],_ids={},_rafID,_sync=function t(){return _getTime()-_lastScrollTime>34&&(_rafID||(_rafID=requestAnimationFrame(_updateAll)))},_onScroll=function t(){(!_normalizer||!_normalizer.isPressed||_normalizer.startX>_body.clientWidth)&&(_scrollers.cache++,_normalizer?_rafID||(_rafID=requestAnimationFrame(_updateAll)):_updateAll(),_lastScrollTime||_dispatch("scrollStart"),_lastScrollTime=_getTime())},_setBaseDimensions=function t(){_baseScreenWidth=_win.innerWidth,_baseScreenHeight=_win.innerHeight},_onResize=function t(){_scrollers.cache++,!_refreshing&&!_ignoreResize&&!_doc.fullscreenElement&&!_doc.webkitFullscreenElement&&(!_ignoreMobileResize||_baseScreenWidth!==_win.innerWidth||Math.abs(_win.innerHeight-_baseScreenHeight)>_win.innerHeight*.25)&&_resizeDelay.restart(!0)},_listeners={},_emptyArray=[],_softRefresh=function t(){return _removeListener(ScrollTrigger,"scrollEnd",t)||_refreshAll(!0)},_dispatch=function t(e){return _listeners[e]&&_listeners[e].map(function(r){return r()})||_emptyArray},_savedStyles=[],_revertRecorded=function t(e){for(var r=0;r<_savedStyles.length;r+=5)(!e||_savedStyles[r+4]&&_savedStyles[r+4].query===e)&&(_savedStyles[r].style.cssText=_savedStyles[r+1],_savedStyles[r].getBBox&&_savedStyles[r].setAttribute("transform",_savedStyles[r+2]||""),_savedStyles[r+3].uncache=1)},_revertAll=function t(e,r){var s;for(_i=0;_i<_triggers.length;_i++)s=_triggers[_i],s&&(!r||s._ctx===r)&&(e?s.kill(1):s.revert(!0,!0));_isReverted=!0,r&&_revertRecorded(r),r||_dispatch("revert")},_clearScrollMemory=function t(e,r){_scrollers.cache++,(r||!_refreshingAll)&&_scrollers.forEach(function(s){return _isFunction(s)&&s.cacheID++&&(s.rec=0)}),_isString(e)&&(_win.history.scrollRestoration=_scrollRestoration=e)},_refreshingAll,_refreshID=0,_queueRefreshID,_queueRefreshAll=function t(){if(_queueRefreshID!==_refreshID){var e=_queueRefreshID=_refreshID;requestAnimationFrame(function(){return e===_refreshID&&_refreshAll(!0)})}},_refresh100vh=function t(){_body.appendChild(_div100vh),_100vh=!_normalizer&&_div100vh.offsetHeight||_win.innerHeight,_body.removeChild(_div100vh)},_hideAllMarkers=function t(e){return _toArray(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(r){return r.style.display=e?"none":"block"})},_refreshAll=function t(e,r){if(_lastScrollTime&&!e&&!_isReverted){_addListener(ScrollTrigger,"scrollEnd",_softRefresh);return}_refresh100vh(),_refreshingAll=ScrollTrigger.isRefreshing=!0,_scrollers.forEach(function(o){return _isFunction(o)&&++o.cacheID&&(o.rec=o())});var s=_dispatch("refreshInit");_sort&&ScrollTrigger.sort(),r||_revertAll(),_scrollers.forEach(function(o){_isFunction(o)&&(o.smooth&&(o.target.style.scrollBehavior="auto"),o(0))}),_triggers.slice(0).forEach(function(o){return o.refresh()}),_isReverted=!1,_triggers.forEach(function(o){if(o._subPinOffset&&o.pin){var d=o.vars.horizontal?"offsetWidth":"offsetHeight",L=o.pin[d];o.revert(!0,1),o.adjustPinSpacing(o.pin[d]-L),o.refresh()}}),_clampingMax=1,_hideAllMarkers(!0),_triggers.forEach(function(o){var d=_maxScroll(o.scroller,o._dir),L=o.vars.end==="max"||o._endClamp&&o.end>d,ge=o._startClamp&&o.start>=d;(L||ge)&&o.setPositions(ge?d-1:o.start,L?Math.max(ge?d:o.start+1,d):o.end,!0)}),_hideAllMarkers(!1),_clampingMax=0,s.forEach(function(o){return o&&o.render&&o.render(-1)}),_scrollers.forEach(function(o){_isFunction(o)&&(o.smooth&&requestAnimationFrame(function(){return o.target.style.scrollBehavior="smooth"}),o.rec&&o(o.rec))}),_clearScrollMemory(_scrollRestoration,1),_resizeDelay.pause(),_refreshID++,_refreshingAll=2,_updateAll(2),_triggers.forEach(function(o){return _isFunction(o.vars.onRefresh)&&o.vars.onRefresh(o)}),_refreshingAll=ScrollTrigger.isRefreshing=!1,_dispatch("refresh")},_lastScroll=0,_direction=1,_primary,_updateAll=function t(e){if(e===2||!_refreshingAll&&!_isReverted){ScrollTrigger.isUpdating=!0,_primary&&_primary.update(0);var r=_triggers.length,s=_getTime(),o=s-_time1>=50,d=r&&_triggers[0].scroll();if(_direction=_lastScroll>d?-1:1,_refreshingAll||(_lastScroll=d),o&&(_lastScrollTime&&!_pointerIsDown&&s-_lastScrollTime>200&&(_lastScrollTime=0,_dispatch("scrollEnd")),_time2=_time1,_time1=s),_direction<0){for(_i=r;_i-- >0;)_triggers[_i]&&_triggers[_i].update(0,o);_direction=1}else for(_i=0;_i<r;_i++)_triggers[_i]&&_triggers[_i].update(0,o);ScrollTrigger.isUpdating=!1}_rafID=0},_propNamesToCopy=[_left,_top,_bottom,_right,_margin+_Bottom,_margin+_Right,_margin+_Top,_margin+_Left,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],_stateProps=_propNamesToCopy.concat([_width,_height,"boxSizing","max"+_Width,"max"+_Height,"position",_margin,_padding,_padding+_Top,_padding+_Right,_padding+_Bottom,_padding+_Left]),_swapPinOut=function t(e,r,s){_setState(s);var o=e._gsap;if(o.spacerIsNative)_setState(o.spacerState);else if(e._gsap.swappedIn){var d=r.parentNode;d&&(d.insertBefore(e,r),d.removeChild(r))}e._gsap.swappedIn=!1},_swapPinIn=function t(e,r,s,o){if(!e._gsap.swappedIn){for(var d=_propNamesToCopy.length,L=r.style,ge=e.style,Mt;d--;)Mt=_propNamesToCopy[d],L[Mt]=s[Mt];L.position=s.position==="absolute"?"absolute":"relative",s.display==="inline"&&(L.display="inline-block"),ge[_bottom]=ge[_right]="auto",L.flexBasis=s.flexBasis||"auto",L.overflow="visible",L.boxSizing="border-box",L[_width]=_getSize(e,_horizontal)+_px,L[_height]=_getSize(e,_vertical)+_px,L[_padding]=ge[_margin]=ge[_top]=ge[_left]="0",_setState(o),ge[_width]=ge["max"+_Width]=s[_width],ge[_height]=ge["max"+_Height]=s[_height],ge[_padding]=s[_padding],e.parentNode!==r&&(e.parentNode.insertBefore(r,e),r.appendChild(e)),e._gsap.swappedIn=!0}},_capsExp=/([A-Z])/g,_setState=function t(e){if(e){var r=e.t.style,s=e.length,o=0,d,L;for((e.t._gsap||gsap.core.getCache(e.t)).uncache=1;o<s;o+=2)L=e[o+1],d=e[o],L?r[d]=L:r[d]&&r.removeProperty(d.replace(_capsExp,"-$1").toLowerCase())}},_getState=function t(e){for(var r=_stateProps.length,s=e.style,o=[],d=0;d<r;d++)o.push(_stateProps[d],s[_stateProps[d]]);return o.t=e,o},_copyState=function t(e,r,s){for(var o=[],d=e.length,L=s?8:0,ge;L<d;L+=2)ge=e[L],o.push(ge,ge in r?r[ge]:e[L+1]);return o.t=e.t,o},_winOffsets={left:0,top:0},_parsePosition=function t(e,r,s,o,d,L,ge,Mt,er,tr,ir,rr,nr,ar){_isFunction(e)&&(e=e(Mt)),_isString(e)&&e.substr(0,3)==="max"&&(e=rr+(e.charAt(4)==="="?_offsetToPx("0"+e.substr(3),s):0));var sr=nr?nr.time():0,lr,cr,ur;if(nr&&nr.seek(0),isNaN(e)||(e=+e),_isNumber(e))nr&&(e=gsap.utils.mapRange(nr.scrollTrigger.start,nr.scrollTrigger.end,0,rr,e)),ge&&_positionMarker(ge,s,o,!0);else{_isFunction(r)&&(r=r(Mt));var or=(e||"0").split(" "),dr,hr,pr,mr;ur=_getTarget(r,Mt)||_body,dr=_getBounds(ur)||{},(!dr||!dr.left&&!dr.top)&&_getComputedStyle(ur).display==="none"&&(mr=ur.style.display,ur.style.display="block",dr=_getBounds(ur),mr?ur.style.display=mr:ur.style.removeProperty("display")),hr=_offsetToPx(or[0],dr[o.d]),pr=_offsetToPx(or[1]||"0",s),e=dr[o.p]-er[o.p]-tr+hr+d-pr,ge&&_positionMarker(ge,pr,o,s-pr<20||ge._isStart&&pr>20),s-=s-pr}if(ar&&(Mt[ar]=e||-.001,e<0&&(e=0)),L){var vr=e+s,Er=L._isStart;lr="scroll"+o.d2,_positionMarker(L,vr,o,Er&&vr>20||!Er&&(ir?Math.max(_body[lr],_docEl[lr]):L.parentNode[lr])<=vr+1),ir&&(er=_getBounds(ge),ir&&(L.style[o.op.p]=er[o.op.p]-o.op.m-L._offset+_px))}return nr&&ur&&(lr=_getBounds(ur),nr.seek(rr),cr=_getBounds(ur),nr._caScrollDist=lr[o.p]-cr[o.p],e=e/nr._caScrollDist*rr),nr&&nr.seek(sr),nr?e:Math.round(e)},_prefixExp=/(webkit|moz|length|cssText|inset)/i,_reparent=function t(e,r,s,o){if(e.parentNode!==r){var d=e.style,L,ge;if(r===_body){e._stOrig=d.cssText,ge=_getComputedStyle(e);for(L in ge)!+L&&!_prefixExp.test(L)&&ge[L]&&typeof d[L]=="string"&&L!=="0"&&(d[L]=ge[L]);d.top=s,d.left=o}else d.cssText=e._stOrig;gsap.core.getCache(e).uncache=1,r.appendChild(e)}},_interruptionTracker=function t(e,r,s){var o=r,d=o;return function(L){var ge=Math.round(e());return ge!==o&&ge!==d&&Math.abs(ge-o)>3&&Math.abs(ge-d)>3&&(L=ge,s&&s()),d=o,o=L,L}},_shiftMarker=function t(e,r,s){var o={};o[r.p]="+="+s,gsap.set(e,o)},_getTweenCreator=function t(e,r){var s=_getScrollFunc(e,r),o="_scroll"+r.p2,d=function L(ge,Mt,er,tr,ir){var rr=L.tween,nr=Mt.onComplete,ar={};er=er||s();var sr=_interruptionTracker(s,er,function(){rr.kill(),L.tween=0});return ir=tr&&ir||0,tr=tr||ge-er,rr&&rr.kill(),Mt[o]=ge,Mt.inherit=!1,Mt.modifiers=ar,ar[o]=function(){return sr(er+tr*rr.ratio+ir*rr.ratio*rr.ratio)},Mt.onUpdate=function(){_scrollers.cache++,L.tween&&_updateAll()},Mt.onComplete=function(){L.tween=0,nr&&nr.call(rr)},rr=L.tween=gsap.to(e,Mt),rr};return e[o]=s,s.wheelHandler=function(){return d.tween&&d.tween.kill()&&(d.tween=0)},_addListener(e,"wheel",s.wheelHandler),ScrollTrigger.isTouch&&_addListener(e,"touchmove",s.wheelHandler),d},ScrollTrigger=function(){function t(r,s){_coreInitted||t.register(gsap)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),_context(this),this.init(r,s)}var e=t.prototype;return e.init=function(s,o){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!_enabled){this.update=this.refresh=this.kill=_passThrough;return}s=_setDefaults(_isString(s)||_isNumber(s)||s.nodeType?{trigger:s}:s,_defaults);var d=s,L=d.onUpdate,ge=d.toggleClass,Mt=d.id,er=d.onToggle,tr=d.onRefresh,ir=d.scrub,rr=d.trigger,nr=d.pin,ar=d.pinSpacing,sr=d.invalidateOnRefresh,lr=d.anticipatePin,cr=d.onScrubComplete,ur=d.onSnapComplete,or=d.once,dr=d.snap,hr=d.pinReparent,pr=d.pinSpacer,mr=d.containerAnimation,vr=d.fastScrollEnd,Er=d.preventOverlaps,Cr=s.horizontal||s.containerAnimation&&s.horizontal!==!1?_horizontal:_vertical,Pr=!ir&&ir!==0,kr=_getTarget(s.scroller||_win),Mr=gsap.core.getCache(kr),Ur=_isViewport(kr),$r=("pinType"in s?s.pinType:_getProxyProp(kr,"pinType")||Ur&&"fixed")==="fixed",yr=[s.onEnter,s.onLeave,s.onEnterBack,s.onLeaveBack],xr=Pr&&s.toggleActions.split(" "),gr="markers"in s?s.markers:_defaults.markers,_r=Ur?0:parseFloat(_getComputedStyle(kr)["border"+Cr.p2+_Width])||0,wr=this,Ir=s.onRefreshInit&&function(){return s.onRefreshInit(wr)},Hr=_getSizeFunc(kr,Ur,Cr),Yr=_getOffsetsFunc(kr,Ur),Jr=0,xi=0,di=0,Vr=_getScrollFunc(kr,Cr),Zr,Qr,Ai,Mi,Dr,Lr,Nr,Wr,qr,Fr,Ti,Xr,Si,jr,wi,ki,Ii,Pi,Di,Oi,Wi,Zi,en,un,fn,an,mn,on,Pn,Un,Xn,tn,Jn,Vn,Fn,Gn,Yn,Zn,Kn;if(wr._startClamp=wr._endClamp=!1,wr._dir=Cr,lr*=45,wr.scroller=kr,wr.scroll=mr?mr.time.bind(mr):Vr,Mi=Vr(),wr.vars=s,o=o||s.animation,"refreshPriority"in s&&(_sort=1,s.refreshPriority===-9999&&(_primary=wr)),Mr.tweenScroll=Mr.tweenScroll||{top:_getTweenCreator(kr,_vertical),left:_getTweenCreator(kr,_horizontal)},wr.tweenTo=Zr=Mr.tweenScroll[Cr.p],wr.scrubDuration=function(Ri){Jn=_isNumber(Ri)&&Ri,Jn?tn?tn.duration(Ri):tn=gsap.to(o,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:Jn,paused:!0,onComplete:function(){return cr&&cr(wr)}}):(tn&&tn.progress(1).kill(),tn=0)},o&&(o.vars.lazy=!1,o._initted&&!wr.isReverted||o.vars.immediateRender!==!1&&s.immediateRender!==!1&&o.duration()&&o.render(0,!0,!0),wr.animation=o.pause(),o.scrollTrigger=wr,wr.scrubDuration(ir),Un=0,Mt||(Mt=o.vars.id)),dr&&((!_isObject(dr)||dr.push)&&(dr={snapTo:dr}),"scrollBehavior"in _body.style&&gsap.set(Ur?[_body,_docEl]:kr,{scrollBehavior:"auto"}),_scrollers.forEach(function(Ri){return _isFunction(Ri)&&Ri.target===(Ur?_doc.scrollingElement||_docEl:kr)&&(Ri.smooth=!1)}),Ai=_isFunction(dr.snapTo)?dr.snapTo:dr.snapTo==="labels"?_getClosestLabel(o):dr.snapTo==="labelsDirectional"?_getLabelAtDirection(o):dr.directional!==!1?function(Ri,Xi){return _snapDirectional(dr.snapTo)(Ri,_getTime()-xi<500?0:Xi.direction)}:gsap.utils.snap(dr.snapTo),Vn=dr.duration||{min:.1,max:2},Vn=_isObject(Vn)?_clamp(Vn.min,Vn.max):_clamp(Vn,Vn),Fn=gsap.delayedCall(dr.delay||Jn/2||.1,function(){var Ri=Vr(),Xi=_getTime()-xi<500,Bi=Zr.tween;if((Xi||Math.abs(wr.getVelocity())<10)&&!Bi&&!_pointerIsDown&&Jr!==Ri){var Yi=(Ri-Lr)/jr,wn=o&&!Pr?o.totalProgress():Yi,rn=Xi?0:(wn-Xn)/(_getTime()-_time2)*1e3||0,En=gsap.utils.clamp(-Yi,1-Yi,_abs(rn/2)*rn/.185),$n=Yi+(dr.inertia===!1?0:En),_n,cn,pn=dr,Bn=pn.onStart,vn=pn.onInterrupt,Nn=pn.onComplete;if(_n=Ai($n,wr),_isNumber(_n)||(_n=$n),cn=Math.round(Lr+_n*jr),Ri<=Nr&&Ri>=Lr&&cn!==Ri){if(Bi&&!Bi._initted&&Bi.data<=_abs(cn-Ri))return;dr.inertia===!1&&(En=_n-Yi),Zr(cn,{duration:Vn(_abs(Math.max(_abs($n-wn),_abs(_n-wn))*.185/rn/.05||0)),ease:dr.ease||"power3",data:_abs(cn-Ri),onInterrupt:function(){return Fn.restart(!0)&&vn&&vn(wr)},onComplete:function(){wr.update(),Jr=Vr(),o&&(tn?tn.resetTo("totalProgress",_n,o._tTime/o._tDur):o.progress(_n)),Un=Xn=o&&!Pr?o.totalProgress():wr.progress,ur&&ur(wr),Nn&&Nn(wr)}},Ri,En*jr,cn-Ri-En*jr),Bn&&Bn(wr,Zr.tween)}}else wr.isActive&&Jr!==Ri&&Fn.restart(!0)}).pause()),Mt&&(_ids[Mt]=wr),rr=wr.trigger=_getTarget(rr||nr!==!0&&nr),Kn=rr&&rr._gsap&&rr._gsap.stRevert,Kn&&(Kn=Kn(wr)),nr=nr===!0?rr:_getTarget(nr),_isString(ge)&&(ge={targets:rr,className:ge}),nr&&(ar===!1||ar===_margin||(ar=!ar&&nr.parentNode&&nr.parentNode.style&&_getComputedStyle(nr.parentNode).display==="flex"?!1:_padding),wr.pin=nr,Qr=gsap.core.getCache(nr),Qr.spacer?wi=Qr.pinState:(pr&&(pr=_getTarget(pr),pr&&!pr.nodeType&&(pr=pr.current||pr.nativeElement),Qr.spacerIsNative=!!pr,pr&&(Qr.spacerState=_getState(pr))),Qr.spacer=Pi=pr||_doc.createElement("div"),Pi.classList.add("pin-spacer"),Mt&&Pi.classList.add("pin-spacer-"+Mt),Qr.pinState=wi=_getState(nr)),s.force3D!==!1&&gsap.set(nr,{force3D:!0}),wr.spacer=Pi=Qr.spacer,Pn=_getComputedStyle(nr),un=Pn[ar+Cr.os2],Oi=gsap.getProperty(nr),Wi=gsap.quickSetter(nr,Cr.a,_px),_swapPinIn(nr,Pi,Pn),Ii=_getState(nr)),gr){Xr=_isObject(gr)?_setDefaults(gr,_markerDefaults):_markerDefaults,Fr=_createMarker("scroller-start",Mt,kr,Cr,Xr,0),Ti=_createMarker("scroller-end",Mt,kr,Cr,Xr,0,Fr),Di=Fr["offset"+Cr.op.d2];var rs=_getTarget(_getProxyProp(kr,"content")||kr);Wr=this.markerStart=_createMarker("start",Mt,rs,Cr,Xr,Di,0,mr),qr=this.markerEnd=_createMarker("end",Mt,rs,Cr,Xr,Di,0,mr),mr&&(Zn=gsap.quickSetter([Wr,qr],Cr.a,_px)),!$r&&!(_proxies.length&&_getProxyProp(kr,"fixedMarkers")===!0)&&(_makePositionable(Ur?_body:kr),gsap.set([Fr,Ti],{force3D:!0}),an=gsap.quickSetter(Fr,Cr.a,_px),on=gsap.quickSetter(Ti,Cr.a,_px))}if(mr){var Qi=mr.vars.onUpdate,Ki=mr.vars.onUpdateParams;mr.eventCallback("onUpdate",function(){wr.update(0,0,1),Qi&&Qi.apply(mr,Ki||[])})}if(wr.previous=function(){return _triggers[_triggers.indexOf(wr)-1]},wr.next=function(){return _triggers[_triggers.indexOf(wr)+1]},wr.revert=function(Ri,Xi){if(!Xi)return wr.kill(!0);var Bi=Ri!==!1||!wr.enabled,Yi=_refreshing;Bi!==wr.isReverted&&(Bi&&(Gn=Math.max(Vr(),wr.scroll.rec||0),di=wr.progress,Yn=o&&o.progress()),Wr&&[Wr,qr,Fr,Ti].forEach(function(wn){return wn.style.display=Bi?"none":"block"}),Bi&&(_refreshing=wr,wr.update(Bi)),nr&&(!hr||!wr.isActive)&&(Bi?_swapPinOut(nr,Pi,wi):_swapPinIn(nr,Pi,_getComputedStyle(nr),fn)),Bi||wr.update(Bi),_refreshing=Yi,wr.isReverted=Bi)},wr.refresh=function(Ri,Xi,Bi,Yi){if(!((_refreshing||!wr.enabled)&&!Xi)){if(nr&&Ri&&_lastScrollTime){_addListener(t,"scrollEnd",_softRefresh);return}!_refreshingAll&&Ir&&Ir(wr),_refreshing=wr,Zr.tween&&!Bi&&(Zr.tween.kill(),Zr.tween=0),tn&&tn.pause(),sr&&o&&o.revert({kill:!1}).invalidate(),wr.isReverted||wr.revert(!0,!0),wr._subPinOffset=!1;var wn=Hr(),rn=Yr(),En=mr?mr.duration():_maxScroll(kr,Cr),$n=jr<=.01,_n=0,cn=Yi||0,pn=_isObject(Bi)?Bi.end:s.end,Bn=s.endTrigger||rr,vn=_isObject(Bi)?Bi.start:s.start||(s.start===0||!rr?0:nr?"0 0":"0 100%"),Nn=wr.pinnedContainer=s.pinnedContainer&&_getTarget(s.pinnedContainer,wr),Hn=rr&&Math.max(0,_triggers.indexOf(wr))||0,Rn=Hn,yn,Sn,es,cs,Cn,In,jn,hs,ys,ns,Wn,ss,us;for(gr&&_isObject(Bi)&&(ss=gsap.getProperty(Fr,Cr.p),us=gsap.getProperty(Ti,Cr.p));Rn--;)In=_triggers[Rn],In.end||In.refresh(0,1)||(_refreshing=wr),jn=In.pin,jn&&(jn===rr||jn===nr||jn===Nn)&&!In.isReverted&&(ns||(ns=[]),ns.unshift(In),In.revert(!0,!0)),In!==_triggers[Rn]&&(Hn--,Rn--);for(_isFunction(vn)&&(vn=vn(wr)),vn=_parseClamp(vn,"start",wr),Lr=_parsePosition(vn,rr,wn,Cr,Vr(),Wr,Fr,wr,rn,_r,$r,En,mr,wr._startClamp&&"_startClamp")||(nr?-.001:0),_isFunction(pn)&&(pn=pn(wr)),_isString(pn)&&!pn.indexOf("+=")&&(~pn.indexOf(" ")?pn=(_isString(vn)?vn.split(" ")[0]:"")+pn:(_n=_offsetToPx(pn.substr(2),wn),pn=_isString(vn)?vn:(mr?gsap.utils.mapRange(0,mr.duration(),mr.scrollTrigger.start,mr.scrollTrigger.end,Lr):Lr)+_n,Bn=rr)),pn=_parseClamp(pn,"end",wr),Nr=Math.max(Lr,_parsePosition(pn||(Bn?"100% 0":En),Bn,wn,Cr,Vr()+_n,qr,Ti,wr,rn,_r,$r,En,mr,wr._endClamp&&"_endClamp"))||-.001,_n=0,Rn=Hn;Rn--;)In=_triggers[Rn],jn=In.pin,jn&&In.start-In._pinPush<=Lr&&!mr&&In.end>0&&(yn=In.end-(wr._startClamp?Math.max(0,In.start):In.start),(jn===rr&&In.start-In._pinPush<Lr||jn===Nn)&&isNaN(vn)&&(_n+=yn*(1-In.progress)),jn===nr&&(cn+=yn));if(Lr+=_n,Nr+=_n,wr._startClamp&&(wr._startClamp+=_n),wr._endClamp&&!_refreshingAll&&(wr._endClamp=Nr||-.001,Nr=Math.min(Nr,_maxScroll(kr,Cr))),jr=Nr-Lr||(Lr-=.01)&&.001,$n&&(di=gsap.utils.clamp(0,1,gsap.utils.normalize(Lr,Nr,Gn))),wr._pinPush=cn,Wr&&_n&&(yn={},yn[Cr.a]="+="+_n,Nn&&(yn[Cr.p]="-="+Vr()),gsap.set([Wr,qr],yn)),nr&&!(_clampingMax&&wr.end>=_maxScroll(kr,Cr)))yn=_getComputedStyle(nr),cs=Cr===_vertical,es=Vr(),Zi=parseFloat(Oi(Cr.a))+cn,!En&&Nr>1&&(Wn=(Ur?_doc.scrollingElement||_docEl:kr).style,Wn={style:Wn,value:Wn["overflow"+Cr.a.toUpperCase()]},Ur&&_getComputedStyle(_body)["overflow"+Cr.a.toUpperCase()]!=="scroll"&&(Wn.style["overflow"+Cr.a.toUpperCase()]="scroll")),_swapPinIn(nr,Pi,yn),Ii=_getState(nr),Sn=_getBounds(nr,!0),hs=$r&&_getScrollFunc(kr,cs?_horizontal:_vertical)(),ar?(fn=[ar+Cr.os2,jr+cn+_px],fn.t=Pi,Rn=ar===_padding?_getSize(nr,Cr)+jr+cn:0,Rn&&(fn.push(Cr.d,Rn+_px),Pi.style.flexBasis!=="auto"&&(Pi.style.flexBasis=Rn+_px)),_setState(fn),Nn&&_triggers.forEach(function(as){as.pin===Nn&&as.vars.pinSpacing!==!1&&(as._subPinOffset=!0)}),$r&&Vr(Gn)):(Rn=_getSize(nr,Cr),Rn&&Pi.style.flexBasis!=="auto"&&(Pi.style.flexBasis=Rn+_px)),$r&&(Cn={top:Sn.top+(cs?es-Lr:hs)+_px,left:Sn.left+(cs?hs:es-Lr)+_px,boxSizing:"border-box",position:"fixed"},Cn[_width]=Cn["max"+_Width]=Math.ceil(Sn.width)+_px,Cn[_height]=Cn["max"+_Height]=Math.ceil(Sn.height)+_px,Cn[_margin]=Cn[_margin+_Top]=Cn[_margin+_Right]=Cn[_margin+_Bottom]=Cn[_margin+_Left]="0",Cn[_padding]=yn[_padding],Cn[_padding+_Top]=yn[_padding+_Top],Cn[_padding+_Right]=yn[_padding+_Right],Cn[_padding+_Bottom]=yn[_padding+_Bottom],Cn[_padding+_Left]=yn[_padding+_Left],ki=_copyState(wi,Cn,hr),_refreshingAll&&Vr(0)),o?(ys=o._initted,_suppressOverwrites(1),o.render(o.duration(),!0,!0),en=Oi(Cr.a)-Zi+jr+cn,mn=Math.abs(jr-en)>1,$r&&mn&&ki.splice(ki.length-2,2),o.render(0,!0,!0),ys||o.invalidate(!0),o.parent||o.totalTime(o.totalTime()),_suppressOverwrites(0)):en=jr,Wn&&(Wn.value?Wn.style["overflow"+Cr.a.toUpperCase()]=Wn.value:Wn.style.removeProperty("overflow-"+Cr.a));else if(rr&&Vr()&&!mr)for(Sn=rr.parentNode;Sn&&Sn!==_body;)Sn._pinOffset&&(Lr-=Sn._pinOffset,Nr-=Sn._pinOffset),Sn=Sn.parentNode;ns&&ns.forEach(function(as){return as.revert(!1,!0)}),wr.start=Lr,wr.end=Nr,Mi=Dr=_refreshingAll?Gn:Vr(),!mr&&!_refreshingAll&&(Mi<Gn&&Vr(Gn),wr.scroll.rec=0),wr.revert(!1,!0),xi=_getTime(),Fn&&(Jr=-1,Fn.restart(!0)),_refreshing=0,o&&Pr&&(o._initted||Yn)&&o.progress()!==Yn&&o.progress(Yn||0,!0).render(o.time(),!0,!0),($n||di!==wr.progress||mr||sr)&&(o&&!Pr&&o.totalProgress(mr&&Lr<-.001&&!di?gsap.utils.normalize(Lr,Nr,0):di,!0),wr.progress=$n||(Mi-Lr)/jr===di?0:di),nr&&ar&&(Pi._pinOffset=Math.round(wr.progress*en)),tn&&tn.invalidate(),isNaN(ss)||(ss-=gsap.getProperty(Fr,Cr.p),us-=gsap.getProperty(Ti,Cr.p),_shiftMarker(Fr,Cr,ss),_shiftMarker(Wr,Cr,ss-(Yi||0)),_shiftMarker(Ti,Cr,us),_shiftMarker(qr,Cr,us-(Yi||0))),$n&&!_refreshingAll&&wr.update(),tr&&!_refreshingAll&&!Si&&(Si=!0,tr(wr),Si=!1)}},wr.getVelocity=function(){return(Vr()-Dr)/(_getTime()-_time2)*1e3||0},wr.endAnimation=function(){_endAnimation(wr.callbackAnimation),o&&(tn?tn.progress(1):o.paused()?Pr||_endAnimation(o,wr.direction<0,1):_endAnimation(o,o.reversed()))},wr.labelToScroll=function(Ri){return o&&o.labels&&(Lr||wr.refresh()||Lr)+o.labels[Ri]/o.duration()*jr||0},wr.getTrailing=function(Ri){var Xi=_triggers.indexOf(wr),Bi=wr.direction>0?_triggers.slice(0,Xi).reverse():_triggers.slice(Xi+1);return(_isString(Ri)?Bi.filter(function(Yi){return Yi.vars.preventOverlaps===Ri}):Bi).filter(function(Yi){return wr.direction>0?Yi.end<=Lr:Yi.start>=Nr})},wr.update=function(Ri,Xi,Bi){if(!(mr&&!Bi&&!Ri)){var Yi=_refreshingAll===!0?Gn:wr.scroll(),wn=Ri?0:(Yi-Lr)/jr,rn=wn<0?0:wn>1?1:wn||0,En=wr.progress,$n,_n,cn,pn,Bn,vn,Nn,Hn;if(Xi&&(Dr=Mi,Mi=mr?Vr():Yi,dr&&(Xn=Un,Un=o&&!Pr?o.totalProgress():rn)),lr&&nr&&!_refreshing&&!_startup&&_lastScrollTime&&(!rn&&Lr<Yi+(Yi-Dr)/(_getTime()-_time2)*lr?rn=1e-4:rn===1&&Nr>Yi+(Yi-Dr)/(_getTime()-_time2)*lr&&(rn=.9999)),rn!==En&&wr.enabled){if($n=wr.isActive=!!rn&&rn<1,_n=!!En&&En<1,vn=$n!==_n,Bn=vn||!!rn!=!!En,wr.direction=rn>En?1:-1,wr.progress=rn,Bn&&!_refreshing&&(cn=rn&&!En?0:rn===1?1:En===1?2:3,Pr&&(pn=!vn&&xr[cn+1]!=="none"&&xr[cn+1]||xr[cn],Hn=o&&(pn==="complete"||pn==="reset"||pn in o))),Er&&(vn||Hn)&&(Hn||ir||!o)&&(_isFunction(Er)?Er(wr):wr.getTrailing(Er).forEach(function(es){return es.endAnimation()})),Pr||(tn&&!_refreshing&&!_startup?(tn._dp._time-tn._start!==tn._time&&tn.render(tn._dp._time-tn._start),tn.resetTo?tn.resetTo("totalProgress",rn,o._tTime/o._tDur):(tn.vars.totalProgress=rn,tn.invalidate().restart())):o&&o.totalProgress(rn,!!(_refreshing&&(xi||Ri)))),nr){if(Ri&&ar&&(Pi.style[ar+Cr.os2]=un),!$r)Wi(_round(Zi+en*rn));else if(Bn){if(Nn=!Ri&&rn>En&&Nr+1>Yi&&Yi+1>=_maxScroll(kr,Cr),hr)if(!Ri&&($n||Nn)){var Rn=_getBounds(nr,!0),yn=Yi-Lr;_reparent(nr,_body,Rn.top+(Cr===_vertical?yn:0)+_px,Rn.left+(Cr===_vertical?0:yn)+_px)}else _reparent(nr,Pi);_setState($n||Nn?ki:Ii),mn&&rn<1&&$n||Wi(Zi+(rn===1&&!Nn?en:0))}}dr&&!Zr.tween&&!_refreshing&&!_startup&&Fn.restart(!0),ge&&(vn||or&&rn&&(rn<1||!_limitCallbacks))&&_toArray(ge.targets).forEach(function(es){return es.classList[$n||or?"add":"remove"](ge.className)}),L&&!Pr&&!Ri&&L(wr),Bn&&!_refreshing?(Pr&&(Hn&&(pn==="complete"?o.pause().totalProgress(1):pn==="reset"?o.restart(!0).pause():pn==="restart"?o.restart(!0):o[pn]()),L&&L(wr)),(vn||!_limitCallbacks)&&(er&&vn&&_callback(wr,er),yr[cn]&&_callback(wr,yr[cn]),or&&(rn===1?wr.kill(!1,1):yr[cn]=0),vn||(cn=rn===1?1:3,yr[cn]&&_callback(wr,yr[cn]))),vr&&!$n&&Math.abs(wr.getVelocity())>(_isNumber(vr)?vr:2500)&&(_endAnimation(wr.callbackAnimation),tn?tn.progress(1):_endAnimation(o,pn==="reverse"?1:!rn,1))):Pr&&L&&!_refreshing&&L(wr)}if(on){var Sn=mr?Yi/mr.duration()*(mr._caScrollDist||0):Yi;an(Sn+(Fr._isFlipped?1:0)),on(Sn)}Zn&&Zn(-Yi/mr.duration()*(mr._caScrollDist||0))}},wr.enable=function(Ri,Xi){wr.enabled||(wr.enabled=!0,_addListener(kr,"resize",_onResize),Ur||_addListener(kr,"scroll",_onScroll),Ir&&_addListener(t,"refreshInit",Ir),Ri!==!1&&(wr.progress=di=0,Mi=Dr=Jr=Vr()),Xi!==!1&&wr.refresh())},wr.getTween=function(Ri){return Ri&&Zr?Zr.tween:tn},wr.setPositions=function(Ri,Xi,Bi,Yi){if(mr){var wn=mr.scrollTrigger,rn=mr.duration(),En=wn.end-wn.start;Ri=wn.start+En*Ri/rn,Xi=wn.start+En*Xi/rn}wr.refresh(!1,!1,{start:_keepClamp(Ri,Bi&&!!wr._startClamp),end:_keepClamp(Xi,Bi&&!!wr._endClamp)},Yi),wr.update()},wr.adjustPinSpacing=function(Ri){if(fn&&Ri){var Xi=fn.indexOf(Cr.d)+1;fn[Xi]=parseFloat(fn[Xi])+Ri+_px,fn[1]=parseFloat(fn[1])+Ri+_px,_setState(fn)}},wr.disable=function(Ri,Xi){if(wr.enabled&&(Ri!==!1&&wr.revert(!0,!0),wr.enabled=wr.isActive=!1,Xi||tn&&tn.pause(),Gn=0,Qr&&(Qr.uncache=1),Ir&&_removeListener(t,"refreshInit",Ir),Fn&&(Fn.pause(),Zr.tween&&Zr.tween.kill()&&(Zr.tween=0)),!Ur)){for(var Bi=_triggers.length;Bi--;)if(_triggers[Bi].scroller===kr&&_triggers[Bi]!==wr)return;_removeListener(kr,"resize",_onResize),Ur||_removeListener(kr,"scroll",_onScroll)}},wr.kill=function(Ri,Xi){wr.disable(Ri,Xi),tn&&!Xi&&tn.kill(),Mt&&delete _ids[Mt];var Bi=_triggers.indexOf(wr);Bi>=0&&_triggers.splice(Bi,1),Bi===_i&&_direction>0&&_i--,Bi=0,_triggers.forEach(function(Yi){return Yi.scroller===wr.scroller&&(Bi=1)}),Bi||_refreshingAll||(wr.scroll.rec=0),o&&(o.scrollTrigger=null,Ri&&o.revert({kill:!1}),Xi||o.kill()),Wr&&[Wr,qr,Fr,Ti].forEach(function(Yi){return Yi.parentNode&&Yi.parentNode.removeChild(Yi)}),_primary===wr&&(_primary=0),nr&&(Qr&&(Qr.uncache=1),Bi=0,_triggers.forEach(function(Yi){return Yi.pin===nr&&Bi++}),Bi||(Qr.spacer=0)),s.onKill&&s.onKill(wr)},_triggers.push(wr),wr.enable(!1,!1),Kn&&Kn(wr),o&&o.add&&!jr){var ln=wr.update;wr.update=function(){wr.update=ln,Lr||Nr||wr.refresh()},gsap.delayedCall(.01,wr.update),jr=.01,Lr=Nr=0}else wr.refresh();nr&&_queueRefreshAll()},t.register=function(s){return _coreInitted||(gsap=s||_getGSAP(),_windowExists()&&window.document&&t.enable(),_coreInitted=_enabled),_coreInitted},t.defaults=function(s){if(s)for(var o in s)_defaults[o]=s[o];return _defaults},t.disable=function(s,o){_enabled=0,_triggers.forEach(function(L){return L[o?"kill":"disable"](s)}),_removeListener(_win,"wheel",_onScroll),_removeListener(_doc,"scroll",_onScroll),clearInterval(_syncInterval),_removeListener(_doc,"touchcancel",_passThrough),_removeListener(_body,"touchstart",_passThrough),_multiListener(_removeListener,_doc,"pointerdown,touchstart,mousedown",_pointerDownHandler),_multiListener(_removeListener,_doc,"pointerup,touchend,mouseup",_pointerUpHandler),_resizeDelay.kill(),_iterateAutoRefresh(_removeListener);for(var d=0;d<_scrollers.length;d+=3)_wheelListener(_removeListener,_scrollers[d],_scrollers[d+1]),_wheelListener(_removeListener,_scrollers[d],_scrollers[d+2])},t.enable=function(){if(_win=window,_doc=document,_docEl=_doc.documentElement,_body=_doc.body,gsap&&(_toArray=gsap.utils.toArray,_clamp=gsap.utils.clamp,_context=gsap.core.context||_passThrough,_suppressOverwrites=gsap.core.suppressOverwrites||_passThrough,_scrollRestoration=_win.history.scrollRestoration||"auto",_lastScroll=_win.pageYOffset,gsap.core.globals("ScrollTrigger",t),_body)){_enabled=1,_div100vh=document.createElement("div"),_div100vh.style.height="100vh",_div100vh.style.position="absolute",_refresh100vh(),_rafBugFix(),Observer.register(gsap),t.isTouch=Observer.isTouch,_fixIOSBug=Observer.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),_ignoreMobileResize=Observer.isTouch===1,_addListener(_win,"wheel",_onScroll),_root=[_win,_doc,_docEl,_body],gsap.matchMedia?(t.matchMedia=function(Mt){var er=gsap.matchMedia(),tr;for(tr in Mt)er.add(tr,Mt[tr]);return er},gsap.addEventListener("matchMediaInit",function(){return _revertAll()}),gsap.addEventListener("matchMediaRevert",function(){return _revertRecorded()}),gsap.addEventListener("matchMedia",function(){_refreshAll(0,1),_dispatch("matchMedia")}),gsap.matchMedia("(orientation: portrait)",function(){return _setBaseDimensions(),_setBaseDimensions})):console.warn("Requires GSAP 3.11.0 or later"),_setBaseDimensions(),_addListener(_doc,"scroll",_onScroll);var s=_body.style,o=s.borderTopStyle,d=gsap.core.Animation.prototype,L,ge;for(d.revert||Object.defineProperty(d,"revert",{value:function(){return this.time(-.01,!0)}}),s.borderTopStyle="solid",L=_getBounds(_body),_vertical.m=Math.round(L.top+_vertical.sc())||0,_horizontal.m=Math.round(L.left+_horizontal.sc())||0,o?s.borderTopStyle=o:s.removeProperty("border-top-style"),_syncInterval=setInterval(_sync,250),gsap.delayedCall(.5,function(){return _startup=0}),_addListener(_doc,"touchcancel",_passThrough),_addListener(_body,"touchstart",_passThrough),_multiListener(_addListener,_doc,"pointerdown,touchstart,mousedown",_pointerDownHandler),_multiListener(_addListener,_doc,"pointerup,touchend,mouseup",_pointerUpHandler),_transformProp=gsap.utils.checkPrefix("transform"),_stateProps.push(_transformProp),_coreInitted=_getTime(),_resizeDelay=gsap.delayedCall(.2,_refreshAll).pause(),_autoRefresh=[_doc,"visibilitychange",function(){var Mt=_win.innerWidth,er=_win.innerHeight;_doc.hidden?(_prevWidth=Mt,_prevHeight=er):(_prevWidth!==Mt||_prevHeight!==er)&&_onResize()},_doc,"DOMContentLoaded",_refreshAll,_win,"load",_refreshAll,_win,"resize",_onResize],_iterateAutoRefresh(_addListener),_triggers.forEac
vendor: 10,449 bytes, line 2170
2170h(function(Mt){return Mt.enable(0,1)}),ge=0;ge<_scrollers.length;ge+=3)_wheelListener(_removeListener,_scrollers[ge],_scrollers[ge+1]),_wheelListener(_removeListener,_scrollers[ge],_scrollers[ge+2])}},t.config=function(s){"limitCallbacks"in s&&(_limitCallbacks=!!s.limitCallbacks);var o=s.syncInterval;o&&clearInterval(_syncInterval)||(_syncInterval=o)&&setInterval(_sync,o),"ignoreMobileResize"in s&&(_ignoreMobileResize=t.isTouch===1&&s.ignoreMobileResize),"autoRefreshEvents"in s&&(_iterateAutoRefresh(_removeListener)||_iterateAutoRefresh(_addListener,s.autoRefreshEvents||"none"),_ignoreResize=(s.autoRefreshEvents+"").indexOf("resize")===-1)},t.scrollerProxy=function(s,o){var d=_getTarget(s),L=_scrollers.indexOf(d),ge=_isViewport(d);~L&&_scrollers.splice(L,ge?6:2),o&&(ge?_proxies.unshift(_win,o,_body,o,_docEl,o):_proxies.unshift(d,o))},t.clearMatchMedia=function(s){_triggers.forEach(function(o){return o._ctx&&o._ctx.query===s&&o._ctx.kill(!0,!0)})},t.isInViewport=function(s,o,d){var L=(_isString(s)?_getTarget(s):s).getBoundingClientRect(),ge=L[d?_width:_height]*o||0;return d?L.right-ge>0&&L.left+ge<_win.innerWidth:L.bottom-ge>0&&L.top+ge<_win.innerHeight},t.positionInViewport=function(s,o,d){_isString(s)&&(s=_getTarget(s));var L=s.getBoundingClientRect(),ge=L[d?_width:_height],Mt=o==null?ge/2:o in _keywords?_keywords[o]*ge:~o.indexOf("%")?parseFloat(o)*ge/100:parseFloat(o)||0;return d?(L.left+Mt)/_win.innerWidth:(L.top+Mt)/_win.innerHeight},t.killAll=function(s){if(_triggers.slice(0).forEach(function(d){return d.vars.id!=="ScrollSmoother"&&d.kill()}),s!==!0){var o=_listeners.killAll||[];_listeners={},o.forEach(function(d){return d()})}},t}();ScrollTrigger.version="3.12.5";ScrollTrigger.saveStyles=function(t){return t?_toArray(t).forEach(function(e){if(e&&e.style){var r=_savedStyles.indexOf(e);r>=0&&_savedStyles.splice(r,5),_savedStyles.push(e,e.style.cssText,e.getBBox&&e.getAttribute("transform"),gsap.core.getCache(e),_context())}}):_savedStyles};ScrollTrigger.revert=function(t,e){return _revertAll(!t,e)};ScrollTrigger.create=function(t,e){return new ScrollTrigger(t,e)};ScrollTrigger.refresh=function(t){return t?_onResize():(_coreInitted||ScrollTrigger.register())&&_refreshAll(!0)};ScrollTrigger.update=function(t){return++_scrollers.cache&&_updateAll(t===!0?2:0)};ScrollTrigger.clearScrollMemory=_clearScrollMemory;ScrollTrigger.maxScroll=function(t,e){return _maxScroll(t,e?_horizontal:_vertical)};ScrollTrigger.getScrollFunc=function(t,e){return _getScrollFunc(_getTarget(t),e?_horizontal:_vertical)};ScrollTrigger.getById=function(t){return _ids[t]};ScrollTrigger.getAll=function(){return _triggers.filter(function(t){return t.vars.id!=="ScrollSmoother"})};ScrollTrigger.isScrolling=function(){return!!_lastScrollTime};ScrollTrigger.snapDirectional=_snapDirectional;ScrollTrigger.addEventListener=function(t,e){var r=_listeners[t]||(_listeners[t]=[]);~r.indexOf(e)||r.push(e)};ScrollTrigger.removeEventListener=function(t,e){var r=_listeners[t],s=r&&r.indexOf(e);s>=0&&r.splice(s,1)};ScrollTrigger.batch=function(t,e){var r=[],s={},o=e.interval||.016,d=e.batchMax||1e9,L=function(er,tr){var ir=[],rr=[],nr=gsap.delayedCall(o,function(){tr(ir,rr),ir=[],rr=[]}).pause();return function(ar){ir.length||nr.restart(!0),ir.push(ar.trigger),rr.push(ar),d<=ir.length&&nr.progress(1)}},ge;for(ge in e)s[ge]=ge.substr(0,2)==="on"&&_isFunction(e[ge])&&ge!=="onRefreshInit"?L(ge,e[ge]):e[ge];return _isFunction(d)&&(d=d(),_addListener(ScrollTrigger,"refresh",function(){return d=e.batchMax()})),_toArray(t).forEach(function(Mt){var er={};for(ge in s)er[ge]=s[ge];er.trigger=Mt,r.push(ScrollTrigger.create(er))}),r};var _clampScrollAndGetDurationMultiplier=function t(e,r,s,o){return r>o?e(o):r<0&&e(0),s>o?(o-r)/(s-r):s<0?r/(r-s):1},_allowNativePanning=function t(e,r){r===!0?e.style.removeProperty("touch-action"):e.style.touchAction=r===!0?"auto":r?"pan-"+r+(Observer.isTouch?" pinch-zoom":""):"none",e===_docEl&&t(_body,r)},_overflow={auto:1,scroll:1},_nestedScroll=function t(e){var r=e.event,s=e.target,o=e.axis,d=(r.changedTouches?r.changedTouches[0]:r).target,L=d._gsap||gsap.core.getCache(d),ge=_getTime(),Mt;if(!L._isScrollT||ge-L._isScrollT>2e3){for(;d&&d!==_body&&(d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth||!(_overflow[(Mt=_getComputedStyle(d)).overflowY]||_overflow[Mt.overflowX]));)d=d.parentNode;L._isScroll=d&&d!==s&&!_isViewport(d)&&(_overflow[(Mt=_getComputedStyle(d)).overflowY]||_overflow[Mt.overflowX]),L._isScrollT=ge}(L._isScroll||o==="x")&&(r.stopPropagation(),r._gsapAllow=!0)},_inputObserver=function t(e,r,s,o){return Observer.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:r,onWheel:o=o&&_nestedScroll,onPress:o,onDrag:o,onScroll:o,onEnable:function(){return s&&_addListener(_doc,Observer.eventTypes[0],_captureInputs,!1,!0)},onDisable:function(){return _removeListener(_doc,Observer.eventTypes[0],_captureInputs,!0)}})},_inputExp=/(input|label|select|textarea)/i,_inputIsFocused,_captureInputs=function t(e){var r=_inputExp.test(e.target.tagName);(r||_inputIsFocused)&&(e._gsapAllow=!0,_inputIsFocused=r)},_getScrollNormalizer=function t(e){_isObject(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 r=e,s=r.normalizeScrollX,o=r.momentum,d=r.allowNestedScroll,L=r.onRelease,ge,Mt,er=_getTarget(e.target)||_docEl,tr=gsap.core.globals().ScrollSmoother,ir=tr&&tr.get(),rr=_fixIOSBug&&(e.content&&_getTarget(e.content)||ir&&e.content!==!1&&!ir.smooth()&&ir.content()),nr=_getScrollFunc(er,_vertical),ar=_getScrollFunc(er,_horizontal),sr=1,lr=(Observer.isTouch&&_win.visualViewport?_win.visualViewport.scale*_win.visualViewport.width:_win.outerWidth)/_win.innerWidth,cr=0,ur=_isFunction(o)?function(){return o(ge)}:function(){return o||2.8},or,dr,hr=_inputObserver(er,e.type,!0,d),pr=function(){return dr=!1},mr=_passThrough,vr=_passThrough,Er=function(){Mt=_maxScroll(er,_vertical),vr=_clamp(_fixIOSBug?1:0,Mt),s&&(mr=_clamp(0,_maxScroll(er,_horizontal))),or=_refreshID},Cr=function(){rr._gsap.y=_round(parseFloat(rr._gsap.y)+nr.offset)+"px",rr.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(rr._gsap.y)+", 0, 1)",nr.offset=nr.cacheID=0},Pr=function(){if(dr){requestAnimationFrame(pr);var gr=_round(ge.deltaY/2),_r=vr(nr.v-gr);if(rr&&_r!==nr.v+nr.offset){nr.offset=_r-nr.v;var wr=_round((parseFloat(rr&&rr._gsap.y)||0)-nr.offset);rr.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+wr+", 0, 1)",rr._gsap.y=wr+"px",nr.cacheID=_scrollers.cache,_updateAll()}return!0}nr.offset&&Cr(),dr=!0},kr,Mr,Ur,$r,yr=function(){Er(),kr.isActive()&&kr.vars.scrollY>Mt&&(nr()>Mt?kr.progress(1)&&nr(Mt):kr.resetTo("scrollY",Mt))};return rr&&gsap.set(rr,{y:"+=0"}),e.ignoreCheck=function(xr){return _fixIOSBug&&xr.type==="touchmove"&&Pr()||sr>1.05&&xr.type!=="touchstart"||ge.isGesturing||xr.touches&&xr.touches.length>1},e.onPress=function(){dr=!1;var xr=sr;sr=_round((_win.visualViewport&&_win.visualViewport.scale||1)/lr),kr.pause(),xr!==sr&&_allowNativePanning(er,sr>1.01?!0:s?!1:"x"),Mr=ar(),Ur=nr(),Er(),or=_refreshID},e.onRelease=e.onGestureStart=function(xr,gr){if(nr.offset&&Cr(),!gr)$r.restart(!0);else{_scrollers.cache++;var _r=ur(),wr,Ir;s&&(wr=ar(),Ir=wr+_r*.05*-xr.velocityX/.227,_r*=_clampScrollAndGetDurationMultiplier(ar,wr,Ir,_maxScroll(er,_horizontal)),kr.vars.scrollX=mr(Ir)),wr=nr(),Ir=wr+_r*.05*-xr.velocityY/.227,_r*=_clampScrollAndGetDurationMultiplier(nr,wr,Ir,_maxScroll(er,_vertical)),kr.vars.scrollY=vr(Ir),kr.invalidate().duration(_r).play(.01),(_fixIOSBug&&kr.vars.scrollY>=Mt||wr>=Mt-1)&&gsap.to({},{onUpdate:yr,duration:_r})}L&&L(xr)},e.onWheel=function(){kr._ts&&kr.pause(),_getTime()-cr>1e3&&(or=0,cr=_getTime())},e.onChange=function(xr,gr,_r,wr,Ir){if(_refreshID!==or&&Er(),gr&&s&&ar(mr(wr[2]===gr?Mr+(xr.startX-xr.x):ar()+gr-wr[1])),_r){nr.offset&&Cr();var Hr=Ir[2]===_r,Yr=Hr?Ur+xr.startY-xr.y:nr()+_r-Ir[1],Jr=vr(Yr);Hr&&Yr!==Jr&&(Ur+=Jr-Yr),nr(Jr)}(_r||gr)&&_updateAll()},e.onEnable=function(){_allowNativePanning(er,s?!1:"x"),ScrollTrigger.addEventListener("refresh",yr),_addListener(_win,"resize",yr),nr.smooth&&(nr.target.style.scrollBehavior="auto",nr.smooth=ar.smooth=!1),hr.enable()},e.onDisable=function(){_allowNativePanning(er,!0),_removeListener(_win,"resize",yr),ScrollTrigger.removeEventListener("refresh",yr),hr.kill()},e.lockAxis=e.lockAxis!==!1,ge=new Observer(e),ge.iOS=_fixIOSBug,_fixIOSBug&&!nr()&&nr(1),_fixIOSBug&&gsap.ticker.add(_passThrough),$r=ge._dc,kr=gsap.to(ge,{ease:"power4",paused:!0,inherit:!1,scrollX:s?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:_interruptionTracker(nr,nr(),function(){return kr.pause()})},onUpdate:_updateAll,onComplete:$r.vars.onComplete}),ge};ScrollTrigger.sort=function(t){return _triggers.sort(t||function(e,r){return(e.vars.refreshPriority||0)*-1e6+e.start-(r.start+(r.vars.refreshPriority||0)*-1e6)})};ScrollTrigger.observe=function(t){return new Observer(t)};ScrollTrigger.normalizeScroll=function(t){if(typeof t>"u")return _normalizer;if(t===!0&&_normalizer)return _normalizer.enable();if(t===!1){_normalizer&&_normalizer.kill(),_normalizer=t;return}var e=t instanceof Observer?t:_getScrollNormalizer(t);return _normalizer&&_normalizer.target===e.target&&_normalizer.kill(),_isViewport(e.target)&&(_normalizer=e),e};ScrollTrigger.core={_getVelocityProp,_inputObserver,_scrollers,_proxies,bridge:{ss:function t(){_lastScrollTime||_dispatch("scrollStart"),_lastScrollTime=_getTime()},ref:function t(){return _refreshing}}};_getGSAP()&&gsap.registerPlugin(ScrollTrigger);gsapWithCSS.registerPlugin(ScrollTrigger);const gsap_qE0fizvEy0=defineNuxtPlugin(t=>{t.vueApp.use(gsapWithCSS),t.provide("gsap",gsapWithCSS),t.provide("ScrollTrigger",ScrollTrigger)}),MediaUIEvents={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",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:"mediash
2170owtexttracksrequest",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"},MediaStateReceiverAttributes={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},MediaUIProps={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_PAUSED:"mediaPaused",MEDIA_HAS_P
2170LAYED:"mediaHasPlayed",MEDIA_ENDED:"mediaEnded",MEDIA_MUTED:"mediaMuted",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_IS_PIP:"mediaIsPip",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_CHAPTERS_CUES:"mediaChaptersCues"},MediaUIPropsEntries=Object.entries(MediaUIProps),MediaUIAttributes=MediaUIPropsEntries.reduce((t,[e,r])=>(t[e]=`${r.toLowerCase()}`,t),{}),MediaStateChangeEvents=MediaUIPropsEntries.reduce((t,[e,r])=>(t[e]=`${r.toLowerCase()}`,t),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(MediaStateChangeEvents).reduce((t,[e,r])=>{const s=MediaUIAttributes[e];return s&&(t[r]=s),t},{userinactivechange:"userinactive"});const AttributeToStateChangeEventMap=Object.entries(MediaUIAttributes).reduce((t,[e,r])=>{const s=MediaStateChangeEvents[e];return s&&(t[r]=s),t},{userinactive:"userinactivechange"}),TextTrackKinds={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},TextTrackModes={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"},PointerTypes={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},AvailabilityStates={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},StreamTypes={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},WebkitPresentationModes={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"},nouns={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:t=1}={})=>`current playback rate ${t}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading",SETTINGS:()=>"settings",AUDIO_TRACKS:()=>"audio tracks",QUALITY:()=>"quality"},verbs={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",ENTER_AIRPLAY:()=>"start airplay",EXIT_AIRPLAY:()=>"stop airplay",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:t=30}={})=>`seek forward ${t} seconds`,SEEK_BACK_N_SECS:({seekOffset:t=30}={})=>`seek back ${t} seconds`,SEEK_LIVE:()=>"seek to live",PLAYING_LIVE:()=>"playing live"};function stringifyRenditionList(t){return t==null?void 0:t.map(stringifyRendition).join(" ")}function parseRenditionList(t){return t==null?void 0:t.split(/\s+/).map(parseRendition)}function stringifyRendition(t){if(t){const{id:e,width:r,height:s}=t;return[e,r,s].filter(o=>o!=null).join(":")}}function parseRendition(t){if(t){const[e,r,s]=t.split(":");return{id:e,width:r,height:s}}}function stringifyAudioTrackList(t){return t==null?void 0:t.map(stringifyAudioTrack).join(" ")}function parseAudioTrackList(t){return t==null?void 0:t.split(/\s+/).map(parseAudioTrack)}function stringifyAudioTrack(t){if(t){const{id:e,kind:r,language:s,label:o}=t;return[e,r,s,o].filter(d=>d!=null).join(":")}}function parseAudioTrack(t){if(t){const[e,r,s,o]=t.split(":");return{id:e,kind:r,language:s,label:o}}}function camelCase(t){return t.replace(/[-_]([a-z])/g,(e,r)=>r.toUpperCase())}function isValidNumber(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}
2170function isNumericString(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))}const delay=t=>new Promise(e=>setTimeout(e,t)),UnitLabels=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],toTimeUnitPhrase=(t,e)=>{const r=t===1?UnitLabels[e].singular:UnitLabels[e].plural;return`${t} ${r}`},formatAsTimePhrase=t=>{if(!isValidNumber(t))return"";const e=Math.abs(t),r=e!==t,s=new Date(0,0,0,0,0,e,0);return`${[s.getHours(),s.getMinutes(),s.getSeconds()].map((ge,Mt)=>ge&&toTimeUnitPhrase(ge,Mt)).filter(ge=>ge).join(", ")}${r?" remaining":""}`};function formatTime(t,e){let r=!1;t<0&&(r=!0,t=0-t),t=t<0?0:t;let s=Math.floor(t%60),o=Math.floor(t/60%60),d=Math.floor(t/3600);const L=Math.floor(e/60%60),ge=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(d=o=s="0"),d=d>0||ge>0?d+":":"",o=((d||L>=10)&&o<10?"0"+o:o)+":",s=s<10?"0"+s:s,(r?"-":"")+d+o+s}let EventTarget$1=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}};class Node extends EventTarget$1{}class ResizeObserver{observe(){}unobserve(){}disconnect(){}}const documentShim={createElement:function(){return new globalThisShim.HTMLElement},createElementNS:function(){return new globalThisShim.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(t){return!1}},globalThisShim={ResizeObserver,document:documentShim,Node,HTMLElement:class extends Node{},DocumentFragment:class extends EventTarget$1{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(t){return null},setItem(t,e){},removeItem(t){}},CustomEvent:function t(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(t){return{matches:!1,media:t}}},isServer=typeof window>"u"||typeof window.customElements>"u",isShimmed=Object.keys(globalThisShim).every(t=>t in globalThis),GlobalThis=isServer&&!isShimmed?globalThisShim:globalThis,Document$1=isServer&&!isShimmed?documentShim:globalThis.document,callbacksMap=new WeakMap,getCallbacks=t=>{let e=callbacksMap.get(t);return e||callbacksMap.set(t,e=new Set),e},observer=new GlobalThis.ResizeObserver(t=>{for(let e of t)for(let r of getCallbacks(e.target))r(e)});function observeResize(t,e){getCallbacks(t).add(e),observer.observe(t)}function unobserveResize(t,e){const r=getCallbacks(t);r.delete(e),r.size||observer.unobserve(t)}function getMediaController(t){var e;return(e=getAttributeMediaController(t))!=null?e:closestComposedNode(t,"media-controller")}function getAttributeMediaController(t){var e;const{MEDIA_CONTROLLER:r}=MediaStateReceiverAttributes,s=t.getAttribute(r);if(s)return(e=getDocumentOrShadowRoot(t))==null?void 0:e.getElementById(s)}const updateIconText=(t,e,r=".value")=>{const s=t.querySelector(r);s&&(s.textContent=e)},getAllSlotted=(t,e)=>{const r=`slot[name="${e}"]`,s=t.shadowRoot.querySelector(r);return s?s.children:[]},getSlotted=(t,e)=>getAllSlotted(t,e)[0],containsComposedNode=(t,e)=>!t||!e?!1:t!=null&&t.contains(e)?!0:containsComposedNode(t,e.getRootNode().host),closestComposedNode=(t,e)=>{if(!t)return null;const r=t.closest(e);return r||closestComposedNode(t.getRootNode().host,e)};function getActiveElement(t=document){var e;const r=t==null?void 0:t.activeElement;return r?(e=getActiveElement(r.shadowRoot))!=null?e:r:null}function getDocumentOrShadowRoot(t){var e;const r=(e=t==null?void 0:t.getRootNode)==null?void 0:e.call(t);return r instanceof ShadowRoot||r instanceof Document?r:null}function isElementVisible(t,e=3){if(t.checkVisibility)return t.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0});let r=t;for(;r&&e>0;){const s=getComputedStyle(r);if(s.opacity==="0"||s.visibility==="hidden"||s.display==="none")return!1;r=r.parentElement,e--}return!0}function getPointProgressOnLine(t,e,r,s){const o=distance(r,s),d=distance(r,{x:t,y:e}),L=distance(s,{x:t,y:e});return d>o||L>o?d>L?1:0:d/o}function distance(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function getOrInsertCSSRule(t,e){const r=getCSSRule(t,s=>s===e);return r||insertCSSRule(t,e)}function getCSSRule(t,e){var r;let s;for(s of t.querySelectorAll("style")){let o;try{o=(r=s.sheet)==null?void 0:r.cssRules}catch{continue}for(let d of o??[])if(e(d.selectorText))return d}}function insertCSSRule(t,e){var r,s;const o=(r=t.querySelectorAll("style"))!=null?r:[],d=o==null?void 0:o[o.length-1];return d!=null&&d.sheet?(d==null||d.sheet.insertRule(`${e}{}`,d.sheet.cssRules.length),(s=d.sheet.cssRules)==null?void 0:s[d.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function getNumericAttr(t,e,r=Number.NaN){const s=t.getAttribute(e);return s!=null?+s:r}function setNumericAttr(t,e,r){const s=+r;if(r==null||Number.isNaN(s)){t.hasAttribute(e)&&t.removeAttribute(e);return}getNumericAttr(t,e,void 0)!==s&&t.setAttribute(e,`${s}`)}function getBooleanAttr(t,e){return t.hasAttribute(e)}function setBooleanAttr(t,e,r){if(r==null){t.hasAttribute(e)&&t.removeAttribute(e);return}getBooleanAttr(t,e)!=r&&t.toggleAttribute(e,r)}function getStringAttr(t,e,r=null){var s;return(s=t.getAttribute(e))!=null?s:r}function setStringAttr(t,e,r){if(r==null){t.hasAttribute(e)&&t.removeAttribute(e);return}const s=`${r}`;getStringAttr(t,e,void 0)!==s&&t.setAttribute(e,s)}var __accessCheck$x=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$x=(t,e,r)=>(__accessCheck$x(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$x=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$t=(t,e,r,s)=>(__accessCheck$x(t,e,"write to private field"),e.set(t,r),r),_mediaController$9;const template$i=Document$1.createElement("template");template$i.innerHTML=` 2171<style> 2172 :host { 2173 display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block)); 2174 box-sizing: border-box; 2175 } 2176</style> 2177`;class MediaGestureReceiver extends GlobalThis.HTMLElement{constructor(e={}){if(super(),__privateAdd$x(this,_mediaController$9,void 0),!this.shadowRoot){const r=this.attachShadow({mode:"open"}),s=template$i.content.cloneNode(!0);this.nativeEl=s;let o=e.slotTemplate;o||(o=Document$1.createElement("template"),o.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(o.content.cloneNode(!0)),r.appendChild(s)}}static get observedAttributes(){return[MediaStateReceiverAttributes.MEDIA_CONTROLLER,MediaUIAttributes.MEDIA_PAUSED]}attributeChangedCallback(e,r,s){var o,d,L,ge,Mt;e===MediaStateReceiverAttributes.MEDIA_CONTROLLER&&(r&&((d=(o=__privateGet$x(this,_mediaController$9))==null?void 0:o.unassociateElement)==null||d.call(o,this),__privateSet$t(this,_mediaController$9,null)),s&&this.isConnected&&(__privateSet$t(this,_mediaController$9,(L=this.getRootNode())==null?void 0:L.getElementById(s)),(Mt=(ge=__privateGet$x(this,_mediaController$9))==null?void 0:ge.associateElement)==null||Mt.call(ge,this)))}connectedCallback(){var e,r,s,o;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),__privateSet$t(this,_mediaController$9,getMediaControllerEl(this)),this.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER)&&((r=(e=__privateGet$x(this,_mediaController$9))==null?void 0:e.associateElement)==null||r.call(e,this)),(s=__privateGet$x(this,_mediaController$9))==null||s.addEventListener("pointerdown",this),(o=__privateGet$x(this,_mediaController$9))==null||o.addEventListener("click",this)}disconnectedCallback(){var e,r,s,o;this.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER)&&((r=(e=__privateGet$x(this,_mediaController$9))==null?void 0:e.unassociateElement)==null||r.call(e,this)),(s=__privateGet$x(this,_mediaController$9))==null||s.removeEventListener("pointerdown",this),(o=__privateGet$x(this,_mediaController$9))==null||o.removeEventListener("click",this),__privateSet$t(this,_mediaController$9,null)}handleEvent(e){var r;const s=(r=e.composedPath())==null?void 0:r[0];if(["video","media-controller"].includes(s==null?void 0:s.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){const{clientX:d,clientY:L}=e,{left:ge,top:Mt,width:er,height:tr}=this.getBoundingClientRect(),ir=d-ge,rr=L-Mt;if(ir<0||rr<0||ir>er||rr>tr||er===0&&tr===0)return;const{pointerType:nr=this._pointerType}=e;if(this._pointerType=void 0,nr===PointerTypes.TOUCH){this.handleTap(e);return}else if(nr===PointerTypes.MOUSE){this.handleMouseClick(e);return}}}}get mediaPaused(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_PAUSED)}set mediaPaused(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){const r=this.mediaPaused?MediaUIEvents.MEDIA_PLAY_REQUEST:MediaUIEvents.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new GlobalThis.CustomEvent(r,{composed:!0,bubbles:!0}))}}_mediaController$9=new WeakMap;function getMediaControllerEl(t){var e;const r=t.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER);return r?(e=t.getRootNode())==null?void 0:e.getElementById(r):closestComposedNode(t,"media-controller")}GlobalThis.customElements.get("media-gesture-receiver")||GlobalThis.customElements.define("media-gesture-receiver",MediaGestureReceiver);var __defProp$a=Object.defineProperty,__defNormalProp$a=(t,e,r)=>e in t?__defProp$a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$a=(t,e,r)=>(__defNormalProp$a(t,e+"",r),r),__accessCheck$w=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$w=(t,e,r)=>(__accessCheck$w(t,e,"read from private field"),e.get(t)),__privateAdd$w=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$s=(t,e,r,s)=>(__accessCheck$w(t,e,"write to private field"),e.set(t,r),r),__privateMethod$i=(t,e,r)=>(__accessCheck$w(t,e,"access private method"),r),_pointerDownTimeStamp,_currentMedia,_handlePointerMove$2,handlePointerMove_fn$2,_handlePointerUp$1,handlePointerUp_fn$1,_setInactive,setInactive_fn,_setActive,setActive_fn,_scheduleInactive,scheduleInactive_fn;const Attributes$e={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive"},template$h=Document$1.createElement("template");template$h.innerHTML=` 2178 <style> 2179 2180 :host([${MediaUIAttributes.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) { 2181 outline: none; 2182 } 2183 2184 :host { 2185 box-sizing: border-box; 2186 position: relative; 2187 display: inline-block; 2188 line-height: 0; 2189 background-color: var(--media-background-color, #000); 2190 } 2191 2192 :host(:not([${Attributes$e.AUDIO}])) [part~=layer]:not([part~=media-layer]) { 2193 position: absolute; 2194 top: 0; 2195 left: 0; 2196 bottom: 0; 2197 right: 0; 2198 display: flex; 2199 flex-flow: column nowrap; 2200 align-items: start; 2201 pointer-events: none; 2202 background: none; 2203 } 2204 2205 slot[name=media] { 2206 display: var(--media-slot-display, contents); 2207 } 2208 2209 2210 :host([${Attributes$e.AUDIO}]) slot[name=media] { 2211 display: var(--media-slot-display, none); 2212 } 2213 2214 2215 :host([${Attributes$e.AUDIO}]) [part~=layer][part~=gesture-layer] { 2216 height: 0; 2217 display: block; 2218 } 2219 2220 2221 :host(:not([${Attributes$e.AUDIO}])[${Attributes$e.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]), 2222 :host(:not([${Attributes$e.AUDIO}])[${Attributes$e.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] { 2223 display: none; 2224 } 2225 2226 2227 ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([hidden])) { 2228 pointer-events: auto; 2229 } 2230 2231 :host(:not([${Attributes$e.AUDIO}])) *[part~=layer][part~=centered-layer] { 2232 align-items: center; 2233 justify-content: center; 2234 } 2235 2236 :host(:not([${Attributes$e.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]), 2237 :host(:not([${Attributes$e.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] { 2238 align-self: stretch; 2239 flex-grow: 1; 2240 } 2241 2242 slot[name=middle-chrome] { 2243 display: inline; 2244 flex-grow: 1; 2245 pointer-events: none; 2246 background: none; 2247 } 2248 2249 2250 ::slotted([slot=media]), 2251 ::slotted([slot=poster]) { 2252 width: 100%; 2253 height: 100%; 2254 } 2255 2256 2257 :host(:not([${Attributes$e.AUDIO}])) .spacer { 2258 flex-grow: 1; 2259 } 2260 2261 2262 :host(:-webkit-full-screen) { 2263 2264 width: 100% !important; 2265 height: 100% !important; 2266 } 2267 2268 2269 ::slotted(:not([slot=media]):not([slot=poster]):not([${Attributes$e.NO_AUTOHIDE}]):not([hidden])) { 2270 opacity: 1; 2271 transition: opacity 0.25s; 2272 } 2273 2274 2275 :host([${Attributes$e.USER_INACTIVE}]:not([${MediaUIAttributes.MEDIA_PAUSED}]):not([${MediaUIAttributes.MEDIA_IS_AIRPLAYING}
2275]):not([${MediaUIAttributes.MEDIA_IS_CASTING}]):not([${Attributes$e.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${Attributes$e.NO_AUTOHIDE}])) { 2276 opacity: 0; 2277 transition: opacity 1s; 2278 } 2279 2280 :host([${Attributes$e.USER_INACTIVE}]:not([${MediaUIAttributes.MEDIA_PAUSED}]):not([${MediaUIAttributes.MEDIA_IS_CASTING}]):not([${Attributes$e.AUDIO}])) ::slotted([slot=media]) { 2281 cursor: none; 2282 } 2283 2284 ::slotted(media-control-bar) { 2285 align-self: stretch; 2286 } 2287 2288 2289 :host(:not([${Attributes$e.AUDIO}])[${MediaUIAttributes.MEDIA_HAS_PLAYED}]) slot[name=poster] { 2290 display: none; 2291 } 2292 2293 ::slotted([role="menu"]) { 2294 align-self: end; 2295 } 2296 2297 ::slotted([role="dialog"]) { 2298 align-self: center; 2299 } 2300 </style> 2301 2302 <slot name="media" part="layer media-layer"></slot> 2303 <slot name="poster" part="layer poster-layer"></slot> 2304 <slot name="gestures-chrome" part="layer gesture-layer"> 2305 <media-gesture-receiver slot="gestures-chrome"></media-gesture-receiver> 2306 </slot> 2307 <span part="layer vertical-layer"> 2308 <slot name="top-chrome" part="top chrome"></slot> 2309 <slot name="middle-chrome" part="middle chrome"></slot> 2310 <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot> 2311 2312 <slot part="bottom chrome"></slot> 2313 </span> 2314`;const MEDIA_UI_ATTRIBUTE_NAMES$1=Object.values(MediaUIAttributes),defaultBreakpoints="sm:384 md:576 lg:768 xl:960";function resizeCallback(t){setBreakpoints(t.target,t.contentRect.width)}function setBreakpoints(t,e){var r;if(!t.isConnected)return;const s=(r=t.getAttribute(Attributes$e.BREAKPOINTS))!=null?r:defaultBreakpoints,o=createBreakpointMap(s),d=getBreakpoints(o,e);let L=!1;if(Object.keys(o).forEach(ge=>{if(d.includes(ge)){t.hasAttribute(`breakpoint${ge}`)||(t.setAttribute(`breakpoint${ge}`,""),L=!0);return}t.hasAttribute(`breakpoint${ge}`)&&(t.removeAttribute(`breakpoint${ge}`),L=!0)}),L){const ge=new CustomEvent(MediaStateChangeEvents.BREAKPOINTS_CHANGE,{detail:d});t.dispatchEvent(ge)}}function createBreakpointMap(t){const e=t.split(/\s+/);return Object.fromEntries(e.map(r=>r.split(":")))}function getBreakpoints(t,e){return Object.keys(t).filter(r=>e>=t[r])}class MediaContainer extends GlobalThis.HTMLElement{constructor(){super(),__privateAdd$w(this,_handlePointerMove$2),__privateAdd$w(this,_handlePointerUp$1),__privateAdd$w(this,_setInactive),__privateAdd$w(this,_setActive),__privateAdd$w(this,_scheduleInactive),__privateAdd$w(this,_pointerDownTimeStamp,0),__privateAdd$w(this,_currentMedia,void 0),__publicField$a(this,"breakpointsComputed",!1),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(template$h.content.cloneNode(!0)));const e=L=>{const ge=this.media;for(let Mt of L)Mt.type==="childList"&&(Mt.removedNodes.forEach(er=>{if(er.slot=="media"&&Mt.target==this){let tr=Mt.previousSibling&&Mt.previousSibling.previousElementSibling;if(!tr||!ge)this.mediaUnsetCallback(er);else{let ir=tr.slot!=="media";for(;(tr=tr.previousSibling)!==null;)tr.slot=="media"&&(ir=!1);ir&&this.mediaUnsetCallback(er)}}}),ge&&Mt.addedNodes.forEach(er=>{er===ge&&this.handleMediaUpdated(ge)}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0});let s=!1;observeResize(this,L=>{s||(setTimeout(()=>{resizeCallback(L),s=!1,this.breakpointsComputed||(this.breakpointsComputed=!0,this.dispatchEvent(new CustomEvent(MediaStateChangeEvents.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))},0),s=!0)});let d=this.querySelector(":scope > slot[slot=media]");d&&d.addEventListener("slotchange",()=>{if(!d.assignedElements({flatten:!0}).length){__privateGet$w(this,_currentMedia)&&this.mediaUnsetCallback(__privateGet$w(this,_currentMedia));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[Attributes$e.AUTOHIDE,Attributes$e.GESTURES_DISABLED].concat(MEDIA_UI_ATTRIBUTE_NAMES$1).filter(e=>![MediaUIAttributes.MEDIA_RENDITION_LIST,MediaUIAttributes.MEDIA_AUDIO_TRACK_LIST,MediaUIAttributes.MEDIA_CHAPTERS_CUES].includes(e))}attributeChangedCallback(e,r,s){e.toLowerCase()==Attributes$e.AUTOHIDE&&(this.autohide=s)}get media(){let e=this.querySelector(":scope > [slot=media]");return(e==null?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(__privateSet$s(this,_currentMedia,e),e.localName.includes("-")&&await GlobalThis.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;const s=this.getAttribute(Attributes$e.AUDIO)!=null?nouns.AUDIO_PLAYER():nouns.VIDEO_PLAYER();
2314this.setAttribute("role","region"),this.setAttribute("aria-label",s),this.handleMediaUpdated(this.media),this.setAttribute(Attributes$e.USER_INACTIVE,""),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),(e=GlobalThis.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;this.media&&this.mediaUnsetCallback(this.media),(e=GlobalThis.window)==null||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){__privateSet$s(this,_currentMedia,null)}handleEvent(e){switch(e.type){case"pointerdown":__privateSet$s(this,_pointerDownTimeStamp,e.timeStamp);break;case"pointermove":__privateMethod$i(this,_handlePointerMove$2,handlePointerMove_fn$2).call(this,e);break;case"pointerup":__privateMethod$i(this,_handlePointerUp$1,handlePointerUp_fn$1).call(this,e);break;case"mouseleave":__privateMethod$i(this,_setInactive,setInactive_fn).call(this);break;case"mouseup":this.removeAttribute(Attributes$e.KEYBOARD_CONTROL);break;case"keyup":__privateMethod$i(this,_scheduleInactive,scheduleInactive_fn).call(this),this.setAttribute(Attributes$e.KEYBOARD_CONTROL,"");break}}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return this._autohide===void 0?2:this._autohide}}_pointerDownTimeStamp=new WeakMap;_currentMedia=new WeakMap;_handlePointerMove$2=new WeakSet;handlePointerMove_fn$2=function(t){t.pointerType!=="mouse"&&t.timeStamp-__privateGet$w(this,_pointerDownTimeStamp)<250||(__privateMethod$i(this,_setActive,setActive_fn).call(this),clearTimeout(this._inactiveTimeout),[this,this.media].includes(t.target)&&__privateMethod$i(this,_scheduleInactive,scheduleInactive_fn).call(this))};_handlePointerUp$1=new WeakSet;handlePointerUp_fn$1=function(t){if(t.pointerType==="touch"){const e=!this.hasAttribute(Attributes$e.USER_INACTIVE);[this,this.media].includes(t.target)&&e?__privateMethod$i(this,_setInactive,setInactive_fn).call(this):__privateMethod$i(this,_scheduleInactive,scheduleInactive_fn).call(this)}else t.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e==null?void 0:e.localName))&&__privateMethod$i(this,_scheduleInactive,scheduleInactive_fn).call(this)};_setInactive=new WeakSet;setInactive_fn=function(){if(this.autohide<0||this.hasAttribute(Attributes$e.USER_INACTIVE))return;this.setAttribute(Attributes$e.USER_INACTIVE,"");const t=new GlobalThis.CustomEvent(MediaStateChangeEvents.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(t)};_setActive=new WeakSet;setActive_fn=function(){if(!this.hasAttribute(Attributes$e.USER_INACTIVE))return;this.removeAttribute(Attributes$e.USER_INACTIVE);const t=new GlobalThis.CustomEvent(MediaStateChangeEvents.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(t)};_scheduleInactive=new WeakSet;scheduleInactive_fn=function(){__privateMethod$i(this,_setActive,setActive_fn).call(this),clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=setTimeout(()=>{__privateMethod$i(this,_setInactive,setInactive_fn).call(this)},this.autohide*1e3))};GlobalThis.customElements.get("media-container")||GlobalThis.customElements.define("media-container",MediaContainer);var __accessCheck$v=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$v=(t,e,r)=>(__accessCheck$v(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$v=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$r=(t,e,r,s)=>(__accessCheck$v(t,e,"write to private field"),e.set(t,r),r),_el,_attr,_defaultSet,_tokenSet,_tokens,tokens_get;class AttributeTokenList{constructor(e,r,{defaultValue:s}={defaultValue:void 0}){__privateAdd$v(this,_tokens),__privateAdd$v(this,_el,void 0),__privateAdd$v(this,_attr,void 0),__privateAdd$v(this,_defaultSet,void 0),__privateAdd$v(this,_tokenSet,new Set),__privateSet$r(this,_el,e),__privateSet$r(this,_attr,r),__privateSet$r(this,_defaultSet,new Set(s))}[Symbol.iterator](){return __privateGet$v(this,_tokens,tokens_get).values()}get length(){return __privateGet$v(this,_tokens,tokens_get).size}get value(){var e;return(e=[...__privateGet$v(this,_tokens,tokens_get)].join(" "))!=null?e:""}set value(e){var r;e!==this.value&&(__privateSet$r(this,_tokenSet,new Set),this.add(...(r=e==null?void 0:e.split(" "))!=null?r:[]))}toString(){return this.value}item(e){return[...__privateGet$v(this,_tokens,tokens_get)][e]}values(){return __privateGet$v(this,_tokens,tokens_get).values()}forEach(e){__privateGet$v(this,_tokens,tokens_get).forEach(e)}add(...e){var r,s;e.forEach(o=>__privateGet$v(this,_tokenSet).add(o)),!(this.value===""&&!((r=__privateGet$v(this,_el))!=null&&r.hasAttribute(`${__privateGet$v(this,_attr)}`)))&&((s=__privateGet$v(this,_el))==null||s.setAttribute(`${__privateGet$v(this,_attr)}`,`${this.value}`))}remove(...e){var r;e.forEach(s=>__privateGet$v(this,_tokenSet).delete(s)),(r=__privateGet$v(this,_el))==null||r.setAttribute(`${__privateGet$v(this,_attr)}`,`${this.value}`)}contains(e){return __privateGet$v(this,_tokens,tokens_get).has(e)}
2314toggle(e,r){return typeof r<"u"?r?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,r){return this.remove(e),this.add(r),e===r}}_el=new WeakMap;_attr=new WeakMap;_defaultSet=new WeakMap;_tokenSet=new WeakMap;_tokens=new WeakSet;tokens_get=function(){return __privateGet$v(this,_tokenSet).size?__privateGet$v(this,_tokenSet):__privateGet$v(this,_defaultSet)};const splitTextTracksStr=(t="")=>t.split(/\s+/),parseTextTrackStr=(t="")=>{let[e,r,s]=t.split(":");const o=s?decodeURIComponent(s):void 0;return e=e==="cc"?"captions":"subtitles",{kind:e,language:r,label:o}},parseTextTracksStr=(t="",e={})=>splitTextTracksStr(t).map(r=>{const s=parseTextTrackStr(r);return{...e,...s}}),parseTracks=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?parseTextTrackStr(e):e):typeof t=="string"?parseTextTracksStr(t):[t]:[],formatTextTrackObj=({kind:t,label:e,language:r}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${r}:${encodeURIComponent(e)}`:r,stringifyTextTrackList=(t=[])=>Array.prototype.map.call(t,formatTextTrackObj).join(" "),isMatchingPropOf=(t,e)=>r=>r[t]===e,textTrackObjAsPred=t=>{const e=Object.entries(t).map(([r,s])=>isMatchingPropOf(r,s));return r=>e.every(s=>s(r))},updateTracksModeTo=(t,e=[],r=[])=>{const s=parseTracks(r).map(textTrackObjAsPred),o=d=>s.some(L=>L(d));Array.from(e).filter(o).forEach(d=>{d.mode=t})},getTextTracksList=(t,e=()=>!0)=>{if(!(t!=null&&t.textTracks))return[];const r=typeof e=="function"?e:textTrackObjAsPred(e);return Array.from(t.textTracks).filter(r)},areSubsOn=t=>{var e;return!!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(MediaUIAttributes.MEDIA_SUBTITLES_SHOWING)},fullscreenApi={enter:"requestFullscreen",exit:"exitFullscreen",rootEvents:["fullscreenchange"],mediaEvents:[],element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};Document$1.fullscreenElement===void 0&&(fullscreenApi.enter="webkitRequestFullScreen",fullscreenApi.exit=Document$1.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",fullscreenApi.rootEvents=["webkitfullscreenchange"],fullscreenApi.mediaEvents=["webkitbeginfullscreen","webkitendfullscreen"],fullscreenApi.element="webkitFullscreenElement",fullscreenApi.error="webkitfullscreenerror",fullscreenApi.enabled="webkitFullscreenEnabled");let testMediaEl;const getTestMediaEl=()=>{var t,e;return testMediaEl||(testMediaEl=(e=(t=Document$1)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),testMediaEl)},hasVolumeSupportAsync=async(t=getTestMediaEl())=>{if(!t)return!1;const e=t.volume;return t.volume=e/2+.1,await delay(0),t.volume!==e},isSafari=/.*Version\/.*Safari\/.*/.test(GlobalThis.navigator.userAgent),hasPipSupport=(t=getTestMediaEl())=>GlobalThis.matchMedia("(display-mode: standalone)").matches&&isSafari?!1:typeof(t==null?void 0:t.requestPictureInPicture)=="function",hasFullscreenSupport=(t=getTestMediaEl())=>{let e=Document$1[fullscreenApi.enabled];return!e&&t&&(e="webkitSupportsFullscreen"in t),e},fullscreenSupported=hasFullscreenSupport(),pipSupported=hasPipSupport(),airplaySupported=!!GlobalThis.WebKitPlaybackTargetAvailabilityEvent,castSupported=!!GlobalThis.chrome,getSubtitleTracks=t=>getTextTracksList(t.media,e=>[TextTrackKinds.SUBTITLES,TextTrackKinds.CAPTIONS].includes(e.kind)).sort((e,r)=>e.kind>=r.kind?1:-1),getShowingSubtitleTracks=t=>getTextTracksList(t.media,e=>e.mode===TextTrackModes.SHOWING&&[TextTrackKinds.SUBTITLES,TextTrackKinds.CAPTIONS].includes(e.kind)),toggleSubtitleTracks=(t,e)=>{const r=getSubtitleTracks(t),s=getShowingSubtitleTracks(t),o=!!s.length;if(r.length){if(e===!1||o&&e!==!0)updateTracksModeTo(TextTrackModes.DISABLED,r,s);else if(e===!0||!o&&e!==!1){let d=r[0];const{options:L}=t;if(!(L!=null&&L.noSubtitlesLangPref)){const tr=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),ir=tr?[tr,...globalThis.navigator.languages]:globalThis.navigator.languages,rr=r.filter(nr=>ir.some(ar=>nr.language.toLowerCase().startsWith(ar.split("-")[0]))).sort((nr,ar)=>{const sr=ir.findIndex(cr=>nr.language.toLowerCase().startsWith(cr.split("-")[0])),lr=ir.findIndex(cr=>ar.language.toLowerCase().startsWith(cr.split("-")[0]));return sr-lr});rr[0]&&(d=rr[0])}const{language:ge,label:Mt,kind:er}=d;updateTracksModeTo(TextTrackModes.DISABLED,r,s),updateTracksModeTo(TextTrackModes.SHOWING,r,[{language:ge,label:Mt,kind:er}])}}},areValuesEq=(t,e)=>t===e?!0:typeof t!=typeof e?!1:typeof t=="number"&&Number.isNaN(t)&&Number.isNaN(e)?!0:typeof t!="object"?!1:Array.isArray(t)?areArraysEq(t,e):Object.entries(t).every(([r,s])=>r in e&&areValuesEq(s,e[r])),areArraysEq=(t,e)=>{const r=Array.isArray(t),s=Array.isArray(e);return r!==s?!1:r||s?t.length!==e.length?!1:t.every((o,d)=>areValuesEq(o,e[d])):!0},StreamTypeValues=Object.values(StreamTypes);let volumeSupported;const volumeSupportPromise=hasVolumeSupportAsync().then(t=>(volumeSupported=t,volumeSupported)),prepareStateOwners=async(...t)=>{await t.filter(e=>e).forEach(async e=>{if(!("localName"in e&&e instanceof GlobalThis.HTMLElement))return;const r=e.localName;if(!r.includes("-"))return;const s=GlobalThis.customElements.get(r);s&&e instanceof s||(await GlobalThis.customElements.whenDefined(r),GlobalThis.customElements.upgrade(e))})},stateMediator={mediaPaused:{get(t){var e;const{media:r}=t;return(e=r==null?void 0:r.paused)!=null?e:!0},set(t,e){const{media:r}=e;r&&(t?r.pause():r.play().catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(t,e){const{media:r}=t;return r?e?e.type==="playing":!r.paused:!1},mediaEvents:["playing","emptied"]},mediaEnded:{get(t){var e;const{media:r}=t;return(e=r==null?void 0:r.ended)!=null?e:!1},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(t){var e;const{media:r}=t;return(e=r==null?void 0:r.playbackRate)!=null?e:1},set(t,e){const{media:r}=e;r&&Number.isFinite(+t)&&(r.playbackRate=+t)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(t){var e;const{media:r}=t;return(e=r==null?void 0:r.muted)!=null?e:!1},set(t,e){const{media:r}=e;r&&(r.muted=t)},mediaEvents:["volumechange"]},mediaVolume:{get(t){var e;const{media:r}=t;return(e=r==null?void 0:r.volume)!=null?e:1},set(t,e){const{media:r}=e;if(r){try{t==null?GlobalThis.localStorage.removeItem("media-chrome-pref-volume"):GlobalThis.localStorage.setItem("media-chrome-pref-volume",t.toString())}catch{}Number.isFinite(+t)&&(r.volume=+t)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noVolumePref:r}}=e;if(!r)try{const s=GlobalThis.localStorage.getItem("media-chrome-pref-volume");if(s==null)return;stateMediator.mediaVolume.set(+s,e),t(s)}catch(s){console.debug("Error getting volume pref",s)}}]},mediaVolumeLevel:{get(t){const{media:e}=t;return typeof(e==null?void 0:e.volume)>"u"?"high":e.muted||e.volume===0?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(t){var e;const{media:r}=t;return(e=r==null?void 0:r.currentTime)!=null?e:0},set(t,e){const{media:r}=e;r!=null&&r.readyState&&(r.currentTime=t)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(t){const{media:e,options:{defaultDuration:r}={}}=t;return r&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?r:Number.isFinite(e==null?void 0:e.duration)?e.duration:Number.NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(t){const{media:e}=t;return(e==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(t){var e;const{media:r}=t;if(!((e=r==null?void 0:r.seekable)!=null&&e.length))return;const s=r.seekable.start(0),o=r.seekable.end(r.seekable.length-1);if(!(!s&&!o))return[Number(s.toFixed(3)),Number(o.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(t){var e;const{media:r}
2314=t,s=(e=r==null?void 0:r.buffered)!=null?e:[];return Array.from(s).map((o,d)=>[Number(s.start(d).toFixed(3)),Number(s.end(d).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(t){const{media:e,options:{defaultStreamType:r}={}}=t,s=[StreamTypes.LIVE,StreamTypes.ON_DEMAND].includes(r)?r:void 0;if(!e)return s;const{streamType:o}=e;if(StreamTypeValues.includes(o))return o===StreamTypes.UNKNOWN?s:o;const d=e.duration;return d===1/0?StreamTypes.LIVE:Number.isFinite(d)?StreamTypes.ON_DEMAND:s},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(t){const{media:e}=t;if(!e)return Number.NaN;const{targetLiveWindow:r}=e,s=stateMediator.mediaStreamType.get(t);return(r==null||Number.isNaN(r))&&s===StreamTypes.LIVE?0:r},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(t){const{media:e,options:{liveEdgeOffset:r=10}={}}=t;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(stateMediator.mediaStreamType.get(t)===StreamTypes.LIVE))return!1;const o=e.seekable;if(!o)return!0;if(!o.length)return!1;const d=o.end(o.length-1)-r;return e.currentTime>=d},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(t){return getSubtitleTracks(t).map(({kind:e,label:r,language:s})=>({kind:e,label:r,language:s}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(t){return getShowingSubtitleTracks(t).map(({kind:e,label:r,language:s})=>({kind:e,label:r,language:s}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var r,s;const{media:o,options:d}=e;if(!o)return;const L=ge=>{var Mt;!d.defaultSubtitles||ge&&![TextTrackKinds.CAPTIONS,TextTrackKinds.SUBTITLES].includes((Mt=ge==null?void 0:ge.track)==null?void 0:Mt.kind)||toggleSubtitleTracks(e,!0)};return(r=o.textTracks)==null||r.addEventListener("addtrack",L),(s=o.textTracks)==null||s.addEventListener("removetrack",L),L(),()=>{var ge,Mt;(ge=o.textTracks)==null||ge.removeEventListener("addtrack",L),(Mt=o.textTracks)==null||Mt.removeEventListener("removetrack",L)}}]},mediaChaptersCues:{get(t){var e;const{media:r}=t;if(!r)return[];const[s]=getTextTracksList(r,{kind:TextTrackKinds.CHAPTERS});return Array.from((e=s==null?void 0:s.cues)!=null?e:[]).map(({text:o,startTime:d,endTime:L})=>({text:o,startTime:d,endTime:L}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{const{media:r}=e;if(!r)return;const s=r.querySelector('track[kind="chapters"][default][src]');return s==null||s.addEventListener("load",t),()=>{s==null||s.removeEventListener("load",t)}}]},mediaIsPip:{get(t){var e,r;const{media:s,documentElement:o}=t;if(!s||!o||!o.pictureInPictureElement)return!1;if(o.pictureInPictureElement===s)return!0;if(o.pictureInPictureElement instanceof HTMLMediaElement)return(e=s.localName)!=null&&e.includes("-")?containsComposedNode(s,o.pictureInPictureElement):!1;if(o.pictureInPictureElement.localName.includes("-")){let d=o.pictureInPictureElement.shadowRoot;for(;d!=null&&d.pictureInPictureElement;){if(d.pictureInPictureElement===s)return!0;d=(r=d.pictureInPictureElement)==null?void 0:r.shadowRoot}}return!1},set(t,e){const{media:r}=e;if(r)if(t){if(!Document$1.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!r.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}const s=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};r.requestPictureInPicture().catch(o=>{if(o.code===11){if(!r.src){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");return}if(r.readyState===0&&r.preload==="none"){const d=()=>{r.removeEventListener("loadedmetadata",L),r.preload="none"},L=()=>{r.requestPictureInPicture().catch(s),d()};r.addEventListener("loadedmetadata",L),r.preload="metadata",setTimeout(()=>{r.readyState===0&&s(),d()},1e3)}else throw o}else throw o})}else Document$1.pictureInPictureElement&&Document$1.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(t){var e;const{media:r}=t;return[...(e=r==null?void 0:r.videoRenditions)!=null?e:[]].map(s=>({...s}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(t){var e,r,s;const{media:o}=t;return(s=(r=o==null?void 0:o.videoRenditions)==null?void 0:r[(e=o.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:s.id},set(t,e){const{media:r}=e;if(!(r!=null&&r.videoRenditions)){console.warn("MediaController: Rendition selection not supported by this media.");return}const s=t,o=Array.prototype.findIndex.call(r.videoRenditions,d=>d.id==s);r.videoRenditions.selectedIndex!=o&&(r.videoRenditions.selectedIndex=o)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(t){var e;const{media:r}=t;return[...(e=r==null?void 0:r.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(t){var e,r;const{media:s}=t;return(r=[...(e=s==null?void 0:s.audioTracks)!=null?e:[]].find(o=>o.enabled))==null?void 0:r.id},set(t,e){const{media:r}=e;if(!(r!=null&&r.audioTracks)){console.warn("MediaChrome: Audio track selection not supported by this media.");return}const s=t;for(let o of r.audioTracks)o.enabled=s==o.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(t){var e;const{media:r,documentElement:s,fullscreenElement:o=r}=t;if(!r||!s)return!1;if(!s[fullscreenApi.element])return"webkitDisplayingFullscreen"in r&&"webkitPresentationMode"in r?r.webkitDisplayingFullscreen&&r.webkitPresentationMode===WebkitPresentationModes.FULLSCREEN:!1;if(s[fullscreenApi.element]===o)return!0;
2314if(s[fullscreenApi.element].localName.includes("-")){let d=s[fullscreenApi.element].shadowRoot;if(!(fullscreenApi.element in d))return containsComposedNode(s[fullscreenApi.element],o);for(;d!=null&&d[fullscreenApi.element];){if(d[fullscreenApi.element]===o)return!0;d=(e=d[fullscreenApi.element])==null?void 0:e.shadowRoot}}return!1},set(t,e){var r,s;const{media:o,fullscreenElement:d,documentElement:L}=e;if(!t&&(L!=null&&L[fullscreenApi.exit])){const ge=(r=L==null?void 0:L[fullscreenApi.exit])==null?void 0:r.call(L);ge instanceof Promise&&ge.catch(()=>{});return}if(d!=null&&d[fullscreenApi.enter]){const ge=(s=d[fullscreenApi.enter])==null?void 0:s.call(d);ge instanceof Promise&&ge.catch(()=>{})}else o!=null&&o.webkitEnterFullscreen?o.webkitEnterFullscreen():o!=null&&o.requestFullscreen&&o.requestFullscreen()},rootEvents:fullscreenApi.rootEvents,mediaEvents:fullscreenApi.mediaEvents},mediaIsCasting:{get(t){var e;const{media:r}=t;return!(r!=null&&r.remote)||((e=r.remote)==null?void 0:e.state)==="disconnected"?!1:!!r.remote.state},set(t,e){var r,s;const{media:o}=e;if(o&&!(t&&((r=o.remote)==null?void 0:r.state)!=="disconnected")&&!(!t&&((s=o.remote)==null?void 0:s.state)!=="connected")){if(typeof o.remote.prompt!="function"){console.warn("MediaChrome: Casting is not supported in this environment");return}o.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(t,e){const{media:r}=e;if(r){if(!(r.webkitShowPlaybackTargetPicker&&GlobalThis.WebKitPlaybackTargetAvailabilityEvent)){console.warn("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");return}r.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(t){const{media:e}=t;if(!fullscreenSupported||!hasFullscreenSupport(e))return AvailabilityStates.UNSUPPORTED}},mediaPipUnavailable:{get(t){const{media:e}=t;if(!pipSupported||!hasPipSupport(e))return AvailabilityStates.UNSUPPORTED}},mediaVolumeUnavailable:{get(t){const{media:e}=t;if(volumeSupported===!1||(e==null?void 0:e.volume)==null)return AvailabilityStates.UNSUPPORTED},stateOwnersUpdateHandlers:[t=>{volumeSupported==null&&volumeSupportPromise.then(e=>t(e?void 0:AvailabilityStates.UNSUPPORTED))}]},mediaCastUnavailable:{get(t,{availability:e="not-available"}={}){var r;const{media:s}=t;if(!castSupported||!((r=s==null?void 0:s.remote)!=null&&r.state))return AvailabilityStates.UNSUPPORTED;if(!(e==null||e==="available"))return AvailabilityStates.UNAVAILABLE},stateOwnersUpdateHandlers:[(t,e)=>{var r;const{media:s}=e;return s?(s.disableRemotePlayback||s.hasAttribute("disableremoteplayback")||(r=s==null?void 0:s.remote)==null||r.watchAvailability(d=>{t({availability:d?"available":"not-available"})}).catch(d=>{d.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var d;(d=s==null?void 0:s.remote)==null||d.cancelWatchAvailability()}):void 0}]},mediaAirplayUnavailable:{get(t,e){if(!airplaySupported)return AvailabilityStates.UNSUPPORTED;if((e==null?void 0:e.availability)==="not-available")return AvailabilityStates.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(t,e)=>{var r;const{media:s}=e;return s?(s.disableRemotePlayback||s.hasAttribute("disableremoteplayback")||(r=s==null?void 0:s.remote)==null||r.watchAvailability(d=>{t({availability:d?"available":"not-available"})}).catch(d=>{d.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var d;(d=s==null?void 0:s.remote)==null||d.cancelWatchAvailability()}):void 0}]},mediaRenditionUnavailable:{get(t){var e;const{media:r}=t;if(!(r!=null&&r.videoRenditions))return AvailabilityStates.UNSUPPORTED;if(!((e=r.videoRenditions)!=null&&e.length))return AvailabilityStates.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(t){var e,r;const{media:s}=t;if(!(s!=null&&s.audioTracks))return AvailabilityStates.UNSUPPORTED;if(((r=(e=s.audioTracks)==null?void 0:e.length)!=null?r:0)<=1)return AvailabilityStates.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]}},requestMap={[MediaUIEvents.MEDIA_PREVIEW_REQUEST](t,e,{detail:r}){var s,o,d;const{media:L}=e,ge=r??void 0;let Mt,er;if(L&&ge!=null){const[nr]=getTextTracksList(L,{kind:TextTrackKinds.METADATA,label:"thumbnails"}),ar=Array.prototype.find.call((s=nr==null?void 0:nr.cues)!=null?s:[],(sr,lr,cr)=>lr===0?sr.endTime>ge:lr===cr.length-1?sr.startTime<=ge:sr.startTime<=ge&&sr.endTime>ge);if(ar){const sr=/'^(?:[a-z]+:)?\/\//i.test(ar.text)||(o=L==null?void 0:L.querySelector('track[label="thumbnails"]'))==null?void 0:o.src,lr=new
2314URL(ar.text,sr);er=new URLSearchParams(lr.hash).get("#xywh").split(","),Mt=lr.href}}const tr=t.mediaDuration.get(e);let rr=(d=t.mediaChaptersCues.get(e).find((nr,ar,sr)=>ar===sr.length-1&&tr===nr.endTime?nr.startTime<=ge&&nr.endTime>=ge:nr.startTime<=ge&&nr.endTime>ge))==null?void 0:d.text;return r!=null&&rr==null&&(rr=""),{mediaPreviewTime:ge,mediaPreviewImage:Mt,mediaPreviewCoords:er,mediaPreviewChapter:rr}},[MediaUIEvents.MEDIA_PAUSE_REQUEST](t,e){t["mediaPaused"].set(!0,e)},[MediaUIEvents.MEDIA_PLAY_REQUEST](t,e){var r;const s="mediaPaused";if(t.mediaStreamType.get(e)===StreamTypes.LIVE){const L=!(t.mediaTargetLiveWindow.get(e)>0),ge=(r=t.mediaSeekable.get(e))==null?void 0:r[1];L&&ge&&t.mediaCurrentTime.set(ge,e)}t[s].set(!1,e)},[MediaUIEvents.MEDIA_PLAYBACK_RATE_REQUEST](t,e,{detail:r}){const s="mediaPlaybackRate",o=r;t[s].set(o,e)},[MediaUIEvents.MEDIA_MUTE_REQUEST](t,e){t["mediaMuted"].set(!0,e)},[MediaUIEvents.MEDIA_UNMUTE_REQUEST](t,e){const r="mediaMuted";t.mediaVolume.get(e)||t.mediaVolume.set(.25,e),t[r].set(!1,e)},[MediaUIEvents.MEDIA_VOLUME_REQUEST](t,e,{detail:r}){const s="mediaVolume",o=r;o&&t.mediaMuted.get(e)&&t.mediaMuted.set(!1,e),t[s].set(o,e)},[MediaUIEvents.MEDIA_SEEK_REQUEST](t,e,{detail:r}){const s="mediaCurrentTime",o=r;t[s].set(o,e)},[MediaUIEvents.MEDIA_SEEK_TO_LIVE_REQUEST](t,e){var r;const s="mediaCurrentTime",o=(r=t.mediaSeekable.get(e))==null?void 0:r[1];Number.isNaN(Number(o))&&t[s].set(o,e)},[MediaUIEvents.MEDIA_SHOW_SUBTITLES_REQUEST](t,e,{detail:r}){var s;const{options:o}=e,d=getSubtitleTracks(e),L=parseTracks(r),ge=(s=L[0])==null?void 0:s.language;ge&&!o.noSubtitlesLangPref&&GlobalThis.localStorage.setItem("media-chrome-pref-subtitles-lang",ge),updateTracksModeTo(TextTrackModes.SHOWING,d,L)},[MediaUIEvents.MEDIA_DISABLE_SUBTITLES_REQUEST](t,e,{detail:r}){const s=getSubtitleTracks(e),o=r??[];updateTracksModeTo(TextTrackModes.DISABLED,s,o)},[MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST](t,e,{detail:r}){toggleSubtitleTracks(e,r)},[MediaUIEvents.MEDIA_RENDITION_REQUEST](t,e,{detail:r}){const s="mediaRenditionSelected",o=r;t[s].set(o,e)},[MediaUIEvents.MEDIA_AUDIO_TRACK_REQUEST](t,e,{detail:r}){const s="mediaAudioTrackEnabled",o=r;t[s].set(o,e)},[MediaUIEvents.MEDIA_ENTER_PIP_REQUEST](t,e){const r="mediaIsPip";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[r].set(!0,e)},[MediaUIEvents.MEDIA_EXIT_PIP_REQUEST](t,e){t["mediaIsPip"].set(!1,e)},[MediaUIEvents.MEDIA_ENTER_FULLSCREEN_REQUEST](t,e){const r="mediaIsFullscreen";t.mediaIsPip.get(e)&&t.mediaIsPip.set(!1,e),t[r].set(!0,e)},[MediaUIEvents.MEDIA_EXIT_FULLSCREEN_REQUEST](t,e){t["mediaIsFullscreen"].set(!1,e)},[MediaUIEvents.MEDIA_ENTER_CAST_REQUEST](t,e){const r="mediaIsCasting";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[r].set(!0,e)},[MediaUIEvents.MEDIA_EXIT_CAST_REQUEST](t,e){t["mediaIsCasting"].set(!1,e)},[MediaUIEvents.MEDIA_AIRPLAY_REQUEST](t,e){t["mediaIsAirplaying"].set(!0,e)}},createMediaStore=({media:t,fullscreenElement:e,documentElement:r,stateMediator:s=stateMediator,requestMap:o=requestMap,options:d={},monitorStateOwnersOnlyWithSubscriptions:L=!0})=>{const ge=[],Mt={options:{...d}};let er=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0});const tr=sr=>{sr!=null&&(areValuesEq(sr,er)||(er=Object.freeze({...er,...sr}),ge.forEach(lr=>lr(er))))},ir=()=>{const sr=Object.entries(s).reduce((lr,[cr,{get:ur}])=>(lr[cr]=ur(Mt),lr),{});tr(sr)},rr={};let nr;const ar=async(sr,lr)=>{var cr,ur,or,dr,hr,pr,mr,vr,Er,Cr,Pr,kr,Mr,Ur,$r,yr;const xr=!!nr;if(nr={...Mt,...nr??{},...sr},xr)return;await prepareStateOwners(...Object.values(sr));const gr=ge.length>0&&lr===0&&L,_r=Mt.media!==nr.media,wr=((cr=Mt.media)==null?void 0:cr.textTracks)!==((ur=nr.media)==null?void 0:ur.textTracks),Ir=((or=Mt.media)==null?void 0:or.videoRenditions)!==((dr=nr.media)==null?void 0:dr.videoRenditions),Hr=((hr=Mt.media)==null?void 0:hr.audioTracks)!==((pr=nr.media)==null?void 0:pr.audioTracks),Yr=((mr=Mt.media)==null?void 0:mr.remote)!==((vr=nr.media)==null?void 0:vr.remote),Jr=Mt.documentElement!==nr.documentElement,xi=!!Mt.media&&(_r||gr),di=!!((Er=Mt.media)!=null&&Er.textTracks)&&(wr||gr),Vr=!!((Cr=Mt.media)!=null&&Cr.videoRenditions)&&(Ir||gr),Zr=!!((Pr=Mt.media)!=null&&Pr.audioTracks)&&(Hr||gr),Qr=!!((kr=Mt.media)!=null&&kr.remote)&&(Yr||gr),Ai=!!Mt.documentElement&&(Jr||gr),Mi=xi||di||Vr||Zr||Qr||Ai,Dr=ge.length===0&&lr===1&&L,Lr=!!nr.media&&(_r||Dr),Nr=!!((Mr=nr.media)!=null&&Mr.textTracks)&&(wr||Dr),Wr=!!((Ur=nr.media)!=null&&Ur.videoRenditions)&&(Ir||Dr),qr=!!(($r=nr.media)!=null&&$r.audioTracks)&&(Hr||Dr),Fr=!!((yr=nr.media)!=null&&yr.remote)&&(Yr||Dr),Ti=!!nr.documentElement&&(Jr||Dr),Xr=Lr||Nr||Wr||qr||Fr||Ti;if(!(Mi||Xr)){Object.entries(nr).forEach(([jr,wi])=>{Mt[jr]=wi}),ir(),nr=void 0;return}
2314Object.entries(s).forEach(([jr,{get:wi,mediaEvents:ki=[],textTracksEvents:Ii=[],videoRenditionsEvents:Pi=[],audioTracksEvents:Di=[],remoteEvents:Oi=[],rootEvents:Wi=[],stateOwnersUpdateHandlers:Zi=[]}])=>{rr[jr]||(rr[jr]={});const en=an=>{const mn=wi(Mt,an);tr({[jr]:mn})};let un;un=rr[jr].mediaEvents,ki.forEach(an=>{un&&xi&&(Mt.media.removeEventListener(an,un),rr[jr].mediaEvents=void 0),Lr&&(nr.media.addEventListener(an,en),rr[jr].mediaEvents=en)}),un=rr[jr].textTracksEvents,Ii.forEach(an=>{var mn,on;un&&di&&((mn=Mt.media.textTracks)==null||mn.removeEventListener(an,un),rr[jr].textTracksEvents=void 0),Nr&&((on=nr.media.textTracks)==null||on.addEventListener(an,en),rr[jr].textTracksEvents=en)}),un=rr[jr].videoRenditionsEvents,Pi.forEach(an=>{var mn,on;un&&Vr&&((mn=Mt.media.videoRenditions)==null||mn.removeEventListener(an,un),rr[jr].videoRenditionsEvents=void 0),Wr&&((on=nr.media.videoRenditions)==null||on.addEventListener(an,en),rr[jr].videoRenditionsEvents=en)}),un=rr[jr].audioTracksEvents,Di.forEach(an=>{var mn,on;un&&Zr&&((mn=Mt.media.audioTracks)==null||mn.removeEventListener(an,un),rr[jr].audioTracksEvents=void 0),qr&&((on=nr.media.audioTracks)==null||on.addEventListener(an,en),rr[jr].audioTracksEvents=en)}),un=rr[jr].remoteEvents,Oi.forEach(an=>{var mn,on;un&&Qr&&((mn=Mt.media.remote)==null||mn.removeEventListener(an,un),rr[jr].remoteEvents=void 0),Fr&&((on=nr.media.remote)==null||on.addEventListener(an,en),rr[jr].remoteEvents=en)}),un=rr[jr].rootEvents,Wi.forEach(an=>{un&&Ai&&(Mt.documentElement.removeEventListener(an,un),rr[jr].rootEvents=void 0),Ti&&(nr.documentElement.addEventListener(an,en),rr[jr].rootEvents=en)});const fn=rr[jr].stateOwnersUpdateHandlers;Zi.forEach(an=>{fn&&Mi&&fn(),Xr&&(rr[jr].stateOwnersUpdateHandlers=an(en,nr))})}),Object.entries(nr).forEach(([jr,wi])=>{Mt[jr]=wi}),ir(),nr=void 0};return ar({media:t,fullscreenElement:e,documentElement:r,options:d}),{dispatch(sr){const{type:lr,detail:cr}=sr;if(o[lr]){tr(o[lr](s,Mt,sr));return}lr==="mediaelementchangerequest"?ar({media:cr}):lr==="fullscreenelementchangerequest"?ar({fullscreenElement:cr}):lr==="documentelementchangerequest"?ar({documentElement:cr}):lr==="optionschangerequest"&&Object.entries(cr??{}).forEach(([ur,or])=>{Mt.options[ur]=or})},getState(){return er},subscribe(sr){return ar({},ge.length+1),ge.push(sr),sr(er),()=>{const lr=ge.indexOf(sr);lr>=0&&(ar({},ge.length-1),ge.splice(lr,1))}}}};var media_store_default=createMediaStore,__accessCheck$u=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$u=(t,e,r)=>(__accessCheck$u(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$u=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$q=(t,e,r,s)=>(__accessCheck$u(t,e,"write to private field"),e.set(t,r),r),__privateMethod$h=(t,e,r)=>(__accessCheck$u(t,e,"access private method"),r),_hotKeys,_fullscreenElement,_mediaStore,_mediaStateCallback,_mediaStoreUnsubscribe,_mediaStateEventHandler,_setupDefaultStore,setupDefaultStore_fn,_keyUpHandler,keyUpHandler_fn,_keyDownHandler,keyDownHandler_fn;const ButtonPressedKeys$1=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],DEFAULT_SEEK_OFFSET$2=10,Attributes$d={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys",NO_VOLUME_PREF:"novolumepref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_DEFAULT_STORE:"nodefaultstore",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset"};class MediaController extends MediaContainer{constructor(){super(),__privateAdd$u(this,_setupDefaultStore),__privateAdd$u(this,_keyUpHandler),__privateAdd$u(this,_keyDownHandler),__privateAdd$u(this,_hotKeys,new AttributeTokenList(this,Attributes$d.HOTKEYS)),__privateAdd$u(this,_fullscreenElement,void 0),__privateAdd$u(this,_mediaStore,void 0),__privateAdd$u(this,_mediaStateCallback,void 0),__privateAdd$u(this,_mediaStoreUnsubscribe,void 0),__privateAdd$u(this,_mediaStateEventHandler,r=>{var s;(s=__privateGet$u(this,_mediaStore))==null||s.dispatch(r)}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this);let e={};__privateSet$q(this,_mediaStateCallback,r=>{Object.entries(r).forEach(([s,o])=>{if(s in e&&e[s]===o)return;
vendor: 4,557 bytes, line 2314
2314this.propagateMediaState(s,o);const d=s.toLowerCase(),L=new GlobalThis.CustomEvent(AttributeToStateChangeEventMap[d],{composed:!0,detail:o});this.dispatchEvent(L)}),e=r}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(Attributes$d.NO_HOTKEYS,Attributes$d.HOTKEYS,Attributes$d.DEFAULT_STREAM_TYPE,Attributes$d.DEFAULT_SUBTITLES,Attributes$d.DEFAULT_DURATION)}get mediaStore(){return __privateGet$u(this,_mediaStore)}set mediaStore(e){var r,s;if(__privateGet$u(this,_mediaStore)&&((r=__privateGet$u(this,_mediaStoreUnsubscribe))==null||r.call(this),__privateSet$q(this,_mediaStoreUnsubscribe,void 0)),__privateSet$q(this,_mediaStore,e),!__privateGet$u(this,_mediaStore)&&!this.hasAttribute(Attributes$d.NO_DEFAULT_STORE)){__privateMethod$h(this,_setupDefaultStore,setupDefaultStore_fn).call(this);return}__privateSet$q(this,_mediaStoreUnsubscribe,(s=__privateGet$u(this,_mediaStore))==null?void 0:s.subscribe(__privateGet$u(this,_mediaStateCallback)))}get fullscreenElement(){var e;return(e=__privateGet$u(this,_fullscreenElement))!=null?e:this}set fullscreenElement(e){var r;this.hasAttribute(Attributes$d.FULLSCREEN_ELEMENT)&&this.removeAttribute(Attributes$d.FULLSCREEN_ELEMENT),__privateSet$q(this,_fullscreenElement,e),(r=__privateGet$u(this,_mediaStore))==null||r.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}attributeChangedCallback(e,r,s){var o,d,L,ge,Mt,er;if(super.attributeChangedCallback(e,r,s),e===Attributes$d.NO_HOTKEYS)s!==r&&s===""?(this.hasAttribute(Attributes$d.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):s!==r&&s===null&&this.enableHotkeys();else if(e===Attributes$d.HOTKEYS)__privateGet$u(this,_hotKeys).value=s;else if(e===Attributes$d.DEFAULT_SUBTITLES&&s!==r)(o=__privateGet$u(this,_mediaStore))==null||o.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(Attributes$d.DEFAULT_SUBTITLES)}});else if(e===Attributes$d.DEFAULT_STREAM_TYPE)(L=__privateGet$u(this,_mediaStore))==null||L.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(d=this.getAttribute(Attributes$d.DEFAULT_STREAM_TYPE))!=null?d:void 0}});else if(e===Attributes$d.LIVE_EDGE_OFFSET)(ge=__privateGet$u(this,_mediaStore))==null||ge.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(Attributes$d.LIVE_EDGE_OFFSET)?+this.getAttribute(Attributes$d.LIVE_EDGE_OFFSET):void 0}});else if(e===Attributes$d.FULLSCREEN_ELEMENT){const tr=s?(Mt=this.getRootNode())==null?void 0:Mt.getElementById(s):void 0;__privateSet$q(this,_fullscreenElement,tr),(er=__privateGet$u(this,_mediaStore))==null||er.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}}connectedCallback(){var e,r;!__privateGet$u(this,_mediaStore)&&!this.hasAttribute(Attributes$d.NO_DEFAULT_STORE)&&__privateMethod$h(this,_setupDefaultStore,setupDefaultStore_fn).call(this),(e=__privateGet$u(this,_mediaStore))==null||e.dispatch({type:"documentelementchangerequest",detail:Document$1}),super.connectedCallback(),__privateGet$u(this,_mediaStore)&&!__privateGet$u(this,_mediaStoreUnsubscribe)&&__privateSet$q(this,_mediaStoreUnsubscribe,(r=__privateGet$u(this,_mediaStore))==null?void 0:r.subscribe(__privateGet$u(this,_mediaStateCallback))),this.enableHotkeys()}disconnectedCallback(){var e,r,s,o;(e=super.disconnectedCallback)==null||e.call(this),__privateGet$u(this,_mediaStore)&&((r=__privateGet$u(this,_mediaStore))==null||r.dispatch({type:"documentelementchangerequest",detail:void 0}),(s=__privateGet$u(this,_mediaStore))==null||s.dispatch({type:MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),__privateGet$u(this,_mediaStoreUnsubscribe)&&((o=__privateGet$u(this,_mediaStoreUnsubscribe))==null||o.call(this),__privateSet$q(this,_mediaStoreUnsubscribe,void 0))}mediaSetCallback(e){var r;super.mediaSetCallback(e),(r=__privateGet$u(this,_mediaStore))==null||r.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var r;super.mediaUnsetCallback(e),(r=__privateGet$u(this,_mediaStore))==null||r.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,r){propagateMediaState(this.mediaStateReceivers,e,r)}associateElement(e){if(!e)return;const{associatedElementSubscriptions:r}=this;if(r.has(e))return;const s=this.registerMediaStateReceiver.bind(this),o=this.unregisterMediaStateReceiver.bind(this),d=monitorForMediaStateReceivers(e,s,o);
2314Object.values(MediaUIEvents).forEach(L=>{e.addEventListener(L,__privateGet$u(this,_mediaStateEventHandler))}),r.set(e,d)}unassociateElement(e){if(!e)return;const{associatedElementSubscriptions:r}=this;if(!r.has(e))return;r.get(e)(),r.delete(e),Object.values(MediaUIEvents).forEach(o=>{e.removeEventListener(o,__privateGet$u(this,_mediaStateEventHandler))})}registerMediaStateReceiver(e){if(!e)return;const r=this.mediaStateReceivers;r.indexOf(e)>-1||(r.push(e),__privateGet$u(this,_mediaStore)&&Object.entries(__privateGet$u(this,_mediaStore).getState()).forEach(([o,d])=>{propagateMediaState([e],o,d)}))}unregisterMediaStateReceiver(e){const r=this.mediaStateReceivers,s=r.indexOf(e);s<0||r.splice(s,1)}enableHotkeys(){this.addEventListener("keydown",__privateMethod$h(this,_keyDownHandler,keyDownHandler_fn))}disableHotkeys(){this.removeEventListener("keydown",__privateMethod$h(this,_keyDownHandler,keyDownHandler_fn)),this.removeEventListener("keyup",__privateMethod$h(this,_keyUpHandler,keyUpHandler_fn))}get hotkeys(){return __privateGet$u(this,_hotKeys)}keyboardShortcutHandler(e){var r,s,o,d,L,ge;if(((d=(o=(r=e.target.getAttribute(Attributes$d.KEYS_USED))==null?void 0:r.split(" "))!=null?o:(s=e.target)==null?void 0:s.keysUsed)!=null?d:[]).map(rr=>rr==="Space"?" ":rr).filter(Boolean).includes(e.key))return;let er,tr,ir;if(!__privateGet$u(this,_hotKeys).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&__privateGet$u(this,_hotKeys).contains("nospace")))switch(e.key){case" ":case"k":er=__privateGet$u(this,_mediaStore).getState().mediaPaused?MediaUIEvents.MEDIA_PLAY_REQUEST:MediaUIEvents.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new GlobalThis.CustomEvent(er,{composed:!0,bubbles:!0}));break;case"m":er=this.mediaStore.getState().mediaVolumeLevel==="off"?MediaUIEvents.MEDIA_UNMUTE_REQUEST:MediaUIEvents.MEDIA_MUTE_REQUEST,this.dispatchEvent(new GlobalThis.CustomEvent(er,{composed:!0,bubbles:!0}));break;case"f":er=this.mediaStore.getState().mediaIsFullscreen?MediaUIEvents.MEDIA_EXIT_FULLSCREEN_REQUEST:MediaUIEvents.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new GlobalThis.CustomEvent(er,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":{const rr=this.hasAttribute(Attributes$d.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(Attributes$d.KEYBOARD_BACKWARD_SEEK_OFFSET):DEFAULT_SEEK_OFFSET$2;tr=Math.max(((L=this.mediaStore.getState().mediaCurrentTime)!=null?L:0)-rr,0),ir=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:tr}),this.dispatchEvent(ir);break}case"ArrowRight":{const rr=this.hasAttribute(Attributes$d.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(Attributes$d.KEYBOARD_FORWARD_SEEK_OFFSET):DEFAULT_SEEK_OFFSET$2;tr=Math.max(((ge=this.mediaStore.getState().mediaCurrentTime)!=null?ge:0)+rr,0),ir=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:tr}),this.dispatchEvent(ir);break}}}}_hotKeys=new WeakMap;_fullscreenElement=new WeakMap;_mediaStore=new WeakMap;_mediaStateCallback=new WeakMap;_mediaStoreUnsubscribe=new WeakMap;_mediaStateEventHandler=new WeakMap;_setupDefaultStore=new WeakSet;setupDefaultStore_fn=function(){var t;this.mediaStore=media_store_default({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(Attributes$d.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(Attributes$d.DEFAULT_DURATION)?+this.getAttribute(Attributes$d.DEFAULT_DURATION):void 0,defaultStreamType:(t=this.getAttribute(Attributes$d.DEFAULT_STREAM_TYPE))!=null?t:void 0,liveEdgeOffset:this.hasAttribute(Attributes$d.LIVE_EDGE_OFFSET)?+this.getAttribute(Attributes$d.LIVE_EDGE_OFFSET):void 0,noVolumePref:this.hasAttribute(Attributes$d.NO_VOLUME_PREF),noSubtitlesLangPref:this.hasAttribute(Attributes$d.NO_SUBTITLES_LANG_PREF)}})};_keyUpHandler=new WeakSet;keyUpHandler_fn=function(t){const{key:e}=t;if(!ButtonPressedKeys$1.includes(e)){this.removeEventListener("keyup",__privateMethod$h(this,_keyUpHandler,keyUpHandler_fn));return}this.keyboardShortcutHandler(t)};
2314_keyDownHandler=new WeakSet;keyDownHandler_fn=function(t){const{metaKey:e,altKey:r,key:s}=t;if(e||r||!ButtonPressedKeys$1.includes(s)){this.removeEventListener("keyup",__privateMethod$h(this,_keyUpHandler,keyUpHandler_fn));return}[" ","ArrowLeft","ArrowRight"].includes(s)&&!(__privateGet$u(this,_hotKeys).contains(`no${s.toLowerCase()}`)||s===" "&&__privateGet$u(this,_hotKeys).contains("nospace"))&&t.preventDefault(),this.addEventListener("keyup",__privateMethod$h(this,_keyUpHandler,keyUpHandler_fn),{once:!0})};const MEDIA_UI_ATTRIBUTE_NAMES=Object.values(MediaUIAttributes),MEDIA_UI_PROP_NAMES=Object.values(MediaUIProps),getMediaUIAttributesFrom=t=>{var e,r,s,o;let{observedAttributes:d}=t.constructor;!d&&((e=t.nodeName)!=null&&e.includes("-"))&&(GlobalThis.customElements.upgrade(t),{observedAttributes:d}=t.constructor);const L=(o=(s=(r=t==null?void 0:t.getAttribute)==null?void 0:r.call(t,MediaStateReceiverAttributes.MEDIA_CHROME_ATTRIBUTES))==null?void 0:s.split)==null?void 0:o.call(s,/\s+/);return Array.isArray(d||L)?(d||L).filter(ge=>MEDIA_UI_ATTRIBUTE_NAMES.includes(ge)):[]},hasMediaUIProps=t=>{var e,r;return(e=t.nodeName)!=null&&e.includes("-")&&GlobalThis.customElements.get((r=t.nodeName)==null?void 0:r.toLowerCase())&&!(t instanceof GlobalThis.customElements.get(t.nodeName.toLowerCase()))&&GlobalThis.customElements.upgrade(t),MEDIA_UI_PROP_NAMES.some(s=>s in t)},isMediaStateReceiver=t=>hasMediaUIProps(t)||!!getMediaUIAttributesFrom(t).length,serializeTuple=t=>{var e;return(e=t==null?void 0:t.join)==null?void 0:e.call(t,":")},CustomAttrSerializer={[MediaUIAttributes.MEDIA_SUBTITLES_LIST]:stringifyTextTrackList,[MediaUIAttributes.MEDIA_SUBTITLES_SHOWING]:stringifyTextTrackList,[MediaUIAttributes.MEDIA_SEEKABLE]:serializeTuple,[MediaUIAttributes.MEDIA_BUFFERED]:t=>t==null?void 0:t.map(serializeTuple).join(" "),[MediaUIAttributes.MEDIA_PREVIEW_COORDS]:t=>t==null?void 0:t.join(" "),[MediaUIAttributes.MEDIA_RENDITION_LIST]:stringifyRenditionList,[MediaUIAttributes.MEDIA_AUDIO_TRACK_LIST]:stringifyAudioTrackList},setAttr=async(t,e,r)=>{var s,o;if(t.isConnected||await delay(0),typeof r=="boolean"||r==null)return setBooleanAttr(t,e,r);if(typeof r=="number")return setNumericAttr(t,e,r);if(typeof r=="string")return setStringAttr(t,e,r);if(Array.isArray(r)&&!r.length)return t.removeAttribute(e);const d=(o=(s=CustomAttrSerializer[e])==null?void 0:s.call(CustomAttrSerializer,r))!=null?o:r;return t.setAttribute(e,d)},isMediaSlotElementDescendant=t=>{var e;return!!((e=t.closest)!=null&&e.call(t,'*[slot="media"]'))},traverseForMediaStateReceivers=(t,e)=>{if(isMediaSlotElementDescendant(t))return;const r=(o,d)=>{var L,ge;isMediaStateReceiver(o)&&d(o);const{children:Mt=[]}=o??{},er=(ge=(L=o==null?void 0:o.shadowRoot)==null?void 0:L.children)!=null?ge:[];[...Mt,...er].forEach(ir=>traverseForMediaStateReceivers(ir,d))},s=t==null?void 0:t.nodeName.toLowerCase();if(s.includes("-")&&!isMediaStateReceiver(t)){GlobalThis.customElements.whenDefined(s).then(()=>{r(t,e)});return}r(t,e)},propagateMediaState=(t,e,r)=>{t.forEach(s=>{if(e in s){s[e]=r;return}const o=getMediaUIAttributesFrom(s),d=e.toLowerCase();o.includes(d)&&setAttr(s,d,r)})},monitorForMediaStateReceivers=(t,e,r)=>{traverseForMediaStateReceivers(t,e);const s=tr=>{var ir;const rr=(ir=tr==null?void 0:tr.composedPath()[0])!=null?ir:tr.target;e(rr)},o=tr=>{var ir;const rr=(ir=tr==null?void 0:tr.composedPath()[0])!=null?ir:tr.target;r(rr)};t.addEventListener(MediaUIEvents.REGISTER_MEDIA_STATE_RECEIVER,s),t.addEventListener(MediaUIEvents.UNREGISTER_MEDIA_STATE_RECEIVER,o);const d=tr=>{tr.forEach(ir=>{const{addedNodes:rr=[],removedNodes:nr=[],type:ar,target:sr,attributeName:lr}=ir;ar==="childList"?(Array.prototype.forEach.call(rr,cr=>traverseForMediaStateReceivers(cr,e)),Array.prototype.forEach.call(nr,cr=>traverseForMediaStateReceivers(cr,r))):ar==="attributes"&&lr===MediaStateReceiverAttributes.MEDIA_CHROME_ATTRIBUTES&&(isMediaStateReceiver(sr)?e(sr):r(sr))})};let L=[];const ge=tr=>{const ir=tr.target;ir.name!=="media"&&(L.forEach(rr=>traverseForMediaStateReceivers(rr,r)),L=[...ir.assignedElements({flatten:!0}
2314)],L.forEach(rr=>traverseForMediaStateReceivers(rr,e)))};t.addEventListener("slotchange",ge);const Mt=new MutationObserver(d);return Mt.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{traverseForMediaStateReceivers(t,r),t.removeEventListener("slotchange",ge),Mt.disconnect(),t.removeEventListener(MediaUIEvents.REGISTER_MEDIA_STATE_RECEIVER,s),t.removeEventListener(MediaUIEvents.UNREGISTER_MEDIA_STATE_RECEIVER,o)}};GlobalThis.customElements.get("media-controller")||GlobalThis.customElements.define("media-controller",MediaController);var media_controller_default=MediaController,__defProp$9=Object.defineProperty,__defNormalProp$9=(t,e,r)=>e in t?__defProp$9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$9=(t,e,r)=>(__defNormalProp$9(t,e+"",r),r),__accessCheck$t=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$t=(t,e,r)=>(__accessCheck$t(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$t=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$p=(t,e,r,s)=>(__accessCheck$t(t,e,"write to private field"),e.set(t,r),r),_mediaController$8,_clickListener$1,_keyupListener$2,_keydownListener$2;const template$g=Document$1.createElement("template");template$g.innerHTML=` 2315<style> 2316 :host { 2317 font: var(--media-font, 2318 var(--media-font-weight, bold) 2319 var(--media-font-size, 14px) / 2320 var(--media-text-content-height, var(--media-control-height, 24px)) 2321 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 2322 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 2323 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 2324 padding: var(--media-button-padding, var(--media-control-padding, 10px)); 2325 justify-content: var(--media-button-justify-content, center); 2326 display: inline-flex; 2327 align-items: center; 2328 vertical-align: middle; 2329 box-sizing: border-box; 2330 transition: background .15s linear; 2331 pointer-events: auto; 2332 cursor: pointer; 2333 -webkit-tap-highlight-color: transparent; 2334 } 2335 2336 2337 :host(:focus-visible) { 2338 box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9); 2339 outline: 0; 2340 } 2341 2342 :host(:where(:focus)) { 2343 box-shadow: none; 2344 outline: 0; 2345 } 2346 2347 :host(:hover) { 2348 background: var(--media-control-hover-background, rgba(50 50 70 / .7)); 2349 } 2350 2351 svg, img, ::slotted(svg), ::slotted(img) { 2352 width: var(--media-button-icon-width); 2353 height: var(--media-button-icon-height, var(--media-control-height, 24px)); 2354 transform: var(--media-button-icon-transform); 2355 transition: var(--media-button-icon-transition); 2356 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 2357 vertical-align: middle; 2358 max-width: 100%; 2359 max-height: 100%; 2360 min-width: 100%; 2361 } 2362</style> 2363`;class MediaChromeButton extends GlobalThis.HTMLElement{constructor(e={}){if(super(),__privateAdd$t(this,_mediaController$8,void 0),__publicField$9(this,"preventClick",!1),__privateAdd$t(this,_clickListener$1,r=>{this.preventClick||this.handleClick(r)}),__privateAdd$t(this,_keyupListener$2,r=>{const{key:s}=r;if(!this.keysUsed.includes(s)){this.removeEventListener("keyup",__privateGet$t(this,_keyupListener$2));return}this.preventClick||this.handleClick(r)}),__privateAdd$t(this,_keydownListener$2,r=>{const{metaKey:s,altKey:o,key:d}=r;if(s||o||!this.keysUsed.includes(d)){this.removeEventListener("keyup",__privateGet$t(this,_keyupListener$2));return}this.addEventListener("keyup",__privateGet$t(this,_keyupListener$2),{once:!0})}),!this.shadowRoot){this.attachShadow({mode:"open"});const r=template$g.content.cloneNode(!0);this.nativeEl=r;let s=e.slotTemplate;s||(s=Document$1.createElement("template"),s.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(s.content.cloneNode(!0)),this.shadowRoot.appendChild(r)}}static get observedAttributes(){return["disabled",MediaStateReceiverAttributes.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",__privateGet$t(this,_clickListener$1)),this.addEventListener("keydown",__privateGet$t(this,_keydownListener$2)),this.tabIndex=0}disable(){this.removeEventListener("click",__privateGet$t(this,_clickListener$1)),this.removeEventListener("keydown",__privateGet$t(this,_keydownListener$2)),this.removeEventListener("keyup",__privateGet$t(this,_keyupListener$2)),this.tabIndex=-1}attributeChangedCallback(e,r,s){var o,d,L,ge,Mt;e===MediaStateReceiverAttributes.MEDIA_CONTROLLER?(r&&((d=(o=__privateGet$t(this,_mediaController$8))==null?void 0:o.unassociateElement)==null||d.call(o,this),__privateSet$p(this,_mediaController$8,null)),s&&this.isConnected&&(__privateSet$p(this,_mediaController$8,(L=this.getRootNode())==null?void 0:L.getElementById(s)),(Mt=(ge=__privateGet$t(this,_mediaController$8))==null?void 0:ge.associateElement)==null||Mt.call(ge,this))):e==="disabled"&&s!==r&&(s==null?this.enable():this.disable())}connectedCallback(){var e,r,s;const{style:o}=getOrInsertCSSRule(this.shadowRoot,":host");o.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","button");const d=this.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER);d&&(__privateSet$p(this,_mediaController$8,(e=this.getRootNode())==null?void 0:e.getElementById(d)),(s=(r=__privateGet$t(this,_mediaController$8))==null?void 0:r.associateElement)==null||s.call(r,this))}disconnectedCallback(){var e,r;this.disable(),(r=(e=__privateGet$t(this,_mediaController$8))==null?void 0:e.unassociateElement)==null||r.call(e,this),__privateSet$p(this,_mediaController$8,null)}get keysUsed(){return["Enter"," "]}handleClick(e){}}_mediaController$8=new WeakMap;_clickListener$1=new WeakMap;_keyupListener$2=new WeakMap;_keydownListener$2=new WeakMap;GlobalThis.customElements.get("media-chrome-button")||GlobalThis.customElements.define("media-chrome-button",MediaChromeButton);const airplayIcon=`<svg aria-hidden="true" viewBox="0 0 26 24"> 2364 <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"/> 2365</svg> 2366`,slotTemplate$i=Document$1.createElement("template");slotTemplate$i.innerHTML=` 2367 <style> 2368 :host([${MediaUIAttributes.MEDIA_IS_AIRPLAYING}]) slot:not([name=exit]):not([name=icon]) { 2369 display: none !important; 2370 } 2371 2372 2373 :host(:not([${MediaUIAttributes.MEDIA_IS_AIRPLAYING}])) slot:not([name=enter]):not([name=icon]) { 2374 display: none !important; 2375 } 2376 </style> 2377 2378 <slot name="icon"> 2379 <slot name="enter">${airplayIcon}</slot> 2380 <slot name="exit">${airplayIcon}</slot> 2381 </slot> 2382`;const updateAriaLabel$5=t=>{const e=t.mediaIsAirplaying?verbs.EXIT_AIRPLAY():verbs.ENTER_AIRPLAY();t.setAttribute("aria-label",e)};class MediaAirplayButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_IS_AIRPLAYING,MediaUIAttributes.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:slotTemplate$i,...e})}connectedCallback(){super.connectedCallback(),updateAriaLabel$5(this)}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_IS_AIRPLAYING&&updateAriaLabel$5(this)}get mediaIsAirplaying(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return getStringAttr(this,MediaUIAttributes.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){setStringAttr(this,MediaUIAttributes.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){const e=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}GlobalThis.customElements.get("media-airplay-button")||GlobalThis.customElements.define("media-airplay-button",MediaAirplayButton);function computePosition({anchor:t,floating:e,placement:r}){let s=getElementRects({anchor:t,floating:e}),{x:o,y:d}=computeCoordsFromPlacement(s,r);return{x:o,y:d}}function getElementRects({anchor:t,floating:e}){return{anchor:getRectRelativeToOffsetParent(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function getRectRelativeToOffsetParent(t,e){let r=t.getBoundingClientRect(),s=e.getBoundingClientRect();return{x:r.x-s.x,y:r.y-s.y,width:r.width,height:r.height}}function computeCoordsFromPlacement({anchor:t,floating:e},r){const s=getSideAxis(r)==="x"?"y":"x",o=s==="y"?"height":"width",d=getSide(r),L=t.x+t.width/2-e.width/2,ge=t.y+t.height/2-e.height/2,Mt=t[o]/2-e[o]/2;let er;
2382switch(d){case"top":er={x:L,y:t.y-e.height};break;case"bottom":er={x:L,y:t.y+t.height};break;case"right":er={x:t.x+t.width,y:ge};break;case"left":er={x:t.x-e.width,y:ge};break;default:er={x:t.x,y:t.y}}switch(r.split("-")[1]){case"start":er[s]-=Mt;break;case"end":er[s]+=Mt;break}return er}function getSide(t){return t.split("-")[0]}function getSideAxis(t){return["top","bottom"].includes(getSide(t))?"y":"x"}var __defProp$8=Object.defineProperty,__defNormalProp$8=(t,e,r)=>e in t?__defProp$8(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$8=(t,e,r)=>(__defNormalProp$8(t,typeof e!="symbol"?e+"":e,r),r);class InvokeEvent extends Event{constructor({action:e="auto",relatedTarget:r,...s}){super("invoke",s),__publicField$8(this,"action"),__publicField$8(this,"relatedTarget"),this.action=e,this.relatedTarget=r}}class ToggleEvent extends Event{constructor({newState:e,oldState:r,...s}){super("toggle",s),__publicField$8(this,"newState"),__publicField$8(this,"oldState"),this.newState=e,this.oldState=r}}var __defProp$7=Object.defineProperty,__defNormalProp$7=(t,e,r)=>e in t?__defProp$7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$7=(t,e,r)=>(__defNormalProp$7(t,e+"",r),r),__accessCheck$s=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$s=(t,e,r)=>(__accessCheck$s(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$s=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$o=(t,e,r,s)=>(__accessCheck$s(t,e,"write to private field"),e.set(t,r),r),__privateMethod$g=(t,e,r)=>(__accessCheck$s(t,e,"access private method"),r),_mediaController$7,_previouslyFocused$1,_invokerElement$1,_keysSoFar$1,_clearKeysTimeout$1,_previousItems,_mutationObserver,_isPopover,_handleSlotChange$1,handleSlotChange_fn$1,_handleMenuItems,_updateLayoutStyle$1,updateLayoutStyle_fn$1,_handleInvoke$1,handleInvoke_fn$1,_handleOpen$1,handleOpen_fn$1,_handleClosed$1,handleClosed_fn$1,_handleBoundsResize,_handleMenuResize,_positionMenu,positionMenu_fn,_resizeMenu,resizeMenu_fn,_handleClick,handleClick_fn,_backButtonElement,backButtonElement_get,_handleToggle,handleToggle_fn,_checkSubmenuHasExpanded,checkSubmenuHasExpanded_fn,_handleFocusOut$1,handleFocusOut_fn$1,_handleKeyDown$2,handleKeyDown_fn$2,_getItem,getItem_fn,_getTabItem,getTabItem_fn,_setTabItem,setTabItem_fn,_selectItem,selectItem_fn;function createMenuItem({type:t,text:e,value:r,checked:s}){const o=Document$1.createElement("media-chrome-menu-item");o.type=t??"",o.part.add("menu-item"),t&&o.part.add(t),o.value=r,o.checked=s;const d=Document$1.createElement("span");return d.textContent=e,o.append(d),o}function createIndicator$1(t,e){let r=t.querySelector(`:scope > [slot="${e}"]`);if((r==null?void 0:r.nodeName)=="SLOT"&&(r=r.assignedElements({flatten:!0})[0]),r)return r=r.cloneNode(!0),r;let s=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return s?s.cloneNode(!0):""}const template$f=Document$1.createElement("template");template$f.innerHTML=` 2383 <style> 2384 :host { 2385 font: var(--media-font, 2386 var(--media-font-weight, normal) 2387 var(--media-font-size, 14px) / 2388 var(--media-text-content-height, var(--media-control-height, 24px)) 2389 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 2390 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 2391 background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8)))); 2392 border-radius: var(--media-menu-border-radius); 2393 border: var(--media-menu-border, none); 2394 display: var(--media-menu-display, inline-flex); 2395 transition: var(--media-menu-transition-in, 2396 visibility 0s, 2397 opacity .2s ease-out, 2398 transform .15s ease-out, 2399 left .2s ease-in-out, 2400 min-width .2s ease-in-out, 2401 min-height .2s ease-in-out 2402 ) !important; 2403 2404 visibility: var(--media-menu-visibility, visible); 2405 opacity: var(--media-menu-opacity, 1); 2406 max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px)); 2407 transform: var(--media-menu-transform-in, translateY(0) scale(1)); 2408 flex-direction: column; 2409 2410 min-height: 0; 2411 position: relative; 2412 box-sizing: border-box; 2413 } 2414 2415 :host([hidden]) { 2416 transition: var(--media-menu-transition-out, 2417 visibility .15s ease-in, 2418 opacity .15s ease-in, 2419 transform .15s ease-in 2420 ) !important; 2421 visibility: var(--media-menu-hidden-visibility, hidden); 2422 opacity: var(--media-menu-hidden-opacity, 0); 2423 max-height: var(--media-menu-hidden-max-height, 2424 var(--media-menu-max-height, var(--_menu-max-height, 300px))); 2425 transform: var(--media-menu-transform-out, translateY(2px) scale(.99)); 2426 pointer-events: none; 2427 } 2428 2429 :host([slot="submenu"]) { 2430 background: none; 2431 width: 100%; 2432 min-height: 100%; 2433 position: absolute; 2434 bottom: 0; 2435 right: -100%; 2436 } 2437 2438 #container { 2439 display: flex; 2440 flex-direction: column; 2441 min-height: 0; 2442 transition: transform .2s ease-out; 2443 transform: translate(0, 0); 2444 } 2445 2446 #container.has-expanded { 2447 transition: transform .2s ease-in; 2448 transform: translate(-100%, 0); 2449 } 2450 2451 slot[name="header"] { 2452 display: flex; 2453 padding: .4em .7em; 2454 border-bottom: 1px solid rgb(255 255 255 / .25); 2455 cursor: default; 2456 } 2457 2458 slot[name="header"][hidden] { 2459 display: none; 2460 } 2461 2462 button[part~="back"] { 2463 background: none; 2464 color: inherit; 2465 border: none; 2466 padding: 0; 2467 font: inherit; 2468 cursor: pointer; 2469 outline: inherit; 2470 display: inline-flex; 2471 align-items: center; 2472 cursor: pointer; 2473 } 2474 2475 svg[part~="back"] { 2476 height: var(--media-menu-icon-height, var(--media-control-height, 24px)); 2477 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 2478 display: block; 2479 margin-right: .5ch; 2480 } 2481 2482 slot:not([name]) { 2483 gap: var(--media-menu-gap); 2484 flex-direction: var(--media-menu-flex-direction, column); 2485 overflow: var(--media-menu-overflow, hidden auto); 2486 display: flex; 2487 min-height: 0; 2488 } 2489 2490 :host([role="menu"]) slot:not([name]) { 2491 padding-block: .4em; 2492 } 2493 2494 slot:not([name])::slotted([role="menu"]) { 2495 background: none; 2496 } 2497 2498 media-chrome-menu-item > span { 2499 margin-right: .5ch; 2500 max-width: var(--media-menu-item-max-width); 2501 text-overflow: ellipsis; 2502 overflow: hidden; 2503 } 2504 </style> 2505 <style id="layout-row" media="width:0"> 2506 2507 slot[name="header"] { 2508 padding: .4em .5em; 2509 } 2510 2511 slot:not([name]) { 2512 gap: var(--media-menu-gap, .25em); 2513 flex-direction: var(--media-menu-flex-direction, row); 2514 padding-inline: .5em; 2515 } 2516 2517 media-chrome-menu-item { 2518 padding: .3em .5em; 2519 } 2520 2521 media-chrome-menu-item[aria-checked="true"] { 2522 background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2)); 2523 } 2524 2525 2526 media-chrome-menu-item::part(checked-indicator) { 2527 display: var(--media-menu-item-checked-indicator-display, none); 2528 } 2529 </style> 2530 <div id="container"> 2531 <slot name="header" hidden> 2532 <button part="back button" aria-label="Back to previous menu"> 2533 <slot name="back-icon"> 2534 <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator"> 2535 <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"/> 2536 </svg> 2537 </slot> 2538 <slot name="title"></slot> 2539 </button> 2540 </slot> 2541 <slot></slot> 2542 </div> 2543 <slot name="checked-indicator" hidden></slot> 2544`;const Attributes$c={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"};class MediaChromeMenu extends GlobalThis.HTMLElement{constructor(){super(),__privateAdd$s(this,_handleSlot
vendor: 5,237 bytes, line 2544
2544Change$1),__privateAdd$s(this,_updateLayoutStyle$1),__privateAdd$s(this,_handleInvoke$1),__privateAdd$s(this,_handleOpen$1),__privateAdd$s(this,_handleClosed$1),__privateAdd$s(this,_positionMenu),__privateAdd$s(this,_resizeMenu),__privateAdd$s(this,_handleClick),__privateAdd$s(this,_backButtonElement),__privateAdd$s(this,_handleToggle),__privateAdd$s(this,_checkSubmenuHasExpanded),__privateAdd$s(this,_handleFocusOut$1),__privateAdd$s(this,_handleKeyDown$2),__privateAdd$s(this,_getItem),__privateAdd$s(this,_getTabItem),__privateAdd$s(this,_setTabItem),__privateAdd$s(this,_selectItem),__privateAdd$s(this,_mediaController$7,void 0),__privateAdd$s(this,_previouslyFocused$1,void 0),__privateAdd$s(this,_invokerElement$1,void 0),__privateAdd$s(this,_keysSoFar$1,""),__privateAdd$s(this,_clearKeysTimeout$1,null),__privateAdd$s(this,_previousItems,new Set),__privateAdd$s(this,_mutationObserver,void 0),__privateAdd$s(this,_isPopover,!1),__privateAdd$s(this,_handleMenuItems,()=>{const e=__privateGet$s(this,_previousItems),r=new Set(this.items);for(const s of e)r.has(s)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:s}));for(const s of r)e.has(s)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:s}));__privateSet$o(this,_previousItems,r)}),__privateAdd$s(this,_handleBoundsResize,()=>{__privateMethod$g(this,_positionMenu,positionMenu_fn).call(this,!1),__privateMethod$g(this,_resizeMenu,resizeMenu_fn).call(this,!1)}),__privateAdd$s(this,_handleMenuResize,()=>{__privateMethod$g(this,_positionMenu,positionMenu_fn).call(this,!1)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=this.constructor.template.content.cloneNode(!0),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),__privateSet$o(this,_mutationObserver,new MutationObserver(__privateGet$s(this,_handleMenuItems))),__privateGet$s(this,_mutationObserver).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[Attributes$c.DISABLED,Attributes$c.HIDDEN,Attributes$c.STYLE,Attributes$c.ANCHOR,MediaStateReceiverAttributes.MEDIA_CONTROLLER]}static formatMenuItemText(e){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":__privateMethod$g(this,_handleSlotChange$1,handleSlotChange_fn$1).call(this,e);break;case"invoke":__privateMethod$g(this,_handleInvoke$1,handleInvoke_fn$1).call(this,e);break;case"click":__privateMethod$g(this,_handleClick,handleClick_fn).call(this,e);break;case"toggle":__privateMethod$g(this,_handleToggle,handleToggle_fn).call(this,e);break;case"focusout":__privateMethod$g(this,_handleFocusOut$1,handleFocusOut_fn$1).call(this,e);break;case"keydown":__privateMethod$g(this,_handleKeyDown$2,handleKeyDown_fn$2).call(this,e);break}}connectedCallback(){var e,r;__privateMethod$g(this,_updateLayoutStyle$1,updateLayoutStyle_fn$1).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),__privateSet$o(this,_mediaController$7,getAttributeMediaController(this)),(r=(e=__privateGet$s(this,_mediaController$7))==null?void 0:e.associateElement)==null||r.call(e,this),this.hidden||(observeResize(getBoundsElement$1(this),__privateGet$s(this,_handleBoundsResize)),observeResize(this,__privateGet$s(this,_handleMenuResize)))}disconnectedCallback(){var e,r;unobserveResize(getBoundsElement$1(this),__privateGet$s(this,_handleBoundsResize)),unobserveResize(this,__privateGet$s(this,_handleMenuResize)),this.disable(),(r=(e=__privateGet$s(this,_mediaController$7))==null?void 0:e.unassociateElement)==null||r.call(e,this),__privateSet$o(this,_mediaController$7,null)}attributeChangedCallback(e,r,s){var o,d,L,ge;e===Attributes$c.HIDDEN&&s!==r?(__privateGet$s(this,_isPopover)||__privateSet$o(this,_isPopover,!0),this.hidden?__privateMethod$g(this,_handleClosed$1,handleClosed_fn$1).call(this):__privateMethod$g(this,_handleOpen$1,handleOpen_fn$1).call(this),this.dispatchEvent(new ToggleEvent({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===MediaStateReceiverAttributes.MEDIA_CONTROLLER?(r&&((d=(o=__privateGet$s(this,_mediaController$7))==null?void 0:o.unassociateElement)==null||d.call(o,this),__privateSet$o(this,_mediaController$7,null)),s&&this.isConnected&&(__privateSet$o(this,_mediaController$7,getAttributeMediaController(this)),(ge=(L=__privateGet$s(this,_mediaController$7))==null?void 0:L.associateElement)==null||ge.call(L,this))):e===Attributes$c.DISABLED&&s!==r?s==null?this.enable():this.disable():e===Attributes$c.STYLE&&s!==r&&__privateMethod$g(this,_updateLayoutStyle$1,updateLayoutStyle_fn$1).call(this)}formatMenuItemText(e,r){return this.constructor.formatMenuItemText(e,r)}get anchor(){return this.getAttribute("anchor")}
2544set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=getDocumentOrShadowRoot(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(isMenuItem)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,r;return(r=(e=this.checkedItems[0])==null?void 0:e.value)!=null?r:""}set value(e){const r=this.items.find(s=>s.value===e);r&&__privateMethod$g(this,_selectItem,selectItem_fn).call(this,r)}focus(){if(__privateSet$o(this,_previouslyFocused$1,getActiveElement()),this.items.length){__privateMethod$g(this,_setTabItem,setTabItem_fn).call(this,this.items[0]),this.items[0].focus();return}const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e==null||e.focus()}handleSelect(e){var r;const s=__privateMethod$g(this,_getItem,getItem_fn).call(this,e);s&&(__privateMethod$g(this,_selectItem,selectItem_fn).call(this,s,s.type==="checkbox"),__privateGet$s(this,_invokerElement$1)&&!this.hidden&&((r=__privateGet$s(this,_previouslyFocused$1))==null||r.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var r,s;const{key:o}=e,d=this.items,L=(s=(r=__privateMethod$g(this,_getItem,getItem_fn).call(this,e))!=null?r:__privateMethod$g(this,_getTabItem,getTabItem_fn).call(this))!=null?s:d[0],ge=d.indexOf(L);let Mt=Math.max(0,ge);o==="ArrowDown"?Mt++:o==="ArrowUp"?Mt--:e.key==="Home"?Mt=0:e.key==="End"&&(Mt=d.length-1),Mt<0&&(Mt=d.length-1),Mt>d.length-1&&(Mt=0),__privateMethod$g(this,_setTabItem,setTabItem_fn).call(this,d[Mt]),d[Mt].focus()}}_mediaController$7=new WeakMap;_previouslyFocused$1=new WeakMap;_invokerElement$1=new WeakMap;_keysSoFar$1=new WeakMap;_clearKeysTimeout$1=new WeakMap;_previousItems=new WeakMap;_mutationObserver=new WeakMap;_isPopover=new WeakMap;_handleSlotChange$1=new WeakSet;handleSlotChange_fn$1=function(t){const e=t.target;for(let r of e.assignedNodes({flatten:!0}))r.nodeType===3&&r.textContent.trim()===""&&r.remove();if(["header","title"].includes(e.name)){const r=this.shadowRoot.querySelector('slot[name="header"]');r.hidden=e.assignedNodes().length===0}e.name||__privateGet$s(this,_handleMenuItems).call(this)};_handleMenuItems=new WeakMap;_updateLayoutStyle$1=new WeakSet;updateLayoutStyle_fn$1=function(){var t;const e=this.shadowRoot.querySelector("#layout-row"),r=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",r==="row"?"":"width:0")};_handleInvoke$1=new WeakSet;handleInvoke_fn$1=function(t){__privateSet$o(this,_invokerElement$1,t.relatedTarget),containsComposedNode(this,t.relatedTarget)||(this.hidden=!this.hidden)};_handleOpen$1=new WeakSet;handleOpen_fn$1=function(){var t;(t=__privateGet$s(this,_invokerElement$1))==null||t.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>__privateMethod$g(this,_positionMenu,positionMenu_fn).call(this,!1)),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),observeResize(getBoundsElement$1(this),__privateGet$s(this,_handleBoundsResize)),observeResize(this,__privateGet$s(this,_handleMenuResize))};_handleClosed$1=new WeakSet;handleClosed_fn$1=function(){var t;(t=__privateGet$s(this,_invokerElement$1))==null||t.setAttribute("aria-expanded","false"),unobserveResize(getBoundsElement$1(this),__privateGet$s(this,_handleBoundsResize)),unobserveResize(this,__privateGet$s(this,_handleMenuResize))};_handleBoundsResize=new WeakMap;_handleMenuResize=new WeakMap;_positionMenu=new WeakSet;positionMenu_fn=function(t,e){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;const{x:r,y:s}=computePosition({anchor:this.anchorElement,floating:this,placement:"top-start"});e??(e=this.offsetWidth);const d=getBoundsElement$1(this).getBoundingClientRect(),L=this.anchorElement.getBoundingClientRect(),ge=d.width-r-e,Mt=d.height-s-this.offsetHeight,er=d.height-L.height,{style:tr}=getOrInsertCSSRule(this.shadowRoot,":host");t||tr.setProperty("--media-menu-transition-in","none"),tr.setProperty("position","absolute"),tr.setProperty("right",`${Math.max(0,ge)}px`),tr.setProperty("bottom",`${Mt}px`),tr.setProperty("--_menu-max-height",`${er}px`),tr.removeProperty("--media-menu-transition-in")};_resizeMenu=new WeakSet;resizeMenu_fn=function(t){const e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),r=e==null?void 0:e.querySelector('[role="menu"]'),{style:s}=getOrInsertCSSRule(this.shadowRoot,":host");if(t||s.setProperty("--media-menu-transition-in","none"),r){const o=r.offsetHeight,d=Math.max(r.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${d}px`),this.style.setProperty("min-height",`${o}
2544px`),__privateMethod$g(this,_positionMenu,positionMenu_fn).call(this,t,d)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),__privateMethod$g(this,_positionMenu,positionMenu_fn).call(this,t);s.removeProperty("--media-menu-transition-in")};_handleClick=new WeakSet;handleClick_fn=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(__privateGet$s(this,_backButtonElement,backButtonElement_get))){(e=__privateGet$s(this,_previouslyFocused$1))==null||e.focus(),this.hidden=!0;return}const r=__privateMethod$g(this,_getItem,getItem_fn).call(this,t);!r||r.hasAttribute("disabled")||(__privateMethod$g(this,_setTabItem,setTabItem_fn).call(this,r),this.handleSelect(t))};_backButtonElement=new WeakSet;backButtonElement_get=function(){var t;return(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:t.find(r=>r.part.contains("back")&&r.part.contains("button"))};_handleToggle=new WeakSet;handleToggle_fn=function(t){if(t.target===this)return;__privateMethod$g(this,_checkSubmenuHasExpanded,checkSubmenuHasExpanded_fn).call(this);const e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(const r of e)r.invokeTargetElement!=t.target&&t.newState=="open"&&r.getAttribute("aria-expanded")=="true"&&!r.invokeTargetElement.hidden&&r.invokeTargetElement.dispatchEvent(new InvokeEvent({relatedTarget:r}));for(const r of e)r.setAttribute("aria-expanded",`${!r.submenuElement.hidden}`);__privateMethod$g(this,_resizeMenu,resizeMenu_fn).call(this,!0)};_checkSubmenuHasExpanded=new WeakSet;checkSubmenuHasExpanded_fn=function(){const e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)};_handleFocusOut$1=new WeakSet;handleFocusOut_fn$1=function(t){var e;containsComposedNode(this,t.relatedTarget)||(__privateGet$s(this,_isPopover)&&((e=__privateGet$s(this,_previouslyFocused$1))==null||e.focus()),__privateGet$s(this,_invokerElement$1)&&__privateGet$s(this,_invokerElement$1)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))};_handleKeyDown$2=new WeakSet;handleKeyDown_fn$2=function(t){var e,r,s,o,d;const{key:L,ctrlKey:ge,altKey:Mt,metaKey:er}=t;if(!(ge||Mt||er)&&this.keysUsed.includes(L))if(t.preventDefault(),t.stopPropagation(),L==="Tab"){if(__privateGet$s(this,_isPopover)){this.hidden=!0;return}t.shiftKey?(r=(e=this.previousElementSibling)==null?void 0:e.focus)==null||r.call(e):(o=(s=this.nextElementSibling)==null?void 0:s.focus)==null||o.call(s),this.blur()}else L==="Escape"?((d=__privateGet$s(this,_previouslyFocused$1))==null||d.focus(),__privateGet$s(this,_isPopover)&&(this.hidden=!0)):L==="Enter"||L===" "?this.handleSelect(t):this.handleMove(t)};_getItem=new WeakSet;getItem_fn=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};_getTabItem=new WeakSet;getTabItem_fn=function(){return this.items.find(t=>t.tabIndex===0)};_setTabItem=new WeakSet;setTabItem_fn=function(t){for(const e of this.items)e.tabIndex=e===t?0:-1};_selectItem=new WeakSet;selectItem_fn=function(t,e){const r=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(s=>s.checked=!1),e?t.checked=!t.checked:t.checked=!0,this.checkedItems.some((s,o)=>s!=r[o])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};__publicField$7(MediaChromeMenu,"template",template$f);function isMenuItem(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(t==null?void 0:t.role)}function getBoundsElement$1(t){var e;return(e=t.getAttribute("bounds")?closestComposedNode(t,`#${t.getAttribute("bounds")}`):getMediaController(t)||t.parentElement)!=null?e:t}GlobalThis.customElements.get("media-chrome-menu")||GlobalThis.customElements.define("media-chrome-menu",MediaChromeMenu);var __accessCheck$r=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$r=(t,e,r)=>(__accessCheck$r(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$r=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$n=(t,e,r,s)=>(__accessCheck$r(t,e,"write to private field"),e.set(t,r),r),__privateMethod$f=(t,e,r)=>(__accessCheck$r(t,e,"access private method"),r),_audioTrackList$1,_prevState$5,_render$7,render_fn$7,_onChange$7,onChange_fn$7;class MediaAudioTrackMenu extends MediaChromeMenu{constructor(){super(...arguments),__privateAdd$r(this,_render$7),__privateAdd$r(this,_onChange$7),__privateAdd$r(this,_audioTrackList$1,[]),__privateAdd$r(this,_prevState$5,void 0)}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_AUDIO_TRACK_LIST,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED,MediaUIAttributes.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED&&r!==s?this.value=s:e===MediaUIAttributes.MEDIA_AUDIO_TRACK_LIST&&r!==s&&(__privateSet$n(this,_audioTrackList$1,parseAudioTrackList(s)),__privateMethod$f(this,_render$7,render_fn$7).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",__privateMethod$f(this,_onChange$7,onChange_fn$7))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",__privateMethod$f(this,_onChange$7,onChange_fn$7))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:getMediaController(this).querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return __privateGet$r(this,_audioTrackList$1)}set mediaAudioTrackList(e){__privateSet$n(this,_audioTrackList$1,e),__privateMethod$f(this,_render$7,render_fn$7).call(this)}get mediaAudioTrackEnabled(){return getStringAttr(this,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){setStringAttr(this,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED,e)}}_audioTrackList$1=new WeakMap;_prevState$5=new WeakMap;_render$7=new WeakSet;render_fn$7=function(){if(__privateGet$r(this,_prevState$5)===JSON.stringify(this.mediaAudioTrackList))return;__privateSet$n(this,_prevState$5,JSON.stringify(this.mediaAudioTrackList));const t=this.mediaAudioTrackList;this.defaultSlot.textContent="";for(const e of t){const r=this.formatMenuItemText(e.label,e),s=createMenuItem({type:"radio",text:r,value:`${e.id}`,checked:e.enabled});s.prepend(createIndicator$1(this,"checked-indicator")),this.defaultSlot.append(s)}};_onChange$7=new WeakSet;onChange_fn$7=function(){if(this.value==null)return;const t=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};GlobalThis.customElements.get("media-audio-track-menu")||GlobalThis.customElements.define("media-audio-track-menu",MediaAudioTrackMenu);class MediaChromeMenuButton extends MediaChromeButton{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=getDocumentOrShadowRoot(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}
2544handleClick(){this.invokeTargetElement.dispatchEvent(new InvokeEvent({relatedTarget:this}))}}GlobalThis.customElements.get("media-chrome-menu-button")||GlobalThis.customElements.define("media-chrome-menu-button",MediaChromeMenuButton);const audioTrackIcon$1=`<svg aria-hidden="true" viewBox="0 0 24 24"> 2545 <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/> 2546 <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"/> 2547</svg>`,slotTemplate$h=Document$1.createElement("template");slotTemplate$h.innerHTML=` 2548 <slot name="icon">${audioTrackIcon$1}</slot> 2549`;class MediaAudioTrackMenuButton extends MediaChromeMenuButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED,MediaUIAttributes.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:slotTemplate$h})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",nouns.AUDIO_TRACKS())}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:getMediaController(this).querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){return getStringAttr(this,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){setStringAttr(this,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED,e)}}GlobalThis.customElements.get("media-audio-track-menu-button")||GlobalThis.customElements.define("media-audio-track-menu-button",MediaAudioTrackMenuButton);const ccIconOn$1=`<svg aria-hidden="true" viewBox="0 0 26 24"> 2550 <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"/> 2551</svg>`,ccIconOff$1=`<svg aria-hidden="true" viewBox="0 0 26 24"> 2552 <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"/> 2553</svg>`,slotTemplate$g=Document$1.createElement("template");slotTemplate$g.innerHTML=` 2554 <style> 2555 :host([aria-checked="true"]) slot[name=off] { 2556 display: none !important; 2557 } 2558 2559 2560 :host(:not([aria-checked="true"])) slot[name=on] { 2561 display: none !important; 2562 } 2563 </style> 2564 2565 <slot name="icon"> 2566 <slot name="on">${ccIconOn$1}</slot> 2567 <slot name="off">${ccIconOff$1}</slot> 2568 </slot> 2569`;const updateAriaChecked$1=t=>{t.setAttribute("aria-checked",areSubsOn(t))};class MediaCaptionsButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_SUBTITLES_LIST,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:slotTemplate$g,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",nouns.CLOSED_CAPTIONS()),updateAriaChecked$1(this)}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_SUBTITLES_SHOWING&&updateAriaChecked$1(this)}get mediaSubtitlesList(){return getSubtitlesListAttr$3(this,MediaUIAttributes.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){setSubtitlesListAttr$3(this,MediaUIAttributes.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return getSubtitlesListAttr$3(this,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){setSubtitlesListAttr$3(this,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}const getSubtitlesListAttr$3=(t,e)=>{const r=t.getAttribute(e);return r?parseTextTracksStr(r):[]},setSubtitlesListAttr$3=(t,e,r)=>{if(!(r!=null&&r.length)){t.removeAttribute(e);return}const s=stringifyTextTrackList(r);t.getAttribute(e)!==s&&t.setAttribute(e,s)};GlobalThis.customElements.get("media-captions-button")||GlobalThis.customElements.define("media-captions-button",MediaCaptionsButton);var __defProp$6=Object.defineProperty,__defNormalProp$6=(t,e,r)=>e in t?__defProp$6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$6=(t,e,r)=>(__defNormalProp$6(t,e+"",r),r),__accessCheck$q=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$q=(t,e,r)=>(__accessCheck$q(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$q=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$m=(t,e,r,s)=>(__accessCheck$q(t,e,"write to private field"),e.set(t,r),r),__privateMethod$e=(t,e,r)=>(__accessCheck$q(t,e,"access private method"),r),_prevState$4,_render$6,render_fn$6,_onChange$6,onChange_fn$6;const ccIcon$1=` 2570 <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator"> 2571 <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
25710 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"/> 2572 </svg>`,template$e=Document$1.createElement("template");template$e.innerHTML=MediaChromeMenu.template.innerHTML+` 2573 <slot name="captions-indicator" hidden>${ccIcon$1}</slot>`;class MediaCaptionsMenu extends MediaChromeMenu{constructor(){super(...arguments),__privateAdd$q(this,_render$6),__privateAdd$q(this,_onChange$6),__privateAdd$q(this,_prevState$4,void 0)}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_SUBTITLES_LIST,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_SUBTITLES_LIST&&r!==s?__privateMethod$e(this,_render$6,render_fn$6).call(this):e===MediaUIAttributes.MEDIA_SUBTITLES_SHOWING&&r!==s&&(this.value=s)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",__privateMethod$e(this,_onChange$6,onChange_fn$6))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",__privateMethod$e(this,_onChange$6,onChange_fn$6))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:getMediaController(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return getSubtitlesListAttr$2(this,MediaUIAttributes.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){setSubtitlesListAttr$2(this,MediaUIAttributes.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return getSubtitlesListAttr$2(this,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){setSubtitlesListAttr$2(this,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING,e)}}_prevState$4=new WeakMap;_render$6=new WeakSet;render_fn$6=function(){var t;if(__privateGet$q(this,_prevState$4)===JSON.stringify(this.mediaSubtitlesList))return;__privateSet$m(this,_prevState$4,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";const e=!this.value,r=createMenuItem({type:"radio",text:this.formatMenuItemText("Off"),value:"off",checked:e});r.prepend(createIndicator$1(this,"checked-indicator")),this.defaultSlot.append(r);const s=this.mediaSubtitlesList;for(const o of s){const d=createMenuItem({type:"radio",text:this.formatMenuItemText(o.label,o),value:formatTextTrackObj(o),checked:this.value==formatTextTrackObj(o)});d.prepend(createIndicator$1(this,"checked-indicator")),((t=o.kind)!=null?t:"subs")==="captions"&&d.append(createIndicator$1(this,"captions-indicator")),this.defaultSlot.append(d)}};_onChange$6=new WeakSet;onChange_fn$6=function(){const t=this.mediaSubtitlesShowing,e=this.getAttribute(MediaUIAttributes.MEDIA_SUBTITLES_SHOWING),r=this.value!==e;if(t!=null&&t.length&&r&&this.dispatchEvent(new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!r)return;const s=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(s)};__publicField$6(MediaCaptionsMenu,"template",template$e);const getSubtitlesListAttr$2=(t,e)=>{const r=t.getAttribute(e);return r?parseTextTracksStr(r):[]},setSubtitlesListAttr$2=(t,e,r)=>{if(!(r!=null&&r.length)){t.removeAttribute(e);return}const s=stringifyTextTrackList(r);t.getAttribute(e)!==s&&t.setAttribute(e,s)};GlobalThis.customElements.get("media-captions-menu")||GlobalThis.customElements.define("media-captions-menu",MediaCaptionsMenu);const ccIconOn=`<svg aria-hidden="true" viewBox="0 0 26 24"> 2574 <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
25740 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"/> 2575</svg>`,ccIconOff=`<svg aria-hidden="true" viewBox="0 0 26 24"> 2576 <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"/> 2577</svg>`,slotTemplate$f=Document$1.createElement("template");slotTemplate$f.innerHTML=` 2578 <style> 2579 :host([aria-checked="true"]) slot[name=off] { 2580 display: none !important; 2581 } 2582 2583 2584 :host(:not([aria-checked="true"])) slot[name=on] { 2585 display: none !important; 2586 } 2587 </style> 2588 2589 <slot name="icon"> 2590 <slot name="on">${ccIconOn}</slot> 2591 <slot name="off">${ccIconOff}</slot> 2592 </slot> 2593`;const updateAriaChecked=t=>{t.setAttribute("aria-checked",areSubsOn(t))};class MediaCaptionsMenuButton extends MediaChromeMenuButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_SUBTITLES_LIST,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:slotTemplate$f,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",nouns.CLOSED_CAPTIONS()),updateAriaChecked(this)}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_SUBTITLES_SHOWING&&updateAriaChecked(this)}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:getMediaController(this).querySelector("media-captions-menu")}get mediaSubtitlesList(){return getSubtitlesListAttr$1(this,MediaUIAttributes.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){setSubtitlesListAttr$1(this,MediaUIAttributes.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return getSubtitlesListAttr$1(this,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){setSubtitlesListAttr$1(this,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING,e)}}const getSubtitlesListAttr$1=(t,e)=>{const r=t.getAttribute(e);return r?parseTextTracksStr(r):[]},setSubtitlesListAttr$1=(t,e,r)=>{if(!(r!=null&&r.length)){t.removeAttribute(e);return}const s=stringifyTextTrackList(r);t.getAttribute(e)!==s&&t.setAttribute(e,s)};GlobalThis.customElements.get("media-captions-menu-button")||GlobalThis.customElements.define("media-captions-menu-button",MediaCaptionsMenuButton);const enterIcon='<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>',exitIcon='<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>',slotTemplate$e=Document$1.createElement("template");slotTemplate$e.innerHTML=` 2594 <style> 2595 :host([${MediaUIAttributes.MEDIA_IS_CASTING}]) slot:not([name=exit]):not([name=icon]) { 2596 display: none !important; 2597 } 2598 2599 2600 :host(:not([${MediaUIAttributes.MEDIA_IS_CASTING}])) slot:not([name=enter]):not([name=icon]) { 2601 display: none !important; 2602 } 2603 </style> 2604 2605 <slot name="icon"> 2606 <slot name="enter">${enterIcon}</slot> 2607 <slot name="exit">${exitIcon}</slot> 2608 </slot> 2609`;const updateAriaLabel$4=t=>{const e=t.mediaIsCasting?verbs.EXIT_CAST():verbs.ENTER_CAST();t.setAttribute("aria-label",e)};class MediaCastButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_IS_CASTING,MediaUIAttributes.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:slotTemplate$e,...e})}connectedCallback(){super.connectedCallback(),updateAriaLabel$4(this)}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_IS_CASTING&&updateAriaLabel$4(this)}get mediaIsCasting(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_IS_CASTING)}set mediaIsCasting(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return getStringAttr(this,MediaUIAttributes.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){setStringAttr(this,MediaUIAttributes.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){const e=this.mediaIsCasting?MediaUIEvents.MEDIA_EXIT_CAST_REQUEST:MediaUIEvents.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new GlobalThis.CustomEvent(e,{composed:!0,bubbles:!0}))}}GlobalThis.customElements.get("media-cast-button")||GlobalThis.customElements.define("media-cast-button",MediaCastButton);var __defProp$5=Object.defineProperty,__defNormalProp$5=(t,e,r)=>e in t?__defProp$5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$5=(t,e,r)=>(__defNormalProp$5(t,e+"",r),r),__accessCheck$p=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$p=(t,e,r)=>(__accessCheck$p(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$p=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$l=(t,e,r,s)=>(__accessCheck$p(t,e,"write to private field"),e.set(t,r),r),__privateMethod$d=(t,e,r)=>(__accessCheck$p(t,e,"access private method"),r),_previouslyFocused,_invokerElement,_handleOpen,handleOpen_fn,_handleClosed,handleClosed_fn,_handleInvoke,handleInvoke_fn,_handleFocusOut,handleFocusOut_fn,_handleKeyDown$1,handleKeyDown_fn$1;const template$d=Document$1.createElement("template");template$d.innerHTML=` 2610 <style> 2611 :host { 2612 font: var(--media-font, 2613 var(--media-font-weight, normal) 2614 var(--media-font-size, 14px) / 2615 var(--media-text-content-height, var(--media-control-height, 24px)) 2616 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 2617 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 2618 background: var(--media-dialog-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8)))); 2619 border-radius: var(--media-dialog-border-radius); 2620 border: var(--media-dialog-border, none); 2621 display: var(--media-dialog-display, inline-flex); 2622 transition: var(--media-dialog-transition-in, 2623 visibility 0s, 2624 opacity .2s ease-out, 2625 transform .15s ease-out 2626 ) !important; 2627 2628 visibility: var(--media-dialog-visibility, visible); 2629 opacity: var(--media-dialog-opacity, 1); 2630 transform: var(--media-dialog-transform-in, translateY(0) scale(1)); 2631 } 2632 2633 :host([hidden]) { 2634 transition: var(--media-dialog-transition-out, 2635 visibility .15s ease-in, 2636 opacity .15s ease-in, 2637 transform .15s ease-in 2638 ) !important; 2639 visibility: var(--media-dialog-hidden-visibility, hidden); 2640 opacity: var(--media-dialog-hidden-opacity, 0); 2641 transform: var(--media-dialog-transform-out, translateY(2px) scale(.99)); 2642 pointer-events: none; 2643 } 2644 </style> 2645 <slot></slot> 2646`;const Attributes$b={HIDDEN:"hidden",ANCHOR:"anchor"};class MediaChromeDialog extends GlobalThis.HTMLElement{constructor(){super(),__privateAdd$p(this,_handleOpen),__privateAdd$p(this,_handleClosed),__privateAdd$p(this,_handleInvoke),__privateAdd$p(this,_handleFocusOut),__privateAdd$p(this,_handleKeyDown$1),__privateAdd$p(this,_previouslyFocused,void 0),__privateAdd$p(this,_invokerElement,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=this.constructor.template.content.cloneNode(!0),this.shadowRoot.append(this.nativeEl)),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[Attributes$b.HIDDEN,Attributes$b.ANCHOR]}handleEvent(e){switch(e.type){case"invoke":__privateMethod$d(this,_handleInvoke,handleInvoke_fn).call(this,e);break;case"focusout":__privateMethod$d(this,_handleFocusOut,handleFocusOut_fn).call(this,e);break;case"keydown":__privateMethod$d(this,_handleKeyDown$1,handleKeyDown_fn$1).call(this,e);break}}connectedCallback(){this.role||(this.role="dialog")}attributeChangedCallback(e,r,s){e===Attributes$b.HIDDEN&&s!==r&&(this.hidden?__privateMethod$d(this,_handleClosed,handleClosed_fn).call(this):__privateMethod$d(this,_handleOpen,handleOpen_fn).call(this))}focus(){__privateSet$l(this,_previouslyFocused,getActiveElement());
vendor: 2,418 bytes, line 2646
2646const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e==null||e.focus()}get keysUsed(){return["Escape","Tab"]}}_previouslyFocused=new WeakMap;_invokerElement=new WeakMap;_handleOpen=new WeakSet;handleOpen_fn=function(){var t;(t=__privateGet$p(this,_invokerElement))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0})};_handleClosed=new WeakSet;handleClosed_fn=function(){var t;(t=__privateGet$p(this,_invokerElement))==null||t.setAttribute("aria-expanded","false")};_handleInvoke=new WeakSet;handleInvoke_fn=function(t){__privateSet$l(this,_invokerElement,t.relatedTarget),containsComposedNode(this,t.relatedTarget)||(this.hidden=!this.hidden)};_handleFocusOut=new WeakSet;handleFocusOut_fn=function(t){var e;containsComposedNode(this,t.relatedTarget)||((e=__privateGet$p(this,_previouslyFocused))==null||e.focus(),__privateGet$p(this,_invokerElement)&&__privateGet$p(this,_invokerElement)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))};_handleKeyDown$1=new WeakSet;handleKeyDown_fn$1=function(t){var e,r,s,o,d;const{key:L,ctrlKey:ge,altKey:Mt,metaKey:er}=t;ge||Mt||er||this.keysUsed.includes(L)&&(t.preventDefault(),t.stopPropagation(),L==="Tab"?(t.shiftKey?(r=(e=this.previousElementSibling)==null?void 0:e.focus)==null||r.call(e):(o=(s=this.nextElementSibling)==null?void 0:s.focus)==null||o.call(s),this.blur()):L==="Escape"&&((d=__privateGet$p(this,_previouslyFocused))==null||d.focus(),this.hidden=!0))};__publicField$5(MediaChromeDialog,"template",template$d);GlobalThis.customElements.get("media-chrome-dialog")||GlobalThis.customElements.define("media-chrome-dialog",MediaChromeDialog);var __defProp$4=Object.defineProperty,__defNormalProp$4=(t,e,r)=>e in t?__defProp$4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$4=(t,e,r)=>(__defNormalProp$4(t,e+"",r),r),__accessCheck$o=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$o=(t,e,r)=>(__accessCheck$o(t,e,"read from private field"),e.get(t)),__privateAdd$o=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$k=(t,e,r,s)=>(__accessCheck$o(t,e,"write to private field"),e.set(t,r),r),__privateMethod$c=(t,e,r)=>(__accessCheck$o(t,e,"access private method"),r),_dirty$1,_ownerElement$1,_handleSlotChange,handleSlot
2646Change_fn,_submenuConnected,submenuConnected_fn,_submenuDisconnected,submenuDisconnected_fn,_handleMenuItem,_handleKeyUp,handleKeyUp_fn,_handleKeyDown,handleKeyDown_fn,_reset$1,reset_fn$1;const template$c=Document$1.createElement("template");template$c.innerHTML=` 2647 <style> 2648 :host { 2649 transition: var(--media-menu-item-transition, 2650 background .15s linear, 2651 opacity .2s ease-in-out 2652 ); 2653 outline: var(--media-menu-item-outline, 0); 2654 outline-offset: var(--media-menu-item-outline-offset, -1px); 2655 cursor: pointer; 2656 display: flex; 2657 align-items: center; 2658 align-self: stretch; 2659 justify-self: stretch; 2660 white-space: nowrap; 2661 white-space-collapse: collapse; 2662 text-wrap: nowrap; 2663 padding: .4em .8em .4em 1em; 2664 } 2665 2666 :host(:focus-visible) { 2667 box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 2668 outline: var(--media-menu-item-hover-outline, 0); 2669 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 2670 } 2671 2672 :host(:hover) { 2673 cursor: pointer; 2674 background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5)); 2675 outline: var(--media-menu-item-hover-outline); 2676 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 2677 } 2678 2679 :host([aria-checked="true"]) { 2680 background: var(--media-menu-item-checked-background); 2681 } 2682 2683 :host([hidden]) { 2684 display: none; 2685 } 2686 2687 :host([disabled]) { 2688 pointer-events: none; 2689 color: rgba(255, 255, 255, .3); 2690 } 2691 2692 slot:not([name]) { 2693 width: 100%; 2694 } 2695 2696 slot:not([name="submenu"]) { 2697 display: inline-flex; 2698 align-items: center; 2699 transition: inherit; 2700 opacity: var(--media-menu-item-opacity, 1); 2701 } 2702 2703 slot[name="description"] { 2704 justify-content: end; 2705 } 2706 2707 slot[name="description"] > span { 2708 display: inline-block; 2709 margin-inline: 1em .2em; 2710 max-width: var(--media-menu-item-description-max-width, 100px); 2711 text-overflow: ellipsis; 2712 overflow: hidden; 2713 font-size: .8em; 2714 font-weight: 400; 2715 text-align: right; 2716 position: relative; 2717 top: .04em; 2718 } 2719 2720 slot[name="checked-indicator"] { 2721 display: none; 2722 } 2723 2724 :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] { 2725 display: var(--media-menu-item-checked-indicator-display, inline-block); 2726 } 2727 2728 2729 svg, img, ::slotted(svg), ::slotted(img) { 2730 height: var(--media-menu-item-icon-height, var(--media-control-height, 24px)); 2731 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 2732 display: block; 2733 } 2734 2735 2736 [part~="indicator"], 2737 ::slotted([part~="indicator"]) { 2738 fill: var(--media-menu-item-indicator-fill, 2739 var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)))); 2740 height: var(--media-menu-item-indicator-height, 1.25em); 2741 margin-right: .5ch; 2742 } 2743 2744 [part~="checked-indicator"] { 2745 visibility: hidden; 2746 } 2747 2748 :host([aria-checked="true"]) [part~="checked-indicator"] { 2749 visibility: visible; 2750 } 2751 </style> 2752 <slot name="checked-indicator"> 2753 <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator"> 2754 <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"/> 2755 </svg> 2756 </slot> 2757 <slot name="prefix"></slot> 2758 <slot></slot> 2759 <slot name="description"></slot> 2760 <slot name="suffix"></slot> 2761 <slot name="submenu"></slot> 2762`;const Attributes$a={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"};class MediaChromeMenuItem extends GlobalThis.HTMLElement{constructor(){super(),__privateAdd$o(this,_handleSlotChange),__privateAdd$o(this,_submenuConnected),__privateAdd$o(this,_submenuDisconnected),__privateAdd$o(this,_handleKeyUp),__privateAdd$o(this,_handleKeyDown),__privateAdd$o(this,_reset$1),__privateAdd$o(this,_dirty$1,!1),__privateAdd$o(this,_ownerElement$1,void 0),__privateAdd$o(this,_handleMenuItem,()=>{var e,r;this.setAttribute("submenusize",`${this.submenuElement.items.length}`);const s=this.shadowRoot.querySelector('slot[name="description"]'),o=(r=(e=this.submenuElement.checkedItems)==null?void 0:e[0])==null?void 0:r.text,d=Document$1.createElement("span");d.textContent=o??"",s.replaceChildren(d)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.append(this.constructor.template.content.cloneNode(!0))),this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[Attributes$a.TYPE,Attributes$a.DISABLED,Attributes$a.CHECKED,Attributes$a.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),isCheckable(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","fal
2762se"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":__privateMethod$c(this,_handleSlotChange,handleSlotChange_fn).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":__privateMethod$c(this,_handleKeyDown,handleKeyDown_fn).call(this,e);break;case"keyup":__privateMethod$c(this,_handleKeyUp,handleKeyUp_fn).call(this,e);break}}attributeChangedCallback(e,r,s){e===Attributes$a.CHECKED&&isCheckable(this)&&!__privateGet$o(this,_dirty$1)?this.setAttribute("aria-checked",s!=null?"true":"false"):e===Attributes$a.TYPE&&s!==r?this.role="menuitem"+s:e===Attributes$a.DISABLED&&s!==r&&(s==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Attributes$a.DISABLED)||this.enable(),this.role="menuitem"+this.type,__privateSet$k(this,_ownerElement$1,closestMenuItemsContainer(this,this.parentNode)),__privateMethod$c(this,_reset$1,reset_fn$1).call(this)}disconnectedCallback(){this.disable(),__privateMethod$c(this,_reset$1,reset_fn$1).call(this),__privateSet$k(this,_ownerElement$1,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=getDocumentOrShadowRoot(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return(e=this.getAttribute(Attributes$a.TYPE))!=null?e:""}set type(e){this.setAttribute(Attributes$a.TYPE,`${e}`)}get value(){var e;return(e=this.getAttribute(Attributes$a.VALUE))!=null?e:this.text}set value(e){this.setAttribute(Attributes$a.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(isCheckable(this))return this.getAttribute("aria-checked")==="true"}set checked(e){isCheckable(this)&&(__privateSet$k(this,_dirty$1,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){isCheckable(this)||this.invokeTargetElement&&containsComposedNode(this,e.target)&&this.invokeTargetElement.dispatchEvent(new InvokeEvent({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}_dirty$1=new WeakMap;_ownerElement$1=new WeakMap;_handleSlotChange=new WeakSet;handleSlotChange_fn=function(t){const e=t.target;if(!(e!=null&&e.name))for(let s of e.assignedNodes({flatten:!0}))s instanceof Text&&s.textContent.trim()===""&&s.remove();e.name==="submenu"&&(this.submenuElement?__privateMethod$c(this,_submenuConnected,submenuConnected_fn).call(this):__privateMethod$c(this,_submenuDisconnected,submenuDisconnected_fn).call(this))};_submenuConnected=new WeakSet;submenuConnected_fn=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",__privateGet$o(this,_handleMenuItem)),this.submenuElement.addEventListener("addmenuitem",__privateGet$o(this,_handleMenuItem)),this.submenuElement.addEventListener("removemenuitem",__privateGet$o(this,_handleMenuItem)),__privateGet$o(this,_handleMenuItem).call(this)};_submenuDisconnected=new WeakSet;submenuDisconnected_fn=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",__privateGet$o(this,_handleMenuItem)),this.submenuElement.removeEventListener("addmenuitem",__privateGet$o(this,_handleMenuItem)),this.submenuElement.removeEventListener("removemenuitem",__privateGet$o(this,_handleMenuItem)),__privateGet$o(this,_handleMenuItem).call(this)};_handleMenuItem=new WeakMap;_handleKeyUp=new WeakSet;handleKeyUp_fn=function(t){const{key:e}=t;if(!this.keysUsed.includes(e)){this.removeEventListener("keyup",__privateMethod$c(this,_handleKeyUp,handleKeyUp_fn));return}this.handleClick(t)};_handleKeyDown=new WeakSet;handleKeyDown_fn=function(t){const{metaKey:e,altKey:r,key:s}=t;if(e||r||!this.keysUsed.includes(s)){this.removeEventListener("keyup",__privateMethod$c(this,_handleKeyUp,handleKeyUp_fn));return}this.addEventListener("keyup",__privateMethod$c(this,_handleKeyUp,handleKeyUp_fn),{once:!0})};_reset$1=new WeakSet;reset_fn$1=function(){var t;const e=(t=__privateGet$o(this,_ownerElement$1))==null?void 0:t.radioGroupItems;if(!e)return;let r=e.filter(s=>s.getAttribute("aria-checked")==="true").pop();r||(r=e[0]);
vendor: 5,145 bytes, lines 2762-2895
2762for(const s of e)s.setAttribute("aria-checked","false");r==null||r.setAttribute("aria-checked","true")};__publicField$4(MediaChromeMenuItem,"template",template$c);function isCheckable(t){return t.type==="radio"||t.type==="checkbox"}function closestMenuItemsContainer(t,e){if(!t)return null;const{host:r}=t.getRootNode();return!e&&r?closestMenuItemsContainer(t,r):e!=null&&e.items?e:closestMenuItemsContainer(e,e==null?void 0:e.parentNode)}GlobalThis.customElements.get("media-chrome-menu-item")||GlobalThis.customElements.define("media-chrome-menu-item",MediaChromeMenuItem);var __accessCheck$n=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$n=(t,e,r)=>(__accessCheck$n(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$n=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$j=(t,e,r,s)=>(__accessCheck$n(t,e,"write to private field"),e.set(t,r),r),__privateMethod$b=(t,e,r)=>(__accessCheck$n(t,e,"access private method"),r),_mediaController$6,_isInputTarget,_startpoint,_endpoint,_cssRules,_segments,_onFocusIn,_onFocusOut,_updateComputedStyles,_updateActiveSegment,updateActiveSegment_fn,_enableUserEvents,enableUserEvents_fn,_disableUserEvents,disableUserEvents_fn,_handlePointerDown,handlePointerDown_fn,_handlePointerEnter,handlePointerEnter_fn,_handlePointerUp,handlePointerUp_fn,_handlePointerLeave,handlePointerLeave_fn,_handlePointerMove$1,handlePointerMove_fn$1;const template$b=Document$1.createElement("template");template$b.innerHTML=` 2763 <style> 2764 :host { 2765 --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 2766 --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px)); 2767 2768 box-shadow: var(--_focus-visible-box-shadow, none); 2769 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 2770 height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding)); 2771 display: inline-flex; 2772 align-items: center; 2773 2774 vertical-align: middle; 2775 box-sizing: border-box; 2776 position: relative; 2777 width: 100px; 2778 transition: background .15s linear; 2779 cursor: pointer; 2780 pointer-events: auto; 2781 touch-action: none; 2782 z-index: 1; 2783 } 2784 2785 2786 input[type=range]:focus { 2787 outline: 0; 2788 } 2789 input[type=range]:focus::-webkit-slider-runnable-track { 2790 outline: 0; 2791 } 2792 2793 :host(:hover) { 2794 background: var(--media-control-hover-background, rgb(50 50 70 / .7)); 2795 } 2796 2797 #leftgap { 2798 padding-left: var(--media-range-padding-left, var(--_media-range-padding)); 2799 } 2800 2801 #rightgap { 2802 padding-right: var(--media-range-padding-right, var(--_media-range-padding)); 2803 } 2804 2805 #startpoint, 2806 #endpoint { 2807 position: absolute; 2808 } 2809 2810 #endpoint { 2811 right: 0; 2812 } 2813 2814 #container { 2815 2816 width: var(--media-range-track-width, 100%); 2817 transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px)); 2818 position: relative; 2819 height: 100%; 2820 display: flex; 2821 align-items: center; 2822 min-width: 40px; 2823 } 2824 2825 #range { 2826 2827 display: var(--media-time-range-hover-display, block); 2828 bottom: var(--media-time-range-hover-bottom, -7px); 2829 height: var(--media-time-range-hover-height, max(100% + 7px, 25px)); 2830 width: 100%; 2831 position: absolute; 2832 cursor: pointer; 2833 2834 -webkit-appearance: none; 2835 -webkit-tap-highlight-color: transparent; 2836 background: transparent; 2837 margin: 0; 2838 z-index: 1; 2839 } 2840 2841 @media (hover: hover) { 2842 #range { 2843 bottom: var(--media-time-range-hover-bottom, -5px); 2844 height: var(--media-time-range-hover-height, max(100% + 5px, 20px)); 2845 } 2846 } 2847 2848 2849 2850 #range::-webkit-slider-thumb { 2851 -webkit-appearance: none; 2852 background: transparent; 2853 width: .1px; 2854 height: .1px; 2855 } 2856 2857 2858 #range::-moz-range-thumb { 2859 background: transparent; 2860 border: transparent; 2861 width: .1px; 2862 height: .1px; 2863 } 2864 2865 #appearance { 2866 height: var(--media-range-track-height, 4px); 2867 display: flex; 2868 flex-direction: column; 2869 justify-content: center; 2870 width: 100%; 2871 position: absolute; 2872 2873 will-change: transform; 2874 } 2875 2876 #background, 2877 #track { 2878 border-radius: var(--media-range-track-border-radius, 1px); 2879 position: absolute; 2880 width: 100%; 2881 height: 100%; 2882 } 2883 2884 #background { 2885 background: var(--media-range-track-background, rgb(255 255 255 / .2)); 2886 backdrop-filter: var(--media-range-track-background-backdrop-filter); 2887 -webkit-backdrop-filter: var(--media-range-track-background-backdrop-filter); 2888 } 2889 2890 #track { 2891 border: var(--media-range-track-border, none); 2892 outline: var(--media-range-track-outline); 2893 outline-offset: var(--media-range-track-outline-offset); 2894 backdrop-filter: var(--media-range-track-backdrop-filter); 2895 -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
2896 box-shadow: var(--media-range-track-box-shadow, none); 2897 overflow: hidden; 2898 } 2899 2900 #progress, 2901 #highlight, 2902 #pointer { 2903 position: absolute; 2904 height: 100%; 2905 will-change: width; 2906 } 2907 2908 #progress { 2909 background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238))); 2910 transition: var(--media-range-track-transition); 2911 } 2912 2913 #pointer { 2914 background: var(--media-range-track-pointer-background); 2915 border-right: var(--media-range-track-pointer-border-right); 2916 transition: visibility .25s, opacity .25s; 2917 visibility: hidden; 2918 opacity: 0; 2919 } 2920 2921 @media (hover: hover) { 2922 :host(:hover) #pointer { 2923 transition: visibility .5s, opacity .5s; 2924 visibility: visible; 2925 opacity: 1; 2926 } 2927 } 2928 2929 #thumb { 2930 width: var(--media-range-thumb-width, 10px); 2931 height: var(--media-range-thumb-height, 10px); 2932 margin-left: calc(var(--media-range-thumb-width, 10px) / -2); 2933 border: var(--media-range-thumb-border, none); 2934 border-radius: var(--media-range-thumb-border-radius, 10px); 2935 background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238))); 2936 box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent); 2937 transition: var(--media-range-thumb-transition); 2938 transform: var(--media-range-thumb-transform, none); 2939 opacity: var(--media-range-thumb-opacity, 1); 2940 position: absolute; 2941 left: 0; 2942 cursor: pointer; 2943 } 2944 2945 :host([disabled]) #thumb { 2946 background-color: #777; 2947 } 2948 2949 .segments #appearance { 2950 height: var(--media-range-segment-hover-height, 7px); 2951 } 2952 2953 #background, 2954 #track { 2955 clip-path: url(#segments-clipping); 2956 } 2957 2958 #segments { 2959 --segments-gap: var(--media-range-segments-gap, 2px); 2960 position: absolute; 2961 width: 100%; 2962 height: 100%; 2963 } 2964 2965 #segments-clipping { 2966 transform: translateX(calc(var(--segments-gap) / 2)); 2967 } 2968 2969 #segments-clipping:empty { 2970 display: none; 2971 } 2972 2973 #segments-clipping rect { 2974 height: var(--media-range-track-height, 4px); 2975 y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2); 2976 transition: var(--media-range-segment-transition, transform .1s ease-in-out); 2977 transform: var(--media-range-segment-transform, scaleY(1)); 2978 transform-origin: center; 2979 } 2980 </style> 2981 <div id="leftgap"></div> 2982 <div id="container"> 2983 <div id="startpoint"></div> 2984 <div id="endpoint"></div> 2985 <div id="appearance" part="appearance"> 2986 <div id="background"></div> 2987 <div id="track"> 2988 <div id="highlight"></div> 2989 <div id="pointer"></div> 2990 <div id="progress"></div> 2991 </div> 2992 <div id="thumb"></div> 2993 <svg id="segments"><clipPath id="segments-clipping"></clipPath></svg> 2994 </div>
2995 <input id="range" type="range" min="0" max="1" step="any" value="0"> 2996 </div> 2997 <div id="rightgap"></div> 2998`;class MediaChromeRange extends GlobalThis.HTMLElement{constructor(){super(),__privateAdd$n(this,_updateActiveSegment),__privateAdd$n(this,_enableUserEvents),__privateAdd$n(this,_disableUserEvents),__privateAdd$n(this,_handlePointerDown),__privateAdd$n(this,_handlePointerEnter),__privateAdd$n(this,_handlePointerUp),__privateAdd$n(this,_handlePointerLeave),__privateAdd$n(this,_handlePointerMove$1),__privateAdd$n(this,_mediaController$6,void 0),__privateAdd$n(this,_isInputTarget,void 0),__privateAdd$n(this,_startpoint,void 0),__privateAdd$n(this,_endpoint,void 0),__privateAdd$n(this,_cssRules,{}),__privateAdd$n(this,_segments,[]),__privateAdd$n(this,_onFocusIn,()=>{if(this.range.matches(":focus-visible")){const{style:e}=getOrInsertCSSRule(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),__privateAdd$n(this,_onFocusOut,()=>{const{style:e}=getOrInsertCSSRule(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),__privateAdd$n(this,_updateComputedStyles,()=>{const e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(template$b.content.cloneNode(!0))),this.container=this.shadowRoot.querySelector("#container"),__privateSet$j(this,_startpoint,this.shadowRoot.querySelector("#startpoint")),__privateSet$j(this,_endpoint,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",MediaStateReceiverAttributes.MEDIA_CONTROLLER]}attributeChangedCallback(e,r,s){var o,d,L,ge,Mt;e===MediaStateReceiverAttributes.MEDIA_CONTROLLER?(r&&((d=(o=__privateGet$n(this,_mediaController$6))==null?void 0:o.unassociateElement)==null||d.call(o,this),__privateSet$j(this,_mediaController$6,null)),s&&this.isConnected&&(__privateSet$j(this,_mediaController$6,(L=this.getRootNode())==null?void 0:L.getElementById(s)),(Mt=(ge=__privateGet$n(this,_mediaController$6))==null?void 0:ge.associateElement)==null||Mt.call(ge,this))):(e==="disabled"||e==="aria-disabled"&&r!==s)&&(s==null?(this.range.removeAttribute(e),__privateMethod$b(this,_enableUserEvents,enableUserEvents_fn).call(this)):(this.range.setAttribute(e,s),__privateMethod$b(this,_disableUserEvents,disableUserEvents_fn).call(this)))}connectedCallback(){var e,r,s;const{style:o}=getOrInsertCSSRule(this.shadowRoot,":host");o.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),__privateGet$n(this,_cssRules).pointer=getOrInsertCSSRule(this.shadowRoot,"#pointer"),__privateGet$n(this,_cssRules).progress=getOrInsertCSSRule(this.shadowRoot,"#progress"),__privateGet$n(this,_cssRules).thumb=getOrInsertCSSRule(this.shadowRoot,"#thumb");const d=this.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER);d&&(__privateSet$j(this,_mediaController$6,(e=this.getRootNode())==null?void 0:e.getElementById(d)),(s=(r=__privateGet$n(this,_mediaController$6))==null?void 0:r.associateElement)==null||s.call(r,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",__privateGet$n(this,_onFocusIn)),this.shadowRoot.addEventListener("focusout",__privateGet$n(this,_onFocusOut)),__privateMethod$b(this,_enableUserEvents,enableUserEvents_fn).call(this),observeResize(this.container,__privateGet$n(this,_updateComputedStyles))}disconnectedCallback(){var e,r;__privateMethod$b(this,_disableUserEvents,disableUserEvents_fn).call(this),(r=(e=__privateGet$n(this,_mediaController$6))==null?void 0:e.unassociateElement)==null||r.call(e,this),__privateSet$j(this,_mediaController$6,null),this.shadowRoot.removeEventListener("focusin",__privateGet$n(this,_onFocusIn)),this.shadowRoot.removeEventListener("focusout",__privateGet$n(this,_onFocusOut)),unobserveResize(this.container,__privateGet$n(this,_updateComputedStyles))}updatePointerBar(e){var r;(r=__privateGet$n(this,_cssRules).pointer)==null||r.style.setProperty("width",`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,r;const s=this.range.valueAsNumber*100;(e=__privateGet$n(this,_cssRules).progress)==null||e.style.setProperty("width",`${s}%`),(r=__privateGet$n(this,_cssRules).thumb)==null||r.style.setProperty("left",`${s}%`)}updateSegments(e){const r=this.shadowRoot.querySelector("#segments-clipping");if(r.textContent="",this.container.classList.toggle("segments",!!(e!=null&&e.length)),!(e!=null&&e.length))return;__privateGet$n(this,_cssRules).activeSegment=insertCSSRule(this.shadowRoot,"#segments-clipping rect:nth-child(0)");const s=[...new Set([+this.range.min,...e.flatMap(d=>[d.start,d.end]),+this.range.max])];__privateSet$j(this,_segments,[...s]);const o=s.pop();for(const[d,L]of s.entries()){const[ge,Mt]=[d===0,d===s.length-1],er=ge?"calc(var(--segments-gap) / -1)":`${L*100}%`,ir=`calc(${((Mt?o:s[d+1])-L)*100}%${ge||Mt?"":" - var(--segments-gap)"})`,rr=Document$1.createElementNS("http://www.w3.org/2000/svg","rect"),nr=getOrInsertCSSRule(this.shadowRoot,`#segments-clipping rect:nth-child(${d+1})`);nr.style.setProperty("x",er),nr.style.setProperty("width",ir),r.append(rr)}}getPointerRatio(e){let r=getPointProgressOnLine(e.clientX,e.clientY,__privateGet$n(this,_startpoint).getBoundingClientRect(),__privateGet$n(this,_endpoint).getBoundingClientRect());return Math.max(0,Math.min(1,r))}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":__privateMethod$b(this,_handlePointerMove$1,handlePointerMove_fn$1).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":__privateMethod$b(this,_handlePointerEnter,handlePointerEnter_fn).call(this,e);break;case"pointerdown":__privateMethod$b(this,_handlePointerDown,handlePointerDown_fn).call(this,e);break;case"pointerup":__privateMethod$b(this,_handlePointerUp,handlePointerUp_fn).c
vendor: 6,055 bytes, lines 2998-3020
2998all(this);break;case"pointerleave":__privateMethod$b(this,_handlePointerLeave,handlePointerLeave_fn).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}_mediaController$6=new WeakMap;_isInputTarget=new WeakMap;_startpoint=new WeakMap;_endpoint=new WeakMap;_cssRules=new WeakMap;_segments=new WeakMap;_onFocusIn=new WeakMap;_onFocusOut=new WeakMap;_updateComputedStyles=new WeakMap;_updateActiveSegment=new WeakSet;updateActiveSegment_fn=function(t){const e=__privateGet$n(this,_cssRules).activeSegment;if(!e)return;const r=this.getPointerRatio(t),o=`#segments-clipping rect:nth-child(${__privateGet$n(this,_segments).findIndex((d,L,ge)=>{const Mt=ge[L+1];return Mt!=null&&r>=d&&r<=Mt})+1})`;(e.selectorText!=o||!e.style.transform)&&(e.selectorText=o,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))};_enableUserEvents=new WeakSet;enableUserEvents_fn=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};_disableUserEvents=new WeakSet;disableUserEvents_fn=function(){var t,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),(t=GlobalThis.window)==null||t.removeEventListener("pointerup",this),(e=GlobalThis.window)==null||e.removeEventListener("pointermove",this)};_handlePointerDown=new WeakSet;handlePointerDown_fn=function(t){var e;__privateSet$j(this,_isInputTarget,t.composedPath().includes(this.range)),(e=GlobalThis.window)==null||e.addEventListener("pointerup",this)};_handlePointerEnter=new WeakSet;handlePointerEnter_fn=function(t){var e;t.pointerType!=="mouse"&&__privateMethod$b(this,_handlePointerDown,handlePointerDown_fn).call(this,t),this.addEventListener("pointerleave",this),(e=GlobalThis.window)==null||e.addEventListener("pointermove",this)};_handlePointerUp=new WeakSet;handlePointerUp_fn=function(){var t;(t=GlobalThis.window)==null||t.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};_handlePointerLeave=new WeakSet;handlePointerLeave_fn=function(){var t,e;this.removeEventListener("pointerleave",this),(t=GlobalThis.window)==null||t.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=__privateGet$n(this,_cssRules).activeSegment)==null||e.style.removeProperty("transform")};_handlePointerMove$1=new WeakSet;handlePointerMove_fn$1=function(t){this.toggleAttribute("dragging",t.buttons===1||t.pointerType!=="mouse"),this.updatePointerBar(t),__privateMethod$b(this,_updateActiveSegment,updateActiveSegment_fn).call(this,t),this.dragging&&(t.pointerType!=="mouse"||!__privateGet$n(this,_isInputTarget))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(t),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))};GlobalThis.customElements.get("media-chrome-range")||GlobalThis.customElements.define("media-chrome-range",MediaChromeRange);var __accessCheck$m=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$m=(t,e,r)=>(__accessCheck$m(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$m=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$i=(t,e,r,s)=>(__accessCheck$m(t,e,"write to private field"),e.set(t,r),r),_mediaController$5;const template$a=Document$1.createElement("template");template$a.innerHTML=` 2999 <style> 3000 :host { 3001 3002 box-sizing: border-box; 3003 display: var(--media-control-display, var(--media-control-bar-display, inline-flex)); 3004 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 3005 --media-loading-indicator-icon-height: 44px; 3006 } 3007 3008 ::slotted(media-time-range), 3009 ::slotted(media-volume-range) { 3010 min-height: 100%; 3011 } 3012 3013 ::slotted(media-time-range), 3014 ::slotted(media-clip-selector) { 3015 flex-grow: 1; 3016 } 3017 </style> 3018 3019 <slot></slot> 3020`;class MediaControlBar extends GlobalThis.HTMLElement{constructor(){super(),__privateAdd$m(this,_mediaController$5,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(template$a.content.cloneNode(!0)))}static get observedAttributes(){return[MediaStateReceiverAttributes.MEDIA_CONTROLLER]}attributeChangedCallback(e,r,s){var o,d,L,ge,Mt;e===MediaStateReceiverAttributes.MEDIA_CONTROLLER&&(r&&((d=(o=__privateGet$m(this,_mediaController$5))==null?void 0:o.unassociateElement)==null||d.call(o,this),__privateSet$i(this,_mediaController$5,null)),s&&this.isConnected&&(__privateSet$i(this,_mediaController$5,(L=this.getRootNode())==null?void 0:L.getElementById(s)),(Mt=(ge=__privateGet$m(this,_mediaController$5))==null?void 0:ge.associateElement)==null||Mt.call(ge,this)))}connectedCallback(){var e,r,s;const o=this.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER);o&&(__privateSet$i(this,_mediaController$5,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(s=(r=__privateGet$m(this,_mediaController$5))==null?void 0:r.associateElement)==null||s.call(r,this))}disconnectedCallback(){var e,r;(r=(e=__privateGet$m(this,_mediaController$5))==null?void 0:e.unassociateElement)==null||r.call(e,this),__privateSet$i(this,_mediaController$5,null)}}_mediaController$5=new WeakMap;GlobalThis.customElements.get("media-control-bar")||GlobalThis.customElements.define("media-control-bar",MediaControlBar);var __accessCheck$l=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$l=(t,e,r)=>(__accessCheck$l(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$l=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$h=(t,e,r,s)=>(__accessCheck$l(t,e,"write to private field"),e.set(t,r),r),_mediaController$4;const template$9=Document$1.createElement("template");
3020template$9.innerHTML=` 3021 <style> 3022 :host { 3023 font: var(--media-font, 3024 var(--media-font-weight, normal) 3025 var(--media-font-size, 14px) / 3026 var(--media-text-content-height, var(--media-control-height, 24px)) 3027 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 3028 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 3029 background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)))); 3030 padding: var(--media-control-padding, 10px); 3031 display: inline-flex; 3032 justify-content: center; 3033 align-items: center; 3034 vertical-align: middle; 3035 box-sizing: border-box; 3036 text-align: center; 3037 pointer-events: auto; 3038 } 3039 3040 3041 :host(:focus-visible) { 3042 box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9); 3043 outline: 0; 3044 } 3045 3046 3047 :host(:where(:focus)) { 3048 box-shadow: none; 3049 outline: 0; 3050 } 3051 </style> 3052 <slot></slot> 3053`;class MediaTextDisplay extends GlobalThis.HTMLElement{constructor(){super(),__privateAdd$l(this,_mediaController$4,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(template$9.content.cloneNode(!0)))}static get observedAttributes(){return[MediaStateReceiverAttributes.MEDIA_CONTROLLER]}attributeChangedCallback(e,r,s){var o,d,L,ge,Mt;e===MediaStateReceiverAttributes.MEDIA_CONTROLLER&&(r&&((d=(o=__privateGet$l(this,_mediaController$4))==null?void 0:o.unassociateElement)==null||d.call(o,this),__privateSet$h(this,_mediaController$4,null)),s&&this.isConnected&&(__privateSet$h(this,_mediaController$4,(L=this.getRootNode())==null?void 0:L.getElementById(s)),(Mt=(ge=__privateGet$l(this,_mediaController$4))==null?void 0:ge.associateElement)==null||Mt.call(ge,this)))}connectedCallback(){var e,r,s;const{style:o}=getOrInsertCSSRule(this.shadowRoot,":host");o.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const d=this.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER);d&&(__privateSet$h(this,_mediaController$4,(e=this.getRootNode())==null?void 0:e.getElementById(d)),(s=(r=__privateGet$l(this,_mediaController$4))==null?void 0:r.associateElement)==null||s.call(r,this))}disconnectedCallback(){var e,r;(r=(e=__privateGet$l(this,_mediaController$4))==null?void 0:e.unassociateElement)==null||r.call(e,this),__privateSet$h(this,_mediaController$4,null)}}_mediaController$4=new WeakMap;GlobalThis.customElements.get("media-text-display")||GlobalThis.customElements.define("media-text-display",MediaTextDisplay);var media_text_display_default=MediaTextDisplay,__accessCheck$k=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$k=(t,e,r)=>(__accessCheck$k(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$k=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$g=(t,e,r,s)=>(__accessCheck$k(t,e,"write to private field"),e.set(t,r),r),_slot$3;class MediaDurationDisplay extends MediaTextDisplay{constructor(){super(),__privateAdd$k(this,_slot$3,void 0),__privateSet$g(this,_slot$3,this.shadowRoot.querySelector("slot")),__privateGet$k(this,_slot$3).textContent=formatTime(0)}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_DURATION]}attributeChangedCallback(e,r,s){e===MediaUIAttributes.MEDIA_DURATION&&(__privateGet$k(this,_slot$3).textContent=formatTime(s)),super.attributeChangedCallback(e,r,s)}get mediaDuration(){return getNumericAttr(this,MediaUIAttributes.MEDIA_DURATION)}set mediaDuration(e){setNumericAttr(this,MediaUIAttributes.MEDIA_DURATION,e)}}_slot$3=new WeakMap;GlobalThis.customElements.get("media-duration-display")||GlobalThis.customElements.define("media-duration-display",MediaDurationDisplay);const enterFullscreenIcon=`<svg aria-hidden="true" viewBox="0 0 26 24"> 3054 <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/> 3055</svg>`,exitFullscreenIcon=`<svg aria-hidden="true" viewBox="0 0 26 24"> 3056 <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/> 3057</svg>`,slotTemplate$d=Document$1.createElement("template");slotTemplate$d.innerHTML=` 3058 <style> 3059 :host([${MediaUIAttributes.MEDIA_IS_FULLSCREEN}]) slot:not([name=exit]):not([name=icon]) { 3060 display: none !important; 3061 } 3062 3063 3064 :host(:not([${MediaUIAttributes.MEDIA_IS_FULLSCREEN}])) slot:not([name=enter]):not([name=icon]) { 3065 display: none !important; 3066 } 3067 </style> 3068 3069 <slot name="icon"> 3070 <slot name="enter">${enterFullscreenIcon}</slot> 3071 <slot name="exit">${exitFullscreenIcon}</slot> 3072 </slot> 3073`;const updateAriaLabel$3=t=>{const e=t.mediaIsFullscreen?verbs.EXIT_FULLSCREEN():verbs.ENTER_FULLSCREEN();t.setAttribute("aria-label",e)};class MediaFullscreenButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_IS_FULLSCREEN,MediaUIAttributes.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:slotTemplate$d,...e})}connectedCallback(){super.connectedCallback(),updateAriaLabel$3(this)}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_IS_FULLSCREEN&&updateAriaLabel$3(this)}get mediaFullscreenUnavailable(){return getStringAttr(this,MediaUIAttributes.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){setStringAttr(this,MediaUIAttributes.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_IS_FULLSCREEN,e)}handleClick(){const e=this.mediaIsFullscreen?MediaUIEvents.MEDIA_EXIT_FULLSCREEN_REQUEST:MediaUIEvents.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new GlobalThis.CustomEvent(e,{composed:!0,bubbles:!0}))}}GlobalThis.customElements.get("media-fullscreen-button")||GlobalThis.customElements.define("media-fullscreen-button",MediaFullscreenButton);const{MEDIA_TIME_IS_LIVE,MEDIA_PAUSED}=MediaUIAttributes,{MEDIA_SEEK_TO_LIVE_REQUEST,MEDIA_PLAY_REQUEST}=MediaUIEvents,indicatorSVG='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>',slotTemplate$c=Document$1.createElement("template");slotTemplate$c.innerHTML=` 3074 <style> 3075 3076 slot[name=indicator] > *, 3077 :host ::slotted([slot=indicator]) { 3078 3079 min-width: auto; 3080 fill: var(--media-live-button-icon-color, rgb(140, 140, 140)); 3081 color: var(--media-live-button-icon-color, rgb(140, 140, 140)); 3082 } 3083 3084 :host([${MEDIA_TIME_IS_LIVE}]:not([${MEDIA_PAUSED}])) slot[name=indicator] > *, 3085 :host([${MEDIA_TIME_IS_LIVE}]:not([${MEDIA_PAUSED}])) ::slotted([slot=indicator]) { 3086 fill: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 3087 color: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 3088 } 3089 3090 :host([${MEDIA_TIME_IS_LIVE}]:not([${MEDIA_PAUSED}])) {
3091 cursor: not-allowed; 3092 } 3093 3094 </style> 3095 3096 <slot name="indicator">${indicatorSVG}</slot> 3097 3098 <slot name="spacer"> </slot><slot name="text">LIVE</slot> 3099`;const updateAriaAttributes=t=>{const e=t.mediaPaused||!t.mediaTimeIsLive,r=e?verbs.SEEK_LIVE():verbs.PLAYING_LIVE();t.setAttribute("aria-label",r),e?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true")};class MediaLiveButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MEDIA_PAUSED,MEDIA_TIME_IS_LIVE]}constructor(e={}){super({slotTemplate:slotTemplate$c,...e})}connectedCallback(){updateAriaAttributes(this),super.connectedCallback()}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),updateAriaAttributes(this)}get mediaPaused(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_PAUSED)}set mediaPaused(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new GlobalThis.CustomEvent(MEDIA_SEEK_TO_LIVE_REQUEST,{composed:!0,bubbles:!0})),this.hasAttribute(MEDIA_PAUSED)&&this.dispatchEvent(new GlobalThis.CustomEvent(MEDIA_PLAY_REQUEST,{composed:!0,bubbles:!0})))}}GlobalThis.customElements.get("media-live-button")||GlobalThis.customElements.define("media-live-button",MediaLiveButton);var __accessCheck$j=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$j=(t,e,r)=>(__accessCheck$j(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$j=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$f=(t,e,r,s)=>(__accessCheck$j(t,e,"write to private field"),e.set(t,r),r),_mediaController$3,_delay;const Attributes$9={LOADING_DELAY:"loadingdelay"},DEFAULT_LOADING_DELAY=500,template$8=Document$1.createElement("template"),loadingIndicatorIcon=` 3100<svg aria-hidden="true" viewBox="0 0 100 100"> 3101 <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"> 3102 <animateTransform 3103 attributeName="transform" 3104 attributeType="XML" 3105 type="rotate" 3106 dur="1s" 3107 from="0 50 50" 3108 to="360 50 50" 3109 repeatCount="indefinite" /> 3110 </path> 3111</svg> 3112`;template$8.innerHTML=` 3113<style> 3114:host { 3115 display: var(--media-control-display, var(--media-loading-indicator-display, inline-block)); 3116 vertical-align: middle; 3117 box-sizing: border-box; 3118 --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${DEFAULT_LOADING_DELAY}ms); 3119} 3120 3121#status { 3122 color: rgba(0,0,0,0); 3123 width: 0px; 3124 height: 0px; 3125} 3126 3127:host slot[name=icon] > *, 3128:host ::slotted([slot=icon]) { 3129 opacity: var(--media-loading-indicator-opacity, 0); 3130 transition: opacity 0.15s; 3131} 3132 3133:host([${MediaUIAttributes.MEDIA_LOADING}]:not([${MediaUIAttributes.MEDIA_PAUSED}])) slot[name=icon] > *, 3134:host([${MediaUIAttributes.MEDIA_LOADING}]:not([${MediaUIAttributes.MEDIA_PAUSED}])) ::slotted([slot=icon]) { 3135 opacity: var(--media-loading-indicator-opacity, 1); 3136 transition: opacity 0.15s var(--_loading-indicator-delay); 3137} 3138 3139:host #status { 3140 visibility: var(--media-loading-indicator-opacity, hidden); 3141 transition: visibility 0.15s; 3142} 3143 3144:host([${MediaUIAttributes.MEDIA_LOADING}]:not([${MediaUIAttributes.MEDIA_PAUSED}])) #status { 3145 visibility: var(--media-loading-indicator-opacity, visible); 3146 transition: visibility 0.15s var(--_loading-indicator-delay); 3147} 3148 3149svg, img, ::slotted(svg), ::slotted(img) { 3150 width: var(--media-loading-indicator-icon-width); 3151 height: var(--media-loading-indicator-icon-height, 100px); 3152 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 3153 vertical-align: middle; 3154} 3155</style> 3156 3157<slot name="icon">${loadingIndicatorIcon}</slot> 3158<div id="status" role="status" aria-live="polite">${nouns.MEDIA_LOADING()}</div> 3159`;class MediaLoadingIndicator extends GlobalThis.HTMLElement{constructor(){if(super(),__privateAdd$j(this,_mediaController$3,void 0),__privateAdd$j(this,_delay,DEFAULT_LOADING_DELAY),!this.shadowRoot){const e=this.attachShadow({mode:"open"}),r=template$8.content.cloneNode(!0);e.appendChild(r)}}static get observedAttributes(){return[MediaStateReceiverAttributes.MEDIA_CONTROLLER,MediaUIAttributes.MEDIA_PAUSED,MediaUIAttributes.MEDIA_LOADING,Attributes$9.LOADING_DELAY]}attributeChangedCallback(e,r,s){var o,d,L,ge,Mt;e===Attributes$9.LOADING_DELAY&&r!==s?this.loadingDelay=Number(s):e===MediaStateReceiverAttributes.MEDIA_CONTROLLER&&(r&&((d=(o=__privateGet$j(this,_mediaController$3))==null?void 0:o.unassociateElement)==null||d.call(o,this),__privateSet$f(this,_mediaController$3,null)),s&&this.isConnected&&(__privateSet$f(this,_mediaController$3,(L=this.getRootNode())==null?void 0:L.getElementById(s)),(Mt=(ge=__privateGet$j(this,_mediaController$3))==null?void 0:ge.associateElement)==null||Mt.call(ge,this)))}connectedCallback(){var e,r,s;const o=this.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER);o&&(__privateSet$f(this,_mediaController$3,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(s=(r=__privateGet$j(this,_mediaController$3))==null?void 0:r.associateElement)==null||s.call(r,this))}disconnectedCallback(){var e,r;(r=(e=__privateGet$j(this,_mediaController$3))==null?void 0:e.unassociateElement)==null||r.call(e,this),__privateSet$f(this,_mediaController$3,null)}get loadingDelay(){return __privateGet$j(this,_delay)}set loadingDelay(e){__privateSet$f(this,_delay,e);const{style:r}=getOrInsertCSSRule(this.shadowRoot,":host");r.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_PAUSED)}set mediaPaused(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_PAUSED,e)}get mediaLoading(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_LOADING)}set mediaLoading(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_LOADING,e)}}_mediaController$3=new WeakMap;_delay=new WeakMap;GlobalThis.customElements.get("media-loading-indicator")||GlobalThis.customElements.define("media-loading-indicator",MediaLoadingIndicator);const{MEDIA_VOLUME_LEVEL}=MediaUIAttributes,offIcon=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3160 <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"/> 3161</svg>`,lowIcon=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3162 <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"/> 3163</svg>`,highIcon=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3164 <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"/> 3165</svg>`,slotTemplate$b=Document$1.createElement("template");slotTemplate$b.innerHTML=` 3166 <style> 3167 3168 :host(:not([${MEDIA_VOLUME_LEVEL}
3168])) slot:not([name=high]):not([name=icon]), 3169 :host([${MEDIA_VOLUME_LEVEL}=high]) slot:not([name=high]):not([name=icon]) { 3170 display: none !important; 3171 } 3172 3173 :host([${MEDIA_VOLUME_LEVEL}=off]) slot:not([name=off]):not([name=icon]) { 3174 display: none !important; 3175 } 3176 3177 :host([${MEDIA_VOLUME_LEVEL}=low]) slot:not([name=low]):not([name=icon]) { 3178 display: none !important; 3179 } 3180 3181 :host([${MEDIA_VOLUME_LEVEL}=medium]) slot:not([name=medium]):not([name=icon]) { 3182 display: none !important; 3183 } 3184 </style> 3185 3186 <slot name="icon"> 3187 <slot name="off">${offIcon}</slot> 3188 <slot name="low">${lowIcon}</slot> 3189 <slot name="medium">${lowIcon}</slot> 3190 <slot name="high">${highIcon}</slot> 3191 </slot> 3192`;const updateAriaLabel$2=t=>{const r=t.mediaVolumeLevel==="off"?verbs.UNMUTE():verbs.MUTE();t.setAttribute("aria-label",r)};class MediaMuteButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:slotTemplate$b,...e})}connectedCallback(){updateAriaLabel$2(this),super.connectedCallback()}attributeChangedCallback(e,r,s){e===MediaUIAttributes.MEDIA_VOLUME_LEVEL&&updateAriaLabel$2(this),super.attributeChangedCallback(e,r,s)}get mediaVolumeLevel(){return getStringAttr(this,MediaUIAttributes.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){setStringAttr(this,MediaUIAttributes.MEDIA_VOLUME_LEVEL,e)}handleClick(){const e=this.mediaVolumeLevel==="off"?MediaUIEvents.MEDIA_UNMUTE_REQUEST:MediaUIEvents.MEDIA_MUTE_REQUEST;this.dispatchEvent(new GlobalThis.CustomEvent(e,{composed:!0,bubbles:!0}))}}GlobalThis.customElements.get("media-mute-button")||GlobalThis.customElements.define("media-mute-button",MediaMuteButton);const pipIcon=`<svg aria-hidden="true" viewBox="0 0 28 24"> 3193 <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"/> 3194</svg>`,slotTemplate$a=Document$1.createElement("template");slotTemplate$a.innerHTML=` 3195 <style> 3196 :host([${MediaUIAttributes.MEDIA_IS_PIP}]) slot:not([name=exit]):not([name=icon]) { 3197 display: none !important; 3198 } 3199 3200 3201 :host(:not([${MediaUIAttributes.MEDIA_IS_PIP}])) slot:not([name=enter]):not([name=icon]) { 3202 display: none !important; 3203 } 3204 </style> 3205 3206 <slot name="icon"> 3207 <slot name="enter">${pipIcon}</slot> 3208 <slot name="exit">${pipIcon}</slot> 3209 </slot> 3210`;const updateAriaLabel$1=t=>{const e=t.mediaIsPip?verbs.EXIT_PIP():verbs.ENTER_PIP();t.setAttribute("aria-label",e)};class MediaPipButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_IS_PIP,MediaUIAttributes.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:slotTemplate$a,...e})}connectedCallback(){updateAriaLabel$1(this),super.connectedCallback()}attributeChangedCallback(e,r,s){e===MediaUIAttributes.MEDIA_IS_PIP&&updateAriaLabel$1(this),super.attributeChangedCallback(e,r,s)}get mediaPipUnavailable(){return getStringAttr(this,MediaUIAttributes.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){setStringAttr(this,MediaUIAttributes.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_IS_PIP)}set mediaIsPip(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_IS_PIP,e)}handleClick(){const e=this.mediaIsPip?MediaUIEvents.MEDIA_EXIT_PIP_REQUEST:MediaUIEvents.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new GlobalThis.CustomEvent(e,{composed:!0,bubbles:!0}))}}GlobalThis.customElements.get("media-pip-button")||GlobalThis.customElements.define("media-pip-button",MediaPipButton);var __accessCheck$i=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$i=(t,e,r)=>(__accessCheck$i(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$i=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},_rates$3;const Attributes$8={RATES:"rates"},DEFAULT_RATES$1=[1,1.2,1.5,1.7,2],DEFAULT_RATE$1=1,slotTemplate$9=Document$1.createElement("template");slotTemplate$9.innerHTML=` 3211 <style> 3212 :host { 3213 min-width: 5ch; 3214 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 3215 } 3216 </style> 3217 <slot name="icon"></slot> 3218`;class MediaPlaybackRateButton extends MediaChromeButton{constructor(e={}){super({slotTemplate:slotTemplate$9,...e}),__privateAdd$i(this,_rates$3,new AttributeTokenList(this,Attributes$8.RATES,{defaultValue:DEFAULT_RATES$1})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${DEFAULT_RATE$1}x`}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_PLAYBACK_RATE,Attributes$8.RATES]}attributeChangedCallback(e,r,s){if(super.attributeChangedCallback(e,r,s),e===Attributes$8.RATES&&(__privateGet$i(this,_rates$3).value=s),e===MediaUIAttributes.MEDIA_PLAYBACK_RATE){const o=s?+s:Number.NaN,d=Number.isNaN(o)?DEFAULT_RATE$1:o;this.container.innerHTML=`${d}x`,this.setAttribute("aria-label",nouns.PLAYBACK_RATE({playbackRate:d}))}}get rates(){return __privateGet$i(this,_rates$3)}set rates(e){e?Array.isArray(e)&&(__privateGet$i(this,_rates$3).value=e.join(" ")):__privateGet$i(this,_rates$3).value=""}get mediaPlaybackRate(){return getNumericAttr(this,MediaUIAttributes.MEDIA_PLAYBACK_RATE,DEFAULT_RATE$1)}set mediaPlaybackRate(e){setNumericAttr(this,MediaUIAttributes.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,r;const s=Array.from(this.rates.values(),L=>+L).sort((L,ge)=>L-ge),o=(r=(e=s.find(L=>L>this.mediaPlaybackRate))!=null?e:s[0])!=null?r:DEFAULT_RATE$1,d=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:o});this.dispatchEvent(d)}}_rates$3=new WeakMap;GlobalThis.customElements.get("media-playback-rate-button")||GlobalThis.customElements.define("media-playback-rate-button",MediaPlaybackRateButton);var __accessCheck$h=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$h=(t,e,r)=>(__accessCheck$h(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$h=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateMethod$a=(t,e,r)=>(__accessCheck$h(t,e,"access private method"),r),_rates$2,_render$5,render_fn$5,_onChange$5,onChange_fn$5;const Attributes$7={RATES:"rates"};class MediaPlaybackRateMenu extends MediaChromeMenu{constructor(){super(),__privateAdd$h(this,_render$5),__privateAdd$h(this,_onChange$5),__privateAdd$h(this,_rates$2,new AttributeTokenList(this,Attributes$7.RATES,{defaultValue:DEFAULT_RATES$1})),__privateMethod$a(this,_render$5,render_fn$5).call(this)}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_PLAYBACK_RATE,Attributes$7.RATES]}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_PLAYBACK_RATE&&r!=s?this.value=s:e===Attributes$7.RATES&&r!=s&&(__privateGet$h(this,_rates$2).value=s,__privateMethod$a(this,_render$5,render_fn$5).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",__privateMethod$a(this,_onChange$5,onChange_fn$5))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",__privateMethod$a(this,_onChange$5,onChange_fn$5))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:getMediaController(this).querySelector("media-playback-rate-menu-button")}get rates(){return __privateGet$h(this,_rates$2)}set rates(e){e?Array.isArray(e)&&(__privateGet$h(this,_rates$2).value=e.join(" ")):__privateGet$h(this,_rates$2).value="",__privateMethod$a(this,_render$5,render_fn$5).call(this)}get mediaPlaybackRate(){return getNumericAttr(this,MediaUIAttributes.MEDIA_PLAYBACK_RATE,DEFAULT_RATE$1)}set mediaPlaybackRate(e){setNumericAttr(this,MediaUIAttributes.MEDIA_PLAYBACK_RATE,e)}}_rates$2=new WeakMap;_render$5=new WeakSet;render_fn$5=function(){this.defaultSlot.textContent="";for(const t of this.rates){const e=createMenuItem({type:"radio",text:this.formatMenuItemText(`${t}x`,t),value:t,checked:this.mediaPlaybackRate==t});
3218e.prepend(createIndicator$1(this,"checked-indicator")),this.defaultSlot.append(e)}};_onChange$5=new WeakSet;onChange_fn$5=function(){if(!this.value)return;const t=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};GlobalThis.customElements.get("media-playback-rate-menu")||GlobalThis.customElements.define("media-playback-rate-menu",MediaPlaybackRateMenu);var __accessCheck$g=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$g=(t,e,r)=>(__accessCheck$g(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$g=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},_rates$1;const Attributes$6={RATES:"rates"},DEFAULT_RATES=[1,1.2,1.5,1.7,2],DEFAULT_RATE=1,slotTemplate$8=Document$1.createElement("template");slotTemplate$8.innerHTML=` 3219 <style> 3220 :host { 3221 min-width: 5ch; 3222 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 3223 } 3224 </style> 3225 <slot name="icon"></slot> 3226`;class MediaPlaybackRateMenuButton extends MediaChromeMenuButton{constructor(e={}){super({slotTemplate:slotTemplate$8,...e}),__privateAdd$g(this,_rates$1,new AttributeTokenList(this,Attributes$6.RATES,{defaultValue:DEFAULT_RATES})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${DEFAULT_RATE}x`}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_PLAYBACK_RATE,Attributes$6.RATES]}attributeChangedCallback(e,r,s){if(super.attributeChangedCallback(e,r,s),e===Attributes$6.RATES&&(__privateGet$g(this,_rates$1).value=s),e===MediaUIAttributes.MEDIA_PLAYBACK_RATE){const o=s?+s:Number.NaN,d=Number.isNaN(o)?DEFAULT_RATE:o;this.container.innerHTML=`${d}x`,this.setAttribute("aria-label",nouns.PLAYBACK_RATE({playbackRate:d}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:getMediaController(this).querySelector("media-playback-rate-menu")}get rates(){return __privateGet$g(this,_rates$1)}set rates(e){e?Array.isArray(e)&&(__privateGet$g(this,_rates$1).value=e.join(" ")):__privateGet$g(this,_rates$1).value=""}get mediaPlaybackRate(){return getNumericAttr(this,MediaUIAttributes.MEDIA_PLAYBACK_RATE,DEFAULT_RATE)}set mediaPlaybackRate(e){setNumericAttr(this,MediaUIAttributes.MEDIA_PLAYBACK_RATE,e)}}_rates$1=new WeakMap;GlobalThis.customElements.get("media-playback-rate-menu-button")||GlobalThis.customElements.define("media-playback-rate-menu-button",MediaPlaybackRateMenuButton);const playIcon=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3227 <path d="m6 21 15-9L6 3v18Z"/> 3228</svg>`,pauseIcon=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3229 <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/> 3230</svg>`,slotTemplate$7=Document$1.createElement("template");slotTemplate$7.innerHTML=` 3231 <style> 3232 :host([${MediaUIAttributes.MEDIA_PAUSED}]) slot[name=pause] { 3233 display: none !important; 3234 } 3235 3236 :host(:not([${MediaUIAttributes.MEDIA_PAUSED}])) slot[name=play] { 3237 display: none !important; 3238 } 3239 </style> 3240 3241 <slot name="icon"> 3242 <slot name="play">${playIcon}</slot> 3243 <slot name="pause">${pauseIcon}</slot> 3244 </slot> 3245`;const updateAriaLabel=t=>{const e=t.mediaPaused?verbs.PLAY():verbs.PAUSE();t.setAttribute("aria-label",e)};class MediaPlayButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_PAUSED,MediaUIAttributes.MEDIA_ENDED]}constructor(e={}){super({slotTemplate:slotTemplate$7,...e})}connectedCallback(){updateAriaLabel(this),super.connectedCallback()}attributeChangedCallback(e,r,s){e===MediaUIAttributes.MEDIA_PAUSED&&updateAriaLabel(this),super.attributeChangedCallback(e,r,s)}get mediaPaused(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_PAUSED)}set mediaPaused(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_PAUSED,e)}handleClick(){const e=this.mediaPaused?MediaUIEvents.MEDIA_PLAY_REQUEST:MediaUIEvents.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new GlobalThis.CustomEvent(e,{composed:!0,bubbles:!0}))}}GlobalThis.customElements.get("media-play-button")||GlobalThis.customElements.define("media-play-button",MediaPlayButton);const Attributes$5={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"},template$7=Document$1.createElement("template");template$7.innerHTML=` 3246 <style> 3247 :host { 3248 pointer-events: none; 3249 display: var(--media-poster-image-display, inline-block); 3250 box-sizing: border-box; 3251 } 3252 3253 img { 3254 max-width: 100%; 3255 max-height: 100%; 3256 min-width: 100%; 3257 min-height: 100%; 3258 background-repeat: no-repeat; 3259 background-position: var(--media-poster-image-background-position, var(--media-object-position, center)); 3260 background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain)); 3261 object-fit: var(--media-object-fit, contain); 3262 object-position: var(--media-object-position, center); 3263 } 3264 </style> 3265 3266 <img part="poster img" aria-hidden="true" id="image"/> 3267`;
3267const unsetBackgroundImage=t=>{t.style.removeProperty("background-image")},setBackgroundImage=(t,e)=>{t.style["background-image"]=`url('${e}')`};class MediaPosterImage extends GlobalThis.HTMLElement{static get observedAttributes(){return[Attributes$5.PLACEHOLDER_SRC,Attributes$5.SRC]}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(template$7.content.cloneNode(!0))),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,r,s){e===Attributes$5.SRC&&(s==null?this.image.removeAttribute(Attributes$5.SRC):this.image.setAttribute(Attributes$5.SRC,s)),e===Attributes$5.PLACEHOLDER_SRC&&(s==null?unsetBackgroundImage(this.image):setBackgroundImage(this.image,s))}get placeholderSrc(){return getStringAttr(this,Attributes$5.PLACEHOLDER_SRC)}set placeholderSrc(e){setStringAttr(this,Attributes$5.SRC,e)}get src(){return getStringAttr(this,Attributes$5.SRC)}set src(e){setStringAttr(this,Attributes$5.SRC,e)}}GlobalThis.customElements.get("media-poster-image")||GlobalThis.customElements.define("media-poster-image",MediaPosterImage);var __accessCheck$f=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$f=(t,e,r)=>(__accessCheck$f(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$f=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$e=(t,e,r,s)=>(__accessCheck$f(t,e,"write to private field"),e.set(t,r),r),_slot$2;class MediaPreviewChapterDisplay extends media_text_display_default{constructor(){super(),__privateAdd$f(this,_slot$2,void 0),__privateSet$e(this,_slot$2,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_PREVIEW_CHAPTER]}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_PREVIEW_CHAPTER&&s!==r&&s!=null&&(__privateGet$f(this,_slot$2).textContent=s,s!==""?this.setAttribute("aria-valuetext",`chapter: ${s}`):this.removeAttribute("aria-valuetext"))}get mediaPreviewChapter(){return getStringAttr(this,MediaUIAttributes.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){setStringAttr(this,MediaUIAttributes.MEDIA_PREVIEW_CHAPTER,e)}}_slot$2=new WeakMap;GlobalThis.customElements.get("media-preview-chapter-display")||GlobalThis.customElements.define("media-preview-chapter-display",MediaPreviewChapterDisplay);var __accessCheck$e=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$e=(t,e,r)=>(__accessCheck$e(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$e=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$d=(t,e,r,s)=>(__accessCheck$e(t,e,"write to private field"),e.set(t,r),r),_mediaController$2;const template$6=Document$1.createElement("template");template$6.innerHTML=` 3268 <style> 3269 :host { 3270 box-sizing: border-box; 3271 display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block)); 3272 overflow: hidden; 3273 } 3274 3275 img { 3276 display: none; 3277 position: relative; 3278 } 3279 </style> 3280 <img crossorigin loading="eager" decoding="async"> 3281`;class MediaPreviewThumbnail extends GlobalThis.HTMLElement{constructor(){super(),__privateAdd$e(this,_mediaController$2,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(template$6.content.cloneNode(!0)))}static get observedAttributes(){return[MediaStateReceiverAttributes.MEDIA_CONTROLLER,MediaUIAttributes.MEDIA_PREVIEW_IMAGE,MediaUIAttributes.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,r,s;const o=this.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER);o&&(__privateSet$d(this,_mediaController$2,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(s=(r=__privateGet$e(this,_mediaController$2))==null?void 0:r.associateElement)==null||s.call(r,this))}disconnectedCallback(){var e,r;(r=(e=__privateGet$e(this,_mediaController$2))==null?void 0:e.unassociateElement)==null||r.call(e,this),__privateSet$d(this,_mediaController$2,null)}attributeChangedCallback(e,r,s){var o,d,L,ge,Mt;[MediaUIAttributes.MEDIA_PREVIEW_IMAGE,MediaUIAttributes.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===MediaStateReceiverAttributes.MEDIA_CONTROLLER&&(r&&((d=(o=__privateGet$e(this,_mediaController$2))==null?void 0:o.unassociateElement)==null||d.call(o,this),__privateSet$d(this,_mediaController$2,null)),s&&this.isConnected&&(__privateSet$d(this,_mediaController$2,(L=this.getRootNode())==null?void 0:L.getElementById(s)),(Mt=(ge=__privateGet$e(this,_mediaController$2))==null?void 0:ge.associateElement)==null||Mt.call(ge,this)))}get mediaPreviewImage(){return getStringAttr(this,MediaUIAttributes.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){setStringAttr(this,MediaUIAttributes.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){const e=this.getAttribute(MediaUIAttributes.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(r=>+r)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(MediaUIAttributes.MEDIA_PREVIEW_COORDS);return}this.setAttribute(MediaUIAttributes.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){const e=this.mediaPreviewCoords,r=this.mediaPreviewImage;if(!(e&&r))return;const[s,o,d,L]=e,ge=r.split("#")[0],Mt=getComputedStyle(this),{maxWidth:er,maxHeight:tr,minWidth:ir,minHeight:rr}=Mt,nr=Math.min(parseInt(er)/d,parseInt(tr)/L),ar=Math.max(parseInt(ir)/d,parseInt(rr)/L),sr=nr<1,lr=sr?nr:ar>1?ar:1,{style:cr}=getOrInsertCSSRule(this.shadowRoot,":host"),ur=getOrInsertCSSRule(this.shadowRoot,"img").style,or=this.shadowRoot.querySelector("img"),dr=sr?"min":"max";cr.setProperty(`${dr}-width`,"initial","important"),cr.setProperty(`${dr}-height`,"initial","important"),cr.width=`${d*lr}px`,cr.height=`${L*lr}px`;const hr=()=>{ur.width=`${this.imgWidth*lr}px`,ur.height=`${this.imgHeight*lr}px`,ur.display="block"};or.src!==ge&&(or.onload=()=>
3281{this.imgWidth=or.naturalWidth,this.imgHeight=or.naturalHeight,hr()},or.src=ge,hr()),hr(),ur.transform=`translate(-${s*lr}px, -${o*lr}px)`}}_mediaController$2=new WeakMap;GlobalThis.customElements.get("media-preview-thumbnail")||GlobalThis.customElements.define("media-preview-thumbnail",MediaPreviewThumbnail);var __accessCheck$d=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$d=(t,e,r)=>(__accessCheck$d(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$d=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$c=(t,e,r,s)=>(__accessCheck$d(t,e,"write to private field"),e.set(t,r),r),_slot$1;class MediaPreviewTimeDisplay extends MediaTextDisplay{constructor(){super(),__privateAdd$d(this,_slot$1,void 0),__privateSet$c(this,_slot$1,this.shadowRoot.querySelector("slot")),__privateGet$d(this,_slot$1).textContent=formatTime(0)}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_PREVIEW_TIME&&s!=null&&(__privateGet$d(this,_slot$1).textContent=formatTime(s))}get mediaPreviewTime(){return getNumericAttr(this,MediaUIAttributes.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){setNumericAttr(this,MediaUIAttributes.MEDIA_PREVIEW_TIME,e)}}_slot$1=new WeakMap;GlobalThis.customElements.get("media-preview-time-display")||GlobalThis.customElements.define("media-preview-time-display",MediaPreviewTimeDisplay);var __accessCheck$c=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$c=(t,e,r)=>(__accessCheck$c(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$c=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$b=(t,e,r,s)=>(__accessCheck$c(t,e,"write to private field"),e.set(t,r),r),__privateMethod$9=(t,e,r)=>(__accessCheck$c(t,e,"access private method"),r),_renditionList$1,_prevState$3,_render$4,render_fn$4,_onChange$4,onChange_fn$4;class MediaRenditionMenu extends MediaChromeMenu{constructor(){super(...arguments),__privateAdd$c(this,_render$4),__privateAdd$c(this,_onChange$4),__privateAdd$c(this,_renditionList$1,[]),__privateAdd$c(this,_prevState$3,void 0)}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_RENDITION_LIST,MediaUIAttributes.MEDIA_RENDITION_SELECTED,MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE]}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_RENDITION_SELECTED&&r!==s?this.value=s??"auto":e===MediaUIAttributes.MEDIA_RENDITION_LIST&&r!==s&&(__privateSet$b(this,_renditionList$1,parseRenditionList(s)),__privateMethod$9(this,_render$4,render_fn$4).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",__privateMethod$9(this,_onChange$4,onChange_fn$4))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",__privateMethod$9(this,_onChange$4,onChange_fn$4))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:getMediaController(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return __privateGet$c(this,_renditionList$1)}set mediaRenditionList(e){__privateSet$b(this,_renditionList$1,e),__privateMethod$9(this,_render$4,render_fn$4).call(this)}get mediaRenditionSelected(){return getStringAttr(this,MediaUIAttributes.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){setStringAttr(this,MediaUIAttributes.MEDIA_RENDITION_SELECTED,e)}}_renditionList$1=new WeakMap;_prevState$3=new WeakMap;_render$4=new WeakSet;render_fn$4=function(){if(__privateGet$c(this,_prevState$3)===JSON.stringify(this.mediaRenditionList))return;__privateSet$b(this,_prevState$3,JSON.stringify(this.mediaRenditionList));const t=this.mediaRenditionList.sort((s,o)=>o.height-s.height);this.defaultSlot.textContent="";let e=!this.mediaRenditionSelected;for(const s of t){const o=this.formatMenuItemText(`${Math.min(s.width,s.height)}p`,s),d=createMenuItem({type:"radio",text:o,value:`${s.id}`,checked:s.selected&&!e});d.prepend(createIndicator$1(this,"checked-indicator")),this.defaultSlot.append(d)}const r=createMenuItem({type:"radio",text:this.formatMenuItemText("Auto"),value:"auto",checked:e});r.prepend(createIndicator$1(this,"checked-indicator")),this.defaultSlot.append(r)};_onChange$4=new WeakSet;onChange_fn$4=function(){if(this.value==null)return;const t=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};GlobalThis.customElements.get("media-rendition-menu")||GlobalThis.customElements.define("media-rendition-menu",MediaRenditionMenu);const renditionIcon$1=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3282 <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" /> 3283</svg>`,slotTemplate$6=Document$1.createElement("template");slotTemplate$6.innerHTML=` 3284 <slot name="icon">${renditionIcon$1}</slot> 3285`;class MediaRenditionMenuButton extends MediaChromeMenuButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_RENDITION_SELECTED,MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:slotTemplate$6})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",nouns.QUALITY())}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:getMediaController(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return getStringAttr(this,MediaUIAttributes.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){setStringAttr(this,MediaUIAttributes.MEDIA_RENDITION_SELECTED,e)}}GlobalThis.customElements.get("media-rendition-menu-button")||GlobalThis.customElements.define("media-rendition-menu-button",MediaRenditionMenuButton);const Attributes$4={SEEK_OFFSET:"seekoffset"},DEFAULT_SEEK_OFFSET$1=30,backwardIcon=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(2.18 19.87)">${DEFAULT_SEEK_OFFSET$1}</text><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"/></svg>`,slotTemplate$5=Document$1.createElement("template");slotTemplate$5.innerHTML=` 3286 <slot name="icon">${backwardIcon}</slot> 3287`;const DEFAULT_TIME$1=0;class MediaSeekBackwardButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_CURRENT_TIME,Attributes$4.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:slotTemplate$5,...e})}
3287connectedCallback(){this.seekOffset=getNumericAttr(this,Attributes$4.SEEK_OFFSET,DEFAULT_SEEK_OFFSET$1),super.connectedCallback()}attributeChangedCallback(e,r,s){e===Attributes$4.SEEK_OFFSET&&(this.seekOffset=getNumericAttr(this,Attributes$4.SEEK_OFFSET,DEFAULT_SEEK_OFFSET$1)),super.attributeChangedCallback(e,r,s)}get seekOffset(){return getNumericAttr(this,Attributes$4.SEEK_OFFSET,DEFAULT_SEEK_OFFSET$1)}set seekOffset(e){setNumericAttr(this,Attributes$4.SEEK_OFFSET,e),this.setAttribute("aria-label",verbs.SEEK_BACK_N_SECS({seekOffset:this.seekOffset})),updateIconText(getSlotted(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return getNumericAttr(this,MediaUIAttributes.MEDIA_CURRENT_TIME,DEFAULT_TIME$1)}set mediaCurrentTime(e){setNumericAttr(this,MediaUIAttributes.MEDIA_CURRENT_TIME,e)}handleClick(){const e=Math.max(this.mediaCurrentTime-this.seekOffset,0),r=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(r)}}GlobalThis.customElements.get("media-seek-backward-button")||GlobalThis.customElements.define("media-seek-backward-button",MediaSeekBackwardButton);const Attributes$3={SEEK_OFFSET:"seekoffset"},DEFAULT_SEEK_OFFSET=30,forwardIcon=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(8.9 19.87)">${DEFAULT_SEEK_OFFSET}</text><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"/></svg>`,slotTemplate$4=Document$1.createElement("template");slotTemplate$4.innerHTML=` 3288 <slot name="icon">${forwardIcon}</slot> 3289`;const DEFAULT_TIME=0;class MediaSeekForwardButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_CURRENT_TIME,Attributes$3.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:slotTemplate$4,...e})}connectedCallback(){this.seekOffset=getNumericAttr(this,Attributes$3.SEEK_OFFSET,DEFAULT_SEEK_OFFSET),super.connectedCallback()}attributeChangedCallback(e,r,s){e===Attributes$3.SEEK_OFFSET&&(this.seekOffset=getNumericAttr(this,Attributes$3.SEEK_OFFSET,DEFAULT_SEEK_OFFSET)),super.attributeChangedCallback(e,r,s)}get seekOffset(){return getNumericAttr(this,Attributes$3.SEEK_OFFSET,DEFAULT_SEEK_OFFSET)}set seekOffset(e){setNumericAttr(this,Attributes$3.SEEK_OFFSET,e),this.setAttribute("aria-label",verbs.SEEK_FORWARD_N_SECS({seekOffset:this.seekOffset})),updateIconText(getSlotted(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return getNumericAttr(this,MediaUIAttributes.MEDIA_CURRENT_TIME,DEFAULT_TIME)}set mediaCurrentTime(e){setNumericAttr(this,MediaUIAttributes.MEDIA_CURRENT_TIME,e)}handleClick(){const e=this.mediaCurrentTime+this.seekOffset,r=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(r)}}GlobalThis.customElements.get("media-seek-forward-button")||GlobalThis.customElements.define("media-seek-forward-button",MediaSeekForwardButton);var __defProp$3=Object.defineProperty,__defNormalProp$3=(t,e,r)=>e in t?__defProp$3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$3=(t,e,r)=>(__defNormalProp$3(t,e+"",r),r);const template$5=Document$1.createElement("template");template$5.innerHTML=MediaChromeMenu.template.innerHTML+` 3290 <style> 3291 :host { 3292 background: var(--media-settings-menu-background, 3293 var(--media-menu-background, 3294 var(--media-control-background, 3295 var(--media-secondary-color, rgb(20 20 30 / .8))))); 3296 min-width: var(--media-settings-menu-min-width, 160px); 3297 border-radius: 2px 2px 0 0; 3298 overflow: hidden; 3299 } 3300 3301 :host([role="menu"]) { 3302 3303 justify-content: end; 3304 } 3305 3306 slot:not([name]) { 3307 justify-content: var(--media-settings-menu-justify-content); 3308 flex-direction: var(--media-settings-menu-flex-direction, column); 3309 overflow: visible; 3310 } 3311 3312 #container.has-expanded { 3313 --media-settings-menu-item-opacity: 0; 3314 } 3315 </style> 3316`;class MediaSettingsMenu extends MediaChromeMenu{get anchorElement(){return this.anchor!=="auto"?super.anchorElement:getMediaController(this).querySelector("media-settings-menu-button")}}__publicField$3(MediaSettingsMenu,"template",template$5);GlobalThis.customElements.get("media-settings-menu")||GlobalThis.customElements.define("media-settings-menu",MediaSettingsMenu);const slotTemplate$3=Document$1.createElement("template");slotTemplate$3.innerHTML=` 3317 <slot name="icon"> 3318 <svg aria-hidden="true" viewBox="0 0 24 24"> 3319 <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"/> 3320 </svg> 3321 </slot> 3322`;class MediaSettingsMenuButton extends MediaChromeMenuButton{static get observedAttributes(){return[...super.observedAttributes,"target"]}constructor(){super({slotTemplate:slotTemplate$3})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",nouns.SETTINGS())}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:getMediaController(this).querySelector("media-settings-menu")}}GlobalThis.customElements.get("media-settings-menu-button")||GlobalThis.customElements.define("media-settings-menu-button",MediaSettingsMenuButton);var __defProp$2=Object.defineProperty,__defNormalProp$2=(t,e,r)=>e in t?__defProp$2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$2=(t,e,r)=>(__defNormalProp$2(t,e+"",r),r),_a;const template$4=Document$1.createElement("template");template$4.innerHTML=MediaChromeMenuItem.template.innerHTML+` 3323 <style> 3324 slot:not([name="submenu"]) { 3325 opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity)); 3326 } 3327 3328 :host([aria-expanded="true"]:hover) { 3329 background: transparent; 3330 } 3331 </style> 3332`;(_a=template$4.content)!=null&&_a.querySelector&&(template$4.content.querySelector('slot[name="suffix"]').innerHTML=` 3333 <svg aria-hidden="true" viewBox="0 0 20 24"> 3334 <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"/> 3335 </svg> 3336 `);class MediaSettingsMenuItem extends MediaChromeMenuItem{}__publicField$2(MediaSettingsMenuItem,"template",template$4);GlobalThis.customElements.get("media-settings-menu-item")||GlobalThis.customElements.define("media-settings-menu-item",MediaSettingsMenuItem);var __accessCheck$b=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$b=(t,e,r)=>(__accessCheck$b(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$b=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$a=(t,e,r,s)=>(__accessCheck$b(t,e,"write to private field"),e.set(t,r),r),_slot;const Attributes$2={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},CombinedAttributes=[...Object.values(Attributes$2),MediaUIAttributes.MEDIA_CURRENT_TIME,MediaUIAttributes.MEDIA_DURATION,MediaUIAttributes.MEDIA_SEEKABLE],ButtonPressedKeys=["Enter"," "],DEFAULT_TIMES_SEP=" / ",formatTimesLabel=(t,{timesSep:e=DEFAULT_TIMES_SEP}={})=>{var r,s;const o=t.hasAttribute(Attributes$2.REMAINING),d=t.hasAttribute(Attributes$2.SHOW_DURATION),L=(r=t.mediaCurrentTime)!=null?r:0,[,ge]=(s=t.mediaSeekable)!=null?s:[];let Mt=0;Number.isFinite(t.mediaDuration)?Mt=t.mediaDuration:Number.isFinite(ge)&&(Mt=ge);const er=formatTime(o?0-(Mt-L):L);return d?`${er}${e}${formatTime(Mt)}`:er},DEFAULT_MISSING_TIME_PHRASE$1="video not loaded, unknown time.",updateAriaValueText$1=t=>{var e;const r=t.mediaCurrentTime,[,s]=(e=t.mediaSeekable)!=null?e:[];let o=null;if(Number.isFinite(t.mediaDuration)?o=t.mediaDuration:Number.isFinite(s)&&(o=s),r==null||o===null){t.setAttribute("aria-valuetext",DEFAULT_MISSING_TIME_PHRASE$1);return}const d=t.hasAttribute(Attributes$2.REMAINING),L=t.hasAttribute(Attributes$2.SHOW_DURATION),ge=formatAsTimePhrase(d?0-(o-r):r);if(!L){t.setAttribute("aria-valuetext",ge);return}const Mt=formatAsTimePhrase(o),er=`${ge} of ${Mt}`;t.setAttribute("aria-valuetext",er)};class MediaTimeDisplay extends MediaTextDisplay{constructor(){super(),__privateAdd$b(this,_slot,void 0),__privateSet$a(this,_slot,this.shadowRoot.querySelector("slot")),__privateGet$b(this,_slot).innerHTML=`${formatTimesLabel(this)}`}static get observedAttributes(){return[...super.observedAttributes,...CombinedAttributes,"disabled"]}connectedCallback(){const{style:e}=getOrInsertCSSRule(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","pointer"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",nouns.PLAYBACK_TIME());const r=s=>{const{key:o}=s;if(!ButtonPressedKeys.includes(o)){this.removeEventListener("keyup",r);return}this.toggleTimeDisplay()};this.addEventListener("keydown",s=>{const{metaKey:o,altKey:d,key:L}=s;if(o||d||!ButtonPressedKeys.includes(L)){this.removeEventListener("keyup",r);return}this.addEventListener("keyup",r)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,r,s){CombinedAttributes.includes(e)?this.update():e==="disabled"&&s!==r&&(s==null?this.enable():this.disable()),super.attributeChangedCallback(e,r,s)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return getBooleanAttr(this,Attributes$2.REMAINING)}set remaining(e){setBooleanAttr(this,Attributes$2.REMAINING,e)}get showDuration(){return getBooleanAttr(this,Attributes$2.SHOW_DURATION)}set showDuration(e){setBooleanAttr(this,Attributes$2.SHOW_DURATION,e)}get noToggle(){return getBooleanAttr(this,Attributes$2.NO_TOGGLE)}set noToggle(e){setBooleanAttr(this,Attributes$2.NO_TOGGLE,e)}get mediaDuration(){return getNumericAttr(this,MediaUIAttributes.MEDIA_DURATION)}set mediaDuration(e){setNumericAttr(this,MediaUIAttributes.MEDIA_DURATION,e)}get mediaCurrentTime(){return getNumericAttr(this,MediaUIAttributes.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){setNumericAttr(this,MediaUIAttributes.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){const e=this.getAttribute(MediaUIAttributes.MEDIA_SEEKABLE);if(e)return e.split(":").map(r=>+r)}set mediaSeekable(e){if(e==null){this.removeAttribute(MediaUIAttributes.MEDIA_SEEKABLE);return}this.setAttribute(MediaUIAttributes.MEDIA_SEEKABLE,e.join(":"))}update(){const e=formatTimesLabel(this);updateAriaValueText$1(this),e!==__privateGet$b(this,_slot).innerHTML&&(__privateGet$b(this,_slot).innerHTML=e)}}_slot=new WeakMap;GlobalThis.customElements.get("media-time-display")||GlobalThis.customElements.define("media-time-display",MediaTimeDisplay);var __accessCheck$a=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$a=(t,e,r)=>(__accessCheck$a(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$a=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$9=(t,e,r,s)=>(__accessCheck$a(t,e,"write to private field"),e.set(t,r),r),__privateWrapper=(t,e,r,s)=>({set _(o){__privateSet$9(t,e,o)},get _(){return __privateGet$a(t,e,s)}}),_range,_startTime,_previousTime,_deltaTime,_frameCount,_updateTimestamp,_updateStartValue,_lastRangeIncrease,_id,_animate;class RangeAnimation{constructor(e,r,s){__privateAdd$a(this,_range,void 0),__privateAdd$a(this,_startTime,void 0),__privateAdd$a(this,_previousTime,void 0),__privateAdd$a(this,_deltaT
vendor: 5,726 bytes, lines 3336-3406
3336ime,void 0),__privateAdd$a(this,_frameCount,void 0),__privateAdd$a(this,_updateTimestamp,void 0),__privateAdd$a(this,_updateStartValue,void 0),__privateAdd$a(this,_lastRangeIncrease,void 0),__privateAdd$a(this,_id,0),__privateAdd$a(this,_animate,(o=performance.now())=>{__privateSet$9(this,_id,requestAnimationFrame(__privateGet$a(this,_animate))),__privateSet$9(this,_deltaTime,performance.now()-__privateGet$a(this,_previousTime));const d=1e3/this.fps;if(__privateGet$a(this,_deltaTime)>d){__privateSet$9(this,_previousTime,o-__privateGet$a(this,_deltaTime)%d);const L=1e3/((o-__privateGet$a(this,_startTime))/++__privateWrapper(this,_frameCount)._),ge=(o-__privateGet$a(this,_updateTimestamp))/1e3/this.duration;let Mt=__privateGet$a(this,_updateStartValue)+ge*this.playbackRate;Mt-__privateGet$a(this,_range).valueAsNumber>0?__privateSet$9(this,_lastRangeIncrease,this.playbackRate/this.duration/L):(__privateSet$9(this,_lastRangeIncrease,.995*__privateGet$a(this,_lastRangeIncrease)),Mt=__privateGet$a(this,_range).valueAsNumber+__privateGet$a(this,_lastRangeIncrease)),this.callback(Mt)}}),__privateSet$9(this,_range,e),this.callback=r,this.fps=s}start(){__privateGet$a(this,_id)===0&&(__privateSet$9(this,_previousTime,performance.now()),__privateSet$9(this,_startTime,__privateGet$a(this,_previousTime)),__privateSet$9(this,_frameCount,0),__privateGet$a(this,_animate).call(this))}stop(){__privateGet$a(this,_id)!==0&&(cancelAnimationFrame(__privateGet$a(this,_id)),__privateSet$9(this,_id,0))}update({start:e,duration:r,playbackRate:s}){const o=e-__privateGet$a(this,_range).valueAsNumber,d=Math.abs(r-this.duration);(o>0||o<-.03||d>=.5)&&this.callback(e),__privateSet$9(this,_updateStartValue,e),__privateSet$9(this,_updateTimestamp,performance.now()),this.duration=r,this.playbackRate=s}}_range=new WeakMap;_startTime=new WeakMap;_previousTime=new WeakMap;_deltaTime=new WeakMap;_frameCount=new WeakMap;_updateTimestamp=new WeakMap;_updateStartValue=new WeakMap;_lastRangeIncrease=new WeakMap;_id=new WeakMap;_animate=new WeakMap;var __accessCheck$9=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$9=(t,e,r)=>(__accessCheck$9(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$9=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$8=(t,e,r,s)=>(__accessCheck$9(t,e,"write to private field"),e.set(t,r),r),__privateMethod$8=(t,e,r)=>(__accessCheck$9(t,e,"access private method"),r),_rootNode,_animation,_boxes,_previewTime,_previewBox,_currentBox,_boxPaddingLeft,_boxPaddingRight,_mediaChaptersCues,_toggleRangeAnimation,toggleRangeAnimation_fn,_shouldRangeAnimate,shouldRangeAnimate_fn,_updateRange,_getElementRects,getElementRects_fn,_getBoxPosition,getBoxPosition_fn,_getBoxShiftPosition,getBoxShiftPosition_fn,_handlePointerMove,handlePointerMove_fn,_previewRequest,previewRequest_fn,_seekRequest,seekRequest_fn;const DEFAULT_MISSING_TIME_PHRASE="video not loaded, unknown time.",updateAriaValueText=t=>{const e=t.range,r=formatAsTimePhrase(+calcTimeFromRangeValue(t)),s=formatAsTimePhrase(+t.mediaSeekableEnd),o=r&&s?`${r} of ${s}`:DEFAULT_MISSING_TIME_PHRASE;e.setAttribute("aria-valuetext",o)},template$3=Document$1.createElement("template");template$3.innerHTML=` 3337 <style> 3338 :host { 3339 --media-box-border-radius: 4px; 3340 --media-box-padding-left: 10px; 3341 --media-box-padding-right: 10px; 3342 --media-preview-border-radius: var(--media-box-border-radius); 3343 --media-box-arrow-offset: var(--media-box-border-radius); 3344 --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 3345 --_preview-background: var(--media-preview-background, var(--_control-background)); 3346 3347 3348 contain: layout; 3349 } 3350 3351 #highlight { 3352 background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4)); 3353 } 3354 3355 #preview-rail, 3356 #current-rail { 3357 width: 100%; 3358 position: absolute; 3359 left: 0; 3360 bottom: 100%; 3361 pointer-events: none; 3362 will-change: transform; 3363 } 3364 3365 [part~="box"] { 3366 width: min-content; 3367 3368 position: absolute; 3369 bottom: 100%; 3370 flex-direction: column; 3371 align-items: center; 3372 transform: translateX(-50%); 3373 } 3374 3375 [part~="current-box"] { 3376 display: var(--media-current-box-display, var(--media-box-display, flex)); 3377 margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px)); 3378 visibility: hidden; 3379 } 3380 3381 [part~="preview-box"] { 3382 display: var(--media-preview-box-display, var(--media-box-display, flex)); 3383 margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px)); 3384 transition-property: var(--media-preview-transition-property, visibility, opacity); 3385 transition-duration: var(--media-preview-transition-duration-out, .25s); 3386 transition-delay: var(--media-preview-transition-delay-out, 0s); 3387 visibility: hidden; 3388 opacity: 0; 3389 } 3390 3391 :host(:is([${MediaUIAttributes.MEDIA_PREVIEW_IMAGE}], [${MediaUIAttributes.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] { 3392 transition-duration: var(--media-preview-transition-duration-in, .5s); 3393 transition-delay: var(--media-preview-transition-delay-in, .25s); 3394 visibility: visible; 3395 opacity: 1; 3396 } 3397 3398 @media (hover: hover) { 3399 :host(:is([${MediaUIAttributes.MEDIA_PREVIEW_IMAGE}], [${MediaUIAttributes.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] { 3400 transition-duration: var(--media-preview-transition-duration-in, .5s); 3401 transition-delay: var(--media-preview-transition-delay-in, .25s); 3402 visibility: visible; 3403 opacity: 1; 3404 } 3405 } 3406
3407 media-preview-thumbnail, 3408 ::slotted(media-preview-thumbnail) { 3409 visibility: hidden; 3410 3411 transition: visibility 0s .25s; 3412 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 3413 background: var(--media-preview-thumbnail-background, var(--_preview-background)); 3414 box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2)); 3415 max-width: var(--media-preview-thumbnail-max-width, 180px); 3416 max-height: var(--media-preview-thumbnail-max-height, 160px); 3417 min-width: var(--media-preview-thumbnail-min-width, 120px); 3418 min-height: var(--media-preview-thumbnail-min-height, 80px); 3419 border: var(--media-preview-thumbnail-border); 3420 border-radius: var(--media-preview-thumbnail-border-radius, 3421 var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0); 3422 } 3423 3424 :host([${MediaUIAttributes.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail, 3425 :host([${MediaUIAttributes.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) { 3426 transition-delay: var(--media-preview-transition-delay-in, .25s); 3427 visibility: visible; 3428 } 3429 3430 @media (hover: hover) { 3431 :host([${MediaUIAttributes.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail, 3432 :host([${MediaUIAttributes.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) { 3433 transition-delay: var(--media-preview-transition-delay-in, .25s); 3434 visibility: visible; 3435 } 3436 3437 :host([${MediaUIAttributes.MEDIA_PREVIEW_TIME}]:hover) { 3438 --media-time-range-hover-display: block; 3439 } 3440 } 3441 3442 media-preview-chapter-display, 3443 ::slotted(media-preview-chapter-display) { 3444 font-size: var(--media-font-size, 13px); 3445 line-height: 17px; 3446 min-width: 0; 3447 visibility: hidden; 3448 3449 transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s; 3450 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 3451 background: var(--media-preview-chapter-background, var(--_preview-background)); 3452 border-radius: var(--media-preview-chapter-border-radius, 3453 var(--media-preview-border-radius) var(--media-preview-border-radius) 3454 var(--media-preview-border-radius) var(--media-preview-border-radius)); 3455 padding: var(--media-preview-chapter-padding, 3.5px 9px); 3456 margin: var(--media-preview-chapter-margin, 0 0 5px); 3457 text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 3458 } 3459 3460 :host([${MediaUIAttributes.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display, 3461 :host([${MediaUIAttributes.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) { 3462 transition-delay: var(--media-preview-transition-delay-in, .25s); 3463 border-radius: var(--media-preview-chapter-border-radius, 0); 3464 padding: var(--media-preview-chapter-padding, 3.5px 9px 0); 3465 margin: var(--media-preview-chapter-margin, 0); 3466 min-width: 100%; 3467 } 3468 3469 media-preview-chapter-display[${MediaUIAttributes.MEDIA_PREVIEW_CHAPTER}], 3470 ::slotted(media-preview-chapter-display[${MediaUIAttributes.MEDIA_PREVIEW_CHAPTER}]) { 3471 visibility: visible; 3472 } 3473 3474 media-preview-chapter-display:not([aria-valuetext]), 3475 ::slotted(media-preview-chapter-display:not([aria-valuetext])) { 3476 display: none; 3477 } 3478 3479 media-preview-time-display, 3480 ::slotted(media-preview-time-display), 3481 media-time-display, 3482 ::slotted(media-time-display) { 3483 font-size: var(--media-font-size, 13px); 3484 line-height: 17px; 3485 min-width: 0; 3486 3487 transition: min-width 0s, border-radius 0s; 3488 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 3489 background: var(--media-preview-time-background, var(--_preview-background)); 3490 border-radius: var(--media-preview-time-border-radius, 3491 var(--media-preview-border-radius) var(--media-preview-border-radius) 3492 var(--media-preview-border-radius) var(--media-preview-border-radius)); 3493 padding: var(--media-preview-time-padding, 3.5px 9px); 3494 margin: var(--media-preview-time-margin, 0); 3495 text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 3496 transform: translateX(min( 3497 max(calc(50% - var(--_box-width) / 2), 3498 calc(var(--_box-shift, 0))), 3499 calc(var(--_box-width) / 2 - 50%) 3500 )); 3501 } 3502 3503 :host([${MediaUIAttributes.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display, 3504 :host([${MediaUIAttributes.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) { 3505 transition-delay: var(--media-preview-transition-delay-in, .25s); 3506 border-radius: var(--media-preview-time-border-radius, 3507 0 0 var(--media-preview-border-radius) var(--media-preview-border-radius)); 3508 min-width: 100%; 3509 transform: translateX(0); 3510 } 3511 3512 :host([${MediaUIAttributes.MEDIA_PREVIEW_TIME}]:hover) { 3513 --media-time-range-hover-display: block; 3514 } 3515 3516 [part~="arrow"], 3517 ::slotted([part~="arrow"]) { 3518 display: var(--media-box-arrow-display, inline-block); 3519 transform: translateX(min( 3520 max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)), 3521 calc(var(--_box-shift, 0))), 3522 calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset)) 3523 )); 3524 3525 border-color: transparent; 3526 border-top-color: var(--media-box-arrow-background, var(--_control-background)); 3527 border-width: var(--media-box-arrow-border-width, 3528 var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0); 3529 border-style: solid; 3530 justify-content: center; 3531 height: 0; 3532 } 3533 </style> 3534 <div id="preview-rail"> 3535 <slot name="preview" part="box preview-box">
3536 <media-preview-thumbnail></media-preview-thumbnail> 3537 <media-preview-chapter-display></media-preview-chapter-display> 3538 <media-preview-time-display></media-preview-time-display> 3539 <slot name="preview-arrow"><div part="arrow"></div></slot> 3540 </slot> 3541 </div> 3542 <div id="current-rail"> 3543 <slot name="current" part="box current-box"> 3544 3545 </slot> 3546 </div> 3547`;const calcRangeValueFromTime=(t,e=t.mediaCurrentTime)=>{const r=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,s=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;if(Number.isNaN(s))return 0;const o=(e-r)/(s-r);return Math.max(0,Math.min(o,1))},calcTimeFromRangeValue=(t,e=t.range.valueAsNumber)=>{const r=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,s=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;return Number.isNaN(s)?0:e*(s-r)+r};class MediaTimeRange extends MediaChromeRange{constructor(){super(),__privateAdd$9(this,_toggleRangeAnimation),__privateAdd$9(this,_shouldRangeAnimate),__privateAdd$9(this,_getElementRects),__privateAdd$9(this,_getBoxPosition),__privateAdd$9(this,_getBoxShiftPosition),__privateAdd$9(this,_handlePointerMove),__privateAdd$9(this,_previewRequest),__privateAdd$9(this,_seekRequest),__privateAdd$9(this,_rootNode,void 0),__privateAdd$9(this,_animation,void 0),__privateAdd$9(this,_boxes,void 0),__privateAdd$9(this,_previewTime,void 0),__privateAdd$9(this,_previewBox,void 0),__privateAdd$9(this,_currentBox,void 0),__privateAdd$9(this,_boxPaddingLeft,void 0),__privateAdd$9(this,_boxPaddingRight,void 0),__privateAdd$9(this,_mediaChaptersCues,void 0),__privateAdd$9(this,_updateRange,r=>{this.dragging||(this.range.valueAsNumber=r,this.updateBar())}),this.container.appendChild(template$3.content.cloneNode(!0)),__privateSet$8(this,_boxes,this.shadowRoot.querySelectorAll('[part~="box"]')),__privateSet$8(this,_previewBox,this.shadowRoot.querySelector('[part~="preview-box"]')),__privateSet$8(this,_currentBox,this.shadowRoot.querySelector('[part~="current-box"]'));const e=getComputedStyle(this);__privateSet$8(this,_boxPaddingLeft,parseInt(e.getPropertyValue("--media-box-padding-left"))),__privateSet$8(this,_boxPaddingRight,parseInt(e.getPropertyValue("--media-box-padding-right"))),__privateSet$8(this,_animation,new RangeAnimation(this.range,__privateGet$9(this,_updateRange),60))}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_PAUSED,MediaUIAttributes.MEDIA_DURATION,MediaUIAttributes.MEDIA_SEEKABLE,MediaUIAttributes.MEDIA_CURRENT_TIME,MediaUIAttributes.MEDIA_PREVIEW_IMAGE,MediaUIAttributes.MEDIA_PREVIEW_TIME,MediaUIAttributes.MEDIA_PREVIEW_CHAPTER,MediaUIAttributes.MEDIA_BUFFERED,MediaUIAttributes.MEDIA_PLAYBACK_RATE,MediaUIAttributes.MEDIA_LOADING,MediaUIAttributes.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",nouns.SEEK()),__privateMethod$8(this,_toggleRangeAnimation,toggleRangeAnimation_fn).call(this),__privateSet$8(this,_rootNode,this.getRootNode()),(e=__privateGet$9(this,_rootNode))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),__privateMethod$8(this,_toggleRangeAnimation,toggleRangeAnimation_fn).call(this),(e=__privateGet$9(this,_rootNode))==null||e.removeEventListener("transitionstart",this),__privateSet$8(this,_rootNode,null)}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),r!=s&&(e===MediaUIAttributes.MEDIA_CURRENT_TIME||e===MediaUIAttributes.MEDIA_PAUSED||e===MediaUIAttributes.MEDIA_ENDED||e===MediaUIAttributes.MEDIA_LOADING||e===MediaUIAttributes.MEDIA_DURATION||e===MediaUIAttributes.MEDIA_SEEKABLE?(__privateGet$9(this,_animation).update({start:calcRangeValueFromTime(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),__privateMethod$8(this,_toggleRangeAnimation,toggleRangeAnimation_fn).call(this),updateAriaValueText(this)):e===MediaUIAttributes.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===MediaUIAttributes.MEDIA_DURATION||e===MediaUIAttributes.MEDIA_SEEKABLE)&&(this.mediaChapter
3547sCues=__privateGet$9(this,_mediaChaptersCues),this.updateBar()))}get mediaChaptersCues(){return __privateGet$9(this,_mediaChaptersCues)}set mediaChaptersCues(e){var r;__privateSet$8(this,_mediaChaptersCues,e),this.updateSegments((r=__privateGet$9(this,_mediaChaptersCues))==null?void 0:r.map(s=>({start:calcRangeValueFromTime(this,s.startTime),end:calcRangeValueFromTime(this,s.endTime)})))}get mediaPaused(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_PAUSED)}set mediaPaused(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_PAUSED,e)}get mediaLoading(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_LOADING)}set mediaLoading(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_LOADING,e)}get mediaDuration(){return getNumericAttr(this,MediaUIAttributes.MEDIA_DURATION)}set mediaDuration(e){setNumericAttr(this,MediaUIAttributes.MEDIA_DURATION,e)}get mediaCurrentTime(){return getNumericAttr(this,MediaUIAttributes.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){setNumericAttr(this,MediaUIAttributes.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return getNumericAttr(this,MediaUIAttributes.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){setNumericAttr(this,MediaUIAttributes.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){const e=this.getAttribute(MediaUIAttributes.MEDIA_BUFFERED);return e?e.split(" ").map(r=>r.split(":").map(s=>+s)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(MediaUIAttributes.MEDIA_BUFFERED);return}const r=e.map(s=>s.join(":")).join(" ");this.setAttribute(MediaUIAttributes.MEDIA_BUFFERED,r)}get mediaSeekable(){const e=this.getAttribute(MediaUIAttributes.MEDIA_SEEKABLE);if(e)return e.split(":").map(r=>+r)}set mediaSeekable(e){if(e==null){this.removeAttribute(MediaUIAttributes.MEDIA_SEEKABLE);return}this.setAttribute(MediaUIAttributes.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;const[,r=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return r}get mediaSeekableStart(){var e;const[r=0]=(e=this.mediaSeekable)!=null?e:[];return r}get mediaPreviewImage(){return getStringAttr(this,MediaUIAttributes.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){setStringAttr(this,MediaUIAttributes.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return getNumericAttr(this,MediaUIAttributes.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){setNumericAttr(this,MediaUIAttributes.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_ENDED)}set mediaEnded(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;const r=this.mediaBuffered;if(!r.length)return;let s;if(this.mediaEnded)s=1;else{const d=this.mediaCurrentTime,[,L=this.mediaSeekableStart]=(e=r.find(([ge,Mt])=>ge<=d&&d<=Mt))!=null?e:[];s=calcRangeValueFromTime(this,L)}const{style:o}=getOrInsertCSSRule(this.shadowRoot,"#highlight");o.setProperty("width",`${s*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;const r=getOrInsertCSSRule(this.shadowRoot,"#current-rail"),s=getOrInsertCSSRule(this.shadowRoot,'[part~="current-box"]'),o=__privateMethod$8(this,_getElementRects,getElementRects_fn).call(this,__privateGet$9(this,_currentBox)),d=__privateMethod$8(this,_getBoxPosition,getBoxPosition_fn).call(this,o,this.range.valueAsNumber),L=__privateMethod$8(this,_getBoxShiftPosition,getBoxShiftPosition_fn).call(this,o,this.range.valueAsNumber);r.style.transform=`translateX(${d})`,r.style.setProperty("--_range-width",`${o.range.width}`),s.style.setProperty("--_box-shift",`${L}`),s.style.setProperty("--_box-width",`${o.box.width}px`),s.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":__privateMethod$8(this,_seekRequest,seekRequest_fn).call(this);break;case"pointermove":__privateMethod$8(this,_handlePointerMove,handlePointerMove_fn).call(this,e);break;case"pointerup":case"pointerleave":__privateMethod$8(this,_previewRequest,previewRequest_fn).call(this,null);break;case"transitionstart":containsComposedNode(e.target,this)&&setTimeout(()=>__privateMethod$8(this,_toggleRangeAnimation,toggleRangeAnimation_fn).call(this),0
3547);break}}}_rootNode=new WeakMap;_animation=new WeakMap;_boxes=new WeakMap;_previewTime=new WeakMap;_previewBox=new WeakMap;_currentBox=new WeakMap;_boxPaddingLeft=new WeakMap;_boxPaddingRight=new WeakMap;_mediaChaptersCues=new WeakMap;_toggleRangeAnimation=new WeakSet;toggleRangeAnimation_fn=function(){__privateMethod$8(this,_shouldRangeAnimate,shouldRangeAnimate_fn).call(this)?__privateGet$9(this,_animation).start():__privateGet$9(this,_animation).stop()};_shouldRangeAnimate=new WeakSet;shouldRangeAnimate_fn=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&isElementVisible(this)};_updateRange=new WeakMap;_getElementRects=new WeakSet;getElementRects_fn=function(t){var e;const s=((e=this.getAttribute("bounds")?closestComposedNode(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),o=this.range.getBoundingClientRect(),d=t.offsetWidth,L=-(o.left-s.left-d/2),ge=s.right-o.left-d/2;return{box:{width:d,min:L,max:ge},bounds:s,range:o}};_getBoxPosition=new WeakSet;getBoxPosition_fn=function(t,e){let r=`${e*100}%`;const{width:s,min:o,max:d}=t.box;if(!s)return r;if(Number.isNaN(o)||(r=`max(${`calc(1 / var(--_range-width) * 100 * ${o}% + var(--media-box-padding-left))`}, ${r})`),!Number.isNaN(d)){const ge=`calc(1 / var(--_range-width) * 100 * ${d}% - var(--media-box-padding-right))`;r=`min(${r}, ${ge})`}return r};_getBoxShiftPosition=new WeakSet;getBoxShiftPosition_fn=function(t,e){const{width:r,min:s,max:o}=t.box,d=e*t.range.width;if(d<s+__privateGet$9(this,_boxPaddingLeft)){const L=t.range.left-t.bounds.left-__privateGet$9(this,_boxPaddingLeft);return`${d-r/2+L}px`}if(d>o-__privateGet$9(this,_boxPaddingRight)){const L=t.bounds.right-t.range.right-__privateGet$9(this,_boxPaddingRight);return`${d+r/2-L-t.range.width}px`}return 0};_handlePointerMove=new WeakSet;handlePointerMove_fn=function(t){const e=[...__privateGet$9(this,_boxes)].some(tr=>t.composedPath().includes(tr));if(!this.dragging&&(e||!t.composedPath().includes(this))){__privateMethod$8(this,_previewRequest,previewRequest_fn).call(this,null);return}const r=this.mediaSeekableEnd;if(!r)return;const s=getOrInsertCSSRule(this.shadowRoot,"#preview-rail"),o=getOrInsertCSSRule(this.shadowRoot,'[part~="preview-box"]'),d=__privateMethod$8(this,_getElementRects,getElementRects_fn).call(this,__privateGet$9(this,_previewBox));let L=(t.clientX-d.range.left)/d.range.width;L=Math.max(0,Math.min(1,L));const ge=__privateMethod$8(this,_getBoxPosition,getBoxPosition_fn).call(this,d,L),Mt=__privateMethod$8(this,_getBoxShiftPosition,getBoxShiftPosition_fn).call(this,d,L);s.style.transform=`translateX(${ge})`,s.style.setProperty("--_range-width",`${d.range.width}`),o.style.setProperty("--_box-shift",`${Mt}`),o.style.setProperty("--_box-width",`${d.box.width}px`);const er=Math.round(__privateGet$9(this,_previewTime))-Math.round(L*r);Math.abs(er)<1&&L>.01&&L<.99||(__privateSet$8(this,_previewTime,L*r),__privateMethod$8(this,_previewRequest,previewRequest_fn).call(this,__privateGet$9(this,_previewTime)))};_previewRequest=new WeakSet;previewRequest_fn=function(t){this.dispatchEvent(new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))};_seekRequest=new WeakSet;seekRequest_fn=function(){__privateGet$9(this,_animation).stop();const t=calcTimeFromRangeValue(this);this.dispatchEvent(new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))};GlobalThis.customElements.get("media-time-range")||GlobalThis.customElements.define("media-time-range",MediaTimeRange);const DEFAULT_VOLUME=1,toVolume=t=>t.mediaMuted?0:t.mediaVolume,formatAsPercentString=({value:t})=>`${Math.round(t*100)}%`;class MediaVolumeRange extends MediaChromeRange{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_VOLUME,MediaUIAttributes.MEDIA_MUTED,MediaUIAttributes.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{const e=this.range.value,r=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(r)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",nouns.VOLUME())}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),(e===MediaUIAttributes.MEDIA_VOLUME||e===MediaUIAttributes.MEDIA_MUTED)&&(this.range.valueAsNumber=toVolume(this),this.range.setAttribute("aria-valuetext",formatAsPercentStr
3547ing(this.range)),this.updateBar())}get mediaVolume(){return getNumericAttr(this,MediaUIAttributes.MEDIA_VOLUME,DEFAULT_VOLUME)}set mediaVolume(e){setNumericAttr(this,MediaUIAttributes.MEDIA_VOLUME,e)}get mediaMuted(){return getBooleanAttr(this,MediaUIAttributes.MEDIA_MUTED)}set mediaMuted(e){setBooleanAttr(this,MediaUIAttributes.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return getStringAttr(this,MediaUIAttributes.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){setStringAttr(this,MediaUIAttributes.MEDIA_VOLUME_UNAVAILABLE,e)}}GlobalThis.customElements.get("media-volume-range")||GlobalThis.customElements.define("media-volume-range",MediaVolumeRange);var __accessCheck$8=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$8=(t,e,r)=>(__accessCheck$8(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$8=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$7=(t,e,r,s)=>(__accessCheck$8(t,e,"write to private field"),e.set(t,r),r),__privateMethod$7=(t,e,r)=>(__accessCheck$8(t,e,"access private method"),r),_mediaController$1,_keysSoFar,_clearKeysTimeout,_metaPressed,_clickListener,_handleKeyListener,handleKeyListener_fn,_keyupListener$1,_keydownListener$1,_updateLayoutStyle,updateLayoutStyle_fn,_getOption,getOption_fn,_selectOption,selectOption_fn,_searchOption,searchOption_fn,_clearKeysOnDelay,clearKeysOnDelay_fn;const checkIcon=` 3548<svg aria-hidden="true" viewBox="0 1 24 24" part="select-indicator indicator"> 3549 <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"/> 3550</svg>`;function createOption(t,e,r){const s=Document$1.createElement("media-chrome-option");s.part.add("option"),s.value=e,s.selected=r;const o=Document$1.createElement("span");return o.textContent=t,s.append(o),s}function createIndicator(t,e){let r=t.querySelector(`:scope > [slot="${e}"]`);return(r==null?void 0:r.nodeName)=="SLOT"&&(r=r.assignedElements({flatten:!0})[0]),r?(r=r.cloneNode(!0),r.removeAttribute("slot"),r):t.shadowRoot.querySelector(`[name="${e}"] > svg`).cloneNode(!0)}const template$2=Document$1.createElement("template");template$2.innerHTML=` 3551<style> 3552 :host { 3553 font: var(--media-font, 3554 var(--media-font-weight, normal) 3555 var(--media-font-size, 15px) / 3556 var(--media-text-content-height, var(--media-control-height, 24px)) 3557 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 3558 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 3559 background: var(--media-listbox-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8)))); 3560 border-radius: var(--media-listbox-border-radius); 3561 display: inline-flex; 3562 flex-direction: column; 3563 position: relative; 3564 box-sizing: border-box; 3565 } 3566 3567 ::slotted([slot="header"]) { 3568 padding: .4em 1.4em; 3569 border-bottom: 1px solid rgb(255 255 255 / .25); 3570 } 3571 3572 #container { 3573 gap: var(--media-listbox-gap); 3574 display: flex; 3575 flex-direction: var(--media-listbox-flex-direction, column); 3576 overflow: hidden auto; 3577 padding-block: .5em; 3578 } 3579 3580 media-chrome-option { 3581 padding-inline: .7em 1.4em; 3582 } 3583 3584 media-chrome-option > span { 3585 margin-inline: .5ch; 3586 } 3587 3588 [part~="indicator"] { 3589 fill: var(--media-option-indicator-fill, var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)))); 3590 height: var(--media-option-indicator-height, 1.25em); 3591 vertical-align: var(--media-option-indicator-vertical-align, text-top); 3592 } 3593 3594 [part~="select-indicator"] { 3595 display: var(--media-option-select-indicator-display); 3596 visibility: hidden; 3597 } 3598 3599 [aria-selected="true"] > [part~="select-indicator"] { 3600 visibility: visible; 3601 } 3602</style> 3603<style id="layout-row" media="width:0"> 3604 3605 ::slotted([slot="header"]) { 3606 padding: .4em .5em; 3607 } 3608 3609 #container { 3610 gap: var(--media-listbox-gap, .25em); 3611 flex-direction: var(--media-listbox-flex-direction, row); 3612 padding-inline: .5em; 3613 } 3614 3615 media-chrome-option { 3616 padding: .3em .24em; 3617 } 3618 3619 media-chrome-option[aria-selected="true"] { 3620 background: var(--media-option-selected-background, rgb(255 255 255 / .2)); 3621 } 3622 3623 [part~="select-indicator"] { 3624 display: var(--media-option-select-indicator-display, none); 3625 } 3626</style> 3627<slot name="header"></slot> 3628<slot id="container"></slot> 3629<slot name="select-indicator" hidden>${checkIcon}</slot> 3630`;class MediaChromeListbox extends GlobalThis.HTMLElement{constructor(e={}){super(),__privateAdd$8(this,_handleKeyListener),__privateAdd$8(this,_updateLayoutStyle),__privateAdd$8(this,_getOption),__privateAdd$8(this,_selectOption),__privateAdd$8(this,_searchOption),__privateAdd$8(this,_clearKeysOn
3630Delay),__privateAdd$8(this,_mediaController$1,void 0),__privateAdd$8(this,_keysSoFar,""),__privateAdd$8(this,_clearKeysTimeout,null),__privateAdd$8(this,_metaPressed,!1),__privateAdd$8(this,_clickListener,r=>{this.handleClick(r)}),__privateAdd$8(this,_keyupListener$1,r=>{const{key:s}=r;if(s==="Escape"){this.removeEventListener("keyup",__privateGet$8(this,_keyupListener$1));return}if(s==="Meta"){__privateSet$7(this,_metaPressed,!1);return}__privateMethod$7(this,_handleKeyListener,handleKeyListener_fn).call(this,r)}),__privateAdd$8(this,_keydownListener$1,r=>{const{key:s,altKey:o}=r;if(o){this.removeEventListener("keyup",__privateGet$8(this,_keyupListener$1));return}if(s==="Meta"){__privateSet$7(this,_metaPressed,!0);return}if(this.keysUsed.includes(s)&&r.preventDefault(),__privateGet$8(this,_metaPressed)&&this.keysUsed.includes(s)){__privateMethod$7(this,_handleKeyListener,handleKeyListener_fn).call(this,r);return}this.addEventListener("keyup",__privateGet$8(this,_keyupListener$1),{once:!0})}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=template$2.content.cloneNode(!0),e.slotTemplate&&this.nativeEl.append(e.slotTemplate.content.cloneNode(!0)),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.container.addEventListener("slotchange",r=>{for(let s of r.target.assignedNodes({flatten:!0}))s.nodeType===3&&s.textContent.trim()===""&&s.remove()})}static get observedAttributes(){return["disabled","style",MediaStateReceiverAttributes.MEDIA_CONTROLLER]}static formatOptionText(e){return e}formatOptionText(e,r){return this.constructor.formatOptionText(e,r)}get options(){var e;let r=this.querySelectorAll("media-chrome-option");return r.length||(r=(e=this.container)==null?void 0:e.querySelectorAll("media-chrome-option")),Array.from(r)}get selectedOptions(){return this.options.filter(e=>e.selected)}get value(){var e,r;return(r=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?r:""}set value(e){const r=this.options.find(s=>s.value===e);r&&__privateMethod$7(this,_selectOption,selectOption_fn).call(this,r)}focus(){var e;(e=this.selectedOptions[0])==null||e.focus()}enable(){this.addEventListener("click",__privateGet$8(this,_clickListener)),this.addEventListener("keydown",__privateGet$8(this,_keydownListener$1))}disable(){this.removeEventListener("click",__privateGet$8(this,_clickListener)),this.removeEventListener("keyup",__privateGet$8(this,_keyupListener$1))}attributeChangedCallback(e,r,s){var o,d,L,ge,Mt;e==="style"&&s!==r?__privateMethod$7(this,_updateLayoutStyle,updateLayoutStyle_fn).call(this):e===MediaStateReceiverAttributes.MEDIA_CONTROLLER?(r&&((d=(o=__privateGet$8(this,_mediaController$1))==null?void 0:o.unassociateElement)==null||d.call(o,this),__privateSet$7(this,_mediaController$1,null)),s&&this.isConnected&&(__privateSet$7(this,_mediaController$1,(L=this.getRootNode())==null?void 0:L.getElementById(s)),(Mt=(ge=__privateGet$8(this,_mediaController$1))==null?void 0:ge.associateElement)==null||Mt.call(ge,this))):e==="disabled"&&s!==r&&(s==null?this.enable():this.disable())}connectedCallback(){var e,r,s;__privateMethod$7(this,_updateLayoutStyle,updateLayoutStyle_fn).call(this),this.hasAttribute("disabled")||this.enable(),this.hasAttribute("role")||this.setAttribute("role","listbox");const o=this.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER);o&&(__privateSet$7(this,_mediaController$1,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(s=(r=__privateGet$8(this,_mediaController$1))==null?void 0:r.associateElement)==null||s.call(r,this))}disconnectedCallback(){var e,r;this.disable(),(r=(e=__privateGet$8(this,_mediaController$1))==null?void 0:e.unassociateElement)==null||r.call(e,this),__privateSet$7(this,_mediaController$1,null)}get keysUsed(){return["Enter"," ","ArrowDown","ArrowUp","Home","End"]}handleSelection(e,r){const s=__privateMethod$7(this,_getOption,getOption_fn).call(this,e);s&&__privateMethod$7(this,_selectOption,selectOption_fn).call(this,s,r)}handleMovement(e){const{key:r}=e,s=this.options;let o=__privateMethod$7(this,_getOption,getOption_fn).call(this,e);o||(o=s.filter(L=>L.getAttribute("tabindex")==="0")[0]);let d;switch(r){case"ArrowDown":d=o.nextElementSibling,d!=null&&d.hasAttribute("disabled")&&(d=d.nextElementSibling);break;case"ArrowUp":d=o.previousElementSibling,d!=null&&d.hasAttribute("disabled")&&(d=d.previousElementSibling);break;case"Home":d=s[0];break;case"End":d=s[s.length-1];break;default:d=__privateMethod$7(this,_searchOption,searchOption_fn).call(this,r);break}d&&(s.forEach(L=>L.setAttribute("tabindex","-1")),d.setAttribute("tabindex","0"),d.focus())}handleClick(e){const r=__privateMethod$7(this,_getOption,getOption_fn).call(this,e);!r||r.hasAttribute("disabled")||(this.options.forEach(s=>s.setAttribute("tabindex","-1")),r.setAttribute("tabindex","0"),this.handleSelection(e,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"))}}_mediaController$1=new WeakMap;_keysSoFar=new WeakMap;_clearKeysTimeout=new WeakMap;_metaPressed=new WeakMap;_clickListener=new WeakMap;_handleKeyListener=new WeakSet;handleKeyListener_fn=function(t){const{key:e}=t;e==="Enter"||e===" "?this.handleSelection(t,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"):this.handleMovement(t)};_keyupListener$1=new WeakMap;_keydownListener$1=new WeakMap;_updateLayoutStyle=new WeakSet;updateLayoutStyle_fn=function(){var t;const e=this.shadowRoot.querySelector("#layout-row"),r=((t=getComputedStyle(this).getPropertyValue("--media-listbox-layout"))==null?void 0:t.trim())==="row";e.setAttribute("media",r?"":"width:0")};_getOption=new WeakSet;getOption_fn=function(t){const e=t.composedPath(),r=e.findIndex(s=>s.nodeName==="MEDIA-CHROME-OPTION");return e[r]};_selectOption=new WeakSet;selectOption_fn=function(t,e){const r=[...this.selectedOptions];(!this.hasAttribute("aria-multiselectable")||this.getAttribute("aria-multiselectable")!=="true")&&this.options.forEach(s=>s.selected=!1),e?t.selected=!t.selected:t.selected=!0,this.selectedOptions.some((s,o)=>s!=r[o])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};_searchOption=new WeakSet;
3630searchOption_fn=function(t){__privateMethod$7(this,_clearKeysOnDelay,clearKeysOnDelay_fn).call(this);const e=this.options,r=e.findIndex(er=>er.getAttribute("tabindex")==="0");__privateSet$7(this,_keysSoFar,__privateGet$8(this,_keysSoFar)+t);const s=__privateGet$8(this,_keysSoFar).split("").every(er=>er===t),o=e.slice(r+(s?1:0)).filter(er=>er.textContent.toLowerCase().startsWith(__privateGet$8(this,_keysSoFar))),d=e.slice(0,r-(s?1:0)).filter(er=>er.textContent.toLowerCase().startsWith(__privateGet$8(this,_keysSoFar)));let L=[],ge=[];return s&&(L=e.slice(r+(s?1:0)).filter(er=>er.textContent.startsWith(t)),ge=e.slice(0,r-(s?1:0)).filter(er=>er.textContent.startsWith(t))),[...o,...d,...L,...ge][0]};_clearKeysOnDelay=new WeakSet;clearKeysOnDelay_fn=function(){clearTimeout(__privateGet$8(this,_clearKeysTimeout)),__privateSet$7(this,_clearKeysTimeout,null),__privateSet$7(this,_clearKeysTimeout,setTimeout(()=>{__privateSet$7(this,_keysSoFar,""),__privateSet$7(this,_clearKeysTimeout,null)},500))};GlobalThis.customElements.get("media-chrome-listbox")||GlobalThis.customElements.define("media-chrome-listbox",MediaChromeListbox);var __accessCheck$7=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$7=(t,e,r)=>(__accessCheck$7(t,e,"read from private field"),e.get(t)),__privateAdd$7=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$6=(t,e,r,s)=>(__accessCheck$7(t,e,"write to private field"),e.set(t,r),r),__privateMethod$6=(t,e,r)=>(__accessCheck$7(t,e,"access private method"),r),_dirty,_ownerElement,_reset,reset_fn;const template$1=Document$1.createElement("template");template$1.innerHTML=` 3631<style> 3632 :host { 3633 cursor: pointer; 3634 display: block; 3635 line-height: revert; 3636 white-space: nowrap; 3637 white-space-collapse: collapse; 3638 text-wrap: nowrap; 3639 padding: .4em .5em; 3640 transition: var(--media-option-transition); 3641 outline: var(--media-option-outline, 0); 3642 outline-offset: var(--media-option-outline-offset, -1px); 3643 } 3644 3645 :host(:focus-visible) { 3646 box-shadow: var(--media-option-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 3647 outline: var(--media-option-hover-outline, 0); 3648 outline-offset: var(--media-option-hover-outline-offset, var(--media-option-outline-offset, -1px)); 3649 } 3650 3651 :host(:hover) { 3652 cursor: pointer; 3653 background: var(--media-option-hover-background, rgb(82 82 122 / .8)); 3654 outline: var(--media-option-hover-outline); 3655 outline-offset: var(--media-option-hover-outline-offset, var(--media-option-outline-offset, -1px)); 3656 } 3657 3658 :host([aria-selected="true"]) { 3659 background: var(--media-option-selected-background); 3660 } 3661 3662 :host([disabled]) { 3663 pointer-events: none; 3664 color: rgba(255, 255, 255, .3); 3665 } 3666</style> 3667<slot></slot> 3668`;const Attributes$1={VALUE:"value",SELECTED:"selected",DISABLED:"disabled"};class MediaChromeOption extends GlobalThis.HTMLElement{constructor(){super(),__privateAdd$7(this,_reset),__privateAdd$7(this,_dirty,!1),__privateAdd$7(this,_ownerElement,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(template$1.content.cloneNode(!0)))}static get observedAttributes(){return[Attributes$1.DISABLED,Attributes$1.SELECTED,Attributes$1.VALUE]}get value(){var e;return(e=this.getAttribute(Attributes$1.VALUE))!=null?e:this.text}set value(e){this.setAttribute(Attributes$1.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get selected(){return this.getAttribute("aria-selected")==="true"}set selected(e){__privateSet$6(this,_dirty,!0),this.setAttribute("aria-selected",e?"true":"false"),e?this.part.add("option-selected"):this.part.remove("option-selected")}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex",-1),this.hasAttribute("aria-selected")||this.setAttribute("aria-selected","false")}disable(){this.removeAttribute("tabindex")}attributeChangedCallback(e,r,s){e===Attributes$1.SELECTED&&!__privateGet$7(this,_dirty)?this.setAttribute("aria-selected",s!=null?"true":"false"):e===Attributes$1.DISABLED&&s!==r&&(s==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Attributes$1.DISABLED)||this.enable(),this.setAttribute("role","option"),__privateSet$6(this,_ownerElement,closestOptionsContainer(this,this.parentNode)),__privateMethod$6(this,_reset,reset_fn).call(this)}disconnectedCallback(){this.disable(),__privateMethod$6(this,_reset,reset_fn).call(this),__privateSet$6(this,_ownerElement,null)}handleClick(){}}_dirty=new WeakMap;_ownerElement=new WeakMap;_reset=new WeakSet;reset_fn=function(){var t;const e=(t=__privateGet$7(this,_ownerElement))==null?void 0:t.options;if(!e)return;let r=e.filter(s=>s.getAttribute("aria-selected")==="true").pop();r||(r=e[0]),__privateGet$7(this,_ownerElement).getAttribute("aria-multiselectable")!=="true"&&e.forEach(s=>{s.setAttribute("tabindex","-1"),s.setAttribute("aria-selected","false")}),r==null||r.setAttribute("tabindex","0"),r==null||r.setAttribute("aria-selected","true")};function closestOptionsContainer(t,e){if(!t)return null;const{host:r}=t.getRootNode();return!e&&r?closestOptionsContainer(t,r):e!=null&&e.options?e:closestOptionsContainer(e,e==null?void 0:e.parentNode)}GlobalThis.customElements.get("media-chrome-option")||GlobalThis.customElements.define("media-chrome-option",MediaChromeOption);var __accessCheck$6=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$6=(t,e,r)=>(__accessCheck$6(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$6=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$5=(t,e,r,s)=>(__accessCheck$6(t,e,"write to private field"),e.set(t,r),r),__privateMethod$5=(t,e,r)=>(__accessCheck$6(t,e,"access private method"),r),_mediaController,_button,_buttonSlot,_listbox,_listboxSlot,_keyupListener,_keydownListener,_documentClickHandler,_clickHandler,_handleOptionChange,_toggle,toggle_fn,_show,show_fn,_hide,hide_fn,_updateMenuPosition;const template=Document$1.createElement("template");template.innerHTML=` 3669 <style> 3670 :host { 3671 font: var(--media-font, 3672 var(--media-font-weight, normal) 3673 var(--media-font-size, 15px) / 3674 var(--media-text-content-height, var(--media-control-height, 24px)) 3675 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 3676 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 3677 display: inline-flex; 3678 position: relative; 3679 flex-shrink: .5; 3680 } 3681 3682 [name=listbox]::slotted(*), 3683 [part=listbox] { 3684 position: absolute; 3685 bottom: 100%; 3686 max-height: 300px; 3687 transition: var(--media-selectmenu-transition-in, 3688 visibility 0s, transform .15s ease-out, opacity .15s ease-out); 3689 transform: var(--media-listbox-transform-in, translateY(0) scale(1)); 3690 visibility: visible; 3691 opacity: 1; 3692 } 3693 3694 [name=listbox][hidden]::slotted(*), 3695 [hidden] [part=listbox] { 3696 transition: var(--media-selectmenu-transition-out, 3697 visibility .15s ease-out, transform .15s ease-out, opacity .15s ease-out); 3698 transform: var(--media-listbox-transform-out, translateY(2px) scale(.99)); 3699 visibility: hidden; 3700 opacity: 0; 3701 pointer-events: none; 3702 } 3703 3704 slot[name=listbox][hidden] { 3705 display: block; 3706 } 3707 </style> 3708 3709 <slot name="button"> 3710 <media-chrome-button aria-haspopup="listbox" part="button"> 3711 <slot name="button-content"></slot> 3712 </media-chrome-button> 3713 </slot> 3714 <slot name="listbox" hidden> 3715 <media-chrome-listbox id="listbox" part="listbox"> 3716 <slot></slot> 3717 </media-chrome-listbox> 3718 </slot> 3719`;class MediaChromeSelectMenu extends GlobalThis.HTMLElement{constructor(){var e;super(),__privateAdd$6(this,_toggle),__privateAdd$6(this,_show),__privateAdd$6(this,_hide),__privateAdd$6(this,_mediaController,void 0),__privateAdd$6(this,_button,void 0),__privateAdd$6(this,_buttonSlot,void 0),__privateAdd$6(this,_listbox,void 0),__privateAdd$6(this,_listboxSlot,void 0),__privateAdd$6(this,_keyupListener,r=>{const{key:s}=r;if(!this.keysUsed.includes(s)){this.removeEventListener("keyup",__privateGet$6(this,_keyupListener));return}r.composedPath().includes(__privateGet$6(this,_button))&&(s==="Enter"||s===" ")?__privateMethod$5(this,_toggle,toggle_fn).call(this):s==="Escape"&&__privateMethod$5(this,_hide,hide_fn
3719).call(this)}),__privateAdd$6(this,_keydownListener,r=>{const{metaKey:s,altKey:o,key:d}=r;if(s||o||!this.keysUsed.includes(d)){this.removeEventListener("keyup",__privateGet$6(this,_keyupListener));return}r.preventDefault(),this.addEventListener("keyup",__privateGet$6(this,_keyupListener),{once:!0})}),__privateAdd$6(this,_documentClickHandler,r=>{r.composedPath().includes(this)||__privateMethod$5(this,_hide,hide_fn).call(this)}),__privateAdd$6(this,_clickHandler,r=>{r.composedPath().includes(__privateGet$6(this,_button))&&__privateMethod$5(this,_toggle,toggle_fn).call(this)}),__privateAdd$6(this,_handleOptionChange,()=>{__privateMethod$5(this,_hide,hide_fn).call(this)}),__privateAdd$6(this,_updateMenuPosition,()=>{if(__privateGet$6(this,_listbox).offsetWidth===0)return;const r=__privateGet$6(this,_listbox).offsetWidth,s=__privateGet$6(this,_button).getBoundingClientRect();if(this.hasAttribute("mediacontroller")||__privateGet$6(this,_button).hasAttribute("mediacontroller")||__privateGet$6(this,_listbox).hasAttribute("mediacontroller")){__privateGet$6(this,_listbox).style.zIndex="1",__privateGet$6(this,_listbox).style.bottom="unset",__privateGet$6(this,_listbox).style.right=null,__privateGet$6(this,_listbox).style.left="0",__privateGet$6(this,_listbox).style.top=`${s.height}px`;return}const d=getBoundsElement(this).getBoundingClientRect(),L=s.x+r,ge=Math.max(s.right-L,s.right-d.right);__privateGet$6(this,_listbox).style.left=null,__privateGet$6(this,_listbox).style.right=`${ge}px`,__privateGet$6(this,_listbox).style.maxHeight=`${d.height-s.height}px`}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(template.content.cloneNode(!0))),(e=this.init)==null||e.call(this),__privateSet$5(this,_button,this.shadowRoot.querySelector("[part=button]")),__privateSet$5(this,_listbox,this.shadowRoot.querySelector("[part=listbox]")),__privateSet$5(this,_buttonSlot,this.shadowRoot.querySelector("slot[name=button]")),__privateGet$6(this,_buttonSlot).addEventListener("slotchange",()=>{const r=__privateGet$6(this,_buttonSlot).assignedElements()[0];if(!r)return;__privateSet$5(this,_button,r),__privateGet$6(this,_button).preventClick=!0,this.hasAttribute("disabled")||__privateGet$6(this,_button).hasAttribute("disabled")?this.disable():(this.enable(),__privateGet$6(this,_button).setAttribute("aria-haspopup","listbox"))}),__privateSet$5(this,_listboxSlot,this.shadowRoot.querySelector("slot[name=listbox]")),__privateGet$6(this,_listboxSlot).addEventListener("slotchange",()=>{__privateSet$5(this,_listbox,__privateGet$6(this,_listboxSlot).assignedElements()[0]||__privateGet$6(this,_listbox))})}static get observedAttributes(){return["disabled",MediaStateReceiverAttributes.MEDIA_CONTROLLER]}enable(){__privateGet$6(this,_button).toggleAttribute("disabled",!1),this.addEventListener("change",__privateGet$6(this,_handleOptionChange)),this.addEventListener("keydown",__privateGet$6(this,_keydownListener)),this.addEventListener("click",__privateGet$6(this,_clickHandler)),Document$1.addEventListener("click",__privateGet$6(this,_documentClickHandler))}disable(){__privateGet$6(this,_button).toggleAttribute("disabled",!0),this.removeEventListener("change",__privateGet$6(this,_handleOptionChange)),this.removeEventListener("keydown",__privateGet$6(this,_keydownListener)),this.removeEventListener("keyup",__privateGet$6(this,_keyupListener)),this.removeEventListener("click",__privateGet$6(this,_clickHandler)),Document$1.removeEventListener("click",__privateGet$6(this,_documentClickHandler))}attributeChangedCallback(e,r,s){var o,d,L,ge,Mt;e===MediaStateReceiverAttributes.MEDIA_CONTROLLER?(r&&((d=(o=__privateGet$6(this,_mediaController))==null?void 0:o.unassociateElement)==null||d.call(o,this),__privateSet$5(this,_mediaController,null),__privateGet$6(this,_listbox).removeAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER)),s&&this.isConnected&&(__privateSet$5(this,_mediaController,(L=this.getRootNode())==null?void 0:L.getElementById(s)),(Mt=(ge=__privateGet$6(this,_mediaController))==null?void 0:ge.associateElement)==null||Mt.call(ge,this),__privateGet$6(this,_listbox).setAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER,s))):e==="disabled"&&s!==r&&(s==null?this.enable():this.disable())}connectedCallback(){var e,r,s;const{style:o}=getOrInsertCSSRule(this.shadowRoot,":host");o.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const d=this.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER);d&&(__privateSet$5(this,_mediaController,(e=this.getRootNode())==null?void 0:e.getElementById(d)),(s=(r=__privateGet$6(this,_mediaController))==null?void 0:r.associateElement)==null||s.call(r,this),__privateGet$6(this,_listbox).setAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER,d)),this.hasAttribute("disabled")||this.enable(),__privateGet$6(this,_listboxSlot).hidden||observeResize(getBoundsElement(this),__privateGet$6(this,_updateMenuPosition))}disconnectedCallback(){var e,r;unobserveResize(getBoundsElement(this),__privateGet$6(this,_updateMenuPosition)),this.disable(),(r=(e=__privateGet$6(this,_mediaController))==null?void 0:e.unassociateElement)==null||r.call(e,this),__privateSet$5(this,_mediaController,null),__privateGet$6(this,_listbox).removeAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER)}get keysUsed(){return["Enter","Escape"," ","ArrowUp","ArrowDown","f","c","k","m"]}}_mediaController=new WeakMap;_button=new WeakMap;_buttonSlot=new WeakMap;_listbox=new WeakMap;_listboxSlot=new WeakMap;_keyupListener=new WeakMap;_keydownListener=new WeakMap;_documentClickHandler=new WeakMap;_clickHandler=new WeakMap;_handleOptionChange=new WeakMap;_toggle=new WeakSet;toggle_fn=function(){__privateGet$6(this,_listboxSlot).hidden?__privateMethod$5(this,_show,show_fn).call(this):__privateMethod$5(this,_hide,hide_fn
3719).call(this)};_show=new WeakSet;show_fn=function(){__privateGet$6(this,_listboxSlot).hidden&&(__privateGet$6(this,_listboxSlot).hidden=!1,__privateGet$6(this,_button).setAttribute("aria-expanded","true"),__privateGet$6(this,_updateMenuPosition).call(this),__privateGet$6(this,_listbox).focus(),observeResize(getBoundsElement(this),__privateGet$6(this,_updateMenuPosition)))};_hide=new WeakSet;hide_fn=function(){if(__privateGet$6(this,_listboxSlot).hidden)return;unobserveResize(getBoundsElement(this),__privateGet$6(this,_updateMenuPosition));const t=getActiveElement();__privateGet$6(this,_listboxSlot).hidden=!0,__privateGet$6(this,_button).setAttribute("aria-expanded","false"),containsComposedNode(__privateGet$6(this,_listbox),t)&&__privateGet$6(this,_button).focus()};_updateMenuPosition=new WeakMap;function getBoundsElement(t){var e;return(e=t.getAttribute("bounds")?closestComposedNode(t,`#${t.getAttribute("bounds")}`):getMediaControllerElement(t)||t.parentElement)!=null?e:t}function getMediaControllerElement(t){var e;const r=t.getAttribute(MediaStateReceiverAttributes.MEDIA_CONTROLLER);return r?(e=t.getRootNode())==null?void 0:e.getElementById(r):closestComposedNode(t,"media-controller")}GlobalThis.customElements.get("media-chrome-selectmenu")||GlobalThis.customElements.define("media-chrome-selectmenu",MediaChromeSelectMenu);var __accessCheck$5=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$5=(t,e,r)=>(__accessCheck$5(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$5=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$4=(t,e,r,s)=>(__accessCheck$5(t,e,"write to private field"),e.set(t,r),r),__privateMethod$4=(t,e,r)=>(__accessCheck$5(t,e,"access private method"),r),_prevState$2,_render$3,render_fn$3,_onChange$3,onChange_fn$3;const ccIcon=` 3720<svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator"> 3721 <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"/> 3722</svg>`,slotTemplate$2=Document$1.createElement("template");slotTemplate$2.innerHTML=` 3723 <slot name="captions-indicator" hidden>${ccIcon}</slot> 3724`;class MediaCaptionsListbox extends MediaChromeListbox{constructor(){super({slotTemplate:slotTemplate$2}),__privateAdd$5(this,_render$3),__privateAdd$5(this,_onChange$3),__privateAdd$5(this,_prevState$2,void 0)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",MediaUIAttributes.MEDIA_SUBTITLES_LIST,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_SUBTITLES_LIST&&r!==s?__privateMethod$4(this,_render$3,render_fn$3).call(this):e===MediaUIAttributes.MEDIA_SUBTITLES_SHOWING&&r!==s?this.value=s:e==="aria-multiselectable"&&(this.removeAttribute("aria-multiselectable"),console.warn("Captions List doesn't currently support multiple selections. You can enable multiple items via the media.textTracks API."))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",__privateMethod$4(this,_onChange$3,onChange_fn$3))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",__privateMethod$4(this,_onChange$3,onChange_fn$3))}get mediaSubtitlesList(){return getSubtitlesListAttr(this,MediaUIAttributes.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){setSubtitlesListAttr(this,MediaUIAttributes.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return getSubtitlesListAttr(this,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){setSubtitlesListAttr(this,MediaUIAttributes.MEDIA_SUBTITLES_SHOWING,e)}}_prevState$2=new WeakMap;_render$3=new WeakSet;render_fn$3=function(){var t;if(__privateGet$5(this,_prevState$2)===JSON.stringify(this.mediaSubtitlesList))return;__privateSet$4(this,_prevState$2,JSON.stringify(this.mediaSubtitlesList));const e=this.shadowRoot.querySelector("#container");e.textContent="";const r=!this.value,s=createOption(this.formatOptionText("Off"),"off",r);s.prepend(createIndicator(this,"select-indicator")),e.append(s);const o=this.mediaSubtitlesList;for(const d of o){const L=createOption(this.formatOptionText(d.label,d),formatTextTrackObj(d),this.value==formatTextTrackObj(d));L.prepend(createIndicator(this,"select-indicator")),((t=d.kind)!=null?t:"subs")==="captions"&&L.append(createIndicator(this,"captions-indicator")),e.append(L)}};_onChange$3=new WeakSet;onChange_fn$3=function(){const t=this.mediaSubtitlesShowing,e=this.getAttribute(MediaUIAttributes.MEDIA_SUBTITLES_SHOWING),r=this.value!==e;if(t!=null&&t.length&&r&&this.dispatchEvent(new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!r)return;const s=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(s)};const getSubtitlesListAttr=(t,e)=>{const r=t.getAttribute(e);return r?parseTextTracksStr(r):[]},setSubtitlesListAttr=(t,e,r)=>{if(!(r!=null&&r.length)){t.removeAttribute(e);return}const s=stringifyTextTrackList(r);t.getAttribute(e)!==s&&t.setAttribute(e,s)};GlobalThis.customElements.get("media-captions-listbox")||GlobalThis.customElements.define("media-captions-listbox",MediaCaptionsListbox);class MediaCaptionsSelectMenu extends MediaChromeSelectMenu{init(){const e=Document$1.createElement("media-captions-button");e.part.add("button"),e.preventClick=!0;const r=Document$1.createElement("media-captions-listbox");r.part.add("listbox"),r.setAttribute("exportparts","option, option-selected, indicator");const s=this.shadowRoot.querySelector("slot[name=button]"),o=this.shadowRoot.querySelector("slot[name=listbox]");s.textContent="",o.textContent="",s.append(e),o.append(r)}}GlobalThis.customElements.get("media-captions-selectmenu")||GlobalThis.customElements.define("media-captions-selectmenu",MediaCaptionsSelectMenu);var __accessCheck$4=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$4=(t,e,r)=>(__accessCheck$4(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$4=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateMethod$3=(t,e,r)=>(__accessCheck$4(t,e,"access private method"),r),_rates,_render$2,render_fn$2,_onChange$2,onChange_fn$2;const Attributes={RATES:"rates"};class MediaPlaybackRateListbox extends MediaChromeListbox{constructor(){super(),__privateAdd$4(this,_render$2),__privateAdd$4(this,_onChange$2),__privateAdd$4(this,_rates,new AttributeTokenList(this,Attributes.RATES,{defaultValue:DEFAULT_RATES$1})),__privateMethod$3(this,_render$2,render_fn$2).call(this)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",MediaUIAttributes.MEDIA_PLAYBACK_RATE,Attributes.RATES]}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_PLAYBACK_RATE&&r!=s?this.value=s:e===Attributes.RATES&&r!=s&&(__privateGet$4(this,_rates).value=s,__privateMethod$3(this,_render$2,render_fn$2).call(this))}get rates(){return __privateGet$4(this,_rates)}set rates(e){e?Array.isArray(e)&&(__privateGet$4(this,_rates).value=e.join(" ")):__privateGet$4(this,_rates).value="",__privateMethod$3(this,_render$2,render_fn$2).call(this)}get mediaPlaybackRate(){return getNumericAttr(this,MediaUIAttributes.MEDIA_PLAYBACK_RATE,DEFAULT_RATE$1)}set mediaPlaybackRate(e){setNumericAttr(this,MediaUIAttributes.MEDIA_PLAYBACK_RATE,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",__privateMethod$3(this,_onChange$2,onChange_fn$2))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",__privateMethod$3(this,_onChange$2,onChange_fn$2))}}_rates=new WeakMap;_render$2=new WeakSet;render_fn$2=function(){const t=this.shadowRoot.querySelector("#container");t.textContent="";for(const e of this.rates){const r=createOption(this.formatOptionText(`${e}x`,e),e,this.mediaPlaybackRate==e);r.prepend(createIndicator(this,"select-indicator")),t.append(r)}};_onChange$2=new WeakSet;onChange_fn$2=function(){if(!this.value)return;const t=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};GlobalThis.customElements.get("media-playback-rate-listbox")||GlobalThis.customElements.define("media-playback-rate-listbox",MediaPlaybackRateListbox);class MediaPlaybackRateSelectMenu extends MediaChromeSelectMenu{init(){const e=Document$1.createElement("media-playback-rate-button");e.part.add("button"),e.preventClick=!0;const r=Document$1.createElement("media-playback-rate-listbox");r.part.add("listbox"),r.setAttribute("exportparts","option, option-selected, indicator");const s=this.shadowRoot.querySelector("slot[name=button]"),o=this.shadowRoot.querySelector("slot[name=listbox]");s.textContent="",o.textContent="",s.append(e),o.append(r)}}GlobalThis.customElements.get("media-playback-rate-selectmenu")||GlobalThis.customElements.define("media-playback-rate-selectmenu",MediaPlaybackRateSelectMenu);var __accessCheck$3=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$3=(t,e,r)=>(__accessCheck$3(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$3=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$3=(t,e,r,s)=>(__accessCheck$3(t,e,"write to private field"),e.set(t,r),r),__privateMethod$2=(t,e,r)=>(__accessCheck$3(t,e,"access private method"),r),_renditionList,_prevState$1,_render$1,render_fn$1,_onChange$1,onChange_fn$1;class MediaRenditionListbox extends MediaChromeListbox{constructor(){super(...arguments),__privateAdd$3(this,_render$1),__privateAdd$3(this,_onChange$1),__privateAdd$3(this,_renditionList,[]),__privateAdd$3(this,_prevState$1,void 0)}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_RENDITION_LIST,MediaUIAttributes.MEDIA_RENDITION_SELECTED]}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_RENDITION_SELECTED&&r!==s?this.value=s??"auto":e===MediaUIAttributes.MEDIA_RENDITION_LIST&&r!==s&&(__privateSet$3(this,_renditionList,parseRenditionList(s)),__privateMethod$2(this,_render$1,render_fn$1).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",__privateMethod$2(this,_onChange$1,onChange_fn$1))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",__privateMethod$2(this,_onChange$1,onChange_fn$1))}get mediaRenditionList(){return __privateGet$3(this,_renditionList)}set mediaRenditionList(e){__privateSet$3(this,_renditionList,e),__privateMethod$2(this,_render$1,render_fn$1).call(this)}get mediaRenditionSelected(){return getStringAttr(this,MediaUIAttributes.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){setStringAttr(this,MediaUIAttributes.MEDIA_RENDITION_SELECTED,e)}}_renditionList=new WeakMap;_prevState$1=new WeakMap;_render$1=new WeakSet;render_fn$1=function(){if(__privateGet$3(this,_prevState$1)===JSON.stringify(this.mediaRenditionList))return;__privateSet$3(this,_prevState$1,JSON.stringify(this.mediaRenditionList));const t=this.mediaRenditionList.sort((o,d)=>d.height-o.height),e=this.shadowRoot.querySelector("#container");e.textContent="";let r=!this.mediaRenditionSelected;for(const o of t){const d=this.formatOptionText(`${Math.min(o.width,o.height)}p`,o),L=createOption(d,`${o.id}`,o.selected&&!r);L.prepend(createIndicator(this,"select-indicator")),e.append(L)}const s=createOption(this.formatOptionText("Auto"),"auto",r);s.prepend(createIndicator(this,"select-indicator")),e.append(s)};_onChange$1=new WeakSet;onChange_fn$1=function(){if(this.value==null)return;const t=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};GlobalThis.customElements.get("media-rendition-listbox")||GlobalThis.customElements.define("media-rendition-listbox",MediaRenditionListbox);const renditionIcon=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3725 <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" /> 3726</svg>`,slotTemplate$1=Document$1.createElement("template");slotTemplate$1.innerHTML=` 3727 <slot name="icon">${renditionIcon}</slot> 3728`;class MediaRenditionButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_RENDITION_SELECTED,MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:slotTemplate$1})}get mediaRenditionSelected(){return getStringAttr(this,MediaUIAttributes.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){setStringAttr(this,MediaUIAttributes.MEDIA_RENDITION_SELECTED,e)}}GlobalThis.customElements.get("media-rendition-button")||GlobalThis.customElements.define("media-rendition-button",MediaRenditionButton);class MediaRenditionSelectMenu extends MediaChromeSelectMenu{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_RENDITION_SELECTED,MediaUIAttributes.MEDIA_RENDITION_UNAVAILABLE]}init(){const e=Document$1.createElement("media-rendition-button");e.part.add("button"),e.preventClick=!0;const r=Document$1.createElement("media-rendition-listbox");r.part.add("listbox"),r.setAttribute("exportparts","option, option-selected, indicator");const s=this.shadowRoot.querySelector("slot[name=button]"),o=this.shadowRoot.querySelector("slot[name=listbox]");s.textContent="",o.textContent="",s.append(e),o.append(r)}}GlobalThis.customElements.get("media-rendition-selectmenu")||GlobalThis.customElements.define("media-rendition-selectmenu",MediaRenditionSelectMenu);var __accessCheck$2=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$2=(t,e,r)=>(__accessCheck$2(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$2=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$2=(t,e,r,s)=>(__accessCheck$2(t,e,"write to private field"),e.set(t,r),r),__privateMethod$1=(t,e,r)=>(__accessCheck$2(t,e,"access private method"),r),_audioTrackList,_prevState,_render,render_fn,_onChange,onChange_fn;class MediaAudioTrackListbox extends MediaChromeListbox{constructor(){super(...arguments),__privateAdd$2(this,_render),__privateAdd$2(this,_onChange),__privateAdd$2(this,_audioTrackList,[]),__privateAdd$2(this,_prevState,void 0)}static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_AUDIO_TRACK_LIST,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED]}attributeChangedCallback(e,r,s){super.attributeChangedCallback(e,r,s),e===MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED&&r!==s?this.value=s:e===MediaUIAttributes.MEDIA_AUDIO_TRACK_LIST&&r!==s&&(__privateSet$2(this,_audioTrackList,parseAudioTrackList(s)),__privateMethod$1(this,_render,render_fn
3728).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",__privateMethod$1(this,_onChange,onChange_fn))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",__privateMethod$1(this,_onChange,onChange_fn))}get mediaAudioTrackList(){return __privateGet$2(this,_audioTrackList)}set mediaAudioTrackList(e){__privateSet$2(this,_audioTrackList,e),__privateMethod$1(this,_render,render_fn).call(this)}get mediaAudioTrackEnabled(){return getStringAttr(this,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){setStringAttr(this,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED,e)}}_audioTrackList=new WeakMap;_prevState=new WeakMap;_render=new WeakSet;render_fn=function(){if(__privateGet$2(this,_prevState)===JSON.stringify(this.mediaAudioTrackList))return;__privateSet$2(this,_prevState,JSON.stringify(this.mediaAudioTrackList));const t=this.mediaAudioTrackList,e=this.shadowRoot.querySelector("#container");e.textContent="";for(const r of t){const s=this.formatOptionText(r.label,r),o=createOption(s,`${r.id}`,r.enabled);o.prepend(createIndicator(this,"select-indicator")),e.append(o)}};_onChange=new WeakSet;onChange_fn=function(){if(this.value==null)return;const t=new GlobalThis.CustomEvent(MediaUIEvents.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};GlobalThis.customElements.get("media-audio-track-listbox")||GlobalThis.customElements.define("media-audio-track-listbox",MediaAudioTrackListbox);const audioTrackIcon=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3729 <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/> 3730 <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"/> 3731</svg>`,slotTemplate=Document$1.createElement("template");slotTemplate.innerHTML=` 3732 <slot name="icon">${audioTrackIcon}</slot> 3733`;class MediaAudioTrackButton extends MediaChromeButton{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED,MediaUIAttributes.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate})}get mediaAudioTrackEnabled(){return getStringAttr(this,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){setStringAttr(this,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED,e)}}GlobalThis.customElements.get("media-audio-track-button")||GlobalThis.customElements.define("media-audio-track-button",MediaAudioTrackButton);class MediaAudioTrackSelectMenu extends MediaChromeSelectMenu{static get observedAttributes(){return[...super.observedAttributes,MediaUIAttributes.MEDIA_AUDIO_TRACK_ENABLED,MediaUIAttributes.MEDIA_AUDIO_TRACK_UNAVAILABLE]}init(){const e=Document$1.createElement("media-audio-track-button");e.part.add("button"),e.preventClick=!0;const r=Document$1.createElement("media-audio-track-listbox");r.part.add("listbox"),r.setAttribute("exportparts","option, option-selected, indicator");const s=this.shadowRoot.querySelector("slot[name=button]"),o=this.shadowRoot.querySelector("slot[name=listbox]");s.textContent="",o.textContent="",s.append(e),o.append(r)}}GlobalThis.customElements.get("media-audio-track-selectmenu")||GlobalThis.customElements.define("media-audio-track-selectmenu",MediaAudioTrackSelectMenu);var mux$1={exports:{}};/*! 3734 * mux-embed 3735 * @version 4.30.0 3736 * @copyright 2023 Mux, Inc 3737 */(function(t,e){(function(){var r;r=function(){return function(){var s={80:function(L,ge,Mt){L.exports=Mt(728).default},728:function(L,ge,Mt){Mt.d(ge,{default:function(){return Pa}});var er=Mt(48),tr=Mt.n(er),ir=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(Ar){var br=16*Math.random()|0;return(Ar==="x"?br:3&br|8).toString(16)})},rr=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},nr=function(Ar){var br,Tr;if(Ar&&Ar.nodeName!==void 0)return Ar.muxId||(Ar.muxId=rr()),Ar.muxId;try{Tr=document.querySelector(Ar)}catch{}return Tr&&!Tr.muxId&&(Tr.muxId=Ar),((br=Tr)===null||br===void 0?void 0:br.muxId)||Ar},ar=function(Ar){var br;Ar&&Ar.nodeName!==void 0?Ar=nr(br=Ar):br=document.querySelector(Ar);var Tr=br&&br.nodeName?br.nodeName.toLowerCase():"";return[br,Ar,Tr]},sr=Mt(640),lr=Mt.n(sr),cr=lr().methodFactory;lr().methodFactory=function(Ar,br,Tr){var Sr=cr(Ar,br,Tr);return function(){for(var Rr=["[mux]"],Br=0;Br<arguments.length;Br++)Rr.push(arguments[Br]);Sr.apply(void 0,Rr)}},lr().setLevel(lr().getLevel());var ur=lr();function or(){return(tr().doNotTrack||tr().navigator&&tr().navigator.doNotTrack)==="1"}var dr={now:function(){var Ar=tr().performance,br=Ar&&Ar.timing,Tr=br&&br.navigationStart,Sr=typeof Tr=="number"&&typeof Ar.now=="function"?Tr+Ar.now():Date.now();return Math.round(Sr)}},hr=function(Ar){return pr(Ar)[0]},pr=function(Ar){if(typeof Ar!="string"||Ar==="")return["localhost"];var br,Tr=(Ar.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return Tr&&(br=(Tr.match(/[^\.]+\.[^\.]+$/)||[])[0]),[Tr,br]},mr={exists:function(){var Ar=tr().performance;return(Ar&&Ar.timing)!==void 0},domContentLoadedEventEnd:function(){var Ar=tr().performance,br=Ar&&Ar.timing;return br&&br.domContentLoadedEventEnd},navigationStart:function(){var Ar=tr().performance,br=Ar&&Ar.timing;
vendor: 4,969 bytes, line 3737
3737return br&&br.navigationStart}};function vr(Ar,br,Tr){Tr=Tr===void 0?1:Tr,Ar[br]=Ar[br]||0,Ar[br]+=Tr}var Er=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],Cr=["x-cdn","content-type"].concat(Er);function Pr(Ar){var br={};return(Ar=Ar||"").trim().split(/[\r\n]+/).forEach(function(Tr){if(Tr){var Sr=Tr.split(": "),Rr=Sr.shift();Rr&&(Cr.indexOf(Rr.toLowerCase())>=0||Rr.toLowerCase().indexOf("x-litix-")===0)&&(br[Rr]=Sr.join(": "))}}),br}function kr(Ar){if(Ar){var br=Er.find(function(Tr){return Ar[Tr]!==void 0});return br?Ar[br]:void 0}}var Mr=function(Ar){var br={};for(var Tr in Ar){var Sr=Ar[Tr];Sr["DATA-ID"].search("io.litix.data.")!==-1&&(br[Sr["DATA-ID"].replace("io.litix.data.","")]=Sr.VALUE)}return br};function Ur(Ar,br){var Tr=Object.keys(Ar);if(Object.getOwnPropertySymbols){var Sr=Object.getOwnPropertySymbols(Ar);br&&(Sr=Sr.filter(function(Rr){return Object.getOwnPropertyDescriptor(Ar,Rr).enumerable})),Tr.push.apply(Tr,Sr)}return Tr}function $r(Ar){for(var br=1;br<arguments.length;br++){var Tr=arguments[br]!=null?arguments[br]:{};br%2?Ur(Object(Tr),!0).forEach(function(Sr){yr(Ar,Sr,Tr[Sr])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ar,Object.getOwnPropertyDescriptors(Tr)):Ur(Object(Tr)).forEach(function(Sr){Object.defineProperty(Ar,Sr,Object.getOwnPropertyDescriptor(Tr,Sr))})}return Ar}function yr(Ar,br,Tr){return br in Ar?Object.defineProperty(Ar,br,{value:Tr,enumerable:!0,configurable:!0,writable:!0}):Ar[br]=Tr,Ar}var xr=function(Ar){if(!Ar)return{};var br=mr.navigationStart(),Tr=Ar.loading,Sr=Tr?Tr.start:Ar.trequest,Rr=Tr?Tr.first:Ar.tfirst,Br=Tr?Tr.end:Ar.tload;return{bytesLoaded:Ar.total,requestStart:Math.round(br+Sr),responseStart:Math.round(br+Rr),responseEnd:Math.round(br+Br)}},gr=function(Ar){if(Ar&&typeof Ar.getAllResponseHeaders=="function")return Pr(Ar.getAllResponseHeaders())};function _r(Ar,br){var Tr=Object.keys(Ar);if(Object.getOwnPropertySymbols){var Sr=Object.getOwnPropertySymbols(Ar);br&&(Sr=Sr.filter(function(Rr){return Object.getOwnPropertyDescriptor(Ar,Rr).enumerable})),Tr.push.apply(Tr,Sr)}return Tr}function wr(Ar){for(var br=1;br<arguments.length;br++){var Tr=arguments[br]!=null?arguments[br]:{};br%2?_r(Object(Tr),!0).forEach(function(Sr){Ir(Ar,Sr,Tr[Sr])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ar,Object.getOwnPropertyDescriptors(Tr)):_r(Object(Tr)).forEach(function(Sr){Object.defineProperty(Ar,Sr,Object.getOwnPropertyDescriptor(Tr,Sr))})}return Ar}function Ir(Ar,br,Tr){return br in Ar?Object.defineProperty(Ar,br,{value:Tr,enumerable:!0,configurable:!0,writable:!0}):Ar[br]=Tr,Ar}var Hr=function(Ar,br){if(!Ar||!Ar.requestEndDate)return{};var Tr,Sr=hr(Ar.url),Rr=Ar.url,Br=Ar.bytesLoaded,Or=new Date(Ar.requestStartDate).getTime(),Kr=new Date(Ar.firstByteDate).getTime(),zr=new Date(Ar.requestEndDate).getTime(),Gr=isNaN(Ar.duration)?0:Ar.duration,Li=typeof br.getMetricsFor=="function"?br.getMetricsFor(Ar.mediaType).HttpList:br.getDashMetrics().getHttpRequests(Ar.mediaType);return Li.length>0&&(Tr=Pr(Li[Li.length-1]._responseHeaders||"")),{requestStart:Or,requestResponseStart:Kr,requestResponseEnd:zr,requestBytesLoaded:Br,requestResponseHeaders:Tr,requestMediaDuration:Gr,requestHostname:Sr,requestUrl:Rr,requestId:Tr?kr(Tr):void 0}},Yr=function(Ar,br){var Tr=br.getQualityFor(Ar),Sr=br.getCurrentTrackFor(Ar).bitrateList;return Sr?{currentLevel:Tr,renditionWidth:Sr[Tr].width||null,renditionHeight:Sr[Tr].height||null,renditionBitrate:Sr[Tr].bandwidth}:{}},Jr=function(Ar){var br;return(br=Ar.match(/.*codecs\*?="(.*)"/))===null||br===void 0?void 0:br[1]},xi=function(Ar){try{var br,Tr;return(br=Ar.getVersion)===null||br===void 0||(Tr=br.call(Ar))===null||Tr===void 0?void 0:Tr.split(".").map(function(Sr){return parseInt(Sr)})[0]}catch{return!1}};function di(Ar,br){for(var Tr=0;Tr<br.length;Tr++){var Sr=br[Tr];Sr.enumerable=Sr.enumerable||!1,Sr.configurable=!0,"value"in Sr&&(Sr.writable=!0),Object.defineProperty(Ar,Sr.key,Sr)}}var Vr=0,Zr=function(){function Ar(){(function(Sr,Rr){if(!(Sr instanceof Rr))throw new TypeError("Cannot call a class as a function")})(this,Ar)}var br,Tr;return br=Ar,Tr=[{key:"on",value:function(Sr,Rr,Br){return Rr._eventEmitterGuid=Rr._eventEmitterGuid||++Vr,this._listeners=this._listeners||{},this._listeners[Sr]=this._listeners[Sr]||[],Br&&(Rr=Rr.bind(Br)),this._listeners[Sr].push(Rr),Rr}},{key:"off",value:function(Sr,Rr){var Br=this._listeners&&this._listeners[Sr];Br&&Br.forEach(function(Or,Kr){Or._eventEmitterGuid===Rr._eventEmitterGuid&&Br.splice(Kr,1)})}},{key:"one",value:function(Sr,Rr,Br){var Or=this;Rr._eventEmitterGuid=Rr._eventEmitterGuid||++Vr;var Kr=function zr(){Or.off(Sr,zr),Rr.apply(Br||this,arguments)};Kr._eventEmitterGuid=Rr._eventEmitterGuid,this.on(Sr,Kr)}},{key:"emit",value:function(Sr,Rr){var Br=this;if(this._listeners){Rr=Rr||{};var Or=this._listeners["before*"]||[],Kr=this._listeners[Sr]||[],zr=this._listeners["after"+Sr]||[],Gr=function(Li,Ui){(Li=Li.slice()).forEac
3737h(function(sn){sn.call(Br,{type:Sr},Ui)})};Gr(Or,Rr),Gr(Kr,Rr),Gr(zr,Rr)}}}],Tr&&di(br.prototype,Tr),Object.defineProperty(br,"prototype",{writable:!1}),Ar}(),Qr=Zr;function Ai(Ar,br){for(var Tr=0;Tr<br.length;Tr++){var Sr=br[Tr];Sr.enumerable=Sr.enumerable||!1,Sr.configurable=!0,"value"in Sr&&(Sr.writable=!0),Object.defineProperty(Ar,Sr.key,Sr)}}var Mi=function(){function Ar(Sr){var Rr=this;(function(Br,Or){if(!(Br instanceof Or))throw new TypeError("Cannot call a class as a function")})(this,Ar),this.pm=Sr,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,Sr.on("playing",function(){Rr._playheadShouldBeProgressing=!0}),Sr.on("play",this._startPlaybackHeartbeatInterval.bind(this)),Sr.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),Sr.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),Sr.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),Sr.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),Sr.on("seeking",this._startPlaybackHeartbeatInterval.bind(this)),Sr.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),Sr.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),Sr.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),Sr.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),Sr.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),Sr.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),Sr.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),Sr.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),Sr.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),Sr.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),Sr.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),Sr.on("seeked",function(){Sr.data.player_is_paused?Rr._stopPlaybackHeartbeatInterval():Rr._startPlaybackHeartbeatInterval()}),Sr.on("timeupdate",function(){Rr._playbackHeartbeatInterval!==null&&Sr.emit("playbackheartbeat")}),Sr.on("devicesleep",function(Br,Or){Rr._playbackHeartbeatInterval!==null&&(tr().clearInterval(Rr._playbackHeartbeatInterval),Sr.emit("playbackheartbeatend",{viewer_time:Or.viewer_time}),Rr._playbackHeartbeatInterval=null)})}var br,Tr;return br=Ar,(Tr=[{key:"_startPlaybackHeartbeatInterval",value:function(){var Sr=this;this._playbackHeartbeatInterval===null&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=tr().setInterval(function(){Sr.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,this._playbackHeartbeatInterval!==null&&(tr().clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}])&&Ai(br.prototype,Tr),Object.defineProperty(br,"prototype",{writable:!1}),Ar}();function Dr(Ar,br,Tr){return Object.defineProperty(Ar,"prototype",{writable:!1}),Ar}var Lr=Dr(function Ar(br){var Tr=this;(function(Sr,Rr){if(!(Sr instanceof Rr))throw new TypeError("Cannot call a class as a function")})(this,Ar),br.on("viewinit",function(){Tr.viewErrored=!1}),br.on("error",function(Sr,Rr){try{var Br=br.errorTranslator({player_error_code:Rr.player_error_code,player_error_message:Rr.player_error_message,player_error_context:Rr.player_error_context});Br?(br.data.player_error_code=Br.player_error_code||Rr.player_error_code,br.data.player_error_message=Br.player_error_message||Rr.player_error_message,br.data.player_error_context=Br.player_error_context||Rr.player_error_context,Tr.viewErrored=!0):(delete br.data.player_error_code,delete br.data.player_error_message,delete br.data.player_error_context)}catch(Or){br.mux.log.warn("Exception in error translator callback.",Or),Tr.viewErrored=!0}})});function Nr(Ar,br){for(var Tr=0;Tr<br.length;Tr++){var Sr=br[Tr];Sr.enumerable=Sr.enumerable||!1,Sr.configurable=!0,"value"in Sr&&(Sr.writable=!0),Object.defineProperty(Ar,Sr.key,Sr)}}var Wr=function(){function Ar(Sr){(function(Rr,Br){if(!(Rr instanceof Br))throw new TypeError("Cannot call a class as a function")})(this,Ar),this.pm=Sr,this._watchTimeTrackerLastCheckedTime=null,Sr.on("playbackheartbeat",this._updateWatchTime.bind(this)),Sr.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}var br,Tr;return br=Ar,(Tr=[{key:"_updateWatchTime",value:function(Sr,Rr){var Br=Rr.viewer_time;this._watchTimeTrackerLastCheckedTime===null&&(this._watchTimeTrackerLastCheckedTime=Br),vr(this.pm.data,"view_watch_time",Br-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=Br}},{key:"_clearWatchTimeState",value:function(Sr,Rr){this._updateWatchTime(Sr,Rr),this._watchTimeTrackerLastCheckedTime=null}}])&&Nr(br.prototype,Tr),Object.defineProperty(br,"prototype",{writable:!1}),Ar}();function qr(Ar,br){for(var Tr=0;Tr<br.length;Tr++){var Sr=br[Tr];Sr.enumerable=Sr.enumerable||!1,Sr.configurable=!0,"value"in Sr&&(Sr.writable=!0),Object.defineProperty(Ar,Sr.key,Sr)}}var Fr=function(){function Ar(Sr){var Rr=this;(function(Kr,zr){if(!(Kr instanceof zr))throw new TypeError("Cannot call a class as a function")})(this,Ar),this.pm=Sr,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=dr.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null;var Br=this._startPlaybackTimeTracking.bind(this);Sr.on("playing",Br),Sr.on("adplaying",Br),Sr.on("seeked",Br);var Or=this._stopPlaybackTimeTracking.bind(this);Sr.on("playbackheartbeatend",Or),Sr.on("seeking",Or),Sr.on("adplaying",function(){Rr._isAdPlaying=!0}),Sr.on("adended",function(){Rr._isAdPlaying=!1}),Sr.on("adpause",function(){Rr._isAdPlaying=!1}),Sr.on("adbreakstart",function(){Rr._isAdPlaying=!1}),Sr.on("adbreakend",function(){Rr._isAdPlaying=!1}),Sr.on("adplay",function(){Rr._isAdPlaying=!1}),Sr.on("viewinit",function(){Rr._playbackTimeTrackerLastPlayheadPosition=-1,Rr._lastTime=dr.now(),Rr._isAdPlaying=!1,Rr._callbackUpdatePlaybackTime=null})}var br,Tr;return br=Ar,(Tr=[{key:"_startPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime===null&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,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 Sr=this.pm.data.player_playhead_time,Rr=dr.now(),Br=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&Sr>this._playbackTimeTrackerLastPlayheadPosition?Br=Sr-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(Br=Rr-this._lastTime),Br>0&&Br<=1e3&&vr(this.pm.data,"view_content_playback_time",Br),this._playbackTimeTrackerLastPlayheadPosition=Sr,this._lastTime=Rr}}])&&qr(br.prototype,Tr),Object.defineProperty(br,"prototype",{writable:!1}),Ar}();function Ti(Ar,br){for(var Tr=0;Tr<br.length;Tr++){var Sr=br[Tr];Sr.enumerable=Sr.enumerable||!1,Sr.configurable=!0,"value"in Sr&&(Sr.writable=!0),Object.defineProperty(Ar,Sr.key,Sr)}}var Xr=function(){function Ar(Sr){(function(Br,Or){if(!(Br instanceof Or))throw new TypeError("Cannot call a class as a function")})(this,Ar),this.pm=Sr;var Rr=this._updatePlayheadTime.bind(this);Sr.on("playbackheartbeat",Rr),Sr.on("playbackheartbeatend",Rr),Sr.on("timeupdate",Rr),Sr.on("destroy",function(){Sr.off("timeupdate",Rr)})}var br,Tr;return br=Ar,(Tr=[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=this.pm.data.view_max_playhead_position===void 0?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(Sr,Rr){var Br=this,Or=function(){Br.pm.currentFragmentPDT&&Br.pm.currentFragmentStart&&(Br.pm.data.player_program_time=Br.pm.currentFragmentPDT+Br.pm.data.player_playhead_time-Br.pm.currentFragmentStart)};if(Rr&&Rr.player_playhead_time)this.pm.data.player_playhead_time=Rr.player_playhead_time,Or(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var Kr=this.pm.getPlayheadTime();Kr!==void 0&&(this.pm.data.player_playhead_time=Kr,Or(),this._updateMaxPlayheadPosition())}}}])&&Ti(br.prototype,Tr),Object.defineProperty(br,"prototype",{writable:!1}),Ar}();function Si(Ar,br,Tr){return Object.defineProperty(Ar,"prototype",{writable:!1}),Ar}var jr=3e5,wi=Si(function Ar(br){if(function(Br,Or){if(!(Br instanceof Or))throw new TypeError("Cannot call a class as a function")}(this,Ar),!br.disableRebufferTracking){var Tr,Sr=function(Br,Or){Rr(Or),Tr=void 0},Rr=function(Br){if(Tr){var Or=Br.viewer_time-Tr;vr(br.data,"view_rebuffer_duration",Or),Tr=Br.viewer_time,br.data.view_rebuffer_duration>jr&&(br.emit("viewend"),br.send("viewend"),br.mux.log.warn("Ending view after rebuffering for longer than ".concat(jr,"ms, future events will be ignored unless a programchange or videochange occurs.")))}br.data.view_watch_time>=0&&br.data.view_rebuffer_count>0&&(br.data.view_rebuffer_frequency=br.data.view_rebuffer_count/br.data.view_watch_time,br.data.view_rebuffer_percentage=br.data.view_rebuffer_duration/br.data.view_watch_time)};br.on("playbackheartbeat",function(Br,Or){return Rr(Or)}),br.on("rebufferstart",function(Br,Or){Tr||(vr(br.data,"view_rebuffer_count",1),Tr=Or.viewer_time,br.one("rebufferend",Sr))}),br.on("viewinit",function(){Tr=void 0,br.off("rebufferend",Sr)})}});function ki(Ar,br){for(var Tr=0;Tr<br.length;Tr++){var Sr=br[Tr];Sr.enumerable=Sr.enumerable||!1,Sr.configurable=!0,"value"in Sr&&(Sr.writable=!0),Object.defineProperty(Ar,Sr.key,Sr)}}var Ii=function(){function Ar(Sr){var Rr=this;(function(Br,Or){if(!(Br instanceof Or))throw new TypeError("Cannot call a class as a function")})(this,Ar),this.pm=Sr,Sr.disableRebufferTracking||Sr.disablePlayheadRebufferTracking||(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,Sr.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),Sr.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),Sr.on("seeking",function(){Rr._cleanupRebufferTracker(null,{viewer_time:dr.now()})}))}var br,Tr;return br=Ar,Tr=[{key:"_checkIfRebuffering",value:function(Sr,Rr){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing)this._cleanupRebufferTracker(Sr,Rr);else if(this._lastCheckedTime!==null)if(this._lastPlayheadTime===this.pm.data.player_playhead_time){var Br=Rr.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.sustainedRebufferThreshold=="number"&&Br>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=Rr.viewer_time}else this._cleanupRebufferTracker(Sr,Rr,!0);else this._prepareRebufferTrackerState(Rr.viewer_time)}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(Sr){this._lastCheckedTime=Sr,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=Sr}},{key:"_cleanupRebufferTracker",value:function(Sr,Rr){var Br=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:Rr.viewer_time});else{if(this._lastCheckedTime===null)return;var Or=this.pm.data.player_playhead_time-this._lastPlayheadTime,Kr=Rr.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.minimumRebufferDuration=="number"&&Or>0&&Kr-Or>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+Kr-Or}))}Br?this._prepareRebufferTrackerState(Rr.viewer_time):this._clearRebufferTrackerState()}}],Tr&&ki(br.prototype,Tr),Object.defineProperty(br,"prototype",{writable:!1}),Ar}(),Pi=Ii;function Di(Ar,br){for(var Tr=0;Tr<br.length;Tr++){var Sr=br[Tr];Sr.enumerable=Sr.enumerable||!1,Sr.configurable=!0,"value"in Sr&&(Sr.writable=!0),Object.defineProperty(Ar,Sr.key,Sr)}}var Oi=function(){function Ar(Sr){var Rr=this;(function(Br,Or){if(!(Br instanceof Or))throw new TypeError("Cannot call a class as a function")})(this,Ar),this.pm=Sr,Sr.on("viewinit",function(){var Br=Sr.data,Or=Br.view_id;if(!Br.view_program_changed){var Kr=function(zr,Gr){var Li=Gr.viewer_time;zr.type==="playing"&&Sr.data.view_time_to_first_frame===void 0?Rr.calculateTimeToFirstFrame(Li||dr.now(),Or):zr.type!=="adplaying"||Sr.data.view_time_to_first_frame
3737!==void 0&&!Rr._inPrerollPosition()||Rr.calculateTimeToFirstFrame(Li||dr.now(),Or)};Sr.one("playing",Kr),Sr.one("adplaying",Kr),Sr.one("viewend",function(){Sr.off("playing",Kr),Sr.off("adplaying",Kr)})}})}var br,Tr;return br=Ar,(Tr=[{key:"_inPrerollPosition",value:function(){return this.pm.data.view_content_playback_time===void 0||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(Sr,Rr){Rr===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:Sr}),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.NAVIGATION_START&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.NAVIGATION_START))}}])&&Di(br.prototype,Tr),Object.defineProperty(br,"prototype",{writable:!1}),Ar}();function Wi(Ar,br,Tr){return Object.defineProperty(Ar,"prototype",{writable:!1}),Ar}var Zi=Wi(function Ar(br){var Tr=this;(function(Sr,Rr){if(!(Sr instanceof Rr))throw new TypeError("Cannot call a class as a function")})(this,Ar),br.on("viewinit",function(){Tr._lastPlayheadPosition=-1}),["pause","rebufferstart","seeking","error","adbreakstart","hb"].forEach(function(Sr){br.on(Sr,function(){if(Tr._lastPlayheadPosition>=0&&br.data.player_playhead_time>=0&&Tr._lastPlayerWidth>=0&&Tr._lastSourceWidth>0&&Tr._lastPlayerHeight>=0&&Tr._lastSourceHeight>0){var Rr=br.data.player_playhead_time-Tr._lastPlayheadPosition;if(Rr<0)return void(Tr._lastPlayheadPosition=-1);var Br=Math.min(Tr._lastPlayerWidth/Tr._lastSourceWidth,Tr._lastPlayerHeight/Tr._lastSourceHeight),Or=Math.max(0,Br-1),Kr=Math.max(0,1-Br);br.data.view_max_upscale_percentage=Math.max(br.data.view_max_upscale_percentage||0,Or),br.data.view_max_downscale_percentage=Math.max(br.data.view_max_downscale_percentage||0,Kr),vr(br.data,"view_total_content_playback_time",Rr),vr(br.data,"view_total_upscaling",Or*Rr),vr(br.data,"view_total_downscaling",Kr*Rr)}Tr._lastPlayheadPosition=-1})}),["playing","hb"].forEach(function(Sr){br.on(Sr,function(){Tr._lastPlayheadPosition=br.data.player_playhead_time,Tr._lastPlayerWidth=br.data.player_width,Tr._lastPlayerHeight=br.data.player_height,Tr._lastSourceWidth=br.data.video_source_width,Tr._lastSourceHeight=br.data.video_source_height})})});function en(Ar,br,Tr){return Object.defineProperty(Ar,"prototype",{writable:!1}),Ar}var un=en(function Ar(br){var Tr=this;(function(Br,Or){if(!(Br instanceof Or))throw new TypeError("Cannot call a class as a function")})(this,Ar),this.isSeeking=!1;var Sr=-1,Rr=function(){var Br=dr.now(),Or=(br.data.viewer_time||Br)-(Sr||Br);vr(br.data,"view_seek_duration",Or),br.data.view_max_seek_time=Math.max(br.data.view_max_seek_time||0,Or),Tr.isSeeking=!1,Sr=-1};br.on("seeking",function(Br,Or){Object.assign(br.data,Or),Tr.isSeeking&&Or.viewer_time-Sr<=2e3?Sr=Or.viewer_time:(Tr.isSeeking&&Rr(),Tr.isSeeking=!0,Sr=Or.viewer_time,vr(br.data,"view_seek_count",1),br.send("seeking"))}),br.on("seeked",function(){Rr()}),br.on("viewend",function(){Tr.isSeeking&&(Rr(),br.send("seeked")),Tr.isSeeking=!1,Sr=-1})});function fn(Ar,br){return function(Tr){if(Array.isArray(Tr))return Tr}(Ar)||function(Tr,Sr){var Rr=Tr==null?null:typeof Symbol<"u"&&Tr[Symbol.iterator]||Tr["@@iterator"];if(Rr!=null){var Br,Or,Kr=[],zr=!0,Gr=!1;try{for(Rr=Rr.call(Tr);!(zr=(Br=Rr.next()).done)&&(Kr.push(Br.value),!Sr||Kr.length!==Sr);zr=!0);}catch(Li){Gr=!0,Or=Li}finally{try{zr||Rr.return==null||Rr.return()}finally{if(Gr)throw Or}}return Kr}}(Ar,br)||function(Tr,Sr){if(Tr){if(typeof Tr=="string")return an(Tr,Sr);var Rr=Object.prototype.toString.call(Tr).slice(8,-1);return Rr==="Object"&&Tr.constructor&&(Rr=Tr.constructor.name),Rr==="Map"||Rr==="Set"?Array.from(Tr):Rr==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Rr)?an(Tr,Sr):void 0}}(Ar,br)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 3738In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function an(Ar,br){(br==null||br>Ar.length)&&(br=Ar.length);for(var Tr=0,Sr=new Array(br);Tr<br;Tr++)Sr[Tr]=Ar[Tr];return Sr}function mn(Ar,br){for(var Tr=0;Tr<br.length;Tr++){var Sr=br[Tr];Sr.enumerable=Sr.enumerable||!1,Sr.configurable=!0,"value"in Sr&&(Sr.writable=!0),Object.defineProperty(Ar,Sr.key,Sr)}}var on=function(Ar,br){Ar.push(br),Ar.sort(function(Tr,Sr){return Tr.viewer_time-Sr.viewer_time})},Pn=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],Un=function(){function Ar(Sr){var Rr=this;(function(Or,Kr){if(!(Or instanceof Kr))throw new TypeError("Cannot call a class as a function")})(this,Ar),this.pm=Sr,Sr.on("viewinit",function(){Rr.isAdBreak=!1,Rr._currentAdRequestNumber=0,Rr._currentAdResponseNumber=0,Rr._adRequests=[],Rr._adResponses=[],Rr._adHasPlayed=!1,Rr._wouldBeNewAdPlay=!0,Rr._prerollPlayTime=void 0}
3738),Pn.forEach(function(Or){return Sr.on(Or,Rr._updateAdData.bind(Rr))});var Br=function(){Rr.isAdBreak=!1};Sr.on("adbreakstart",function(){Rr.isAdBreak=!0}),Sr.on("play",Br),Sr.on("playing",Br),Sr.on("viewend",Br),Sr.on("adrequest",function(Or,Kr){Kr=Object.assign({ad_request_id:"generatedAdRequestId"+Rr._currentAdRequestNumber++},Kr),on(Rr._adRequests,Kr),vr(Sr.data,"view_ad_request_count"),Rr.inPrerollPosition()&&(Sr.data.view_preroll_requested=!0,Rr._adHasPlayed||vr(Sr.data,"view_preroll_request_count"))}),Sr.on("adresponse",function(Or,Kr){Kr=Object.assign({ad_request_id:"generatedAdRequestId"+Rr._currentAdResponseNumber++},Kr),on(Rr._adResponses,Kr);var zr=Rr.findAdRequest(Kr.ad_request_id);zr&&vr(Sr.data,"view_ad_request_time",Math.max(0,Kr.viewer_time-zr.viewer_time))}),Sr.on("adplay",function(Or,Kr){Rr._adHasPlayed=!0,Rr._wouldBeNewAdPlay&&(Rr._wouldBeNewAdPlay=!1,vr(Sr.data,"view_ad_played_count")),Rr.inPrerollPosition()&&!Sr.data.view_preroll_played&&(Sr.data.view_preroll_played=!0,Rr._adRequests.length>0&&(Sr.data.view_preroll_request_time=Math.max(0,Kr.viewer_time-Rr._adRequests[0].viewer_time)),Sr.data.view_start&&(Sr.data.view_startup_preroll_request_time=Math.max(0,Kr.viewer_time-Sr.data.view_start)),Rr._prerollPlayTime=Kr.viewer_time)}),Sr.on("adplaying",function(Or,Kr){Rr.inPrerollPosition()&&Sr.data.view_preroll_load_time===void 0&&Rr._prerollPlayTime!==void 0&&(Sr.data.view_preroll_load_time=Kr.viewer_time-Rr._prerollPlayTime,Sr.data.view_startup_preroll_load_time=Kr.viewer_time-Rr._prerollPlayTime)}),Sr.on("adclicked",function(Or,Kr){Rr._wouldBeNewAdPlay||vr(Sr.data,"view_ad_clicked_count")}),Sr.on("adskipped",function(Or,Kr){Rr._wouldBeNewAdPlay||vr(Sr.data,"view_ad_skipped_count")}),Sr.on("adended",function(){Rr._wouldBeNewAdPlay=!0}),Sr.on("aderror",function(){Rr._wouldBeNewAdPlay=!0})}var br,Tr;return br=Ar,(Tr=[{key:"inPrerollPosition",value:function(){return this.pm.data.view_content_playback_time===void 0||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(Sr){for(var Rr=0;Rr<this._adRequests.length;Rr++)if(this._adRequests[Rr].ad_request_id===Sr)return this._adRequests[Rr]}},{key:"_updateAdData",value:function(Sr,Rr){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&Rr.ad_tag_url){var Br=fn(pr(Rr.ad_tag_url),2),Or=Br[0],Kr=Br[1];this.pm.data.view_preroll_ad_tag_domain=Kr,this.pm.data.view_preroll_ad_tag_hostname=Or}if(!this.pm.data.view_preroll_ad_asset_hostname&&Rr.ad_asset_url){var zr=fn(pr(Rr.ad_asset_url),2),Gr=zr[0],Li=zr[1];this.pm.data.view_preroll_ad_asset_domain=Li,this.pm.data.view_preroll_ad_asset_hostname=Gr}}this.pm.data.ad_asset_url=Rr==null?void 0:Rr.ad_asset_url,this.pm.data.ad_tag_url=Rr==null?void 0:Rr.ad_tag_url,this.pm.data.ad_creative_id=Rr==null?void 0:Rr.ad_creative_id,this.pm.data.ad_id=Rr==null?void 0:Rr.ad_id,this.pm.data.ad_universal_id=Rr==null?void 0:Rr.ad_universal_id}}])&&mn(br.prototype,Tr),Object.defineProperty(br,"prototype",{writable:!1}),Ar}();function Xn(Ar,br,Tr){return Object.defineProperty(Ar,"prototype",{writable:!1}),Ar}var tn=Xn(function Ar(br){var Tr,Sr;(function(Kr,zr){if(!(Kr instanceof zr))throw new TypeError("Cannot call a class as a function")})(this,Ar);var Rr=function(){br.disableRebufferTracking||Tr&&(vr(br.data,"view_waiting_rebuffer_duration",dr.now()-Tr),Tr=!1,tr().clearInterval(Sr))},Br=!1,Or=function(){Br=!1,Rr()};br.on("waiting",function(){Br&&(br.disableRebufferTracking||(vr(br.data,"view_waiting_rebuffer_count",1),Tr=dr.now(),Sr=tr().setInterval(function(){if(Tr){var Kr=dr.now();vr(br.data,"view_waiting_rebuffer_duration",Kr-Tr),Tr=Kr}},250)))}),br.on("playing",function(){Rr(),Br=!0}),br.on("pause",Or),br.on("seeking",Or)});function Jn(Ar,br,Tr){return Object.defineProperty(Ar,"prototype",{writable:!1}),Ar}var Vn=Jn(function Ar(br){var Tr=this;(function(Br,Or){if(!(Br instanceof Or))throw new TypeError("Cannot call a class as a function")})(this,Ar);var Sr=function(){Tr.lastWallClockTime=dr.now(),br.on("before*",Rr)},Rr=function(Br){var Or=dr.now(),Kr=Tr.lastWallClockTime;Tr.lastWallClockTime=Or,Or-Kr>3e4&&(br.emit("devicesleep",{viewer_time:Kr}),Object.assign(br.data,{viewer_time:Kr}),br.send("devicesleep"),br.emit("devicewake",{viewer_time:Or}),Object.assign(br.data,{viewer_time:Or}),br.send("devicewake"))};br.one("playbackheartbeat",Sr),br.on("playbackheartbeatend",function(){br.off("before*",Rr),br.one("playbackheartbeat",Sr)})}),Fn=Mt(375),Gn=Mt(655),Yn=Mt.n(Gn),Zn="muxData",Kn=function(){var Ar;try{Ar=Fn.parse(Yn().get(Zn)||"")}catch{Ar={}}return Ar},rs=function(Ar){try{Yn().set(Zn,Fn.stringify(Ar),{expires:365})}catch{}},Qi=function(){var Ar=Kn();return Ar.mux_viewer_id=Ar.mux_viewer_id||ir(),Ar.msn=Ar.msn||Math.random(),rs(Ar),{mux_viewer_id:Ar.mux_viewer_id,mux_sample_number:Ar.msn}};function Ki(Ar,br){var Tr=br.beaconCollectionDomain,Sr=br.beaconDomain;if(Tr)return"https://"+Tr;var Rr=Sr||"litix.io";return(Ar=Ar||"inferred").match(/^[a-z0-9]+$/)?"https://"+Ar+"."+Rr:"https://img.litix.io/a.gif"}var ln=function(){var Ar;switch(Ri()){case"cellular":Ar="cellular";break;case"ethernet":Ar="wired";break;case"wifi":Ar="wifi";break;case void 0:break;default:Ar="other"}return Ar},Ri=function(){var Ar=tr().navigator,br=Ar&&(Ar.connection||Ar.mozConnection||Ar.webkitConnection);return br&&br.type};ln.getConnectionFromAPI=Ri;var Xi=ln,Bi=wn({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"}),Yi=wn({ad:"ad",ag:"aggregate",ap:"api",al:"application",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",br:"break",bw:"browser",by:"bytes",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ck:"clicked",cl:"canceled",cn:"config",co:"count",ce:"counter",cp:"complete",cr:"creative",ct:"content",cu:"current",cx:"c
3738onnection",cz:"context",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ep:"experiments",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",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pr:"preload",ps:"position",pt:"part",py:"property",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",st:"start",su:"startup",sv:"server",sw:"software",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 wn(Ar){var br={};for(var Tr in Ar)Ar.hasOwnProperty(Tr)&&(br[Ar[Tr]]=Tr);return br}function rn(Ar){var br={},Tr={};return Object.keys(Ar).forEach(function(Sr){var Rr=!1;if(Ar.hasOwnProperty(Sr)&&Ar[Sr]!==void 0){var Br=Sr.split("_"),Or=Br[0],Kr=Bi[Or];Kr||(ur.info("Data key word `"+Br[0]+"` not expected in "+Sr),Kr=Or+"_"),Br.splice(1).forEach(function(zr){zr==="url"&&(Rr=!0),Yi[zr]?Kr+=Yi[zr]:Number(zr)&&Math.floor(Number(zr))===Number(zr)?Kr+=zr:(ur.info("Data key word `"+zr+"` not expected in "+Sr),Kr+="_"+zr+"_")}),Rr?Tr[Kr]=Ar[Sr]:br[Kr]=Ar[Sr]}}),Object.assign(br,Tr)}var En={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},$n=["hb","requestcompleted","requestfailed","requestcanceled"],_n="https://img.litix.io",cn=function(Ar){var br=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._beaconUrl=Ar||_n,this._eventQueue=[],this._postInFlight=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},En,br)};cn.prototype.queueEvent=function(Ar,br){var Tr=Object.assign({},br);return(this._eventQueue.length<=this._options.maxQueueLength||Ar==="eventrateexceeded")&&(this._eventQueue.push(Tr),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength)},cn.prototype.flushEvents=function(){var Ar=arguments.length>0&&arguments[0]!==void 0&&arguments[0];Ar&&this._eventQueue.length===1?this._eventQueue.pop():(this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending())},cn.prototype.destroy=function(){var Ar=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this.destroyed=!0,Ar?this._clearBeaconQueue():this.flushEvents(),tr().clearTimeout(this._sendTimeout)},cn.prototype._clearBeaconQueue=function(){var Ar=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,br=this._eventQueue.slice(Ar);Ar>0&&Object.assign(br[br.length-1],rn({mux_view_message:"event queue truncated"}));var Tr=this._createPayload(br);Bn(this._beaconUrl,Tr,!0,function(){})},cn.prototype._sendBeaconQueue=function(){var Ar=this;if(!this._postInFlight){var br=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var Tr=this._createPayload(br),Sr=dr.now();Bn(this._beaconUrl,Tr,!1,function(Rr,Br){Br?(Ar._eventQueue=br.concat(Ar._eventQueue),Ar._failureCount+=1,ur.info("Error sending beacon: "+Br)):Ar._failureCount=0,Ar._roundTripTime=dr.now()-Sr,Ar._postInFlight=!1})}},cn.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var Ar=Math.pow(2,this._failureCount-1);return(1+(Ar*=Math.random()))*this._options.baseTimeBetweenBeacons},cn.prototype._startBeaconSending=function(){var Ar=this;tr().clearTimeout(this._sendTimeout),this.destroyed||(this._sendTimeout=tr().setTimeout(function(){Ar._eventQueue.length&&Ar._sendBeaconQueue(),Ar._startBeaconSending()},this._getNextBeaconTime()))},cn.prototype._createPayload=function(Ar){var br,Tr,Sr,Rr=this,Br={transmission_timestamp:Math.round(dr.now())};this._roundTripTime&&(Br.rtt_ms=Math.round(this._roundTripTime));var Or=function(){br=JSON.stringify({metadata:Br,events:Tr||Ar}),Sr=br.length/1024},Kr=function(){return Sr<=Rr._options.maxPayloadKBSize};return Or(),Kr()||(ur.info("Payload size is too big ("+Sr+" kb). Removing unnecessary events."),Tr=Ar.filter(function(zr){return $n.indexOf(zr.e)===-1}),Or()),Kr()||(ur.info("Payload size still too big ("+Sr+" kb). Cropping fields.."),Tr.forEach(function(zr){for(var Gr in zr){var Li=zr[Gr];
3738typeof Li=="string"&&Li.length>51200&&(zr[Gr]=Li.substring(0,51200))}}),Or()),br};var pn=function(Ar){return Ar.length<=57344},Bn=function(Ar,br,Tr,Sr){if(Tr&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(Ar,br))Sr();else if(tr().fetch)tr().fetch(Ar,{method:"POST",body:br,headers:{"Content-Type":"text/plain"},keepalive:pn(br)}).then(function(Br){return Sr(null,Br.ok?null:"Error")}).catch(function(Br){return Sr(null,Br)});else{if(tr().XMLHttpRequest){var Rr=new(tr()).XMLHttpRequest;return Rr.onreadystatechange=function(){if(Rr.readyState===4)return Sr(null,Rr.status!==200?"error":void 0)},Rr.open("POST",Ar),Rr.setRequestHeader("Content-Type","text/plain"),void Rr.send(br)}Sr()}},vn=cn;function Nn(Ar,br){return function(Tr){if(Array.isArray(Tr))return Tr}(Ar)||function(Tr,Sr){var Rr=Tr==null?null:typeof Symbol<"u"&&Tr[Symbol.iterator]||Tr["@@iterator"];if(Rr!=null){var Br,Or,Kr=[],zr=!0,Gr=!1;try{for(Rr=Rr.call(Tr);!(zr=(Br=Rr.next()).done)&&(Kr.push(Br.value),!Sr||Kr.length!==Sr);zr=!0);}catch(Li){Gr=!0,Or=Li}finally{try{zr||Rr.return==null||Rr.return()}finally{if(Gr)throw Or}}return Kr}}(Ar,br)||function(Tr,Sr){if(Tr){if(typeof Tr=="string")return Hn(Tr,Sr);var Rr=Object.prototype.toString.call(Tr).slice(8,-1);return Rr==="Object"&&Tr.constructor&&(Rr=Tr.constructor.name),Rr==="Map"||Rr==="Set"?Array.from(Tr):Rr==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Rr)?Hn(Tr,Sr):void 0}}(Ar,br)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 3739In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Hn(Ar,br){(br==null||br>Ar.length)&&(br=Ar.length);for(var Tr=0,Sr=new Array(br);Tr<br;Tr++)Sr[Tr]=Ar[Tr];return Sr}function Rn(Ar,br){var Tr=Object.keys(Ar);if(Object.getOwnPropertySymbols){var Sr=Object.getOwnPropertySymbols(Ar);br&&(Sr=Sr.filter(function(Rr){return Object.getOwnPropertyDescriptor(Ar,Rr).enumerable})),Tr.push.apply(Tr,Sr)}return Tr}function yn(Ar){for(var br=1;br<arguments.length;br++){var Tr=arguments[br]!=null?arguments[br]:{};br%2?Rn(Object(Tr),!0).forEach(function(Sr){Cn(Ar,Sr,Tr[Sr])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ar,Object.getOwnPropertyDescriptors(Tr)):Rn(Object(Tr)).forEach(function(Sr){Object.defineProperty(Ar,Sr,Object.getOwnPropertyDescriptor(Tr,Sr))})}return Ar}function Sn(Ar){return Sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(br){return typeof br}:function(br){return br&&typeof Symbol=="function"&&br.constructor===Symbol&&br!==Symbol.prototype?"symbol":typeof br},Sn(Ar)}function es(Ar,br){if(!(Ar instanceof br))throw new TypeError("Cannot call a class as a function")}function cs(Ar,br){for(var Tr=0;Tr<br.length;Tr++){var Sr=br[Tr];Sr.enumerable=Sr.enumerable||!1,Sr.configurable=!0,"value"in Sr&&(Sr.writable=!0),Object.defineProperty(Ar,Sr.key,Sr)}}function Cn(Ar,br,Tr){return br in Ar?Object.defineProperty(Ar,br,{value:Tr,enumerable:!0,configurable:!0,writable:!0}):Ar[br]=Tr,Ar}var In=["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"],jn=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],hs=["ad_id","ad_creative_id","ad_universal_id"],ys=["viewstart","error","ended","viewend"],ns=function(){function Ar(Sr,Rr){var Br,Or,Kr,zr,Gr,Li,Ui,sn,Gi,Hi,ji,An,On,Ln,gn,ts=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};es(this,Ar),Cn(this,"previousBeaconData",null),Cn(this,"lastEventTime",0),Cn(this,"rateLimited",!1),this.mux=Sr,this.envKey=Rr,this.options=ts,this.eventQueue=new vn(Ki(this.envKey,this.options)),this.sampleRate=(Br=this.options.sampleRate)!==null&&Br!==void 0?Br:1,this.disableCookies=(Or=this.options.disableCookies)!==null&&Or!==void 0&&Or,this.respectDoNotTrack=(Kr=this.options.respectDoNotTrack)!==null&&Kr!==void 0&&Kr,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:(zr=this.options.platform)===null||zr===void 0?void 0:zr.name,viewer_application_version:(Gr=this.options.platform)===null||Gr===void 0?void 0:Gr.version,viewer_application_engine:(Li=this.options.platform)===null||Li===void 0?void 0:Li.layout,viewer_device_name:(Ui=this.options.platform)===null||Ui===void 0?void 0:Ui.product,viewer_device_category:"",viewer_device_manufacturer:(sn=this.options.platform)===null||sn===void 0?void 0:sn.manufacturer,viewer_os_family:(Gi=this.options.platform)===null||Gi===void 0||(Hi=Gi.os)===null||Hi===void 0?void 0:Hi.family,viewer_os_architecture:(ji=this.options.platform)===null||ji===void 0||(An=ji.os)===null||An===void 0?void 0:An.architecture,viewer_os_version:(On=this.options.platform)===null||On===void 0||(Ln=On.os)===null||Ln===void 0?void 0:Ln.version,viewer_connection_type:Xi(),page_url:tr()===null||tr()===void 0||(gn=tr().location)===null||gn===void 0?void 0:gn.href},this.viewerData=this.disableCookies?{}:Qi()}var br,Tr;return br=Ar,(Tr=[{key:"send",value:function(Sr,Rr){var Br;if(Sr&&Rr!=null&&Rr.view_id){if(this.respectDoNotTrack&&or())return ur.info("Not sending `"+Sr+"` because Do Not Track is enabled");if(!Rr||Sn(Rr)!=="object")return ur.error("A data object was expected in send() but was not provided");var Or,Kr,zr=this.disableCookies?{}:(Or=Kn(),Kr=dr.now(),Or.session_start&&(Or.sst=Or.session_start,delete Or.session_start),Or.session_id&&(Or.sid=Or.session_id,delete Or.session_id),Or.session_expires&&(Or.sex=Or.session_expires,delete Or.session_expires),(!Or.sex||Or.sex<Kr)&&(Or.sid=ir(),Or.sst=Kr),Or.sex=Kr+15e5,rs(Or),{session_id:Or.sid,session_start:Or.sst,session_expires:Or.sex}),Gr=yn(yn(yn(yn(yn({},this.pageLevelData),Rr),zr),this.viewerData),{},{event:Sr,env_key:this.envKey});Gr.user_id&&(Gr.viewer_user_id=Gr.user_id,delete Gr.user_id);var Li=((Br=Gr.mux_sample_number)!==null&&Br!==void 0?Br:0)>=this.sampleRate,Ui=rn(this._deduplicateBeaconData(Sr,Gr));if(this.lastEventTime=this.mux.utils.now(),Li)return ur.info("Not sending event due to sample rate restriction",Sr,Gr,Ui);if(this.envKey||ur.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",Sr,Gr,Ui),!this.rateLimited){if(ur.info("Sending event",Sr,Gr,Ui),this.rateLimited=!this.eventQueue.queueEvent(Sr,Ui),this.mux.WINDOW_UNLOADING&&Sr==="viewend")this.eventQueue.destroy(!0);else if(this.mux.WINDOW_HIDDEN&&Sr==="hb"?this.eventQueue.flushEvents(!0):ys.indexOf(Sr)>=0&&this.eventQueue.flushEvents(),this.rateLimited)return Gr.event="eventrateexceeded",Ui=rn(Gr),this.eventQueue.queueEvent(Gr.event,Ui),ur.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(Sr,Rr){var Br=this,Or={},Kr=Rr.view_id;if(Kr==="-1"||Sr==="viewstart"||Sr==="viewend"||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=6e5)Or=yn({},Rr),Kr&&(this.previousBeaconData=Or),Kr&&Sr==="viewend"&&(this.previousBeaconData=null);else{var zr=Sr.indexOf("request")===0;Object.entries(Rr).forEach(function(Gr){var Li=Nn(Gr,2),Ui=Li[0],sn=Li[1];Br.previousBeaconData&&(sn!==Br.previousBeaconData[Ui]||In.indexOf(Ui)>-1||Br.objectHasChanged(zr,Ui,sn,Br.previousBeaconData[Ui])||Br.eventRequiresKey(Sr,Ui))&&(Or[Ui]=sn,Br.previousBeaconData[Ui]=sn)})}return Or}},{key:"objectHasChanged",value:function(Sr,Rr,Br,Or){return!(!Sr||Rr.indexOf("request_")!==0||Rr!=="request_response_headers"&&Sn(Br)==="object"&&Sn(Or)==="object"&&Object.keys(Br||{}).length===Object.keys(Or||{}).length)}},{key:"eventRequiresKey",value:function(Sr,Rr){return Sr==="renditionchange"&&Rr.indexOf("video_source_")===0||!(!hs.includes(Rr)||!jn.includes(Sr))}}])&&cs(br.prototype,Tr),Object.defineProperty(br,"prototype",{writable:!1}),Ar}();function Wn(Ar,br,Tr){return Object.defineProperty(Ar,"prototype",{writable:!1}),Ar}var ss=Wn(function Ar(br){(function(Gr,Li){if(!(Gr instanceof Li))throw new TypeError("Cannot call a class as a function")})(this,Ar);var Tr=0,Sr=0,Rr=0,Br=0,Or=0,Kr=0,zr=0;br.on("requestcompleted",function(Gr,Li){var Ui,sn,Gi=Li.request_start,Hi=Li.request_response_start,ji=Li.request_response_end,An=Li.request_bytes_loaded;if(Br++,Hi?(Ui=Hi-(Gi??0),sn=(ji??0)-Hi):sn=(ji??0)-(Gi??0),sn>0&&An&&An>0){var On=An/sn*8e3;Or++,Sr+=An,Rr+=sn,br.data.view_min_request_throughput=Math.min(br.data.view_min_request_throughput||1/0,On),br.data.view_average_request_throughput=Sr/Rr*8e3,br.data.view_request_count=Br,Ui>0&&(Tr+=Ui,br.data.view_max_request_latency=Math.max(br.data.view_max_request_latency||0,Ui),br.data.view_average_request_latency=Tr/Or)}}),br.on("requestfailed",function(Gr,Li){Br++,Kr++,br.data.view_request_count=Br,br.data.view_request_failed_count=Kr}),br.on("requestcanceled",function(Gr,Li){Br++,zr++,br.data.view_request_count=Br,br.data.view_request_canceled_count=zr})});function us(Ar,br,Tr){return Object.defineProperty(Ar,"prototype",{writable:!1}),Ar}var as=us(function Ar(br){var Tr=this;(function(Sr,Rr){if(!(Sr instanceof Rr))throw new TypeError("Cannot call a class as a function")})(this,Ar),br.on("before*",function(Sr,Rr){var Br=Rr.viewer_time,Or=dr.now(),Kr=Tr._lastEventTime;if(Tr._lastEventTime=Or,Kr&&Or-Kr>36e5){var zr=Object.keys(br.data).reduce(function(Gr,Li){return Li.indexOf("video_")===0?Object.assign(Gr,function(Ui,sn,Gi){return sn in Ui?Object.defineProperty(Ui,sn,{value:Gi,enumerable:!0,configurable:!0,writable:!0}):Ui[sn]=Gi,Ui}({},Li,br.data[Li])):Gr},{});br.mux.log.info("Received event after at least an hour inactivity, creating a new view"),br.emit("viewinit",Object.assign({viewer_time:Br},zr)),br.playbackHeartbeat._playheadShouldBeProgressing&&Sr.type!=="play"&&Sr.type!=="adbreakstart"&&(br.emit("play",{viewer_time:Br}),Sr.type!=="playing"&&br.emit("playing",{viewer_time:Br}))}})});function Ts(Ar){return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(br){return typeof br}:function(br){return br&&typeof Symbol=="function"&&br.constructor===Symbol&&br!==Symbol.prototype?"symbol":typeof br},Ts(Ar)}function Os(Ar,br){return function(Tr){if(Array.isArray(Tr))return Tr}(Ar)||function(Tr,Sr){var Rr=Tr==null?null:typeof Symbol<"u"&&Tr[Symbol.iterator]||Tr["@@iterator"];if(Rr!=null){var Br,Or,Kr=[],zr=!0,Gr=!1;try{for(Rr=Rr.call(Tr);!(zr=(Br=Rr.next()).done)&&(Kr.push(Br.value),!Sr||Kr.length!==Sr);zr=!0);}catch(Li){Gr=!0,Or=Li}finally{try{zr||Rr.return==null||Rr.return()}finally{if(Gr)throw Or}}return Kr}}(Ar,br)||function(Tr,Sr){if(Tr){if(typeof Tr=="string")return Is(Tr,Sr);var Rr=Object.prototype.toString.call(Tr).slice(8,-1);return Rr==="Object"&&Tr.constructor&&(Rr=Tr.constructor.name),Rr==="Map"||Rr==="Set"?Array.from(Tr):Rr==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Rr)?Is(Tr,Sr):void 0}}
3739(Ar,br)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 3740In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Is(Ar,br){(br==null||br>Ar.length)&&(br=Ar.length);for(var Tr=0,Sr=new Array(br);Tr<br;Tr++)Sr[Tr]=Ar[Tr];return Sr}function Ns(Ar,br){for(var Tr=0;Tr<br.length;Tr++){var Sr=br[Tr];Sr.enumerable=Sr.enumerable||!1,Sr.configurable=!0,"value"in Sr&&(Sr.writable=!0),Object.defineProperty(Ar,Sr.key,Sr)}}function Ss(Ar,br){return Ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Tr,Sr){return Tr.__proto__=Sr,Tr},Ss(Ar,br)}function Fs(Ar){var br=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var Tr,Sr=bs(Ar);if(br){var Rr=bs(this).constructor;Tr=Reflect.construct(Sr,arguments,Rr)}else Tr=Sr.apply(this,arguments);return Bs(this,Tr)}}function Bs(Ar,br){if(br&&(Ts(br)==="object"||typeof br=="function"))return br;if(br!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mn(Ar)}function Mn(Ar){if(Ar===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ar}function bs(Ar){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(br){return br.__proto__||Object.getPrototypeOf(br)},bs(Ar)}var Us=["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"],Vs=function(Ar){(function(Br,Or){if(typeof Or!="function"&&Or!==null)throw new TypeError("Super expression must either be null or a function");Br.prototype=Object.create(Or&&Or.prototype,{constructor:{value:Br,writable:!0,configurable:!0}}),Object.defineProperty(Br,"prototype",{writable:!1}),Or&&Ss(Br,Or)})(Rr,Ar);var br,Tr,Sr=Fs(Rr);function Rr(Br,Or,Kr){var zr,Gr;(function(Hi,ji){if(!(Hi instanceof ji))throw new TypeError("Cannot call a class as a function")})(this,Rr),(Gr=Sr.call(this)).DOM_CONTENT_LOADED_EVENT_END=mr.domContentLoadedEventEnd(),Gr.NAVIGATION_START=mr.navigationStart(),Gr.mux=Br,Gr.id=Or,(zr=Kr)!==null&&zr!==void 0&&zr.beaconDomain&&Gr.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),(Kr=Object.assign({debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,errorTranslator:function(Hi){return Hi}},Kr)).data=Kr.data||{},Kr.data.property_key&&(Kr.data.env_key=Kr.data.property_key,delete Kr.data.property_key),ur.setLevel(Kr.debug?"debug":"warn"),Gr.getPlayheadTime=Kr.getPlayheadTime,Gr.getStateData=Kr.getStateData||function(){return{}},Gr.getAdData=Kr.getAdData||function(){},Gr.minimumRebufferDuration=Kr.minimumRebufferDuration,Gr.sustainedRebufferThreshold=Kr.sustainedRebufferThreshold,Gr.playbackHeartbeatTime=Kr.playbackHeartbeatTime,Gr.disableRebufferTracking=Kr.disableRebufferTracking,Gr.disableRebufferTracking&&Gr.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."),Gr.disablePlayheadRebufferTracking=Kr.disablePlayheadRebufferTracking,Gr.errorTranslator=Kr.errorTranslator,Gr.playbackEventDispatcher=new ns(Br,Kr.data.env_key,Kr),Gr.data={player_instance_id:ir(),mux_sample_rate:Kr.sampleRate,beacon_domain:Kr.beaconCollectionDomain||Kr.beaconDomain},Gr.data.view_sequence_number=1,Gr.data.player_sequence_number=1,Gr.oldEmit=Gr.emit,Gr.emit=function(Hi,ji){ji=Object.assign({viewer_time:this.mux.utils.now()},ji),this.oldEmit(Hi,ji)};var Li=(function(){this.data.view_start===void 0&&(this.data.view_start=this.mux.utils.now(),this.emit
vendor: 4,245 bytes, line 3740
3740("viewstart"))}).bind(Mn(Gr));Gr.on("viewinit",function(Hi,ji){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,ji),this._initializeViewData(),this.one("play",Li),this.one("adbreakstart",Li)});var Ui=(function(Hi){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",Hi)}).bind(Mn(Gr));if(Gr.on("videochange",function(Hi,ji){Ui(ji)}),Gr.on("programchange",function(Hi,ji){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."),Ui(Object.assign(ji,{view_program_changed:!0})),Li(),this.emit("play"),this.emit("playing")}),Gr.on("fragmentchange",function(Hi,ji){this.currentFragmentPDT=ji.currentFragmentPDT,this.currentFragmentStart=ji.currentFragmentStart}),Gr.on("destroy",Gr.destroy),typeof window<"u"&&typeof window.addEventListener=="function"&&typeof window.removeEventListener=="function"){var sn=function(){var Hi=Gr.data.view_start!==void 0;Gr.mux.WINDOW_HIDDEN=document.visibilityState==="hidden",Hi&&Gr.mux.WINDOW_HIDDEN&&(Gr.data.player_is_paused||Gr.emit("hb"))};window.addEventListener("visibilitychange",sn,!1);var Gi=function(Hi){Hi.persisted||Gr.destroy()};window.addEventListener("pagehide",Gi,!1),Gr.on("destroy",function(){window.removeEventListener("visibilitychange",sn),window.removeEventListener("pagehide",Gi)})}return Gr.on("playerready",function(Hi,ji){Object.assign(this.data,ji)}),Us.forEach(function(Hi){Gr.on(Hi,function(ji,An){Hi.indexOf("ad")!==0&&this._updateStateData(),Object.assign(this.data,An),this._sanitizeData()}),Gr.on("after"+Hi,function(){(Hi!=="error"||this.errorTracker.viewErrored)&&this.send(Hi)})}),Gr.on("viewend",function(Hi,ji){Object.assign(Gr.data,ji)}),Gr.one("playerready",function(Hi){var ji=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=ji-this.data.player_init_time),!this.mux.PLAYER_TRACKED&&this.NAVIGATION_START&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.DOM_CONTENT_LOADED_EVENT_END)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.DOM_CONTENT_LOADED_EVENT_END||1/0)-this.NAVIGATION_START)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),Gr.longResumeTracker=new as(Mn(Gr)),Gr.errorTracker=new Lr(Mn(Gr)),new Vn(Mn(Gr)),Gr.seekingTracker=new un(Mn(Gr)),Gr.playheadTime=new Xr(Mn(Gr)),Gr.playbackHeartbeat=new Mi(Mn(Gr)),new Zi(Mn(Gr)),Gr.watchTimeTracker=new Wr(Mn(Gr)),new Fr(Mn(Gr)),Gr.adTracker=new Un(Mn(Gr)),new Pi(Mn(Gr)),new wi(Mn(Gr)),new Oi(Mn(Gr)),new tn(Mn(Gr)),new ss(Mn(Gr)),Kr.hlsjs&&Gr.addHLSJS(Kr),Kr.dashjs&&Gr.addDashJS(Kr),Gr.emit("viewinit",Kr.data),Gr}return br=Rr,Tr=[{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.data.view_start!==void 0&&(this.emit("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(Br){if(this.data.view_id){var Or=Object.assign({},this.data);if(Or.video_source_is_live===void 0&&(Or.player_source_duration===1/0||Or.video_source_duration===1/0?Or.video_source_is_live=!0:(Or.player_source_duration>0||Or.video_source_duration>0)&&(Or.video_source_is_live=!1)),Or.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(Li){Or[Li]=void 0}),Or.video_source_url=Or.video_source_url||Or.player_source_url,Or.video_source_url){var Kr=Os(pr(Or.video_source_url),2),zr=Kr[0],Gr=Kr[1];Or.video_source_domain=Gr,Or.video_source_hostname=zr}delete Or.ad_request_id,this.playbackEventDispatcher.send(Br,Or),this.data.view_sequence_number++,this.data.player_sequence_number++,this._restartHeartBeat(),Br==="viewend"&&delete this.data.view_id}}},{key:"_updateStateData",value:function(){Object.assign(this.data,this.get
3740StateData()),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var Br=this;["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"].forEach(function(Or){var Kr=parseInt(Br.data[Or],10);Br.data[Or]=isNaN(Kr)?void 0:Kr}),["player_source_url","video_source_url"].forEach(function(Or){if(Br.data[Or]){var Kr=Br.data[Or].toLowerCase();Kr.indexOf("data:")!==0&&Kr.indexOf("blob:")!==0||(Br.data[Or]="MSE style URL")}})}},{key:"_resetVideoData",value:function(Br,Or){var Kr=this;Object.keys(this.data).forEach(function(zr){zr.indexOf("video_")===0&&delete Kr.data[zr]})}},{key:"_resetViewData",value:function(){var Br=this;Object.keys(this.data).forEach(function(Or){Or.indexOf("view_")===0&&delete Br.data[Or]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(Br,Or){delete this.data.player_error_code,delete this.data.player_error_message}},{key:"_initializeViewData",value:function(){var Br=this,Or=this.data.view_id=ir(),Kr=function(){Or===Br.data.view_id&&vr(Br.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",Kr):Kr()}},{key:"_restartHeartBeat",value:function(){var Br=this;window.clearTimeout(this._heartBeatTimeout),this.errorTracker.viewErrored||(this._heartBeatTimeout=window.setTimeout(function(){Br.data.player_is_paused||Br.emit("hb")},1e4))}},{key:"addHLSJS",value:function(Br){Br.hlsjs?this.hlsjs?this.mux.log.warn("An instance of HLS.js is already being monitored for this player."):(this.hlsjs=Br.hlsjs,function(Or,Kr,zr){var Gr=arguments.length>4?arguments[4]:void 0,Li=Or.log,Ui=Or.utils.secondsToMs,sn=function(kn){var Fi,$i=p
vendor: 4,470 bytes, line 3740
3740arseInt(Gr.version);return $i===1&&kn.programDateTime!==null&&(Fi=kn.programDateTime),$i===0&&kn.pdt!==null&&(Fi=kn.pdt),Fi};if(mr.exists()){var Gi=function(kn,Fi){return Or.emit(Kr,kn,Fi)},Hi=function(kn,Fi){var $i=Fi.levels,Ci=Fi.audioTracks,zi=Fi.url,Ji=Fi.stats,nn=Fi.networkDetails,hn=Fi.sessionData,xn={},Tn={};$i.forEach(function(zn,ls){xn[ls]={width:zn.width,height:zn.height,bitrate:zn.bitrate,attrs:zn.attrs}}),Ci.forEach(function(zn,ls){Tn[ls]={name:zn.name,language:zn.lang,bitrate:zn.bitrate}});var dn=xr(Ji),Dn=dn.bytesLoaded,is=dn.requestStart,ms=dn.responseStart,gs=dn.responseEnd;Gi("requestcompleted",$r($r({},Mr(hn)),{},{request_event_type:kn,request_bytes_loaded:Dn,request_start:is,request_response_start:ms,request_response_end:gs,request_type:"manifest",request_hostname:hr(zi),request_response_headers:gr(nn),request_rendition_lists:{media:xn,audio:Tn,video:{}}}))};zr.on(Gr.Events.MANIFEST_LOADED,Hi);var ji=function(kn,Fi){var $i=Fi.details,Ci=Fi.level,zi=Fi.networkDetails,Ji=Fi.stats,nn=xr(Ji),hn=nn.bytesLoaded,xn=nn.requestStart,Tn=nn.responseStart,dn=nn.responseEnd,Dn=$i.fragments[$i.fragments.length-1],is=sn(Dn)+Ui(Dn.duration);Gi("requestcompleted",{request_event_type:kn,request_bytes_loaded:hn,request_start:xn,request_response_start:Tn,request_response_end:dn,request_current_level:Ci,request_type:"manifest",request_hostname:hr($i.url),request_response_headers:gr(zi),video_holdback:$i.holdBack&&Ui($i.holdBack),video_part_holdback:$i.partHoldBack&&Ui($i.partHoldBack),video_part_target_duration:$i.partTarget&&Ui($i.partTarget),video_target_duration:$i.targetduration&&Ui($i.targetduration),video_source_is_live:$i.live,player_manifest_newest_program_time:isNaN(is)?void 0:is})};zr.on(Gr.Events.LEVEL_LOADED,ji);var An=function(kn,Fi){var $i=Fi.details,Ci=Fi.networkDetails,zi=Fi.stats,Ji=xr(zi),nn=Ji.bytesLoaded,hn=Ji.requestStart,xn=Ji.responseStart,Tn=Ji.responseEnd;Gi("requestcompleted",{request_event_type:kn,request_bytes_loaded:nn,request_start:hn,request_response_start:xn,request_response_end:Tn,request_type:"manifest",request_hostname:hr($i.url),request_response_headers:gr(Ci)})};zr.on(Gr.Events.AUDIO_TRACK_LOADED,An);var On=function(kn,Fi){var $i=Fi.stats,Ci=Fi.networkDetails,zi=Fi.frag;$i=$i||zi.stats;var Ji=xr($i),nn=Ji.bytesLoaded,hn=Ji.requestStart,xn=Ji.responseStart,Tn=Ji.responseEnd,dn=Ci?gr(Ci):void 0,Dn={request_event_type:kn,request_bytes_loaded:nn,request_start:hn,request_response_start:xn,request_response_end:Tn,request_hostname:Ci?hr(Ci.responseURL):void 0,request_id:dn?kr(dn):void 0,request_response_headers:dn,request_media_duration:zi.duration,request_url:Ci==null?void 0:Ci.responseURL};zi.type==="main"?(Dn.request_type="media",Dn.request_current_level=zi.level,Dn.request_video_width=(zr.levels[zi.level]||{}).width,Dn.request_video_height=(zr.levels[zi.level]||{}).height,Dn.request_labeled_bitrate=(zr.levels[zi.level]||{}).bitrate):Dn.request_type=zi.type,Gi("requestcompleted",Dn)};zr.on(Gr.Events.FRAG_LOADED,On);var Ln=function(kn,Fi){var $i=Fi.frag,Ci=$i.start,zi={currentFragmentPDT:sn($i),currentFragmentStart:Ui(Ci)};Gi("fragmentchange",zi)};zr.on(Gr.Events.FRAG_CHANGED,Ln);var gn=function(kn,Fi){var $i=Fi.type,Ci=Fi.details,zi=Fi.response,Ji=Fi.fatal,nn=Fi.frag,hn=Fi.networkDetails,xn=(nn==null?void 0:nn.url)||Fi.url||"",Tn=hn?gr(hn):void 0;if(Ci!==Gr.ErrorDetails.MANIFEST_LOAD_ERROR&&Ci!==Gr.ErrorDetails.MANIFEST_LOAD_TIMEOUT&&Ci!==Gr.ErrorDetails.FRAG_LOAD_ERROR&&Ci!==Gr.ErrorDetails.FRAG_LOAD_TIMEOUT&&Ci!==Gr.ErrorDetails.LEVEL_LOAD_ERROR&&Ci!==Gr.ErrorDetails.LEVEL_LOAD_TIMEOUT&&Ci!==Gr.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&Ci!==Gr.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT&&Ci!==Gr.ErrorDetails.SUBTITLE_LOAD_ERROR&&Ci!==Gr.ErrorDetails.SUBTITLE_LOAD_TIMEOUT&&Ci!==Gr.ErrorDetails.KEY_LOAD_ERROR&&Ci!==Gr.ErrorDetails.KEY_LOAD_TIMEOUT||Gi("requestfailed",{request_error:Ci,request_url:xn,request_hostname:hr(xn),request_id:Tn?kr(Tn):void 0,request_type:Ci===Gr.ErrorDetails.FRAG_LOAD_ERROR||Ci===Gr.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":Ci===Gr.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||Ci===Gr.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":Ci===Gr.ErrorDetails.SUBTITLE_LOAD_ERROR||Ci===Gr.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":Ci===Gr.ErrorDetails.KEY_LOAD_ERROR||Ci===Gr.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:zi==null?void 0:zi.code,request_error_text:zi==null?void 0:zi.text}),Ji){var dn,Dn="".concat(xn?"url: ".concat(xn,`
3741`):"")+"".concat(zi&&(zi.code||zi.text)?"response: ".concat(zi.code,", ").concat(zi.text,` 3742`):"")+"".concat(Fi.reason?"failure reason: ".concat(Fi.reason,` 3743`):"")+"".concat(Fi.level?"level: ".concat(Fi.level,` 3744`):"")+"".concat(Fi.parent?"parent stream controller: ".concat(Fi.parent,` 3745`):"")+"".concat(Fi.buffer?"buffer length: ".concat(Fi.buffer,` 3746`):"")+"".concat(Fi.error?"error: ".concat(Fi.error,` 3747`):"")+"".concat(Fi.event?"event: ".concat(Fi.event,` 3748`):"")+"".concat(Fi.err?"error message: ".concat((dn=Fi.err)===null||dn===void 0?void 0:dn.message,` 3749`):"");Gi("error",{player_error_code:$i,player_error_message:Ci,player_error_context:Dn})}};zr.on(Gr.Events.ERROR,gn);var ts=function(kn,Fi){var $i=Fi.frag,Ci=$i&&$i._url||"";Gi("requestcanceled",{request_event_type:kn,request_url:Ci,request_type:"media",request_hostname:hr(Ci)})};zr.on(Gr.Events.FRAG_LOAD_EMERGENCY_ABORTED,ts);var os=function(kn,Fi){var $i=Fi.level,Ci=zr.levels[$i];if(Ci&&Ci.attrs&&Ci.attrs.BANDWIDTH){var zi,Ji=Ci.attrs.BANDWIDTH,nn=parseFloat(Ci.attrs["FRAME-RATE"]);isNaN(nn)||(zi=nn),Ji?Gi("renditionchange",{video_source_fps:zi,video_source_bitrate:Ji,video_source_width:Ci.width,video_source_height:Ci.height,video_source_rendition_name:Ci.name,video_source_codec:Ci==null?void 0:Ci.videoCodec}):Li.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};zr.on(Gr.Events.LEVEL_SWITCHED,os),zr._stopMuxMonitor=function(){zr.off(Gr.Events.MANIFEST_LOADED,Hi),zr.off(Gr.Events.LEVEL_LOADED,ji),zr.off(Gr.Events.AUDIO_TRACK_LOADED,An),zr.off(Gr.Events.FRAG_LOADED,On),zr.off(Gr.Events.FRAG_CHANGED,Ln),zr.off(Gr.Events.ERROR,gn),zr.off(Gr.Events.FRAG_LOAD_EMERGENCY_ABORTED,ts),zr.off(Gr.Events.LEVEL_SWITCHED,os),zr.off(Gr.Events.DESTROYING,zr._stopMuxMonitor),delete zr._stopMuxMonitor},zr.on(Gr.Events.DESTROYING,zr._stopMuxMonitor)}else Li.warn("performance timing not supported. Not tracking HLS.js.")}(this.mux,this.id,Br.hlsjs,{},Br.Hls||window.Hls)):this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.")}},{key:"removeHLSJS",value:function(){var Br;this.hlsjs&&((Br=this.hlsjs)&&typeof Br._stopMuxMonitor=="function"&&Br._stopMuxMonitor(),this.hlsjs=void 0)}},{key:"addDashJS",value:function(Br){Br.dashjs?this.dashjs?this.mux.log.warn("An instance of Dash.js is already being monitored for this player."):(this.dashjs=Br.dashjs,function(Or,Kr,zr){var Gr=Or.log;if(zr&&zr.on){var Li=xi(zr),Ui=function($i,Ci){return Or.emit(Kr,$i,Ci)},sn=function($i){var Ci=$i.type,zi=($i.data||{}).url;Ui("requestcompleted",{request_event_type:Ci,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:hr(zi),request_url:zi})};zr.on("manifestLoaded",sn);var Gi={},Hi=function($i){if(typeof $i.getRequests!="function")return null;var Ci=$i.getRequests({state:"executed"});return Ci.length===0?null:Ci[Ci.length-1]},ji=function($i){var Ci=$i.type,zi=$i.fragmentModel,Ji=$i.chunk,nn=Hi(zi);An({type:Ci,request:nn,chunk:Ji})},An=function($i){var Ci=$i.type,zi=$i.chunk,Ji=$i.request,nn=(zi||{}).mediaInfo||{},hn=nn.type,xn=nn.bitrateList,Tn={};(xn=xn||[]).forEach(function(vs,Qn){Tn[Qn]={},Tn[Qn].width=vs.width,Tn[Qn].height=vs.height,Tn[Qn].bitrate=vs.bandwidth,Tn[Qn].attrs={}}),hn==="video"?Gi.video=Tn:hn==="audio"?Gi.audio=Tn:Gi.media=Tn;var dn=Hr(Ji,zr),Dn=dn.requestStart,is=dn.requestResponseStart,ms=dn.requestResponseEnd,gs=dn.requestResponseHeaders,zn=dn.requestMediaDuration,ls=dn.requestHostname,ws=dn.requestUrl,Cs=dn.requestId;Ui("requestcompleted",{request_event_type:Ci,request_start:Dn,request_response_start:is,request_response_end:ms,request_bytes_loaded:-1,request_type:hn+"_init",request_response_headers:gs,request_hostname:ls,request_id:Cs,request_url:ws,request_media_duration:zn,request_rendition_lists:Gi})};Li>=4?zr.on("initFragmentLoaded",An):zr.on("initFragmentLoaded",ji);var On=function($i){var Ci=$i.type,zi=$i.fragmentModel,Ji=$i.chunk,nn=Hi(zi);Ln({type:Ci,request:nn,chunk:Ji})},Ln=function($i){var Ci=$i.type,zi=$i.chunk,Ji=$i.request,nn=zi||{},hn=nn.mediaInfo,xn=nn.start,Tn=(hn||{}).type,dn=Hr(Ji,zr),Dn=dn.requestStart,is=dn.requestResponseStart,ms=dn.requestResponseEnd,gs=dn.requestBytesLoaded,zn=dn.requestResponseHeaders,ls=dn.requestMediaDuration,ws=dn.requestHostname,Cs=dn.requestUrl,vs=dn.requestId,Qn=Yr(Tn,zr),$a=Qn.currentLevel,Ma=Qn.renditionWidth,Da=Qn.renditionHeight,Oa=Qn.renditionBitrate;Ui("requestcompleted",{request_event_type:Ci,request_start:Dn,request_response_start:is,request_response_end:ms,request_bytes_loaded:gs,request_type:Tn,request_response_headers:zn,request_hostname:ws,request_id:vs,request_url:Cs,request_media_start_time:xn,request_media_duration:ls,request_current_level:$a,request_labeled_bitrate:Oa,request_video_width:Ma,request_video_height:Da})};Li>=4?zr.on("mediaFragmentLoaded",Ln):zr.on("mediaFragmentLoaded",On);var gn={video:void 0,audio:void 0,totalBitrate:void 0},ts=function(){if(gn.video&&typeof gn.video.bitrate=="number"){if(gn.video.width&&gn.video.height){var $i=gn.video.bitrate;return gn.audio&&typeof gn.audio.bitrate=="number"&&($i+=gn.audio.bitrate),$i!==gn.totalBitrate?(gn.totalBitrate=$i,{video_source_bitrate:$i,video_source_height:gn.video.height,video_source_width:gn.video.width,video_source_codec:Jr(gn.video.codec)}):void 0}Gr.warn("have bitrate info for video but missing width/height")}},os=function($i,Ci,zi){if(typeof $i.newQuality=="number"){var Ji=$i.mediaType;if(Ji==="audio"||Ji==="video"){var nn=zr.getBitrateInfoListFor(Ji).find(function(xn){return xn.qual
3749ityIndex===$i.newQuality});if(nn&&typeof nn.bitrate=="number"){gn[Ji]=wr(wr({},nn),{},{codec:zr.getCurrentTrackFor(Ji).codec});var hn=ts();hn&&Ui("renditionchange",hn)}else Gr.warn("missing bitrate info for ".concat(Ji))}}else Gr.warn("missing evt.newQuality in qualityChangeRendered event",$i)};zr.on("qualityChangeRendered",os);var kn=function($i){var Ci=$i.request,zi=$i.mediaType;Ui("requestcanceled",{request_event_type:(Ci=Ci||{}).type+"_"+Ci.action,request_url:Ci.url,request_type:zi,request_hostname:hr(Ci.url)})};zr.on("fragmentLoadingAbandoned",kn);var Fi=function($i){var Ci,zi,Ji=$i.error,nn=(Ji==null||(Ci=Ji.data)===null||Ci===void 0?void 0:Ci.request)||{},hn=(Ji==null||(zi=Ji.data)===null||zi===void 0?void 0:zi.response)||{};(Ji==null?void 0:Ji.code)===27&&Ui("requestfailed",{request_error:nn.type+"_"+nn.action,request_url:nn.url,request_hostname:hr(nn.url),request_type:nn.mediaType,request_error_code:hn.status,request_error_text:hn.statusText});var xn="".concat(nn!=null&&nn.url?"url: ".concat(nn.url,` 3750`):"")+"".concat(hn!=null&&hn.status||hn!=null&&hn.statusText?"response: ".concat(hn==null?void 0:hn.status,", ").concat(hn==null?void 0:hn.statusText,` 3751`):"");Ui("error",{player_error_code:Ji==null?void 0:Ji.code,player_error_message:Ji==null?void 0:Ji.message,player_error_context:xn})};zr.on("error",Fi),zr._stopMuxMonitor=function(){zr.off("manifestLoaded",sn),zr.off("initFragmentLoaded",An),zr.off("mediaFragmentLoaded",Ln),zr.off("qualityChangeRendered",os),zr.off("error",Fi),zr.off("fragmentLoadingAbandoned",kn),delete zr._stopMuxMonitor}}else Gr.warn("Invalid dash.js player reference. Monitoring blocked.")}(this.mux,this.id,Br.dashjs)):this.mux.log.warn("You must pass a valid dashjs instance in order to track it.")}},{key:"removeDashJS",value:function(){var Br;this.dashjs&&((Br=this.dashjs)&&typeof Br._stopMuxMonitor=="function"&&Br._stopMuxMonitor(),this.dashjs=void 0)}}],Tr&&Ns(br.prototype,Tr),Object.defineProperty(br,"prototype",{writable:!1}),Rr}(Qr),Gs=Vs,Hs=Mt(153),fs=Mt.n(Hs);function As(Ar){return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(br){return typeof br}:function(br){return br&&typeof Symbol=="function"&&br.constructor===Symbol&&br!==Symbol.prototype?"symbol":typeof br},As(Ar)}function Rs(Ar,br){return function(Tr){if(Array.isArray(Tr))return Tr}(Ar)||function(Tr,Sr){var Rr=Tr==null?null:typeof Symbol<"u"&&Tr[Symbol.iterator]||Tr["@@iterator"];if(Rr!=null){var Br,Or,Kr=[],zr=!0,Gr=!1;try{for(Rr=Rr.call(Tr);!(zr=(Br=Rr.next()).done)&&(Kr.push(Br.value),!Sr||Kr.length!==Sr);zr=!0);}catch(Li){Gr=!0,Or=Li}finally{try{zr||Rr.return==null||Rr.return()}finally{if(Gr)throw Or}}return Kr}}(Ar,br)||function(Tr,Sr){if(Tr){if(typeof Tr=="string")return Ps(Tr,Sr);var Rr=Object.prototype.toString.call(Tr).slice(8,-1);return Rr==="Object"&&Tr.constructor&&(Rr=Tr.constructor.name),Rr==="Map"||Rr==="Set"?Array.from(Tr):Rr==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Rr)?Ps(Tr,Sr):void 0}}(Ar,br)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 3752In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ps(Ar,br){(br==null||br>Ar.length)&&(br=Ar.length);for(var Tr=0,Sr=new Array(br);Tr<br;Tr++)Sr[Tr]=Ar[Tr];return Sr}var ds,Ks=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],js={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};tr()&&tr().WeakMap&&(ds=new WeakMap);var Ws="#EXT-X-TARGETDURATION",qs="#EXT-X-PART-INF",zs="#EXT-X-SERVER-CONTROL",Ys="#EXTINF",Qs="#EXT-X-PROGRAM-DATE-TIME",Xs="#EXT-X-VERSION",Js="#EXT-X-SESSION-DATA",Es=function(Ar){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(Ar),this.manifest};Es.prototype.process=function(Ar){var br;for(this.buffer+=Ar,br=this.buffer.indexOf(` 3753`);br>-1;br=this.buffer.indexOf(` 3754`))this.processLine(this.buffer.substring(0,br)),this.buffer=this.buffer.substring(br+1)}
vendor: 4,537 bytes, line 3754
3754,Es.prototype.processLine=function(Ar){var br=Ar.indexOf(":"),Tr=fa(Ar,br),Sr=Tr[0],Rr=Tr.length===2?xs(Tr[1]):void 0;if(Sr[0]!=="#")this.currentUri.uri=Sr,this.manifest.segments.push(this.currentUri),this.manifest.targetDuration&&!("duration"in this.currentUri)&&(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(Sr){case Ws:if(!isFinite(Rr)||Rr<0)return;this.manifest.targetDuration=Rr,this.setHoldBack();break;case qs:ks(this.manifest,Tr),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case zs:ks(this.manifest,Tr),this.setHoldBack();break;case Ys:Rr===0?this.currentUri.duration=.01:Rr>0&&(this.currentUri.duration=Rr);break;case Qs:var Br=Rr,Or=new Date(Br);this.manifest.dateTimeString||(this.manifest.dateTimeString=Br,this.manifest.dateTimeObject=Or),this.currentUri.dateTimeString=Br,this.currentUri.dateTimeObject=Or;break;case Xs:ks(this.manifest,Tr);break;case Js:var Kr=pa(Tr[1]),zr=Mr(Kr);Object.assign(this.manifest.sessionData,zr)}},Es.prototype.setHoldBack=function(){var Ar=this.manifest,br=Ar.serverControl,Tr=Ar.targetDuration,Sr=Ar.partTargetDuration;if(br){var Rr="holdBack",Br="partHoldBack",Or=Tr&&3*Tr,Kr=Sr&&2*Sr;Tr&&!br.hasOwnProperty(Rr)&&(br[Rr]=Or),Or&&br[Rr]<Or&&(br[Rr]=Or),Sr&&!br.hasOwnProperty(Br)&&(br[Br]=3*Sr),Sr&&br[Br]<Kr&&(br[Br]=Kr)}};var ks=function(Ar,br){var Tr,Sr=$s(br[0].replace("#EXT-X-",""));ha(br[1])?(Tr={},Tr=Object.assign(da(br[1]),Tr)):Tr=xs(br[1]),Ar[Sr]=Tr},$s=function(Ar){return Ar.toLowerCase().replace(/-(\w)/g,function(br){return br[1].toUpperCase()})},xs=function(Ar){if(Ar.toLowerCase()==="yes"||Ar.toLowerCase()==="no")return Ar.toLowerCase()==="yes";var br=Ar.indexOf(":")!==-1?Ar:parseFloat(Ar);return isNaN(br)?Ar:br},Zs=function(Ar){var br={},Tr=Ar.split("=");return Tr.length>1&&(br[$s(Tr[0])]=xs(Tr[1])),br},da=function(Ar){for(var br=Ar.split(","),Tr={},Sr=0;br.length>Sr;Sr++){var Rr=br[Sr],Br=Zs(Rr);Tr=Object.assign(Br,Tr)}return Tr},ha=function(Ar){return Ar.indexOf("=")>-1},fa=function(Ar,br){return br===-1?[Ar]:[Ar.substring(0,br),Ar.substring(br+1)]},pa=function(Ar){var br={};if(Ar){var Tr=Ar.search(",");return[Ar.slice(0,Tr),Ar.slice(Tr+1)].forEach(function(Sr,Rr){for(var Br=Sr.replace(/['"]+/g,"").split("="),Or=0;Or<Br.length;Or++)Br[Or]==="DATA-ID"&&(br["DATA-ID"]=Br[1-Or]),Br[Or]==="VALUE"&&(br.VALUE=Br[1-Or])}),{data:br}}},ga=Es,ya={safeCall:function(Ar,br,Tr,Sr){var Rr=Sr;if(Ar&&typeof Ar[br]=="function")try{Rr=Ar[br].apply(Ar,Tr)}catch(Br){ur.info("safeCall error",Br)}return Rr},safeIncrement:vr,getComputedStyle:function(Ar,br){var Tr;if(Ar&&br&&tr()&&typeof tr().getComputedStyle=="function")return ds&&ds.has(Ar)&&(Tr=ds.get(Ar)),Tr||(Tr=tr().getComputedStyle(Ar,null),ds&&ds.set(Ar,Tr)),Tr.getPropertyValue(br)},secondsToMs:function(Ar){return Math.floor(1e3*Ar)},assign:Object.assign,headersStringToObject:Pr,cdnHeadersToRequestId:kr,extractHostnameAndDomain:pr,extractHostname:hr,manifestParser:ga,generateShortID:rr,generateUUID:ir,now:dr.now},ba={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",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"};function Sa(Ar,br){return function(Tr){if(Array.isArray(Tr))return Tr}(Ar)||function(Tr,Sr){var Rr=Tr==null?null:typeof Symbol<"u"&&Tr[Symbol.iterator]||Tr["@@iterator"];if(Rr!=null){var Br,Or,Kr=[],zr=!0,Gr=!1;try{for(Rr=Rr.call(Tr);!(zr=(Br=Rr.next()).done)&&(Kr.push(Br.value),!Sr||Kr.length!==Sr);zr=!0);}catch(Li){Gr=!0,Or=Li}finally{try{zr||Rr.return==null||Rr.return()}finally{if(Gr)throw Or}}return Kr}}(Ar,br)||function(Tr,Sr){if(Tr){if(typeof Tr=="string")return Ms(Tr,Sr);var Rr=Object.prototype.toString.call(Tr).slice(8,-1);return Rr==="Object"&&Tr.constructor&&(Rr=Tr.constructor.name),Rr==="Map"||Rr==="Set"?Array.from(Tr):Rr==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Rr)?Ms(Tr,Sr):void 0}}
3754(Ar,br)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 3755In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ms(Ar,br){(br==null||br>Ar.length)&&(br=Ar.length);for(var Tr=0,Sr=new Array(br);Tr<br;Tr++)Sr[Tr]=Ar[Tr];return Sr}var qn={},ps=function Ar(br){var Tr=arguments;typeof br=="string"?Ar.hasOwnProperty(br)?tr().setTimeout(function(){Tr=Array.prototype.splice.call(Tr,1),Ar[br].apply(null,Tr)},0):ur.warn("`"+br+"` is an unknown task"):typeof br=="function"?tr().setTimeout(function(){br(Ar)},0):ur.warn("`"+br+"` is invalid.")},Ia={loaded:dr.now(),NAME:"mux-embed",VERSION:"4.30.0",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(Ar,br){return function(Tr,Sr,Rr){var Br=Rs(ar(Sr),3),Or=Br[0],Kr=Br[1],zr=Br[2],Gr=Tr.log,Li=Tr.utils.getComputedStyle,Ui=Tr.utils.secondsToMs;if(!Or)return Gr.error("No element was found with the `"+Kr+"` query selector.");if(zr!=="video"&&zr!=="audio")return Gr.error("The element of `"+Kr+"` was not a media element.");Or.mux&&(Or.mux.destroy(),delete Or.mux,Gr.warn("Already monitoring this video element, replacing existing event listeners")),(Rr=Object.assign({automaticErrorTracking:!0},Rr)).data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:Tr.VERSION},Rr.data),Rr.getPlayheadTime=function(){return Ui(Or.currentTime)},Rr.getStateData=function(){var Gi,Hi,ji=this.hlsjs&&this.hlsjs.url,An=this.dashjs&&As(this.dashjs.getSource==="function")&&this.dashjs.getSource(),On={player_is_paused:Or.paused,player_playhead_time:Ui(Or.currentTime),player_width:parseInt(Li(Or,"width")),player_height:parseInt(Li(Or,"height")),player_autoplay_on:Or.autoplay,player_preload_on:Or.preload,player_language_code:Or.lang,player_is_fullscreen:fs()&&!!(fs().fullscreenElement||fs().webkitFullscreenElement||fs().mozFullScreenElement||fs().msFullscreenElement),video_poster_url:Or.poster,video_source_url:ji||An||Or.currentSrc,video_source_duration:Ui(Or.duration),video_source_height:Or.videoHeight,video_source_width:Or.videoWidth,view_dropped_frame_count:(Gi=Or)===null||Gi===void 0||(Hi=Gi.getVideoPlaybackQuality)===null||Hi===void 0?void 0:Hi.call(Gi).droppedVideoFrames},Ln=Rr.getPlayheadTime();if(Or.getStartDate&&Ln>0){var gn=Or.getStartDate();if(gn&&typeof gn.getTime=="function"&&gn.getTime()){var ts=gn.getTime();if(On.player_program_time=ts+Ln,Or.seekable.length>0){var os=ts+Or.seekable.end(Or.seekable.length-1);On.player_live_edge_program_time=os}}}return On},Or.mux=Or.mux||{},Or.mux.deleted=!1,Or.mux.emit=function(Gi,Hi){Tr.emit(Kr,Gi,Hi)};var sn=function(){Gr.error("The monitor for this video element has already been destroyed.")};Or.mux.destroy=function(){Object.keys(Or.mux.listeners).forEach(function(Gi){Or.removeEventListener(Gi,Or.mux.listeners[Gi],!1)}),delete Or.mux.listeners,Or.mux.destroy=sn,Or.mux.swapElement=sn,Or.mux.emit=sn,Or.mux.addHLSJS=sn,Or.mux.addDashJS=sn,Or.mux.removeHLSJS=sn,Or.mux.removeDashJS=sn,Or.mux.deleted=!0,Tr.emit(Kr,"destroy")},Or.mux.swapElement=function(Gi){var Hi=Rs(ar(Gi),3),ji=Hi[0],An=Hi[1],On=Hi[2];return ji?On!=="video"&&On!=="audio"?Tr.log.error("The element of `"+An+"` was not a media element."):(ji.muxId=Or.muxId,delete Or.muxId,ji.mux=ji.mux||{},ji.mux.listeners=Object.assign({},Or.mux.listeners),delete Or.mux.listeners,Object.keys(ji.mux.listeners).forEach(function(Ln){Or.removeEventListener(Ln,ji.mux.listeners[Ln],!1),ji.addEventListener(Ln,ji.mux.listeners[Ln],!1)}),ji.mux.swapElement=Or.mux.swapElement,ji.mux.destroy=Or.mux.destroy,delete Or.mux,void(Or=ji)):Tr.log.error("No element was found with the `"+An+"` query selector.")},Or.mux.addHLSJS=function(Gi){Tr.addHLSJS(Kr,Gi)},Or.mux.addDashJS=function(Gi){Tr.addDashJS(Kr,Gi)},Or.mux.removeHLSJS=function(){Tr.removeHLSJS(Kr)},Or.mux.removeDashJS=function(){Tr.removeDashJS(Kr)},Tr.init(Kr,Rr),Tr.emit(Kr,"playerready"),Or.paused||(Tr.emit(Kr,"play"),Or.readyState>2&&Tr.emit(Kr,"playing")),Or.mux.listeners={},Ks.forEach(function(Gi){(Gi!=="error"||Rr.automaticErrorTracking)&&(Or.mux.listeners[Gi]=function(){var Hi={};if(Gi==="error"){if(!Or.error||Or.error.code===1)return;Hi.player_error_code=Or.error.code,Hi.player_error_message=js[Or.error.code]||Or.error.message}Tr.emit(Kr,Gi,Hi)},Or.addEventListener(Gi,Or.mux.listeners[Gi],!1))})}(ps,Ar,br)},destroyMonitor:function(Ar){var br=Sa(ar(Ar),1)[0];br&&br.mux&&typeof br.mux.destroy=="function"?br.mux.destroy():ur.error("A video element monitor for `"+Ar+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(Ar,br){var Tr=nr(Ar);qn[Tr]?qn[Tr].addHLSJS(br):ur.error("A monitor for `"+Tr+"` has not been initialized.")},addDashJS:function(Ar,br){var Tr=nr(Ar);
3755qn[Tr]?qn[Tr].addDashJS(br):ur.error("A monitor for `"+Tr+"` has not been initialized.")},removeHLSJS:function(Ar){var br=nr(Ar);qn[br]?qn[br].removeHLSJS():ur.error("A monitor for `"+br+"` has not been initialized.")},removeDashJS:function(Ar){var br=nr(Ar);qn[br]?qn[br].removeDashJS():ur.error("A monitor for `"+br+"` has not been initialized.")},init:function(Ar,br){or()&&br&&br.respectDoNotTrack&&ur.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var Tr=nr(Ar);qn[Tr]=new Gs(ps,Tr,br)},emit:function(Ar,br,Tr){var Sr=nr(Ar);qn[Sr]?(qn[Sr].emit(br,Tr),br==="destroy"&&delete qn[Sr]):ur.error("A monitor for `"+Sr+"` has not been initialized.")},checkDoNotTrack:or,log:ur,utils:ya,events:ba,WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(ps,Ia),tr()!==void 0&&typeof tr().addEventListener=="function"&&tr().addEventListener("pagehide",function(Ar){Ar.persisted||(ps.WINDOW_UNLOADING=!0)},!1);var Pa=ps},655:function(L,ge,Mt){var er,tr;function ir(rr){return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nr){return typeof nr}:function(nr){return nr&&typeof Symbol=="function"&&nr.constructor===Symbol&&nr!==Symbol.prototype?"symbol":typeof nr},ir(rr);/*! 3756 * JavaScript Cookie v2.1.3 3757 * https://github.com/js-cookie/js-cookie 3758 * 3759 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 3760 * Released under the MIT license 3761 */}(function(rr){var nr=!1;if((tr=typeof(er=rr)=="function"?er.call(ge,Mt,ge,L):er)===void 0||(L.exports=tr),nr=!0,ir(ge)==="object"&&(L.exports=rr(),nr=!0),!nr){var ar=window.Cookies,sr=window.Cookies=rr();sr.noConflict=function(){return window.Cookies=ar,sr}}})(function(){var rr=function(){for(var nr=0,ar={};nr<arguments.length;nr++){var sr=arguments[nr];for(var lr in sr)ar[lr]=sr[lr]}return ar};return function nr(ar){function sr(lr,cr,ur){var or;if(typeof document<"u"){if(arguments.length>1){if(typeof(ur=rr({path:"/"},sr.defaults,ur)).expires=="number"){var dr=new Date;dr.setMilliseconds(dr.getMilliseconds()+864e5*ur.expires),ur.expires=dr}try{or=JSON.stringify(cr),/^[\{\[]/.test(or)&&(cr=or)}catch{}return cr=ar.write?ar.write(cr,lr):encodeURIComponent(String(cr)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),lr=(lr=(lr=encodeURIComponent(String(lr))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[lr,"=",cr,ur.expires?"; expires="+ur.expires.toUTCString():"",ur.path?"; path="+ur.path:"",ur.domain?"; domain="+ur.domain:"",ur.secure?"; secure":""].join("")}lr||(or={});for(var hr=document.cookie?document.cookie.split("; "):[],pr=/(%[0-9A-Z]{2})+/g,mr=0;mr<hr.length;mr++){var vr=hr[mr].split("="),Er=vr.slice(1).join("=");Er.charAt(0)==='"'&&(Er=Er.slice(1,-1));try{var Cr=vr[0].replace(pr,decodeURIComponent);if(Er=ar.read?ar.read(Er,Cr):ar(Er,Cr)||Er.replace(pr,decodeURIComponent),this.json)try{Er=JSON.parse(Er)}catch{}if(lr===Cr){or=Er;break}lr||(or[Cr]=Er)}catch{}}return or}}return sr.set=sr,sr.get=function(lr){return sr.call(sr,lr)},sr.getJSON=function(){return sr.apply({json:!0},[].slice.call(arguments))},sr.defaults={},sr.remove=function(lr,cr){sr(lr,"",rr(cr,{expires:-1}))},sr.withConverter=nr,sr}(function(){})})},153:function(L,ge,Mt){var er,tr=Mt.g!==void 0?Mt.g:typeof window<"u"?window:{},ir=Mt(558);typeof document<"u"?er=document:(er=tr["__GLOBAL_DOCUMENT_CACHE@4"])||(er=tr["__GLOBAL_DOCUMENT_CACHE@4"]=ir),L.exports=er},48:function(L,ge,Mt){var er;er=typeof window<"u"?window:Mt.g!==void 0?Mt.g:typeof self<"u"?self:{},L.exports=er},640:function(L,ge,Mt){var er,tr;(function(ir,rr){er=function(){var nr=function(){},ar="undefined",sr=typeof window!==ar&&typeof window.navigator!==ar&&/Trident\/|MSIE /.test(window.navigator.userAgent),lr=["trace","debug","info","warn","error"];function cr(Pr,kr){var Mr=Pr[kr];if(typeof Mr.bind=="function")return Mr.bind(Pr);try{return Function.prototype.bind.call(Mr,Pr)}catch{return function(){return Function.prototype.apply.apply(Mr,[Pr,arguments])}}}function ur(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function or(Pr){return Pr==="debug"&&(Pr="log"),typeof console!==ar&&(Pr==="trace"&&sr?ur:console[Pr]!==void 0?cr(console,Pr):console.log!==void 0?cr(console,"log"):nr)}function dr(Pr,kr){for(var Mr=0;Mr<lr.length;Mr++){var Ur=lr[Mr];this[Ur]=Mr<Pr?nr:this.methodFactory(Ur,Pr,kr)}this.log=this.debug}function hr(Pr,kr,Mr){return function(){typeof console!==ar&&(dr.call(this,kr,Mr),this[Pr].apply(this,arguments))}}function pr(Pr,kr,Mr){return or(Pr)||hr.apply(this,arguments)}function mr(Pr,kr,Mr){var Ur,$r=this;kr=kr??"WARN";var yr="loglevel";function xr(Ir){var Hr=(lr[Ir]||"silent").toUpperCase();if(typeof window!==ar&&yr){try{return void(window.localStorage[yr]=Hr)}catch{}try{window.document.cookie=encodeURIComponent(yr)+"="+Hr+";"}catch{}}}function gr(){var Ir;if(typeof window!==ar&&yr){try{Ir=window.localStorage[yr]}catch{}if(typeof Ir===ar)try{var Hr=window.document.cookie,Yr=Hr.indexOf(encodeURIComponent(yr)+"=");Yr!==-1&&(Ir=/^([^;]+)/.exec(Hr.slice(Yr))[1])}catch{}return $r.levels[Ir]===void 0&&(Ir=void 0),Ir}}function _r(){if(typeof window!==ar&&yr){try{return void window.localStorage.removeItem(yr)}catch{}try{window.document.cookie=encodeURIComponent(yr)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}typeof Pr=="string"?yr+=":"+Pr:typeof Pr=="symbol"&&(yr=void 0),$r.name=Pr,$r.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},$r.methodFactory=Mr||pr,$r.getLevel=function(){return Ur},$r.setLevel=function(Ir,Hr){if(typeof Ir=="string"&&$r.levels[Ir.toUpperCase()]!==void 0&&(Ir=$r.levels[Ir.toUpperCase()]),!(typeof Ir=="number"&&Ir>=0&&Ir<=$r.levels.SILENT))throw"log.setLevel() called with invali
3761d level: "+Ir;if(Ur=Ir,Hr!==!1&&xr(Ir),dr.call($r,Ir,Pr),typeof console===ar&&Ir<$r.levels.SILENT)return"No console available for logging"},$r.setDefaultLevel=function(Ir){kr=Ir,gr()||$r.setLevel(Ir,!1)},$r.resetLevel=function(){$r.setLevel(kr,!1),_r()},$r.enableAll=function(Ir){$r.setLevel($r.levels.TRACE,Ir)},$r.disableAll=function(Ir){$r.setLevel($r.levels.SILENT,Ir)};var wr=gr();wr==null&&(wr=kr),$r.setLevel(wr,!1)}var vr=new mr,Er={};vr.getLogger=function(Pr){if(typeof Pr!="symbol"&&typeof Pr!="string"||Pr==="")throw new TypeError("You must supply a name when creating a logger.");var kr=Er[Pr];return kr||(kr=Er[Pr]=new mr(Pr,vr.getLevel(),vr.methodFactory)),kr};var Cr=typeof window!==ar?window.log:void 0;return vr.noConflict=function(){return typeof window!==ar&&window.log===vr&&(window.log=Cr),vr},vr.getLoggers=function(){return Er},vr.default=vr,vr},(tr=typeof er=="function"?er.call(ge,Mt,ge,L):er)===void 0||(L.exports=tr)})()},375:function(L,ge){var Mt=Object.prototype.hasOwnProperty;function er(ir){try{return decodeURIComponent(ir.replace(/\+/g," "))}catch{return null}}function tr(ir){try{return encodeURIComponent(ir)}catch{return null}}ge.stringify=function(ir,rr){rr=rr||"";var nr,ar,sr=[];for(ar in typeof rr!="string"&&(rr="?"),ir)if(Mt.call(ir,ar)){if((nr=ir[ar])||nr!=null&&!isNaN(nr)||(nr=""),ar=tr(ar),nr=tr(nr),ar===null||nr===null)continue;sr.push(ar+"="+nr)}return sr.length?rr+sr.join("&"):""},ge.parse=function(ir){for(var rr,nr=/([^=?#&]+)=?([^&]*)/g,ar={};rr=nr.exec(ir);){var sr=er(rr[1]),lr=er(rr[2]);sr===null||lr===null||sr in ar||(ar[sr]=lr)}return ar}},558:function(){}},o={};function d(L){var ge=o[L];if(ge!==void 0)return ge.exports;var Mt=o[L]={exports:{}};return s[L].call(Mt.exports,Mt,Mt.exports,d),Mt.exports}return d.n=function(L){var ge=L&&L.__esModule?function(){return L.default}:function(){return L};return d.d(ge,{a:ge}),ge},d.d=function(L,ge){for(var Mt in ge)d.o(ge,Mt)&&!d.o(L,Mt)&&Object.defineProperty(L,Mt,{enumerable:!0,get:ge[Mt]})},d.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),d.o=function(L,ge){return Object.prototype.hasOwnProperty.call(L,ge)},d(80)}()},t.exports=r()})()})(mux$1);var muxExports=mux$1.exports;const F$2=getDefaultExportFromCjs$1(muxExports);function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var urlToolkit={exports:{}};(function(t,e){(function(r){var s=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,o=/^(?=([^\/?#]*))\1([^]*)$/,d=/(?:\/|^)\.(?=\/)/g,L=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,ge={buildAbsoluteURL:function(Mt,er,tr){if(tr=tr||{},Mt=Mt.trim(),er=er.trim(),!er){if(!tr.alwaysNormalize)return Mt;var ir=ge.parseURL(Mt);if(!ir)throw new Error("Error trying to parse base URL.");return ir.path=ge.normalizePath(ir.path),ge.buildURLFromParts(ir)}var rr=ge.parseURL(er);if(!rr)throw new Error("Error trying to parse relative URL.");if(rr.scheme)return tr.alwaysNormalize?(rr.path=ge.normalizePath(rr.path),ge.buildURLFromParts(rr)):er;var nr=ge.parseURL(Mt);if(!nr)throw new Error("Error trying to parse base URL.");if(!nr.netLoc&&nr.path&&nr.path[0]!=="/"){var ar=o.exec(nr.path);nr.netLoc=ar[1],nr.path=ar[2]}nr.netLoc&&!nr.path&&(nr.path="/");var sr={scheme:nr.scheme,netLoc:rr.netLoc,path:null,params:rr.params,query:rr.query,fragment:rr.fragment};if(!rr.netLoc&&(sr.netLoc=nr.netLoc,rr.path[0]!=="/"))if(!rr.path)sr.path=nr.path,rr.params||(sr.params=nr.params,rr.query||(sr.query=nr.query));else{var lr=nr.path,cr=lr.substring(0,lr.lastIndexOf("/")+1)+rr.path;sr.path=ge.normalizePath(cr)}return sr.path===null&&(sr.path=tr.alwaysNormalize?ge.normalizePath(rr.path):rr.path),ge.buildURLFromParts(sr)},parseURL:function(Mt){var er=s.exec(Mt);return er?{scheme:er[1]||"",netLoc:er[2]||"",path:er[3]||"",params:er[4]||"",query:er[5]||"",fragment:er[6]||""}:null},normalizePath:function(Mt){for(Mt=Mt.split("").reverse().join("").replace(d,"");Mt.length!==(Mt=Mt.replace(L,"")).length;);return Mt.split("").reverse().join("")},buildURLFromParts:function(Mt){return Mt.scheme+Mt.netLoc+Mt.path+Mt.params+Mt.query+Mt.fragment}};t.exports=ge})()})(urlToolkit);var urlToolkitExports=urlToolkit.exports;function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,s)}return r}
3761function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(s){_defineProperty(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function _defineProperty(t,e,r){return e=_toPropertyKey(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},_extends.apply(this,arguments)}function _toPrimitive(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var s=r.call(t,e||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return typeof e=="symbol"?e:String(e)}const isFiniteNumber=Number.isFinite||function(t){return typeof t=="number"&&isFinite(t)},isSafeInteger=Number.isSafeInteger||function(t){return typeof t=="number"&&Math.abs(t)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991;
vendor: 4,925 bytes, line 3761
3761let Events=function(t){return t.MEDIA_ATTACHING="hlsMediaAttaching",t.MEDIA_ATTACHED="hlsMediaAttached",t.MEDIA_DETACHING="hlsMediaDetaching",t.MEDIA_DETACHED="hlsMediaDetached",t.BUFFER_RESET="hlsBufferReset",t.BUFFER_CODECS="hlsBufferCodecs",t.BUFFER_CREATED="hlsBufferCreated",t.BUFFER_APPENDING="hlsBufferAppending",t.BUFFER_APPENDED="hlsBufferAppended",t.BUFFER_EOS="hlsBufferEos",t.BUFFER_FLUSHING="hlsBufferFlushing",t.BUFFER_FLUSHED="hlsBufferFlushed",t.MANIFEST_LOADING="hlsManifestLoading",t.MANIFEST_LOADED="hlsManifestLoaded",t.MANIFEST_PARSED="hlsManifestParsed",t.LEVEL_SWITCHING="hlsLevelSwitching",t.LEVEL_SWITCHED="hlsLevelSwitched",t.LEVEL_LOADING="hlsLevelLoading",t.LEVEL_LOADED="hlsLevelLoaded",t.LEVEL_UPDATED="hlsLevelUpdated",t.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",t.LEVELS_UPDATED="hlsLevelsUpdated",t.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",t.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",t.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",t.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",t.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",t.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",t.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",t.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",t.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",t.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",t.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",t.CUES_PARSED="hlsCuesParsed",t.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",t.INIT_PTS_FOUND="hlsInitPtsFound",t.FRAG_LOADING="hlsFragLoading",t.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",t.FRAG_LOADED="hlsFragLoaded",t.FRAG_DECRYPTED="hlsFragDecrypted",t.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",t.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",t.FRAG_PARSING_METADATA="hlsFragParsingMetadata",t.FRAG_PARSED="hlsFragParsed",t.FRAG_BUFFERED="hlsFragBuffered",t.FRAG_CHANGED="hlsFragChanged",t.FPS_DROP="hlsFpsDrop",t.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",t.ERROR="hlsError",t.DESTROYING="hlsDestroying",t.KEY_LOADING="hlsKeyLoading",t.KEY_LOADED="hlsKeyLoaded",t.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",t.BACK_BUFFER_REACHED="hlsBackBufferReached",t}({}),ErrorTypes=function(t){return t.NETWORK_ERROR="networkError",t.MEDIA_ERROR="mediaError",t.KEY_SYSTEM_ERROR="keySystemError",t.MUX_ERROR="muxError",t.OTHER_ERROR="otherError",t}({}),ErrorDetails=function(t){return t.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",t.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",t.KEY_SYSTEM_NO_SESSION="keySystemNoSession",t.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",t.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",t.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",t.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",t.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",t.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",t.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",t.MANIFEST_LOAD_ERROR="manifestLoadError",t.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",t.MANIFEST_PARSING_ERROR="manifestParsingError",t.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",t.LEVEL_EMPTY_ERROR="levelEmptyError",t.LEVEL_LOAD_ERROR="levelLoadError",t.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",t.LEVEL_PARSING_ERROR="levelParsingError",t.LEVEL_SWITCH_ERROR="levelSwitchError",t.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",t.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",t.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",t.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",t.FRAG_LOAD_ERROR="fragLoadError",t.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",t.FRAG_DECRYPT_ERROR="fragDecryptError",t.FRAG_PARSING_ERROR="fragParsingError",t.FRAG_GAP="fragGap",t.REMUX_ALLOC_ERROR="remuxAllocError",t.KEY_LOAD_ERROR="keyLoadError",t.KEY_LOAD_TIMEOUT="keyLoadTimeOut",t.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",t.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",t.BUFFER_APPEND_ERROR="bufferAppendError",t.BUFFER_APPENDING_ERROR="bufferAppendingError",t.BUFFER_STALLED_ERROR="bufferStalledError",t.BUFFER_FULL_ERROR="bufferFullError",t.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",t.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",t.INTERNAL_EXCEPTION="internalException",t.INTERNAL_ABORTED="aborted",t.UNKNOWN="unknown",t}({});const noop=function t(){},fakeLogger={trace:noop,debug:noop,log:noop,warn:noop,info:noop,error:noop};let exportedLogger=fakeLogger;function consolePrintFn(t){const e=self.console[t];return e?e.bind(self.console,`[${t}] >`):noop}function exportLoggerFunctions(t,...e){e.forEach(function(r){exportedLogger[r]=t[r]?t[r].bind(t):consolePrintFn(r)})}function enableLogs(t,e){if(self.console&&t===!0||typeof t=="object"){exportLoggerFunctions(t,"debug","log","info","warn","error");try{exportedLogger.log(`Debug logs enabled for "${e}
3761" in hls.js version 1.4.14`)}catch{exportedLogger=fakeLogger}}else exportedLogger=fakeLogger}const logger=exportedLogger,DECIMAL_RESOLUTION_REGEX=/^(\d+)x(\d+)$/,ATTR_LIST_REGEX=/(.+?)=(".*?"|.*?)(?:,|$)/g;class AttrList{constructor(e){typeof e=="string"&&(e=AttrList.parseAttrList(e));for(const r in e)e.hasOwnProperty(r)&&(r.substring(0,2)==="X-"&&(this.clientAttrs=this.clientAttrs||[],this.clientAttrs.push(r)),this[r]=e[r])}decimalInteger(e){const r=parseInt(this[e],10);return r>Number.MAX_SAFE_INTEGER?1/0:r}hexadecimalInteger(e){if(this[e]){let r=(this[e]||"0x").slice(2);r=(r.length&1?"0":"")+r;const s=new Uint8Array(r.length/2);for(let o=0;o<r.length/2;o++)s[o]=parseInt(r.slice(o*2,o*2+2),16);return s}else return null}hexadecimalIntegerAsNumber(e){const r=parseInt(this[e],16);return r>Number.MAX_SAFE_INTEGER?1/0:r}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,r){const s=this[e];return s?parseFloat(s):r}enumeratedString(e){return this[e]}bool(e){return this[e]==="YES"}decimalResolution(e){const r=DECIMAL_RESOLUTION_REGEX.exec(this[e]);if(r!==null)return{width:parseInt(r[1],10),height:parseInt(r[2],10)}}static parseAttrList(e){let r;const s={},o='"';for(ATTR_LIST_REGEX.lastIndex=0;(r=ATTR_LIST_REGEX.exec(e))!==null;){let d=r[2];d.indexOf(o)===0&&d.lastIndexOf(o)===d.length-1&&(d=d.slice(1,-1));const L=r[1].trim();s[L]=d}return s}}function isDateRangeCueAttribute(t){return t!=="ID"&&t!=="CLASS"&&t!=="START-DATE"&&t!=="DURATION"&&t!=="END-DATE"&&t!=="END-ON-NEXT"}function isSCTE35Attribute(t){return t==="SCTE35-OUT"||t==="SCTE35-IN"}class DateRange{constructor(e,r){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,r){const s=r.attr;for(const o in s)if(Object.prototype.hasOwnProperty.call(e,o)&&e[o]!==s[o]){logger.warn(`DATERANGE tag attribute: "${o}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=o;break}e=_extends(new AttrList({}),s,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const s=new Date(this.attr["END-DATE"]);isFiniteNumber(s.getTime())&&(this._endDate=s)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return e!==null?new Date(this._startDate.getTime()+e*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(isFiniteNumber(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&isFiniteNumber(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class LoadStats{constructor(){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}}}var ElementaryStreamTypes={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class BaseSegment{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[ElementaryStreamTypes.AUDIO]:null,[ElementaryStreamTypes.VIDEO]:null,[ElementaryStreamTypes.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,r){const s=e.split("@",2),o=[];s.length===1?o[0]=r?r.byteRangeEndOffset:0:o[0]=parseInt(s[1]),o[1]=parseInt(s[0])+o[0],this._byteRange=o}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=urlToolkitExports.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class Fragment extends BaseSegment{constructor(e,r){super(r),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new LoadStats,this.urlId=0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const r=this.levelkeys.identity;if(r)this._decryptdata=r.getDecryptData(this.sn);else{const s=Object.keys(this.levelkeys);if(s.length===1)return this._decryptdata=this.levelkeys[s[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!isFiniteNumber(this.programDateTime))return null;const e=isFiniteNumber(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;
vendor: 6,775 bytes, line 3761
3761if(this.levelkeys){const r=Object.keys(this.levelkeys),s=r.length;if(s>1||s===1&&this.levelkeys[r[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const r=this.levelkeys[e];r&&!this._decryptdata&&(this._decryptdata=r.getDecryptData(this.sn))}}abortRequests(){var e,r;(e=this.loader)==null||e.abort(),(r=this.keyLoader)==null||r.abort()}setElementaryStreamInfo(e,r,s,o,d,L=!1){const{elementaryStreams:ge}=this,Mt=ge[e];if(!Mt){ge[e]={startPTS:r,endPTS:s,startDTS:o,endDTS:d,partial:L};return}Mt.startPTS=Math.min(Mt.startPTS,r),Mt.endPTS=Math.max(Mt.endPTS,s),Mt.startDTS=Math.min(Mt.startDTS,o),Mt.endDTS=Math.max(Mt.endDTS,d)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[ElementaryStreamTypes.AUDIO]=null,e[ElementaryStreamTypes.VIDEO]=null,e[ElementaryStreamTypes.AUDIOVIDEO]=null}}let Part$1=class extends BaseSegment{constructor(e,r,s,o,d){super(s),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new LoadStats,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=r,this.index=o;const L=e.enumeratedString("BYTERANGE");L&&this.setByteRange(L,d),d&&(this.fragOffset=d.fragOffset+d.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}};const DEFAULT_TARGET_DURATION=10;class LevelDetails{constructor(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.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 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.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const r=this.lastPartSn-e.lastPartSn,s=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!s||!!r||!this.live,this.advanced=this.endSN>e.endSN||r>0||r===0&&s>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?isFiniteNumber(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||DEFAULT_TARGET_DURATION}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function base64Decode(t){return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}function getKeyIdBytes(t){const e=strToUtf8array(t).subarray(0,16),r=new Uint8Array(16);return r.set(e,16-e.length),r}function changeEndianness(t){const e=function(s,o,d){const L=s[o];s[o]=s[d],s[d]=L};e(t,0,3),e(t,1,2),e(t,4,5),e(t,6,7)}function convertDataUriToArrayBytes(t){const e=t.split(":");let r=null;if(e[0]==="data"&&e.length===2){const s=e[1].split(";"),o=s[s.length-1].split(",");if(o.length===2){const d=o[0]==="base64",L=o[1];d?(s.splice(-1,1),r=base64Decode(L)):r=getKeyIdBytes(L)}}return r}function strToUtf8array(t){return Uint8Array.from(unescape(encodeURIComponent(t)),e=>e.charCodeAt(0))}var KeySystems={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},KeySystemFormats={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function keySystemFormatToKeySystemDomain(t){switch(t){case KeySystemFormats.FAIRPLAY:return KeySystems.FAIRPLAY;case KeySystemFormats.PLAYREADY:return KeySystems.PLAYREADY;case KeySystemFormats.WIDEVINE:return KeySystems.WIDEVINE;case KeySystemFormats.CLEARKEY:return KeySystems.CLEARKEY}}var KeySystemIds={WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function keySystemIdToKeySystemDomain(t){if(t===KeySystemIds.WIDEVINE)return KeySystems.WIDEVINE}function keySystemDomainToKeySystemFormat(t){switch(t){case KeySystems.FAIRPLAY:return KeySystemFormats.FAIRPLAY;case KeySystems.PLAYREADY:return KeySystemFormats.PLAYREADY;case KeySystems.WIDEVINE:return KeySystemFormats.WIDEVINE;case KeySystems.CLEARKEY:return KeySystemFormats.CLEARKEY}}function getKeySystemsForConfig(t){const{drmSystems:e,widevineLicenseUrl:r}=t,s=e?[KeySystems.FAIRPLAY,KeySystems.WIDEVINE,KeySystems.PLAYREADY,KeySystems.CLEARKEY].filter(o=>!!e[o]):[];return!s[KeySystems.WIDEVINE]&&r&&s.push(KeySystems.WIDEVINE),s}const requestMediaKeySystemAccess=function(){return typeof self<"u"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function getSupportedMediaKeySystemConfigurations(t,e,r,s){let o;switch(t){case KeySystems.FAIRPLAY:o=["cenc","sinf"];break;case KeySystems.WIDEVINE:case KeySystems.PLAYREADY:o=["cenc"];break;case KeySystems.CLEARKEY:o=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${t}`)}return createMediaKeySystemConfigurations(o,e,r,s)}function createMediaKeySystemConfigurations(t,e,r,s){return[{initDataTypes:t,persistentState:s.persistentState||"not-allowed",distinctiveIdentifier:s.distinctiveIdentifier||"not-allowed",sessionTypes:s.sessionTypes||[s.sessionType||"temporary"],audioCapabilities:e.map(d=>({contentType:`audio/mp4; codecs="${d}
3761"`,robustness:s.audioRobustness||"",encryptionScheme:s.audioEncryptionScheme||null})),videoCapabilities:r.map(d=>({contentType:`video/mp4; codecs="${d}"`,robustness:s.videoRobustness||"",encryptionScheme:s.videoEncryptionScheme||null}))}]}function sliceUint8(t,e,r){return Uint8Array.prototype.slice?t.slice(e,r):new Uint8Array(Array.prototype.slice.call(t,e,r))}const isHeader$2=(t,e)=>e+10<=t.length&&t[e]===73&&t[e+1]===68&&t[e+2]===51&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128,isFooter=(t,e)=>e+10<=t.length&&t[e]===51&&t[e+1]===68&&t[e+2]===73&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128,getID3Data=(t,e)=>{const r=e;let s=0;for(;isHeader$2(t,e);){s+=10;const o=readSize(t,e+6);s+=o,isFooter(t,e+10)&&(s+=10),e+=s}if(s>0)return t.subarray(r,r+s)},readSize=(t,e)=>{let r=0;return r=(t[e]&127)<<21,r|=(t[e+1]&127)<<14,r|=(t[e+2]&127)<<7,r|=t[e+3]&127,r},canParse$2=(t,e)=>isHeader$2(t,e)&&readSize(t,e+6)+10<=t.length-e,getTimeStamp=t=>{const e=getID3Frames(t);for(let r=0;r<e.length;r++){const s=e[r];if(isTimeStampFrame(s))return readTimeStamp(s)}},isTimeStampFrame=t=>t&&t.key==="PRIV"&&t.info==="com.apple.streaming.transportStreamTimestamp",getFrameData=t=>{const e=String.fromCharCode(t[0],t[1],t[2],t[3]),r=readSize(t,4),s=10;return{type:e,size:r,data:t.subarray(s,s+r)}},getID3Frames=t=>{let e=0;const r=[];for(;isHeader$2(t,e);){const s=readSize(t,e+6);e+=10;const o=e+s;for(;e+8<o;){const d=getFrameData(t.subarray(e)),L=decodeFrame(d);L&&r.push(L),e+=d.size+10}isFooter(t,e)&&(e+=10)}return r},decodeFrame=t=>t.type==="PRIV"?decodePrivFrame(t):t.type[0]==="W"?decodeURLFrame(t):decodeTextFrame(t),decodePrivFrame=t=>{if(t.size<2)return;const e=utf8ArrayToStr(t.data,!0),r=new Uint8Array(t.data.subarray(e.length+1));return{key:t.type,info:e,data:r.buffer}},decodeTextFrame=t=>{if(t.size<2)return;if(t.type==="TXXX"){let r=1;const s=utf8ArrayToStr(t.data.subarray(r),!0);r+=s.length+1;const o=utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:s,data:o}}const e=utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:e}},decodeURLFrame=t=>{if(t.type==="WXXX"){if(t.size<2)return;let r=1;const s=utf8ArrayToStr(t.data.subarray(r),!0);r+=s.length+1;const o=utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:s,data:o}}const e=utf8ArrayToStr(t.data);return{key:t.type,data:e}},readTimeStamp=t=>{if(t.data.byteLength===8){const e=new Uint8Array(t.data),r=e[3]&1;let s=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return s/=45,r&&(s+=4772185884e-2),Math.round(s)}},utf8ArrayToStr=(t,e=!1)=>{const r=getTextDecoder();if(r){const er=r.decode(t);if(e){const tr=er.indexOf("\0");return tr!==-1?er.substring(0,tr):er}return er.replace(/\0/g,"")}const s=t.length;let o,d,L,ge="",Mt=0;for(;Mt<s;){if(o=t[Mt++],o===0&&e)return ge;if(o===0||o===3)continue;switch(o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:ge+=String.fromCharCode(o);break;case 12:case 13:d=t[Mt++],ge+=String.fromCharCode((o&31)<<6|d&63);break;case 14:d=t[Mt++],L=t[Mt++],ge+=String.fromCharCode((o&15)<<12|(d&63)<<6|(L&63)<<0);break}}return ge};let decoder;function getTextDecoder(){if(!navigator.userAgent.includes("PlayStation 4"))return!decoder&&typeof self.TextDecoder<"u"&&(decoder=new self.TextDecoder("utf-8")),decoder}const Hex={hexDump:function(t){let e="";for(let r=0;r<t.length;r++){let s=t[r].toString(16);s.length<2&&(s="0"+s),e+=s}return e}},UINT32_MAX$1=Math.pow(2,32)-1,push=[].push,RemuxerTrackIdConfig={video:1,audio:2,id3:3,text:4};function bin2str(t){return String.fromCharCode.apply(null,t)}function readUint16(t,e){const r=t[e]<<8|t[e+1];return r<0?65536+r:r}function readUint32(t,e){const r=readSint32(t,e);return r<0?4294967296+r:r}function readSint32(t,e){return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}function writeUint32(t,e,r){t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r&255}function findBox(t,e){const r=[];if(!e.length)return r;const s=t.byteLength;for(let o=0;o<s;){const d=readUint32(t,o),L=bin2str(t.subarray(o+4,o+8)),ge=d>1?o+d:s;if(L===e[0])if(e.length===1)r.push(t.subarray(o+8,ge));else{const Mt=findBox(t.subarray(o+8,ge),e.slice(1));Mt.length&&push.apply(r,Mt)}o=ge}return r}function parseSegmentIndex(t){const e=[],r=t[0];let s=8;const o=readUint32(t,s);s+=4;const d=0,L=0;r===0?s+=8:s+=16,s+=2;let ge=t.length+L;const Mt=readUint16(t,s);s+=2;for(let er=0;er<Mt;er++){let tr=s;const ir=readUint32(t,tr);tr+=4;const rr=ir&2147483647;if((ir&2147483648)>>>31===1)return logger.warn("SIDX has hierarchical references (not supported)"),null;const ar=readUint32(t,tr);tr+=4,e.push({referenceSize:rr,subsegmentDuration:ar,info:{duration:ar/o,start:ge,end:ge+rr-1}}),ge+=rr,tr+=4,s=tr}return{earliestPresentationTime:d,timescale:o,version:r,referencesCount:Mt,references:e}}function parseInitSegment(t){const e=[],r=findBox(t,["moov","trak"]);for(let o=0;o<r.length;o++){const d=r[o],L=findBox(d,["tkhd"])[0];if(L){let ge=L[0],Mt=ge===0?12:20;const er=readUint32(L,Mt),tr=findBox(d,["mdia","mdhd"])[0];if(tr){ge=tr[0],Mt=ge===0?12:20;const ir=readUint32(tr,Mt),rr=findBox(d,["mdia","hdlr"])[0];if(rr){const nr=bin2str(rr.subarray(8,12)),ar={soun:ElementaryStreamTypes.AUDIO,vide:ElementaryStreamTypes.VIDEO}[nr];if(ar){const sr=findBox(d,["mdia","minf","stbl","stsd"])[0];let lr;sr&&(lr=bin2str(sr.subarray(12,16))),e[er]={timescale:ir,type:ar},e[ar]={timescale:ir,id:er,codec:lr}}}}}}
vendor: 19,256 bytes, line 3761
3761return findBox(t,["moov","mvex","trex"]).forEach(o=>{const d=readUint32(o,4),L=e[d];L&&(L.default={duration:readUint32(o,12),flags:readUint32(o,20)})}),e}function patchEncyptionData(t,e){if(!t||!e)return t;const r=e.keyId;return r&&e.isCommonEncryption&&findBox(t,["moov","trak"]).forEach(o=>{const L=findBox(o,["mdia","minf","stbl","stsd"])[0].subarray(8);let ge=findBox(L,["enca"]);const Mt=ge.length>0;Mt||(ge=findBox(L,["encv"])),ge.forEach(er=>{const tr=Mt?er.subarray(28):er.subarray(78);findBox(tr,["sinf"]).forEach(rr=>{const nr=parseSinf(rr);if(nr){const ar=nr.subarray(8,24);ar.some(sr=>sr!==0)||(logger.log(`[eme] Patching keyId in 'enc${Mt?"a":"v"}>sinf>>tenc' box: ${Hex.hexDump(ar)} -> ${Hex.hexDump(r)}`),nr.set(r,8))}})})}),t}function parseSinf(t){const e=findBox(t,["schm"])[0];if(e){const r=bin2str(e.subarray(4,8));if(r==="cbcs"||r==="cenc")return findBox(t,["schi","tenc"])[0]}return logger.error("[eme] missing 'schm' box"),null}function getStartDTS(t,e){return findBox(e,["moof","traf"]).reduce((r,s)=>{const o=findBox(s,["tfdt"])[0],d=o[0],L=findBox(s,["tfhd"]).reduce((ge,Mt)=>{const er=readUint32(Mt,4),tr=t[er];if(tr){let ir=readUint32(o,4);if(d===1){if(ir===UINT32_MAX$1)return logger.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),ge;ir*=UINT32_MAX$1+1,ir+=readUint32(o,8)}const rr=tr.timescale||9e4,nr=ir/rr;if(isFiniteNumber(nr)&&(ge===null||nr<ge))return nr}return ge},null);return L!==null&&isFiniteNumber(L)&&(r===null||L<r)?L:r},null)}function getDuration(t,e){let r=0,s=0,o=0;const d=findBox(t,["moof","traf"]);for(let L=0;L<d.length;L++){const ge=d[L],Mt=findBox(ge,["tfhd"])[0],er=readUint32(Mt,4),tr=e[er];if(!tr)continue;const ir=tr.default,rr=readUint32(Mt,0)|(ir==null?void 0:ir.flags);let nr=ir==null?void 0:ir.duration;rr&8&&(rr&2?nr=readUint32(Mt,12):nr=readUint32(Mt,8));const ar=tr.timescale||9e4,sr=findBox(ge,["trun"]);for(let lr=0;lr<sr.length;lr++){if(r=computeRawDurationFromSamples(sr[lr]),!r&&nr){const cr=readUint32(sr[lr],4);r=nr*cr}tr.type===ElementaryStreamTypes.VIDEO?s+=r/ar:tr.type===ElementaryStreamTypes.AUDIO&&(o+=r/ar)}}if(s===0&&o===0){let L=0;const ge=findBox(t,["sidx"]);for(let Mt=0;Mt<ge.length;Mt++){const er=parseSegmentIndex(ge[Mt]);er!=null&&er.references&&(L+=er.references.reduce((tr,ir)=>tr+ir.info.duration||0,0))}return L}return s||o}function computeRawDurationFromSamples(t){const e=readUint32(t,0);let r=8;e&1&&(r+=4),e&4&&(r+=4);let s=0;const o=readUint32(t,4);for(let d=0;d<o;d++){if(e&256){const L=readUint32(t,r);s+=L,r+=4}e&512&&(r+=4),e&1024&&(r+=4),e&2048&&(r+=4)}return s}function offsetStartDTS(t,e,r){findBox(e,["moof","traf"]).forEach(s=>{findBox(s,["tfhd"]).forEach(o=>{const d=readUint32(o,4),L=t[d];if(!L)return;const ge=L.timescale||9e4;findBox(s,["tfdt"]).forEach(Mt=>{const er=Mt[0];let tr=readUint32(Mt,4);if(er===0)tr-=r*ge,tr=Math.max(tr,0),writeUint32(Mt,4,tr);else{tr*=Math.pow(2,32),tr+=readUint32(Mt,8),tr-=r*ge,tr=Math.max(tr,0);const ir=Math.floor(tr/(UINT32_MAX$1+1)),rr=Math.floor(tr%(UINT32_MAX$1+1));writeUint32(Mt,4,ir),writeUint32(Mt,8,rr)}})})})}function segmentValidRange(t){const e={valid:null,remainder:null},r=findBox(t,["moof"]);if(r){if(r.length<2)return e.remainder=t,e}else return e;const s=r[r.length-1];return e.valid=sliceUint8(t,0,s.byteOffset-8),e.remainder=sliceUint8(t,s.byteOffset-8),e}function appendUint8Array(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function parseSamples(t,e){const r=[],s=e.samples,o=e.timescale,d=e.id;let L=!1;return findBox(s,["moof"]).map(Mt=>{const er=Mt.byteOffset-8;findBox(Mt,["traf"]).map(ir=>{const rr=findBox(ir,["tfdt"]).map(nr=>{const ar=nr[0];let sr=readUint32(nr,4);return ar===1&&(sr*=Math.pow(2,32),sr+=readUint32(nr,8)),sr/o})[0];return rr!==void 0&&(t=rr),findBox(ir,["tfhd"]).map(nr=>{const ar=readUint32(nr,4),sr=readUint32(nr,0)&16777215,lr=(sr&1)!==0,cr=(sr&2)!==0,ur=(sr&8)!==0;let or=0;const dr=(sr&16)!==0;let hr=0;const pr=(sr&32)!==0;let mr=8;ar===d&&(lr&&(mr+=8),cr&&(mr+=4),ur&&(or=readUint32(nr,mr),mr+=4),dr&&(hr=readUint32(nr,mr),mr+=4),pr&&(mr+=4),e.type==="video"&&(L=isHEVC(e.codec)),findBox(ir,["trun"]).map(vr=>{const Er=vr[0],Cr=readUint32(vr,0)&16777215,Pr=(Cr&1)!==0;let kr=0;const Mr=(Cr&4)!==0,Ur=(Cr&256)!==0;let $r=0;const yr=(Cr&512)!==0;let xr=0;const gr=(Cr&1024)!==0,_r=(Cr&2048)!==0;let wr=0;const Ir=readUint32(vr,4);let Hr=8;Pr&&(kr=readUint32(vr,Hr),Hr+=4),Mr&&(Hr+=4);let Yr=kr+er;for(let Jr=0;Jr<Ir;Jr++){if(Ur?($r=readUint32(vr,Hr),Hr+=4):$r=or,yr?(xr=readUint32(vr,Hr),Hr+=4):xr=hr,gr&&(Hr+=4),_r&&(Er===0?wr=readUint32(vr,Hr):wr=readSint32(vr,Hr),Hr+=4),e.type===ElementaryStreamTypes.VIDEO){let xi=0;for(;xi<xr;){const di=readUint32(s,Yr);if(Yr+=4,isSEIMessage(L,s[Yr])){const Vr=s.subarray(Yr,Yr+di);parseSEIMessageFromNALu(Vr,L?2:1,t+wr/o,r)}Yr+=di,xi+=di+4}}t+=$r/o}}))})})}),r}function isHEVC(t){if(!t)return!1;const e=t.indexOf("."),r=e<0?t:t.substring(0,e);return r==="hvc1"||r==="hev1"||r==="dvh1"||r==="dvhe"}function isSEIMessage(t,e){if(t){const r=e>>1&63;return r===39||r===40}else return(e&31)===6}function parseSEIMessageFromNALu(t,e,r,s){const o=discardEPB(t);let d=0;d+=e;let L=0,ge=0,Mt=!1,er=0;for(;d<o.length;){L=0;do{if(d>=o.length)break;er=o[d++],L+=er}while(er===255);ge=0;do{if(d>=o.length)break;er=o[d++],ge+=er}while(er===255);const tr=o.length-d;if(!Mt&&L===4&&d<o.length){if(Mt=!0,o[d++]===181){const rr=readUint16(o,d);if(d+=2,rr===49){const nr=readUint32(o,d);if(d+=4,nr===1195456820){const ar=o[d++];if(ar===3){const sr=o[d++],lr=31&sr,cr=64&sr,ur=cr?2+lr*3:0,or=new Uint8Array(ur);if(cr){or[0]=sr;for(let dr=1;dr<ur;dr++)or[dr]=o[d++]}s.push({type:ar,payloadType:L,pts:r,bytes:or})}}}}}else if(L===5&&ge<tr){if(Mt=!0,ge>16){const ir=[];for(let ar=0;ar<16;ar++){const sr=o[d++].toString(16);ir.push(sr.length==1?"0"+sr:sr),(ar===3||ar===5||ar===7||ar===9)&&ir.push("-")}const rr=ge-16,nr=new Uint8Array(rr);for(let ar=0;ar<rr;ar++)nr[ar]=o[d++];s.push({payloadType:L,pts:r,uuid:ir.join(""),userData:utf8ArrayToStr(nr),userDataBytes:nr})}}else if(ge<tr)d+=ge;else if(ge>tr)break}}function discardEPB(t){const e=t.byteLength,r=[];let s=1;for(;s<e-2;)t[s]===0&&t[s+1]===0&&t[s+2]===3?(r.push(s+2),s+=2):s++;if(r.length===0)return t;const o=e-r.length,d=new Uint8Array(o);let L=0;for(s=0;s<o;L++,s++)L===r[0]&&(L++,r.shift()),d[s]=t[L];return d}function parseEmsg(t){const e=t[0];let r="",s="",o=0,d=0,L=0,ge=0,Mt=0,er=0;if(e===0){for(;bin2str(t.subarray(er,er+1))!=="\0";)r+=bin2str(t.subarray(er,er+1)),er+=1;for(r+=bin2str(t.subarray(er,er+1)),er+=1;bin2str(t.subarray(er,er+1))!=="\0";)s+=bin2str(t.subarray(er,er+1)),er+=1;s+=bin2str(t.subarray(er,er+1)),er+=1,o=readUint32(t,12),d=readUint32(t,16),ge=readUint32(t,20),Mt=readUint32(t,24),er=28}else if(e===1){er+=4,o=readUint32(t,er),er+=4;const ir=readUint32(t,er);er+=4;const rr=readUint32(t,er);for(er+=4,L=2**32*ir+rr,isSafeInteger(L)||(L=Number.MAX_SAFE_INTEGER,logger.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),ge=readUint32(t,er),er+=4,Mt=readUint32(t,er),er+=4;bin2str(t.subarray(er,er+1))!=="\0";)r+=bin2str(t.subarray(er,er+1)),er+=1;for(r+=bin2str(t.subarray(er,er+1)),er+=1;bin2str(t.subarray(er,er+1))!=="\0";)s+=bin2str(t.subarray(er,er+1)),er+=1;s+=bin2str(t.subarray(er,er+1)),er+=1}const tr=t.subarray(er,t.byteLength);return{schemeIdUri:r,value:s,timeScale:o,presentationTime:L,presentationTimeDelta:d,eventDuration:ge,id:Mt,payload:tr}}function mp4Box(t,...e){const r=e.length;let s=8,o=r;for(;o--;)s+=e[o].byteLength;const d=new Uint8Array(s);for(d[0]=s>>24&255,d[1]=s>>16&255,d[2]=s>>8&255,d[3]=s&255,d.set(t,4),o=0,s=8;o<r;o++)d.set(e[o],s),s+=e[o].byteLength;return d}function mp4pssh(t,e,r){if(t.byteLength!==16)throw new RangeError("Invalid system id");let s,o;s=0,o=new Uint8Array;let d;s>0?(d=new Uint8Array(4),e.length>0&&new DataView(d.buffer).setUint32(0,e.length,!1)):d=new Uint8Array;const L=new Uint8Array(4);return r&&r.byteLength>0&&new DataView(L.buffer).setUint32(0,r.byteLength,!1),mp4Box([112,115,115,104],new Uint8Array([s,0,0,0]),t,d,o,L,r||new Uint8Array)}function parsePssh(t){if(!(t instanceof ArrayBuffer)||t.byteLength<32)return null;const e={version:0,systemId:"",kids:null,data:null},r=new DataView(t),s=r.getUint32(0);if(t.byteLength!==s&&s>44||r.getUint32(4)!==1886614376||(e.version=r.getUint32(8)>>>24,e.version>1))return null;e.systemId=Hex.hexDump(new Uint8Array(t,12,16));const d=r.getUint32(28);if(e.version===0){if(s-32<d)return null;e.data=new Uint8Array(t,32,d)}else if(e.version===1){e.kids=[];for(let L=0;L<d;L++)e.kids.push(new Uint8Array(t,32+L*16,16))}return e}let keyUriToKeyIdMap={};class LevelKey{static clearKeyUriToKeyIdMap(){keyUriToKeyIdMap={}}constructor(e,r,s,o=[1],d=null){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=r,this.keyFormat=s,this.keyFormatVersions=o,this.iv=d,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&e!=="AES-128"}isSupported(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case KeySystemFormats.FAIRPLAY:case KeySystemFormats.WIDEVINE:case KeySystemFormats.PLAYREADY:case KeySystemFormats.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof e!="number"&&(this.method==="AES-128"&&!this.iv&&logger.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const s=createInitializationVector(e);return new LevelKey(this.method,this.uri,"identity",this.keyFormatVersions,s)}const r=convertDataUriToArrayBytes(this.uri);if(r)switch(this.keyFormat){case KeySystemFormats.WIDEVINE:this.pssh=r,r.length>=22&&(this.keyId=r.subarray(r.length-22,r.length-6));break;case KeySystemFormats.PLAYREADY:{const s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=mp4pssh(s,null,r);const o=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),d=String.fromCharCode.apply(null,Array.from(o)),L=d.substring(d.indexOf("<"),d.length),er=new DOMParser().parseFromString(L,"text/xml").getElementsByTagName("KID")[0];if(er){const tr=er.childNodes[0]?er.childNodes[0].nodeValue:er.getAttribute("VALUE");if(tr){const ir=base64Decode(tr).subarray(0,16);changeEndianness(ir),this.keyId=ir}}break}default:{let s=r.subarray(0,16);if(s.length!==16){const o=new Uint8Array(16);o.set(s,16-s.length),s=o}this.keyId=s;break}}if(!this.keyId||this.keyId.byteLength!==16){let s=keyUriToKeyIdMap[this.uri];if(!s){const o=Object.keys(keyUriToKeyIdMap).length%Number.MAX_SAFE_INTEGER;s=new Uint8Array(16),new DataView(s.buffer,12,4).setUint32(0,o),keyUriToKeyIdMap[this.uri]=s}this.keyId=s}return this}}function createInitializationVector(t){const e=new Uint8Array(16);for(let r=12;r<16;r++)e[r]=t>>8*(15-r)&255;return e}const VARIABLE_REPLACEMENT_REGEX=/\{\$([a-zA-Z0-9-_]+)\}/g;function hasVariableReferences(t){return VARIABLE_REPLACEMENT_REGEX.test(t)}function substituteVariablesInAttributes(t,e,r){if(t.variableList!==null||t.hasVariableRefs)for(let s=r.length;s--;){const o=r[s],d=e[o];d&&(e[o]=substituteVariables(t,d))}}function substituteVariables(t,e){if(t.variableList!==null||t.hasVariableRefs){const r=t.variableList;return e.replace(VARIABLE_REPLACEMENT_REGEX,s=>{const o=s.substring(2,s.length-1),d=r==null?void 0:r[o];return d===void 0?(t.playlistParsingError||(t.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${o}"`)),s):d})}return e}function addVariableDefinition(t,e,r){let s=t.variableList;s||(t.variableList=s={});let o,d;if("QUERYPARAM"in e){o=e.QUERYPARAM;try{const L=new self.URL(r).searchParams;if(L.has(o))d=L.get(o);else throw new Error(`"${o}" does not match any query parameter in URI: "${r}"`)}catch(L){t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${L.message}`))}}else o=e.NAME,d=e.VALUE;o in s?t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${o}"`)):s[o]=d||""}function importVariableDefinition(t,e,r){const s=e.IMPORT;if(r&&s in r){let o=t.variableList;o||(t.variableList=o={}),o[s]=r[s]}else t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${s}"`))}function getMediaSource(){if(!(typeof self>"u"))return self.MediaSource||self.WebKitMediaSource}const sampleEntryCodesISO={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}},MediaSource$2=getMediaSource();function isCodecType(t,e){const r=sampleEntryCodesISO[e];return!!r&&r[t.slice(0,4)]===!0}function isCodecSupportedInMp4(t,e){var r;return(r=MediaSource$2==null?void 0:MediaSource$2.isTypeSupported(`${e||"video"}/mp4;codecs="${t}"`))!=null?r:!1}const MASTER_PLAYLIST_REGEX=/#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,MASTER_PLAYLIST_MEDIA_REGEX=/#EXT-X-MEDIA:(.*)/g,IS_MEDIA_PLAYLIST=/^#EXT(?:INF|-X-TARGETDURATION):/m,LEVEL_PLAYLIST_REGEX_FAST=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),LEVEL_PLAYLIST_REGEX_SLOW=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(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)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class M3U8Parser{static findGroup(e,r){for(let s=0;s<e.length;s++){const o=e[s];if(o.id===r)return o}}static convertAVC1ToAVCOTI(e){const r=e.split(".");if(r.length>2){let s=r.shift()+".";return s+=parseInt(r.shift()).toString(16),s+=("000"+parseInt(r.shift()).toString(16)).slice(-4),s}return e}static resolve(e,r){return urlToolkitExports.buildAbsoluteURL(r,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return IS_MEDIA_PLAYLIST.test(e)}static parseMasterPlaylist(e,r){const s=hasVariableReferences(e),o={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:s},d=[];MASTER_PLAYLIST_REGEX.lastIndex=0;let L;for(;(L=MASTER_PLAYLIST_REGEX.exec(e))!=null;)if(L[1]){var ge;const er=new AttrList(L[1]);substituteVariablesInAttributes(o,er,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const tr=substituteVariables(o,L[2]),ir={attrs:er,bitrate:er.decimalInteger("AVERAGE-BANDWIDTH")||er.decimalInteger("BANDWIDTH"),name:er.NAME,url:M3U8Parser.resolve(tr,r)},rr=er.decimalResolution("RESOLUTION");rr&&(ir.width=rr.width,ir.height=rr.height),setCodecs((er.CODECS||"").split(/[ ,]+/).filter(nr=>nr),ir),ir.videoCodec&&ir.videoCodec.indexOf("avc1")!==-1&&(ir.videoCodec=M3U8Parser.convertAVC1ToAVCOTI(ir.videoCodec)),(ge=ir.unknownCodecs)!=null&&ge.length||d.push(ir),o.levels.push(ir)}else if(L[3]){const er=L[3],tr=L[4];switch(er){case"SESSION-DATA":{const ir=new AttrList(tr);substituteVariablesInAttributes(o,ir,["DATA-ID","LANGUAGE","VALUE","URI"]);const rr=ir["DATA-ID"];rr&&(o.sessionData===null&&(o.sessionData={}),o.sessionData[rr]=ir);break}case"SESSION-KEY":{const ir=parseKey(tr,r,o);ir.encrypted&&ir.isSupported()?(o.sessionKeys===null&&(o.sessionKeys=[]),o.sessionKeys.push(ir)):logger.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${tr}"`);break}case"DEFINE":{{const ir=new AttrList(tr);substituteVariablesInAttributes(o,ir,["NAME","VALUE","QUERYPARAM"]),addVariableDefinition(o,ir,r)}break}case"CONTENT-STEERING":{const ir=new AttrList(tr);substituteVariablesInAttributes(o,ir,["SERVER-URI","PATHWAY-ID"]),o.contentSteering={uri:M3U8Parser.resolve(ir["SERVER-URI"],r),pathwayId:ir["PATHWAY-ID"]||"."};break}case"START":{o.startTimeOffset=parseStartTimeOffset(tr);break}}}const Mt=d.length>0&&d.length<o.levels.length;return o.levels=Mt?d:o.levels,o.levels.length===0&&(o.playlistParsingError=new Error("no levels found in manifest")),o}static parseMasterPlaylistMedia(e,r,s){let o;const d={},L=s.levels,ge={AUDIO:L.map(er=>({id:er.attrs.AUDIO,audioCodec:er.audioCodec})),SUBTITLES:L.map(er=>({id:er.attrs.SUBTITLES,textCodec:er.textCodec})),"CLOSED-CAPTIONS":[]};let Mt=0;for(MASTER_PLAYLIST_MEDIA_REGEX.lastIndex=0;(o=MASTER_PLAYLIST_MEDIA_REGEX.exec(e))!==null;){const er=new AttrList(o[1]),tr=er.TYPE;if(tr){const ir=ge[tr],rr=d[tr]||[];d[tr]=rr,substituteVariablesInAttributes(s,er,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const nr={attrs:er,bitrate:0,id:Mt++,groupId:er["GROUP-ID"]||"",instreamId:er["INSTREAM-ID"],name:er.NAME||er.LANGUAGE||"",type:tr,default:er.bool("DEFAULT"),autoselect:er.bool("AUTOSELECT"),forced:er.bool("FORCED"),lang:er.LANGUAGE,url:er.URI?M3U8Parser.resolve(er.URI,r):""};if(ir!=null&&ir.length){const ar=M3U8Parser.findGroup(ir,nr.groupId)||ir[0];assignCodec(nr,ar,"audioCodec"),assignCodec(nr,ar,"textCodec")}rr.push(nr)}}return d}static parseLevelPlaylist(e,r,s,o,d,L){const ge=new LevelDetails(r),Mt=ge.fragments;let er=null,tr=0,ir=0,rr=0,nr=0,ar=null,sr=new Fragment(o,r),lr,cr,ur,or=-1,dr=!1;for(LEVEL_PLAYLIST_REGEX_FAST.lastIndex=0,ge.m3u8=e,ge.hasVariableRefs=hasVariableReferences(e);(lr=LEVEL_PLAYLIST_REGEX_FAST.exec(e))!==null;){dr&&(dr=!1,sr=new Fragment(o,r),sr.start=rr,sr.sn=tr,sr.cc=nr,sr.level=s,er&&(sr.initSegment=er,sr.rawProgramDateTime=er.rawProgramDateTime,er.rawProgramDateTime=null));const vr=lr[1];if(vr){sr.duration=parseFloat(vr);const Er=(" "+lr[2]).slice(1);sr.title=Er||null,sr.tagList.push(Er?["INF",vr,Er]:["INF",vr])}else if(lr[3]){if(isFiniteNumber(sr.duration)){sr.start=rr,ur&&setFragLevelKeys(sr,ur,ge),sr.sn=tr,sr.level=s,sr.cc=nr,sr.urlId=d,Mt.push(sr);const Er=(" "+lr[3]).slice(1);sr.relurl=substituteVariables(ge,Er),assignProgramDateTime(sr,ar),ar=sr,rr+=sr.duration,tr++,ir=0,dr=!0}}else if(lr[4]){const Er=(" "+lr[4]).slice(1);ar?sr.setByteRange(Er,ar):sr.setByteRange(Er)}else if(lr[5])sr.rawProgramDateTime=(" "+lr[5]).slice(1),sr.tagList.push(["PROGRAM-DATE-TIME",sr.rawProgramDateTime]),or===-1&&(or=Mt.length);else{if(lr=lr[0].match(LEVEL_PLAYLIST_REGEX_SLOW),!lr){logger.warn("No matches on
3761slow regex match for level playlist!");continue}for(cr=1;cr<lr.length&&!(typeof lr[cr]<"u");cr++);const Er=(" "+lr[cr]).slice(1),Cr=(" "+lr[cr+1]).slice(1),Pr=lr[cr+2]?(" "+lr[cr+2]).slice(1):"";switch(Er){case"PLAYLIST-TYPE":ge.type=Cr.toUpperCase();break;case"MEDIA-SEQUENCE":tr=ge.startSN=parseInt(Cr);break;case"SKIP":{const kr=new AttrList(Cr);substituteVariablesInAttributes(ge,kr,["RECENTLY-REMOVED-DATERANGES"]);const Mr=kr.decimalInteger("SKIPPED-SEGMENTS");if(isFiniteNumber(Mr)){ge.skippedSegments=Mr;for(let $r=Mr;$r--;)Mt.unshift(null);tr+=Mr}const Ur=kr.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ur&&(ge.recentlyRemovedDateranges=Ur.split(" "));break}case"TARGETDURATION":ge.targetduration=Math.max(parseInt(Cr),1);break;case"VERSION":ge.version=parseInt(Cr);break;case"EXTM3U":break;case"ENDLIST":ge.live=!1;break;case"#":(Cr||Pr)&&sr.tagList.push(Pr?[Cr,Pr]:[Cr]);break;case"DISCONTINUITY":nr++,sr.tagList.push(["DIS"]);break;case"GAP":sr.gap=!0,sr.tagList.push([Er]);break;case"BITRATE":sr.tagList.push([Er,Cr]);break;case"DATERANGE":{const kr=new AttrList(Cr);substituteVariablesInAttributes(ge,kr,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),substituteVariablesInAttributes(ge,kr,kr.clientAttrs);const Mr=new DateRange(kr,ge.dateRanges[kr.ID]);Mr.isValid||ge.skippedSegments?ge.dateRanges[Mr.id]=Mr:logger.warn(`Ignoring invalid DATERANGE tag: "${Cr}"`),sr.tagList.push(["EXT-X-DATERANGE",Cr]);break}case"DEFINE":{{const kr=new AttrList(Cr);substituteVariablesInAttributes(ge,kr,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in kr?importVariableDefinition(ge,kr,L):addVariableDefinition(ge,kr,r)}break}case"DISCONTINUITY-SEQUENCE":nr=parseInt(Cr);break;case"KEY":{const kr=parseKey(Cr,r,ge);if(kr.isSupported()){if(kr.method==="NONE"){ur=void 0;break}ur||(ur={}),ur[kr.keyFormat]&&(ur=_extends({},ur)),ur[kr.keyFormat]=kr}else logger.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${Cr}"`);break}case"START":ge.startTimeOffset=parseStartTimeOffset(Cr);break;case"MAP":{const kr=new AttrList(Cr);if(substituteVariablesInAttributes(ge,kr,["BYTERANGE","URI"]),sr.duration){const Mr=new Fragment(o,r);setInitSegment(Mr,kr,s,ur),er=Mr,sr.initSegment=er,er.rawProgramDateTime&&!sr.rawProgramDateTime&&(sr.rawProgramDateTime=er.rawProgramDateTime)}else setInitSegment(sr,kr,s,ur),er=sr,dr=!0;break}case"SERVER-CONTROL":{const kr=new AttrList(Cr);ge.canBlockReload=kr.bool("CAN-BLOCK-RELOAD"),ge.canSkipUntil=kr.optionalFloat("CAN-SKIP-UNTIL",0),ge.canSkipDateRanges=ge.canSkipUntil>0&&kr.bool("CAN-SKIP-DATERANGES"),ge.partHoldBack=kr.optionalFloat("PART-HOLD-BACK",0),ge.holdBack=kr.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const kr=new AttrList(Cr);ge.partTarget=kr.decimalFloatingPoint("PART-TARGET");break}case"PART":{let kr=ge.partList;kr||(kr=ge.partList=[]);const Mr=ir>0?kr[kr.length-1]:void 0,Ur=ir++,$r=new AttrList(Cr);substituteVariablesInAttributes(ge,$r,["BYTERANGE","URI"]);const yr=new Part$1($r,sr,r,Ur,Mr);kr.push(yr),sr.duration+=yr.duration;break}case"PRELOAD-HINT":{const kr=new AttrList(Cr);substituteVariablesInAttributes(ge,kr,["URI"]),ge.preloadHint=kr;break}case"RENDITION-REPORT":{const kr=new AttrList(Cr);substituteVariablesInAttributes(ge,kr,["URI"]),ge.renditionReports=ge.renditionReports||[],ge.renditionReports.push(kr);break}default:logger.warn(`line parsed but not handled: ${lr}`);break}}}ar&&!ar.relurl?(Mt.pop(),rr-=ar.duration,ge.partList&&(ge.fragmentHint=ar)):ge.partList&&(assignProgramDateTime(sr,ar),sr.cc=nr,ge.fragmentHint=sr,ur&&setFragLevelKeys(sr,ur,ge));const hr=Mt.length,pr=Mt[0],mr=Mt[hr-1];if(rr+=ge.skippedSegments*ge.targetduration,rr>0&&hr&&mr){ge.averagetargetduration=rr/hr;const vr=mr.sn;ge.endSN=vr!=="initSegment"?vr:0,ge.live||(mr.endList=!0),pr&&(ge.startCC=pr.cc)}else ge.endSN=0,ge.startCC=0;return ge.fragmentHint&&(rr+=ge.fragmentHint.duration),ge.totalduration=rr,ge.endCC=nr,or>0&&backfillProgramDateTimes(Mt,or),ge}}function parseKey(t,e,r){var s,o;const d=new AttrList(t);substituteVariablesInAttributes(r,d,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const L=(s=d.METHOD)!=null?s:"",ge=d.URI,Mt=d.hexadecimalInteger("IV"),er=d.KEYFORMATVERSIONS,tr=(o=d.KEYFORMAT)!=null?o:"identity";ge&&d.IV&&!Mt&&logger.error(`Invalid IV: ${d.IV}`);const ir=ge?M3U8Parser.resolve(ge,e):"",rr=(er||"1").split("/").map(Number).filter(Number.isFinite);return new LevelKey(L,ir,tr,rr,Mt)}function parseStartTimeOffset(t){const r=new AttrList(t).decimalFloatingPoint("TIME-OFFSET");return isFiniteNumber(r)?r:null}function setCodecs(t,e){["video","audio","text"].forEach(r=>{const s=t.filter(o=>isCodecType(o,r));if(s.length){const o=s.filter(d=>d.lastIndexOf("avc1",0)===0||d.lastIndexOf("mp4a",0)===0);e[`${r}Codec`]=o.length>0?o[0]:s[0],t=t.filter(d=>s.indexOf(d)===-1)}}),e.unknownCodecs=t}function assignCodec(t,e,r){const s=e[r];
vendor: 15,050 bytes, line 3761
3761s&&(t[r]=s)}function backfillProgramDateTimes(t,e){let r=t[e];for(let s=e;s--;){const o=t[s];if(!o)return;o.programDateTime=r.programDateTime-o.duration*1e3,r=o}}function assignProgramDateTime(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):e!=null&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),isFiniteNumber(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}function setInitSegment(t,e,r,s){t.relurl=e.URI,e.BYTERANGE&&t.setByteRange(e.BYTERANGE),t.level=r,t.sn="initSegment",s&&(t.levelkeys=s),t.initSegment=null}function setFragLevelKeys(t,e,r){t.levelkeys=e;const{encryptedFragments:s}=r;(!s.length||s[s.length-1].levelkeys!==e)&&Object.keys(e).some(o=>e[o].isCommonEncryption)&&s.push(t)}var PlaylistContextType={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},PlaylistLevelType={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function mapContextToLevelType(t){const{type:e}=t;switch(e){case PlaylistContextType.AUDIO_TRACK:return PlaylistLevelType.AUDIO;case PlaylistContextType.SUBTITLE_TRACK:return PlaylistLevelType.SUBTITLE;default:return PlaylistLevelType.MAIN}}function getResponseUrl(t,e){let r=t.url;return(r===void 0||r.indexOf("data:")===0)&&(r=e.url),r}class PlaylistLoader{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const r=this.hls.config,s=r.pLoader,o=r.loader,d=s||o,L=new d(r);return this.loaders[e.type]=L,L}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const r=this.loaders[e];r&&r.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,r){const{url:s}=r;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:PlaylistContextType.MANIFEST,url:s,deliveryDirectives:null})}onLevelLoading(e,r){const{id:s,level:o,url:d,deliveryDirectives:L}=r;this.load({id:s,level:o,responseType:"text",type:PlaylistContextType.LEVEL,url:d,deliveryDirectives:L})}onAudioTrackLoading(e,r){const{id:s,groupId:o,url:d,deliveryDirectives:L}=r;this.load({id:s,groupId:o,level:null,responseType:"text",type:PlaylistContextType.AUDIO_TRACK,url:d,deliveryDirectives:L})}onSubtitleTrackLoading(e,r){const{id:s,groupId:o,url:d,deliveryDirectives:L}=r;this.load({id:s,groupId:o,level:null,responseType:"text",type:PlaylistContextType.SUBTITLE_TRACK,url:d,deliveryDirectives:L})}load(e){var r;const s=this.hls.config;let o=this.getInternalLoader(e);if(o){const er=o.context;if(er&&er.url===e.url){logger.trace("[playlist-loader]: playlist request ongoing");return}logger.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),o.abort()}let d;if(e.type===PlaylistContextType.MANIFEST?d=s.manifestLoadPolicy.default:d=_extends({},s.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),o=this.createInternalLoader(e),(r=e.deliveryDirectives)!=null&&r.part){let er;if(e.type===PlaylistContextType.LEVEL&&e.level!==null?er=this.hls.levels[e.level].details:e.type===PlaylistContextType.AUDIO_TRACK&&e.id!==null?er=this.hls.audioTracks[e.id].details:e.type===PlaylistContextType.SUBTITLE_TRACK&&e.id!==null&&(er=this.hls.subtitleTracks[e.id].details),er){const tr=er.partTarget,ir=er.targetduration;if(tr&&ir){const rr=Math.max(tr*3,ir*.8)*1e3;d=_extends({},d,{maxTimeToFirstByteMs:Math.min(rr,d.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(rr,d.maxTimeToFirstByteMs)})}}}const L=d.errorRetry||d.timeoutRetry||{},ge={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:L.maxNumRetry||0,retryDelay:L.retryDelayMs||0,maxRetryDelay:L.maxRetryDelayMs||0},Mt={onSuccess:(er,tr,ir,rr)=>{const nr=this.getInternalLoader(ir);this.resetInternalLoader(ir.type);const ar=er.data;if(ar.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(er,ir,new Error("no EXTM3U delimiter"),rr||null,tr);return}tr.parsing.start=performance.now(),M3U8Parser.isMediaPlaylist(ar)?this.handleTrackOrLevelPlaylist(er,tr,ir,rr||null,nr):this.handleMasterPlaylist(er,tr,ir,rr)},onError:(er,tr,ir,rr)=>{this.handleNetworkError(tr,ir,!1,er,rr)},onTimeout:(er,tr,ir)=>{this.handleNetworkError(tr,ir,!0,void 0,er)}};o.load(e,ge,Mt)}handleMasterPlaylist(e,r,s,o){const d=this.hls,L=e.data,ge=getResponseUrl(e,s),Mt=M3U8Parser.parseMasterPlaylist(L,ge);if(Mt.playlistParsingError){this.handleManifestParsingError(e,s,Mt.playlistParsingError,o,r);return}const{contentSteering:er,levels:tr,sessionData:ir,sessionKeys:rr,startTimeOffset:nr,variableList:ar}=Mt;this.variableList=ar;const{AUDIO:sr=[],SUBTITLES:lr,"CLOSED-CAPTIONS":cr}=M3U8Parser.parseMasterPlaylistMedia(L,ge,Mt);sr.length&&!sr.some(or=>!or.url)&&tr[0].audioCodec&&!tr[0].attrs.AUDIO&&(logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),sr.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new AttrList({}),bitrate:0,url:""})),d.trigger(Events.MANIFEST_LOADED,{levels:tr,audioTracks:sr,subtitles:lr,captions:cr,contentSteering:er,url:ge,stats:r,networkDetails:o,sessionData:ir,sessionKeys:rr,startTimeOffset:nr,variableList:ar})}handleTrackOrLevelPlaylist(e,r,s,o,d){const L=this.hls,{id:ge,level:Mt,type:er}=s,tr=getResponseUrl(e,s),ir=isFiniteNumber(ge)?ge:0,rr=isFiniteNumber(Mt)?Mt:ir,nr=mapContextToLevelType(s),ar=M3U8Parser.parseLevelPlaylist(e.data,tr,rr,nr,ir,this.variableList);if(er===PlaylistContextType.MANIFEST){const sr={attrs:new AttrList({}),bitrate:0,details:ar,name:"",url:tr};L.trigger(Events.MANIFEST_LOADED,{levels:[sr],audioTracks:[],url:tr,stats:r,networkDetails:o,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}r.parsing.end=performance.now(),s.levelDetails=ar,this.handlePlaylistLoaded(ar,e,r,s,o,d)}handleManifestParsingError(e,r,s,o,d){this.hls.trigger(Events.ERROR,{type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.MANIFEST_PARSING_ERROR,fatal:r.type===PlaylistContextType.MANIFEST,url:e.url,err:s,error:s,reason:s.message,response:e,context:r,networkDetails:o,stats:d})}handleNetworkError(e,r,s=!1,o,d){let L=`A network ${s?"timeout":"error"+(o?" (status "+o.code+")":"")} occurred while loading ${e.type}`;e.type===PlaylistContextType.LEVEL?L+=`: ${e.level} id: ${e.id}`:(e.type===PlaylistContextType.AUDIO_TRACK||e.type===PlaylistContextType.SUBTITLE_TRACK)&&(L+=` id: ${e.id} group-id: "${e.groupId}"`);const ge=new Error(L);logger.warn(`[playlist-loader]: ${L}`);let Mt=ErrorDetails.UNKNOWN,er=!1;const tr=this.getInternalLoader(e);switch(e.type){case PlaylistContextType.MANIFEST:Mt=s?ErrorDetails.MANIFEST_LOAD_TIMEOUT:ErrorDetails.MANIFEST_LOAD_ERROR,er=!0;break;case PlaylistContextType.LEVEL:Mt=s?ErrorDetails.LEVEL_LOAD_TIMEOUT:ErrorDetails.LEVEL_LOAD_ERROR,er=!1;break;case PlaylistContextType.AUDIO_TRACK:Mt=s?ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:ErrorDetails.AUDIO_TRACK_LOAD_ERROR,er=!1;break;case PlaylistContextType.SUBTITLE_TRACK:Mt=s?ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:ErrorDetails.SUBTITLE_LOAD_ERROR,er=!1;break}tr&&this.resetInternalLoader(e.type);const ir={type:ErrorTypes.NETWORK_ERROR,details:Mt,fatal:er,url:e.url,loader:tr,context:e,error:ge,networkDetails:r,stats:d};if(o){const rr=(r==null?void 0:r.url)||e.url;ir.response=_objectSpread2({url:rr,data:void 0},o)}this.hls.trigger(Events.ERROR,ir)}handlePlaylistLoaded(e,r,s,o,d,L){const ge=this.hls,{type:Mt,level:er,id:tr,groupId:ir,deliveryDirectives:rr}=o,nr=getResponseUrl(r,o),ar=mapContextToLevelType(o),sr=typeof o.level=="number"&&ar===PlaylistLevelType.MAIN?er:void 0;if(!e.fragments.length){const cr=new Error("No Segments found in Playlist");ge.trigger(Events.ERROR,{type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:nr,error:cr,reason:cr.message,response:r,context:o,level:sr,parent:ar,networkDetails:d,stats:s});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const lr=e.playlistParsingError;if(lr){ge.trigger(Events.ERROR,{type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.LEVEL_PARSING_ERROR,fatal:!1,url:nr,error:lr,reason:lr.message,response:r,context:o,level:sr,parent:ar,networkDetails:d,stats:s});return}switch(e.live&&L&&(L.getCacheAge&&(e.ageHeader=L.getCacheAge()||0),(!L.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),Mt){case PlaylistContextType.MANIFEST:case PlaylistContextType.LEVEL:ge.trigger(Events.LEVEL_LOADED,{details:e,level:sr||0,id:tr||0,stats:s,networkDetails:d,deliveryDirectives:rr});break;case PlaylistContextType.AUDIO_TRACK:ge.trigger(Events.AUDIO_TRACK_LOADED,{details:e,id:tr||0,groupId:ir||"",stats:s,networkDetails:d,deliveryDirectives:rr});break;case PlaylistContextType.SUBTITLE_TRACK:ge.trigger(Events.SUBTITLE_TRACK_LOADED,{details:e,id:tr||0,groupId:ir||"",stats:s,networkDetails:d,deliveryDirectives:rr});break}}}function sendAddTrackEvent(t,e){let r;try{r=new Event("addtrack")}catch{r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=t,e.dispatchEvent(r)}function addCueToTrack(t,e){const r=t.mode;if(r==="disabled"&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(s){logger.debug(`[texttrack-utils]: ${s}`);try{const o=new self.TextTrackCue(e.startTime,e.endTime,e.text);o.id=e.id,t.addCue(o)}catch(o){logger.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${o}`)}}r==="disabled"&&(t.mode=r)}function clearCurrentCues(t){const e=t.mode;if(e==="disabled"&&(t.mode="hidden"),t.cues)for(let r=t.cues.length;r--;)t.removeCue(t.cues[r]);e==="disabled"&&(t.mode=e)}function removeCuesInRange(t,e,r,s){const o=t.mode;if(o==="disabled"&&(t.mode="hidden"),t.cues&&t.cues.length>0){const d=getCuesInRange(t.cues,e,r);for(let L=0;L<d.length;L++)(!s||s(d[L]))&&t.removeCue(d[L])}o==="disabled"&&(t.mode=o)}function getFirstCueIndexAfterTime(t,e){if(e<t[0].startTime)return 0;const r=t.length-1;if(e>t[r].endTime)return-1;let s=0,o=r;for(;s<=o;){const d=Math.floor((o+s)/2);if(e<t[d].startTime)o=d-1;else if(e>t[d].startTime&&s<r)s=d+1;else return d}return t[s].startTime-e<e-t[o].startTime?s:o}function getCuesInRange(t,e,r){const s=[],o=getFirstCueIndexAfterTime(t,e);if(o>-1)for(let d=o,L=t.length;d<L;d++){const ge=t[d];if(ge.startTime>=e&&ge.endTime<=r)s.push(ge);else if(ge.startTime>r)return s}return s}var MetadataSchema={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const MIN_CUE_DURATION=.25;function getCueClass(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function createCueWithDataFields(t,e,r,s,o){let d=new t(e,r,"");try{d.value=s,o&&(d.type=o)}catch{d=new t(e,r,JSON.stringify(o?_objectSpread2({type:o},s):s))}return d}const MAX_CUE_ENDTIME=(()=>{const t=getCueClass();try{t&&new t(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function dateRangeDateToTimelineSeconds(t,e){return t.getTime()/1e3-e}function hexToArrayBuffer(t){return Uint8Array.from(t.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class ID3TrackController{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Events.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Events.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,r){this.media=r.media}onMediaDetaching(){this.id3Track&&(clearCurrentCues(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const r=this.getID3Track(e.textTracks);return r.mode="hidden",r}getID3Track(e){if(this.media){for(let r=0;r<e.length;r++){const s=e[r];if(s.kind==="metadata"&&s.label==="id3")return sendAddTrackEvent(s,this.media),s}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,r){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:s,enableID3MetadataCues:o}}}=this;if(!s&&!o)return;const{samples:d}=r;this.id3Track||(this.id3Track=this.createTrack(this.media));const L=getCueClass();if(L)for(let ge=0;ge<d.length;ge++){const Mt=d[ge].type;if(Mt===MetadataSchema.emsg&&!s||!o)continue;const er=getID3Frames(d[ge].data);if(er){const tr=d[ge].pts;let ir=tr+d[ge].duration;ir>MAX_CUE_ENDTIME&&(ir=MAX_CUE_ENDTIME),ir-tr<=0&&(ir=tr+MIN_CUE_DURATION);for(let nr=0;nr<er.length;nr++){const ar=er[nr];if(!isTimeStampFrame(ar)){this.updateId3CueEnds(tr,Mt);const sr=createCueWithDataFields(L,tr,ir,ar,Mt);sr&&this.id3Track.addCue(sr)}}}}}updateId3CueEnds(e,r){var s;const o=(s=this.id3Track)==null?void 0:s.cues;if(o)for(let d=o.length;d--;){const L=o[d];L.type===r&&L.startTime<e&&L.endTime===MAX_CUE_ENDTIME&&(L.endTime=e)}}onBufferFlushing(e,{startOffset:r,endOffset:s,type:o}){const{id3Track:d,hls:L}=this;if(!L)return;const{config:{enableEmsgMetadataCues:ge,enableID3MetadataCues:Mt}}=L;if(d&&(ge||Mt)){let er;o==="audio"?er=tr=>tr.type===MetadataSchema.audioId3&&Mt:o==="video"?er=tr=>tr.type===MetadataSchema.emsg&&ge:er=tr=>tr.type===MetadataSchema.audioId3&&Mt||tr.type===MetadataSchema.emsg&&ge,removeCuesInRange(d,r,s,er)}}onLevelUpdated(e,{details:r}){if(!this.media||!r.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:s,id3Track:o}=this,{dateRanges:d}=r,L=Object.keys(d);if(o){const tr=Object.keys(s).filter(ir=>!L.includes(ir));for(let ir=tr.length;ir--;){const rr=tr[ir];
3761Object.keys(s[rr].cues).forEach(nr=>{o.removeCue(s[rr].cues[nr])}),delete s[rr]}}const ge=r.fragments[r.fragments.length-1];if(L.length===0||!isFiniteNumber(ge==null?void 0:ge.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const Mt=ge.programDateTime/1e3-ge.start,er=getCueClass();for(let tr=0;tr<L.length;tr++){const ir=L[tr],rr=d[ir],nr=s[ir],ar=(nr==null?void 0:nr.cues)||{};let sr=(nr==null?void 0:nr.durationKnown)||!1;const lr=dateRangeDateToTimelineSeconds(rr.startDate,Mt);let cr=MAX_CUE_ENDTIME;const ur=rr.endDate;if(ur)cr=dateRangeDateToTimelineSeconds(ur,Mt),sr=!0;else if(rr.endOnNext&&!sr){const dr=L.reduce((hr,pr)=>{const mr=d[pr];return mr.class===rr.class&&mr.id!==pr&&mr.startDate>rr.startDate&&hr.push(mr),hr},[]).sort((hr,pr)=>hr.startDate.getTime()-pr.startDate.getTime())[0];dr&&(cr=dateRangeDateToTimelineSeconds(dr.startDate,Mt),sr=!0)}const or=Object.keys(rr.attr);for(let dr=0;dr<or.length;dr++){const hr=or[dr];if(!isDateRangeCueAttribute(hr))continue;const pr=ar[hr];if(pr)sr&&!nr.durationKnown&&(pr.endTime=cr);else if(er){let mr=rr.attr[hr];isSCTE35Attribute(hr)&&(mr=hexToArrayBuffer(mr));const vr=createCueWithDataFields(er,lr,cr,{key:hr,data:mr},MetadataSchema.dateRange);vr&&(vr.id=ir,this.id3Track.addCue(vr),ar[hr]=vr)}}s[ir]={cues:ar,dateRange:rr,durationKnown:sr}}}}class LatencyController{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:r}=this;return e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:r?e.liveMaxLatencyDurationCount*r.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(e===null)return null;const{holdBack:r,partHoldBack:s,targetduration:o}=e,{liveSyncDuration:d,liveSyncDurationCount:L,lowLatencyMode:ge}=this.config,Mt=this.hls.userConfig;let er=ge&&s||r;(Mt.liveSyncDuration||Mt.liveSyncDurationCount||er===0)&&(er=d!==void 0?d:L*o);const tr=o;return er+Math.min(this.stallCount*1,tr)}get liveSyncPosition(){const e=this.estimateLiveEdge(),r=this.targetLatency,s=this.levelDetails;if(e===null||r===null||s===null)return null;const o=s.edge,d=e-r-this.edgeStalled,L=o-s.totalduration,ge=o-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(L,d),ge)}get drift(){const{levelDetails:e}=this;return e===null?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(e===null)return 0;const r=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-r,0)}get forwardBufferLength(){const{media:e,levelDetails:r}=this;if(!e||!r)return 0;const s=e.buffered.length;return(s?e.buffered.end(s-1):r.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(Events.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(Events.ERROR,this.onError,this)}onMediaAttached(e,r){this.media=r.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:r}){this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,r){var s;r.details===ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,(s=this.levelDetails)!=null&&s.live&&logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:r}=this;if(!e||!r)return;this.currentTime=e.currentTime;const s=this.computeLatency();if(s===null)return;this._latency=s;const{lowLatencyMode:o,maxLiveSyncPlaybackRate:d}=this.config;if(!o||d===1)return;const L=this.targetLatency;if(L===null)return;const ge=s-L,Mt=Math.min(this.maxLatency,L+r.targetduration),er=ge<Mt;if(r.live&&er&&ge>.05&&this.forwardBufferLength>1){const tr=Math.min(2,Math.max(1,d)),ir=Math.round(2/(1+Math.exp(-.75*ge-this.edgeStalled))*20)/20;e.playbackRate=Math.min(tr,Math.max(1,ir))}else e.playbackRate!==1&&e.playbackRate!==0&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}const HdcpLevels=["NONE","TYPE-0","TYPE-1",null];var HlsSkip={No:"",Yes:"YES",v2:"v2"};function getSkipValue(t,e){const{canSkipUntil:r,canSkipDateRanges:s,endSN:o}=t,d=e!==void 0?e-o:0;return r&&d<r?s?HlsSkip.v2:HlsSkip.Yes:HlsSkip.No}class HlsUrlParameters{constructor(e,r,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=r,this.skip=s}addDirectives(e){const r=new self.URL(e);return this.msn!==void 0&&r.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&r.searchParams.set("_HLS_part",this.part.toString()),this.skip&&r.searchParams.set("_HLS_skip",this.skip),r.href}}class Level{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter(r=>r).join(",").replace(/\.[^.,]+/g,"")}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get attrs(){return this._attrs[this._urlId]}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get uri(){return this.url[this._urlId]||""}get urlId(){return this._urlId}set urlId(e){const r=e%this.url.length;this._urlId!==r&&(this.fragmentError=0,this.loadError=0,this.details=void 0,this._urlId=r)}get audioGroupId(){var e;return(e=this.audioGroupIds)==null?void 0:e[this.urlId]}get textGroupId(){var e;return(e=this.textGroupIds)==null?void 0:e[this.urlId]}addFallback(e){this.url.push(e.url),this._attrs.push(e.attrs)}}function updateFromToPTS(t,e){const r=e.startPTS;if(isFiniteNumber(r)){let s=0,o;e.sn>t.sn?(s=r-t.start,o=t):(s=t.start-r,o=e),o.duration!==s&&(o.duration=s)}else e.sn>t.sn?t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration:e.start=Math.max(t.start-e.duration,0)}function updateFragPTSDTS(t,e,r,s,o,d){s-r<=0&&(logger.warn("Fragment should have a positive duration",e),s=r+e.duration,d=o+e.duration);let ge=r,Mt=s;const er=e.startPTS,tr=e.endPTS;
vendor: 1,775 bytes, line 3761
3761if(isFiniteNumber(er)){const lr=Math.abs(er-r);isFiniteNumber(e.deltaPTS)?e.deltaPTS=Math.max(lr,e.deltaPTS):e.deltaPTS=lr,ge=Math.max(r,er),r=Math.min(r,er),o=Math.min(o,e.startDTS),Mt=Math.min(s,tr),s=Math.max(s,tr),d=Math.max(d,e.endDTS)}const ir=r-e.start;e.start!==0&&(e.start=r),e.duration=s-e.start,e.startPTS=r,e.maxStartPTS=ge,e.startDTS=o,e.endPTS=s,e.minEndPTS=Mt,e.endDTS=d;const rr=e.sn;if(!t||rr<t.startSN||rr>t.endSN)return 0;let nr;const ar=rr-t.startSN,sr=t.fragments;for(sr[ar]=e,nr=ar;nr>0;nr--)updateFromToPTS(sr[nr],sr[nr-1]);for(nr=ar;nr<sr.length-1;nr++)updateFromToPTS(sr[nr],sr[nr+1]);return t.fragmentHint&&updateFromToPTS(sr[sr.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,ir}function mergeDetails(t,e){let r=null;const s=t.fragments;for(let Mt=s.length-1;Mt>=0;Mt--){const er=s[Mt].initSegment;if(er){r=er;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;let o=0,d;if(mapFragmentIntersection(t,e,(Mt,er)=>{Mt.relurl&&(o=Mt.cc-er.cc),isFiniteNumber(Mt.startPTS)&&isFiniteNumber(Mt.endPTS)&&(er.start=er.startPTS=Mt.startPTS,er.startDTS=Mt.startDTS,er.maxStartPTS=Mt.maxStartPTS,er.endPTS=Mt.endPTS,er.endDTS=Mt.endDTS,er.minEndPTS=Mt.minEndPTS,er.duration=Mt.endPTS-Mt.startPTS,er.duration&&(d=er),e.PTSKnown=e.alignedSliding=!0),er.elementaryStreams=Mt.elementaryStreams,er.loader=Mt.loader,er.stats=Mt.stats,er.urlId=Mt.urlId,Mt.initSegment&&(er.initSegment=Mt.initSegment,r=Mt.initSegment)}),r&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach(er=>{var tr;(!er.initSegment||er.initSegment.relurl===((tr=r)==null?void 0:tr.relurl))&&(er.initSegment=r)}),e.skippedSegments)if(e.deltaUpdateFailed=e.fragments.some(Mt=>!Mt),e.deltaUpdateFailed){logger.warn("[level-helper] Previous playlist missing segments ski
3761pped in delta playlist");for(let Mt=e.skippedSegments;Mt--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}else e.canSkipDateRanges&&(e.dateRanges=mergeDateRanges(t.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));const L=e.fragments;if(o){logger.warn("discontinuity sliding from playlist, take drift into account");for(let Mt=0;Mt<L.length;Mt++)L[Mt].cc+=o}e.skippedSegments&&(e.startCC=e.fragments[0].cc),mapPartIntersection(t.partList,e.partList,(Mt,er)=>{er.elementaryStreams=Mt.elementaryStreams,er.stats=Mt.stats}),d?updateFragPTSDTS(e,d,d.startPTS,d.endPTS,d.startDTS,d.endDTS):adjustSliding(t,e),L.length&&(e.totalduration=e.edge-L[0].start),e.driftStartTime=t.driftStartTime,e.driftStart=t.driftStart;const ge=e.advancedDateTime;if(e.advanced&&ge){const Mt=e.edge;e.driftStart||(e.driftStartTime=ge,e.driftStart=Mt),e.driftEndTime=ge,e.driftEnd=Mt}else e.driftEndTime=t.driftEndTime,e.driftEnd=t.driftEnd,e.advancedDateTime=t.advancedDateTime}function mergeDateRanges(t,e,r){const s=_extends({},t);return r&&r.forEach(o=>{delete s[o]}),Object.keys(e).forEach(o=>{const d=new DateRange(e[o].attr,s[o]);d.isValid?s[o]=d:logger.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[o].attr)}"`)}),s}function mapPartIntersection(t,e,r){if(t&&e){let s=0;for(let o=0,d=t.length;o<=d;o++){const L=t[o],ge=e[o+s];L&&ge&&L.index===ge.index&&L.fragment.sn===ge.fragment.sn?r(L,ge):s--}}}function mapFragmentIntersection(t,e,r){const s=e.skippedSegments,o=Math.max(t.startSN,e.startSN)-e.startSN,d=(t.fragmentHint?1:0)+(s?e.endSN:Math.min(t.endSN,e.endSN))-e.startSN,L=e.startSN-t.startSN,ge=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,Mt=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;for(let er=o;er<=d;er++){const tr=Mt[L+er];let ir=ge[er];s&&!ir&&er<s&&(ir=e.fragments[er]=tr),tr&&ir&&r(tr,ir)}}function adjustSliding(t,e){const r=e.startSN+e.skippedSegments-t.startSN,s=t.fragments;r<0||r>=s.length||addSliding(e,s[r].start)}function addSliding(t,e){if(e){const r=t.fragments;for(let s=t.skippedSegments;s<r.length;s++)r[s].start+=e;t.fragmentHint&&(t.fragmentHint.start+=e)}}function computeReloadInterval(t,e=1/0){let r=1e3*t.targetduration;if(t.updated){const s=t.fragments;if(s.length&&r*4>e){const d=s[s.length-1].duration*1e3;d<r&&(r=d)}}else r/=2;return Math.round(r)}function getFragmentWithSN(t,e,r){if(!(t!=null&&t.details))return null;const s=t.details;let o=s.fragments[e-s.startSN];return o||(o=s.fragmentHint,o&&o.sn===e)?o:e<s.startSN&&r&&r.sn===e?r:null}function getPartWith(t,e,r){var s;return t!=null&&t.details?findPart((s=t.details)==null?void 0:s.partList,e,r):null}function findPart(t,e,r){if(t)for(let s=t.length;s--;){const o=t[s];if(o.index===r&&o.fragment.sn===e)return o}return null}function isTimeoutError(t){switch(t.details){case ErrorDetails.FRAG_LOAD_TIMEOUT:case ErrorDetails.KEY_LOAD_TIMEOUT:case ErrorDetails.LEVEL_LOAD_TIMEOUT:case ErrorDetails.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function getRetryConfig(t,e){const r=isTimeoutError(e);return t.default[`${r?"timeout":"error"}Retry`]}function getRetryDelay(t,e){const r=t.backoff==="linear"?1:Math.pow(2,e);return Math.min(r*t.retryDelayMs,t.maxRetryDelayMs)}function getLoaderConfigWithoutReties(t){return _objectSpread2(_objectSpread2({},t),{errorRetry:null,timeoutRetry:null})}function shouldRetry(t,e,r,s){return!!t&&e<t.maxNumRetry&&(retryForHttpStatus(s)||!!r)}function retryForHttpStatus(t){return t===0&&navigator.onLine===!1||!!t&&(t<400||t>499)}const BinarySearch={search:function(t,e){let r=0,s=t.length-1,o=null,d=null;for(;r<=s;){o=(r+s)/2|0,d=t[o];const L=e(d);if(L>0)r=o+1;else if(L<0)s=o-1;else return d}return null}};function findFragmentByPDT(t,e,r){if(e===null||!Array.isArray(t)||!t.length||!isFiniteNumber(e))return null;const s=t[0].programDateTime;if(e<(s||0))return null;const o=t[t.length-1].endProgramDateTime;if(e>=(o||0))return null;r=r||0;for(let d=0;d<t.length;++d){const L=t[d];if(pdtWithinToleranceTest(e,r,L))return L}return null}function findFragmentByPTS(t,e,r=0,s=0){let o=null;if(t?o=e[t.sn-e[0].sn+1]||null:r===0&&e[0].start===0&&(o=e[0]),o&&fragmentWithinToleranceTest(r,s,o)===0)return o;const d=BinarySearch.search(e,fragmentWithinToleranceTest.bind(null,r,s));return d&&(d!==t||!o)?d:o}function fragmentWithinToleranceTest(t=0,e=0,r){if(r.start<=t&&r.start+r.duration>t)return 0;const s=Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-s<=t?1:r.start-s>t&&r.start?-1:0}function pdtWithinToleranceTest(t,e,r){const s=Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0))*1e3;return(r.endProgramDateTime||0)-s>t}function findFragWithCC(t,e){return BinarySearch.search(t,r=>r.cc<e?1:r.cc>e?-1:0)}const RENDITION_PENALTY_DURATION_MS=3e5;var NetworkErrorAction={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},ErrorActionFlags={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class ErrorController{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=logger.log.bind(logger,"[info]:"),this.warn=logger.warn.bind(logger,"[warning]:"),this.error=logger.error.bind(logger,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(Events.ERROR,this.onError,this),e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(Events.ERROR,this.onError,this),e.off(Events.ERROR,this.onErrorOut,this),e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){this.playlistError=0}stopLoad(){}getVariantLevelIndex(e){return(e==null?void 0:e.type)===PlaylistLevelType.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,r){var s,o;if(r.fatal)return;const d=this.hls,L=r.context;switch(r.details){case ErrorDetails.FRAG_LOAD_ERROR:case ErrorDetails.FRAG_LOAD_TIMEOUT:case ErrorDetails.KEY_LOAD_ERROR:case ErrorDetails.KEY_LOAD_TIMEOUT:r.errorAction=this.getFragRetryOrSwitchAction(r);return;case ErrorDetails.FRAG_PARSING_ERROR:if((s=r.frag)!=null&&s.gap){r.errorAction={action:NetworkErrorAction.DoNothing,flags:ErrorActionFlags.None};return}case ErrorDetails.FRAG_GAP:case ErrorDetails.FRAG_DECRYPT_ERROR:{r.errorAction=this.getFragRetryOrSwitchAction(r),r.errorAction.action=NetworkErrorAction.SendAlternateToPenaltyBox;return}case ErrorDetails.LEVEL_EMPTY_ERROR:case ErrorDetails.LEVEL_PARSING_ERROR:{var ge,Mt;const er=r.parent===PlaylistLevelType.MAIN?r.level:d.loadLevel;r.details===ErrorDetails.LEVEL_EMPTY_ERROR&&((ge=r.context)!=null&&(Mt=ge.levelDetails)!=null&&Mt.live)?r.errorAction=this.getPlaylistRetryOrSwitchAction(r,er):(r.levelRetry=!1,r.errorAction=this.getLevelSwitchAction(r,er))}return;case ErrorDetails.LEVEL_LOAD_ERROR:case ErrorDetails.LEVEL_LOAD_TIMEOUT:typeof(L==null?void 0:L.level)=="number"&&(r.errorAction=this.getPlaylistRetryOrSwitchAction(r,L.level));return;case ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case ErrorDetails.SUBTITLE_LOAD_ERROR:case ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:if(L){const er=d.levels[d.loadLevel];if(er&&(L.type===PlaylistContextType.AUDIO_TRACK&&L.groupId===er.audioGroupId||L.type===PlaylistContextType.SUBTITLE_TRACK&&L.groupId===er.textGroupId)){r.errorAction=this.getPlaylistRetryOrSwitchAction(r,d.loadLevel),r.errorAction.action=NetworkErrorAction.SendAlternateToPenaltyBox,r.errorAction.flags=ErrorActionFlags.MoveAllAlternatesMatchingHost;return}}return;case ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const er=d.levels[d.loadLevel],tr=er==null?void 0:er.attrs["HDCP-LEVEL"];tr&&(r.errorAction={action:NetworkErrorAction.SendAlternateToPenaltyBox,flags:ErrorActionFlags.MoveAllAlternatesMatchingHDCP,hdcpLevel:tr})}return;case ErrorDetails.BUFFER_ADD_CODEC_ERROR:case ErrorDetails.REMUX_ALLOC_ER
3761ROR:r.errorAction=this.getLevelSwitchAction(r,(o=r.level)!=null?o:d.loadLevel);return;case ErrorDetails.INTERNAL_EXCEPTION:case ErrorDetails.BUFFER_APPENDING_ERROR:case ErrorDetails.BUFFER_APPEND_ERROR:case ErrorDetails.BUFFER_FULL_ERROR:case ErrorDetails.LEVEL_SWITCH_ERROR:case ErrorDetails.BUFFER_STALLED_ERROR:case ErrorDetails.BUFFER_SEEK_OVER_HOLE:case ErrorDetails.BUFFER_NUDGE_ON_STALL:r.errorAction={action:NetworkErrorAction.DoNothing,flags:ErrorActionFlags.None};return}if(r.type===ErrorTypes.KEY_SYSTEM_ERROR){const er=this.getVariantLevelIndex(r.frag);r.levelRetry=!1,r.errorAction=this.getLevelSwitchAction(r,er);return}}getPlaylistRetryOrSwitchAction(e,r){var s;const o=this.hls,d=getRetryConfig(o.config.playlistLoadPolicy,e),L=this.playlistError++,ge=(s=e.response)==null?void 0:s.code;if(shouldRetry(d,L,isTimeoutError(e),ge))return{action:NetworkErrorAction.RetryRequest,flags:ErrorActionFlags.None,retryConfig:d,retryCount:L};const er=this.getLevelSwitchAction(e,r);return d&&(er.retryConfig=d,er.retryCount=L),er}getFragRetryOrSwitchAction(e){const r=this.hls,s=this.getVariantLevelIndex(e.frag),o=r.levels[s],{fragLoadPolicy:d,keyLoadPolicy:L}=r.config,ge=getRetryConfig(e.details.startsWith("key")?L:d,e),Mt=r.levels.reduce((ir,rr)=>ir+rr.fragmentError,0);if(o){var er;e.details!==ErrorDetails.FRAG_GAP&&o.fragmentError++;const ir=(er=e.response)==null?void 0:er.code;if(shouldRetry(ge,Mt,isTimeoutError(e),ir))return{action:NetworkErrorAction.RetryRequest,flags:ErrorActionFlags.None,retryConfig:ge,retryCount:Mt}}const tr=this.getLevelSwitchAction(e,s);return ge&&(tr.retryConfig=ge,tr.retryCount=Mt),tr}getLevelSwitchAction(e,r){const s=this.hls;r==null&&(r=s.loadLevel);const o=this.hls.levels[r];if(o&&(o.loadError++,s.autoLevelEnabled)){var d,L;let ge=-1;const{levels:Mt,loadLevel:er,minAutoLevel:tr,maxAutoLevel:ir}=s,rr=(d=e.frag)==null?void 0:d.type,{type:nr,groupId:ar}=(L=e.context)!=null?L:{};for(let sr=Mt.length;sr--;){const lr=(sr+er)%Mt.length;if(lr!==er&&lr>=tr&&lr<=ir&&Mt[lr].loadError===0){const cr=Mt[lr];if(e.details===ErrorDetails.FRAG_GAP&&e.frag){const ur=Mt[lr].details;if(ur){const or=findFragmentByPTS(e.frag,ur.fragments,e.frag.start);if(or!=null&&or.gap)continue}}else{if(nr===PlaylistContextType.AUDIO_TRACK&&ar===cr.audioGroupId||nr===PlaylistContextType.SUBTITLE_TRACK&&ar===cr.textGroupId)continue;if(rr===PlaylistLevelType.AUDIO&&o.audioGroupId===cr.audioGroupId||rr===PlaylistLevelType.SUBTITLE&&o.textGroupId===cr.textGroupId)continue}ge=lr;break}}if(ge>-1&&s.loadLevel!==ge)return e.levelRetry=!0,this.playlistError=0,{action:NetworkErrorAction.SendAlternateToPenaltyBox,flags:ErrorActionFlags.None,nextAutoLevel:ge}}return{action:NetworkErrorAction.SendAlternateToPenaltyBox,flags:ErrorActionFlags.MoveAllAlternatesMatchingHost}}onErrorOut(e,r){var s;switch((s=r.errorAction)==null?void 0:s.action){case NetworkErrorAction.DoNothing:break;case NetworkErrorAction.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(r),!r.errorAction.resolved&&r.details!==ErrorDetails.FRAG_GAP&&(r.fatal=!0);break}if(r.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const r=this.hls,s=e.errorAction;if(!s)return;const{flags:o,hdcpLevel:d,nextAutoLevel:L}=s;switch(o){case ErrorActionFlags.None:this.switchLevel(e,L);break;case ErrorActionFlags.MoveAllAlternatesMatchingHost:s.resolved||(s.resolved=this.redundantFailover(e));break;case ErrorActionFlags.MoveAllAlternatesMatchingHDCP:d&&(r.maxHdcpLevel=HdcpLevels[HdcpLevels.indexOf(d)-1],s.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${r.maxHdcpLevel}" or lower`);break}s.resolved||this.switchLevel(e,L)}switchLevel(e,r){r!==void 0&&e.errorAction&&(this.warn(`switching to level ${r} after ${e.details}`),this.hls.nextAutoLevel=r,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}redundantFailover(e){const{hls:r,penalizedRenditions:s}=this,o=e.parent===PlaylistLevelType.MAIN?e.level:r.loadLevel,d=r.levels[o],L=d.url.length,ge=e.frag?e.frag.urlId:d.urlId;d.urlId===ge&&(!e.frag||d.details)&&this.penalizeRendition(d,e);for(let Mt=1;Mt<L;Mt++){const er=(ge+Mt)%L,tr=s[er];if(!tr||checkExpired(tr,e,s[ge]))return this.warn(`Switching to Redundant Stream ${er+1}/${L}: "${d.url[er]}" after ${e.details}
3761`),this.playlistError=0,r.levels.forEach(ir=>{ir.urlId=er}),r.nextLoadLevel=o,!0}return!1}penalizeRendition(e,r){const{penalizedRenditions:s}=this,o=s[e.urlId]||{lastErrorPerfMs:0,errors:[],details:void 0};o.lastErrorPerfMs=performance.now(),o.errors.push(r),o.details=e.details,s[e.urlId]=o}}function checkExpired(t,e,r){if(performance.now()-t.lastErrorPerfMs>RENDITION_PENALTY_DURATION_MS)return!0;const s=t.details;if(e.details===ErrorDetails.FRAG_GAP&&s&&e.frag){const o=e.frag.start,d=findFragmentByPTS(null,s.fragments,o);if(d&&!d.gap)return!0}if(r&&t.errors.length<r.errors.length){const o=t.errors[t.errors.length-1];if(s&&o.frag&&e.frag&&Math.abs(o.frag.start-e.frag.start)>s.targetduration*3)return!0}return!1}class BasePlaylistController{constructor(e,r){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=logger.log.bind(logger,`${r}:`),this.warn=logger.warn.bind(logger,`${r}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){clearTimeout(this.timer),this.timer=-1}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,r){const s=r==null?void 0:r.renditionReports;if(s){let o=-1;for(let d=0;d<s.length;d++){const L=s[d];let ge;try{ge=new self.URL(L.URI,r.url).href}catch(Mt){logger.warn(`Could not construct new URL for Rendition Report: ${Mt}`),ge=L.URI||""}if(ge===e){o=d;break}else ge===e.substring(0,ge.length)&&(o=d)}if(o!==-1){const d=s[o],L=parseInt(d["LAST-MSN"])||(r==null?void 0:r.lastPartSn);let ge=parseInt(d["LAST-PART"])||(r==null?void 0:r.lastPartIndex);if(this.hls.config.lowLatencyMode){const Mt=Math.min(r.age-r.partTarget,r.targetduration);ge>=0&&Mt>r.partTarget&&(ge+=1)}return new HlsUrlParameters(L,ge>=0?ge:void 0,HlsSkip.No)}}}loadPlaylist(e){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(e)}playlistLoaded(e,r,s){const{details:o,stats:d}=r,L=self.performance.now(),ge=d.loading.first?Math.max(0,L-d.loading.first):0;if(o.advancedDateTime=Date.now()-ge,o.live||s!=null&&s.live){if(o.reloaded(s),s&&this.log(`live playlist ${e} ${o.advanced?"REFRESHED "+o.lastPartSn+"-"+o.lastPartIndex:o.updated?"UPDATED":"MISSED"}`),s&&o.fragments.length>0&&mergeDetails(s,o),!this.canLoad||!o.live)return;let Mt,er,tr;if(o.canBlockReload&&o.endSN&&o.advanced){const lr=this.hls.config.lowLatencyMode,cr=o.lastPartSn,ur=o.endSN,or=o.lastPartIndex,dr=or!==-1,hr=cr===ur,pr=lr?0:or;dr?(er=hr?ur+1:cr,tr=hr?pr:or+1):er=ur+1;const mr=o.age,vr=mr+o.ageHeader;let Er=Math.min(vr-o.partTarget,o.targetduration*1.5);if(Er>0){if(s&&Er>s.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${s.tuneInGoal} to: ${Er} with playlist age: ${o.age}`),Er=0;else{const Cr=Math.floor(Er/o.targetduration);if(er+=Cr,tr!==void 0){const Pr=Math.round(Er%o.targetduration/o.partTarget);tr+=Pr}this.log(`CDN Tune-in age: ${o.ageHeader}s last advanced ${mr.toFixed(2)}s goal: ${Er} skip sn ${Cr} to part ${tr}`)}o.tuneInGoal=Er}if(Mt=this.getDeliveryDirectives(o,r.deliveryDirectives,er,tr),lr||!hr){this.loadPlaylist(Mt);return}}else(o.canBlockReload||o.canSkipUntil)&&(Mt=this.getDeliveryDirectives(o,r.deliveryDirectives,er,tr));const ir=this.hls.mainForwardBufferInfo,rr=ir?ir.end-ir.len:0,nr=(o.edge-rr)*1e3,ar=computeReloadInterval(o,nr);o.updated&&L>this.requestScheduled+ar&&(this.requestScheduled=d.loading.start),er!==void 0&&o.canBlockReload?this.requestScheduled=d.loading.first+ar-(o.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+ar<L?this.requestScheduled=L:this.requestScheduled-L<=0&&(this.requestScheduled+=ar);let sr=this.requestScheduled-L;sr=Math.max(0,sr),this.log(`reload live playlist ${e} in ${Math.round(sr)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(Mt),sr)}else this.clearTimer()}getDeliveryDirectives(e,r,s,o){let d=getSkipValue(e,s);return r!=null&&r.skip&&e.deltaUpdateFailed&&(s=r.msn,o=r.part,d=HlsSkip.No),new HlsUrlParameters(s,o,d)}checkRetry(e){const r=e.details,s=isTimeoutError(e),o=e.errorAction,{action:d,retryCount:L=0,retryConfig:ge}=o||{},Mt=!!o&&!!ge&&(d===NetworkErrorAction.RetryRequest||!o.resolved&&d===NetworkErrorAction.SendAlternateToPenaltyBox);if(Mt){var er;if(this.requestScheduled=-1,L>=ge.maxNumRetry)return!1;if(s&&(er=e.context)!=null&&er.deliveryDirectives)this.warn(`Retrying playlist loading ${L+1}/${ge.maxNumRetry} after "${r}" without delivery-directives`),this.loadPlaylist();else{const tr=getRetryDelay(ge,L);this.timer=self.setTimeout(()=>this.loadPlaylist(),tr),this.warn(`Retrying playlist loading ${L+1}/${ge.maxNumRetry} after "${r}" in ${tr}
3761ms`)}e.levelRetry=!0,o.resolved=!0}return Mt}}let chromeOrFirefox;class LevelController extends BasePlaylistController{constructor(e,r){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=r,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(Events.FRAG_LOADED,this.onFragLoaded,this),e.on(Events.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(Events.FRAG_LOADED,this.onFragLoaded,this),e.off(Events.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}startLoad(){this._levels.forEach(r=>{r.loadError=0,r.fragmentError=0}),super.startLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]}onManifestLoading(e,r){this.resetLevels()}onManifestLoaded(e,r){const s=[],o={};let d;r.levels.forEach(L=>{var ge;const Mt=L.attrs;((ge=L.audioCodec)==null?void 0:ge.indexOf("mp4a.40.34"))!==-1&&(chromeOrFirefox||(chromeOrFirefox=/chrome|firefox/i.test(navigator.userAgent)),chromeOrFirefox&&(L.audioCodec=void 0));const{AUDIO:er,CODECS:tr,"FRAME-RATE":ir,"PATHWAY-ID":rr,RESOLUTION:nr,SUBTITLES:ar}=Mt,lr=`${`${rr||"."}-`}${L.bitrate}-${nr}-${ir}-${tr}`;d=o[lr],d?d.addFallback(L):(d=new Level(L),o[lr]=d,s.push(d)),addGroupId(d,"audio",er),addGroupId(d,"text",ar)}),this.filterAndSortMediaOptions(s,r)}filterAndSortMediaOptions(e,r){let s=[],o=[],d=!1,L=!1,ge=!1,Mt=e.filter(({audioCodec:nr,videoCodec:ar,width:sr,height:lr,unknownCodecs:cr})=>(d||(d=!!(sr&&lr)),L||(L=!!ar),ge||(ge=!!nr),!(cr!=null&&cr.length)&&(!nr||isCodecSupportedInMp4(nr,"audio"))&&(!ar||isCodecSupportedInMp4(ar,"video"))));if((d||L)&&ge&&(Mt=Mt.filter(({videoCodec:nr,width:ar,height:sr})=>!!nr||!!(ar&&sr))),Mt.length===0){Promise.resolve().then(()=>{if(this.hls){const nr=new Error("no level with compatible codecs found in manifest");this.hls.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:r.url,error:nr,reason:nr.message})}});return}r.audioTracks&&(s=r.audioTracks.filter(nr=>!nr.audioCodec||isCodecSupportedInMp4(nr.audioCodec,"audio")),assignTrackIdsByGroup(s)),r.subtitles&&(o=r.subtitles,assignTrackIdsByGroup(o));const er=Mt.slice(0);Mt.sort((nr,ar)=>nr.attrs["HDCP-LEVEL"]!==ar.attrs["HDCP-LEVEL"]?(nr.attrs["HDCP-LEVEL"]||"")>(ar.attrs["HDCP-LEVEL"]||"")?1:-1:nr.bitrate!==ar.bitrate?nr.bitrate-ar.bitrate:nr.attrs["FRAME-RATE"]!==ar.attrs["FRAME-RATE"]?nr.attrs.decimalFloatingPoint("FRAME-RATE")-ar.attrs.decimalFloatingPoint("FRAME-RATE"):nr.attrs.SCORE!==ar.attrs.SCORE?nr.attrs.decimalFloatingPoint("SCORE")-ar.attrs.decimalFloatingPoint("SCORE"):d&&nr.height!==ar.height?nr.height-ar.height:0);let tr=er[0];if(this.steering&&(Mt=this.steering.filterParsedLevels(Mt),Mt.length!==er.length)){for(let nr=0;nr<er.length;nr++)if(er[nr].pathwayId===Mt[0].pathwayId){tr=er[nr];break}}this._levels=Mt;for(let nr=0;nr<Mt.length;nr++)if(Mt[nr]===tr){this._firstLevel=nr,this.log(`manifest loaded, ${Mt.length} level(s) found, first bitrate: ${tr.bitrate}`);break}const ir=ge&&!L,rr={levels:Mt,audioTracks:s,subtitleTracks:o,sessionData:r.sessionData,sessionKeys:r.sessionKeys,firstLevel:this._firstLevel,stats:r.stats,audio:ge,video:L,altAudio:!ir&&s.some(nr=>!!nr.url)};this.hls.trigger(Events.MANIFEST_PARSED,rr),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const r=this._levels;if(r.length===0)return;if(e<0||e>=r.length){const tr=new Error("invalid level idx"),ir=e<0;if(this.hls.trigger(Events.ERROR,{type:ErrorTypes.OTHER_ERROR,details:ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:ir,error:tr,reason:tr.message}),ir)return;e=Math.min(e,r.length-1)}const s=this.currentLevelIndex,o=this.currentLevel,d=o?o.attrs["PATHWAY-ID"]:void 0,L=r[e],ge=L.attrs["PATHWAY-ID"];
3761if(this.currentLevelIndex=e,this.currentLevel=L,s===e&&L.details&&o&&d===ge)return;this.log(`Switching to level ${e}${ge?" with Pathway "+ge:""} from level ${s}${d?" with Pathway "+d:""}`);const Mt=_extends({},L,{level:e,maxBitrate:L.maxBitrate,attrs:L.attrs,uri:L.uri,urlId:L.urlId});delete Mt._attrs,delete Mt._urlId,this.hls.trigger(Events.LEVEL_SWITCHING,Mt);const er=L.details;if(!er||er.live){const tr=this.switchParams(L.uri,o==null?void 0:o.details);this.loadPlaylist(tr)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this._firstLevel}else return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,r){r.fatal||!r.context||r.context.type===PlaylistContextType.LEVEL&&r.context.level===this.level&&this.checkRetry(r)}onFragLoaded(e,{frag:r}){if(r!==void 0&&r.type===PlaylistLevelType.MAIN){const s=this._levels[r.level];s!==void 0&&(s.loadError=0)}}onLevelLoaded(e,r){var s;const{level:o,details:d}=r,L=this._levels[o];if(!L){var ge;this.warn(`Invalid level index ${o}`),(ge=r.deliveryDirectives)!=null&&ge.skip&&(d.deltaUpdateFailed=!0);return}o===this.currentLevelIndex?(L.fragmentError===0&&(L.loadError=0),this.playlistLoaded(o,r,L.details)):(s=r.deliveryDirectives)!=null&&s.skip&&(d.deltaUpdateFailed=!0)}onAudioTrackSwitched(e,r){const s=this.currentLevel;if(!s)return;const o=this.hls.audioTracks[r.id].groupId;if(s.audioGroupIds&&s.audioGroupId!==o){let d=-1;for(let L=0;L<s.audioGroupIds.length;L++)if(s.audioGroupIds[L]===o){d=L;break}d!==-1&&d!==s.urlId&&(s.urlId=d,this.canLoad&&this.startLoad())}}loadPlaylist(e){super.loadPlaylist();const r=this.currentLevelIndex,s=this.currentLevel;if(s&&this.shouldLoadPlaylist(s)){const o=s.urlId;let d=s.uri;if(e)try{d=e.addDirectives(d)}catch(ge){this.warn(`Could not construct new URL with HLS Delivery Directives: ${ge}`)}const L=s.attrs["PATHWAY-ID"];this.log(`Loading level index ${r}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${L?" Pathway "+L:""} URI ${o+1}/${s.url.length} ${d}`),this.clearTimer(),this.hls.trigger(Events.LEVEL_LOADING,{url:d,level:r,id:o,deliveryDirectives:e||null})}}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e,r){const s=(d,L)=>L!==r,o=this._levels.filter((d,L)=>L!==e?!0:d.url.length>1&&r!==void 0?(d.url=d.url.filter(s),d.audioGroupIds&&(d.audioGroupIds=d.audioGroupIds.filter(s)),d.textGroupIds&&(d.textGroupIds=d.textGroupIds.filter(s)),d.urlId=0,!0):(this.steering&&this.steering.removeLevel(d),!1));this.hls.trigger(Events.LEVELS_UPDATED,{levels:o})}onLevelsUpdated(e,{levels:r}){r.forEach((s,o)=>{const{details:d}=s;d!=null&&d.fragments&&d.fragments.forEach(L=>{L.level=o})}),this._levels=r}}function addGroupId(t,e,r){r&&(e==="audio"?(t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds[t.url.length-1]=r):e==="text"&&(t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds[t.url.length-1]=r))}function assignTrackIdsByGroup(t){const e={};t.forEach(r=>{const s=r.groupId||"";r.id=e[s]=e[s]||0,e[s]++})}var FragmentState={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class FragmentTracker{constructor(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=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(Events.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(Events.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,r){const s=this.activePartLists[r];if(s)for(let o=s.length;o--;){const d=s[o];if(!d)break;const L=d.end;if(d.start<=e&&L!==null&&e<=L)return d}return this.getBufferedFrag(e,r)}getBufferedFrag(e,r){const{fragments:s}=this,o=Object.keys(s);for(let d=o.length;d--;){const L=s[o[d]];if((L==null?void 0:L.body.type)===r&&L.buffered){const ge=L.body;if(ge.start<=e&&e<=ge.end)return ge}}return null}detectEvictedFragments(e,r,s,o){this.timeRanges&&(this.timeRanges[e]=r);const d=(o==null?void 0:o.fragment.sn)||-1;
vendor: 8,654 bytes, line 3761
3761Object.keys(this.fragments).forEach(L=>{const ge=this.fragments[L];if(!ge||d>=ge.body.sn)return;if(!ge.buffered&&!ge.loaded){ge.body.type===s&&this.removeFragment(ge.body);return}const Mt=ge.range[e];Mt&&Mt.time.some(er=>{const tr=!this.isTimeBuffered(er.startPTS,er.endPTS,r);return tr&&this.removeFragment(ge.body),tr})})}detectPartialFragments(e){const r=this.timeRanges,{frag:s,part:o}=e;if(!r||s.sn==="initSegment")return;const d=getFragmentKey(s),L=this.fragments[d];if(!L||L.buffered&&s.gap)return;const ge=!s.relurl;Object.keys(r).forEach(Mt=>{const er=s.elementaryStreams[Mt];if(!er)return;const tr=r[Mt],ir=ge||er.partial===!0;L.range[Mt]=this.getBufferedTimes(s,o,ir,tr)}),L.loaded=null,Object.keys(L.range).length?(L.buffered=!0,(L.body.endList=s.endList||L.body.endList)&&(this.endListFragments[L.body.type]=L),isPartial(L)||this.removeParts(s.sn-1,s.type)):this.removeFragment(L.body)}removeParts(e,r){const s=this.activePartLists[r];s&&(this.activePartLists[r]=s.filter(o=>o.fragment.sn>=e))}fragBuffered(e,r){const s=getFragmentKey(e);let o=this.fragments[s];!o&&r&&(o=this.fragments[s]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),o&&(o.loaded=null,o.buffered=!0)}getBufferedTimes(e,r,s,o){const d={time:[],partial:s},L=e.start,ge=e.end,Mt=e.minEndPTS||ge,er=e.maxStartPTS||L;for(let tr=0;tr<o.length;tr++){const ir=o.start(tr)-this.bufferPadding,rr=o.end(tr)+this.bufferPadding;if(er>=ir&&Mt<=rr){d.time.push({startPTS:Math.max(L,o.start(tr)),endPTS:Math.min(ge,o.end(tr))});break}else if(L<rr&&ge>ir)d.partial=!0,d.time.push({startPTS:Math.max(L,o.start(tr)),endPTS:Math.min(ge,o.end(tr))});else if(ge<=ir)break}return d}getPartialFragment(e){let r=null,s,o,d,L=0;const{bufferPadding:ge,fragments:Mt}=this;return Object.keys(Mt).forEach(er=>{const tr=Mt[er];tr&&isPartial(tr)&&(o=tr.body.start-ge,d=tr.body.end+ge,e>=o&&e<=d&&(s=Math.min(e-o,d-e),L<=s&&(r=tr.body,L=s)))}),r}isEndListAppended(e){const r=this.endListFragments[e];return r!==void 0&&(r.buffered||isPartial(r))}getState(e){const r=getFragmentKey(e),s=this.fragments[r];return s?s.buffered?isPartial(s)?FragmentState.PARTIAL:FragmentState.OK:FragmentState.APPENDING:FragmentState.NOT_LOADED}isTimeBuffered(e,r,s){let o,d;for(let L=0;L<s.length;L++){if(o=s.start(L)-this.bufferPadding,d=s.end(L)+this.bufferPadding,e>=o&&r<=d)return!0;if(r<=o)return!1}return!1}onFragLoaded(e,r){const{frag:s,part:o}=r;if(s.sn==="initSegment"||s.bitrateTest)return;const d=o?null:r,L=getFragmentKey(s);this.fragments[L]={body:s,appendedPTS:null,loaded:d,buffered:!1,range:Object.create(null)}}onBufferAppended(e,r){const{frag:s,part:o,timeRanges:d}=r;if(s.sn==="initSegment")return;const L=s.type;if(o){let ge=this.activePartLists[L];ge||(this.activePartLists[L]=ge=[]),ge.push(o)}this.timeRanges=d,Object.keys(d).forEach(ge=>{const Mt=d[ge];this.detectEvictedFragments(ge,Mt,L,o)})}onFragBuffered(e,r){this.detectPartialFragments(r)}hasFragment(e){const r=getFragmentKey(e);return!!this.fragments[r]}hasParts(e){var r;return!!((r=this.activePartLists[e])!=null&&r.length)}removeFragmentsInRange(e,r,s,o,d){o&&!this.hasGaps||Object.keys(this.fragments).forEach(L=>{const ge=this.fragments[L];if(!ge)return;const Mt=ge.body;Mt.type!==s||o&&!Mt.gap||Mt.start<r&&Mt.end>e&&(ge.buffered||d)&&this.removeFragment(Mt)})}removeFragment(e){const r=getFragmentKey(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const s=this.activePartLists[e.type];if(s){const o=e.sn;this.activePartLists[e.type]=s.filter(d=>d.fragment.sn!==o)}delete this.fragments[r],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function isPartial(t){var e,r,s;return t.buffered&&(t.body.gap||((e=t.range.video)==null?void 0:e.partial)||((r=t.range.audio)==null?void 0:r.partial)||((s=t.range.audiovideo)==null?void 0:s.partial))}function getFragmentKey(t){return`${t.type}_${t.level}_${t.urlId}_${t.sn}`}const MIN_CHUNK_SIZE=Math.pow(2,17);class FragmentLoader{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,r){const s=e.url;if(!s)return Promise.reject(new LoadError({type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${s?"part list":"url"}`),networkDetails:null}));this.abort();const o=this.config,d=o.fLoader,L=o.loader;return new Promise((ge,Mt)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(nr=>nr[0]==="GAP")){Mt(createGapLoadError(e));return}else e.gap=!1;const er=this.loader=e.loader=d?new d(o):new L(o),tr=createLoaderContext(e),ir=getLoaderConfigWithoutReties(o.fragLoadPolicy.default),rr={loadPolicy:ir,timeout:ir.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:MIN_CHUNK_SIZE};e.stats=er.stats,er.load(tr,rr,{onSuccess:(nr,ar,sr,lr)=>{this.resetLoader(e,er);let cr=nr.data;sr.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(cr.slice(0,16)),cr=cr.slice(16)),ge({frag:e,part:null,payload:cr,networkDetails:lr})},onError:(nr,ar,sr,lr)=>{this.resetLoader(e,er),Mt(new LoadError({type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:_objectSpread2({url:s,data:void 0},nr),error:new Error(`HTTP Error ${nr.code} ${nr.text}`),networkDetails:sr,stats:lr}))},onAbort:(nr,ar,sr)=>{this.resetLoader(e,er),Mt(new LoadError({type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:sr,stats:nr}))},onTimeout:(nr,ar,sr)=>{this.resetLoader(e,er),Mt(new LoadError({type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${rr.timeout}ms`),networkDetails:sr,stats:nr}))},onProgress:(nr,ar,sr,lr)=>{r&&r({frag:e,part:null,payload:sr,networkDetails:lr})}})})}loadPart(e,r,s){this.abort();const o=this.config,d=o.fLoader,L=o.loader;return new Promise((ge,Mt)=>{if(this.loader&&this.loader.destroy(),e.gap||r.gap){Mt(createGapLoadError(e,r));return}const er=this.loader=e.loader=d?new d(o):new L(o),tr=createLoaderContext(e,r),ir=getLoaderConfigWithoutReties(o.fragLoadPolicy.default),rr={loadPolicy:ir,timeout:ir.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:MIN_CHUNK_SIZE};r.stats=er.stats,er.load(tr,rr,{onSuccess:(nr,ar,sr,lr)=>{this.resetLoader(e,er),this.updateStatsFromPart(e,r);const cr={frag:e,part:r,payload:nr.data,networkDetails:lr};s(cr),ge(cr)},onError:(nr,ar,sr,lr)=>{this.resetLoader(e,er),Mt(new LoadError({type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:r,response:_objectSpread2({url:tr.url,data:void 0},nr),error:new Error(`HTTP Error ${nr.code} ${nr.text}`),networkDetails:sr,stats:lr}))},onAbort:(nr,ar,sr)=>{e.stats.aborted=r.stats.aborted,this.resetLoader(e,er),Mt(new LoadError({type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:r,error:new Error("Aborted"),networkDetails:sr,stats:nr}))},onTimeout:(nr,ar,sr)=>{this.resetLoader(e,er),Mt(new LoadError({type:ErrorTypes.NETWORK_ERROR,details:ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:r,error:new Error(`Timeout after ${rr.timeout}ms`),networkDetails:sr,stats:nr}))}})})}updateStatsFromPart(e,r){const s=e.stats,o=r.stats,d=o.total;if(s.loaded+=o.loaded,d){const Mt=Math.round(e.duration/r.duration),er=Math.min(Math.round(s.loaded/d),Mt),ir=(Mt-er)*Math.round(s.loaded/er);s.total=s.loaded+ir}else s.total=Math.max(s.loaded,s.total);const L=s.loading,ge=o.loading;L.start?L.first+=ge.first-ge.start:(L.start=ge.start,L.first=ge.first),L.end=ge.end}resetLoader(e,r){e.loader=null,this.loader===r&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),r.destroy()}}function createLoaderContext(t,e=null){const r=e||t,s={frag:t,part:e,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},o=r.byteRangeStartOffset,d=r.byteRangeEndOffset;if(isFiniteNumber(o)&&isFiniteNumber(d)){var L;let ge=o,Mt=d;if(t.sn==="initSegment"&&((L=t.decryptdata)==null?void 0:L.method)==="AES-128"){const er=d-o;er%16&&(Mt=d+(16-er%16)),o!==0&&(s.resetIV=!0,ge=o-16)}s.rangeStart=ge,s.rangeEnd=Mt}return s}function createGapLoadError(t,e){const r=new Error(`GAP ${t.gap?"tag":"attribute"} found`),s={type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.FRAG_GAP,fatal:!1,frag:t,error:r,networkDetails:null};return e&&(s.part=e),(e||t).stats.aborted=!0,new LoadError(s)}
vendor: 5,930 bytes, line 3761
3761class LoadError extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class KeyLoader{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const r in this.keyUriToKeyInfo){const s=this.keyUriToKeyInfo[r].loader;if(s){if(e&&e!==s.context.frag.type)return;s.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const r=this.keyUriToKeyInfo[e];(r.mediaKeySessionContext||r.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const r=this.keyUriToKeyInfo[e].loader;r&&r.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,r=ErrorDetails.KEY_LOAD_ERROR,s,o,d){return new LoadError({type:ErrorTypes.NETWORK_ERROR,details:r,fatal:!1,frag:e,response:d,error:s,networkDetails:o})}loadClear(e,r){if(this.emeController&&this.config.emeEnabled){const{sn:s,cc:o}=e;for(let d=0;d<r.length;d++){const L=r[d];if(o<=L.cc&&(s==="initSegment"||L.sn==="initSegment"||s<L.sn)){this.emeController.selectKeySystemFormat(L).then(ge=>{L.setKeyFormat(ge)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then(r=>this.loadInternal(e,r)):this.loadInternal(e)}loadInternal(e,r){var s,o;r&&e.setKeyFormat(r);const d=e.decryptdata;if(!d){const er=new Error(r?`Expected frag.decryptdata to be defined after setting format ${r}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,ErrorDetails.KEY_LOAD_ERROR,er))}const L=d.uri;if(!L)return Promise.reject(this.createKeyLoadError(e,ErrorDetails.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${L}"`)));let ge=this.keyUriToKeyInfo[L];if((s=ge)!=null&&s.decryptdata.key)return d.key=ge.decryptdata.key,Promise.resolve({frag:e,keyInfo:ge});if((o=ge)!=null&&o.keyLoadPromise){var Mt;switch((Mt=ge.mediaKeySessionContext)==null?void 0:Mt.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return ge.keyLoadPromise.then(er=>(d.key=er.keyInfo.decryptdata.key,{frag:e,keyInfo:ge}))}}switch(ge=this.keyUriToKeyInfo[L]={decryptdata:d,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},d.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return d.keyFormat==="identity"?this.loadKeyHTTP(ge,e):this.loadKeyEME(ge,e);case"AES-128":return this.loadKeyHTTP(ge,e);default:return Promise.reject(this.createKeyLoadError(e,ErrorDetails.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${d.method}"`)))}}loadKeyEME(e,r){const s={frag:r,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const o=this.emeController.loadKey(s);if(o)return(e.keyLoadPromise=o.then(d=>(e.mediaKeySessionContext=d,s))).catch(d=>{throw e.keyLoadPromise=null,d})}return Promise.resolve(s)}loadKeyHTTP(e,r){const s=this.config,o=s.loader,d=new o(s);return r.keyLoader=e.loader=d,e.keyLoadPromise=new Promise((L,ge)=>{const Mt={keyInfo:e,frag:r,responseType:"arraybuffer",url:e.decryptdata.uri},er=s.keyLoadPolicy.default,tr={loadPolicy:er,timeout:er.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},ir={onSuccess:(rr,nr,ar,sr)=>{const{frag:lr,keyInfo:cr,url:ur}=ar;if(!lr.decryptdata||cr!==this.keyUriToKeyInfo[ur])return ge(this.createKeyLoadError(lr,ErrorDetails.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),sr));cr.decryptdata.key=lr.decryptdata.key=new Uint8Array(rr.data),lr.keyLoader=null,cr.loader=null,L({frag:lr,keyInfo:cr})},onError:(rr,nr,ar,sr)=>{this.resetLoader(nr),ge(this.createKeyLoadError(r,ErrorDetails.KEY_LOAD_ERROR,new Error(`HTTP Error ${rr.code} loading key ${rr.text}`),ar,_objectSpread2({url:Mt.url,data:void 0},rr)))},onTimeout:(rr,nr,ar)=>{this.resetLoader(nr),ge(this.createKeyLoadError(r,ErrorDetails.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),ar))},onAbort:(rr,nr,ar)=>{this.resetLoader(nr),ge(this.createKeyLoadError(r,ErrorDetails.INTERNAL_ABORTED,new Error("key loading aborted"),ar))}};d.load(Mt,tr,ir)})}resetLoader(e){const{frag:r,keyInfo:s,url:o}=e,d=s.loader;r.keyLoader===d&&(r.keyLoader=null,s.loader=null),delete this.keyUriToKeyInfo[o],d&&d.destroy()}}class TaskLoop{constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}const noopBuffered={length:0,start:()=>0,end:()=>0};class BufferHelper{static isBuffered(e,r){try{if(e){const s=BufferHelper.getBuffered(e);for(let o=0;o<s.length;o++)if(r>=s.start(o)&&r<=s.end(o))return!0}}catch{}return!1}static bufferInfo(e,r,s){try{if(e){const o=BufferHelper.getBuffered(e),d=[];let L;for(L=0;L<o.length;L++)d.push({start:o.start(L),end:o.end(L)});return this.bufferedInfo(d,r,s)}}catch{}return{len:0,start:r,end:r,nextStart:void 0}}static bufferedInfo(e,r,s){r=Math.max(0,r),e.sort(function(er,tr){const ir=er.start-tr.start;return ir||tr.end-er.end});let o=[];if(s)for(let er=0;er<e.length;er++){const tr=o.length;if(tr){const ir=o[tr-1].end;e[er].start-ir<s?e[er].end>ir&&(o[tr-1].end=e[er].end):o.push(e[er])}else o.push(e[er])}else o=e;let d=0,L,ge=r,Mt=r;
3761for(let er=0;er<o.length;er++){const tr=o[er].start,ir=o[er].end;if(r+s>=tr&&r<ir)ge=tr,Mt=ir,d=Mt-r;else if(r+s<tr){L=tr;break}}return{len:d,start:ge||0,end:Mt||0,nextStart:L}}static getBuffered(e){try{return e.buffered}catch(r){return logger.log("failed to get media.buffered",r),noopBuffered}}}class ChunkMetadata{constructor(e,r,s,o=0,d=-1,L=!1){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=getNewPerformanceTiming(),this.buffering={audio:getNewPerformanceTiming(),video:getNewPerformanceTiming(),audiovideo:getNewPerformanceTiming()},this.level=e,this.sn=r,this.id=s,this.size=o,this.part=d,this.partial=L}}function getNewPerformanceTiming(){return{start:0,executeStart:0,executeEnd:0,end:0}}function findFirstFragWithCC(t,e){let r=null;for(let s=0,o=t.length;s<o;s++){const d=t[s];if(d&&d.cc===e){r=d;break}}return r}function shouldAlignOnDiscontinuities(t,e,r){return!!(e.details&&(r.endCC>r.startCC||t&&t.cc<r.startCC))}function findDiscontinuousReferenceFrag(t,e,r=0){const s=t.fragments,o=e.fragments;if(!o.length||!s.length){logger.log("No fragments to align");return}const d=findFirstFragWithCC(s,o[0].cc);if(!d||d&&!d.startPTS){logger.log("No frag in previous level to align on");return}return d}function adjustFragmentStart(t,e){if(t){const r=t.start+e;t.start=t.startPTS=r,t.endPTS=r+t.duration}}function adjustSlidingStart(t,e){const r=e.fragments;for(let s=0,o=r.length;s<o;s++)adjustFragmentStart(r[s],t);e.fragmentHint&&adjustFragmentStart(e.fragmentHint,t),e.alignedSliding=!0}function alignStream(t,e,r){e&&(alignDiscontinuities(t,r,e),!r.alignedSliding&&e.details&&alignPDT(r,e.details),!r.alignedSliding&&e.details&&!r.skippedSegments&&adjustSliding(e.details,r))}function alignDiscontinuities(t,e,r){if(shouldAlignOnDiscontinuities(t,r,e)){const s=findDiscontinuousReferenceFrag(r.details,e);s&&isFiniteNumber(s.start)&&(logger.log(`Adjusting PTS using last level due to CC increase within current level ${e.url}`),adjustSlidingStart(s.start,e))}}function alignPDT(t,e){if(!e.fragments.length||!t.hasProgramDateTime||!e.hasProgramDateTime)return;const r=e.fragments[0].programDateTime,s=t.fragments[0].programDateTime,o=(s-r)/1e3+e.fragments[0].start;o&&isFiniteNumber(o)&&(logger.log(`Adjusting PTS using programDateTime delta ${s-r}ms, sliding:${o.toFixed(3)} ${t.url} `),adjustSlidingStart(o,t))}function alignMediaPlaylistByPDT(t,e){if(!t.hasProgramDateTime||!e.hasProgramDateTime)return;const r=t.fragments,s=e.fragments;if(!r.length||!s.length)return;const o=Math.round(s.length/2)-1,d=s[o],L=findFirstFragWithCC(r,d.cc)||r[Math.round(r.length/2)-1],ge=d.programDateTime,Mt=L.programDateTime;if(ge===null||Mt===null)return;const er=(Mt-ge)/1e3-(L.start-d.start);adjustSlidingStart(er,t)}class AESCrypto{constructor(e,r){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=r}decrypt(e,r){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},r,e)}}class FastAESKey{constructor(e,r){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=r}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}function removePadding(t){const e=t.byteLength,r=e&&new DataView(t.buffer).getUint8(e-1);return r?sliceUint8(t,0,e-r):t}class AESDecryptor{constructor(){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()}uint8ArrayToUint32Array_(e){const r=new DataView(e),s=new Uint32Array(4);for(let o=0;o<4;o++)s[o]=r.getUint32(o*4);return s}initTable(){const e=this.sBox,r=this.invSBox,s=this.subMix,o=s[0],d=s[1],L=s[2],ge=s[3],Mt=this.invSubMix,er=Mt[0],tr=Mt[1],ir=Mt[2],rr=Mt[3],nr=new Uint32Array(256);let ar=0,sr=0,lr=0;for(lr=0;lr<256;lr++)lr<128?nr[lr]=lr<<1:nr[lr]=lr<<1^283;for(lr=0;lr<256;lr++){let cr=sr^sr<<1^sr<<2^sr<<3^sr<<4;cr=cr>>>8^cr&255^99,e[ar]=cr,r[cr]=ar;const ur=nr[ar],or=nr[ur],dr=nr[or];
vendor: 26,143 bytes, line 3761
3761let hr=nr[cr]*257^cr*16843008;o[ar]=hr<<24|hr>>>8,d[ar]=hr<<16|hr>>>16,L[ar]=hr<<8|hr>>>24,ge[ar]=hr,hr=dr*16843009^or*65537^ur*257^ar*16843008,er[cr]=hr<<24|hr>>>8,tr[cr]=hr<<16|hr>>>16,ir[cr]=hr<<8|hr>>>24,rr[cr]=hr,ar?(ar=ur^nr[nr[nr[dr^ur]]],sr^=nr[nr[sr]]):ar=sr=1}}expandKey(e){const r=this.uint8ArrayToUint32Array_(e);let s=!0,o=0;for(;o<r.length&&s;)s=r[o]===this.key[o],o++;if(s)return;this.key=r;const d=this.keySize=r.length;if(d!==4&&d!==6&&d!==8)throw new Error("Invalid aes key size="+d);const L=this.ksRows=(d+6+1)*4;let ge,Mt;const er=this.keySchedule=new Uint32Array(L),tr=this.invKeySchedule=new Uint32Array(L),ir=this.sBox,rr=this.rcon,nr=this.invSubMix,ar=nr[0],sr=nr[1],lr=nr[2],cr=nr[3];let ur,or;for(ge=0;ge<L;ge++){if(ge<d){ur=er[ge]=r[ge];continue}or=ur,ge%d===0?(or=or<<8|or>>>24,or=ir[or>>>24]<<24|ir[or>>>16&255]<<16|ir[or>>>8&255]<<8|ir[or&255],or^=rr[ge/d|0]<<24):d>6&&ge%d===4&&(or=ir[or>>>24]<<24|ir[or>>>16&255]<<16|ir[or>>>8&255]<<8|ir[or&255]),er[ge]=ur=(er[ge-d]^or)>>>0}for(Mt=0;Mt<L;Mt++)ge=L-Mt,Mt&3?or=er[ge]:or=er[ge-4],Mt<4||ge<=4?tr[Mt]=or:tr[Mt]=ar[ir[or>>>24]]^sr[ir[or>>>16&255]]^lr[ir[or>>>8&255]]^cr[ir[or&255]],tr[Mt]=tr[Mt]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,r,s){const o=this.keySize+6,d=this.invKeySchedule,L=this.invSBox,ge=this.invSubMix,Mt=ge[0],er=ge[1],tr=ge[2],ir=ge[3],rr=this.uint8ArrayToUint32Array_(s);let nr=rr[0],ar=rr[1],sr=rr[2],lr=rr[3];const cr=new Int32Array(e),ur=new Int32Array(cr.length);let or,dr,hr,pr,mr,vr,Er,Cr,Pr,kr,Mr,Ur,$r,yr;const xr=this.networkToHostOrderSwap;for(;r<cr.length;){for(Pr=xr(cr[r]),kr=xr(cr[r+1]),Mr=xr(cr[r+2]),Ur=xr(cr[r+3]),mr=Pr^d[0],vr=Ur^d[1],Er=Mr^d[2],Cr=kr^d[3],$r=4,yr=1;yr<o;yr++)or=Mt[mr>>>24]^er[vr>>16&255]^tr[Er>>8&255]^ir[Cr&255]^d[$r],dr=Mt[vr>>>24]^er[Er>>16&255]^tr[Cr>>8&255]^ir[mr&255]^d[$r+1],hr=Mt[Er>>>24]^er[Cr>>16&255]^tr[mr>>8&255]^ir[vr&255]^d[$r+2],pr=Mt[Cr>>>24]^er[mr>>16&255]^tr[vr>>8&255]^ir[Er&255]^d[$r+3],mr=or,vr=dr,Er=hr,Cr=pr,$r=$r+4;or=L[mr>>>24]<<24^L[vr>>16&255]<<16^L[Er>>8&255]<<8^L[Cr&255]^d[$r],dr=L[vr>>>24]<<24^L[Er>>16&255]<<16^L[Cr>>8&255]<<8^L[mr&255]^d[$r+1],hr=L[Er>>>24]<<24^L[Cr>>16&255]<<16^L[mr>>8&255]<<8^L[vr&255]^d[$r+2],pr=L[Cr>>>24]<<24^L[mr>>16&255]<<16^L[vr>>8&255]<<8^L[Er&255]^d[$r+3],ur[r]=xr(or^nr),ur[r+1]=xr(pr^ar),ur[r+2]=xr(hr^sr),ur[r+3]=xr(dr^lr),nr=Pr,ar=kr,sr=Mr,lr=Ur,r=r+4}return ur.buffer}}const CHUNK_SIZE=16;class Decrypter{constructor(e,{removePKCS7Padding:r=!0}={}){if(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.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=r,r)try{const s=self.crypto;s&&(this.subtle=s.subtle||s.webkitSubtle)}catch{}this.subtle===null&&(this.useSoftware=!0)}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:r}=this;if(!e||r)return this.reset(),null;const s=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?removePadding(s):s}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,r,s){return this.useSoftware?new Promise((o,d)=>{this.softwareDecrypt(new Uint8Array(e),r,s);const L=this.flush();L?o(L.buffer):d(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),r,s)}softwareDecrypt(e,r,s){const{currentIV:o,currentResult:d,remainderData:L}=this;this.logOnce("JS AES decrypt"),L&&(e=appendUint8Array(L,e),this.remainderData=null);const ge=this.getValidChunk(e);if(!ge.length)return null;o&&(s=o);let Mt=this.softwareDecrypter;Mt||(Mt=this.softwareDecrypter=new AESDecryptor),Mt.expandKey(r);const er=d;return this.currentResult=Mt.decrypt(ge.buffer,0,s),this.currentIV=sliceUint8(ge,-16).buffer,er||null}webCryptoDecrypt(e,r,s){const o=this.subtle;return(this.key!==r||!this.fastAesKey)&&(this.key=r,this.fastAesKey=new FastAESKey(o,r)),this.fastAesKey.expandKey().then(d=>o?(this.logOnce("WebCrypto AES decrypt"),new AESCrypto(o,new Uint8Array(s)).decrypt(e.buffer,d)):Promise.reject(new Error("web crypto not initialized"))).catch(d=>(logger.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${d.name}: ${d.message}`),this.onWebCryptoError(e,r,s)))}onWebCryptoError(e,r,s){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,r,s);const o=this.flush();if(o)return o.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let r=e;const s=e.length-e.length%CHUNK_SIZE;return s!==e.length&&(r=sliceUint8(e,0,s),this.remainderData=sliceUint8(e,s)),r}logOnce(e){this.logEnabled&&(logger.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const TimeRanges={toString:function(t){let e="";const r=t.length;for(let s=0;s<r;s++)e+=`[${t.start(s).toFixed(3)}-${t.end(s).toFixed(3)}]`;return e}},State={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class BaseStreamController extends TaskLoop{constructor(e,r,s,o,d){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=State.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=d,this.logPrefix=o,this.log=logger.log.bind(logger,`${o}:`),this.warn=logger.warn.bind(logger,`${o}:`),this.hls=e,this.fragmentLoader=new FragmentLoader(e.config),this.keyLoader=s,this.fragmentTracker=r,this.config=e.config,this.decrypter=new Decrypter(e.config),e.on(Events.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=State.STOPPED}_streamEnded(e,r){if(r.live||e.nextStart||!e.end||!this.media)return!1;const s=r.partList;if(s!=null&&s.length){const d=s[s.length-1];return BufferHelper.isBuffered(this.media,d.start+d.duration/2)}const o=r.fragments[r.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(o)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levels[this.levelLastLoaded])==null?void 0:e.details}}onMediaAttached(e,r){const s=this.media=this.mediaBuffer=r.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),s.addEventListener("seeking",this.onvseeking),s.addEventListener("ended",this.onvended);const o=this.config;this.levels&&o.autoStartLoad&&this.state===State.STOPPED&&this.startLoad(o.startPosition)}onMediaDetaching(){const e=this.media;e!=null&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:r,media:s,mediaBuffer:o,state:d}=this,L=s?s.currentTime:0,ge=BufferHelper.bufferInfo(o||s,L,e.maxBufferHole);if(this.log(`media seeking to ${isFiniteNumber(L)?L.toFixed(3):L}, state: ${d}`),this.state===State.ENDED)this.resetLoadingState();else if(r){const Mt=e.maxFragLookUpTolerance,er=r.start-Mt,tr=r.start+r.duration+Mt;if(!ge.len||tr<ge.start||er>ge.end){const ir=L>tr;(L<er||ir)&&(ir&&r.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),r.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}s&&(this.fragmentTracker.removeFragmentsInRange(L,1/0,this.playlistType,!0),this.lastCurrentTime=L),!this.loadedmetadata&&!ge.len&&(this.nextLoadPosition=this.startPosition=L),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,r){this.startTimeOffset=r.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.stopLoad(),super.onHandlerDestroying()}onHandlerDestroyed(){this.state=State.STOPPED,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,super.onHandlerDestroyed()}loadFragment(e,r,s){this._loadFragForPlayback(e,r,s)}_loadFragForPlayback(e,r,s){const o=d=>{if(this.fragContextChanged(e)){this.warn(`Fragment ${e.sn}${d.part?" p: "+d.part.index:""} of level ${e.level} was dropped during download.`),this.fragmentTracker.removeFragment(e);return}e.stats.chunkCount++,this._handleFragmentLoadProgress(d)};this._doFragLoad(e,r,s,o).then(d=>{if(!d)return;const L=this.state;if(this.fragContextChanged(e)){(L===State.FRAG_LOADING||!this.fragCurrent&&L===State.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=State.IDLE);return}"payload"in d&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(Events.FRAG_LOADED,d)),this._handleFragmentLoadComplete(d)}).catch(d=>{this.state===State.STOPPED||this.state===State.ERROR||(this.warn(d),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var r;const{fragmentTracker:s}=this;if(s.getState(e)===FragmentState.APPENDING){const d=e.type,L=this.getFwdBufferInfo(this.mediaBuffer,d),ge=Math.max(e.duration,L?L.len:this.config.maxBufferLength);this.reduceMaxBufferLength(ge)&&s.removeFragment(e)}else((r=this.mediaBuffer)==null?void 0:r.buffered.length)===0?s.removeAllFragments():s.hasParts(e.type)&&(s.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),s.getState(e)===FragmentState.PARTIAL&&s.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const r=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:r,part:null,stats:r.stats,id:r.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,r,s=null){if(!(e-r))return;const o={startOffset:e,endOffset:r,type:s};this.hls.trigger(Events.BUFFER_FLUSHING,o)}_loadInitSegment(e,r){this._doFragLoad(e,r).then(s=>{if(!s||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return s}).then(s=>{const{hls:o}=this,{payload:d}=s,L=e.decryptdata;if(d&&d.byteLength>0&&L&&L.key&&L.iv&&L.method==="AES-128"){const ge=self.performance.now();return this.decrypter.decrypt(new Uint8Array(d),L.key.buffer,L.iv.buffer).catch(Mt=>{throw o.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!1,error:Mt,reason:Mt.message,frag:e}),Mt}).then(Mt=>{const er=self.performance.now();return o.trigger(Events.FRAG_DECRYPTED,{frag:e,payload:Mt,stats:{tstart:ge,tdecrypt:er}}),s.payload=Mt,s})}return s}).then(s=>{const{fragCurrent:o,hls:d,levels:L}=this;if(!L)throw new Error("init load aborted, missing levels");const ge=e.stats;this.state=State.IDLE,r.fragmentError=0,e.data=new Uint8Array(s.payload),ge.parsing.start=ge.buffering.start=self.performance.now(),ge.parsing.end=ge.buffering.end=self.performance.now(),s.frag===o&&d.trigger(Events.FRAG_BUFFERED,{stats:ge,frag:o,part:null,id:e.type}),this.tick()}).catch(s=>{this.state===State.STOPPED||this.state===State.ERROR||(this.warn(s),this.resetFragmentLoading(e))})}fragContextChanged(e){const{fragCurrent:r}=this;return!e||!r||e.level!==r.level||e.sn!==r.sn||e.urlId!==r.urlId}fragBufferedComplete(e,r){var s,o,d,L;const ge=this.mediaBuffer?this.mediaBuffer:this.media;this.log(`Buffered ${e.type} sn: ${e.sn}${r?" part: "+r.index:""} of ${this.playlistType===PlaylistLevelType.MAIN?"level":"track"} ${e.level} (frag:[${((s=e.startPTS)!=null?s:NaN).toFixed(3)}-${((o=e.endPTS)!=null?o:NaN).toFixed(3)}] > buffer:${ge?TimeRanges.toString(BufferHelper.getBuffered(ge)):"(detached)"})`),this.state=State.IDLE,ge&&(!this.loadedmetadata&&e.type==PlaylistLevelType.MAIN&&ge.buffered.length&&((d=this.fragCurrent)==null?void 0:d.sn)===((L=this.fragPrevious)==null?void 0:L.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:r}=this;if(!r)return;const{frag:s,part:o,partsLoaded:d}=e,L=!d||d.length===0||d.some(Mt=>!Mt),ge=new ChunkMetadata(s.level,s.sn,s.stats.chunkCount+1,0,o?o.index:-1,!L);r.flush(ge)}_handleFragmentLoadProgress(e){}_doFragLoad(e,r,s=null,o){var d;const L=r==null?void 0:r.details;if(!this.levels||!L)throw new Error(`frag load aborted, missing level${L?"":" detail"}s`);let ge=null;if(e.encrypted&&!((d=e.decryptdata)!=null&&d.key)?(this.log(`Loading key for ${e.sn} of [${L.startSN}-${L.endSN}], ${this.logPrefix==="[stream-controller]"?"level":"track"} ${e.level}`),this.state=State.KEY_LOADING,this.fragCurrent=e,ge=this.keyLoader.load(e).then(tr=>{if(!this.fragContextChanged(tr.frag))return this.hls.trigger(Events.KEY_LOADED,tr),this.state===State.KEY_LOADING&&(this.state=State.IDLE),tr}),this.hls.trigger(Events.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(ge=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&L.encryptedFragments.length&&this.keyLoader.loadClear(e,L.encryptedFragments),s=Math.max(e.start,s||0),this.config.lowLatencyMode&&e.sn!=="initSegment"){const tr=L.partList;if(tr&&o){s>e.end&&L.fragmentHint&&(e=L.fragmentHint);const ir=this.getNextPart(tr,e,s);if(ir>-1){const rr=tr[ir];this.log(`Loading part sn: ${e.sn} p: ${rr.index} cc: ${e.cc} of playlist [${L.startSN}-${L.endSN}] parts [0-${ir}-${tr.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(s.toFixed(3))}`),this.nextLoadPosition=rr.start+rr.duration,this.state=State.FRAG_LOADING;let nr;return ge?nr=ge.then(ar=>!ar||this.fragContextChanged(ar.frag)?null:this.doFragPartsLoad(e,rr,r,o)).catch(ar=>this.handleFragLoadError(ar)):nr=this.doFragPartsLoad(e,rr,r,o).catch(ar=>this.handleFragLoadError(ar)),this.hls.trigger(Events.FRAG_LOADING,{frag:e,part:rr,targetBufferTime:s}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):nr}else if(!e.url||this.loadedEndOfParts(tr,s))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${L?"of ["+L.startSN+"-"+L.endSN+"] ":""}${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(s.toFixed(3))}`),isFiniteNumber(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=State.FRAG_LOADING;const Mt=this.config.progressive;let er;return Mt&&ge?er=ge.then(tr=>!tr||this.fragContextChanged(tr==null?void 0:tr.frag)?null:this.fragmentLoader.load(e,o)).catch(tr=>this.handleFragLoadError(tr)):er=Promise.all([this.fragmentLoader.load(e,Mt?o:void 0),ge]).then(([tr])=>(!Mt&&tr&&o&&o(tr),tr)).catch(tr=>this.handleFragLoadError(tr)),this.hls.trigger(Events.FRAG_LOADING,{frag:e,targetBufferTime:s}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):er}doFragPartsLoad(e,r,s,o){return new Promise((d,L)=>{var ge;const Mt=[],er=(ge=s.details)==null?void 0:ge.partList,tr=ir=>{this.fragmentLoader.loadPart(e,ir,o).then(rr=>{Mt[ir.index]=rr;const nr=rr.part;this.hls.trigger(Events.FRAG_LOADED,rr);const ar=getPartWith(s,e.sn,ir.index+1)||findPart(er,e.sn,ir.index+1);if(ar)tr(ar);else return d({frag:e,part:nr,partsLoaded:Mt})}).catch(L)};tr(r)})}handleFragLoadError(e){if("data"in e){const r=e.data;e.data&&r.details===ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(r.frag,r.part):this.hls.trigger(Events.ERROR,r)}else this.hls.trigger(Events.ERROR,{type:ErrorTypes.OTHER_ERROR,details:ErrorDetails.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const r=this.getCurrentContext(e);if(!r||this.state!==State.PARSING){!this.fragCurrent&&this.state!==State.STOPPED&&this.state!==State.ERROR&&(this.state=State.IDLE);return}const{frag:s,part:o,level:d}=r,L=self.performance.now();s.stats.parsing.end=L,o&&(o.stats.parsing.end=L),this.updateLevelTiming(s,o,d,e.partial)}getCurrentContext(e){const{levels:r,fragCurrent:s}=this,{level:o,sn:d,part:L}=e;if(!(r!=null&&r[o]))return this.warn(`Levels object was unset while buffering fragment ${d} of level ${o}. The current chunk will not be buffered.`),null;const ge=r[o],Mt=L>-1?getPartWith(ge,d,L):null,er=Mt?Mt.fragment:getFragmentWithSN(ge,d,s);return er?(s&&s!==er&&(er.stats=s.stats),{frag:er,part:Mt,level:ge}):null}bufferFragmentData(e,r,s,o,d){var L;if(!e||this.state!==State.PARSING)return;const{data1:ge,data2:Mt}=e;let er=ge;if(ge&&Mt&&(er=appendUint8Array(ge,Mt)),!((L=er)!=null&&L.length))return;const tr={type:e.type,frag:r,part:s,chunkMeta:o,parent:r.type,data:er};if(this.hls.trigger(Events.BUFFER_APPENDING,tr),e.dropped&&e.independent&&!s){if(d)return;this.flushBufferGap(r)}}flushBufferGap(e){const r=this.media;if(!r)return;if(!BufferHelper.isBuffered(r,r.currentTime)){this.flushMainBuffer(0,e.start);return}const s=r.currentTime,o=BufferHelper.bufferInfo(r,s,0),d=e.duration,L=Math.min(this.config.maxFragLookUpTolerance*2,d*.25),ge=Math.max(Math.min(e.start-L,o.end-L),s+L);e.start-ge>L&&this.flushMainBuffer(ge,e.start)}getFwdBufferInfo(e,r){const s=this.getLoadPosition();return isFiniteNumber(s)?this.getFwdBufferInfoAtPos(e,s,r):null}getFwdBufferInfoAtPos(e,r,s){const{config:{maxBufferHole:o}}=this,d=BufferHelper.bufferInfo(e,r,o);if(d.len===0&&d.nextStart!==void 0){const L=this.fragmentTracker.getBufferedFrag(r,s);if(L&&d.nextStart<L.end)return BufferHelper.bufferInfo(e,r,Math.max(d.nextStart,o))}return d}getMaxBufferLength(e){const{config:r}=this;let s;return e?s=Math.max(8*r.maxBufferSize/e,r.maxBufferLength):s=r.maxBufferLength,Math.min(s,r.maxMaxBufferLength)}reduceMaxBufferLength(e){const r=this.config,s=e||r.maxBufferLength;return r.maxMaxBufferLength>=s?(r.maxMaxBufferLength/=2,this.warn(`Reduce max buffer length to ${r.maxMaxBufferLength}s`),!0):!1}getAppendedFrag(e,r=PlaylistLevelType.MAIN){const s=this.fragmentTracker.getAppendedFrag(e,PlaylistLevelType.MAIN);return s&&"fragment"in s?s.fragment:s}getNextFragment(e,r){const s=r.fragments,o=s.length;if(!o)return null;const{config:d}=this,L=s[0].start;let ge;if(r.live){const Mt=d.initialLiveManifestSize;if(o<Mt)return this.warn(`Not enough fragments to start playback (have: ${o}, need: ${Mt})`),null;!r.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(ge=this.getInitialLiveFragment(r,s),this.startPosition=ge?this.hls.liveSyncPosition||ge.start:e)}else e<=L&&(ge=s[0]);if(!ge){const Mt=d.lowLatencyMode?r.partEnd:r.fragmentEnd;ge=this.getFragmentAtPosition(e,Mt,r)}return this.mapToInitFragWhenRequired(ge)}isLoopLoading(e,r){const s=this.fragmentTracker.getState(e);return(s===FragmentState.OK||s===FragmentState.PARTIAL&&!!e.gap)&&this.nextLoadPosition>r}getNextFragmentLoopLoading(e,r,s,o,d){const L=e.gap,ge=this.getNextFragment(this.nextLoadPosition,r);if(ge===null)return ge;if(e=ge,L&&e&&!e.gap&&s.nextStart){const Mt=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,s.nextStart,o);if(Mt!==null&&s.len+Mt.len>=d)return this.log(`buffer full after gaps in "${o}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,r,s){let o=-1,d=!1,L=!0;for(let ge=0,Mt=e.length;ge<Mt;ge++){const er=e[ge];if(L=L&&!er.independent,o>-1&&s<er.start)break;const tr=er.loaded;tr?o=-1:(d||er.independent||L)&&er.fragment===r&&(o=ge),d=tr}return o}loadedEndOfParts(e,r){const s=e[e.length-1];return s&&r>s.start&&s.loaded}getInitialLiveFragment(e,r){const s=this.fragPrevious;let o=null;if(s){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${s.programDateTime}`),o=findFragmentByPDT(r,s.endProgramDateTime,this.config.maxFragLookUpTolerance)),!o){const d=s.sn+1;if(d>=e.startSN&&d<=e.endSN){const L=r[d-e.startSN];s.cc===L.cc&&(o=L,this.log(`Live playlist, switching playlist, load frag with next SN: ${o.sn}`))}o||(o=findFragWithCC(r,s.cc),o&&this.log(`Live playlist, switching playlist, load frag with same CC: ${o.sn}`))}}else{const d=this.hls.liveSyncPosition;d!==null&&(o=this.getFragmentAtPosition(d,this.bitrateTest?e.fragmentEnd:e.edge,e))}return o}getFragmentAtPosition(e,r,s){const{config:o}=this;let{fragPrevious:d}=this,{fragments:L,endSN:ge}=s;const{fragmentHint:Mt}=s,er=o.maxFragLookUpTolerance,tr=s.partList,ir=!!(o.lowLatencyMode&&tr!=null&&tr.length&&Mt);ir&&Mt&&!this.bitrateTest&&(L=L.concat(Mt),ge=Mt.sn);let rr;if(e<r){const nr=e>r-er?0:er;rr=findFragmentByPTS(d,L,e,nr)}else rr=L[L.length-1];if(rr){const nr=rr.sn-s.startSN,ar=this.fragmentTracker.getState(rr);if((ar===FragmentState.OK||ar===FragmentState.PARTIAL&&rr.gap)&&(d=rr),d&&rr.sn===d.sn&&(!ir||tr[0].fragment.sn>rr.sn)&&d&&rr.level===d.level){const lr=L[nr+1];rr.sn<ge&&this.fragmentTracker.getState(lr)!==FragmentState.OK?rr=lr:rr=null}}return rr}synchronizeToLiveEdge(e){const{config:r,media:s}=this;if(!s)return;const o=this.hls.liveSyncPosition,d=s.currentTime,L=e.fragments[0].start,ge=e.edge,Mt=d>=L-r.maxFragLookUpTolerance&&d<=ge;if(o!==null&&s.duration>o&&(d<o||!Mt)){const er=r.liveMaxLatencyDuration!==void 0?r.liveMaxLatencyDuration:r.liveMaxLatencyDurationCount*e.targetduration;(!Mt&&s.readyState<4||d<ge-er)&&(this.loadedmetadata||(this.nextLoadPosition=o),s.readyState&&(this.warn(`Playback: ${d.toFixed(3)} is located too far from the end of live sliding playlist: ${ge}, reset currentTime to : ${o.toFixed(3)}`),s.currentTime=o))}}alignPlaylists(e,r){const{levels:s,levelLastLoaded:o,fragPrevious:d}=this,L=o!==null?s[o]:null,ge=e.fragments.length;if(!ge)return this.warn("No fragments in live playlist"),0;const Mt=e.fragments[0].start,er=!r,tr=e.alignedSliding&&isFiniteNumber(Mt);if(er||!tr&&!Mt){alignStream(d,L,e);const ir=e.fragments[0].start;return this.log(`Live playlist sliding: ${ir.toFixed(2)} start-sn: ${r?r.startSN:"na"}->${e.startSN} prev-sn: ${d?d.sn:"na"} fragments: ${ge}`),ir}return Mt}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,r){let s=this.startPosition;if(s<r&&(s=-1),s===-1||this.lastCurrentTime===-1){const o=this.startTimeOffset!==null,d=o?this.startTimeOffset:e.startTimeOffset;d!==null&&isFiniteNumber(d)?(s=r+d,d<0&&(s+=e.totalduration),s=Math.min(Math.max(r,s),r+e.totalduration),this.log(`Start time offset ${d} found in ${o?"multivariant":"media"} playlist, adjust startPosition to ${s}`),this.startPosition=s):e.live?s=this.hls.liveSyncPosition||r:this.startPosition=s=0,this.lastCurrentTime=s}this.nextLoadPosition=s}getLoadPosition(){const{media:e}=this;let r=0;return this.loadedmetadata&&e?r=e.currentTime:this.nextLoadPosition&&(r=this.nextLoadPosition),r}handleFragLoadAborted(e,r){this.transmuxer&&e.sn!=="initSegment"&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${r?" part "+r.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==State.FRAG_LOADING_WAITING_RETRY)&&(this.state=State.IDLE)}onFragmentOrKeyLoadError(e,r){if(r.chunkMeta&&!r.frag){const ir=this.getCurrentContext(r.chunkMeta);ir&&(r.frag=ir.frag)}const s=r.frag;if(!s||s.type!==e||!this.levels)return;if(this.fragContextChanged(s)){var o;this.warn(`Frag load error must match current frag to retry ${s.url} > ${(o=this.fragCurrent)==null?void 0:o.url}`);return}const d=r.details===ErrorDetails.FRAG_GAP;d&&this.fragmentTracker.fragBuffered(s,!0);const L=r.errorAction,{action:ge,retryCount:Mt=0,retryConfig:er}=L||{};if(L&&ge===NetworkErrorAction.RetryRequest&&er){var tr;this.resetStartWhenNotLoaded((tr=this.levelLastLoaded)!=null?tr:s.level);const ir=getRetryDelay(er,Mt);this.warn(`Fragment ${s.sn} of ${e} ${s.level} errored with ${r.details}, retrying loading ${Mt+1}/${er.maxNumRetry} in ${ir}ms`),L.resolved=!0,this.retryDate=self.performance.now()+ir,this.state=State.FRAG_LOADING_WAITING_RETRY}else er&&L?(this.resetFragmentErrors(e),Mt<er.maxNumRetry?d||(L.resolved=!0):logger.warn(`${r.details} reached or exceeded max retry (${Mt})`)):(L==null?void 0:L.action)===NetworkErrorAction.SendAlternateToPenaltyBox?this.state=State.WAITING_LEVEL:this.state=State.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===State.PARSING||this.state===State.PARSED){const r=e.parent,s=this.getFwdBufferInfo(this.mediaBuffer,r),o=s&&s.len>.5;o&&this.reduceMaxBufferLength(s.len);const d=!o;return d&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${r} buffer`),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),d}return!1}resetFragmentErrors(e){e===PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==State.STOPPED&&(this.state=State.IDLE)}afterBufferFlushed(e,r,s){if(!e)return;const o=BufferHelper.getBuffered(e);this.fragmentTracker.detectEvictedFragments(r,o,s),this.state===State.ENDED&&this.resetLoadingState()}
3761resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=State.IDLE}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const r=this.levels?this.levels[e].details:null;r!=null&&r.live?(this.startPosition=-1,this.setStartPosition(r,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){var r;this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded((r=this.levelLastLoaded)!=null?r:e.level),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,r,s,o){var d;const L=s.details;if(!L){this.warn("level.details undefined");return}if(Object.keys(e.elementaryStreams).reduce((Mt,er)=>{const tr=e.elementaryStreams[er];if(tr){const ir=tr.endPTS-tr.startPTS;if(ir<=0)return this.warn(`Could not parse fragment ${e.sn} ${er} duration reliably (${ir})`),Mt||!1;const rr=o?0:updateFragPTSDTS(L,e,tr.startPTS,tr.endPTS,tr.startDTS,tr.endDTS);return this.hls.trigger(Events.LEVEL_PTS_UPDATED,{details:L,level:s,drift:rr,type:er,frag:e,start:tr.startPTS,end:tr.endPTS}),!0}return Mt},!1))s.fragmentError=0;else if(((d=this.transmuxer)==null?void 0:d.error)===null){const Mt=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(s.fragmentError===0&&(s.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(Mt.message),this.hls.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,error:Mt,frag:e,reason:`Found no media in msn ${e.sn} of level "${s.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=State.PARSED,this.hls.trigger(Events.FRAG_PARSED,{frag:e,part:r})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){if(e.event==="demuxerWorker"){var r,s,o;this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded((r=(s=this.levelLastLoaded)!=null?s:(o=this.fragCurrent)==null?void 0:o.level)!=null?r:0),this.resetLoadingState()}}set state(e){const r=this._state;r!==e&&(this._state=e,this.log(`${r}->${e}`))}get state(){return this._state}}function getSourceBuffer(){return self.SourceBuffer||self.WebKitSourceBuffer}function isSupported(){const t=getMediaSource();if(!t)return!1;const e=getSourceBuffer(),r=t&&typeof t.isTypeSupported=="function"&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),s=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!r&&!!s}function changeTypeSupported(){var t;const e=getSourceBuffer();return typeof(e==null||(t=e.prototype)==null?void 0:t.changeType)=="function"}function hasUMDWorker(){return typeof __HLS_WORKER_BUNDLE__=="function"}function injectWorker(){const t=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),e=self.URL.createObjectURL(t);return{worker:new self.Worker(e),objectURL:e}}function loadWorker(t){const e=new self.URL(t,self.location.href).href;return{worker:new self.Worker(e),scriptURL:e}}function dummyTrack(t="",e=9e4){return{type:t,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class BaseAudioDemuxer{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,r,s,o){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,r){return!1}appendFrame(e,r,s){}demux(e,r){this.cachedData&&(e=appendUint8Array(this.cachedData,e),this.cachedData=null);let s=getID3Data(e,0),o=s?s.length:0,d;const L=this._audioTrack,ge=this._id3Track,Mt=s?getTimeStamp(s):void 0,er=e.length;for((this.basePTS===null||this.frameIndex===0&&isFiniteNumber(Mt))&&(this.basePTS=initPTSFn(Mt,r,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),s&&s.length>0&&ge.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});o<er;){if(this.canParse(e,o)){const tr=this.appendFrame(L,e,o);tr?(this.frameIndex++,this.lastPTS=tr.sample.pts,o+=tr.length,d=o):o=er}else canParse$2(e,o)?(s=getID3Data(e,o),ge.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY}),o+=s.length,d=o):o++;if(o===er&&d!==er){const tr=sliceUint8(e,d);this.cachedData?this.cachedData=appendUint8Array(this.cachedData,tr):this.cachedData=tr}}return{audioTrack:L,videoTrack:dummyTrack(),id3Track:ge,textTrack:dummyTrack()}}demuxSampleAes(e,r,s){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const r=this.cachedData;return r&&(this.cachedData=null,this.demux(r,0)),{audioTrack:this._audioTrack,videoTrack:dummyTrack(),id3Track:this._id3Track,textTrack:dummyTrack()}}destroy(){}}const initPTSFn=(t,e,r)=>{if(isFiniteNumber(t))return t*90;const s=r?r.baseTime*9e4/r.timescale:0;return e*9e4+s};function getAudioConfig(t,e,r,s){let o,d,L,ge;const Mt=navigator.userAgent.toLowerCase(),er=s,tr=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];o=((e[r+2]&192)>>>6)+1;const ir=(e[r+2]&60)>>>2;if(ir>tr.length-1){t.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:`invali
3761d ADTS sampling index:${ir}`});return}return L=(e[r+2]&1)<<2,L|=(e[r+3]&192)>>>6,logger.log(`manifest codec:${s}, ADTS type:${o}, samplingIndex:${ir}`),/firefox/i.test(Mt)?ir>=6?(o=5,ge=new Array(4),d=ir-3):(o=2,ge=new Array(2),d=ir):Mt.indexOf("android")!==-1?(o=2,ge=new Array(2),d=ir):(o=5,ge=new Array(4),s&&(s.indexOf("mp4a.40.29")!==-1||s.indexOf("mp4a.40.5")!==-1)||!s&&ir>=6?d=ir-3:((s&&s.indexOf("mp4a.40.2")!==-1&&(ir>=6&&L===1||/vivaldi/i.test(Mt))||!s&&L===1)&&(o=2,ge=new Array(2)),d=ir)),ge[0]=o<<3,ge[0]|=(ir&14)>>1,ge[1]|=(ir&1)<<7,ge[1]|=L<<3,o===5&&(ge[1]|=(d&14)>>1,ge[2]=(d&1)<<7,ge[2]|=8,ge[3]=0),{config:ge,samplerate:tr[ir],channelCount:L,codec:"mp4a.40."+o,manifestCodec:er}}function isHeaderPattern$1(t,e){return t[e]===255&&(t[e+1]&246)===240}function getHeaderLength(t,e){return t[e+1]&1?7:9}function getFullFrameLength(t,e){return(t[e+3]&3)<<11|t[e+4]<<3|(t[e+5]&224)>>>5}function canGetFrameLength(t,e){return e+5<t.length}function isHeader$1(t,e){return e+1<t.length&&isHeaderPattern$1(t,e)}function canParse$1(t,e){return canGetFrameLength(t,e)&&isHeaderPattern$1(t,e)&&getFullFrameLength(t,e)<=t.length-e}function probe$1(t,e){if(isHeader$1(t,e)){const r=getHeaderLength(t,e);if(e+r>=t.length)return!1;const s=getFullFrameLength(t,e);if(s<=r)return!1;const o=e+s;return o===t.length||isHeader$1(t,o)}return!1}function initTrackConfig(t,e,r,s,o){if(!t.samplerate){const d=getAudioConfig(e,r,s,o);if(!d)return;t.config=d.config,t.samplerate=d.samplerate,t.channelCount=d.channelCount,t.codec=d.codec,t.manifestCodec=d.manifestCodec,logger.log(`parsed codec:${t.codec}, rate:${d.samplerate}, channels:${d.channelCount}`)}}function getFrameDuration(t){return 1024*9e4/t}function parseFrameHeader(t,e){const r=getHeaderLength(t,e);if(e+r<=t.length){const s=getFullFrameLength(t,e)-r;if(s>0)return{headerLength:r,frameLength:s}}}function appendFrame$1(t,e,r,s,o){const d=getFrameDuration(t.samplerate),L=s+o*d,ge=parseFrameHeader(e,r);let Mt;if(ge){const{frameLength:ir,headerLength:rr}=ge,nr=rr+ir,ar=Math.max(0,r+nr-e.length);ar?(Mt=new Uint8Array(nr-rr),Mt.set(e.subarray(r+rr,e.length),0)):Mt=e.subarray(r+rr,r+nr);const sr={unit:Mt,pts:L};return ar||t.samples.push(sr),{sample:sr,length:nr,missing:ar}}const er=e.length-r;return Mt=new Uint8Array(er),Mt.set(e.subarray(r,e.length),0),{sample:{unit:Mt,pts:L},length:er,missing:-1}}class AACDemuxer extends BaseAudioDemuxer{constructor(e,r){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=r}resetInitSegment(e,r,s,o){super.resetInitSegment(e,r,s,o),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:r,duration:o,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;let s=(getID3Data(e,0)||[]).length;for(let o=e.length;s<o;s++)if(probe$1(e,s))return logger.log("ADTS sync word found !"),!0;return!1}canParse(e,r){return canParse$1(e,r)}appendFrame(e,r,s){initTrackConfig(e,this.observer,r,s,e.manifestCodec);const o=appendFrame$1(e,r,s,this.basePTS,this.frameIndex);if(o&&o.missing===0)return o}}const emsgSchemePattern=/\/emsg[-/]ID3/i;class MP4Demuxer{constructor(e,r){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=r}resetTimeStamp(){}resetInitSegment(e,r,s,o){const d=this.videoTrack=dummyTrack("video",1),L=this.audioTrack=dummyTrack("audio",1),ge=this.txtTrack=dummyTrack("text",1);if(this.id3Track=dummyTrack("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const Mt=parseInitSegment(e);if(Mt.video){const{id:er,timescale:tr,codec:ir}=Mt.video;d.id=er,d.timescale=ge.timescale=tr,d.codec=ir}if(Mt.audio){const{id:er,timescale:tr,codec:ir}=Mt.audio;L.id=er,L.timescale=tr,L.codec=ir}ge.id=RemuxerTrackIdConfig.text,d.sampleDuration=0,d.duration=L.duration=o}resetContiguity(){this.remainderData=null}static probe(e){return e=e.length>16384?e.subarray(0,16384):e,findBox(e,["moof"]).length>0}demux(e,r){this.timeOffset=r;let s=e;const o=this.videoTrack,d=this.txtTrack;if(this.config.progressive){this.remainderData&&(s=appendUint8Array(this.remainderData,e));const ge=segmentValidRange(s);this.remainderData=ge.remainder,o.samples=ge.valid||new Uint8Array}else o.samples=s;const L=this.extractID3Track(o,r);return d.samples=parseSamples(r,o),{videoTrack:o,audioTrack:this.audioTrack,id3Track:L,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,r=this.videoTrack,s=this.txtTrack;r.samples=this.remainderData||new Uint8Array,this.remainderData=null;const o=this.extractID3Track(r,this.timeOffset);return s.samples=parseSamples(e,r),{videoTrack:r,audioTrack:dummyTrack(),id3Track:o,textTrack:dummyTrack()}}extractID3Track(e,r){const s=this.id3Track;if(e.samples.length){const o=findBox(e.samples,["emsg"]);o&&o.forEach(d=>{const L=parseEmsg(d);if(emsgSchemePattern.test(L.schemeIdUri)){const ge=isFiniteNumber(L.presentationTime)?L.presentationTime/L.timeScale:r+L.presentationTimeDelta/L.timeScale;let Mt=L.eventDuration===4294967295?Number.POSITIVE_INFINITY:L.eventDuration/L.timeScale;Mt<=.001&&(Mt=Number.POSITIVE_INFINITY);const er=L.payload;s.samples.push({data:er,len:er.byteLength,dts:ge,pts:ge,type:MetadataSchema.emsg,duration:Mt})}})}return s}demuxSampleAes(e,r,s){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}let chromeVersion$1=null;const BitratesMap=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot=[0,1,1,4];function appendFrame(t,e,r,s,o){if(r+24>e.length)return;const d=parseHeader(e,r);if(d&&r+d.frameLength<=e.length){const L=d.samplesPerFrame*9e4/d.sampleRate,ge=s+o*L,Mt={unit:e.subarray(r,r+d.frameLength),pts:ge,dts:ge};return t.config=[],t.channelCount=d.channelCount,t.samplerate=d.sampleRate,t.samples.push(Mt),{sample:Mt,length:d.frameLength,missing:0}}}function parseHeader(t,e){const r=t[e+1]>>
vendor: 11,066 bytes, line 3761
37613&3,s=t[e+1]>>1&3,o=t[e+2]>>4&15,d=t[e+2]>>2&3;if(r!==1&&o!==0&&o!==15&&d!==3){const L=t[e+2]>>1&1,ge=t[e+3]>>6,Mt=r===3?3-s:s===3?3:4,er=BitratesMap[Mt*14+o-1]*1e3,ir=SamplingRateMap[(r===3?0:r===2?1:2)*3+d],rr=ge===3?1:2,nr=SamplesCoefficients[r][s],ar=BytesInSlot[s],sr=nr*8*ar,lr=Math.floor(nr*er/ir+L)*ar;if(chromeVersion$1===null){const or=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);chromeVersion$1=or?parseInt(or[1]):0}return!!chromeVersion$1&&chromeVersion$1<=87&&s===2&&er>=224e3&&ge===0&&(t[e+3]=t[e+3]|128),{sampleRate:ir,channelCount:rr,frameLength:lr,samplesPerFrame:sr}}}function isHeaderPattern(t,e){return t[e]===255&&(t[e+1]&224)===224&&(t[e+1]&6)!==0}function isHeader(t,e){return e+1<t.length&&isHeaderPattern(t,e)}function canParse(t,e){return isHeaderPattern(t,e)&&4<=t.length-e}function probe(t,e){if(e+1<t.length&&isHeaderPattern(t,e)){const s=parseHeader(t,e);let o=4;s!=null&&s.frameLength&&(o=s.frameLength);const d=e+o;return d===t.length||isHeader(t,d)}return!1}class ExpGolomb{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,r=this.bytesAvailable,s=e.byteLength-r,o=new Uint8Array(4),d=Math.min(4,r);if(d===0)throw new Error("no bytes available");o.set(e.subarray(s,s+d)),this.word=new DataView(o.buffer).getUint32(0),this.bitsAvailable=d*8,this.bytesAvailable-=d}skipBits(e){let r;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,r=e>>3,e-=r<<3,this.bytesAvailable-=r,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let r=Math.min(this.bitsAvailable,e);const s=this.word>>>32-r;if(e>32&&logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=r,this.bitsAvailable>0)this.word<<=r;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return r=e-r,r>0&&this.bitsAvailable?s<<r|this.readBits(r):s}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let r=8,s=8,o;for(let d=0;d<e;d++)s!==0&&(o=this.readEG(),s=(r+o+256)%256),r=s===0?r:s}readSPS(){let e=0,r=0,s=0,o=0,d,L,ge;const Mt=this.readUByte.bind(this),er=this.readBits.bind(this),tr=this.readUEG.bind(this),ir=this.readBoolean.bind(this),rr=this.skipBits.bind(this),nr=this.skipEG.bind(this),ar=this.skipUEG.bind(this),sr=this.skipScalingList.bind(this);Mt();const lr=Mt();if(er(5),rr(3),Mt(),ar(),lr===100||lr===110||lr===122||lr===244||lr===44||lr===83||lr===86||lr===118||lr===128){const pr=tr();if(pr===3&&rr(1),ar(),ar(),rr(1),ir())for(L=pr!==3?8:12,ge=0;ge<L;ge++)ir()&&(ge<6?sr(16):sr(64))}ar();const cr=tr();if(cr===0)tr();else if(cr===1)for(rr(1),nr(),nr(),d=tr(),ge=0;ge<d;ge++)nr();ar(),rr(1);const ur=tr(),or=tr(),dr=er(1);dr===0&&rr(1),rr(1),ir()&&(e=tr(),r=tr(),s=tr(),o=tr());let hr=[1,1];if(ir()&&ir())switch(Mt()){case 1:hr=[1,1];break;case 2:hr=[12,11];break;case 3:hr=[10,11];break;case 4:hr=[16,11];break;case 5:hr=[40,33];break;case 6:hr=[24,11];break;case 7:hr=[20,11];break;case 8:hr=[32,11];break;case 9:hr=[80,33];break;case 10:hr=[18,11];break;case 11:hr=[15,11];break;case 12:hr=[64,33];break;case 13:hr=[160,99];break;case 14:hr=[4,3];break;case 15:hr=[3,2];break;case 16:hr=[2,1];break;case 255:{hr=[Mt()<<8|Mt(),Mt()<<8|Mt()];break}}return{width:Math.ceil((ur+1)*16-e*2-r*2),height:(2-dr)*(or+1)*16-(dr?2:4)*(s+o),pixelRatio:hr}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class SampleAesDecrypter{constructor(e,r,s){this.keyData=void 0,this.decrypter=void 0,this.keyData=s,this.decrypter=new Decrypter(r,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,r,s){const o=e[r].unit;if(o.length<=16)return;const d=o.subarray(16,o.length-o.length%16),L=d.buffer.slice(d.byteOffset,d.byteOffset+d.length);this.decryptBuffer(L).then(ge=>{const Mt=new Uint8Array(ge);o.set(Mt,16),this.decrypter.isSync()||this.decryptAacSamples(e,r+1,s)})}decryptAacSamples(e,r,s){for(;;r++){if(r>=e.length){s();return}if(!(e[r].unit.length<32)&&(this.decryptAacSample(e,r,s),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const r=Math.floor((e.length-48)/160)*16+16,s=new Int8Array(r);let o=0;for(let d=32;d<e.length-16;d+=160,o+=16)s.set(e.subarray(d,d+16),o);return s}getAvcDecryptedUnit(e,r){const s=new Uint8Array(r);let o=0;for(let d=32;d<e.length-16;d+=160,o+=16)e.set(s.subarray(o,o+16),d);return e}decryptAvcSample(e,r,s,o,d){const L=discardEPB(d.data),ge=this.getAvcEncryptedData(L);this.decryptBuffer(ge.buffer).then(Mt=>{d.data=this.getAvcDecryptedUnit(L,Mt),this.decrypter.isSync()||this.decryptAvcSamples(e,r,s+1,o)})}decryptAvcSamples(e,r,s,o){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,s=0){if(r>=e.length){o();return}const d=e[r].units;for(;!(s>=d.length);s++){const L=d[s];if(!(L.data.length<=48||L.type!==1&&L.type!==5)&&(this.decryptAvcSample(e,r,s,o,L),!this.decrypter.isSync()))return}}}}const PACKET_LENGTH=188;class TSDemuxer{constructor(e,r,s){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._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=r,this.typeSupported=s}static probe(e){const r=TSDemuxer.syncOffset(e);return r>0&&logger.warn(`MPEG2-TS detected but first sync word found @ offset ${r}`),r!==-1}static syncOffset(e){const r=e.length;let s=Math.min(PACKET_LENGTH*5,e.length-PACKET_LENGTH)+1,o=0;for(;o<s;){let d=!1,L=-1,ge=0;for(let Mt=o;Mt<r;Mt+=PACKET_LENGTH)if(e[Mt]===71){if(ge++,L===-1&&(L=Mt,L!==0&&(s=Math.min(L+PACKET_LENGTH*99,e.length-PACKET_LENGTH)+1)),d||(d=parsePID(e,Mt)===0),d&&ge>1&&(L===0&&ge>2||Mt+PACKET_LENGTH>s))return L}else{if(ge)return-1;break}o++}return-1}static createTrack(e,r){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:RemuxerTrackIdConfig[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?r:void 0}}resetInitSegment(e,r,s,o){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=TSDemuxer.createTrack("video"),this._audioTrack=TSDemuxer.createTrack("audio",o),this._id3Track=TSDemuxer.createTrack("id3"),this._txtTrack=TSDemuxer.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=r,this.videoCodec=s,this._duration=o}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_avcTrack:r,_id3Track:s}=this;e&&(e.pesData=null),r&&(r.pesData=null),s&&(s.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null}demux(e,r,s=!1,o=!1){s||(this.sampleAes=null);let d;const L=this._avcTrack,ge=this._audioTrack,Mt=this._id3Track,er=this._txtTrack;let tr=L.pid,ir=L.pesData,rr=ge.pid,nr=Mt.pid,ar=ge.pesData,sr=Mt.pesData,lr=null,cr=this.pmtParsed,ur=this._pmtId,or=e.length;if(this.remainderData&&(e=appendUint8Array(this.remainderData,e),or=e.length,this.remainderData=null),or<PACKET_LENGTH&&!o)return this.remainderData=e,{audioTrack:ge,videoTrack:L,id3Track:Mt,textTrack:er};const dr=Math.max(0,TSDemuxer.syncOffset(e));or-=(or-dr)%PACKET_LENGTH,or<e.byteLength&&!o&&(this.remainderData=new Uint8Array(e.buffer,or,e.buffer.byteLength-or));let hr=0;for(let mr=dr;mr<or;mr+=PACKET_LENGTH)if(e[mr]===71){const vr=!!(e[mr+1]&64),Er=parsePID(e,mr),Cr=(e[mr+3]&48)>>4;let Pr;if(Cr>1){if(Pr=mr+5+e[mr+4],Pr===mr+PACKET_LENGTH)continue}else Pr=mr+4;switch(Er){case tr:vr&&(ir&&(d=parsePES(ir))&&this.parseAVCPES(L,er,d,!1),ir={data:[],size:0}),ir&&(ir.data.push(e.subarray(Pr,mr+PACKET_LENGTH)),ir.size+=mr+PACKET_LENGTH-Pr);break;case rr:if(vr){if(ar&&(d=parsePES(ar)))switch(ge.segmentCodec){case"aac":this.parseAACPES(ge,d);break;case"mp3":this.parseMPEGPES(ge,d);break}ar={data:[],size:0}}ar&&(ar.data.push(e.subarray(Pr,mr+PACKET_LENGTH)),ar.size+=mr+PACKET_LENGTH-Pr);break;case nr:vr&&(sr&&(d=parsePES(sr))&&this.parseID3PES(Mt,d),sr={data:[],size:0}),sr&&(sr.data.push(e.subarray(Pr,mr+PACKET_LENGTH)),sr.size+=mr+PACKET_LENGTH-Pr);break;case 0:vr&&(Pr+=e[Pr]+1),ur=this._pmtId=parsePAT(e,Pr);break;case ur:{vr&&(Pr+=e[Pr]+1);const kr=parsePMT(e,Pr,this.typeSupported,s);tr=kr.avc,tr>0&&(L.pid=tr),rr=kr.audio,rr>0&&(ge.pid=rr,ge.segmentCodec=kr.segmentCodec),nr=kr.id3,nr>0&&(Mt.pid=nr),lr!==null&&!cr&&(logger.warn(`MPEG-TS PMT found at ${mr} after unknown PID '${lr}'. Backtracking to sync byte @${dr} to parse all TS packets.`),lr=null,mr=dr-188),cr=this.pmtParsed=!0;break}case 17:case 8191:break;default:lr=Er;break}}else hr++;if(hr>0){const mr=new Error(`Found ${hr} TS packet/s that do not start with 0x47`);this.observer.emit(Events.ERROR,Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,error:mr,reason:mr.message})}L.pesData=ir,ge.pesData=ar,Mt.pesData=sr;const pr={audioTrack:ge,videoTrack:L,id3Track:Mt,textTrack:er};return o&&this.extractRemainingSamples(pr),pr}flush(){const{remainderData:e}=this;this.remainderData=null;let r;return e?r=this.demux(e,-1,!1,!0):r={videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(r),this.sampleAes?this.decrypt(r,this.sampleAes):r}extractRemainingSamples(e){const{audioTrack:r,videoTrack:s,id3Track:o,textTrack:d}=e,L=s.pesData,ge=r.pesData,Mt=o.pesData;let er;if(L&&(er=parsePES(L))?(this.parseAVCPES(s,d,er,!0),s.pesData=null):s.pesData=L,ge&&(er=parsePES(ge))){switch(r.segmentCodec){case"aac":this.parseAACPES(r,er);break;case"mp3":this.parseMPEGPES(r,er);break}r.pesData=null}else ge!=null&&ge.size&&logger.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=ge;Mt&&(er=parsePES(Mt))?(this.parseID3PES(o,er),o.pesData=null):o.pesData=Mt}demuxSampleAes(e,r,s){const o=this.demux(e,s,!0,!this.config.progressive),d=this.sampleAes=new SampleAesDecrypter(this.observer,this.config,r);return this.decrypt(o,d)}decrypt(e,r){return new Promise(s=>{const{audioTrack:o,videoTrack:d}=e;o.samples&&o.segmentCodec==="aac"?r.decryptAacSamples(o.samples,0,()=>{d.samples?r.decryptAvcSamples(d.samples,0,0,()=>{s(e)}):s(e)}):d.samples&&r.decryptAvcSamples(d.samples,0,0,()=>{s(e)})})}destroy(){this._duration=0}parseAVCPES(e,r,s,o){const d=this.parseAVCNALu(e,s.data);let L=this.avcSample,ge,Mt=!1;
3761s.data=null,L&&d.length&&!e.audFound&&(pushAccessUnit(L,e),L=this.avcSample=createAVCSample(!1,s.pts,s.dts,"")),d.forEach(er=>{var tr;switch(er.type){case 1:{let rr=!1;ge=!0;const nr=er.data;if(Mt&&nr.length>4){const ar=new ExpGolomb(nr).readSliceType();(ar===2||ar===4||ar===7||ar===9)&&(rr=!0)}if(rr){var ir;(ir=L)!=null&&ir.frame&&!L.key&&(pushAccessUnit(L,e),L=this.avcSample=null)}L||(L=this.avcSample=createAVCSample(!0,s.pts,s.dts,"")),L.frame=!0,L.key=rr;break}case 5:ge=!0,(tr=L)!=null&&tr.frame&&!L.key&&(pushAccessUnit(L,e),L=this.avcSample=null),L||(L=this.avcSample=createAVCSample(!0,s.pts,s.dts,"")),L.key=!0,L.frame=!0;break;case 6:{ge=!0,parseSEIMessageFromNALu(er.data,1,s.pts,r.samples);break}case 7:if(ge=!0,Mt=!0,!e.sps){const rr=er.data,ar=new ExpGolomb(rr).readSPS();e.width=ar.width,e.height=ar.height,e.pixelRatio=ar.pixelRatio,e.sps=[rr],e.duration=this._duration;const sr=rr.subarray(1,4);let lr="avc1.";for(let cr=0;cr<3;cr++){let ur=sr[cr].toString(16);ur.length<2&&(ur="0"+ur),lr+=ur}e.codec=lr}break;case 8:ge=!0,e.pps||(e.pps=[er.data]);break;case 9:ge=!1,e.audFound=!0,L&&pushAccessUnit(L,e),L=this.avcSample=createAVCSample(!1,s.pts,s.dts,"");break;case 12:ge=!0;break;default:ge=!1,L&&(L.debug+="unknown NAL "+er.type+" ");break}L&&ge&&L.units.push(er)}),o&&L&&(pushAccessUnit(L,e),this.avcSample=null)}getLastNalUnit(e){var r;let s=this.avcSample,o;if((!s||s.units.length===0)&&(s=e[e.length-1]),(r=s)!=null&&r.units){const d=s.units;o=d[d.length-1]}return o}parseAVCNALu(e,r){const s=r.byteLength;let o=e.naluState||0;const d=o,L=[];let ge=0,Mt,er,tr,ir=-1,rr=0;for(o===-1&&(ir=0,rr=r[0]&31,o=0,ge=1);ge<s;){if(Mt=r[ge++],!o){o=Mt?0:1;continue}if(o===1){o=Mt?0:2;continue}if(!Mt)o=3;else if(Mt===1){if(ir>=0){const nr={data:r.subarray(ir,ge-o-1),type:rr};L.push(nr)}else{const nr=this.getLastNalUnit(e.samples);if(nr&&(d&&ge<=4-d&&nr.state&&(nr.data=nr.data.subarray(0,nr.data.byteLength-d)),er=ge-o-1,er>0)){const ar=new Uint8Array(nr.data.byteLength+er);ar.set(nr.data,0),ar.set(r.subarray(0,er),nr.data.byteLength),nr.data=ar,nr.state=0}}ge<s?(tr=r[ge]&31,ir=ge,rr=tr,o=0):o=-1}else o=0}if(ir>=0&&o>=0){const nr={data:r.subarray(ir,s),type:rr,state:o};L.push(nr)}if(L.length===0){const nr=this.getLastNalUnit(e.samples);if(nr){const ar=new Uint8Array(nr.data.byteLength+r.byteLength);ar.set(nr.data,0),ar.set(r,nr.data.byteLength),nr.data=ar}}return e.naluState=o,L}parseAACPES(e,r){let s=0;const o=this.aacOverFlow;let d=r.data;if(o){this.aacOverFlow=null;const ir=o.missing,rr=o.sample.unit.byteLength;if(ir===-1){const nr=new Uint8Array(rr+d.byteLength);nr.set(o.sample.unit,0),nr.set(d,rr),d=nr}else{const nr=rr-ir;o.sample.unit.set(d.subarray(0,ir),nr),e.samples.push(o.sample),s=o.missing}}let L,ge;for(L=s,ge=d.length;
vendor: 40,595 bytes, lines 3761-3767
3761L<ge-1&&!isHeader$1(d,L);L++);if(L!==s){let ir;const rr=L<ge-1;rr?ir=`AAC PES did not start with ADTS header,offset:${L}`:ir="No ADTS header found in AAC PES";const nr=new Error(ir);if(logger.warn(`parsing error: ${ir}`),this.observer.emit(Events.ERROR,Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,levelRetry:rr,error:nr,reason:ir}),!rr)return}initTrackConfig(e,this.observer,d,L,this.audioCodec);let Mt;if(r.pts!==void 0)Mt=r.pts;else if(o){const ir=getFrameDuration(e.samplerate);Mt=o.sample.pts+ir}else{logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let er=0,tr;for(;L<ge;)if(tr=appendFrame$1(e,d,L,Mt,er),L+=tr.length,tr.missing){this.aacOverFlow=tr;break}else for(er++;L<ge-1&&!isHeader$1(d,L);L++);}parseMPEGPES(e,r){const s=r.data,o=s.length;let d=0,L=0;const ge=r.pts;if(ge===void 0){logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;L<o;)if(isHeader(s,L)){const Mt=appendFrame(e,s,L,ge,d);if(Mt)L+=Mt.length,d++;else break}else L++}parseID3PES(e,r){if(r.pts===void 0){logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const s=_extends({},r,{type:this._avcTrack?MetadataSchema.emsg:MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(s)}}function createAVCSample(t,e,r,s){return{key:t,frame:!1,pts:e,dts:r,units:[],debug:s,length:0}}function parsePID(t,e){return((t[e+1]&31)<<8)+t[e+2]}function parsePAT(t,e){return(t[e+10]&31)<<8|t[e+11]}function parsePMT(t,e,r,s){const o={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},d=(t[e+1]&15)<<8|t[e+2],L=e+3+d-4,ge=(t[e+10]&15)<<8|t[e+11];for(e+=12+ge;e<L;){const Mt=parsePID(t,e);switch(t[e]){case 207:if(!s){logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:o.audio===-1&&(o.audio=Mt);break;case 21:o.id3===-1&&(o.id3=Mt);break;case 219:if(!s){logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:o.avc===-1&&(o.avc=Mt);break;case 3:case 4:r.mpeg!==!0&&r.mp3!==!0?logger.log("MPEG audio found, not supported in this browser"):o.audio===-1&&(o.audio=Mt,o.segmentCodec="mp3");break;case 36:logger.warn("Unsupported HEVC stream type found");break}e+=((t[e+3]&15)<<8|t[e+4])+5}return o}function parsePES(t){let e=0,r,s,o,d,L;const ge=t.data;if(!t||t.size===0)return null;for(;ge[0].length<19&&ge.length>1;){const er=new Uint8Array(ge[0].length+ge[1].length);er.set(ge[0]),er.set(ge[1],ge[0].length),ge[0]=er,ge.splice(1,1)}if(r=ge[0],(r[0]<<16)+(r[1]<<8)+r[2]===1){if(s=(r[4]<<8)+r[5],s&&s>t.size-6)return null;const er=r[7];er&192&&(d=(r[9]&14)*536870912+(r[10]&255)*4194304+(r[11]&254)*16384+(r[12]&255)*128+(r[13]&254)/2,er&64?(L=(r[14]&14)*536870912+(r[15]&255)*4194304+(r[16]&254)*16384+(r[17]&255)*128+(r[18]&254)/2,d-L>60*9e4&&(logger.warn(`${Math.round((d-L)/9e4)}s delta between PTS and DTS, align them`),d=L)):L=d),o=r[8];let tr=o+9;if(t.size<=tr)return null;t.size-=tr;const ir=new Uint8Array(t.size);for(let rr=0,nr=ge.length;rr<nr;rr++){r=ge[rr];let ar=r.byteLength;if(tr)if(tr>ar){tr-=ar;continue}else r=r.subarray(tr),ar-=tr,tr=0;ir.set(r,e),e+=ar}return s&&(s-=o+3),{data:ir,pts:d,dts:L,len:s}}return null}function pushAccessUnit(t,e){if(t.units.length&&t.frame){if(t.pts===void 0){const r=e.samples,s=r.length;if(s){const o=r[s-1];t.pts=o.pts,t.dts=o.dts}else{e.dropped++;return}}e.samples.push(t)}t.debug.length&&logger.log(t.pts+"/"+t.dts+":"+t.debug)}class MP3Demuxer extends BaseAudioDemuxer{resetInitSegment(e,r,s,o){super.resetInitSegment(e,r,s,o),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:r,duration:o,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;let s=(getID3Data(e,0)||[]).length;for(let o=e.length;s<o;s++)if(probe(e,s))return logger.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,r){return canParse(e,r)}appendFrame(e,r,s){if(this.basePTS!==null)return appendFrame(e,r,s,this.basePTS,this.frameIndex)}}class AAC{static getSilentFrame(e,r){switch(e){case"mp4a.40.2":if(r===1)return new Uint8Array([0,200,0,128,35,128]);if(r===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(r===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(r===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(r===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(r===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(r===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(r===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(r===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const UINT32_MAX=Math.pow(2,32)-1;class MP4{static init(){MP4.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in MP4.types)MP4.types.hasOwnProperty(e)&&(MP4.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const r=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]);MP4.HDLR_TYPES={video:r,audio:s};const o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),d=new Uint8Array([0,0,0,0,0,0,0,0]);MP4.STTS=MP4.STSC=MP4.STCO=d,MP4.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),MP4.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),MP4.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),MP4.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const L=new Uint8Array([105,115,111,109]),ge=new Uint8Array([97,118,99,49]),Mt=new Uint8Array([0,0,0,1]);MP4.FTYP=MP4.box(MP4.types.ftyp,L,Mt,L,ge),MP4.DINF=MP4.box(MP4.types.dinf,MP4.box(MP4.types.dref,o))}static box(e,...r){let s=8,o=r.length;const d=o;for(;o--;)s+=r[o].byteLength;const L=new Uint8Array(s);for(L[0]=s>>24&255,L[1]=s>>16&255,L[2]=s>>8&255,L[3]=s&255,L.set(e,4),o=0,s=8;o<d;o++)L.set(r[o],s),s+=r[o].byteLength;return L}static hdlr(e){return MP4.box(MP4.types.hdlr,MP4.HDLR_TYPES[e])}static mdat(e){return MP4.box(MP4.types.mdat,e)}static mdhd(e,r){r*=e;const s=Math.floor(r/(UINT32_MAX+1)),o=Math.floor(r%(UINT32_MAX+1));return MP4.box(MP4.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,e&255,s>>24,s>>16&255,s>>8&255,s&255,o>>24,o>>16&255,o>>8&255,o&255,85,196,0,0]))}static mdia(e){return MP4.box(MP4.types.mdia,MP4.mdhd(e.timescale,e.duration),MP4.hdlr(e.type),MP4.minf(e))}static mfhd(e){return MP4.box(MP4.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255]))}static minf(e){return e.type==="audio"?MP4.box(MP4.types.minf,MP4.box(MP4.types.smhd,MP4.SMHD),MP4.DINF,MP4.stbl(e)):MP4.box(MP4.types.minf,MP4.box(MP4.types.vmhd,MP4.VMHD),MP4.DINF,MP4.stbl(e))}static moof(e,r,s){return MP4.box(MP4.types.moof,MP4.mfhd(e),MP4.traf(s,r))}static moov(e){let r=e.length;const s=[];for(;r--;)s[r]=MP4.trak(e[r]);return MP4.box.apply(null,[MP4.types.moov,MP4.mvhd(e[0].timescale,e[0].duration)].concat(s).concat(MP4.mvex(e)))}static mvex(e){let r=e.length;const s=[];for(;r--;)s[r]=MP4.trex(e[r]);return MP4.box.apply(null,[MP4.types.mvex,...s])}static mvhd(e,r){r*=e;const s=Math.floor(r/(UINT32_MAX+1)),o=Math.floor(r%(UINT32_MAX+1)),d=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,e&255,s>>24,s>>16&255,s>>8&255,s&255,o>>24,o>>16&255,o>>8&255,o&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return MP4.box(MP4.types.mvhd,d)}static sdtp(e){const r=e.samples||[],s=new Uint8Array(4+r.length);let o,d;for(o=0;o<r.length;o++)d=r[o].flags,s[o+4]=d.dependsOn<<4|d.isDependedOn<<2|d.hasRedundancy;return MP4.box(MP4.types.sdtp,s)}static stbl(e){return MP4.box(MP4.types.stbl,MP4.stsd(e),MP4.box(MP4.types.stts,MP4.STTS),MP4.box(MP4.types.stsc,MP4.STSC),MP4.box(MP4.types.stsz,MP4.STSZ),MP4.box(MP4.types.stco,MP4.STCO))}static avc1(e){let r=[],s=[],o,d,L;for(o=0;o<e.sps.length;o++)d=e.sps[o],L=d.byteLength,r.push(L>>>8&255),r.push(L&255),r=r.concat(Array.prototype.slice.call(d));for(o=0;o<e.pps.length;o++)d=e.pps[o],L=d.byteLength,s.push(L>>>8&255),s.push(L&255),s=s.concat(Array.prototype.slice.call(d));const ge=MP4.box(MP4.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|e.sps.length].concat(r).concat([e.pps.length]).concat(s))),Mt=e.width,er=e.height,tr=e.pixelRatio[0],ir=e.pixelRatio[1];return MP4.box(MP4.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,Mt>>8&255,Mt&255,er>>8&255,er&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),ge,MP4.box(MP4.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),MP4.box(MP4.types.pasp,new Uint8Array([tr>>24,tr>>16&255,tr>>8&255,tr&255,ir>>24,ir>>16&255,ir>>8&255,ir&255])))}static esds(e){const r=e.config.length;return new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(e.config).concat([6,1,2]))}static mp4a(e){const r=e.samplerate;return MP4.box(MP4.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]),MP4.box(MP4.types.esds,MP4.esds(e)))}static mp3(e){const r=e.samplerate;return MP4.box(MP4.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?MP4.box(MP4.types.stsd,MP4.STSD,MP4.mp3(e)):MP4.box(MP4.types.stsd,MP4.STSD,MP4.mp4a(e)):MP4.box(MP4.types.stsd,MP4.STSD,MP4.avc1(e))}static tkhd(e){const r=e.id,s=e.duration*e.timescale,o=e.width,d=e.height,L=Math.floor(s/(UINT32_MAX+1)),ge=Math.floor(s%(UINT32_MAX+1));return MP4.box(MP4.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,r&255,0,0,0,0,L>>24,L>>16&255,L>>8&255,L&255,ge>>24,ge>>16&255,ge>>8&255,ge&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,o>>8&255,o&255,0,0,d>>8&255,d&255,0,0]))}static traf(e,r){const s=MP4.sdtp(e),o=e.id,d=Math.floor(r/(UINT32_MAX+1)),L=Math.floor(r%(UINT32_MAX+1));return MP4.box(MP4.types.traf,MP4.box(MP4.types.tfhd,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255])),MP4.box(MP4.types.tfdt,new Uint8Array([1,0,0,0,d>>24,d>>16&255,d>>8&255,d&255,L>>24,L>>16&255,L>>8&255,L&255])),MP4.trun(e,s.length+16+20+8+16+8+8),s)}static trak(e){return e.duration=e.duration||4294967295,MP4.box(MP4.types.trak,MP4.tkhd(e),MP4.mdia(e))}static trex(e){const r=e.id;return MP4.box(MP4.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,r){const s=e.samples||[],o=s.length,d=12+16*o,L=new Uint8Array(d);let ge,Mt,er,tr,ir,rr;for(r+=8+d,L.set([e.type==="video"?1:0,0,15,1,o>>>24&255,o>>>16&255,o>>>8&255,o&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255],0),ge=0;ge<o;ge++)Mt=s[ge],er=Mt.duration,tr=Mt.size,ir=Mt.flags,rr=Mt.cts,L.set([er>>>24&255,er>>>16&255,er>>>8&255,er&255,tr>>>24&255,tr>>>16&255,tr>>>8&255,tr&255,ir.isLeading<<2|ir.dependsOn,ir.isDependedOn<<6|ir.hasRedundancy<<4|ir.paddingValue<<1|ir.isNonSync,ir.degradPrio&61440,ir.degradPrio&15,rr>>>24&255,rr>>>16&255,rr>>>8&255,rr&255],12+16*ge);return MP4.box(MP4.types.trun,L)}static initSegment(e){MP4.types||MP4.init();const r=MP4.moov(e),s=new Uint8Array(MP4.FTYP.byteLength+r.byteLength);return s.set(MP4.FTYP),s.set(r,MP4.FTYP.byteLength),s}}MP4.types=void 0;MP4.HDLR_TYPES=void 0;MP4.STTS=void 0;MP4.STSC=void 0;MP4.STCO=void 0;MP4.STSZ=void 0;MP4.VMHD=void 0;MP4.SMHD=void 0;MP4.STSD=void 0;MP4.FTYP=void 0;MP4.DINF=void 0;const MPEG_TS_CLOCK_FREQ_HZ=9e4;function toTimescaleFromBase(t,e,r=1,s=!1){const o=t*e*r;return s?Math.round(o):o}function toTimescaleFromScale(t,e,r=1,s=!1){return toTimescaleFromBase(t,e,1/r,s)}function toMsFromMpegTsClock(t,e=!1){return toTimescaleFromBase(t,1e3,1/MPEG_TS_CLOCK_FREQ_HZ,e)}function toMpegTsClockFromTimescale(t,e=1){return toTimescaleFromBase(t,MPEG_TS_CLOCK_FREQ_HZ,1/e)}const MAX_SILENT_FRAME_DURATION=10*1e3,AAC_SAMPLES_PER_FRAME=1024,MPEG_AUDIO_SAMPLE_PER_FRAME=1152;let chromeVersion=null,safariWebkitVersion=null;class MP4Remuxer{constructor(e,r,s,o=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=r,this.typeSupported=s,this.ISGenerated=!1,chromeVersion===null){const L=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);chromeVersion=L?parseInt(L[1]):0}if(safariWebkitVersion===null){const d=navigator.userAgent.match(/Safari\/(\d+)/i);safariWebkitVersion=d?parseInt(d[1]):0}}destroy(){}resetTimeStamp(e){logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1}getVideoStartPts(e){let r=!1;const s=e.reduce((o,d)=>{const L=d.pts-o;return L<-4294967296?(r=!0,normalizePts(o,d.pts)):L>0?o:d.pts},e[0].pts);return r&&logger.debug("PTS rollover detected"),s}remux(e,r,s,o,d,L,ge,Mt){let er,tr,ir,rr,nr,ar,sr=d,lr=d;const cr=e.pid>-1,ur=r.pid>-1,or=r.samples.length,dr=e.samples.length>0,hr=ge&&or>0||or>1;if((!cr||dr)&&(!ur||hr)||this.ISGenerated||ge){this.ISGenerated||(ir=this.generateIS(e,r,d,L));const mr=this.isVideoContiguous;let vr=-1,Er;if(hr&&(vr=findKeyframeIndex(r.samples),!mr&&this.config.forceKeyFrameOnDiscontinuity))if(ar=!0,vr>0){logger.warn(`[mp4-remuxer]: Dropped ${vr} out of ${or} video samples due to a missing keyframe`);const Cr=this.getVideoStartPts(r.samples);r.samples=r.samples.slice(vr),r.dropped+=vr,lr+=(r.samples[0].pts-Cr)/r.inputTimeScale,Er=lr}else vr===-1&&(logger.warn(`[mp4-remuxer]: No keyframe found out of ${or} video samples`),ar=!1);if(this.ISGenerated){if(dr&&hr){const Cr=this.getVideoStartPts(r.samples),kr=(normalizePts(e.samples[0].pts,Cr)-Cr)/r.inputTimeScale;sr+=Math.max(0,kr),lr+=Math.max(0,-kr)}if(dr){if(e.samplerate||(logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),ir=this.generateIS(e,r,d,L)),tr=this.remuxAudio(e,sr,this.isAudioContiguous,L,ur||hr||Mt===PlaylistLevelType.AUDIO?lr:void 0),hr){const Cr=tr?tr.endPTS-tr.startPTS:0;r.inputTimeScale||(logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),ir=this.generateIS(e,r,d,L)),er=this.remuxVideo(r,lr,mr,Cr)}}else hr&&(er=this.remuxVideo(r,lr,mr,0));er&&(er.firstKeyFrame=vr,er.independent=vr!==-1,er.firstKeyFramePTS=Er)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(s.samples.length&&(nr=flushTextTrackMetadataCueSamples(s,d,this._initPTS,this._initDTS)),o.samples.length&&(rr=flushTextTrackUserdataCueSamples(o,d,this._initPTS))),{audio:tr,video:er,initSegment:ir,independent:ar,text:rr,id3:nr}}generateIS(e,r,s,o){const d=e.samples,L=r.samples,ge=this.typeSupported,Mt={},er=this._initPTS;let tr=!er||o,ir="audio/mp4",rr,nr,ar;if(tr&&(rr=nr=1/0),e.config&&d.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":ge.mpeg?(ir="audio/mpeg",e.codec=""):ge.mp3&&(e.codec="mp3");break}Mt.audio={id:"audio",container:ir,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&ge.mpeg?new Uint8Array(0):MP4.initSegment([e]),metadata:{channelCount:e.channelCount}},tr&&(ar=e.inputTimeScale,!er||ar!==er.timescale?rr=nr=d[0].pts-Math.round(ar*s):tr=!1)}if(r.sps&&r.pps&&L.length&&(r.timescale=r.inputTimeScale,Mt.video={id:"main",container:"video/mp4",codec:r.codec,initSegment:MP4.initSegment([r]),metadata:{width:r.width,height:r.height}},tr))if(ar=r.inputTimeScale,!er||ar!==er.timescale){const sr=this.getVideoStartPts(L),lr=Math.round(ar*s);nr=Math.min(nr,normalizePts(L[0].dts,sr)-lr),rr=Math.min(rr,sr-lr)}else tr=!1;if(Object.keys(Mt).length)return this.ISGenerated=!0,tr?(this._initPTS={baseTime:rr,timescale:ar},this._initDTS={baseTime:nr,timescale:ar}):rr=ar=void 0,{tracks:Mt,initPTS:rr,timescale:ar}}remuxVideo(e,r,s,o){const d=e.inputTimeScale,L=e.samples,ge=[],Mt=L.length,er=this._initPTS;let tr=this.nextAvcDts,ir=8,rr=this.videoSampleDuration,nr,ar,sr=Number.POSITIVE_INFINITY,lr=Number.NEGATIVE_INFINITY,cr=!1;if(!s||tr===null){const gr=r*d,_r=L[0].pts-normalizePts(L[0].dts,L[0].pts);tr=gr-_r}const ur=er.baseTime*d/er.timescale;for(let gr=0;gr<Mt;gr++){const _r=L[gr];_r.pts=normalizePts(_r.pts-ur,tr),_r.dts=normalizePts(_r.dts-ur,tr),_r.dts<L[gr>0?gr-1:gr].dts&&(cr=!0)}cr&&L.sort(function(gr,_r){const wr=gr.dts-_r.dts,Ir=gr.pts-_r.pts;return wr||Ir}),nr=L[0].dts,ar=L[L.length-1].dts;const or=ar-nr,dr=or?Math.round(or/(Mt-1)):rr||e.inputTimeScale/30;if(s){const gr=nr-tr,_r=gr>dr,wr=gr<-1;if((_r||wr)&&(_r?logger.warn(`AVC: ${toMsFromMpegTsClock(gr,!0)} ms (${gr}dts) hole between fragments detected, filling it`):logger.warn(`AVC: ${toMsFromMpegTsClock(-gr,!0)} ms (${gr}dts) overlapping between fragments detected`),!wr||tr>=L[0].pts)){nr=tr;const Ir=L[0].pts-gr;L[0].dts=nr,L[0].pts=Ir,logger.log(`Video: First PTS/DTS adjusted: ${toMsFromMpegTsClock(Ir,!0)}/${toMsFromMpegTsClock(nr,!0)}, delta: ${toMsFromMpegTsClock(gr,!0)} ms`)}}nr=Math.max(0,nr);let hr=0,pr=0;for(let gr=0;gr<Mt;gr++){const _r=L[gr],wr=_r.units,Ir=wr.length;let Hr=0;for(let Yr=0;Yr<Ir;Yr++)Hr+=wr[Yr].data.length;pr+=Hr,hr+=Ir,_r.length=Hr,_r.dts=Math.max(_r.dts,nr),sr=Math.min(_r.pts,sr),lr=Math.max(_r.pts,lr)}ar=L[Mt-1].dts;const mr=pr+4*hr+8;let vr;try{vr=new Uint8Array(mr)}catch(gr){this.observer.emit(Events.ERROR,Events.ERROR,{type:ErrorTypes.MUX_ERROR,details:ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,error:gr,bytes:mr,reason:`fail allocating video mdat ${mr}`});return}const Er=new DataView(vr.buffer);Er.setUint32(0,mr),vr.set(MP4.types.mdat,4);let Cr=!1,Pr=Number.POSITIVE_INFINITY,kr=Number.POSITIVE_INFINITY,Mr=Number.NEGATIVE_INFINITY,Ur=Number.NEGATIVE_INFINITY;for(let gr=0;gr<Mt;gr++){const _r=L[gr],wr=_r.units;let Ir=0;for(let Jr=0,xi=wr.length;Jr<xi;Jr++){const di=wr[Jr],Vr=di.data,Zr=di.data.byteLength;Er.setUint32(ir,Zr),ir+=4,vr.set(Vr,ir),ir+=Zr,Ir+=4+Zr}let Hr;if(gr<Mt-1)rr=L[gr+1].dts-_r.dts,Hr=L[gr+1].pts-_r.pts;else{const Jr=this.config,xi=gr>0?_r.dts-L[gr-1].dts:dr;if(Hr=gr>0?_r.pts-L[gr-1].pts:dr,Jr.stretchShortVideoTrack&&this.nextAudioPts!==null){const di=Math.floor(Jr.maxBufferHole*d),Vr=(o?sr+o*d:this.nextAudioPts)-_r.pts;Vr>di?(rr=Vr-xi,rr<0?rr=xi:Cr=!0,logger.log(`[mp4-remuxer]: It is approximately ${Vr/90} ms to the next segment; using duration ${rr/90} ms for the last video frame.`)):rr=xi}else rr=xi}const Yr=Math.round(_r.pts-_r.dts);Pr=Math.min(Pr,rr),Mr=Math.max(Mr,rr),kr=Math.min(kr,Hr),Ur=Math.max(Ur,Hr),ge.push(new Mp4Sample(_r.key,rr,Ir,Yr))}if(ge.length){if(chromeVersion){if(chromeVersion<70){const gr=ge[0].flags;gr.dependsOn=2,gr.isNonSync=0}}else if(safariWebkitVersion&&Ur-kr<Mr-Pr&&dr/Mr<.025&&ge[0].cts===0){logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let gr=nr;for(let _r=0,wr=ge.length;_r<wr;_r++){const Ir=gr+ge[_r].duration,Hr=gr+ge[_r].cts;if(_r<wr-1){const Yr=Ir+ge[_r+1].cts;ge[_r].duration=Yr-Hr}else ge[_r].duration=_r?ge[_r-1].duration:dr;ge[_r].cts=0,gr=Ir}}}rr=Cr||!rr?dr:rr,this.nextAvcDts=tr=ar+rr,this.videoSampleDuration=rr,this.isVideoContiguous=!0;const xr={data1:MP4.moof(e.sequenceNumber++,nr,_extends({},e,{samples:ge})),data2:vr,startPTS:sr/d,endPTS:(lr+rr)/d,startDTS:nr/d,endDTS:tr/d,type:"video",hasAudio:!1,hasVideo:!0,nb:ge.length,dropped:e.dropped};return e.samples=[],e.dropped=0,xr}remuxAudio(e,r,s,o,d){const L=e.inputTimeScale,ge=e.samplerate?e.samplerate:L,Mt=L/ge,er=e.segmentCodec==="aac"?AAC_SAMPLES_PER_FRAME:MPEG_AUDIO_SAMPLE_PER_FRAME,tr=er*Mt,ir=this._initPTS,rr=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,nr=[],ar=d!==void 0;let sr=e.samples,lr=rr?0:8,cr=this.nextAudioPts||-1;const ur=r*L,or=ir.baseTime*L/ir.timescale;if(this.isAudioContiguous=s=s||sr.length&&cr>0&&(o&&Math.abs(ur-cr)<9e3||Math.abs(normalizePts(sr[0].pts-or,ur)-cr)<20*tr),sr.forEach(function(yr){yr.pts=normalizePts(yr.pts-or,ur)}),!s||cr<0){if(sr=sr.filter(yr=>yr.pts>=0),!sr.length)return;d===0?cr=0:o&&!ar?cr=Math.max(0,ur):cr=sr[0].pts}if(e.segmentCodec==="aac"){const yr=this.config.maxAudioFramesDrift;for(let xr=0,gr=cr;xr<sr.length;xr++){const _r=sr[xr],wr=_r.pts,Ir=wr-gr,Hr=Math.abs(1e3*Ir/L);if(Ir<=-yr*tr&&ar)xr===0&&(logger.warn(`Audio frame @ ${(wr/L).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Ir/L)} ms.`),this.nextAudioPts=cr=gr=wr);else if(Ir>=yr*tr&&Hr<MAX_SILENT_FRAME_DURATION&&ar){let Yr=Math.round(Ir/tr);gr=wr-Yr*tr,gr<0&&(Yr--,gr+=tr),xr===0&&(this.nextAudioPts=cr=gr),logger.warn(`[mp4-remuxer]: Injecting ${Yr} audio frame @ ${(gr/L).toFixed(3)}s due to ${Math.round(1e3*Ir/L)} ms gap.`);for(let Jr=0;Jr<Yr;Jr++){const xi=Math.max(gr,0);let di=AAC.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);di||(logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),di=_r.unit.subarray()),sr.splice(xr,0,{unit:di,pts:xi}),gr+=tr,xr++}}_r.pts=gr,gr+=tr}}let dr=null,hr=null,pr,mr=0,vr=sr.length;for(;vr--;)mr+=sr[vr].unit.byteLength;for(let yr=0,xr=sr.length;yr<xr;yr++){const gr=sr[yr],_r=gr.unit;let wr=gr.pts;if(hr!==null){const Hr=nr[yr-1];Hr.duration=Math.round((wr-hr)/Mt)}else if(s&&e.segmentCodec==="aac"&&(wr=cr),dr=wr,mr>0){mr+=lr;try{pr=new Uint8Array(mr)}catch(Hr){this.observer.emit(Events.ERROR,Events.ERROR,{type:ErrorTypes.MUX_ERROR,details:ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,error:Hr,bytes:mr,reason:`fail allocating audio mdat ${mr}`});return}rr||(new DataView(pr.buffer).setUint32(0,mr),pr.set(MP4.types.mdat,4))}else return;pr.set(_r,lr);const Ir=_r.byteLength;lr+=Ir,nr.push(new Mp4Sample(!0,er,Ir,0)),hr=wr}const Er=nr.length;if(!Er)return;const Cr=nr[nr.length-1];this.nextAudioPts=cr=hr+Mt*Cr.duration;const Pr=rr?new Uint8Array(0):MP4.moof(e.sequenceNumber++,dr/Mt,_extends({},e,{samples:nr}));e.samples=[];const kr=dr/L,Mr=cr/L,$r={data1:Pr,data2:pr,startPTS:kr,endPTS:Mr,startDTS:kr,endDTS:Mr,type:"audio",hasAudio:!0,hasVideo:!1,nb:Er};return this.isAudioContiguous=!0,$r}remuxEmptyAudio(e,r,s,o){const d=e.inputTimeScale,L=e.samplerate?e.samplerate:d,ge=d/L,Mt=this.nextAudioPts,er=this._initDTS,tr=er.baseTime*9e4/er.timescale,ir=(Mt!==null?Mt:o.startDTS*d)+tr,rr=o.endDTS*d+tr,nr=ge*AAC_SAMPLES_PER_FRAME,ar=Math.ceil((rr-ir)/nr),sr=AAC.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(logger.warn("[mp4-remuxer]: remux empty Audio"),!sr){logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const lr=[];for(let cr=0;cr<ar;cr++){const ur=ir+cr*nr;lr.push({unit:sr,pts:ur,dts:ur})}return e.samples=lr,this.remuxAudio(e,r,s,!1)}}function normalizePts(t,e){let r;if(e===null)return t;for(e<t?r=-8589934592:r=8589934592;Math.abs(t-e)>4294967296;)t+=r;return t}function findKeyframeIndex(t){for(let e=0;e<t.length;e++)if(t[e].key)return e;return-1}function flushTextTrackMetadataCueSamples(t,e,r,s){const o=t.samples.length;if(!o)return;const d=t.inputTimeScale;for(let ge=0;ge<o;ge++){const Mt=t.samples[ge];Mt.pts=normalizePts(Mt.pts-r.baseTime*d/r.timescale,e*d)/d,Mt.dts=normalizePts(Mt.dts-s.baseTime*d/s.timescale,e*d)/d}const L=t.samples;return t.samples=[],{samples:L}}function flushTextTrackUserdataCueSamples(t,e,r){const s=t.samples.length;if(!s)return;const o=t.inputTimeScale;for(let L=0;L<s;L++){const ge=t.samples[L];ge.pts=normalizePts(ge.pts-r.baseTime*o/r.timescale,e*o)/o}t.samples.sort((L,ge)=>L.pts-ge.pts);const d=t.samples;return t.samples=[],{samples:d}}class Mp4Sample{constructor(e,r,s,o){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=r,this.size=s,this.cts=o,this.flags=new Mp4SampleFlags(e)}}class Mp4SampleFlags{constructor(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}}class PassThroughRemuxer{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,r,s,o){this.audioCodec=r,this.videoCodec=s,this.generateInitSegment(patchEncyptionData(e,o)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:r,videoCodec:s}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const o=this.initData=parseInitSegment(e);r||(r=getParsedTrackCodec(o.audio,ElementaryStreamTypes.AUDIO)),s||(s=getParsedTrackCodec(o.video,ElementaryStreamTypes.VIDEO));const d={};o.audio&&o.video?d.audiovideo={container:"video/mp4",codec:r+","+s,initSegment:e,id:"main"}:o.audio?d.audio={container:"audio/mp4",codec:r,initSegment:e,id:"audio"}:o.video?d.video={container:"video/mp4",codec:s,initSegment:e,id:"main"}:logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=d}remux(e,r,s,o,d,L){var ge,Mt;let{initPTS:er,lastEndTime:tr}=this;const ir={audio:void 0,video:void 0,text:o,id3:s,initSegment:void 0};isFiniteNumber(tr)||(tr=this.lastEndTime=d||0);const rr=r.samples;if(!(rr!=null&&rr.length))return ir;const nr={initPTS:void 0,timescale:1};let ar=this.initData;if((ge=ar)!=null&&ge.length||(this.generateInitSegment(rr),ar=this.initData),!((Mt=ar)!=null&&Mt.length))return logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),ir;this.emitInitSegment&&(nr.tracks=this.initTracks,this.emitInitSegment=!1);const sr=getDuration(rr,ar),lr=getStartDTS(ar,rr),cr=lr===null?d:lr;(isInvalidInitPts(er,cr,d,sr)||nr.timescale!==er.timescale&&L)&&(nr.initPTS=cr-d,er&&er.timescale===1&&logger.warn(`Adjusting initPTS by ${nr.initPTS-er.baseTime}`),this.initPTS=er={baseTime:nr.initPTS,timescale:1});const ur=e?cr-er.baseTime/er.timescale:tr,or=ur+sr;offsetStartDTS(ar,rr,er.baseTime/er.timescale),sr>0?this.lastEndTime=or:(logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const dr=!!ar.audio,hr=!!ar.video;let pr="";dr&&(pr+="audio"),hr&&(pr+="video");const mr={data1:rr,startPTS:ur,startDTS:ur,endPTS:or,endDTS:or,type:pr,hasAudio:dr,hasVideo:hr,nb:1,dropped:0};return ir.audio=mr.type==="audio"?mr:void 0,ir.video=mr.type!=="audio"?mr:void 0,ir.initSegment=nr,ir.id3=flushTextTrackMetadataCueSamples(s,d,er,er),o.samples.length&&(ir.text=flushTextTrackUserdataCueSamples(o,d,er)),ir}}function isInvalidInitPts(t,e,r,s){if(t===null)return!0;const o=Math.max(s,1),d=e-t.baseTime/t.timescale;return Math.abs(d-r)>o}function getParsedTrackCodec(t,e){const r=t==null?void 0:t.codec;return r&&r.length>4?r:r==="hvc1"||r==="hev1"?"hvc1.1.6.L120.90":r==="av01"?"av01.0.04M.08":r==="avc1"||e===ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}let now;try{now=self.performance.now.bind(self.performance)}catch(t){logger.debug("Unable to use Performance API on this environment"),now=typeof self<"u"&&self.Date.now}const muxConfig=[{demux:MP4Demuxer,remux:PassThroughRemuxer},{demux:TSDemuxer,remux:MP4Remuxer},{demux:AACDemuxer,remux:MP4Remuxer},{demux:MP3Demuxer,remux:MP4Remuxer}];class Transmuxer{constructor(e,r,s,o,d){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=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=e,this.typeSupported=r,this.config=s,this.vendor=o,this.id=d}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,r,s,o){const d=s.transmuxing;d.executeStart=now();let L=new Uint8Array(e);const{currentTransmuxState:ge,transmuxConfig:Mt}=this;o&&(this.currentTransmuxState=o);const{contiguous:er,discontinuity:tr,trackSwitch:ir,accurateTimeOffset:rr,timeOffset:nr,initSegmentChange:ar}=o||ge,{audioCodec:sr,videoCodec:lr,defaultInitPts:cr,duration:ur,initSegmentData:or}=Mt,dr=getEncryptionType(L,r);if(dr&&dr.method==="AES-128"){const vr=this.getDecrypter();if(vr.isSync()){let Er=vr.softwareDecrypt(L,dr.key.buffer,dr.iv.buffer);if(s.part>-1&&(Er=vr.flush()),!Er)return d.executeEnd=now(),emptyResult(s);L=new Uint8Array(Er)}else return this.decryptionPromise=vr.webCryptoDecrypt(L,dr.key.buffer,dr.iv.buffer).then(Er=>{const Cr=this.push(Er,null,s);return this.decryptionPromise=null,Cr}),this.decryptionPromise}const hr=this.needsProbing(tr,ir);if(hr){const vr=this.configureTransmuxer(L);if(vr)return logger.warn(`[transmuxer] ${vr.message}`),this.observer.emit(Events.ERROR,Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,error:vr,reason:vr.message}),d.executeEnd=now(),emptyResult(s)}(tr||ir||ar||hr)&&this.resetInitSegment(or,sr,lr,ur,r),(tr||ar||hr)&&this.resetInitialTimestamp(cr),er||this.resetContiguity();const pr=this.transmux(L,dr,nr,rr,s),mr=this.currentTransmuxState;return mr.contiguous=!0,mr.discontinuity=!1,mr.trackSwitch=!1,d.executeEnd=now(),pr}flush(e){const r=e.transmuxing;r.executeStart=now();const{decrypter:s,currentTransmuxState:o,decryptionPromise:d}=this;if(d)return d.then(()=>this.flush(e));const L=[],{timeOffset:ge}=o;if(s){const ir=s.flush();ir&&L.push(this.push(ir,null,e))}const{demuxer:Mt,remuxer:er}=this;if(!Mt||!er)return r.executeEnd=now(),[emptyResult(e)];const tr=Mt.flush(ge);return isPromise(tr)?tr.then(ir=>(this.flushRemux(L,ir,e),L)):(this.flushRemux(L,tr,e),L)}flushRemux(e,r,s){const{audioTrack:o,videoTrack:d,id3Track:L,textTrack:ge}=r,{accurateTimeOffset:Mt,timeOffset:er}=this.currentTransmuxState;logger.log(`[transmuxer.ts]: Flushed fragment ${s.sn}${s.part>-1?" p: "+s.part:""} of level ${s.level}`);const tr=this.remuxer.remux(o,d,L,ge,er,Mt,!0,this.id);e.push({remuxResult:tr,chunkMeta:s}),s.transmuxing.executeEnd=now()}resetInitialTimestamp(e){const{demuxer:r,remuxer:s}=this;!r||!s||(r.resetTimeStamp(e),s.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:r}=this;!e||!r||(e.resetContiguity(),r.resetNextTimestamp())}resetInitSegment(e,r,s,o,d){const{demuxer:L,remuxer:ge}=this;!L||!ge||(L.resetInitSegment(e,r,s,o),ge.resetInitSegment(e,r,s,d))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,r,s,o,d){let L;return r&&r.method==="SAMPLE-AES"?L=this.transmuxSampleAes(e,r,s,o,d):L=this.transmuxUnencrypted(e,s,o,d),L}transmuxUnencrypted(e,r,s,o){const{audioTrack:d,videoTrack:L,id3Track:ge,textTrack:Mt}=this.demuxer.demux(e,r,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(d,L,ge,Mt,r,s,!1,this.id),chunkMeta:o}}transmuxSampleAes(e,r,s,o,d){return this.demuxer.demuxSampleAes(e,r,s).then(L=>({remuxResult:this.remuxer.remux(L.audioTrack,L.videoTrack,L.id3Track,L.textTrack,s,o,!1,this.id),chunkMeta:d}))}configureTransmuxer(e){const{config:r,observer:s,typeSupported:o,vendor:d}=this;let L;for(let ir=0,rr=muxConfig.length;ir<rr;ir++)if(muxConfig[ir].demux.probe(e)){L=muxConfig[ir];break}if(!L)return new Error("Failed to find demuxer by probing fragment data");const ge=this.demuxer,Mt=this.remuxer,er=L.remux,tr=L.demux;(!Mt||!(Mt instanceof er))&&(this.remuxer=new er(s,r,o,d)),(!ge||!(ge instanceof tr))&&(this.demuxer=new tr(s,r,o),this.probe=tr.probe)}needsProbing(e,r){return!this.demuxer||!this.remuxer||e||r}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Decrypter(this.config)),e}}function getEncryptionType(t,e){let r=null;return t.byteLength>0&&e!=null&&e.key!=null&&e.iv!==null&&e.method!=null&&(r=e),r}const emptyResult=t=>({remuxResult:{},chunkMeta:t});function isPromise(t){return"then"in t&&t.then instanceof Function}class TransmuxConfig{constructor(e,r,s,o,d){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=r,this.initSegmentData=s,this.duration=o,this.defaultInitPts=d||null}}class TransmuxState{constructor(e,r,s,o,d,L){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=e,this.contiguous=r,this.accurateTimeOffset=s,this.trackSwitch=o,this.timeOffset=d,this.initSegmentChange=L}}var eventemitter3={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(r=!1));function o(Mt,er,tr){this.fn=Mt,this.context=er,this.once=tr||!1}function d(Mt,er,tr,ir,rr){if(typeof tr!="function")throw new TypeError("The listener must be a function");var nr=new o(tr,ir||Mt,rr),ar=r?r+er:er;return Mt._events[ar]?Mt._events[ar].fn?Mt._events[ar]=[Mt._events[ar],nr]:Mt._events[ar].push(nr):(Mt._events[ar]=nr,Mt._eventsCount++),Mt}function L(Mt,er){--Mt._eventsCount===0?Mt._events=new s:delete Mt._events[er]}function ge(){this._events=new s,this._eventsCount=0}ge.prototype.eventNames=function(){var er=[],tr,ir;if(this._eventsCount===0)return er;for(ir in tr=this._events)e.call(tr,ir)&&er.push(r?ir.slice(1):ir);return Object.getOwnPropertySymbols?er.concat(Object.getOwnPropertySymbols(tr)):er},ge.prototype.listeners=function(er){var tr=r?r+er:er,ir=this._events[tr];if(!ir)return[];if(ir.fn)return[ir.fn];for(var rr=0,nr=ir.length,ar=new Array(nr);rr<nr;rr++)ar[rr]=ir[rr].fn;return ar},ge.prototype.listenerCount=function(er){var tr=r?r+er:er,ir=this._events[tr];return ir?ir.fn?1:ir.length:0},ge.prototype.emit=function(er,tr,ir,rr,nr,ar){var sr=r?r+er:er;if(!this._events[sr])return!1;var lr=this._events[sr],cr=arguments.length,ur,or;if(lr.fn){switch(lr.once&&this.removeListener(er,lr.fn,void 0,!0),cr){case 1:return lr.fn.call(lr.context),!0;case 2:return lr.fn.call(lr.context,tr),!0;case 3:return lr.fn.call(lr.context,tr,ir),!0;case 4:return lr.fn.call(lr.context,tr,ir,rr),!0;case 5:return lr.fn.call(lr.context,tr,ir,rr,nr),!0;case 6:return lr.fn.call(lr.context,tr,ir,rr,nr,ar),!0}for(or=1,ur=new Array(cr-1);or<cr;or++)ur[or-1]=arguments[or];lr.fn.apply(lr.context,ur)}else{var dr=lr.length,hr;for(or=0;or<dr;or++)switch(lr[or].once&&this.removeListener(er,lr[or].fn,void 0,!0),cr){case 1:lr[or].fn.call(lr[or].context);break;case 2:lr[or].fn.call(lr[or].context,tr);break;case 3:lr[or].fn.call(lr[or].context,tr,ir);break;case 4:lr[or].fn.call(lr[or].context,tr,ir,rr);break;default:if(!ur)for(hr=1,ur=new Array(cr-1);hr<cr;hr++)ur[hr-1]=arguments[hr];lr[or].fn.apply(lr[or].context,ur)}}return!0},ge.prototype.on=function(er,tr,ir){return d(this,er,tr,ir,!1)},ge.prototype.once=function(er,tr,ir){return d(this,er,tr,ir,!0)},ge.prototype.removeListener=function(er,tr,ir,rr){var nr=r?r+er:er;if(!this._events[nr])return this;if(!tr)return L(this,nr),this;var ar=this._events[nr];if(ar.fn)ar.fn===tr&&(!rr||ar.once)&&(!ir||ar.context===ir)&&L(this,nr);else{for(var sr=0,lr=[],cr=ar.length;sr<cr;sr++)(ar[sr].fn!==tr||rr&&!ar[sr].once||ir&&ar[sr].context!==ir)&&lr.push(ar[sr]);lr.length?this._events[nr]=lr.length===1?lr[0]:lr:L(this,nr)}return this},ge.prototype.removeAllListeners=function(er){var tr;return er?(tr=r?r+er:er,this._events[tr]&&L(this,tr)):(this._events=new s,this._eventsCount=0),this},ge.prototype.off=ge.prototype.removeListener,ge.prototype.addListener=ge.prototype.on,ge.prefixed=r,ge.EventEmitter=ge,t.exports=ge})(eventemitter3);var eventemitter3Exports=eventemitter3.exports,EventEmitter=getDefaultExportFromCjs(eventemitter3Exports);const MediaSource$1=getMediaSource()||{isTypeSupported:()=>!1};class TransmuxerInterface{constructor(e,r,s,o){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const d=e.config;this.hls=e,this.id=r,this.useWorker=!!d.enableWorker,this.onTransmuxComplete=s,this.onFlush=o;const L=(er,tr)=>{tr=tr||{},tr.frag=this.frag,tr.id=this.id,er===Events.ERROR&&(this.error=tr.error),this.hls.trigger(er,tr)};this.observer=new EventEmitter,this.observer.on(Events.FRAG_DECRYPTED,L),this.observer.on(Events.ERROR,L);const ge={mp4:MediaSource$1.isTypeSupported("video/mp4"),mpeg:MediaSource$1.isTypeSupported("audio/mpeg"),mp3:MediaSource$1.isTypeSupported('audio/mp4; codecs="mp3"')},Mt=navigator.vendor;if(this.useWorker&&typeof Worker<"u"&&(d.workerPath||hasUMDWorker())){try{d.workerPath?(logger.log(`loading Web Worker ${d.workerPath} for "${r}"`),this.workerContext=loadWorker(d.workerPath)):(logger.log(`injecting Web Worker for "${r}"`),this.workerContext=injectWorker()),this.onwmsg=ir=>this.onWorkerMessage(ir);const{worker:tr}=this.workerContext;tr.addEventListener("message",this.onwmsg),tr.onerror=ir=>{const rr=new Error(`${ir.message} (${ir.filename}:${ir.lineno})`);d.enableWorker=!1,logger.warn(`Error in "${r}" Web Worker, fallback to inline`),this.hls.trigger(Events.ERROR,{type:ErrorTypes.OTHER_ERROR,details:ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:rr})},tr.postMessage({cmd:"init",typeSupported:ge,vendor:Mt,id:r,config:JSON.stringify(d)})}catch(tr){logger.warn(`Error setting up "${r}" Web Worker, fallback to inline`,tr),this.resetWorker(),this.error=null,this.transmuxer=new Transmuxer(this.observer,ge,d,Mt,r)}return}this.transmuxer=new Transmuxer(this.observer,ge,d,Mt,r)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:r}=this.workerContext;r&&self.URL.revokeObjectURL(r),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const r=this.transmuxer;r&&(r.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,r,s,o,d,L,ge,Mt,er,tr){var ir,rr;er.transmuxing.start=self.performance.now();const{transmuxer:nr}=this,ar=L?L.start:d.start,sr=d.decryptdata,lr=this.frag,cr=!(lr&&d.cc===lr.cc),ur=!(lr&&er.level===lr.level),or=lr?er.sn-lr.sn:-1,dr=this.part?er.part-this.part.index:-1,hr=or===0&&er.id>1&&er.id===(lr==null?void 0:lr.stats.chunkCount),pr=!ur&&(or===1||or===0&&(dr===1||hr&&dr<=0)),mr=self.performance.now();(ur||or||d.stats.parsing.start===0)&&(d.stats.parsing.start=mr),L&&(dr||!pr)&&(L.stats.parsing.start=mr);const vr=!(lr&&((ir=d.initSegment)==null?void 0:ir.url)===((rr=lr.initSegment)==null?void 0:rr.url)),Er=new TransmuxState(cr,pr,Mt,ur,ar,vr);if(!pr||cr||vr){logger.log(`[transmuxer-interface, ${d.type}]: Starting new transmux session for sn: ${er.sn} p: ${er.part} level: ${er.level} id: ${er.id} 3762 discontinuity: ${cr} 3763 trackSwitch: ${ur} 3764 contiguous: ${pr} 3765 accurateTimeOffset: ${Mt} 3766 timeOffset: ${ar} 3767 initSegmentChange: ${vr}`);const Cr=new TransmuxConfig(s,o,r,ge,tr);this.configureTransmuxer(Cr)}if(this.frag=d,this.part=L,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:sr,chunkMeta:er,state:Er},e instanceof ArrayBuffer?[e]:[]);else if(nr){const Cr=nr.push(e,sr,er,Er);isPromise(Cr)?(nr.async=!0,Cr.then(Pr=>{this.handleTransmuxComplete(Pr)}).catch(Pr=>{this.transmuxerError(Pr,er,"transmuxer-interface push error")})):(nr.async=!1,this.handleTransmuxComplete(Cr))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:r}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(r){let s=r.flush(e);
3767isPromise(s)||r.async?(isPromise(s)||(s=Promise.resolve(s)),s.then(d=>{this.handleFlushResult(d,e)}).catch(d=>{this.transmuxerError(d,e,"transmuxer-interface flush error")})):this.handleFlushResult(s,e)}}transmuxerError(e,r,s){this.hls&&(this.error=e,this.hls.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:r,fatal:!1,error:e,err:e,reason:s}))}handleFlushResult(e,r){e.forEach(s=>{this.handleTransmuxComplete(s)}),this.onFlush(r)}onWorkerMessage(e){const r=e.data,s=this.hls;switch(r.event){case"init":{var o;const d=(o=this.workerContext)==null?void 0:o.objectURL;d&&self.URL.revokeObjectURL(d);break}case"transmuxComplete":{this.handleTransmuxComplete(r.data);break}case"flush":{this.onFlush(r.data);break}case"workerLog":logger[r.data.logType]&&logger[r.data.logType](r.data.message);break;default:{r.data=r.data||{},r.data.frag=this.frag,r.data.id=this.id,s.trigger(r.event,r.data);break}}}configureTransmuxer(e){const{transmuxer:r}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):r&&r.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const STALL_MINIMUM_DURATION_MS=250,MAX_START_GAP_JUMP=2,SKIP_BUFFER_HOLE_STEP_SECONDS=.1,SKIP_BUFFER_RANGE_START=.05;class GapController{constructor(e,r,s,o){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=r,this.fragmentTracker=s,this.hls=o}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,r){const{config:s,media:o,stalled:d}=this;if(o===null)return;const{currentTime:L,seeking:ge}=o,Mt=this.seeking&&!ge,er=!this.seeking&≥if(this.seeking=ge,L!==e){if(this.moved=!0,d!==null){if(this.stallReported){const cr=self.performance.now()-d;logger.warn(`playback not stuck anymore @${L}, after ${Math.round(cr)}ms`),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if(er||Mt){this.stalled=null;return}if(o.paused&&!ge||o.ended||o.playbackRate===0||!BufferHelper.getBuffered(o).length)return;const tr=BufferHelper.bufferInfo(o,L,0),ir=tr.len>0,rr=tr.nextStart||0;if(!ir&&!rr)return;if(ge){const cr=tr.len>MAX_START_GAP_JUMP,ur=!rr||r&&r.start<=L||rr-L>MAX_START_GAP_JUMP&&!this.fragmentTracker.getPartialFragment(L);if(cr||ur)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var nr;const cr=Math.max(rr,tr.start||0)-L,ur=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,dr=(ur==null||(nr=ur.details)==null?void 0:nr.live)?ur.details.targetduration*2:MAX_START_GAP_JUMP,hr=this.fragmentTracker.getPartialFragment(L);if(cr>0&&(cr<=dr||hr)){this._trySkipBufferHole(hr);return}}const ar=self.performance.now();if(d===null){this.stalled=ar;return}const sr=ar-d;if(!ge&&sr>=STALL_MINIMUM_DURATION_MS&&(this._reportStall(tr),!this.media))return;const lr=BufferHelper.bufferInfo(o,L,s.maxBufferHole);this._tryFixBufferStall(lr,sr)}_tryFixBufferStall(e,r){const{config:s,fragmentTracker:o,media:d}=this;if(d===null)return;const L=d.currentTime,ge=o.getPartialFragment(L);ge&&(this._trySkipBufferHole(ge)||!this.media)||(e.len>s.maxBufferHole||e.nextStart&&e.nextStart-L<s.maxBufferHole)&&r>s.highBufferWatchdogPeriod*1e3&&(logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:r,media:s,stallReported:o}=this;if(!o&&s){this.stallReported=!0;const d=new Error(`Playback stalling at @${s.currentTime} due to low buffer (${JSON.stringify(e)})`);logger.warn(d.message),r.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,error:d,buffer:e.len})}}_trySkipBufferHole(e){const{config:r,hls:s,media:o}=this;if(o===null)return 0;const d=o.currentTime,L=BufferHelper.bufferInfo(o,d,0),ge=d<L.start?L.start:L.nextStart;if(ge){const Mt=L.len<=r.maxBufferHole,er=L.len>0&&L.len<1&&o.readyState<3,tr=ge-d;if(tr>0&&(Mt||er)){if(tr>r.maxBufferHole){const{fragmentTracker:rr}=this;let nr=!1;if(d===0){const ar=rr.getAppendedFrag(0,PlaylistLevelType.MAIN);ar&&ge<ar.end&&(nr=!0)}if(!nr){const ar=e||rr.getAppendedFrag(d,PlaylistLevelType.MAIN);if(ar){let sr=!1,lr=ar.end;for(;lr<ge;){const cr=rr.getPartialFragment(lr);if(cr)lr+=cr.duration;else{sr=!0;break}}if(sr)return 0}}}const ir=Math.max(ge+SKIP_BUFFER_RANGE_START,d+SKIP_BUFFER_HOLE_STEP_SECONDS);if(logger.warn(`skipping hole, adjusting currentTime from ${d} to ${ir}`),this.moved=!0,this.stalled=null,o.currentTime=ir,e&&!e.gap){const rr=new Error(`fragment loaded with buffer holes, seeking from ${d} to ${ir}`);s.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:rr,reason:rr.message,frag:e})}return ir}}return 0}_tryNudgeBuffer(){const{config:e,hls:r,media:s,nudgeRetry:o}=this;if(s===null)return;const d=s.currentTime;if(this.nudgeRetry++,o<e.nudgeMaxRetry){const L=d+(o+1)*e.nudgeOffset,ge=new Error(`Nudging 'currentTime' from ${d} to ${L}`);logger.warn(ge.message),s.currentTime=L,r.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.BUFFER_NUDGE_ON_STALL,error:ge,fatal:!1})}else{const L=new Error(`Playhead still not moving while enough data buffered @${d} after ${e.nudgeMaxRetry} nudges`);logger.error(L.message),r.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.BUFFER_STALLED_ERROR,error:L,fatal:!0})}}}const TICK_INTERVAL$2=100;class StreamController extends BaseStreamController{constructor(e,r,s){super(e,r,s,"[stream-controller]",PlaylistLevelType.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;
3767e.on(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(Events.ERROR,this.onError,this),e.on(Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Events.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(Events.ERROR,this.onError,this),e.off(Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Events.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),this.onMediaDetaching()}startLoad(e){if(this.levels){const{lastCurrentTime:r,hls:s}=this;if(this.stopLoad(),this.setInterval(TICK_INTERVAL$2),this.level=-1,!this.startFragRequested){let o=s.startLevel;o===-1&&(s.config.testBandwidth&&this.levels.length>1?(o=0,this.bitrateTest=!0):o=s.nextAutoLevel),this.level=s.nextLoadLevel=o,this.loadedmetadata=!1}r>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r),this.state=State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=State.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case State.WAITING_LEVEL:{var e;const{levels:s,level:o}=this,d=s==null||(e=s[o])==null?void 0:e.details;if(d&&(!d.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(d))break;this.state=State.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=State.IDLE;break}break}case State.FRAG_LOADING_WAITING_RETRY:{var r;const s=self.performance.now(),o=this.retryDate;(!o||s>=o||(r=this.media)!=null&&r.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=State.IDLE)}break}this.state===State.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:r,levels:s,media:o}=this,{config:d,nextLoadLevel:L}=e;if(r===null||!o&&(this.startFragRequested||!d.startFragPrefetch)||this.altAudio&&this.audioOnly||!(s!=null&&s[L])
vendor: 1,503 bytes, line 3767
3767)return;const ge=s[L],Mt=this.getMainFwdBufferInfo();if(Mt===null)return;const er=this.getLevelDetails();if(er&&this._streamEnded(Mt,er)){const lr={};this.altAudio&&(lr.type="video"),this.hls.trigger(Events.BUFFER_EOS,lr),this.state=State.ENDED;return}e.loadLevel!==L&&e.manualLevel===-1&&this.log(`Adapting to level ${L} from level ${this.level}`),this.level=e.nextLoadLevel=L;const tr=ge.details;if(!tr||this.state===State.WAITING_LEVEL||tr.live&&this.levelLastLoaded!==L){this.level=L,this.state=State.WAITING_LEVEL;return}const ir=Mt.len,rr=this.getMaxBufferLength(ge.maxBitrate);if(ir>=rr)return;this.backtrackFragment&&this.backtrackFragment.start>Mt.end&&(this.backtrackFragment=null);const nr=this.backtrackFragment?this.backtrackFragment.start:Mt.end;let ar=this.getNextFragment(nr,tr);if(this.couldBacktrack&&!this.fragPrevious&&ar&&ar.sn!=="initSegment"&&this.fragmentTracker.getState(ar)!==FragmentState.OK){var sr;const cr=((sr=this.backtrackFragment)!=null?sr:ar).sn-tr.startSN,ur=tr.fragments[cr-1];ur&&ar.cc===ur.cc&&(ar=ur,this.fragmentTracker.removeFragment(ur))}else this.backtrackFragment&&Mt.len&&(this.backtrackFragment=null);if(ar&&this.isLoopLoading(ar,nr)){if(!ar.gap){const cr=this.audioOnly&&!this.altAudio?ElementaryStreamTypes.AUDIO:ElementaryStreamTypes.VIDEO,ur=(cr===ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;ur&&this.afterBufferFlushed(ur,cr,PlaylistLevelType.MAIN)}ar=this.getNextFragmentLoopLoading(ar,tr,Mt,PlaylistLevelType.MAIN,rr)}
3767ar&&(ar.initSegment&&!ar.initSegment.data&&!this.bitrateTest&&(ar=ar.initSegment),this.loadFragment(ar,ge,nr))}loadFragment(e,r,s){const o=this.fragmentTracker.getState(e);this.fragCurrent=e,o===FragmentState.NOT_LOADED||o===FragmentState.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,r):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,r)):(this.startFragRequested=!0,super.loadFragment(e,r,s)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,PlaylistLevelType.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:r}=this;if(r!=null&&r.readyState){let s;const o=this.getAppendedFrag(r.currentTime);o&&o.start>1&&this.flushMainBuffer(0,o.start-1);const d=this.getLevelDetails();if(d!=null&&d.live){const ge=this.getMainFwdBufferInfo();if(!ge||ge.len<d.targetduration*2)return}if(!r.paused&&e){const ge=this.hls.nextLoadLevel,Mt=e[ge],er=this.fragLastKbps;er&&this.fragCurrent?s=this.fragCurrent.duration*Mt.maxBitrate/(1e3*er)+1:s=0}else s=0;const L=this.getBufferedFrag(r.currentTime+s);if(L){const ge=this.followingBufferedFrag(L);if(ge){this.abortCurrentFrag();const Mt=ge.maxStartPTS?ge.maxStartPTS:ge.start,er=ge.duration,tr=Math.max(L.end,Mt+Math.min(Math.max(er-this.config.maxFragLookUpTolerance,er*.5),er*.75));this.flushMainBuffer(tr,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case State.KEY_LOADING:case State.FRAG_LOADING:case State.FRAG_LOADING_WAITING_RETRY:case State.PARSING:case State.PARSED:this.state=State.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,r){super.flushMainBuffer(e,r,this.altAudio?"video":null)}onMediaAttached(e,r){super.onMediaAttached(e,r);const s=r.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),s.addEventListener("playing",this.onvplaying),s.addEventListener("seeked",this.onvseeked),this.gapController=new GapController(this.config,s,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,r=e?e.currentTime:null;isFiniteNumber(r)&&this.log(`Media seeked to ${r.toFixed(3)}`);const s=this.getMainFwdBufferInfo();if(s===null||s.len===0){this.warn(`Main forward buffer length on "seeked" event ${s?s.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.levels=this.fragPlaying=this.backtrackFragment=null,this.altAudio=this.audioOnly=!1}onManifestParsed(e,r){let s=!1,o=!1,d;r.levels.forEach(L=>{d=L.audioCodec,d&&(d.indexOf("mp4a.40.2")!==-1&&(s=!0),d.indexOf("mp4a.40.5")!==-1&&(o=!0))}),this.audioCodecSwitch=s&&o&&!changeTypeSupported(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=r.levels,this.startFragRequested=!1}onLevelLoading(e,r){const{levels:s}=this;if(!s||this.state!==State.IDLE)return;const o=s[r.level];(!o.details||o.details.live&&this.levelLastLoaded!==r.level||this.waitForCdnTuneIn(o.details))&&(this.state=State.WAITING_LEVEL)}onLevelLoaded(e,r){var s;const{levels:o}=this,d=r.level,L=r.details,ge=L.totalduration;if(!o){this.warn(`Levels were reset while loading level ${d}`);return}this.log(`Level ${d} loaded [${L.startSN},${L.endSN}]${L.lastPartSn?`[part-${L.lastPartSn}-${L.lastPartIndex}]`:""}, cc [${L.startCC}, ${L.endCC}] duration:${ge}`);const Mt=o[d],er=this.fragCurrent;er&&(this.state===State.FRAG_LOADING||this.state===State.FRAG_LOADING_WAITING_RETRY)&&(er.level!==r.level||er.urlId!==Mt.urlId)&&er.loader&&this.abortCurrentFrag();let tr=0;if(L.live||(s=Mt.details)!=null&&s.live){if(this.checkLiveUpdate(L),L.deltaUpdateFailed)return;tr=this.alignPlaylists(L,Mt.details)}if(Mt.details=L,this.levelLastLoaded=d,this.hls.trigger(Events.LEVEL_UPDATED,{details:L,level:d}),this.state===State.WAITING_LEVEL){if(this.waitForCdnTuneIn(L))return;this.state=State.IDLE}this.startFragRequested?L.live&&this.synchronizeToLiveEdge(L):this.setStartPosition(L,tr),this.tick()}_handleFragmentLoadProgress(e){var r;const{frag:s,part:o,payload:d}=e,{levels:L}=this;if(!L){this.warn(`Levels were reset while fragment load was in progress. Fragment ${s.sn} of level ${s.level} will not be buffered`);return}const ge=L[s.level],Mt=ge.details;if(!Mt){this.warn(`Dropping fragment ${s.sn} of level ${s.level} after level details were reset`),this.fragmentTracker.removeFragment(s);return}const er=ge.videoCodec,tr=Mt.PTSKnown||!Mt.live,ir=(r=s.initSegment)==null?void 0:r.data,rr=this._getAudioCodec(ge),nr=this.transmuxer=this.transmuxer||new TransmuxerInterface(this.hls,PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ar=o?o.index:-1,sr=ar!==-1,lr=new ChunkMetadata(s.level,s.sn,s.stats.chunkCount,d.byteLength,ar,sr),cr=this.initPTS[s.cc];nr.push(d,ir,rr,er,s,o,Mt.totalduration,tr,lr,cr)}onAudioTrackSwitching(e,r){const s=this.altAudio;if(!!!r.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const L=this.fragCurrent;L&&(this.log("Switching to main audio track, cancel main fragment load"),L.abortRequests(),this.fragmentTracker.removeFragment(L)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const d=this.hls;s&&(d.trigger(Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),d.trigger(Events.AUDIO_TRACK_SWITCHED,r)}}onAudioTrackSwitched(e,r){const s=r.id,o=!!this.hls.audioTracks[s].url;if(o){const d=this.videoBuffer;d&&this.mediaBuffer!==d&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=d)}this.altAudio=o,this.tick()}onBufferCreated(e,r){const s=r.tracks;let o,d,L=!1;for(const ge in s){const Mt=s[ge];if(Mt.id==="main"){if(d=ge,o=Mt,ge==="video"){const er=s[ge];er&&(this.videoBuffer=er.buffer)}}else L=!0}L&&o?(this.log(`Alternate track found, use ${d}.buffered to schedule main fragment loading`),this.mediaBuffer=o.buffer):this.mediaBuffer=this.media}onFragBuffered(e,r){const{frag:s,part:o}=r;if(s&&s.type!==PlaylistLevelType.MAIN)return;if(this.fragContextChanged(s)){this.warn(`Fragment ${s.sn}${o?" p: "+o.index:""} of level ${s.level} finished buffering, but was aborted. state: ${this.state}`),this.state===State.PARSED&&(this.state=State.IDLE);return}const d=o?o.stats:s.stats;this.fragLastKbps=Math.round(8*d.total/(d.buffering.end-d.loading.first)),s.sn!=="initSegment"&&(this.fragPrevious=s),this.fragBufferedComplete(s,o)}onError(e,r){var s;if(r.fatal){this.state=State.ERROR;return}switch(r.details){case ErrorDetails.FRAG_GAP:case ErrorDetails.FRAG_PARSING_ERROR:case ErrorDetails.FRAG_DECRYPT_ERROR:case ErrorDetails.FRAG_LOAD_ERROR:case ErrorDetails.FRAG_LOAD_TIMEOUT:case ErrorDetails.KEY_LOAD_ERROR:case ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(PlaylistLevelType.MAIN,r);break;case ErrorDetails.LEVEL_LOAD_ERROR:case ErrorDetails.LEVEL_LOAD_TIMEOUT:case ErrorDetails.LEVEL_PARSING_ERROR:!r.levelRetry&&this.state===State.WAITING_LEVEL&&((s=r.context)==null?void 0:s.type)===PlaylistContextType.LEVEL&&(this.state=State.IDLE);break;case ErrorDetails.BUFFER_FULL_ERROR:if(!r.parent||r.parent!=="main")return;this.reduceLengthAndFlushBuffer(r)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case ErrorDetails.INTERNAL_EXCEPTION:this.recoverWorkerError(r);break}}
3767checkBuffer(){const{media:e,gapController:r}=this;if(!(!e||!r||!e.readyState)){if(this.loadedmetadata||!BufferHelper.getBuffered(e).length){const s=this.state!==State.IDLE?this.fragCurrent:null;r.poll(this.lastCurrentTime,s)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:r}){if(r!==ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){const s=(r===ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(s,r,PlaylistLevelType.MAIN)}}onLevelsUpdated(e,r){this.levels=r.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const r=e.currentTime;let s=this.startPosition;if(s>=0&&r<s){if(e.seeking){this.log(`could not seek to ${s}, already seeking at ${r}`);return}const o=BufferHelper.getBuffered(e),L=(o.length?o.start(0):0)-s;L>0&&(L<this.config.maxBufferHole||L<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${L} to match buffer start`),s+=L,this.startPosition=s),this.log(`seek to target start position ${s} from current time ${r}`),e.currentTime=s}}_getAudioCodec(e){let r=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&r&&(this.log("Swapping audio codec"),r.indexOf("mp4a.40.5")!==-1?r="mp4a.40.2":r="mp4a.40.5"),r}_loadBitrateTestFrag(e,r){e.bitrateTest=!0,this._doFragLoad(e,r).then(s=>{const{hls:o}=this;if(!s||this.fragContextChanged(e))return;r.fragmentError=0,this.state=State.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const d=e.stats;d.parsing.start=d.parsing.end=d.buffering.start=d.buffering.end=self.performance.now(),o.trigger(Events.FRAG_LOADED,s),e.bitrateTest=!1})}_handleTransmuxComplete(e){var r;const s="main",{hls:o}=this,{remuxResult:d,chunkMeta:L}=e,ge=this.getCurrentContext(L);if(!ge){this.resetWhenMissingContext(L);return}const{frag:Mt,part:er,level:tr}=ge,{video:ir,text:rr,id3:nr,initSegment:ar}=d,{details:sr}=tr,lr=this.altAudio?void 0:d.audio;if(this.fragContextChanged(Mt)){this.fragmentTracker.removeFragment(Mt);return}if(this.state=State.PARSING,ar){if(ar!=null&&ar.tracks){const or=Mt.initSegment||Mt;this._bufferInitSegment(tr,ar.tracks,or,L),o.trigger(Events.FRAG_PARSING_INIT_SEGMENT,{frag:or,id:s,tracks:ar.tracks})}const cr=ar.initPTS,ur=ar.timescale;isFiniteNumber(cr)&&(this.initPTS[Mt.cc]={baseTime:cr,timescale:ur},o.trigger(Events.INIT_PTS_FOUND,{frag:Mt,id:s,initPTS:cr,timescale:ur}))}if(ir&&sr&&Mt.sn!=="initSegment"){const cr=sr.fragments[Mt.sn-1-sr.startSN],ur=Mt.sn===sr.startSN,or=!cr||Mt.cc>cr.cc;if(d.independent!==!1){const{startPTS:dr,endPTS:hr,startDTS:pr,endDTS:mr}=ir;if(er)er.elementaryStreams[ir.type]={startPTS:dr,endPTS:hr,startDTS:pr,endDTS:mr};else if(ir.firstKeyFrame&&ir.independent&&L.id===1&&!or&&(this.couldBacktrack=!0),ir.dropped&&ir.independent){const vr=this.getMainFwdBufferInfo(),Er=(vr?vr.end:this.getLoadPosition())+this.config.maxBufferHole,Cr=ir.firstKeyFramePTS?ir.firstKeyFramePTS:dr;if(!ur&&Er<Cr-this.config.maxBufferHole&&!or){this.backtrack(Mt);return}else or&&(Mt.gap=!0);Mt.setElementaryStreamInfo(ir.type,Mt.start,hr,Mt.start,mr,!0)}Mt.setElementaryStreamInfo(ir.type,dr,hr,pr,mr),this.backtrackFragment&&(this.backtrackFragment=Mt),this.bufferFragmentData(ir,Mt,er,L,ur||or)}else if(ur||or)Mt.gap=!0;else{this.backtrack(Mt);return}}if(lr){const{startPTS:cr,endPTS:ur,startDTS:or,endDTS:dr}=lr;er&&(er.elementaryStreams[ElementaryStreamTypes.AUDIO]={startPTS:cr,endPTS:ur,startDTS:or,endDTS:dr}),Mt.setElementaryStreamInfo(ElementaryStreamTypes.AUDIO,cr,ur,or,dr),this.bufferFragmentData(lr,Mt,er,L)}if(sr&&nr!=null&&(r=nr.samples)!=null&&r.length){const cr={id:s,frag:Mt,details:sr,samples:nr.samples};o.trigger(Events.FRAG_PARSING_METADATA,cr)}if(sr&&rr){const cr={id:s,frag:Mt,details:sr,samples:rr.samples};o.trigger(Events.FRAG_PARSING_USERDATA,cr)}}_bufferInitSegment(e,r,s,o){if(this.state!==State.PARSING)return;this.audioOnly=!!r.audio&&!r.video,this.altAudio&&!this.audioOnly&&delete r.audio;const{audio:d,video:L,audiovideo:ge}=r;if(d){let Mt=e.audioCodec;const er=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(Mt&&(Mt.indexOf("mp4a.40.5")!==-1?Mt="mp4a.40.2":Mt="mp4a.40.5"),d.metadata.channelCount!==1&&er.indexOf("firefox")===-1&&(Mt="mp4a.40.5")),er.indexOf("android")!==-1&&d.container!=="audio/mpeg"&&(Mt="mp4a.40.2",this.log(`Android: force audio codec to ${Mt}`)),e.audioCodec&&e.audioCodec!==Mt&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${Mt}"`),d.levelCodec=Mt,d.id="main",this.log(`Init audio buffer, container:${d.container}, codecs[selected/level/parsed]=[${Mt||""}/${e.audioCodec||""}/${d.codec}]`)}L&&(L.levelCodec=e.videoCodec,L.id="main",this.log(`Init video buffer, container:${L.container}, codecs[level/parsed]=[${e.videoCodec||""}/${L.codec}]`)),ge&&this.log(`Init audiovideo buffer, container:${ge.container}, codecs[level/parsed]=[${e.attrs.CODECS||""}/${ge.codec}]`),this.hls.trigger(Events.BUFFER_CODECS,r),Object.keys(r).forEach(Mt=>{const tr=r[Mt].initSegment;tr!=null&&tr.byteLength&&this.hls.trigger(Events.BUFFER_APPENDING,{type:Mt,data:tr,frag:s,part:null,chunkMeta:o,parent:s.type})}),this.tick()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,PlaylistLevelType.MAIN)}backtrack(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=State.IDLE}checkFragmentChanged(){const e=this.media;let r=null;if(e&&e.readyState>1&&e.seeking===!1){const s=e.currentTime;if(BufferHelper.isBuffered(e,s)?r=this.getAppendedFrag(s):BufferHelper.isBuffered(e,s+.1)&&
3767(r=this.getAppendedFrag(s+.1)),r){this.backtrackFragment=null;const o=this.fragPlaying,d=r.level;(!o||r.sn!==o.sn||o.level!==d||r.urlId!==o.urlId)&&(this.fragPlaying=r,this.hls.trigger(Events.FRAG_CHANGED,{frag:r}),(!o||o.level!==d)&&this.hls.trigger(Events.LEVEL_SWITCHED,{level:d}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const r=e.currentTime,s=this.currentFrag;if(s&&isFiniteNumber(r)&&isFiniteNumber(s.programDateTime)){const o=s.programDateTime+(r-s.start)*1e3;return new Date(o)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class EWMA{constructor(e,r=0,s=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=r,this.totalWeight_=s}sample(e,r){const s=Math.pow(this.alpha_,e);this.estimate_=r*(1-s)+s*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class EwmaBandWidthEstimator{constructor(e,r,s,o=100){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_
3767=new EWMA(e),this.fast_=new EWMA(r),this.defaultTTFB_=o,this.ttfb_=new EWMA(e)}update(e,r){const{slow_:s,fast_:o,ttfb_:d}=this;s.halfLife!==e&&(this.slow_=new EWMA(e,s.getEstimate(),s.getTotalWeight())),o.halfLife!==r&&(this.fast_=new EWMA(r,o.getEstimate(),o.getTotalWeight())),d.halfLife!==e&&(this.ttfb_=new EWMA(e,d.getEstimate(),d.getTotalWeight()))}sample(e,r){e=Math.max(e,this.minDelayMs_);const s=8*r,o=e/1e3,d=s/o;this.fast_.sample(o,d),this.slow_.sample(o,d)}sampleTTFB(e){const r=e/1e3,s=Math.sqrt(2)*Math.exp(-Math.pow(r,2)/2);this.ttfb_.sample(s,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}class AbrController{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=-1,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;const r=e.config;this.bwEstimator=new EwmaBandWidthEstimator(r.abrEwmaSlowVoD,r.abrEwmaFastVoD,r.abrEwmaDefaultEstimate),this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(Events.FRAG_LOADING,this.onFragLoading,this),e.on(Events.FRAG_LOADED,this.onFragLoaded,this),e.on(Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Events.LEVEL_LOADED,this.onLevelLoaded,this)}unregisterListeners(){const{hls:e}=this;e.off(Events.FRAG_LOADING,this.onFragLoading,this),e.off(Events.FRAG_LOADED,this.onFragLoaded,this),e.off(Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Events.LEVEL_LOADED,this.onLevelLoaded,this)}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null}onFragLoading(e,r){var s;const o=r.frag;this.ignoreFragment(o)||(this.fragCurrent=o,this.partCurrent=(s=r.part)!=null?s:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))}onLevelSwitching(e,r){this.clearTimer()}getTimeToLoadFrag(e,r,s,o){const d=e+s/r,L=o?this.lastLevelLoadSec:0;return d+L}onLevelLoaded(e,r){const s=this.hls.config,{total:o,bwEstimate:d}=r.stats;isFiniteNumber(o)&&isFiniteNumber(d)&&(this.lastLevelLoadSec=8*o/d),r.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)}_abandonRulesCheck(){const{fragCurrent:e,partCurrent:r,hls:s}=this,{autoLevelEnabled:o,media:d}=s;if(!e||!d)return;const L=performance.now(),ge=r?r.stats:e.stats,Mt=r?r.duration:e.duration,er=L-ge.loading.start;if(ge.aborted||ge.loaded&&ge.loaded===ge.total||e.level===0){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o||d.paused||!d.playbackRate||!d.readyState)return;const tr=s.mainForwardBufferInfo;if(tr===null)return;const ir=this.bwEstimator.getEstimateTTFB(),rr=Math.abs(d.playbackRate);if(er<=Math.max(ir,1e3*(Mt/(rr*2))))return;const nr=tr.len/rr;if(nr>=2*Mt/rr)return;const ar=ge.loading.first?ge.loading.first-ge.loading.start:-1,sr=ge.loaded&&ar>-1,lr=this.bwEstimator.getEstimate(),{levels:cr,minAutoLevel:ur}=s,or=cr[e.level],dr=ge.total||Math.max(ge.loaded,Math.round(Mt*or.maxBitrate/8));let hr=er-ar;hr<1&&sr&&(hr=Math.min(er,ge.loaded*8/lr));const pr=sr?ge.loaded*1e3/hr:0,mr=pr?(dr-ge.loaded)/pr:dr*8/lr+ir/1e3;if(mr<=nr)return;const vr=pr?pr*8:lr;let Er=Number.POSITIVE_INFINITY,Cr;for(Cr=e.level-1;Cr>ur;Cr--){const Pr=cr[Cr].maxBitrate;if(Er=this.getTimeToLoadFrag(ir/1e3,vr,Mt*Pr,!cr[Cr].details),Er<nr)break}Er>=mr||Er>Mt*10||(s.nextLoadLevel=Cr,sr?this.bwEstimator.sample(er-Math.min(ir,ar),ge.loaded):this.bwEstimator.sampleTTFB(er),this.clearTimer(),logger.warn(`[abr] Fragment ${e.sn}${r?" part "+r.index:""} of level ${e.level} is loading too slowly; 3768 Time to underbuffer: ${nr.toFixed(3)} s 3769 Estimated load time for current fragment: ${mr.toFixed(3)} s 3770 Estimated load time for down switch fragment: ${Er.toFixed(3)} s 3771 TTFB estimate: ${ar} 3772 Current BW estimate: ${isFiniteNumber(lr)?(lr/1024).toFixed(3):"Unknown"} Kb/s 3773 New BW estimate: ${(this.bwEstimator.getEstimate()/1024).toFixed(3)} Kb/s 3774 Aborting and switching to level ${Cr}`),e.loader&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),s.trigger(Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:r,stats:ge}))}onFragLoaded(e,{frag:r,part:s}){const o=s?s.stats:r.stats;if(r.type===PlaylistLevelType.MAIN&&this.bwEstimator.sampleTTFB(o.loading.first-o.loading.start),!this.ignoreFragment(r)){if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){const d=s?s.duration:r.duration,L=this.hls.levels[r.level],ge=(L.loaded?L.loaded.bytes:0)+o.loaded,Mt=(L.loaded?L.loaded.duration:0)+d;L.loaded={bytes:ge,duration:Mt},L.realBitrate=Math.round(8*ge/Mt)}if(r.bitrateTest){const d={stats:o,frag:r,part:s,id:r.type};this.onFragBuffered(Events.FRAG_BUFFERED,d),r.bitrateTest=!1}}}onFragBuffered(e,r){const{frag:s,part:o}=r,d=o!=null&&o.stats.loaded?o.stats:s.stats;if(d.aborted||this.ignoreFragment(s))return;const L=d.parsing.end-d.loading.start-Math.min(d.loading.first-d.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(L,d.loaded),d.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=L/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==PlaylistLevelType.MAIN||e.sn==="initSegment"}clearTimer(){self.clearInterval(this.timer)}get nextAutoLevel(){const e=this._nextAutoLevel,r=this.bwEstimator;if(e!==-1&&!r.canEstimate())return e;let s=this.getNextABRAutoLevel();if(e!==-1){const o=this.hls.levels;if(o.length>Math.max(e,s)&&o[e].loadError<=o[s].loadError)return e}return e!==-1&&(s=Math.min(e,s)),s}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:r,hls:s}=this,{maxAutoLevel:o,config:d,minAutoLevel:L,media:ge}=s,Mt=r?r.duration:e?e.duration:0,er=ge&&ge.playbackRate!==0?Math.abs(ge.playbackRate):1,tr=this.bwEstimator?this.bwEstimator.getEstimate():d.abrEwmaDefaultEstimate,ir=s.mainForwardBufferInfo,rr=(ir?ir.len:0)/er;let nr=this.findBestLevel(tr,L,o,rr,d.abrBandWidthFactor,d.abrBandWidthUpFactor);if(nr>=0)return nr;logger.trace(`[abr] ${rr?"rebuffering expected":"buffer is empty"}, finding optimal quality level`);let ar=Mt?Math.min(Mt,d.maxStarvationDelay):d.maxStarvationDelay,sr=d.abrBandWidthFactor,lr=d.abrBandWidthUpFactor;if(!rr){const cr=this.bitrateTestDelay;cr&&(ar=(Mt?Math.min(Mt,d.maxLoadingDelay):d.maxLoadingDelay)-cr,logger.trace(`[abr] bitrate test took ${Math.round(1e3*cr)}ms, set first fragment max fetchDuration to ${Math.round(1e3*ar)} ms`),sr=lr=1)}
3774return nr=this.findBestLevel(tr,L,o,rr+ar,sr,lr),Math.max(nr,0)}findBestLevel(e,r,s,o,d,L){var ge;const{fragCurrent:Mt,partCurrent:er,lastLoadedFragLevel:tr}=this,{levels:ir}=this.hls,rr=ir[tr],nr=!!(rr!=null&&(ge=rr.details)!=null&&ge.live),ar=rr==null?void 0:rr.codecSet,sr=er?er.duration:Mt?Mt.duration:0,lr=this.bwEstimator.getEstimateTTFB()/1e3;let cr=r,ur=-1;for(let or=s;or>=r;or--){const dr=ir[or];if(!dr||ar&&dr.codecSet!==ar){dr&&(cr=Math.min(or,cr),ur=Math.max(or,ur));continue}ur!==-1&&logger.trace(`[abr] Skipped level(s) ${cr}-${ur} with CODECS:"${ir[ur].attrs.CODECS}"; not compatible with "${rr.attrs.CODECS}"`);const hr=dr.details,pr=(er?hr==null?void 0:hr.partTarget:hr==null?void 0:hr.averagetargetduration)||sr;let mr;or<=tr?mr=d*e:mr=L*e;const vr=ir[or].maxBitrate,Er=this.getTimeToLoadFrag(lr,mr,vr*pr,hr===void 0);if(logger.trace(`[abr] level:${or} adjustedbw-bitrate:${Math.round(mr-vr)} avgDuration:${pr.toFixed(1)} maxFetchDuration:${o.toFixed(1)} fetchDuration:${Er.toFixed(1)}`),mr>vr&&(Er===0||!isFiniteNumber(Er)||nr&&!this.bitrateTestDelay||Er<o))return or}return-1}set nextAutoLevel(e){this._nextAutoLevel=e}}class ChunkCache{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:r}=this;let s;if(e.length)e.length===1?s=e[0]:s=concatUint8Arrays(e,r);else return new Uint8Array(0);return this.reset(),s}reset(){this.chunks.length=0,this.dataLength=0}}function concatUint8Arrays(t,e){const r=new Uint8Array(e);let s=0;for(let o=0;o<t.length;o++){const d=t[o];r.set(d,s),s+=d.length}return r}const TICK_INTERVAL$1=100;class AudioStreamController extends BaseStreamController{constructor(e,r,s){super(e,r,s,"[audio-stream-controller]",PlaylistLevelType.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(Events.ERROR,this.onError,this),e.on(Events.BUFFER_RESET,this.onBufferReset,this),e.on(Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(Events.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(Events.ERROR,this.onError,this),e.off(Events.BUFFER_RESET,this.onBufferReset,this),e.off(Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(Events.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:r,id:s,initPTS:o,timescale:d}){if(s==="main"){const L=r.cc;this.initPTS[r.cc]={baseTime:o,timescale:d},this.log(`InitPTS for cc: ${L} found from main: ${o}`),this.videoTrackCC=L,this.state===State.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=State.STOPPED;return}const r=this.lastCurrentTime;this.stopLoad(),this.setInterval(TICK_INTERVAL$1),r>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r,this.state=State.IDLE):(this.loadedmetadata=!1,this.state=State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case State.IDLE:this.doTickIdle();break;case State.WAITING_TRACK:{var e;const{levels:s,trackId:o}=this,d=s==null||(e=s[o])==null?void 0:e.details;if(d){if(this.waitForCdnTuneIn(d))break;this.state=State.WAITING_INIT_PTS}break}case State.FRAG_LOADING_WAITING_RETRY:{var r;const s=performance.now(),o=this.retryDate;(!o||s>=o||(r=this.media)!=null&&r.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=State.IDLE);break}case State.WAITING_INIT_PTS:{const s=this.waitingData;if(s){const{frag:o,part:d,cache:L,complete:ge}=s;if(this.initPTS[o.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=State.FRAG_LOADING;const Mt=L.flush(),er={frag:o,part:d,payload:Mt,networkDetails:null};this._handleFragmentLoadProgress(er),ge&&super._handleFragmentLoadComplete(er)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${o.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const Mt=this.getLoadPosition(),er=BufferHelper.bufferInfo(this.mediaBuffer,Mt,this.config.maxBufferHole);fragmentWithinToleranceTest(er.end,this.config.maxFragLookUpTolerance,o)<0&&(this.log(`Waiting fragment cc (${o.cc}) @ ${o.start} cancelled because another fragment at ${er.end} is needed`),this.clearWaitingFragment())}}else this.state=State.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=State.IDLE)}
vendor: 9,754 bytes, line 3774
3774resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:r,media:s,trackId:o}=this,d=e.config;if(!(r!=null&&r[o])||!s&&(this.startFragRequested||!d.startFragPrefetch))return;const L=r[o],ge=L.details;if(!ge||ge.live&&this.levelLastLoaded!==o||this.waitForCdnTuneIn(ge)){this.state=State.WAITING_TRACK;return}const Mt=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&Mt&&(this.bufferFlushed=!1,this.afterBufferFlushed(Mt,ElementaryStreamTypes.AUDIO,PlaylistLevelType.AUDIO));const er=this.getFwdBufferInfo(Mt,PlaylistLevelType.AUDIO);if(er===null)return;const{bufferedTrack:tr,switchingTrack:ir}=this;if(!ir&&this._streamEnded(er,ge)){e.trigger(Events.BUFFER_EOS,{type:"audio"}),this.state=State.ENDED;return}const rr=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,PlaylistLevelType.MAIN),nr=er.len,ar=this.getMaxBufferLength(rr==null?void 0:rr.len);if(nr>=ar&&!ir)return;const lr=ge.fragments[0].start;let cr=er.end;if(ir&&s){const hr=this.getLoadPosition();tr&&ir.attrs!==tr.attrs&&(cr=hr),ge.PTSKnown&&hr<lr&&(er.end>lr||er.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),s.currentTime=lr+.05)}let ur=this.getNextFragment(cr,ge),or=!1;if(ur&&this.isLoopLoading(ur,cr)&&(or=!!ur.gap,ur=this.getNextFragmentLoopLoading(ur,ge,er,PlaylistLevelType.MAIN,ar)),!ur){this.bufferFlushed=!0;return}const dr=rr&&ur.start>rr.end+ge.targetduration;if(dr||!(rr!=null&&rr.len)&&er.len){const hr=this.getAppendedFrag(ur.start,PlaylistLevelType.MAIN);if(hr===null||(or||(or=!!hr.gap||!!dr&&rr.len===0),dr&&!or||or&&er.nextStart&&er.nextStart<hr.end))return}this.loadFragment(ur,L,cr)}getMaxBufferLength(e){const r=super.getMaxBufferLength();return e?Math.min(Math.max(r,e),this.config.maxMaxBufferLength):r}onMediaDetaching(){this.videoBuffer=null,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:r}){this.resetTransmuxer(),this.levels=r.map(s=>new Level(s))}onAudioTrackSwitching(e,r){const s=!!r.url;this.trackId=r.id;const{fragCurrent:o}=this;o&&(o.abortRequests(),this.removeUnbufferedFrags(o.start)),this.resetLoadingState(),s?this.setInterval(TICK_INTERVAL$1):this.resetTransmuxer(),s?(this.switchingTrack=r,this.state=State.IDLE):(this.switchingTrack=null,this.bufferedTrack=r,this.state=State.STOPPED),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,r){this.mainDetails=r.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(Events.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,r){var s;if(this.mainDetails==null){this.cachedTrackLoadedData=r;return}const{levels:o}=this,{details:d,id:L}=r;if(!o){this.warn(`Audio tracks were reset while loading level ${L}`);return}this.log(`Track ${L} loaded [${d.startSN},${d.endSN}]${d.lastPartSn?`[part-${d.lastPartSn}-${d.lastPartIndex}]`:""},duration:${d.totalduration}`);const ge=o[L];let Mt=0;if(d.live||(s=ge.details)!=null&&s.live){this.checkLiveUpdate(d);const er=this.mainDetails;if(d.deltaUpdateFailed||!er)return;!ge.details&&d.hasProgramDateTime&&er.hasProgramDateTime?(alignMediaPlaylistByPDT(d,er),Mt=d.fragments[0].start):Mt=this.alignPlaylists(d,ge.details)}ge.details=d,this.levelLastLoaded=L,!this.startFragRequested&&(this.mainDetails||!d.live)&&this.setStartPosition(ge.details,Mt),this.state===State.WAITING_TRACK&&!this.waitForCdnTuneIn(d)&&(this.state=State.IDLE),this.tick()}_handleFragmentLoadProgress(e){var r;const{frag:s,part:o,payload:d}=e,{config:L,trackId:ge,levels:Mt}=this;if(!Mt){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${s.sn} of level ${s.level} will not be buffered`);return}const er=Mt[ge];if(!er){this.warn("Audio track is undefined on fragment load progress");return}const tr=er.details;if(!tr){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(s.start);return}const ir=L.defaultAudioCodec||er.audioCodec||"mp4a.40.2";let rr=this.transmuxer;rr||(rr=this.transmuxer=new TransmuxerInterface(this.hls,PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const nr=this.initPTS[s.cc],ar=(r=s.initSegment)==null?void 0:r.data;if(nr!==void 0){const lr=o?o.index:-1,cr=lr!==-1,ur=new ChunkMetadata(s.level,s.sn,s.stats.chunkCount,d.byteLength,lr,cr);rr.push(d,ar,ir,"",s,o,tr.totalduration,!1,ur,nr)}else{this.log(`Unknown video PTS for cc ${s.cc}, waiting for video PTS before demuxing audio frag ${s.sn} of [${tr.startSN} ,${tr.endSN}],track ${ge}`);const{cache:sr}=this.waitingData=this.waitingData||{frag:s,part:o,cache:new ChunkCache,complete:!1};sr.push(new Uint8Array(d)),this.waitingVideoCC=this.videoTrackCC,this.state=State.WAITING_INIT_PTS}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,r){const s=r.tracks.audio;s&&(this.mediaBuffer=s.buffer||null),r.tracks.video&&(this.videoBuffer=r.tracks.video.buffer||null)}onFragBuffered(e,r){const{frag:s,part:o}=r;if(s.type!==PlaylistLevelType.AUDIO){if(!this.loadedmetadata&&s.type===PlaylistLevelType.MAIN){const d=this.videoBuffer||this.media;d&&BufferHelper.getBuffered(d).length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(s)){this.warn(`Fragment ${s.sn}${o?" p: "+o.index:""} of level ${s.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(s.sn!=="initSegment"){this.fragPrevious=s;const d=this.switchingTrack;d&&(this.bufferedTrack=d,this.switchingTrack=null,this.hls.trigger(Events.AUDIO_TRACK_SWITCHED,_objectSpread2({},d)))}this.fragBufferedComplete(s,o)}onError(e,r){var s;if(r.fatal){this.state=State.ERROR;return}switch(r.details){case ErrorDetails.FRAG_GAP:case ErrorDetails.FRAG_PARSING_ERROR:case ErrorDetails.FRAG_DECRYPT_ERROR:case ErrorDetails.FRAG_LOAD_ERROR:case ErrorDetails.FRAG_LOAD_TIMEOUT:case ErrorDetails.KEY_LOAD_ERROR:case ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(PlaylistLevelType.AUDIO,r);break;case ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case ErrorDetails.LEVEL_PARSING_ERROR:!r.levelRetry&&this.state===State.WAITING_TRACK&&((s=r.context)==null?void 0:s.type)===PlaylistContextType.AUDIO_TRACK&&(this.state=State.IDLE);break;case ErrorDetails.BUFFER_FULL_ERROR:if(!r.parent||r.parent!=="audio")return;this.reduceLengthAndFlushBuffer(r)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case ErrorDetails.INTERNAL_EXCEPTION:this.recoverWorkerError(r);break}}onBufferFlushed(e,{type:r}){r===ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0,this.state===State.ENDED&&(this.state=State.IDLE))}_handleTransmuxComplete(e){var r;const s="audio",{hls:o}=this,{remuxResult:d,chunkMeta:L}=e,ge=this.getCurrentContext(L);if(!ge){this.resetWhenMissingContext(L);return}const{frag:Mt,part:er,level:tr}=ge,{details:ir}=tr,{audio:rr,text:nr,id3:ar,initSegment:sr}=d;if(this.fragContextChanged(Mt)||!ir){this.fragmentTracker.removeFragment(Mt);return}if(this.state=State.PARSING,this.switchingTrack&&rr&&this.completeAudioSwitch(this.switchingTrack),sr!=null&&sr.tracks){const lr=Mt.initSegment||Mt;this._bufferInitSegment(sr.tracks,lr,L),o.trigger(Events.FRAG_PARSING_INIT_SEGMENT,{frag:lr,id:s,tracks:sr.tracks})}if(rr){const{startPTS:lr,endPTS:cr,startDTS:ur,endDTS:or}=rr;er&&(er.elementaryStreams[ElementaryStreamTypes.AUDIO]={startPTS:lr,endPTS:cr,startDTS:ur,endDTS:or}),Mt.setElementaryStreamInfo(ElementaryStreamTypes.AUDIO,lr,cr,ur,or),this.bufferFragmentData(rr,Mt,er,L)}if(ar!=null&&(r=ar.samples)!=null&&r.length){const lr=_extends({id:s,frag:Mt,details:ir},ar);o.trigger(Events.FRAG_PARSING_METADATA,lr)}if(nr){const lr=_extends({id:s,frag:Mt,details:ir},nr);o.trigger(Events.FRAG_PARSING_USERDATA,lr)}}_bufferInitSegment(e,r,s){if(this.state!==State.PARSING)return;e.video&&delete e.video;const o=e.audio;if(!o)return;o.levelCodec=o.codec,o.id="audio",this.log(`Init audio buffer, container:${o.container}, codecs[parsed]=[${o.codec}]`),this.hls.trigger(Events.BUFFER_CODECS,e);const d=o.initSegment;if(d!=null&&d.byteLength){const L={type:"audio",frag:r,part:null,chunkMeta:s,parent:r.type,data:d};this.hls.trigger(Events.BUFFER_APPENDING,L)}this.tick()}loadFragment(e,r,s){const o=this.fragmentTracker.getState(e);if(this.fragCurrent=e,this.switchingTrack||o===FragmentState.NOT_LOADED||o===FragmentState.PARTIAL){var d;e.sn==="initSegment"?this._loadInitSegment(e,r):(d=r.details)!=null&&d.live&&!this.initPTS[e.cc]?(this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=State.WAITING_INIT_PTS):(this.startFragRequested=!0,super.loadFragment(e,r,s))}else this.clearTrackerIfNeeded(e)}completeAudioSwitch(e){const{hls:r,media:s,bufferedTrack:o}=this,d=o==null?void 0:o.attrs,L=e.attrs;s&&d&&(d.CHANNELS!==L.CHANNELS||d.NAME!==L.NAME||d.LANGUAGE!==L.LANGUAGE)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio")),this.bufferedTrack=e,this.switchingTrack=null,r.trigger(Events.AUDIO_TRACK_SWITCHED,_objectSpread2
3774({},e))}}class AudioTrackController extends BasePlaylistController{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(Events.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(Events.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,r){this.tracks=r.audioTracks||[]}onAudioTrackLoaded(e,r){const{id:s,groupId:o,details:d}=r,L=this.tracksInGroup[s];if(!L||L.groupId!==o){this.warn(`Track with id:${s} and group:${o} not found in active group ${L.groupId}`);return}const ge=L.details;L.details=r.details,this.log(`audio-track ${s} "${L.name}" lang:${L.lang} group:${o} loaded [${d.startSN}-${d.endSN}]`),s===this.trackId&&this.playlistLoaded(s,r,ge)}onLevelLoading(e,r){this.switchLevel(r.level)}onLevelSwitching(e,r){this.switchLevel(r.level)}switchLevel(e){const r=this.hls.levels[e];if(!(r!=null&&r.audioGroupIds))return;const s=r.audioGroupIds[r.urlId];if(this.groupId!==s){this.groupId=s||null;const o=this.tracks.filter(L=>!s||L.groupId===s);this.selectDefaultTrack&&!o.some(L=>L.default)&&(this.selectDefaultTrack=!1),this.tracksInGroup=o;const d={audioTracks:o};this.log(`Updating audio tracks, ${o.length} track(s) found in group:${s}`),this.hls.trigger(Events.AUDIO_TRACKS_UPDATED,d),this.selectInitialTrack()}else this.shouldReloadPlaylist(this.currentTrack)&&this.setAudioTrack(this.trackId)}onError(e,r){r.fatal||!r.context||r.context.type===PlaylistContextType.AUDIO_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&(this.requestScheduled=-1,this.checkRetry(r))}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioTrack(e){const r=this.tracksInGroup;if(e<0||e>=r.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();const s=this.currentTrack;r[this.trackId];const o=r[e],{groupId:d,name:L}=o;if(this.log(`Switching to audio-track ${e} "${L}" lang:${o.lang} group:${d}`),this.trackId=e,this.currentTrack=o,this.selectDefaultTrack=!1,this.hls.trigger(Events.AUDIO_TRACK_SWITCHING,_objectSpread2({},o)),o.details&&!o.details.live)return;const ge=this.switchParams(o.url,s==null?void 0:s.details);this.loadPlaylist(ge)}selectInitialTrack(){const e=this.tracksInGroup,r=this.findTrackId(this.currentTrack)|this.findTrackId(null);if(r!==-1)this.setAudioTrack(r);else{const s=new Error(`No track found for running audio group-ID: ${this.groupId} track count: ${e.length}`);this.warn(s.message),this.hls.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:s})}}findTrackId(e){const r=this.tracksInGroup;for(let s=0;s<r.length;s++){const o=r[s];if((!this.selectDefaultTrack||o.default)&&(!e||e.attrs["STABLE-RENDITION-ID"]!==void 0&&e.attrs["STABLE-RENDITION-ID"]===o.attrs["STABLE-RENDITION-ID"]||e.name===o.name&&e.lang===o.lang))return o.id}return-1}loadPlaylist(e){super.loadPlaylist();const r=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(r)){const s=r.id,o=r.groupId;let d=r.url;if(e)try{d=e.addDirectives(d)}catch(L){this.warn(`Could not construct new URL with HLS Delivery Directives: ${L}`)}this.log(`loading audio-track playlist ${s} "${r.name}" lang:${r.lang} group:${o}`),this.clearTimer(),this.hls.trigger(Events.AUDIO_TRACK_LOADING,{url:d,id:s,groupId:o,deliveryDirectives:e||null})}}}function subtitleOptionsIdentical(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!subtitleAttributesIdentical(t[r].attrs,e[r].attrs))return!1;return!0}function subtitleAttributesIdentical(t,e){const r=t["STABLE-RENDITION-ID"];return r?r===e["STABLE-RENDITION-ID"]:!["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED"].some(s=>t[s]!==e[s])}const TICK_INTERVAL=500;class SubtitleStreamController extends BaseStreamController{constructor(e,r,s){super(e,r,s,"[subtitle-stream-controller]",PlaylistLevelType.SUBTITLE),this.levels=[],this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;
vendor: 9,292 bytes, line 3774
3774e.on(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Events.ERROR,this.onError,this),e.on(Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Events.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Events.ERROR,this.onError,this),e.off(Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Events.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=State.IDLE,this.setInterval(TICK_INTERVAL),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,r){this.mainDetails=r.details}onSubtitleFragProcessed(e,r){const{frag:s,success:o}=r;if(this.fragPrevious=s,this.state=State.IDLE,!o)return;const d=this.tracksBuffered[this.currentTrackId];if(!d)return;let L;const ge=s.start;for(let er=0;er<d.length;er++)if(ge>=d[er].start&&ge<=d[er].end){L=d[er];break}const Mt=s.start+s.duration;L?L.end=Mt:(L={start:ge,end:Mt},d.push(L)),this.fragmentTracker.fragBuffered(s)}onBufferFlushing(e,r){const{startOffset:s,endOffset:o}=r;if(s===0&&o!==Number.POSITIVE_INFINITY){const d=o-1;if(d<=0)return;r.endOffsetSubtitles=Math.max(0,d),this.tracksBuffered.forEach(L=>{for(let ge=0;ge<L.length;){if(L[ge].end<=d){L.shift();continue}else if(L[ge].start<d)L[ge].start=d;else break;ge++}}),this.fragmentTracker.removeFragmentsInRange(s,d,PlaylistLevelType.SUBTITLE)}}onFragBuffered(e,r){if(!this.loadedmetadata&&r.frag.type===PlaylistLevelType.MAIN){var s;(s=this.media)!=null&&s.buffered.length&&(this.loadedmetadata=!0)}}onError(e,r){const s=r.frag;(s==null?void 0:s.type)===PlaylistLevelType.SUBTITLE&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==State.STOPPED&&(this.state=State.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:r}){if(subtitleOptionsIdentical(this.levels,r)){this.levels=r.map(s=>new Level(s));return}this.tracksBuffered=[],this.levels=r.map(s=>{const o=new Level(s);return this.tracksBuffered[o.id]=[],o}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,PlaylistLevelType.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,r){if(this.currentTrackId=r.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}const s=this.levels[this.currentTrackId];s!=null&&s.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,s&&this.setInterval(TICK_INTERVAL)}onSubtitleTrackLoaded(e,r){var s;const{details:o,id:d}=r,{currentTrackId:L,levels:ge}=this;if(!ge.length)return;const Mt=ge[L];if(d>=ge.length||d!==L||!Mt)return;this.mediaBuffer=this.mediaBufferTimeRanges;let er=0;if(o.live||(s=Mt.details)!=null&&s.live){const tr=this.mainDetails;if(o.deltaUpdateFailed||!tr)return;const ir=tr.fragments[0];Mt.details?(er=this.alignPlaylists(o,Mt.details),er===0&&ir&&(er=ir.start,addSliding(o,er))):o.hasProgramDateTime&&tr.hasProgramDateTime?(alignMediaPlaylistByPDT(o,tr),er=o.fragments[0].start):ir&&(er=ir.start,addSliding(o,er))}Mt.details=o,this.levelLastLoaded=d,!this.startFragRequested&&(this.mainDetails||!o.live)&&this.setStartPosition(Mt.details,er),this.tick(),o.live&&!this.fragCurrent&&this.media&&this.state===State.IDLE&&(findFragmentByPTS(null,o.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),Mt.details=void 0))}_handleFragmentLoadComplete(e){const{frag:r,payload:s}=e,o=r.decryptdata,d=this.hls;if(!this.fragContextChanged(r)&&s&&s.byteLength>0&&o&&o.key&&o.iv&&o.method==="AES-128"){const L=performance.now();this.decrypter.decrypt(new Uint8Array(s),o.key.buffer,o.iv.buffer).catch(ge=>{throw d.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!1,error:ge,reason:ge.message,frag:r}),ge}).then(ge=>{const Mt=performance.now();d.trigger(Events.FRAG_DECRYPTED,{frag:r,payload:ge,stats:{tstart:L,tdecrypt:Mt}})}).catch(ge=>{this.warn(`${ge.name}: ${ge.message}`),this.state=State.IDLE})}}doTick(){if(!this.media){this.state=State.IDLE;return}if(this.state===State.IDLE){const{currentTrackId:e,levels:r}=this,s=r[e];if(!r.length||!s||!s.details)return;const{config:o}=this,d=this.getLoadPosition(),L=BufferHelper.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],d,o.maxBufferHole),{end:ge,len:Mt}=L,er=this.getFwdBufferInfo(this.media,PlaylistLevelType.MAIN),tr=s.details,ir=this.getMaxBufferLength(er==null?void 0:er.len)+tr.levelTargetDuration;if(Mt>ir)return;const rr=tr.fragments,nr=rr.length,ar=tr.edge;let sr=null;const lr=this.fragPrevious;if(ge<ar){const cr=o.maxFragLookUpTolerance,ur=ge>ar-cr?0:cr;sr=findFragmentByPTS(lr,rr,Math.max(rr[0].start,ge),ur),!sr&&lr&&lr.start<rr[0].start&&(sr=rr[0])}else sr=rr[nr-1];if(!sr)return;if(sr=this.mapToInitFragWhenRequired(sr),sr.sn!=="initSegment"){const cr=sr.sn-tr.startSN,ur=rr[cr-1];ur&&ur.cc===sr.cc&&this.fragmentTracker.getState(ur)===FragmentState.NOT_LOADED&&(sr=ur)}this.fragmentTracker.getState(sr)===FragmentState.NOT_LOADED&&this.loadFragment(sr,s,ge)}}getMaxBufferLength(e){const r=super.getMaxBufferLength();return e?Math.max(r,e):r}loadFragment(e,r,s){this.fragCurrent=e,e.sn==="initSegment"?this._loadInitSegment(e,r):(this.startFragRequested=!0,super.loadFragment(e,r,s))}get mediaBufferTimeRanges(){return new BufferableInstance(this.tracksBuffered[this.currentTrackId]||[])}}class BufferableInstance{constructor(e){this.buffered=void 0;const r=(s,o,d)=>{if(o=o>>>0,o>d-1)throw new DOMException(`Failed to execute '${s}' on 'TimeRanges': The index provided (${o}) is greater than the maximum bound (${d})`);return e[o][s]};this.buffered={get length(){return e.length},end(s){return r("end",s,e.length)},start(s){return r("start",s,e.length)}}}}class SubtitleTrackController extends BasePlaylistController{constructor(e){super(e,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.trackChangeListener=()=>this.onTextTracksChanged(),this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes(this.trackId)}registerListeners(){const{hls:e}=this;e.on(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(Events.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(Events.ERROR,this.onError,this)}onMediaAttached(e,r){this.media=r.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))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),filterSubtitleTracks(this.media.textTracks).forEac
3774h(r=>{clearCurrentCues(r)}),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,r){this.tracks=r.subtitleTracks}onSubtitleTrackLoaded(e,r){const{id:s,details:o}=r,{trackId:d}=this,L=this.tracksInGroup[d];if(!L){this.warn(`Invalid subtitle track id ${s}`);return}const ge=L.details;L.details=r.details,this.log(`subtitle track ${s} loaded [${o.startSN}-${o.endSN}]`),s===this.trackId&&this.playlistLoaded(s,r,ge)}onLevelLoading(e,r){this.switchLevel(r.level)}onLevelSwitching(e,r){this.switchLevel(r.level)}switchLevel(e){const r=this.hls.levels[e];if(!(r!=null&&r.textGroupIds))return;const s=r.textGroupIds[r.urlId],o=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;if(this.groupId!==s){const d=this.tracks.filter(Mt=>!s||Mt.groupId===s);this.tracksInGroup=d;const L=this.findTrackId(o==null?void 0:o.name)||this.findTrackId();this.groupId=s||null;const ge={subtitleTracks:d};this.log(`Updating subtitle tracks, ${d.length} track(s) found in "${s}" group-id`),this.hls.trigger(Events.SUBTITLE_TRACKS_UPDATED,ge),L!==-1&&this.setSubtitleTrack(L,o)}else this.shouldReloadPlaylist(o)&&this.setSubtitleTrack(this.trackId,o)}findTrackId(e){const r=this.tracksInGroup;for(let s=0;s<r.length;s++){const o=r[s];if((!this.selectDefaultTrack||o.default)&&(!e||e===o.name))return o.id}return-1}onError(e,r){r.fatal||!r.context||r.context.type===PlaylistContextType.SUBTITLE_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.checkRetry(r)}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1;const r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,r)}loadPlaylist(e){super.loadPlaylist();const r=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(r)){const s=r.id,o=r.groupId;let d=r.url;if(e)try{d=e.addDirectives(d)}catch(L){this.warn(`Could not construct new URL with HLS Delivery Directives: ${L}`)}this.log(`Loading subtitle playlist for id ${s}`),this.hls.trigger(Events.SUBTITLE_TRACK_LOADING,{url:d,id:s,groupId:o,deliveryDirectives:e||null})}}toggleTrackModes(e){const{media:r,trackId:s}=this;if(!r)return;const o=filterSubtitleTracks(r.textTracks),d=o.filter(ge=>ge.groupId===this.groupId);if(e===-1)[].slice.call(o).forEach(ge=>{ge.mode="disabled"});else{const ge=d[s];ge&&(ge.mode="disabled")}const L=d[e];L&&(L.mode=this.subtitleDisplay?"showing":"hidden")}setSubtitleTrack(e,r){var s;const o=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(this.trackId!==e&&this.toggleTrackModes(e),this.trackId===e&&(e===-1||(s=o[e])!=null&&s.details)||e<-1||e>=o.length)return;this.clearTimer();const d=o[e];if(this.log(`Switching to subtitle-track ${e}`+(d?` "${d.name}" lang:${d.lang} group:${d.groupId}`:"")),this.trackId=e,d){const{id:L,groupId:ge="",name:Mt,type:er,url:tr}=d;this.hls.trigger(Events.SUBTITLE_TRACK_SWITCH,{id:L,groupId:ge,name:Mt,type:er,url:tr});const ir=this.switchParams(d.url,r==null?void 0:r.details);this.loadPlaylist(ir)}else this.hls.trigger(Events.SUBTITLE_TRACK_SWITCH,{id:e})}onTextTracksChanged(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=-1;const r=filterSubtitleTracks(this.media.textTracks);for(let s=0;s<r.length;s++)if(r[s].mode==="hidden")e=s;else if(r[s].mode==="showing"){e=s;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}}function filterSubtitleTracks(t){const e=[];for(let r=0;r<t.length;r++){const s=t[r];(s.kind==="subtitles"||s.kind==="captions")&&s.label&&e.push(t[r])}return e}class BufferOperationQueue{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,r){const s=this.queues[r];s.push(e),s.length===1&&this.buffers[r]&&this.executeNext(r)}insertAbort(e,r){this.queues[r].unshift(e),this.executeNext(r)}appendBlocker(e){let r;const s=new Promise(d=>{r=d}),o={execute:r,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(o,e),s}executeNext(e){const{buffers:r,queues:s}=this,o=r[e],d=s[e];if(d.length){const L=d[0];try{L.execute()}catch(ge){logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),L.onError(ge),o!=null&&o.updating||(d.shift(),this.executeNext(e))}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const MediaSource=getMediaSource(),VIDEO_CODEC_PROFILE_REPACE=/([ha]vc.)(?:\.[^.,]+)+/;class BufferController{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=()=>{const{media:r,mediaSource:s}=this;logger.log("[buffer-controller]: Media source opened"),r&&(r.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(Events.MEDIA_ATTA
3774CHED,{media:r})),s&&s.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=()=>{logger.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=()=>{const{media:r,_objectUrl:s}=this;r&&r.src!==s&&logger.error(`Media element src was set while attaching MediaSource (${s} > ${r.src})`)},this.hls=e,this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null}registerListeners(){const{hls:e}=this;e.on(Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Events.BUFFER_RESET,this.onBufferReset,this),e.on(Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(Events.BUFFER_EOS,this.onBufferEos,this),e.on(Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(Events.FRAG_PARSED,this.onFragParsed,this),e.on(Events.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Events.BUFFER_RESET,this.onBufferReset,this),e.off(Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(Events.BUFFER_EOS,this.onBufferEos,this),e.off(Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(Events.FRAG_PARSED,this.onFragParsed,this),e.off(Events.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new BufferOperationQueue(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,r){let s=2;(r.audio&&!r.video||!r.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,logger.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,r){const s=this.media=r.media;if(s&&MediaSource){const o=this.mediaSource=new MediaSource;o.addEventListener("sourceopen",this._onMediaSourceOpen),o.addEventListener("sourceended",this._onMediaSourceEnded),o.addEventListener("sourceclose",this._onMediaSourceClose),s.src=self.URL.createObjectURL(o),this._objectUrl=s.src,s.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:r,_objectUrl:s}=this;if(r){if(logger.log("[buffer-controller]: media source detaching"),r.readyState==="open")try{r.endOfStream()}catch(o){logger.warn(`[buffer-controller]: onMediaDetaching: ${o.message} while calling endOfStream`)}this.onBufferReset(),r.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("sourceended",this._onMediaSourceEnded),r.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(e.removeEventListener("emptied",this._onMediaEmptied),s&&self.URL.revokeObjectURL(s),e.src===s?(e.removeAttribute("src"),e.load()):logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(Events.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach(e=>{const r=this.sourceBuffer[e];try{r&&(this.removeBufferListeners(e),this.mediaSource&&this.mediaSource.removeSourceBuffer(r),this.sourceBuffer[e]=void 0)}catch(s){logger.warn(`[buffer-controller]: Failed to reset the ${e} buffer`,s)}}),this._initSourceBuffer()}onBufferCodecs(e,r){const s=this.getSourceBufferTypes().length;Object.keys(r).forEach(o=>{if(s){const d=this.tracks[o];if(d&&typeof d.buffer.changeType=="function"){const{id:L,codec:ge,levelCodec:Mt,container:er,metadata:tr}=r[o],ir=(d.levelCodec||d.codec).replace(VIDEO_CODEC_PROFILE_REPACE,"$1"),rr=(Mt||ge).replace(VIDEO_CODEC_PROFILE_REPACE,"$1");if(ir!==rr){const nr=`${er};codecs=${Mt||ge}`;this.appendChangeType(o,nr),logger.log(`[buffer-controller]: switching codec ${ir} to ${rr}`),this.tracks[o]={buffer:d.buffer,codec:ge,container:er,levelCodec:Mt,metadata:tr,id:L}}}}else this.pendingTracks[o]=r[o]}),!s&&(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())}appendChangeType(e,r){const{operationQueue:s}=this,o={execute:()=>{const d=this.sourceBuffer[e];d&&(logger.log(`[buffer-controller]: changing ${e} sourceBuffer type to ${r}`),d.changeType(r)),s.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:d=>{logger.warn(`[buffer-controller]: Failed to change ${e} SourceBuffer type`,d)}};s.append(o,e)}onBufferAppending(e,r){const{hls:s,operationQueue:o,tracks:d}=this,{data:L,type:ge,frag:Mt,part:er,chunkMeta:tr}=r,ir=tr.buffering[ge],rr=self.performance.now();ir.start=rr;const nr=Mt.stats.buffering,ar=er?er.stats.buffering:null;nr.start===0&&(nr.start=rr),ar&&ar.start===0&&(ar.start=rr);const sr=d.audio;let lr=!1;ge==="audio"&&(sr==null?void 0:sr.container)==="audio/mpeg"&&(lr=!this.lastMpegAudioChunk||tr.id===1||this.lastMpegAudioChunk.sn!==tr.sn,this.lastMpegAudioChunk=tr);const cr=Mt.start,ur={execute:()=>{if(ir.executeStart=self.performance.now(),lr){const or=this.sourceBuffer[ge];if(or){const dr=cr-or.timestampOffset;Math.abs(dr)>=.1&&(logger.log(`[buffer-controller]: Updating audio SourceBuffer timestampOffset to ${cr} (delta: ${dr}) sn: ${Mt.sn})`),or.timestampOffset=cr)}}this.appendExecutor(L,ge)},onStart:()=>{},onComplete:()=>{const or=self.performance.now();ir.executeEnd=ir.end=or,nr.first===0&&(nr.first=or),ar&&ar.first===0&&(ar.first=or);const{sourceBuffer:dr}=this,hr={};for(const pr in dr)hr[pr]=BufferHelper.getBuffered(dr[pr]);this.appendError=0,this.hls.trigger(Events.BUFFER_APPENDED,{type:ge,frag:Mt,part:er,chunkMeta:tr,parent:Mt.type,timeRanges:hr})},onError:or=>{logger.error(`[buffer-controller]: Error encountered while trying to append to the ${ge} SourceBuffer`,or);const dr={type:ErrorTypes.MEDIA_ERROR,parent:Mt.type,details:ErrorDetails.BUFFER_APPEND_ERROR,frag:Mt,part:er,chunkMeta:tr,error:or,err:or,fatal:!1};or.code===DOMException.QUOTA_EXCEEDED_ERR?dr.details=ErrorDetails.BUFFER_FULL_ERROR:(this.appendError++,dr.details=ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>
3774s.config.appendErrorMaxRetry&&(logger.error(`[buffer-controller]: Failed ${s.config.appendErrorMaxRetry} times to append segment in sourceBuffer`),dr.fatal=!0)),s.trigger(Events.ERROR,dr)}};o.append(ur,ge)}onBufferFlushing(e,r){const{operationQueue:s}=this,o=d=>({execute:this.removeExecutor.bind(this,d,r.startOffset,r.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(Events.BUFFER_FLUSHED,{type:d})},onError:L=>{logger.warn(`[buffer-controller]: Failed to remove from ${d} SourceBuffer`,L)}});r.type?s.append(o(r.type),r.type):this.getSourceBufferTypes().forEach(d=>{s.append(o(d),d)})}onFragParsed(e,r){const{frag:s,part:o}=r,d=[],L=o?o.elementaryStreams:s.elementaryStreams;L[ElementaryStreamTypes.AUDIOVIDEO]?d.push("audiovideo"):(L[ElementaryStreamTypes.AUDIO]&&d.push("audio"),L[ElementaryStreamTypes.VIDEO]&&d.push("video"));const ge=()=>{const Mt=self.performance.now();s.stats.buffering.end=Mt,o&&(o.stats.buffering.end=Mt);const er=o?o.stats:s.stats;this.hls.trigger(Events.FRAG_BUFFERED,{frag:s,part:o,stats:er,id:s.type})};d.length===0&&logger.warn(`Fragments must have at least one ElementaryStreamType set. type: ${s.type} level: ${s.level} sn: ${s.sn}`),this.blockBuffers(ge,d)}onFragChanged(e,r){this.flushBackBuffer()}onBufferEos(e,r){this.getSourceBufferTypes().reduce((o,d)=>{const L=this.sourceBuffer[d];return L&&(!r.type||r.type===d)&&(L.ending=!0,L.ended||(L.ended=!0,logger.log(`[buffer-controller]: ${d} sourceBuffer now EOS`))),o&&!!(!L||L.ended)},!0)&&(logger.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(d=>{const L=this.sourceBuffer[d];L&&(L.ending=!1)});const{mediaSource:o}=this;if(!o||o.readyState!=="open"){o&&logger.info(`[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: ${o.readyState}`);return}logger.log("[buffer-controller]: Calling mediaSource.endOfStream()"),o.endOfStream()}))}onLevelUpdated(e,{details:r}){r.fragments.length&&(this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}flushBackBuffer(){const{hls:e,details:r,media:s,sourceBuffer:o}=this;if(!s||r===null)return;const d=this.getSourceBufferTypes();if(!d.length)return;const L=r.live&&e.config.liveBackBufferLength!==null?e.config.liveBackBufferLength:e.config.backBufferLength;if(!isFiniteNumber(L)||L<0)return;const ge=s.currentTime,Mt=r.levelTargetDuration,er=Math.max(L,Mt),tr=Math.floor(ge/Mt)*Mt-er;d.forEach(ir=>{const rr=o[ir];if(rr){const nr=BufferHelper.getBuffered(rr);if(nr.length>0&&tr>nr.start(0)){if(e.trigger(Events.BACK_BUFFER_REACHED,{bufferEnd:tr}),r.live)e.trigger(Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:tr});else if(rr.ended&&nr.end(nr.length-1)-ge<Mt*2){logger.info(`[buffer-controller]: Cannot flush ${ir} back buffer while SourceBuffer is in ended state`);return}e.trigger(Events.BUFFER_FLUSHING,{startOffset:0,endOffset:tr,type:ir})}}})}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;const{details:e,hls:r,media:s,mediaSource:o}=this,d=e.fragments[0].start+e.totalduration,L=s.duration,ge=isFiniteNumber(o.duration)?o.duration:0;e.live&&r.config.liveDurationInfinity?(logger.log("[buffer-controller]: Media Source duration is set to Infinity"),o.duration=1/0,this.updateSeekableRange(e)):(d>ge&&d>L||!isFiniteNumber(L))&&(logger.log(`[buffer-controller]: Updating Media Source duration to ${d.toFixed(3)}`),o.duration=d)}updateSeekableRange(e){const r=this.mediaSource,s=e.fragments;if(s.length&&e.live&&r!=null&&r.setLiveSeekableRange){const d=Math.max(0,s[0].start),L=Math.max(d,d+e.totalduration);r.setLiveSeekableRange(d,L)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:r,pendingTracks:s}=this,o=Object.keys(s).length;if(o&&!e||o===2){this.createSourceBuffers(s),this.pendingTracks={};const d=this.getSourceBufferTypes();if(d.length)this.hls.trigger(Events.BUFFER_CREATED,{tracks:this.tracks}),d.forEach(L=>{r.executeNext(L)});else{const L=new Error("could not create source buffer for media codec(s)");this.hls.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:L,reason:L.message})}}}createSourceBuffers(e){const{sourceBuffer:r,mediaSource:s}=this;if(!s)throw Error("createSourceBuffers called when mediaSource was null");for(const o in e)if(!r[o]){const d=e[o];if(!d)throw Error(`source buffer exists for track ${o}, however track does not`);const L=d.levelCodec||d.codec,ge=`${d.container};codecs=${L}`;logger.log(`[buffer-controller]: creating sourceBuffer(${ge})`);try{const Mt=r[o]=s.addSourceBuffer(ge),er=o;this.addBufferListener(er,"updatestart",this._onSBUpdateStart),this.addBufferListener(er,"updateend",this._onSBUpdateEnd),this.addBufferListener(er,"error",this._onSBUpdateError),this.tracks[o]={buffer:Mt,codec:L,container:d.container,levelCodec:d.levelCodec,metadata:d.metadata,id:d.id}}catch(Mt){logger.error(`[buffer-controller]: error while trying to add sourceBuffer: ${Mt.message}`),this.hls.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:Mt,mimeType:ge})}}}_onSBUpdateStart(e){const{operationQueue:r}=this;r.current(e).onStart()}_onSBUpdateEnd(e){const{operationQueue:r}=this;r.current(e).onComplete(),r.shiftAndExecuteNext(e)}_onSBUpdateError(e,r){const s=new Error(`${e} SourceBuffer error`);logger.error(`[buffer-controller]: ${s}`,r),this.hls.trigger(Events.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.BUFFER_APPENDING_ERROR,error:s,fatal:!1});const o=this.operationQueue.current(e);o&&o.onError(r)}removeExecutor(e,r,s){const{media:o,mediaSource:d,operationQueue:L,sourceBuffer:ge}=this,Mt=ge[e];if(!o||!d||!Mt){logger.warn(`[buffer-controller]: Attempting to remove from the ${e} SourceBuffer, but it does not exist`),L.shiftAndExecuteNext(e);return}const er=isFiniteNumber(o.duration)?o.duration:1/0,tr=isFiniteNumber(d.duration)?d.duration:1/0,ir=Math.max(0,r),rr=Math.min(s,er,tr);rr>ir&&!Mt.ending?(Mt.ended=!1,logger.log(`[buffer-controller]: Removing [${ir},${rr}] from the ${e} SourceBuffer`),Mt.remove(ir,rr)):L.shiftAndExecuteNext(e)}appendExecutor(e,r){const{operationQueue:s,sourceBuffer:o}=this,d=o[r];if(!d){logger.warn(`[buffer-controller]: Attempting to append to the ${r} SourceBuffer, but it does not exist`),s.shiftAndExecuteNext(r);return}d.ended=!1,d.appendBuffer(e)}blockBuffers(e,r=this.getSourceBufferTypes()){if(!r.length){logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);return}const{operationQueue:s}=this,o=r.map(d=>
3774s.appendBlocker(d));Promise.all(o).then(()=>{e(),r.forEach(d=>{const L=this.sourceBuffer[d];L!=null&&L.updating||s.shiftAndExecuteNext(d)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,r,s){const o=this.sourceBuffer[e];if(!o)return;const d=s.bind(this,e);this.listeners[e].push({event:r,listener:d}),o.addEventListener(r,d)}removeBufferListeners(e){const r=this.sourceBuffer[e];r&&this.listeners[e].forEach(s=>{r.removeEventListener(s.event,s.listener)})}}const specialCea608CharsCodes={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},getCharForByte=function t(e){let r=e;return specialCea608CharsCodes.hasOwnProperty(e)&&(r=specialCea608CharsCodes[e]),String.fromCharCode(r)},NR_ROWS=15,NR_COLS=100,rowsLowCh1={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},rowsHighCh1={17:2,18:4,21:6,22:8,23:10,19:13,20:15},rowsLowCh2={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},rowsHighCh2={25:2,26:4,29:6,30:8,31:10,27:13,28:15},backgroundColors=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class CaptionsLogger{constructor(){this.time=null,this.verboseLevel=0}log(e,r){if(this.verboseLevel>=e){const s=typeof r=="function"?r():r;logger.log(`${this.time} [${e}] ${s}`)}}}const numArrayToHexArray=function t(e){const r=[];for(let s=0;s<e.length;s++)r.push(e[s].toString(16));return r};class PenState{constructor(e,r,s,o,d){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=r||!1,this.italics=s||!1,this.background=o||"black",this.flash=d||!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const r=["foreground","underline","italics","background","flash"];for(let s=0;s<r.length;s++){const o=r[s];e.hasOwnProperty(o)&&(this[o]=e[o])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class StyledUnicodeChar{constructor(e,r,s,o,d,L){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new PenState(r,s,o,d,L)}reset(){this.uchar=" ",this.penState.reset()}setChar(e,r){this.uchar=e,this.penState.copy(r)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}class Row{constructor(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(let r=0;r<NR_COLS;r++)this.chars.push(new StyledUnicodeChar);this.logger=e,this.pos=0,this.currPenState=new PenState}equals(e){let r=!0;for(let s=0;s<NR_COLS;s++)if(!this.chars[s].equals(e.chars[s])){r=!1;break}return r}copy(e){for(let r=0;r<NR_COLS;r++)this.chars[r].copy(e.chars[r])}isEmpty(){let e=!0;for(let r=0;r<NR_COLS;r++)if(!this.chars[r].isEmpty()){e=!1;break}return e}
vendor: 5,961 bytes, lines 3774-3775
3774setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>NR_COLS&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=NR_COLS)}moveCursor(e){const r=this.pos+e;if(e>1)for(let s=this.pos+1;s<r+1;s++)this.chars[s].setPenState(this.currPenState);this.setCursor(r)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const r=getCharForByte(e);if(this.pos>=NR_COLS){this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+r+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(r,this.currPenState),this.moveCursor(1)}clearFromPos(e){let r;for(r=e;r<NR_COLS;r++)this.chars[r].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let r=!0;for(let s=0;s<NR_COLS;s++){const o=this.chars[s].uchar;o!==" "&&(r=!1),e.push(o)}return r?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class CaptionScreen{constructor(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(let r=0;r<NR_ROWS;r++)this.rows.push(new Row(e));this.logger=e,this.currRow=NR_ROWS-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}reset(){for(let e=0;e<NR_ROWS;e++)this.rows[e].clear();this.currRow=NR_ROWS-1}equals(e){let r=!0;for(let s=0;s<NR_ROWS;s++)if(!this.rows[s].equals(e.rows[s])){r=!1;break}return r}copy(e){for(let r=0;r<NR_ROWS;r++)this.rows[r].copy(e.rows[r])}isEmpty(){let e=!0;for(let r=0;r<NR_ROWS;r++)if(!this.rows[r].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+JSON.stringify(e));let r=e.row-1;if(this.nrRollUpRows&&r<this.nrRollUpRows-1&&(r=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==r){for(let ge=0;ge<NR_ROWS;ge++)this.rows[ge].clear();const d=this.currRow+1-this.nrRollUpRows,L=this.lastOutputScreen;if(L){const ge=L.rows[d].cueStartTime,Mt=this.logger.time;if(ge&&Mt!==null&&ge<Mt)for(let er=0;er<this.nrRollUpRows;er++)this.rows[r-this.nrRollUpRows+er+1].copy(L.rows[d+er])}}this.currRow=r;const s=this.rows[this.currRow];if(e.indent!==null){const d=e.indent,L=Math.max(d-1,0);s.setCursor(e.indent),e.color=s.chars[L].penState.foreground}const o={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(o)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,r=this.rows.splice(e,1)[0];r.clear(),this.rows.splice(this.currRow,0,r),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const r=[];let s="",o=-1;for(let d=0;d<NR_ROWS;d++){const L=this.rows[d].getTextString();L&&(o=d+1,e?r.push("Row "+o+": '"+L+"'"):r.push(L.trim()))}return r.length>0&&(e?s="["+r.join(" | ")+"]":s=r.join(` 3775`)),s}getTextAndFormat(){return this.rows}}class Cea608Channel{constructor(e,r,s){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=e,this.outputFilter=r,this.mode=null,this.verbose=0,this.displayedMemory=new CaptionScreen(s),this.nonDisplayedMemory=new CaptionScreen(s),this.lastOutputScreen=new CaptionScreen(s),this.currRollUpRow=this.displayedMemory.rows[NR_ROWS-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=s}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[NR_ROWS-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let s=0;s<e.length;s++)this.writeScreen.insertChar(e[s]);const r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>r+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}
3775ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const r={flash:!1};if(r.underline=e%2===1,r.italics=e>=46,r.italics)r.foreground="white";else{const s=Math.floor(e/2)-16,o=["white","green","blue","cyan","red","yellow","magenta"];r.foreground=o[s]}this.logger.log(2,"MIDROW: "+JSON.stringify(r)),this.writeScreen.setPen(r)}outputDataUpdate(e=!1){const r=this.logger.time;r!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=r:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,r,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:r),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class Cea608Parser{constructor(e,r,s){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;const o=new CaptionsLogger;this.channels=[null,new Cea608Channel(e,r,o),new Cea608Channel(e+1,s,o)],this.cmdHistory=createCmdHistory(),this.logger=o}getHandler(e){return this.channels[e].getHandler()}setHandler(e,r){this.channels[e].setHandler(r)}addData(e,r){let s,o,d,L=!1;this.logger.time=e;for(let ge=0;ge<r.length;ge+=2)if(o=r[ge]&127,d=r[ge+1]&127,!(o===0&&d===0)){if(this.logger.log(3,"["+numArrayToHexArray([r[ge],r[ge+1]])+"] -> ("+numArrayToHexArray([o,d])+")"),s=this.parseCmd(o,d),s||(s=this.parseMidrow(o,d)),s||(s=this.parsePAC(o,d)),s||(s=this.parseBackgroundAttributes(o,d)),!s&&(L=this.parseChars(o,d),L)){const Mt=this.currentChannel;Mt&&Mt>0?this.channels[Mt].insertChars(L):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!L&&this.logger.log(2,"Couldn't parse cleaned data "+numArrayToHexArray([o,d])+" orig: "+numArrayToHexArray([r[ge],r[ge+1]]))}}parseCmd(e,r){const{cmdHistory:s}=this,o=(e===20||e===28||e===21||e===29)&&r>=32&&r<=47,d=(e===23||e===31)&&r>=33&&r<=35;if(!(o||d))return!1;if(hasCmdRepeated(e,r,s))return setLastCmd(null,null,s),this.logger.log(3,"Repeated command ("+numArrayToHexArray([e,r])+") is dropped"),!0;const L=e===20||e===21||e===23?1:2,ge=this.channels[L];return e===20||e===21||e===28||e===29?r===32?ge.ccRCL():r===33?ge.ccBS():r===34?ge.ccAOF():r===35?ge.ccAON():r===36?ge.ccDER():r===37?ge.ccRU(2):r===38?ge.ccRU(3):r===39?ge.ccRU(4):r===40?ge.ccFON():r===41?ge.ccRDC():r===42?ge.ccTR():r===43?ge.ccRTD():r===44?ge.ccEDM():r===45?ge.ccCR():r===46?ge.ccENM():r===47&&ge.ccEOC():ge.ccTO(r-32),setLastCmd(e,r,s),this.currentChannel=L,!0}parseMidrow(e,r){let s=0;if((e===17||e===25)&&r>=32&&r<=47){if(e===17?s=1:s=2,s!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const o=this.channels[s];return o?(o.ccMIDROW(r),this.logger.log(3,"MIDROW ("+numArrayToHexArray([e,r])+")"),!0):!1}return!1}parsePAC(e,r){let s;const o=this.cmdHistory,d=(e>=17&&e<=23||e>=25&&e<=31)&&r>=64&&r<=127,L=(e===16||e===24)&&r>=64&&r<=95;if(!(d||L))return!1;if(hasCmdRepeated(e,r,o))return setLastCmd(null,null,o),!0;const ge=e<=23?1:2;r>=64&&r<=95?s=ge===1?rowsLowCh1[e]:rowsLowCh2[e]:s=ge===1?rowsHighCh1[e]:rowsHighCh2[e];const Mt=this.channels[ge];
vendor: 7,341 bytes, line 3775
3775return Mt?(Mt.setPAC(this.interpretPAC(s,r)),setLastCmd(e,r,o),this.currentChannel=ge,!0):!1}interpretPAC(e,r){let s;const o={color:null,italics:!1,indent:null,underline:!1,row:e};return r>95?s=r-96:s=r-64,o.underline=(s&1)===1,s<=13?o.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(s/2)]:s<=15?(o.italics=!0,o.color="white"):o.indent=Math.floor((s-16)/2)*4,o}parseChars(e,r){let s,o=null,d=null;if(e>=25?(s=2,d=e-8):(s=1,d=e),d>=17&&d<=19){let L;d===17?L=r+80:d===18?L=r+112:L=r+144,this.logger.log(2,"Special char '"+getCharForByte(L)+"' in channel "+s),o=[L]}else e>=32&&e<=127&&(o=r===0?[e]:[e,r]);if(o){const L=numArrayToHexArray(o);this.logger.log(3,"Char codes = "+L.join(",")),setLastCmd(e,r,this.cmdHistory)}return o}parseBackgroundAttributes(e,r){const s=(e===16||e===24)&&r>=32&&r<=47,o=(e===23||e===31)&&r>=45&&r<=47;if(!(s||o))return!1;let d;const L={};e===16||e===24?(d=Math.floor((r-32)/2),L.background=backgroundColors[d],r%2===1&&(L.background=L.background+"_semi")):r===45?L.background="transparent":(L.foreground="black",r===47&&(L.underline=!0));const ge=e<=23?1:2;return this.channels[ge].setBkgData(L),setLastCmd(e,r,this.cmdHistory),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const r=this.channels[e];r&&r.reset()}this.cmdHistory=createCmdHistory()}cueSplitAtTime(e){for(let r=0;r<this.channels.length;r++){const s=this.channels[r];s&&s.cueSplitAtTime(e)}}}function setLastCmd(t,e,r){r.a=t,r.b=e}function hasCmdRepeated(t,e,r){return r.a===t&&r.b===e}function createCmdHistory(){return{a:null,b:null}}class OutputFilter{constructor(e,r){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=r}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,r,s){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=r,this.screen=s,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var VTTCue$1=function(){if(typeof self<"u"&&self.VTTCue)return self.VTTCue;const t=["","lr","rl"],e=["start","middle","end","left","right"];function r(ge,Mt){if(typeof Mt!="string"||!Array.isArray(ge))return!1;const er=Mt.toLowerCase();return~ge.indexOf(er)?er:!1}function s(ge){return r(t,ge)}function o(ge){return r(e,ge)}function d(ge,...Mt){let er=1;for(;er<arguments.length;er++){const tr=arguments[er];for(const ir in tr)ge[ir]=tr[ir]}return ge}function L(ge,Mt,er){const tr=this,ir={enumerable:!0};tr.hasBeenReset=!1;let rr="",nr=!1,ar=ge,sr=Mt,lr=er,cr=null,ur="",or=!0,dr="auto",hr="start",pr=50,mr="middle",vr=50,Er="middle";Object.defineProperty(tr,"id",d({},ir,{get:function(){return rr},set:function(Cr){rr=""+Cr}})),Object.defineProperty(tr,"pauseOnExit",d({},ir,{get:function(){return nr},set:function(Cr){nr=!!Cr}})),Object.defineProperty(tr,"startTime",d({},ir,{get:function(){return ar},set:function(Cr){if(typeof Cr!="number")throw new TypeError("Start time must be set to a number.");ar=Cr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"endTime",d({},ir,{get:function(){return sr},set:function(Cr){if(typeof Cr!="number")throw new TypeError("End time must be set to a number.");sr=Cr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"text",d({},ir,{get:function(){return lr},set:function(Cr){lr=""+Cr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"region",d({},ir,{get:function(){return cr},set:function(Cr){cr=Cr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"vertical",d({},ir,{get:function(){return ur},set:function(Cr){const Pr=s(Cr);if(Pr===!1)throw new SyntaxError("An invalid or illegal string was specified.");ur=Pr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"snapToLines",d({},ir,{get:function(){return or},set:function(Cr){or=!!Cr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"line",d({},ir,{get:function(){return dr},set:function(Cr){if(typeof Cr!="number"&&Cr!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");dr=Cr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"lineAlign",d({},ir,{get:function(){return hr},set:function(Cr){const Pr=o(Cr);if(!Pr)throw new SyntaxError("An invalid or illegal string was specified.");hr=Pr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"position",d({},ir,{get:function(){return pr},set:function(Cr){if(Cr<0||Cr>100)throw new Error("Position must be between 0 and 100.");pr=Cr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"positionAlign",d({},ir,{get:function(){return mr},set:function(Cr){const Pr=o(Cr);if(!Pr)throw new SyntaxError("An invalid or illegal string was specified.");mr=Pr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"size",d({},ir,{get:function(){return vr},set:function(Cr){if(Cr<0||Cr>100)throw new Error("Size must be between 0 and 100.");vr=Cr,this.hasBeenReset=!0}})),Object.defineProperty(tr,"align",d({},ir,{get:function(){return Er},set:function(Cr){const Pr=o(Cr);if(!Pr)throw new SyntaxError("An invalid or illegal string was specified.");Er=Pr,this.hasBeenReset=!0}})),tr.displayState=void 0}return L.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},L}();class StringDecoder{decode(e,r){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function parseTimeStamp(t){function e(s,o,d,L){return(s|0)*3600+(o|0)*60+(d|0)+parseFloat(L||0)}const r=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return r?parseFloat(r[2])>59?e(r[2],r[3],0,r[4]):e(r[1],r[2],r[3],r[4]):null}class Settings{constructor(){this.values=Object.create(null)}set(e,r){!this.get(e)&&r!==""&&(this.values[e]=r)}get(e,r,s){return s?this.has(e)?this.values[e]:r[s]:this.has(e)?this.values[e]:r}has(e){return e in this.values}alt(e,r,s){for(let o=0;o<s.length;++o)if(r===s[o]){this.set(e,r);break}}integer(e,r){/^-?\d+$/.test(r)&&this.set(e,parseInt(r,10))}percent(e,r){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(r)){const s=parseFloat(r);if(s>=0&&s<=100)return this.set(e,s),!0}return!1}}function parseOptions(t,e,r,s){const o=s?t.split(s):[t];for(const d in o){if(typeof o[d]!="string")continue;const L=o[d].split(r);if(L.length!==2)continue;const ge=L[0],Mt=L[1];e(ge,Mt)}}const defaults=new VTTCue$1(0,0,""),center=defaults.align==="middle"?"middle":"center";function parseCue(t,e,r){const s=t;function o(){const ge=parseTimeStamp(t);if(ge===null)throw new Error("Malformed timestamp: "+s);return t=t.replace(/^[^\sa-zA-Z-]+/,""),ge}function d(ge,Mt){const er=new Settings;parseOptions(ge,function(rr,nr){let ar;switch(rr){case"region":for(let sr=r.length-1;sr>=0;sr--)if(r[sr].id===nr){er.set(rr,r[sr].region);break}break;case"vertical":er.alt(rr,nr,["rl","lr"]);break;case"line":ar=nr.split(","),er.integer(rr,ar[0]),er.percent(rr,ar[0])&&er.set("snapToLines",!1),er.alt(rr,ar[0],["auto"]),ar.length===2&&er.alt("lineAlign",ar[1],["start",center,"end"]);break;case"position":ar=nr.split(","),er.percent(rr,ar[0]),ar.length===2&&er.alt("positionAlign",ar[1],["start",center,"end","line-left","line-right","auto"]);break;case"size":er.percent(rr,nr);break;case"align":er.alt(rr,nr,["start",center,"end","left","right"]);break}}
vendor: 28,902 bytes, lines 3775-3786
3775,/:/,/\s/),Mt.region=er.get("region",null),Mt.vertical=er.get("vertical","");let tr=er.get("line","auto");tr==="auto"&&defaults.line===-1&&(tr=-1),Mt.line=tr,Mt.lineAlign=er.get("lineAlign","start"),Mt.snapToLines=er.get("snapToLines",!0),Mt.size=er.get("size",100),Mt.align=er.get("align",center);let ir=er.get("position","auto");ir==="auto"&&defaults.position===50&&(ir=Mt.align==="start"||Mt.align==="left"?0:Mt.align==="end"||Mt.align==="right"?100:50),Mt.position=ir}function L(){t=t.replace(/^\s+/,"")}if(L(),e.startTime=o(),L(),t.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);t=t.slice(3),L(),e.endTime=o(),L(),d(t,e)}function fixLineBreaks(t){return t.replace(/<br(?: \/)?>/gi,` 3776`)}class VTTParser{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new StringDecoder,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const r=this;e&&(r.buffer+=r.decoder.decode(e,{stream:!0}));function s(){let d=r.buffer,L=0;for(d=fixLineBreaks(d);L<d.length&&d[L]!=="\r"&&d[L]!==` 3777`;)++L;const ge=d.slice(0,L);return d[L]==="\r"&&++L,d[L]===` 3778`&&++L,r.buffer=d.slice(L),ge}function o(d){parseOptions(d,function(L,ge){},/:/)}try{let d="";if(r.state==="INITIAL"){if(!/\r\n|\n/.test(r.buffer))return this;d=s();const ge=d.match(/^()?WEBVTT([ \t].*)?$/);if(!(ge!=null&&ge[0]))throw new Error("Malformed WebVTT signature.");r.state="HEADER"}let L=!1;for(;r.buffer;){if(!/\r\n|\n/.test(r.buffer))return this;switch(L?L=!1:d=s(),r.state){case"HEADER":/:/.test(d)?o(d):d||(r.state="ID");continue;case"NOTE":d||(r.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(d)){r.state="NOTE";break}if(!d)continue;if(r.cue=new VTTCue$1(0,0,""),r.state="CUE",d.indexOf("-->")===-1){r.cue.id=d;continue}case"CUE":if(!r.cue){r.state="BADCUE";continue}try{parseCue(d,r.cue,r.regionList)}catch{r.cue=null,r.state="BADCUE";continue}r.state="CUETEXT";continue;case"CUETEXT":{const ge=d.indexOf("-->")!==-1;if(!d||ge&&(L=!0)){r.oncue&&r.cue&&r.oncue(r.cue),r.cue=null,r.state="ID";continue}if(r.cue===null)continue;r.cue.text&&(r.cue.text+=` 3779`),r.cue.text+=d}continue;case"BADCUE":d||(r.state="ID")}}}catch{r.state==="CUETEXT"&&r.cue&&r.oncue&&r.oncue(r.cue),r.cue=null,r.state=r.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=` 3780 3781`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(r){e.onparsingerror&&e.onparsingerror(r)}return e.onflush&&e.onflush(),this}}const LINEBREAKS=/\r\n|\n\r|\n|\r/g,startsWith=function t(e,r,s=0){return e.slice(s,s+r.length)===r},cueString2millis=function t(e){let r=parseInt(e.slice(-3));const s=parseInt(e.slice(-6,-4)),o=parseInt(e.slice(-9,-7)),d=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!isFiniteNumber(r)||!isFiniteNumber(s)||!isFiniteNumber(o)||!isFiniteNumber(d))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return r+=1e3*s,r+=60*1e3*o,r+=60*60*1e3*d,r},hash=function t(e){let r=5381,s=e.length;for(;s;)r=r*33^e.charCodeAt(--s);return(r>>>0).toString()};function generateCueId(t,e,r){return hash(t.toString())+hash(e.toString())+hash(r)}const calculateOffset=function t(e,r,s){let o=e[r],d=e[o.prevCC];if(!d||!d.new&&o.new){e.ccOffset=e.presentationOffset=o.start,o.new=!1;return}for(;(L=d)!=null&&L.new;){var L;e.ccOffset+=o.start-d.start,o.new=!1,o=d,d=e[o.prevCC]}e.presentationOffset=s};function parseWebVTT(t,e,r,s,o,d,L){const ge=new VTTParser,Mt=utf8ArrayToStr(new Uint8Array(t)).trim().replace(LINEBREAKS,` 3782`).split(` 3783`),er=[],tr=e?toMpegTsClockFromTimescale(e.baseTime,e.timescale):0;let ir="00:00.000",rr=0,nr=0,ar,sr=!0;ge.oncue=function(lr){const cr=r[s];let ur=r.ccOffset;const or=(rr-tr)/9e4;if(cr!=null&&cr.new&&(nr!==void 0?ur=r.ccOffset=cr.start:calculateOffset(r,s,or)),or){if(!e){ar=new Error("Missing initPTS for VTT MPEGTS");return}ur=or-r.presentationOffset}const dr=lr.endTime-lr.startTime,hr=normalizePts((lr.startTime+ur-nr)*9e4,o*9e4)/9e4;lr.startTime=Math.max(hr,0),lr.endTime=Math.max(hr+dr,0);const pr=lr.text.trim();lr.text=decodeURIComponent(encodeURIComponent(pr)),lr.id||(lr.id=generateCueId(lr.startTime,lr.endTime,pr)),lr.endTime>0&&er.push(lr)},ge.onparsingerror=function(lr){ar=lr},ge.onflush=function(){if(ar){L(ar);return}d(er)},Mt.forEach(lr=>{if(sr)if(startsWith(lr,"X-TIMESTAMP-MAP=")){sr=!1,lr.slice(16).split(",").forEach(cr=>{startsWith(cr,"LOCAL:")?ir=cr.slice(6):startsWith(cr,"MPEGTS:")&&(rr=parseInt(cr.slice(7)))});try{nr=cueString2millis(ir)/1e3}catch(cr){ar=cr}return}else lr===""&&(sr=!1);ge.parse(lr+` 3784`)}),ge.flush()}const IMSC1_CODEC="stpp.ttml.im1t",HMSF_REGEX=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,TIME_UNIT_REGEX=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,textAlignToLineAlign={left:"start",center:"center",right:"end",start:"start",end:"end"};function parseIMSC1(t,e,r,s){const o=findBox(new Uint8Array(t),["mdat"]);if(o.length===0){s(new Error("Could not parse IMSC1 mdat"));return}const d=o.map(ge=>utf8ArrayToStr(ge)),L=toTimescaleFromScale(e.baseTime,1,e.timescale);try{d.forEach(ge=>r(parseTTML(ge,L)))}catch(ge){s(ge)}}function parseTTML(t,e){const o=new DOMParser().parseFromString(t,"text/xml").getElementsByTagName("tt")[0];if(!o)throw new Error("Invalid ttml");const d={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},L=Object.keys(d).reduce((ir,rr)=>(ir[rr]=o.getAttribute(`ttp:${rr}`)||d[rr],ir),{}),ge=o.getAttribute("xml:space")!=="preserve",Mt=collectionToDictionary(getElementCollection(o,"styling","style")),er=collectionToDictionary(getElementCollection(o,"layout","region")),tr=getElementCollection(o,"body","[begin]");return[].map.call(tr,ir=>{const rr=getTextContent(ir,ge);if(!rr||!ir.hasAttribute("begin"))return null;const nr=parseTtmlTime(ir.getAttribute("begin"),L),ar=parseTtmlTime(ir.getAttribute("dur"),L);let sr=parseTtmlTime(ir.getAttribute("end"),L);if(nr===null)throw timestampParsingError(ir);if(sr===null){if(ar===null)throw timestampParsingError(ir);sr=nr+ar}const lr=new VTTCue$1(nr-e,sr-e,rr);lr.id=generateCueId(lr.startTime,lr.endTime,lr.text);const cr=er[ir.getAttribute("region")],ur=Mt[ir.getAttribute("style")],or=getTtmlStyles(cr,ur,Mt),{textAlign:dr}=or;if(dr){const hr=textAlignToLineAlign[dr];hr&&(lr.lineAlign=hr),lr.align=dr}return _extends(lr,or),lr}).filter(ir=>ir!==null)}function getElementCollection(t,e,r){const s=t.getElementsByTagName(e)[0];return s?[].slice.call(s.querySelectorAll(r)):[]}function collectionToDictionary(t){return t.reduce((e,r)=>{const s=r.getAttribute("xml:id");return s&&(e[s]=r),e},{})}function getTextContent(t,e){return[].slice.call(t.childNodes).reduce((r,s,o)=>{var d;return s.nodeName==="br"&&o?r+` 3785`:(d=s.childNodes)!=null&&d.length?getTextContent(s,e):e?r+s.textContent.trim().replace(/\s+/g," "):r+s.textContent},"")}function getTtmlStyles(t,e,r){const s="http://www.w3.org/ns/ttml#styling";let o=null;const d=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],L=t!=null&&t.hasAttribute("style")?t.getAttribute("style"):null;return L&&r.hasOwnProperty(L)&&(o=r[L]),d.reduce((ge,Mt)=>{const er=getAttributeNS(e,s,Mt)||getAttributeNS(t,s,Mt)||getAttributeNS(o,s,Mt);return er&&(ge[Mt]=er),ge},{})}function getAttributeNS(t,e,r){return t&&t.hasAttributeNS(e,r)?t.getAttributeNS(e,r):null}function timestampParsingError(t){return new Error(`Could not parse ttml timestamp ${t}`)}function parseTtmlTime(t,e){if(!t)return null;let r=parseTimeStamp(t);return r===null&&(HMSF_REGEX.test(t)?r=parseHoursMinutesSecondsFrames(t,e):TIME_UNIT_REGEX.test(t)&&(r=parseTimeUnits(t,e))),r}function parseHoursMinutesSecondsFrames(t,e){const r=HMSF_REGEX.exec(t),s=(r[4]|0)+(r[5]|0)/e.subFrameRate;return(r[1]|0)*3600+(r[2]|0)*60+(r[3]|0)+s/e.frameRate}function parseTimeUnits(t,e){const r=TIME_UNIT_REGEX.exec(t),s=Number(r[1]);switch(r[2]){case"h":return s*3600;case"m":return s*60;case"ms":return s*1e3;case"f":return s/e.frameRate;case"t":return s/e.tickRate}return s}class TimelineController{constructor(e){if(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.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=newVTTCCs(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.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}},this.config.enableCEA708Captions){const r=new OutputFilter(this,"textTrack1"),s=new OutputFilter(this,"textTrack2"),o=new OutputFilter(this,"textTrack3"),d=new OutputFilter(this,"textTrack4");this.cea608Parser1=new Cea608Parser(1,r,s),this.cea608Parser2=new Cea608Parser(3,o,d)}e.on(Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(Events.FRAG_LOADING,this.onFragLoading,this),e.on(Events.FRAG_LOADED,this.onFragLoaded,this),e.on(Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(Events.FRAG_LOADING,this.onFragLoading,this),e.off(Events.FRAG_LOADED,this.onFragLoaded,this),e.off(Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null}addCues(e,r,s,o,d){let L=!1;for(let ge=d.length;ge--;){const Mt=d[ge],er=intersection(Mt[0],Mt[1],r,s);if(er>=0&&(Mt[0]=Math.min(Mt[0],r),Mt[1]=Math.max(Mt[1],s),L=!0,er/(s-r)>.5))return}if(L||d.push([r,s]),this.config.renderTextTracksNatively){const ge=this.captionsTracks[e];this.Cues.newCue(ge,r,s,o)}else{const ge=this.Cues.newCue(null,r,s,o);this.hls.trigger(Events.CUES_PARSED,{type:"captions",cues:ge,track:e})}}onInitPtsFound(e,{frag:r,id:s,initPTS:o,timescale:d}){const{unparsedVttFrags:L}=this;s==="main"&&(this.initPTS[r.cc]={baseTime:o,timescale:d}),L.length&&(this.unparsedVttFrags=[],L.forEach(ge=>{this.onFragLoaded(Events.FRAG_LOADED,ge)}))}getExistingTrack(e){const{media:r}=this;if(r)for(let s=0;s<r.textTracks.length;s++){const o=r.textTracks[s];if(o[e])return o}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:r,captionsTracks:s,media:o}=this,{label:d,languageCode:L}=r[e],ge=this.getExistingTrack(e);if(ge)s[e]=ge,clearCurrentCues(s[e]),sendAddTrackEvent(s[e],o);else{const Mt=this.createTextTrack("captions",d,L);Mt&&(Mt[e]=!0,s[e]=Mt)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const r=this.captionsProperties[e];if(!r)return;const s=r.label,o={_id:e,label:s,kind:"captions",default:r.media?!!r.media.default:!1,closedCaptions:r.media};this.nonNativeCaptionsTracks[e]=o,this.hls.trigger(Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[o]})}createTextTrack(e,r,s){const o=this.media;if(o)return o.addTextTrack(e,r,s)}onMediaAttaching(e,r){this.media=r.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(r=>{clearCurrentCues(e[r]),delete e[r]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=newVTTCCs(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const r=e.textTracks;if(r)for(let s=0;s<r.length;s++)clearCurrentCues(r[s])}onSubtitleTracksUpdated(e,r){const s=r.subtitleTracks||[],o=s.some(d=>d.textCodec===IMSC1_CODEC);if(this.config.enableWebVTT||o&&this.config.enableIMSC1){if(subtitleOptionsIdentical(this.tracks,s)){this.tracks=s;return}if(this.textTracks=[],this.tracks=s,this.config.renderTextTracksNatively){const L=this.media?this.media.textTracks:null;this.tracks.forEach((ge,Mt)=>{let er;if(L&&Mt<L.length){let tr=null;for(let ir=0;ir<L.length;ir++)if(canReuseVttTextTrack(L[ir],ge)){tr=L[ir];break}tr&&(er=tr)}if(er)clearCurrentCues(er);else{const tr=this._captionsOrSubtitlesFromCharacteristics(ge);er=this.createTextTrack(tr,ge.name,ge.lang),er&&(er.mode="disabled")}er&&(er.groupId=ge.groupId,this.textTracks.push(er))})}else if(this.tracks.length){const L=this.tracks.map(ge=>({label:ge.name,kind:ge.type.toLowerCase(),default:ge.default,subtitleTrack:ge}));this.hls.trigger(Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:L})}}}_captionsOrSubtitlesFromCharacteristics(e){if(e.attrs.CHARACTERISTICS){const r=/transcribes-spoken-dialog/gi.test(e.attrs.CHARACTERISTICS),s=/describes-music-and-sound/gi.test(e.attrs.CHARACTERISTICS);if(r&&s)return"captions"}return"subtitles"}onManifestLoaded(e,r){this.config.enableCEA708Captions&&r.captions&&r.captions.forEach(s=>{const o=/(?:CC|SERVICE)([1-4])/.exec(s.instreamId);if(!o)return;const d=`textTrack${o[1]}`,L=this.captionsProperties[d];L&&(L.label=s.name,s.lang&&(L.languageCode=s.lang),L.media=s)})}closedCaptionsForLevel(e){const r=this.hls.levels[e.level];return r==null?void 0:r.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,r){const{cea608Parser1:s,cea608Parser2:o,lastSn:d,lastPartIndex:L}=this;if(!(!this.enabled||!(s&&o))&&r.frag.type===PlaylistLevelType.MAIN){var ge,Mt;const er=r.frag.sn,tr=(ge=r==null||(Mt=r.part)==null?void 0:Mt.index)!=null?ge:-1;er===d+1||er===d&&tr===L+1||(s.reset(),o.reset()),this.lastSn=er,this.lastPartIndex=tr}}onFragLoaded(e,r){const{frag:s,payload:o}=r;if(s.type===PlaylistLevelType.SUBTITLE)if(o.byteLength){const d=s.decryptdata,L="stats"in r;if(d==null||!d.encrypted||L){const ge=this.tracks[s.level],Mt=this.vttCCs;Mt[s.cc]||(Mt[s.cc]={start:s.start,prevCC:this.prevCC,new:!0},this.prevCC=s.cc),ge&&ge.textCodec===IMSC1_CODEC?this._parseIMSC1(s,o):this._parseVTTs(r)}}else this.hls.trigger(Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,r){const s=this.hls;parseIMSC1(r,this.initPTS[e.cc],o=>{this._appendCues(o,e.level),s.trigger(Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},o=>{logger.log(`Failed to parse IMSC1: ${o}`),s.trigger(Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:o})})}_parseVTTs(e){var r;const{frag:s,payload:o}=e,{initPTS:d,unparsedVttFrags:L}=this,ge=d.length-1;if(!d[s.cc]&&ge===-1){L.push(e);return}const Mt=this.hls,er=(r=s.initSegment)!=null&&r.data?appendUint8Array(s.initSegment.data,new Uint8Array(o)):o;parseWebVTT(er,this.initPTS[s.cc],this.vttCCs,s.cc,s.start,tr=>{this._appendCues(tr,s.level),Mt.trigger(Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},tr=>{const ir=tr.message==="Missing initPTS for VTT MPEGTS";ir?L.push(e):this._fallbackToIMSC1(s,o),logger.log(`Failed to parse VTT cue: ${tr}`),!(ir&&ge>s.cc)&&Mt.trigger(Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:tr})})}_fallbackToIMSC1(e,r){const s=this.tracks[e.level];s.textCodec||parseIMSC1(r,this.initPTS[e.cc],()=>{s.textCodec=IMSC1_CODEC,this._parseIMSC1(e,r)},()=>{s.textCodec="wvtt"})}_appendCues(e,r){const s=this.hls;if(this.config.renderTextTracksNatively){const o=this.textTracks[r];if(!o||o.mode==="disabled")return;e.forEach(d=>addCueToTrack(o,d))}else{const o=this.tracks[r];if(!o)return;const d=o.default?"default":"subtitles"+r;s.trigger(Events.CUES_PARSED,{type:"subtitles",cues:e,track:d})}}onFragDecrypted(e,r){const{frag:s}=r;s.type===PlaylistLevelType.SUBTITLE&&this.onFragLoaded(Events.FRAG_LOADED,r)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,r){const{cea608Parser1:s,cea608Parser2:o}=this;if(!this.enabled||!(s&&o))return;const{frag:d,samples:L}=r;if(!(d.type===PlaylistLevelType.MAIN&&this.closedCaptionsForLevel(d)==="NONE"))for(let ge=0;ge<L.length;ge++){const Mt=L[ge].bytes;if(Mt){const er=this.extractCea608Data(Mt);s.addData(L[ge].pts,er[0]),o.addData(L[ge].pts,er[1])}}}onBufferFlushing(e,{startOffset:r,endOffset:s,endOffsetSubtitles:o,type:d}){const{media:L}=this;if(!(!L||L.currentTime<s)){if(!d||d==="video"){const{captionsTracks:ge}=this;Object.keys(ge).forEach(Mt=>removeCuesInRange(ge[Mt],r,s))}if(this.config.renderTextTracksNatively&&r===0&&o!==void 0){const{textTracks:ge}=this;Object.keys(ge).forEach(Mt=>removeCuesInRange(ge[Mt],r,o))}}}extractCea608Data(e){const r=[[],[]],s=e[0]&31;let o=2;for(let d=0;d<s;d++){const L=e[o++],ge=127&e[o++],Mt=127&e[o++];if(ge===0&&Mt===0)continue;if((4&L)!==0){const tr=3&L;(tr===0||tr===1)&&(r[tr].push(ge),r[tr].push(Mt))}}return r}}function canReuseVttTextTrack(t,e){return!!t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function intersection(t,e,r,s){return Math.min(e,s)-Math.max(t,r)}function newVTTCCs(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class CapLevelController{constructor(e){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()}setStreamController(e){this.streamController=e}destroy(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(Events.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(Events.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,r){const s=this.hls.levels[r.droppedLevel];this.isLevelAllowed(s)&&this.restrictedLevels.push({bitrate:s.bitrate,height:s.height,width:s.width})}onMediaAttaching(e,r){this.media=r.media instanceof HTMLVideoElement?r.media:null,this.clientRect=null}onManifestParsed(e,r){const s=this.hls;this.restrictedLevels=[],this.firstLevel=r.firstLevel,s.config.capLevelToPlayerSize&&r.video&&this.startCapping()}onBufferCodecs(e,r){this.hls.config.capLevelToPlayerSize&&r.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){const e=this.hls.levels;if(e.length){const r=this.hls;r.autoLevelCapping=this.getMaxLevel(e.length-1),r.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=r.autoLevelCapping}}}getMaxLevel(e){const r=this.hls.levels;if(!r.length)return-1;const s=r.filter((o,d)=>this.isLevelAllowed(o)&&d<=e);return this.clientRect=null,CapLevelController.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,r={width:0,height:0};if(e){const s=e.getBoundingClientRect();r.width=s.width,r.height=s.height,!r.width&&!r.height&&(r.width=s.right-s.left||e.width||0,r.height=s.bottom-s.top||e.height||0)}return this.clientRect=r,r}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch{}return e}isLevelAllowed(e){return!this.restrictedLevels.some(s=>e.bitrate===s.bitrate&&e.width===s.width&&e.height===s.height)}static getMaxLevelByMediaSize(e,r,s){if(!(e!=null&&e.length))return-1;const o=(L,ge)=>ge?L.width!==ge.width||L.height!==ge.height:!0;let d=e.length-1;for(let L=0;L<e.length;L+=1){const ge=e[L];if((ge.width>=r||ge.height>=s)&&o(ge,e[L+1])){d=L;break}}return d}}class FPSController{constructor(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=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(Events.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(Events.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,r){const s=this.hls.config;if(s.capLevelOnFPSDrop){const o=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=o,o&&typeof o.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),s.fpsDroppedMonitoringPeriod)}}checkFPS(e,r,s){const o=performance.now();if(r){if(this.lastTime){const d=o-this.lastTime,L=s-this.lastDroppedFrames,ge=r-this.lastDecodedFrames,Mt=1e3*L/d,er=this.hls;if(er.trigger(Events.FPS_DROP,{currentDropped:L,currentDecoded:ge,totalDroppedFrames:s}),Mt>0&&L>er.config.fpsDroppedMonitoringThreshold*ge){let tr=er.currentLevel;logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+tr),tr>0&&(er.autoLevelCapping===-1||er.autoLevelCapping>=tr)&&(tr=tr-1,er.trigger(Events.FPS_DROP_LEVEL_CAPPING,{level:tr,droppedLevel:er.currentLevel}),er.autoLevelCapping=tr,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=s,this.lastDecodedFrames=r}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const r=e.getVideoPlaybackQuality();this.checkFPS(e,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}const LOGGER_PREFIX="[eme]";class EMEController{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=EMEController.CDMCleanupPromise?[EMEController.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=logger.debug.bind(logger,LOGGER_PREFIX),this.log=logger.log.bind(logger,LOGGER_PREFIX),this.warn=logger.warn.bind(logger,LOGGER_PREFIX),this.error=logger.error.bind(logger,LOGGER_PREFIX),this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(Events.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(Events.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:r,widevineLicenseUrl:s}=this.config,o=r[e];if(o)return o.licenseUrl;if(e===KeySystems.WIDEVINE&&s)return s;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:r}=this.config,s=r[e];if(s)return s.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const r=this.hls.levels,s=(L,ge,Mt)=>!!L&&Mt.indexOf(L)===ge,o=r.map(L=>L.audioCodec).filter(s),d=r.map(L=>L.videoCodec).filter(s);return o.length+d.length===0&&d.push("avc1.42e01e"),new Promise((L,ge)=>{const Mt=er=>{const tr=er.shift();this.getMediaKeysPromise(tr,o,d).then(ir=>L({keySystem:tr,mediaKeys:ir})).catch(ir=>{er.length?Mt(er):ir instanceof EMEKeyError?ge(ir):ge(new EMEKeyError({type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_NO_ACCESS,error:ir,fatal:!0},ir.message))})};Mt(e)})}requestMediaKeySystemAccess(e,r){const{requestMediaKeySystemAccessFunc:s}=this.config;if(typeof s!="function"){let o=`Configured requestMediaKeySystemAccess is not a function ${s}`;return requestMediaKeySystemAccess===null&&self.location.protocol==="http:"&&(o=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(o))}return s(e,r)}getMediaKeysPromise(e,r,s){const o=getSupportedMediaKeySystemConfigurations(e,r,s,this.config.drmSystemOptions),d=this.keySystemAccessPromises[e];let L=d==null?void 0:d.keySystemAccess;if(!L){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(o)}`),L=this.requestMediaKeySystemAccess(e,o);const ge=this.keySystemAccessPromises[e]={keySystemAccess:L};return L.catch(Mt=>{this.log(`Failed to obtain access to key-system "${e}": ${Mt}`)}),L.then(Mt=>{this.log(`Access for key-system "${Mt.keySystem}" obtained`);const er=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),ge.mediaKeys=Mt.createMediaKeys().then(tr=>(this.log(`Media-keys created for "${e}"`),er.then(ir=>ir?this.setMediaKeysServerCertificate(tr,e,ir):tr))),ge.mediaKeys.catch(tr=>{this.error(`Failed to create media-keys for "${e}"}: ${tr}`)}),ge.mediaKeys})}return L.then(()=>d.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:r,mediaKeys:s}){this.log(`Creating key-system session "${r}" keyId: ${Hex.hexDump(e.keyId||[])}`);const o=s.createSession(),d={decryptdata:e,keySystem:r,mediaKeys:s,mediaKeysSession:o,keyStatus:"status-pending"};return this.mediaKeySessions.push(d),d}renewKeySession(e){const r=e.decryptdata;if(r.pssh){const s=this.createMediaKeySessionContext(e),o=this.getKeyIdString(r),d="cenc";this.keyIdToKeySessionPromise[o]=this.generateRequestWithPreferredKeySession(s,d,r.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return Hex.hexDump(e.keyId)}updateKeySession(e,r){var s;const o=e.mediaKeysSession;return this.log(`Updating key-session "${o.sessionId}" for keyID ${Hex.hexDump(((s=e.decryptdata)==null?void 0:s.keyId)||[])} 3786 } (data length: ${r&&r.byteLength})`),o.update(r)}selectKeySystemFormat(e){const r=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}
3786) key formats ${r.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(r)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((r,s)=>{const o=getKeySystemsForConfig(this.config),d=e.map(keySystemFormatToKeySystemDomain).filter(L=>!!L&&o.indexOf(L)!==-1);return this.getKeySystemSelectionPromise(d).then(({keySystem:L})=>{const ge=keySystemDomainToKeySystemFormat(L);ge?r(ge):s(new Error(`Unable to find format for key-system "${L}"`))}).catch(s)})}loadKey(e){const r=e.keyInfo.decryptdata,s=this.getKeyIdString(r),o=`(keyId: ${s} format: "${r.keyFormat}" method: ${r.method} uri: ${r.uri})`;this.log(`Starting session for key ${o}`);let d=this.keyIdToKeySessionPromise[s];return d||(d=this.keyIdToKeySessionPromise[s]=this.getKeySystemForKeyPromise(r).then(({keySystem:L,mediaKeys:ge})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${o}`),this.attemptSetMediaKeys(L,ge).then(()=>{this.throwIfDestroyed();const Mt=this.createMediaKeySessionContext({keySystem:L,mediaKeys:ge,decryptdata:r});return this.generateRequestWithPreferredKeySession(Mt,"cenc",r.pssh,"playlist-key")}))),d.catch(L=>this.handleError(L))),d}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof EMEKeyError?this.hls.trigger(Events.ERROR,e.data):this.hls.trigger(Events.ERROR,{type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const r=this.getKeyIdString(e),s=this.keyIdToKeySessionPromise[r];if(!s){const o=keySystemFormatToKeySystemDomain(e.keyFormat),d=o?[o]:getKeySystemsForConfig(this.config);return this.attemptKeySystemAccess(d)}return s}getKeySystemSelectionPromise(e){if(e.length||(e=getKeySystemsForConfig(this.config)),e.length===0)throw new EMEKeyError({type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:r,initData:s}=e;if(this.debug(`"${e.type}" event: init data type: "${r}"`),s===null)return;let o,d;if(r==="sinf"&&this.config.drmSystems[KeySystems.FAIRPLAY]){const tr=bin2str(new Uint8Array(s));try{const ir=base64Decode(JSON.parse(tr).sinf),rr=parseSinf(new Uint8Array(ir));if(!rr)return;o=rr.subarray(8,24),d=KeySystems.FAIRPLAY}catch{this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{const tr=parsePssh(s);if(tr===null)return;tr.version===0&&tr.systemId===KeySystemIds.WIDEVINE&&tr.data&&(o=tr.data.subarray(8,24)),d=keySystemIdToKeySystemDomain(tr.systemId)}if(!d||!o)return;const L=Hex.hexDump(o),{keyIdToKeySessionPromise:ge,mediaKeySessions:Mt}=this;let er=ge[L];for(let tr=0;tr<Mt.length;tr++){const ir=Mt[tr],rr=ir.decryptdata;if(rr.pssh||!rr.keyId)continue;const nr=Hex.hexDump(rr.keyId);if(L===nr||rr.uri.replace(/-/g,"").indexOf(L)!==-1){er=ge[nr],delete ge[nr],rr.pssh=new Uint8Array(s),rr.keyId=o,er=ge[L]=er.then(()=>this.generateRequestWithPreferredKeySession(ir,r,s,"encrypted-event-key-match"));break}}er||(er=ge[L]=this.getKeySystemSelectionPromise([d]).then(({keySystem:tr,mediaKeys:ir})=>{var rr;this.throwIfDestroyed();const nr=new LevelKey("ISO-23001-7",L,(rr=keySystemDomainToKeySystemFormat(tr))!=null?rr:"");return nr.pssh=new Uint8Array(s),nr.keyId=o,this.attemptSetMediaKeys(tr,ir).then(()=>{this.throwIfDestroyed();const ar=this.createMediaKeySessionContext({decryptdata:nr,keySystem:tr,mediaKeys:ir});return this.generateRequestWithPreferredKeySession(ar,r,s,"encrypted-event-no-match")})})),er.catch(tr=>this.handleError(tr))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,r){const s=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const o=Promise.all(s).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(r)});return this.setMediaKeysQueue.push(o),o.then(()=>{this.log(`Media-keys set for "${e}"`),s.push(o),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(d=>s.indexOf(d)===-1)})}generateRequestWithPreferredKeySession(e,r,s,o){var d,L;const ge=(d=this.config.drmSystems)==null||(L=d[e.keySystem])==null?void 0:L.generateRequest;if(ge)try{const rr=ge.call(this.hls,r,s,e);if(!rr)throw new Error("Invalid response from configured generateRequest filter");r=rr.initDataType,s=e.decryptdata.pssh=rr.initData?new Uint8Array(rr.initData):null}catch(rr){var Mt;if(this.warn(rr.message),(Mt=this.hls)!=null&&Mt.config.debug)throw rr}if(s===null)return this.log(`Skipping key-session request for "${o}" (no initData)`),Promise.resolve(e);const er=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${o}": ${er} (init data type: ${r}
3786 length: ${s?s.byteLength:null})`);const tr=new EventEmitter;e.mediaKeysSession.onmessage=rr=>{const nr=e.mediaKeysSession;if(!nr){tr.emit("error",new Error("invalid state"));return}const{messageType:ar,message:sr}=rr;this.log(`"${ar}" message event for session "${nr.sessionId}" message size: ${sr.byteLength}`),ar==="license-request"||ar==="license-renewal"?this.renewLicense(e,sr).catch(lr=>{this.handleError(lr),tr.emit("error",lr)}):ar==="license-release"?e.keySystem===KeySystems.FAIRPLAY&&(this.updateKeySession(e,strToUtf8array("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${ar}"`)},e.mediaKeysSession.onkeystatuseschange=rr=>{if(!e.mediaKeysSession){tr.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const ar=e.keyStatus;tr.emit("keyStatus",ar),ar==="expired"&&(this.warn(`${e.keySystem} expired for key ${er}`),this.renewKeySession(e))};const ir=new Promise((rr,nr)=>{tr.on("error",nr),tr.on("keyStatus",ar=>{ar.startsWith("usable")?rr():ar==="output-restricted"?nr(new EMEKeyError({type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):ar==="internal-error"?nr(new EMEKeyError({type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${ar}"`)):ar==="expired"?nr(new Error("key expired while generating request")):this.warn(`unhandled key status change "${ar}"`)})});return e.mediaKeysSession.generateRequest(r,s).then(()=>{var rr;this.log(`Request generated for key-session "${(rr=e.mediaKeysSession)==null?void 0:rr.sessionId}" keyId: ${er}`)}).catch(rr=>{throw new EMEKeyError({type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_NO_SESSION,error:rr,fatal:!1},`Error generating key-session request: ${rr}`)}).then(()=>ir).catch(rr=>{throw tr.removeAllListeners(),this.removeSession(e),rr}).then(()=>(tr.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((r,s)=>{this.log(`key status change "${r}" for keyStatuses keyId: ${Hex.hexDump("buffer"in s?new Uint8Array(s.buffer,s.byteOffset,s.byteLength):new Uint8Array(s))} session keyId: ${Hex.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=r})}fetchServerCertificate(e){const r=this.config,s=r.loader,o=new s(r),d=this.getServerCertificateUrl(e);return d?(this.log(`Fetching serverCertificate for "${e}"`),new Promise((L,ge)=>{const Mt={responseType:"arraybuffer",url:d},er=r.certLoadPolicy.default,tr={loadPolicy:er,timeout:er.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},ir={onSuccess:(rr,nr,ar,sr)=>{L(rr.data)},onError:(rr,nr,ar,sr)=>{ge(new EMEKeyError({type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:ar,response:_objectSpread2({url:Mt.url,data:void 0},rr)},`"${e}" certificate request failed (${d}). Status: ${rr.code} (${rr.text})`))},onTimeout:(rr,nr,ar)=>{ge(new EMEKeyError({type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:ar,response:{url:Mt.url,data:void 0}},`"${e}" certificate request timed out (${d})`))},onAbort:(rr,nr,ar)=>{ge(new Error("aborted"))}};o.load(Mt,tr,ir)})):Promise.resolve()}setMediaKeysServerCertificate(e,r,s){return new Promise((o,d)=>{e.setServerCertificate(s).then(L=>{this.log(`setServerCertificate ${L?"success":"not supported by CDM"} (${s==null?void 0:s.byteLength}) on "${r}"`),o(e)}).catch(L=>{d(new EMEKeyError({type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:L,fatal:!0},L.message))})})}renewLicense(e,r){return this.requestLicense(e,new Uint8Array(r)).then(s=>this.updateKeySession(e,new Uint8Array(s)).catch(o=>{throw new EMEKeyError({type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:o,fatal:!0},o.message)}))}setupLicenseXHR(e,r,s,o){const d=this.config.licenseXhrSetup;return d?Promise.resolve().then(()=>
vendor: 3,831 bytes, line 3786
3786{if(!s.decryptdata)throw new Error("Key removed");return d.call(this.hls,e,r,s,o)}).catch(L=>{if(!s.decryptdata)throw L;return e.open("POST",r,!0),d.call(this.hls,e,r,s,o)}).then(L=>(e.readyState||e.open("POST",r,!0),{xhr:e,licenseChallenge:L||o})):(e.open("POST",r,!0),Promise.resolve({xhr:e,licenseChallenge:o}))}requestLicense(e,r){const s=this.config.keyLoadPolicy.default;return new Promise((o,d)=>{const L=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${L}`);const ge=new XMLHttpRequest;ge.responseType="arraybuffer",ge.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return d(new Error("invalid state"));if(ge.readyState===4)if(ge.status===200){this._requestLicenseFailureCount=0;let Mt=ge.response;this.log(`License received ${Mt instanceof ArrayBuffer?Mt.byteLength:Mt}`);const er=this.config.licenseResponseCallback;if(er)try{Mt=er.call(this.hls,ge,L,e)}catch(tr){this.error(tr)}o(Mt)}else{const Mt=s.errorRetry,er=Mt?Mt.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>er||ge.status>=400&&ge.status<500)d(new EMEKeyError({type:ErrorTypes.KEY_SYSTEM_ERROR,details:ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:ge,response:{url:L,data:void 0,code:ge.status,text:ge.statusText}},`License Request XHR failed (${L}). Status: ${ge.status} (${ge.statusText})`));else{const tr=er-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${tr} attempts left`),this.requestLicense(e,r).then(o,d)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=ge,this.setupLicenseXHR(ge,L,e,r).then(({xhr:Mt,licenseChallenge:er})=>{Mt.send(er)})})}onMediaAttached(e,r){if(!this.config.emeEnabled)return;const s=r.media;this.media=s,s.addEventListener("encrypted",this.onMediaEncrypted),s.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,r=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},LevelKey.clearKeyUriToKeyIdMap();const s=r.length;EMEController.CDMCleanupPromise=Promise.all(r.map(o=>this.removeSession(o)).concat(e==null?void 0:e.setMediaKeys(null).catch(o=>{this.log(`Could not clear media keys: ${o}. media.src: ${e==null?void 0:e.src}`)}))).then(()=>{s&&(this.log("finished closing key sessions and clearing media keys"),r.length=0)}).catch(o=>{this.log(`Could not close sessions and clear media keys: ${o}. media.src: ${e==null?void 0:e.src}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:r}){if(!(!r||!this.config.emeEnabled)&&!this.keyFormatPromise){const s=r.reduce((o,d)=>(o.indexOf(d.keyFormat)===-1&&o.push(d.keyFormat),o),[]);this.log(`Selecting key-system from session-keys ${s.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(s)}}removeSession(e){const{mediaKeysSession:r,licenseXhr:s}=e;if(r){this.log(`Remove licenses and keys and close session ${r.sessionId}`),r.onmessage=null,r.onkeystatuseschange=null,s&&s.readyState!==XMLHttpRequest.DONE&&s.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const o=this.mediaKeySessions.indexOf(e);return o>-1&&this.mediaKeySessions.splice(o,1),r.remove().catch(d=>{this.log(`Could not remove session: ${d}`)}).then(()=>r.close()).catch(d=>{this.log(`Could not close session: ${d}`)})}}}EMEController.CDMCleanupPromise=void 0;class EMEKeyError extends Error{constructor(e,r){super(r),this.data=void 0,e.error||(e.error=new Error(r)),this.data=e,e.err=e.error}}const CMCDVersion=1;var CMCDObjectType={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",
3786KEY:"k",OTHER:"o"};const CMCDStreamingFormatHLS="h";class CMCDController{constructor(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.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=o=>{try{this.apply(o,{ot:CMCDObjectType.MANIFEST,su:!this.initialized})}catch(d){logger.warn("Could not generate manifest CMCD data.",d)}},this.applyFragmentData=o=>{try{const d=o.frag,L=this.hls.levels[d.level],ge=this.getObjectType(d),Mt={d:d.duration*1e3,ot:ge};(ge===CMCDObjectType.VIDEO||ge===CMCDObjectType.AUDIO||ge==CMCDObjectType.MUXED)&&(Mt.br=L.bitrate/1e3,Mt.tb=this.getTopBandwidth(ge)/1e3,Mt.bl=this.getBufferLength(ge)),this.apply(o,Mt)}catch(d){logger.warn("Could not generate segment CMCD data.",d)}},this.hls=e;const r=this.config=e.config,{cmcd:s}=r;s!=null&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=s.sessionId||CMCDController.uuid(),this.cid=s.contentId,this.useHeaders=s.useHeaders===!0,this.registerListeners())}registerListeners(){const e=this.hls;e.on(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Events.MEDIA_DETACHED,this.onMediaDetached,this),e.on(Events.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Events.MEDIA_DETACHED,this.onMediaDetached,this),e.off(Events.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null}onMediaAttached(e,r){this.media=r.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,r){var s,o;this.audioBuffer=(s=r.tracks.audio)==null?void 0:s.buffer,this.videoBuffer=(o=r.tracks.video)==null?void 0:o.buffer}createData(){var e;return{v:CMCDVersion,sf:CMCDStreamingFormatHLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,r={}){_extends(r,this.createData());const s=r.ot===CMCDObjectType.INIT||r.ot===CMCDObjectType.VIDEO||r.ot===CMCDObjectType.MUXED;if(this.starved&&s&&(r.bs=!0,r.su=!0,this.starved=!1),r.su==null&&(r.su=this.buffering),this.useHeaders){const o=CMCDController.toHeaders(r);if(!Object.keys(o).length)return;e.headers||(e.headers={}),_extends(e.headers,o)}else{const o=CMCDController.toQuery(r);if(!o)return;e.url=CMCDController.appendQueryToUri(e.url,o)}}getObjectType(e){const{type:r}=e;if(r==="subtitle")return CMCDObjectType.TIMED_TEXT;if(e.sn==="initSegment")return CMCDObjectType.INIT;if(r==="audio")return CMCDObjectType.AUDIO;if(r==="main")return this.hls.audioTracks.length?CMCDObjectType.VIDEO:CMCDObjectType.MUXED}getTopBandwidth(e){let r=0,s;const o=this.hls;if(e===CMCDObjectType.AUDIO)s=o.audioTracks;else{const d=o.maxAutoLevel,L=d>-1?d+1:o.levels.length;s=o.levels.slice(0,L)}for(const d of s)d.bitrate>r&&(r=d.bitrate);return r>0?r:NaN}getBufferLength(e){const r=this.hls.media,s=e===CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return!s||!r?NaN:BufferHelper.bufferInfo(s,r.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,r=this.applyPlaylistData,s=e||this.config.loader;return class{constructor(d){this.loader=void 0,this.loader=new s(d)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(d,L,ge){r(d),this.loader.load(d,L,ge)}}}createFragmentLoader(){const{fLoader:e}=this.config,r=this.applyFragmentData,s=e||this.config.loader;return class{constructor(d){this.loader=void 0,this.loader=new s(d)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(d,L,ge){r(d),this.loader.load(d,L,ge)}
3786}}static uuid(){const e=URL.createObjectURL(new Blob),r=e.toString();return URL.revokeObjectURL(e),r.slice(r.lastIndexOf("/")+1)}static serialize(e){const r=[],s=er=>!Number.isNaN(er)&&er!=null&&er!==""&&er!==!1,o=er=>Math.round(er),d=er=>o(er/100)*100,ge={br:o,d:o,bl:d,dl:d,mtp:d,nor:er=>encodeURIComponent(er),rtp:d,tb:o},Mt=Object.keys(e||{}).sort();for(const er of Mt){let tr=e[er];if(!s(tr)||er==="v"&&tr===1||er=="pr"&&tr===1)continue;const ir=ge[er];ir&&(tr=ir(tr));const rr=typeof tr;let nr;er==="ot"||er==="sf"||er==="st"?nr=`${er}=${tr}`:rr==="boolean"?nr=er:rr==="number"?nr=`${er}=${tr}`:nr=`${er}=${JSON.stringify(tr)}`,r.push(nr)}return r.join(",")}static toHeaders(e){const r=Object.keys(e),s={},o=["Object","Request","Session","Status"],d=[{},{},{},{}],L={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};for(const ge of r){const Mt=L[ge]!=null?L[ge]:1;d[Mt][ge]=e[ge]}for(let ge=0;ge<d.length;ge++){const Mt=CMCDController.serialize(d[ge]);Mt&&(s[`CMCD-${o[ge]}`]=Mt)}return s}static toQuery(e){return`CMCD=${encodeURIComponent(CMCDController.serialize(e))}`}static appendQueryToUri(e,r){if(!r)return e;const s=e.includes("?")?"&":"?";return`${e}${s}${r}`}}const PATHWAY_PENALTY_DURATION_MS=3e5;class ContentSteeringController{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=logger.log.bind(logger,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Events.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Events.ERROR,this.onError,this))}startLoad(){if(this.started=!0,self.clearTimeout(this.reloadTimer),this.enabled&&this.uri)if(this.updated){const e=Math.max(this.timeToLoad*1e3-(performance.now()-this.updated),0);this.scheduleRefresh(this.uri,e)}else this.loadSteeringManifest(this.uri)}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),self.clearTimeout(this.reloadTimer)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const r=this.levels;r&&(this.levels=r.filter(s=>s!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,r){const{contentSteering:s}=r;s!==null&&(this.pathwayId=s.pathwayId,this.uri=s.uri,this.started&&this.startLoad())}onManifestParsed(e,r){this.audioTracks=r.audioTracks,this.subtitleTracks=r.subtitleTracks}onError(e,r){const{errorAction:s}=r;if((s==null?void 0:s.action)===NetworkErrorAction.SendAlternateToPenaltyBox&&s.flags===ErrorActionFlags.MoveAllAlternatesMatchingHost){let o=this.pathwayPriority;const d=this.pathwayId;this.penalizedPathways[d]||(this.penalizedPathways[d]=performance.now()),!o&&this.levels&&(o=this.levels.reduce((L,ge)=>(L.indexOf(ge.pathwayId)===-1&&L.push(ge.pathwayId),L),[])),o&&o.length>1&&(this.updatePathwayPriority(o),s.resolved=this.pathwayId!==d)}}filterParsedLevels(e){this.levels=e;let r=this.getLevelsForPathway(this.pathwayId);if(r.length===0){const s=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${s}"`),r=this.getLevelsForPathway(s),this.pathwayId=s}return r.length!==e.length?(this.log(`Found ${r.length}/${e.length} levels in Pathway "${this.pathwayId}"`),r):e}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(r=>e===r.pathwayId)}updatePathwayPriority(e){this.pathwayPriority=e;let r;const s=this.penalizedPathways,o=performance.now();
3786Object.keys(s).forEach(d=>{o-s[d]>PATHWAY_PENALTY_DURATION_MS&&delete s[d]});for(let d=0;d<e.length;d++){const L=e[d];if(s[L])continue;if(L===this.pathwayId)return;const ge=this.hls.nextLoadLevel,Mt=this.hls.levels[ge];if(r=this.getLevelsForPathway(L),r.length>0){this.log(`Setting Pathway to "${L}"`),this.pathwayId=L,this.hls.trigger(Events.LEVELS_UPDATED,{levels:r});const er=this.hls.levels[ge];Mt&&er&&this.levels&&(er.attrs["STABLE-VARIANT-ID"]!==Mt.attrs["STABLE-VARIANT-ID"]&&er.bitrate!==Mt.bitrate&&this.log(`Unstable Pathways change from bitrate ${Mt.bitrate} to ${er.bitrate}`),this.hls.nextLoadLevel=ge);break}}}clonePathways(e){const r=this.levels;if(!r)return;const s={},o={};e.forEach(d=>{const{ID:L,"BASE-ID":ge,"URI-REPLACEMENT":Mt}=d;if(r.some(tr=>tr.pathwayId===L))return;const er=this.getLevelsForPathway(ge).map(tr=>{const ir=_extends({},tr);ir.details=void 0,ir.url=performUriReplacement(tr.uri,tr.attrs["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",Mt);const rr=new AttrList(tr.attrs);rr["PATHWAY-ID"]=L;const nr=rr.AUDIO&&`${rr.AUDIO}_clone_${L}`,ar=rr.SUBTITLES&&`${rr.SUBTITLES}_clone_${L}`;nr&&(s[rr.AUDIO]=nr,rr.AUDIO=nr),ar&&(o[rr.SUBTITLES]=ar,rr.SUBTITLES=ar),ir.attrs=rr;const sr=new Level(ir);return addGroupId(sr,"audio",nr),addGroupId(sr,"text",ar),sr});r.push(...er),cloneRenditionGroups(this.audioTracks,s,Mt,L),cloneRenditionGroups(this.subtitleTracks,o,Mt,L)})}loadSteeringManifest(e){const r=this.hls.config,s=r.loader;this.loader&&this.loader.destroy(),this.loader=new s(r);let o;try{o=new self.URL(e)}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(o.protocol!=="data:"){const tr=(this.hls.bandwidthEstimate||r.abrEwmaDefaultEstimate)|0;o.searchParams.set("_HLS_pathway",this.pathwayId),o.searchParams.set("_HLS_throughput",""+tr)}const d={responseType:"json",url:o.href},L=r.steeringManifestLoadPolicy.default,ge=L.errorRetry||L.timeoutRetry||{},Mt={loadPolicy:L,timeout:L.maxLoadTimeMs,maxRetry:ge.maxNumRetry||0,retryDelay:ge.retryDelayMs||0,maxRetryDelay:ge.maxRetryDelayMs||0},er={onSuccess:(tr,ir,rr,nr)=>{this.log(`Loaded steering manifest: "${o}"`);const ar=tr.data;if(ar.VERSION!==1){this.log(`Steering VERSION ${ar.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=ar.TTL;const{"RELOAD-URI":sr,"PATHWAY-CLONES":lr,"PATHWAY-PRIORITY":cr}=ar;if(sr)try{this.uri=new self.URL(sr,o).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${sr}`);return}this.scheduleRefresh(this.uri||rr.url),lr&&this.clonePathways(lr),cr&&this.updatePathwayPriority(cr)},onError:(tr,ir,rr,nr)=>{if(this.log(`Error loading steering manifest: ${tr.code} ${tr.text} (${ir.url})`),this.stopLoad(),tr.code===410){this.enabled=!1,this.log(`Steering manifest ${ir.url} no longer available`);return}let ar=this.timeToLoad*1e3;if(tr.code===429){const sr=this.loader;if(typeof(sr==null?void 0:sr.getResponseHeader)=="function"){const lr=sr.getResponseHeader("Retry-After");lr&&(ar=parseFloat(lr)*1e3)}this.log(`Steering manifest ${ir.url} rate limited`);return}this.scheduleRefresh(this.uri||ir.url,ar)},onTimeout:(tr,ir,rr)=>{this.log(`Timeout loading steering manifest (${ir.url})`),this.scheduleRefresh(this.uri||ir.url)}};this.log(`Requesting steering manifest: ${o}`),this.loader.load(d,Mt,er)}scheduleRefresh(e,r=this.timeToLoad*1e3){self.clearTimeout(this.reloadTimer),this.reloadTimer=self.setTimeout(()=>{this.loadSteeringManifest(e)},r)}}function cloneRenditionGroups(t,e,r,s){t&&Object.keys(e).forEach(o=>{const d=t.filter(L=>L.groupId===o).map(L=>{const ge=_extends({},L);return ge.details=void 0,ge.attrs=new AttrList(ge.attrs),ge.url=ge.attrs.URI=performUriReplacement(L.url,L.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",r),ge.groupId=ge.attrs["GROUP-ID"]=e[o],ge.attrs["PATHWAY-ID"]=s,ge});t.push(...d)})}function performUriReplacement(t,e,r,s){const{HOST:o,PARAMS:d,[r]:L}=s;let ge;e&&(ge=L==null?void 0:L[e],ge&&(t=ge));const Mt=new self.URL(t);return o&&!ge&&(Mt.host=o),d&&Object.keys(d).sort().forEach(er=>{er&&Mt.searchParams.set(er,d[er])}),Mt.href}const AGE_HEADER_LINE_REGEX=/^age:\s*[\d.]+\s*$/im;class XhrLoader{constructor(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=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new LoadStats,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,r,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=r,this.callbacks=s,this.loadInternal()}loadInternal(){const{config:e,context:r}=this;if(!e)return;const s=this.loader=new self.XMLHttpRequest,o=this.stats;o.loading.first=0,o.loaded=0,o.aborted=!1;const d=this.xhrSetup;d?Promise.resolve().then(()=>
3786{if(!this.stats.aborted)return d(s,r.url)}).catch(L=>(s.open("GET",r.url,!0),d(s,r.url))).then(()=>{this.stats.aborted||this.openAndSendXhr(s,r,e)}).catch(L=>{this.callbacks.onError({code:s.status,text:L.message},r,s,o)}):this.openAndSendXhr(s,r,e)}openAndSendXhr(e,r,s){e.readyState||e.open("GET",r.url,!0);const o=this.context.headers,{maxTimeToFirstByteMs:d,maxLoadTimeMs:L}=s.loadPolicy;if(o)for(const ge in o)e.setRequestHeader(ge,o[ge]);r.rangeEnd&&e.setRequestHeader("Range","bytes="+r.rangeStart+"-"+(r.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=r.responseType,self.clearTimeout(this.requestTimeout),s.timeout=d&&isFiniteNumber(d)?d:L,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout),e.send()}readystatechange(){const{context:e,loader:r,stats:s}=this;if(!e||!r)return;const o=r.readyState,d=this.config;if(!s.aborted&&o>=2&&(s.loading.first===0&&(s.loading.first=Math.max(self.performance.now(),s.loading.start),d.timeout!==d.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),d.timeout=d.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),d.loadPolicy.maxLoadTimeMs-(s.loading.first-s.loading.start)))),o===4)){self.clearTimeout(this.requestTimeout),r.onreadystatechange=null,r.onprogress=null;const L=r.status,ge=r.responseType!=="text";if(L>=200&&L<300&&(ge&&r.response||r.responseText!==null)){s.loading.end=Math.max(self.performance.now(),s.loading.first);const Mt=ge?r.response:r.responseText,er=r.responseType==="arraybuffer"?Mt.byteLength:Mt.length;if(s.loaded=s.total=er,s.bwEstimate=s.total*8e3/(s.loading.end-s.loading.first),!this.callbacks)return;const tr=this.callbacks.onProgress;if(tr&&tr(s,e,Mt,r),!this.callbacks)return;const ir={url:r.responseURL,data:Mt,code:L};this.callbacks.onSuccess(ir,s,e,r)}else{const Mt=d.loadPolicy.errorRetry,er=s.retry;shouldRetry(Mt,er,!1,L)?this.retry(Mt):(logger.error(`${L} while loading ${e.url}`),this.callbacks.onError({code:L,text:r.statusText},e,r,s))}}}loadtimeout(){var e;const r=(e=this.config)==null?void 0:e.loadPolicy.timeoutRetry,s=this.stats.retry;if(shouldRetry(r,s,!0))this.retry(r);else{logger.warn(`timeout while loading ${this.context.url}`);const o=this.callbacks;o&&(this.abortInternal(),o.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:r,stats:s}=this;this.retryDelay=getRetryDelay(e,s.retry),s.retry++,logger.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${r.url}, retrying ${s.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const r=this.stats;r.loaded=e.loaded,e.lengthComputable&&(r.total=e.total)}getCacheAge(){let e=null;if(this.loader&&AGE_HEADER_LINE_REGEX.test(this.loader.getAllResponseHeaders())){const r=this.loader.getResponseHeader("age");e=r?parseFloat(r):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}function fetchSupported(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const BYTERANGE=/(\d+)-(\d+)\/(\d+)/;class FetchLoader{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||getRequest,this.controller=new self.AbortController,this.stats=new LoadStats}destroy(){this.loader=this.callbacks=null,this.abortInternal()}abortInternal(){const e=this.response;e!=null&&e.ok||(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,r,s){const o=this.stats;if(o.loading.start)throw new Error("Loader can only be used once.");o.loading.start=self.performance.now();const d=getRequestParameters(e,this.controller.signal),L=s.onProgress,ge=e.responseType==="arraybuffer",Mt=ge?"byteLength":"length",{maxTimeToFirstByteMs:er,maxLoadTimeMs:tr}=r.loadPolicy;this.context=e,this.config=r,this.callbacks=s,this.request=this.fetchSetup(e,d),self.clearTimeout(this.requestTimeout),r.timeout=er&&isFiniteNumber(er)?er:tr,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),s.onTimeout(o,e,this.response)},r.timeout),self.fetch(this.request).then(ir=>{this.response=this.loader=ir;const rr=Math.max(self.performance.now(),o.loading.start);if(self.clearTimeout(this.requestTimeout),r.timeout=tr,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),s.onTimeout(o,e,this.response)},tr-(rr-o.loading.start)),!ir.ok){const{status:nr,statusText:ar}=ir;throw new FetchError(ar||"fetch, bad network response",nr,ir)}return o.loading.first=rr,o.total=getContentLength(ir.headers)||o.total,L&&isFiniteNumber(r.highWaterMark)?this.loadProgressively(ir,o,e,r.highWaterMark,L):ge?ir.arrayBuffer():e.responseType==="json"?ir.json():ir.text()}).then(ir=>{const{response:rr}=this;self.clearTimeout(this.requestTimeout),o.loading.end=Math.max(self.performance.now(),o.loading.first);const nr=ir[Mt];nr&&(o.loaded=o.total=nr);const ar={url:rr.url,data:ir,code:rr.status};L&&!isFiniteNumber(r.highWaterMark)&&L(o,e,ir,rr),s.onSuccess(ar,o,e,rr)}).catch(ir=>{if(self.clearTimeout(this.requestTimeout),o.aborted)return;const rr=ir&&ir.code||0,nr=ir?ir.message:null;s.onError({code:rr,text:nr},e,ir?ir.details:null,o)})}getCacheAge(){let e=null;if(this.response){const r=this.response.headers.get("age");e=r?parseFloat(r):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,r,s,o=0,d){const L=new ChunkCache,ge=e.body.getReader(),Mt=()=>ge.read().then(er=>{if(er.done)return L.dataLength&&d(r,s,L.flush(),e),Promise.resolve(new ArrayBuffer(0));const tr=er.value,ir=tr.length;return r.loaded+=ir,ir<o||L.dataLength?(L.push(tr),L.dataLength>=o&&d(r,s,L.flush(),e)):d(r,s,tr,e),Mt()}).catch(()=>Promise.reject());return Mt()}}function getRequestParameters(t,e){const r={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(_extends({},t.headers))};return t.rangeEnd&&r.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),r}function getByteRangeLength(t){const e=BYTERANGE.exec(t);if(e)return parseInt(e[2])-parseInt(e[1])+1}function getContentLength(t){const e=t.get("Content-Range");if(e){const s=getByteRangeLength(e);if(isFiniteNumber(s))return s}const r=t.get("Content-Length");if(r)return parseInt(r)}
vendor: 5,708 bytes, line 3786
3786function getRequest(t,e){return new self.Request(t.url,e)}class FetchError extends Error{constructor(e,r,s){super(e),this.code=void 0,this.details=void 0,this.code=r,this.details=s}}const WHITESPACE_CHAR=/\s/,Cues={newCue(t,e,r,s){const o=[];let d,L,ge,Mt,er;const tr=self.VTTCue||self.TextTrackCue;for(let rr=0;rr<s.rows.length;rr++)if(d=s.rows[rr],ge=!0,Mt=0,er="",!d.isEmpty()){var ir;for(let sr=0;sr<d.chars.length;sr++)WHITESPACE_CHAR.test(d.chars[sr].uchar)&&ge?Mt++:(er+=d.chars[sr].uchar,ge=!1);d.cueStartTime=e,e===r&&(r+=1e-4),Mt>=16?Mt--:Mt++;const nr=fixLineBreaks(er.trim()),ar=generateCueId(e,r,nr);t!=null&&(ir=t.cues)!=null&&ir.getCueById(ar)||(L=new tr(e,r,nr),L.id=ar,L.line=rr+1,L.align="left",L.position=10+Math.min(80,Math.floor(Mt*8/32)*10),o.push(L))}return t&&o.length&&(o.sort((rr,nr)=>rr.line==="auto"||nr.line==="auto"?0:rr.line>8&&nr.line>8?nr.line-rr.line:rr.line-nr.line),o.forEach(rr=>addCueToTrack(t,rr))),o}},defaultLoadPolicy={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},hlsDefaultConfig=_objectSpread2(_objectSpread2({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,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,loader:XhrLoader,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:AbrController,bufferController:BufferController,capLevelController:CapLevelController,errorController:ErrorController,fpsController:FPSController,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:defaultLoadPolicy},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}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},timelineConfig()),{},{subtitleStreamController:SubtitleStreamController,subtitleTrackController:SubtitleTrackController,timelineController:TimelineController,audioStreamController:AudioStreamController,audioTrackController:AudioTrackController,emeController:EMEController,cmcdController:CMCDController,contentSteeringController:ContentSteeringController});function timelineConfig(){return{cueHandler:Cues,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function mergeConfig(t,e){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(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const r=deepCpy(t),s=["manifest","level","frag"],o=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];
3786return s.forEach(d=>{const L=`${d==="level"?"playlist":d}LoadPolicy`,ge=e[L]===void 0,Mt=[];o.forEach(er=>{const tr=`${d}Loading${er}`,ir=e[tr];if(ir!==void 0&&ge){Mt.push(tr);const rr=r[L].default;switch(e[L]={default:rr},er){case"TimeOut":rr.maxLoadTimeMs=ir,rr.maxTimeToFirstByteMs=ir;break;case"MaxRetry":rr.errorRetry.maxNumRetry=ir,rr.timeoutRetry.maxNumRetry=ir;break;case"RetryDelay":rr.errorRetry.retryDelayMs=ir,rr.timeoutRetry.retryDelayMs=ir;break;case"MaxRetryTimeout":rr.errorRetry.maxRetryDelayMs=ir,rr.timeoutRetry.maxRetryDelayMs=ir;break}}}),Mt.length&&logger.warn(`hls.js config: "${Mt.join('", "')}" setting(s) are deprecated, use "${L}": ${JSON.stringify(e[L])}`)}),_objectSpread2(_objectSpread2({},r),e)}function deepCpy(t){return t&&typeof t=="object"?Array.isArray(t)?t.map(deepCpy):Object.keys(t).reduce((e,r)=>(e[r]=deepCpy(t[r]),e),{}):t}function enableStreamingMode(t){const e=t.loader;e!==FetchLoader&&e!==XhrLoader?(logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),t.progressive=!1):fetchSupported()&&(t.loader=FetchLoader,t.progressive=!0,t.enableSoftwareAES=!0,logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}class Hls{static get version(){return"1.4.14"}static isSupported(){return isSupported()}static get Events(){return Events}static get ErrorTypes(){return ErrorTypes}static get ErrorDetails(){return ErrorDetails}static get DefaultConfig(){return Hls.defaultConfig?Hls.defaultConfig:hlsDefaultConfig}static set DefaultConfig(e){Hls.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new EventEmitter,this._autoLevelCapping=void 0,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.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,enableLogs(e.debug||!1,"Hls instance");const r=this.config=mergeConfig(Hls.DefaultConfig,e);this.userConfig=e,this._autoLevelCapping=-1,r.progressive&&enableStreamingMode(r);const{abrController:s,bufferController:o,capLevelController:d,errorController:L,fpsController:ge}=r,Mt=new L(this),er=this.abrController=new s(this),tr=this.bufferController=new o(this),ir=this.capLevelController=new d(this),rr=new ge(this),nr=new PlaylistLoader(this),ar=new ID3TrackController(this),sr=r.contentSteeringController,lr=sr?new sr(this):null,cr=this.levelController=new LevelController(this,lr),ur=new FragmentTracker(this),or=new KeyLoader(this.config),dr=this.streamController=new StreamController(this,ur,or);ir.setStreamController(dr),rr.setStreamController(dr);const hr=[nr,cr,dr];lr&&hr.splice(1,0,lr),this.networkControllers=hr;const pr=[er,tr,ir,rr,ar,ur];this.audioTrackController=this.createController(r.audioTrackController,hr);const mr=r.audioStreamController;mr&&hr.push(new mr(this,ur,or)),this.subtitleTrackController=this.createController(r.subtitleTrackController,hr);const vr=r.subtitleStreamController;vr&&hr.push(new vr(this,ur,or)),this.createController(r.timelineController,pr),or.emeController=this.emeController=this.createController(r.emeController,pr),this.cmcdController=this.createController(r.cmcdController,pr),this.latencyController=this.createController(LatencyController,pr),this.coreComponents=pr,hr.push(Mt);const Er=Mt.onErrorOut;typeof Er=="function"&&this.on(Events.ERROR,Er,Mt)}createController(e,r){if(e){const s=new e(this);return r&&r.push(s),s}return null}on(e,r,s=this){this._emitter.on(e,r,s)}once(e,r,s=this){this._emitter.once(e,r,s)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,r,s=this,o){this._emitter.off(e,r,s,o)}listeners(e){return this._emitter.listeners(e)}emit(e,r,s){return this._emitter.emit(e,r,s)}trigger(e,r){if(this.config.debug)return this.emit(e,e,r);try{return this.emit(e,e,r)}catch(s){logger.error("An internal error happened while handling event "+e+'. Error message: "'+s.message+'". Here is a stacktrace:',s),this.trigger(Events.ERROR,{type:ErrorTypes.OTHER_ERROR,details:ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,error:s})}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){logger.log("destroy"),this.trigger(Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEac
3786h(r=>r.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(r=>r.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){logger.log("attachMedia"),this._media=e,this.trigger(Events.MEDIA_ATTACHING,{media:e})}detachMedia(){logger.log("detachMedia"),this.trigger(Events.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const r=this.media,s=this.url,o=this.url=urlToolkitExports.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});logger.log(`loadSource:${o}`),r&&s&&(s!==o||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(r)),this.trigger(Events.MANIFEST_LOADING,{url:e})}startLoad(e=-1){logger.log(`startLoad(${e})`),this.networkControllers.forEach(r=>{r.startLoad(e)})}stopLoad(){logger.log("stopLoad"),this.networkControllers.forEach(e=>{e.stopLoad()})}swapAudioCodec(){logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){logger.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e,r=0){this.levelController.removeLevel(e,r)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){logger.log(`set currentLevel:${e}`),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){return this.levelController.startLevel}set startLevel(e){logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const r=!!e;r!==this.config.capLevelToPlayerSize&&(r?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=r)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e)}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){HdcpLevels.indexOf(e)>-1&&(this._maxHdcpLevel=e)}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:r}}=this;if(!e)return 0;const s=e.length;for(let o=0;o<s;o++)if(e[o].maxBitrate>=r)return o;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:r,maxHdcpLevel:s}=this;let o;if(r===-1&&e&&e.length?o=e.length-1:o=r,s)for(let d=o;d--;){const L=e[d].attrs["HDCP-LEVEL"];if(L&&L<=s)return d}return o}get nextAutoLevel(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)}set nextAutoLevel(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const r=this.audioTrackController;r&&(r.audioTrack=e)}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const r=this.subtitleTrackController;r&&(r.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const r=this.subtitleTrackController;r&&(r.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}Hls.defaultConfig=void 0;
vendor: 4,509 bytes, line 3786
3786var T$1=Hls,v$1=class _s extends Error{constructor(e,r=_s.MEDIA_ERR_CUSTOM,s,o){var d;super(e),this.name="MediaError",this.code=r,this.context=o,this.fatal=s??(r>=_s.MEDIA_ERR_NETWORK&&r<=_s.MEDIA_ERR_ENCRYPTED),this.message||(this.message=(d=_s.defaultMessages[this.code])!=null?d:"")}};v$1.MEDIA_ERR_ABORTED=1,v$1.MEDIA_ERR_NETWORK=2,v$1.MEDIA_ERR_DECODE=3,v$1.MEDIA_ERR_SRC_NOT_SUPPORTED=4,v$1.MEDIA_ERR_ENCRYPTED=5,v$1.MEDIA_ERR_CUSTOM=100,v$1.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 x$1=v$1,Me$1=t=>t==null,I$2=(t,e)=>Me$1(e)?!1:t in e,S$1={ANY:"any",MUTED:"muted"},g={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},N$2={MSE:"mse",NATIVE:"native"},k={HEADER:"header",QUERY:"query",NONE:"none"},Xe$1=Object.values(k),b$1={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},C$1={HLS:b$1.M3U8};[...Object.values(b$1)];var m=(t,e,r,s,o=t)=>{o.addEventListener(e,r,s),t.addEventListener("teardown",()=>{o.removeEventListener(e,r)},{once:!0})};function q$1(t,e,r){e&&r>e&&(r=e);for(let s=0;s<t.length;s++)if(t.start(s)<=r&&t.end(s)>=r)return!0;return!1}var $$2=t=>{let e=t.indexOf("?");if(e<0)return[t];let r=t.slice(0,e),s=t.slice(e);return[r,s]},E$2=t=>{let e=t.type;if(e){let s=e.toUpperCase();return I$2(s,C$1)?C$1[s]:e}let{src:r}=t;return r?ve$2(r):""},R$2=t=>t==="VOD"?g.ON_DEMAND:g.LIVE,w$1=t=>t==="EVENT"?Number.POSITIVE_INFINITY:t==="VOD"?Number.NaN:0,ve$2=t=>{let e="";try{e=new URL(t).pathname}catch{console.error("invalid url")}let r=e.lastIndexOf(".");if(r<0)return"";let s=e.slice(r+1).toUpperCase();return I$2(s,b$1)?b$1[s]:""},be$1=Object.values(S$1),z$2=t=>typeof t=="boolean"||typeof t=="string"&&be$1.includes(t),X$2=(t,e,r)=>{let{autoplay:s}=t,o=!1,d=!1,L=z$2(s)?s:!!s,ge=()=>{o||m(e,"playing",()=>{o=!0},{once:!0})};if(ge(),m(e,"loadstart",()=>{o=!1,ge(),H$1(e,L)},{once:!0}),m(e,"loadstart",()=>{r||(t.streamType&&t.streamType!==g.UNKNOWN?d=t.streamType===g.LIVE:d=!Number.isFinite(e.duration)),H$1(e,L)},{once:!0}),r&&r.once(T$1.Events.LEVEL_LOADED,(Mt,er)=>{var tr;t.streamType&&t.streamType!==g.UNKNOWN?d=t.streamType===g.LIVE:d=(tr=er.details.live)!=null?tr:!1}),!L){let Mt=()=>{!d||Number.isFinite(t.startTime)||(r!=null&&r.liveSyncPosition?e.currentTime=r.liveSyncPosition:Number.isFinite(e.seekable.end(0))&&(e.currentTime=e.seekable.end(0)))};r&&m(e,"play",()=>{e.preload==="metadata"?r.once(T$1.Events.LEVEL_UPDATED,Mt):Mt()},{once:!0})}return Mt=>{o||(L=z$2(Mt)?Mt:!!Mt,H$1(e,L))}},H$1=(t,e)=>{if(!e)return;let r=t.muted,s=()=>t.muted=r;switch(e){case S$1.ANY:t.play().catch(()=>{t.muted=!0,t.play().catch(s)});break;case S$1.MUTED:t.muted=!0,t.play().catch(s);break;default:t.play().catch(()=>{});break}},G$1=({preload:t,src:e},r,s)=>{let o=ir=>{ir!=null&&["","none","metadata","auto"].includes(ir)?r.setAttribute("preload",ir):r.removeAttribute("preload")};if(!s)return o(t),o;let d=!1,L=!1,ge=s.config.maxBufferLength,Mt=s.config.maxBufferSize,er=ir=>{o(ir);let rr=ir??r.preload;L||rr==="none"||(rr==="metadata"?(s.config.maxBufferLength=1,s.config.maxBufferSize=1):(s.config.maxBufferLength=ge,s.config.maxBufferSize=Mt),tr())},tr=()=>{!d&&e&&(d=!0,s.loadSource(e))};return m(r,"play",()=>{L=!0,s.config.maxBufferLength=ge,s.config.maxBufferSize=Mt,tr()},{once:!0}),er(t),er};function j$2(t,e){var r;if(!("videoTracks"in t))return;let s=new WeakMap;e.on(T$1.Events.MANIFEST_PARSED,function(er,tr){Mt();let ir=t.addVideoTrack("main");ir.selected=!0;for(let[rr,nr]of tr.levels.entries()){let ar=ir.addRendition(nr.url[0],nr.width,nr.height,nr.videoCodec,nr.bitrate);s.set(nr,`${rr}`),ar.id=`${rr}`}}),e.on(T$1.Events.AUDIO_TRACKS_UPDATED,function(er,tr){ge();for(let ir of tr.audioTracks){let rr=ir.default?"main":"alternative",nr=t.addAudioTrack(rr,ir.name,ir.lang);nr.id=`${ir.id}`,ir.default&&(nr.enabled=!0)}}),t.audioTracks.addEventListener("change",()=>{var er;let tr=+((er=[...t.audioTracks].find(rr=>rr.enabled))==null?void 0:er.id),ir=e.audioTracks.map(rr=>rr.id);tr!=e.audioTrack&&ir.includes(tr)&&(e.audioTrack=tr)}),e.on(T$1.Events.LEVELS_UPDATED,function(er,tr){var ir;let rr=t.videoTracks[(ir=t.videoTracks.selectedIndex)!=null?ir:0];if(!rr)return;let nr=tr.levels.map(ar=>s.get(ar));
3786for(let ar of t.videoRenditions)ar.id&&!nr.includes(ar.id)&&rr.removeRendition(ar)});let o=er=>{let tr=er.target.selectedIndex;tr!=e.nextLevel&&d(tr)},d=er=>{let tr=t.currentTime,ir=!1,rr=(nr,ar)=>{ir||(ir=!Number.isFinite(ar.endOffset))};e.on(T$1.Events.BUFFER_FLUSHING,rr),e.nextLevel=er,e.off(T$1.Events.BUFFER_FLUSHING,rr),ir||e.trigger(T$1.Events.BUFFER_FLUSHING,{startOffset:tr+10,endOffset:1/0,type:"video"})};(r=t.videoRenditions)==null||r.addEventListener("change",o);let L=()=>{for(let er of t.videoTracks)t.removeVideoTrack(er)},ge=()=>{for(let er of t.audioTracks)t.removeAudioTrack(er)},Mt=()=>{L(),ge()};e.once(T$1.Events.DESTROYING,Mt)}function Q$2(t,e){e.on(T$1.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(o,{tracks:d})=>{d.forEach(L=>{var ge;let Mt=(ge=L.subtitleTrack)!=null?ge:L.closedCaptions,er=e.subtitleTracks.findIndex(({lang:tr,name:ir,type:rr})=>tr==(Mt==null?void 0:Mt.lang)&&ir===L.label&&rr.toLowerCase()===L.kind);_$1(t,L.kind,L.label,Mt==null?void 0:Mt.lang,`${L.kind}${er}`)})});let r=()=>{var o;if(!e.subtitleTracks.length)return;let d=Array.from(t.textTracks).find(ge=>ge.id&&ge.mode==="showing"&&["subtitles","captions"].includes(ge.kind)),L=`${(o=e.subtitleTracks[e.subtitleTrack])==null?void 0:o.type.toLowerCase()}${e.subtitleTrack}`;if(d&&(e.subtitleTrack<0||(d==null?void 0:d.id)!==L)){let ge=e.subtitleTracks.findIndex(({lang:Mt,name:er,type:tr})=>Mt==d.language&&er===d.label&&tr.toLowerCase()===d.kind);e.subtitleTrack=ge}d&&(d==null?void 0:d.id)===L&&d.cues&&Array.from(d.cues).forEach(ge=>{d.addCue(ge)})};t.textTracks.addEventListener("change",r),e.on(T$1.Events.CUES_PARSED,(o,{track:d,cues:L})=>{let ge=t.textTracks.getTrackById(d);if(!ge)return;let Mt=ge.mode==="disabled";Mt&&(ge.mode="hidden"),L.forEach(er=>{var tr;(tr=ge.cues)!=null&&tr.getCueById(er.id)||ge.addCue(er)}),Mt&&(ge.mode="disabled")}),e.once(T$1.Events.DESTROYING,()=>{t.textTracks.removeEventListener("change",r),t.querySelectorAll("track[data-removeondestroy]").forEach(o=>{o.remove()})});let s=()=>
3786{Array.from(t.textTracks).forEach(o=>{var d,L;if(!["subtitles","caption"].includes(o.kind)&&o.label==="thumbnails"){if(!((d=o.cues)!=null&&d.length)){let ge=t.querySelector('track[label="thumbnails"]'),Mt=(L=ge==null?void 0:ge.getAttribute("src"))!=null?L:"";ge==null||ge.removeAttribute("src"),setTimeout(()=>{ge==null||ge.setAttribute("src",Mt)},0)}o.mode!=="hidden"&&(o.mode="hidden")}})};e.once(T$1.Events.MANIFEST_LOADED,s),e.once(T$1.Events.MEDIA_ATTACHED,s)}function _$1(t,e,r,s,o){let d=document.createElement("track");return d.kind=e,d.label=r,s&&(d.srclang=s),o&&(d.id=o),d.track.mode=["subtitles","captions"].includes(e)?"disabled":"hidden",d.setAttribute("data-removeondestroy",""),t.append(d),d.track}function xe$2(t,e){let r=Array.prototype.find.call(t.querySelectorAll("track"),s=>s.track===e);r==null||r.remove()}var h$3="cuepoints",O$1=Object.freeze({label:h$3}),A$1=(t,{label:e=h$3}=O$1)=>{var r;return(r=Array.from(t.querySelectorAll("track")).find(s=>s.track.label===e&&s.track.kind==="metadata"))==null?void 0:r.track};async function J$2(t,e,r=O$1){let s=A$1(t,r);if(!s){let{label:o=h$3}=r;s=_$1(t,"metadata",o),s.mode="hidden",await new Promise(d=>setTimeout(()=>d(void 0),0))}return s.mode!=="hidden"&&(s.mode="hidden"),[...e].sort(({time:o},{time:d})=>d-o).forEach(({time:o,value:d})=>{var L,ge;let Mt=Array.prototype.findIndex.call(s==null?void 0:s.cues,nr=>nr.startTime>=o),er=(L=s==null?void 0:s.cues)==null?void 0:L[Mt],tr=er?er.startTime:Number.isFinite(t.duration)?t.duration:Number.MAX_SAFE_INTEGER,ir=(ge=s==null?void 0:s.cues)==null?void 0:ge[Mt-1];ir&&(ir.endTime=o);let rr=new VTTCue(o,tr,JSON.stringify(d??null));s.addCue(rr)}),s}var Z$2=t=>({time:t.startTime,value:JSON.parse(t.text)});function Le$2(t,e={label:h$3}){let r=A$1(t,e);return r!=null&&r.cues?Array.from(r.cues,s=>Z$2(s)):[]}function ee$2(t,e={label:h$3}){var r,s;let o=A$1(t,e);if(!((r=o==null?void 0:o.activeCues)!=null&&r.length))return;let{currentTime:d}=t,L=Array.prototype.find.call((s=o.activeCues)!=null?s:[],({startTime:ge,endTime:Mt})=>ge<=d&&Mt>d);return Z$2(L)}async function te$1(t,e=O$1){return new Promise(r=>{m(t,"loadstart",async()=>{let s=await J$2(t,[],e);m(t,"cuechange",()=>{let o=ee$2(t);if(o){let d=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:o});t.dispatchEvent(d)}},{},s),r(s)})})}function Pe$2(t,e){if(e){let r=e.playingDate;if(r!=null)return new Date(r.getTime()-t.currentTime*1e3)}return typeof t.getStartDate=="function"?t.getStartDate():new Date(NaN)}function ke$2(t,e){if(e&&e.playingDate)return e.playingDate;if(typeof t.getStartDate=="function"){let r=t.getStartDate();return new Date(r.getTime()+t.currentTime*1e3)}return new Date(NaN)}var Ee$2=async t=>fetch(t).then(e=>e.text()).then(e=>{let r=e.split(` 3787`).find((s,o,d)=>o&&d[o-1].startsWith("#EXT-X-STREAM-INF"));return fetch(r).then(s=>s.text()).then(s=>s.split(` 3788`))}),he$2=t=>{var e,r,s;let o=(r=((e=t.find(Mt=>Mt.startsWith("#EXT-X-PLAYLIST-TYPE")))!=null?e:"").split(":")[1])==null?void 0:r.trim(),d=R$2(o),L=w$1(o),ge;if(d===g.LIVE){let Mt=t.find(er=>er.startsWith("#EXT-X-PART-INF"));if(Mt)ge=+Mt.split(":")[1].split("=")[1]*2;else{let er=t.find(ir=>ir.startsWith("#EXT-X-TARGETDURATION")),tr=(s=er==null?void 0:er.split(":"))==null?void 0:s[1];ge=+(tr??6)*3}}return{streamType:d,targetLiveWindow:L,liveEdgeStartOffset:ge}},Se$2=async(t,e)=>{if(e===b$1.MP4)return{streamType:g.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0};if(e===b$1.M3U8){let r=await Ee$2(t);return he$2(r)}return console.error(`Media type ${e} is an unrecognized or unsupported type for src ${t}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0}},ne$1=async(t,e,r=E$2({src:t}))=>{var s,o,d;let{streamType:L,targetLiveWindow:ge,liveEdgeStartOffset:Mt}=await Se$2(t,r);((s=M$1.get(e))!=null?s:{}).liveEdgeStartOffset=Mt,((o=M$1.get(e))!=null?o:{}).targetLiveWindow=ge,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((d=M$1.get(e))!=null?d:{}).streamType=L,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Ce$2=t=>{var e;let r=t.type,s=R$2(r),o=w$1(r),d,L=!!((e=t.partList)!=null&&e.length);return s===g.LIVE&&(d=L?t.partTarget*2:t.targetduration*3),{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:d,lowLatency:L}},Ae$2=(t,e,r)=>{var s,o,d,L,ge,Mt,er,tr;let{streamType:ir,targetLiveWindow:rr,liveEdgeStartOffset:nr,lowLatency:ar}=Ce$2(t);if(ir===g.LIVE){ar?(r.config.backBufferLength=(s=r.userConfig.backBufferLength)!=null?s:4,r.config.maxFragLookUpTolerance=(o=r.userConfig.maxFragLookUpTolerance)!=null?o:.001,r.config.abrBandWidthUpFactor=(d=r.userConfig.abrBandWidthUpFactor)!=null?d:r.config.abrBandWidthFactor):r.config.backBufferLength=(L=r.userConfig.backBufferLength)!=null?L:8;let sr=Object.freeze({get length(){return e.seekable.length},start(lr){return e.seekable.start(lr)},end(lr){var cr;return lr>this.length||lr<0||Number.isFinite(e.duration)?e.seekable.end(lr):(cr=r.liveSyncPosition)!=null?cr:e.seekable.end(lr)}});((ge=M$1.get(e))!=null?ge:{}).seekable=sr}((Mt=M$1.get(e))!=null?Mt:{}).liveEdgeStartOffset=nr,((er=M$1.get(e))!=null?er:{}).targetLiveWindow=rr,e.dispatchEvent(new CustomEvent("targetlivewindowch
3788ange",{composed:!0,bubbles:!0})),((tr=M$1.get(e))!=null?tr:{}).streamType=ir,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},oe$2,ae$2,De$2=(ae$2=(oe$2=globalThis==null?void 0:globalThis.navigator)==null?void 0:oe$2.userAgent)!=null?ae$2:"",Ie$1=De$2.toLowerCase().indexOf("android")!==-1,M$1=new WeakMap,ce$1="mux.com",se$1,ie$1,ue$2=(ie$1=(se$1=T$1).isSupported)==null?void 0:ie$1.call(se$1),Ne$2=Ie$1,Nt$1=()=>F$2.utils.now(),Re$2=F$2.utils.generateUUID,Rt$2=({playbackId:t,customDomain:e=ce$1,maxResolution:r,minResolution:s,renditionOrder:o,tokens:{playback:d}={},extraSourceParams:L={}}={})=>{if(!t)return;let[ge,Mt=""]=$$2(t),er=new URL(`https://stream.${e}/${ge}.m3u8${Mt}`);return d||er.searchParams.has("token")?(er.searchParams.forEach((tr,ir)=>{ir!="token"&&er.searchParams.delete(ir)}),d&&er.searchParams.set("token",d)):(r&&er.searchParams.set("max_resolution",r),s&&(er.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&&er.searchParams.set("rendition_order",o),Object.entries(L).forEach(([tr,ir])=>{ir!=null&&er.searchParams.set(tr,ir)})),er.toString()},we$2=t=>{if(!t)return;let[e]=t.split("?");return e||void 0},He$1=t=>{if(!t||!t.startsWith("https://stream."))return;let[e]=new URL(t).pathname.slice(1).split(".m3u8");return e||void 0},_e$1=t=>{var e,r,s;return(e=t==null?void 0:t.metadata)!=null&&e.video_id?t.metadata.video_id:fe$2(t)&&(s=(r=we$2(t.playbackId))!=null?r:He$1(t.src))!=null?s:t.src},wt$2=t=>{var e;return(e=M$1.get(t))==null?void 0:e.error},re$1=t=>{var e,r;return(r=(e=M$1.get(t))==null?void 0:e.streamType)!=null?r:g.UNKNOWN},Ht$2=t=>{var e,r;return(r=(e=M$1.get(t))==null?void 0:e.targetLiveWindow)!=null?r:Number.NaN},V$2=t=>{var e,r;return(r=(e=M$1.get(t))==null?void 0:e.seekable)!=null?r:t.seekable},_t$2=t=>{var e;let r=(e=M$1.get(t))==null?void 0:e.liveEdgeStartOffset;if(typeof r!="number")return Number.NaN;let s=V$2(t);return s.length?s.end(s.length-1)-r:Number.NaN},W$2=.034,Oe$2=(t,e,r=W$2)=>
3788Math.abs(t-e)<=r,de$2=(t,e,r=W$2)=>t>e||Oe$2(t,e,r),Ve$2=(t,e=W$2)=>t.paused&&de$2(t.currentTime,t.duration,e),le$2=(t,e)=>{var r,s,o;if(!e)return;if(t.readyState>2)return!1;let d=e.currentLevel>=0?(s=(r=e.levels)==null?void 0:r[e.currentLevel])==null?void 0:s.details:(o=e.levels.find(ir=>!!ir.details))==null?void 0:o.details;if(!d||d.live)return;let{fragments:L}=d;if(!(L!=null&&L.length))return;if(t.currentTime<t.duration-(d.targetduration+.5))return!1;let ge=L[L.length-1];if(t.currentTime<=ge.start)return!1;let Mt=ge.start+ge.duration/2,er=t.buffered.start(t.buffered.length-1),tr=t.buffered.end(t.buffered.length-1);return Mt>er&&Mt<tr},Ue$2=(t,e)=>t.ended||t.loop?t.ended:e&&le$2(t,e)?!0:Ve$2(t),Ot$2=(t,e,r)=>{Fe$1(e,r);let{metadata:s={}}=t,{view_session_id:o=Re$2()}=s,d=_e$1(t);s.view_session_id=o,s.video_id=d,t.metadata=s,M$1.set(e,{});let L=We$1(t,e);Ke$1(t,e,L),Ye$1(t,e,L),te$1(e);let ge=X$2(t,e,L),Mt=G$1(t,e,L);return{engine:L,setAutoplay:ge,setPreload:Mt}},Fe$1=(t,e)=>{let r=e==null?void 0:e.engine;r&&(r.detachMedia(),r.destroy()),t!=null&&t.mux&&!t.mux.deleted&&(t.mux.destroy(),delete t.mux),t&&(t.removeAttribute("src"),t.load(),t.removeEventListener("error",ye$1),t.removeEventListener("error",U$2),t.removeEventListener("durationchange",Te$2),M$1.delete(t),t.dispatchEvent(new Event("teardown")))};function pe(t,e){var r;let s=E$2(t);if(s!==b$1.M3U8)return!0;let o=!s||((r=e.canPlayType(s))!=null?r:!0),{preferPlayback:d}=t,L=d===N$2.MSE,ge=d===N$2.NATIVE;return o&&(ge||!(ue$2&&(L||Ne$2)))}var We$1=(t,e)=>{let{debug:r,streamType:s,startTime:o=-1,metadata:d,preferCmcd:L,_hlsConfig:ge={}}=t,Mt=E$2(t)===b$1.M3U8,er=pe(t,e);if(Mt&&!er&&ue$2){let tr={backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0},ir=Be$2(s),rr=L!==k.NONE?{useHeaders:L===k.HEADER,sessionId:d==null?void 0:d.view_session_id,contentId:d==null?void 0:d.video_id}:void 0;return new T$1({debug:r,startPosition:o,cmcd:rr,xhrSetup:(nr,ar)=>{var sr,lr;if(L&&L!==k.QUERY)return;let cr=new URL(ar);if(!cr.searchParams.has("CMCD"))return;let ur=((lr=(sr=cr.searchParams.get("CMCD"))==null?void 0:sr.split(","))!=null?lr:[]).filter(or=>or.startsWith("sid")||or.startsWith("cid")).join(",");cr.searchParams.set("CMCD",ur),nr.open("GET",cr)},...tr,...ir,...ge})}},Be$2=t=>t===g.LIVE?{backBufferLength:8}:{},fe$2=({playbackId:t,src:e,customDomain:r})=>{if(t)return!0;if(typeof e!="string")return!1;let s=window==null?void 0:window.location.href,o=new URL(e,s).hostname.toLocaleLowerCase();return o.includes(ce$1)||!!r&&o.includes(r.toLocaleLowerCase())},Ke$1=(t,e,r)=>{var s;let{envKey:o}=t,d=fe$2(t);if(o||d){let{playerInitTime:L,playerSoftwareName:ge,playerSoftwareVersion:Mt,beaconCollectionDomain:er,debug:tr,disableCookies:ir}=t,rr={...t.metadata,video_title:((s=t==null?void 0:t.metadata)==null?void 0:s.video_title)||void 0},nr=ar=>typeof ar.player_error_code=="string"?!1:typeof t.errorTranslator=="function"?t.errorTranslator(ar):ar;F$2.monitor(e,{debug:tr,beaconCollectionDomain:er,hlsjs:r,Hls:r?T$1:void 0,automaticErrorTracking:!1,errorTranslator:nr,disableCookies:ir,data:{...o?{env_key:o}:{},player_software_name:ge,player_software:ge,player_software_version:Mt,player_init_time:L,...rr}})}},Ye$1=(t,e,r)=>{var s;let o=pe(t,e),{src:d}=t,L=tr=>{e.ended||!Ue$2(e,r)||(le$2(e,r)?e.currentTime=e.buffered.end(e.buffered.length-1):e.dispatchEvent(new Event("ended")))},ge,Mt,er=()=>{var tr,ir;let rr=(tr=V$2(e))==null?void 0:tr.start(0),nr=(ir=V$2(e))==null?void 0:ir.end(0);(Mt!==nr||ge!==rr)&&e.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),ge=rr,Mt=nr};if(m(e,"durationchange",er),e&&o){let tr=E$2(t);if(typeof d=="string"){let ir=()=>{if(re$1(e)!==g.LIVE||Number.isFinite(e.duration))return;let rr=setInterval(er,1e3);e.addEventListener("teardown",()=>{clearInterval(rr)},{once:!0}),m(e,"durationchange",()=>{Number.isFinite(e.duration)&&clearInterval(rr)})};e.preload==="none"?m(e,"loadstart",()=>{ne$1(d,e,tr).then(ir)}):ne$1(d,e,tr).then(ir),e.setAttribute("src",d),t.startTime&&(((s=M$1.get(e))!=null?s:{}).startTime=t.startTime,e.addEventListener("durationchange",Te$2,{once:!0}))}else e.removeAttribute("src");e.addEventListener("error",ye$1),e.addEventListener("error",U$2),e.addEventListener("emptied",()=>{e.querySelectorAll("track[data-removeondestroy]").forEach(ir=>{ir.remove()})},{once:!0}),m(e,"pause",L),m(e,"seeked",L),m(e,"play",()=>{e.ended||de$2(e.currentTime,e.duration)&&(e.currentTime=e.seekable.start(0))})}else r&&d?(r.once(T$1.Events.LEVEL_LOADED,(tr,ir)=>{Ae$2(ir.details,e,r),er(),re$1(e)===g.LIVE&&!Number.isFinite(e.duration)&&(r.on(T$1.Events.LEVEL_UPDATED,er),m(e,"durationchange",()=>{Number.isFinite(e.duration)&&r.off(T$1.Events.LEVELS_UPDATED,er)}))}),r.on(T$1.Events.ERROR,(tr,ir)=>
3788{let rr={[T$1.ErrorTypes.NETWORK_ERROR]:x$1.MEDIA_ERR_NETWORK,[T$1.ErrorTypes.MEDIA_ERROR]:x$1.MEDIA_ERR_DECODE},nr=new x$1("",rr[ir.type]);nr.fatal=ir.fatal,nr.data=ir,e.dispatchEvent(new CustomEvent("error",{detail:nr}))}),e.addEventListener("error",U$2),m(e,"waiting",L),j$2(t,r),Q$2(e,r),r.attachMedia(e)):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 Te$2(t){var e;let r=t.target,s=(e=M$1.get(r))==null?void 0:e.startTime;if(s&&q$1(r.seekable,r.duration,s)){let o=r.preload==="auto";o&&(r.preload="none"),r.currentTime=s,o&&(r.preload="auto")}}async function ye$1(t){if(!t.isTrusted)return;t.stopImmediatePropagation();let e=t.target;if(!(e!=null&&e.error))return;let{message:r,code:s}=e.error,o=new x$1(r,s);if(e.src&&(s!==x$1.MEDIA_ERR_DECODE||s!==void 0))try{let{status:d}=await fetch(e.src);o.data={response:{code:d}}}catch{}e.dispatchEvent(new CustomEvent("error",{detail:o}))}function U$2(t){var e,r;if(!(t instanceof CustomEvent)||!(t.detail instanceof x$1))return;let s=t.target,o=t.detail;!o||!o.fatal||(((e=M$1.get(s))!=null?e:{}).error=o,(r=s.mux)==null||r.emit("error",{player_error_code:o.code,player_error_message:o.message,player_error_context:o.context}))}var ci=Object.defineProperty,ui=Object.getPrototypeOf,hi=Reflect.get,li=(t,e,r)=>e in t?ci(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,E$1=(t,e,r)=>(li(t,typeof e!="symbol"?e+"":e,r),r),pt=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},i=(t,e,r)=>(pt(t,e,"read from private field"),r?r.call(t):e.get(t)),c$1=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},u$1=(t,e,r,s)=>(pt(t,e,"write to private field"),e.set(t,r),r),A=(t,e,r)=>(pt(t,e,"access private method"),r),$e=(t,e,r)=>hi(ui(t),r,e),me$1=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment>"u"){class t extends me$1{}globalThis.DocumentFragment=t}var we$1=class extends me$1{},mt$1=class extends me$1{},fi={get(t){},define(t,e,r){},upgrade(t){},whenDefined(t){return Promise.resolve(we$1)}},xe$1,gt$1=class{constructor(e,r={}){c$1(this,xe$1,void 0),u$1(this,xe$1,r==null?void 0:r.detail)}get detail(){return i(this,xe$1)}initCustomEvent(){}};xe$1=new WeakMap;function pi(t,e){return new we$1}var Pt$1={document:{createElement:pi},DocumentFragment,customElements:fi,CustomEvent:gt$1,EventTarget:me$1,HTMLElement:we$1,HTMLVideoElement:mt$1},Lt$1=typeof window>"u"||typeof globalThis.customElements>"u",ze=Lt$1?Pt$1:globalThis,mi=()=>{try{return"0.17.5"}catch{}return"UNKNOWN"},gi=mi(),It$1=()=>gi,bt$1=["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"],_t$1,Et$1=(_t$1=globalThis.document)==null?void 0:_t$1.createElement("template");Et$1&&(Et$1.innerHTML=` 3789 <style> 3790 :host { 3791 display: inline-flex; 3792 line-height: 0; 3793 flex-direction: column; 3794 justify-content: end; 3795 } 3796 3797 audio { 3798 width: 100%; 3799 } 3800 </style> 3801 <slot name="media"></slot> 3802 <slot></slot> 3803 `);var wt$1,vt$1=(wt$1=globalThis.document)==null?void 0:wt$1.createElement("template");vt$1&&(vt$1.innerHTML=` 3804 <style> 3805 :host { 3806 display: inline-block; 3807 line-height: 0; 3808 } 3809 3810 video { 3811 max-width: 100%; 3812 max-height: 100%; 3813 min-width: 100%; 3814 min-height: 100%; 3815 object-fit: var(--media-object-fit, contain); 3816 object-position: var(--media-object-position, 50% 50%); 3817 } 3818 3819 video::-webkit-media-text-track-container { 3820 transform: var(--media-webkit-text-track-transform); 3821 transition: var(--media-webkit-text-track-transition); 3822 } 3823 </style> 3824 <slot name="media"></slot> 3825 <slot></slot> 3826 `);var xt=(t,{tag:e,is:r})=>{var s,o,d,L,ge,Mt,er,tr,ir,rr,nr,ar,sr,lr,cr,ur;let or=(s=globalThis.document)==null?void 0:s.createElement(e,{is:r}),dr=or?Ei(or):[];return o=class extends t{constructor(){super(),c$1(this,ir),c$1(this,nr),c$1(this,sr),c$1(this,cr),c$1(this,Mt,void 0),c$1(this,er,void 0),c$1(this,tr,new Map),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.append(this.constructor.template.content.cloneNode(!0)))}static get observedAttributes(){var hr,pr,mr;return A(hr=o,L,ge).call(hr),[...(mr=(pr=or==null?void 0:or.constructor)==null?void 0:pr.observedAttributes)!=null?mr:[],"autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"]}get nativeEl(){var hr,pr,mr;return(mr=(pr=(hr=i(this,er))!=null?hr:this.shadowRoot.querySelector(e))!=null?pr:this.querySelector(":scope > [slot=media]"))!=null?mr:this.querySelector(e)}set nativeEl(hr){u$1(this,er,hr)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(hr){this.toggleAttribute("muted",!!hr)}get src(){return this.getAttribute("src")}set src(hr){this.setAttribute("src",`${hr}`)}get preload(){var hr,pr;return(pr=this.getAttribute("preload"))!=null?pr:(hr=this.nativeEl)==null?void 0:hr.preload}set preload(hr){this.setAttribute("preload",`${hr}`)}init(){var hr,pr;if(!this.nativeEl){let mr=document.createElement(e,{is:r});mr.part=e,this.shadowRoot.querySelector('slot[name="media"]').append(mr)}this.nativeEl.muted=this.hasAttribute("muted");for(let mr of dr)A(this,sr,lr).call(this,mr);this.shadowRoot.addEventListener("slotchange",this);for(let mr of this.constructor.Events)(pr=(hr=this.shadowRoot).addEventListener)==null||pr.call(hr,mr,this,!0)}handleEvent(hr){if(hr.type==="slotchange"){A(this,nr,ar).call(this);return}hr.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(hr.type,{detail:hr.detail}))}attributeChangedCallback(hr,pr,mr){A(this,ir,rr).call(this),A(this,cr,ur).call(this,hr,pr,mr)}connectedCallback(){A(this,ir,rr).call(this)}},d=new WeakMap,L=new WeakSet,ge=function(){if(i(this,d))return;u$1(this,d,!0);let hr=new Set(this.observedAttributes);hr.delete("muted");for(let pr of dr)if(!(pr in this.prototype))if(typeof or[pr]=="function")this.prototype[pr]=function(...mr){return A(this,ir,rr).call(this),this.call?this.call(pr,...mr):this.nativeEl[pr].apply(this.nativeEl,mr)};else{let mr={get(){var vr,Er,Cr;A(this,ir,rr).call(this);let Pr=pr.toLowerCase();if(hr.has(Pr)){let kr=this.getAttribute(Pr);return kr===null?!1:kr===""?!0:kr}return(Cr=(vr=this.get)==null?void 0:vr.call(this,pr))!=null?Cr:(Er=this.nativeEl)==null?void 0:Er[pr]}};pr!==pr.toUpperCase()&&(mr.set=function(vr){A(this,ir,rr).call(this);let Er=pr.toLowerCase();if(hr.has(Er)){vr===!0||vr===!1||vr==null?this.toggleAttribute(Er,!!vr):this.setAttribute(Er,vr);return}if(this.set){this.set(pr,vr);return}this.nativeEl[pr]=vr}),Object.defineProperty(this.prototype,pr,mr)}},Mt=new WeakMap,er=new WeakMap,tr=new WeakMap,ir=new WeakSet,rr=function(){i(this,Mt)||(u$1(this,Mt,!0),this.init())},nr=new WeakSet,ar=function(){let hr=new Map(i(this,tr));this.shadowRoot.querySelector("slot:not([name])").assignedElements().filter(pr=>
3826["track","source"].includes(pr.localName)).forEach(pr=>{var mr,vr;hr.delete(pr);let Er=i(this,tr).get(pr);Er||(Er=pr.cloneNode(),i(this,tr).set(pr,Er)),(vr=(mr=this.nativeEl).append)==null||vr.call(mr,Er),Er.localName==="track"&&Er.default&&(Er.kind==="chapters"||Er.kind==="metadata")&&Er.track.mode==="disabled"&&(Er.track.mode="hidden")}),hr.forEach(pr=>pr.remove())},sr=new WeakSet,lr=function(hr){if(Object.prototype.hasOwnProperty.call(this,hr)){let pr=this[hr];delete this[hr],this[hr]=pr}},cr=new WeakSet,ur=function(hr,pr,mr){var vr,Er,Cr,Pr,kr,Mr;["id","class"].includes(hr)||!o.observedAttributes.includes(hr)&&this.constructor.observedAttributes.includes(hr)||(mr===null?(Er=(vr=this.nativeEl).removeAttribute)==null||Er.call(vr,hr):((Pr=(Cr=this.nativeEl).getAttribute)==null?void 0:Pr.call(Cr,hr))!=mr&&((Mr=(kr=this.nativeEl).setAttribute)==null||Mr.call(kr,hr,mr)))},c$1(o,L),E$1(o,"Events",bt$1),E$1(o,"template",e.endsWith("audio")?Et$1:vt$1),c$1(o,d,void 0),o};function Ei(t){let e=[];for(let r=Object.getPrototypeOf(t);r&&r!==HTMLElement.prototype;r=Object.getPrototypeOf(r))e.push(...Object.getOwnPropertyNames(r));return e}var Xe=globalThis.document?xt(HTMLElement,{tag:"video"}):class{};globalThis.document&&xt(HTMLElement,{tag:"audio"});var D$1=new WeakMap,Ee$1=class extends Error{},Je=class extends Error{},qt$1=globalThis.WeakRef?class extends Set{add(t){super.add(new WeakRef(t))}forEach(t){super.forEach(e=>{let r=e.deref();r&&t(r)})}}:Set;function Ft$1(t){yt$1()?Bt$1()?t(chrome.cast.isAvailable):customElements.whenDefined("google-cast-button").then(()=>t(chrome.cast.isAvailable)):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(()=>t(chrome.cast.isAvailable))}}function Gt$1(){return globalThis.chrome}function Ut$1(){let t="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(globalThis.chrome.cast||document.querySelector(`script[src="${t}"]`))return;let e=document.createElement("script");e.src=t,document.head.append(e)}function yt$1(){return typeof chrome<"u"&&chrome.cast&&chrome.cast.isAvailable}function Bt$1(){return typeof cast<"u"&&cast.framework}function G(){if(Bt$1())return cast.framework.CastContext.getInstance()}function Me(){var t;return(t=G())==null?void 0:t.getCurrentSession()}function Qe(){var t;return(t=Me())==null?void 0:t.getSessionObj().media[0]}function Wt$1(t){return new Promise((e,r)=>{Qe().editTracksInfo(t,e,r)})}function jt$1(t){return new Promise((e,r)=>{Qe().getStatus(t,e,r)})}function Tt$1(t){return G().setOptions({...At$1(),...t})}function At$1(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}var Ze=new qt$1,U$1=new WeakSet,R$1;Ft$1(t=>{t&&!R$1&&(R$1=cast.framework,G().addEventListener(R$1.CastContextEventType.CAST_STATE_CHANGED,e=>{Ze.forEach(r=>{var s,o;return(o=(s=D$1.get(r)).onCastStateChanged)==null?void 0:o.call(s,e)})}),G().addEventListener(R$1.CastContextEventType.SESSION_STATE_CHANGED,e=>{Ze.forEach(r=>{var s,o;return(o=(s=D$1.get(r)).onSessionStateChanged)==null?void 0:o.call(s,e)})}),Ze.forEach(e=>{var r,s;return(s=(r=D$1.get(e)).init)==null?void 0:s.call(r)}))});var Yt$1=0,b,De$1,I$1,N$1,ae$1,de$1,B$1,tt,V$1,oe$1,it,Ht$1,Ne$1,kt$1,rt$1,Kt$1,Ve$1,St,nt$1,$t$1,qe,Rt$1,et=class extends EventTarget{constructor(t){super(),c$1(this,V$1),c$1(this,it),c$1(this,Ne$1),c$1(this,rt$1),c$1(this,Ve$1),c$1(this,nt$1),c$1(this,qe),c$1(this,b,void 0),c$1(this,De$1,void 0),c$1(this,I$1,void 0),c$1(this,N$1,void 0),c$1(this,ae$1,"disconnected"),c$1(this,de$1,!1),c$1(this,B$1,new Set),c$1(this,tt,new WeakMap),u$1(this,b,t),Ze.add(this),D$1.set(this,{init:()=>A(this,Ve$1,St).call(this),onCastStateChanged:()=>A(this,Ne$1,kt$1).call(this),onSessionStateChanged:()=>A(this,rt$1,Kt$1).call(this),getCastPlayer:()=>i(this,V$1,oe$1)}),A(this,Ve$1,St).call(this)}get state(){return i(this,ae$1)}async watchAvailability(t){if(i(this,b).disableRemotePlayback)throw new Ee$1("disableRemotePlayback attribute is present.");return i(this,tt).set(t,++Yt$1),i(this,B$1).add(t),Yt$1}async cancelWatchAvailability(t){if(i(this,b).disableRemotePlayback)throw new Ee$1("disableRemotePlayback attribute is present.");t?i(this,B$1).delete(t):i(this,B$1).clear()}async prompt(){var t,e;if(i(this,b).disableRemotePlayback)throw new Ee$1("disableRemotePlayback attribute is present.");if(!yt$1())throw new Je("The RemotePlayback API is disabled on this platform.");let r=U$1.has(i(this,b));U$1.add(i(this,b)),Tt$1(i(this,b).castOptions),Object.entries(i(this,N$1)).forEac
vendor: 9,449 bytes, line 3826
3826h(([s,o])=>{i(this,I$1).controller.addEventListener(s,o)});try{await G().requestSession()}catch(s){if(s==="cancel"){r||U$1.delete(i(this,b));return}throw new Error(s)}(e=(t=D$1.get(i(this,b)))==null?void 0:t.loadOnPrompt)==null||e.call(t)}};b=new WeakMap,De$1=new WeakMap,I$1=new WeakMap,N$1=new WeakMap,ae$1=new WeakMap,de$1=new WeakMap,B$1=new WeakMap,tt=new WeakMap,V$1=new WeakSet,oe$1=function(){if(U$1.has(i(this,b)))return i(this,I$1)},it=new WeakSet,Ht$1=function(){U$1.has(i(this,b))&&(Object.entries(i(this,N$1)).forEach(([t,e])=>{i(this,I$1).controller.removeEventListener(t,e)}),U$1.delete(i(this,b)),i(this,b).muted=i(this,I$1).isMuted,i(this,b).currentTime=i(this,I$1).savedPlayerState.currentTime,i(this,I$1).savedPlayerState.isPaused===!1&&i(this,b).play())},Ne$1=new WeakSet,kt$1=function(){let t=G().getCastState();if(U$1.has(i(this,b))&&t==="CONNECTING"&&(u$1(this,ae$1,"connecting"),this.dispatchEvent(new Event("connecting"))),!i(this,de$1)&&t!=null&&t.includes("CONNECT")){u$1(this,de$1,!0);for(let e of i(this,B$1))e(!0)}else if(i(this,de$1)&&(!t||t==="NO_DEVICES_AVAILABLE")){u$1(this,de$1,!1);for(let e of i(this,B$1))e(!1)}},rt$1=new WeakSet,Kt$1=async function(){var t;let{SESSION_RESUMED:e}=R$1.SessionState;if(G().getSessionState()===e&&i(this,b).castSrc===((t=Qe())==null?void 0:t.media.contentId)){U$1.add(i(this,b)),Object.entries(i(this,N$1)).forEach(([r,s])=>{i(this,I$1).controller.addEventListener(r,s)});try{await jt$1(new chrome.cast.media.GetStatusRequest)}catch(r){console.error(r)}i(this,N$1)[R$1.RemotePlayerEventType.IS_PAUSED_CHANGED](),i(this,N$1)[R$1.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},Ve$1=new WeakSet,St=function(){!R$1||i(this,De$1)||(u$1(this,De$1,!0),Tt$1(i(this,b).castOptions),i(this,b).textTracks.addEventListener("change",()=>A(this,qe,Rt$1).call(this)),A(this,Ne$1,kt$1).call(this),u$1(this,I$1,new R$1.RemotePlayer),new R$1.RemotePlayerController(i(this,I$1)),u$1(this,N$1,{[R$1.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:t})=>{t===!0?(u$1(this,ae$1,"connected"),this.dispatchEvent(new Event("connect"))):(A(this,it,Ht$1).call(this),u$1(this,ae$1,"disconnected"),this.dispatchEvent(new Event("disconnect")))},[R$1.RemotePlayerEventType.DURATION_CHANGED]:()=>{i(this,b).dispatchEvent(new Event("durationchange"))},[R$1.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{i(this,b).dispatchEvent(new Event("volumechange"))},[R$1.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{i(this,b).dispatchEvent(new Event("volumechange"))},[R$1.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{var t;(t=i(this,V$1,oe$1))!=null&&t.isMediaLoaded&&i(this,b).dispatchEvent(new Event("timeupdate"))},[R$1.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{i(this,b).dispatchEvent(new Event("resize"))},[R$1.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{i(this,b).dispatchEvent(new Event(this.paused?"pause":"play"))},[R$1.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var t,e;((t=i(this,V$1,oe$1))==null?void 0:t.playerState)!==chrome.cast.media.PlayerState.PAUSED&&i(this,b).dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(e=i(this,V$1,oe$1))==null?void 0:e.playerState]))},[R$1.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{var t;(t=i(this,V$1,oe$1))!=null&&t.isMediaLoaded&&(await Promise.resolve(),A(this,nt$1,$t$1).call(this))}}))},nt$1=new WeakSet,$t$1=function(){A(this,qe,Rt$1).call(this)},qe=new WeakSet,Rt$1=async function(){var t,e,r,s,o;if(!i(this,V$1,oe$1))return;let d=((e=(t=i(this,I$1).mediaInfo)==null?void 0:t.tracks)!=null?e:[]).filter(({type:rr})=>rr===chrome.cast.media.TrackType.TEXT),L=[...i(this,b).textTracks].filter(({kind:rr})=>rr==="subtitles"||rr==="captions"),ge=d.map(({language:rr,name:nr,trackId:ar})=>{var sr;let{mode:lr}=(sr=L.find(cr=>cr.language===rr&&cr.label===nr))!=null?sr:{};return lr?{mode:lr,trackId:ar}:!1}).filter(Boolean),Mt=ge.filter(({mode:rr})=>rr!=="showing").map(({trackId:rr})=>rr),er=ge.find(({mode:rr})=>rr==="showing"),tr=(o=(s=(r=Me())==null?void 0:r.getSessionObj().media[0])==null?void 0:s.activeTrackIds)!=null?o:[],ir=tr;if(tr.length&&(ir=ir.filter(rr=>!Mt.includes(rr))),er!=null&&er.trackId&&(ir=[...ir,er.trackId]),ir=[...new Set(ir)],!((rr,nr)=>rr.length===nr.length&&rr.every(ar=>nr.includes(ar)))(tr,ir))try{let rr=new chrome.cast.media.EditTracksInfoRequest(ir);await Wt$1(rr)}catch(rr){console.error(rr)}};var zt=t=>{var e,r,s,o,d,L,ge,Mt,er;return r=class extends t{constructor(){super(...arguments),c$1(this,L),c$1(this,Mt),c$1(this,s,{paused:!1}),c$1(this,o,At$1()),c$1(this,d,void 0)}get remote(){return i(this,d)?i(this,d):Gt$1()?(Ut$1(),D$1.set(this,{loadOnPrompt:()=>A(this,Mt,er).call(this)}),u$1(this,d,new et(this))):super.remote}attributeChangedCallback(tr,ir,rr){if(super.attributeChangedCallback(tr,ir,rr),tr==="cast-receiver"&&rr){i(this,o).receiverApplicationId=rr;return}if(i(this,L,ge))switch(tr){case"cast-stream-type":case"cast-src":this.load();break}}async load(){var tr,ir;if(!i(this,L,ge))return super.load();let rr=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType),nr=[...this.querySelectorAll("track")].filter(({kind:cr,src:ur})=>ur&&(cr==="subtitles"||cr==="captions")),ar=[],sr=0;nr.length&&(rr.tracks=nr.map(cr=>{let ur=++sr;ar.length===0&&cr.track.mode==="showing"&&ar.push(ur);let or=new chrome.cast.media.Track(ur,chrome.cast.media.TrackType.TEXT);return or.trackContentId=cr.src,or.trackContentType="text/vtt",or.subtype=cr.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,or.name=cr.label,or.language=cr.srclang,or})),this.castStreamType==="live"?rr.streamType=chrome.cast.media.StreamType.LIVE:rr.streamType=chrome.cast.media.StreamType.BUFFERED,rr.metadata=new chrome.cast.media.GenericMediaMetadata,rr.metadata.title=this.title,rr.metadata.images=[{url:this.poster}];let lr=new chrome.cast.media.LoadRequest(rr);lr.currentTime=(tr=super.currentTime)!=null?tr:0,lr.autoplay=!i(this,s).paused,lr.activeTrackIds=ar,await((ir=Me())==null?void 0:ir.loadMedia(lr)),this.dispatchEvent(new Event("volumechange"))}play(){var tr;if(i(this,L,ge)){i(this,L,ge).isPaused&&((tr=i(this,L,ge).controller)==null||tr.playOrPause());return}return super.play()}pause(){var tr;if(i(this,L,ge)){i(this,L,ge).isPaused||(tr=i(this,L,ge).controller)==null||tr.playOrPause();return}super.pause()}get castOptions(){return i(this,o)}get castReceiver(){var tr;return(tr=this.getAttribute("cast-receiver"))!=null?tr:void 0}set castReceiver(tr){this.castReceiver!=tr&&this.setAttribute("cast-receiver",`${tr}`)}get castSrc(){var tr,ir,rr;return(rr=(ir=this.getAttribute("cast-src"))!=null?ir:(tr=this.querySelector("source"))==null?void 0:tr.src)!=null?rr:this.currentSrc}set castSrc(tr){this.castSrc!=tr&&this.setAttribute("cast-src",`${tr}`)}get castContentType(){var tr;return(tr=this.getAttribute("cast-content-type"))!=null?tr:void 0}set castContentType(tr){this.setAttribute("cast-content-type",`${tr}`)}get castStreamType(){var tr,ir;return(ir=(tr=this.getAttribute("cast-stream-type"))!=null?tr:this.streamType)!=null?ir:void 0}set castStreamType(tr){this.setAttribute("cast-stream-type",`${tr}`)}get readyState(){if(i(this,L,ge))switch(i(this,L,ge).playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return i(this,L,ge)?i(this,L,ge).isPaused:super.paused}get muted(){var tr;return i(this,L,ge)?(tr=i(this,L,ge))==null?void 0:tr.isMuted:super.muted}set muted(tr){var ir;if(i(this,L,ge)){(tr&&!i(this,L,ge).isMuted||!tr&&i(this,L,ge).isMuted)&&((ir=i(this,L,ge).controller)==null||ir.muteOrUnmute());return}super.muted=tr}get volume(){var tr,ir;return i(this,L,ge)?(ir=(tr=i(this,L,ge))==null?void 0:tr.volumeLevel)!=null?ir:1:super.volume}set volume(tr){var ir;if(i(this,L,ge)){i(this,L,ge).volumeLevel=+tr,(ir=i(this,L,ge).controller)==null||ir.setVolumeLevel();return}super.volume=tr}get duration(){var tr,ir,rr;return i(this,L,ge)&&(tr=i(this,L,ge))!=null&&tr.isMediaLoaded?(rr=(ir=i(this,L,ge))==null?void 0:ir.duration)!=null?rr:NaN:super.duration}get currentTime(){var tr,ir,rr;return i(this,L,ge)&&(tr=i(this,L,ge))!=null&&tr.isMediaLoaded?(rr=(ir=i(this,L,ge))==null?void 0:ir.currentTime)!=null?rr:0:super.currentTime}set currentTime(tr){var ir;if(i(this,L,ge)){i(this,L,ge).currentTime=tr,(ir=i(this,L,ge).controller)==null||ir.seek();return}super.currentTime=tr}},s=new WeakMap,o=new WeakMap,d=new WeakMap,L=new WeakSet,ge=function(){var tr,ir;return(ir=(tr=D$1.get(this.remote))==null?void 0:tr.getCastPlayer)==null?void 0:ir.call(tr)},Mt=new WeakSet,er=async function(){i(this,s).paused=$e(r.prototype,this,"paused"),$e(r.prototype,this,"pause").call(this),this.muted=$e(r.prototype,this,"muted");try{await this.load()}catch(tr){console.error(tr)}},E$1(r,"observedAttributes",[...(e=t.observedAttributes)!=null?e:[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"]),r},q=class extends Event{constructor(t,e){super(t),E$1(this,"track"),this.track=e.track}},Ct$1=new WeakMap;function a(t){var e;return(e=Ct$1.get(t))!=null?e:vi(t,{})}function vi(t,e){let r=Ct$1.get(t);return r||Ct$1.set(t,r={}),Object.assign(r,e)}function st$1(t,e){let r=t.videoTracks;a(e).media=t,a(e).renditionSet||(a(e).renditionSet=new Set);let s=a(r).trackSet;s.add(e);let o=s.size-1;
3826o in ue$1.prototype||Object.defineProperty(ue$1.prototype,o,{get(){return[...a(this).trackSet][o]}}),queueMicrotask(()=>{r.dispatchEvent(new q("addtrack",{track:e}))})}function ot$1(t){var e;let r=(e=a(t).media)==null?void 0:e.videoTracks;r&&(a(r).trackSet.delete(t),queueMicrotask(()=>{r.dispatchEvent(new q("removetrack",{track:t}))}))}function Jt(t){var e;let r=(e=a(t).media.videoTracks)!=null?e:[],s=!1;for(let o of r)o!==t&&(o.selected=!1,s=!0);if(s){if(a(r).changeRequested)return;a(r).changeRequested=!0,queueMicrotask(()=>{delete a(r).changeRequested,r.dispatchEvent(new Event("change"))})}}var W$1,j$1,Y$1,ce,Fe,ue$1=class extends EventTarget{constructor(){super(),c$1(this,ce),c$1(this,W$1,void 0),c$1(this,j$1,void 0),c$1(this,Y$1,void 0),a(this).trackSet=new Set}[Symbol.iterator](){return i(this,ce,Fe).values()}get length(){return i(this,ce,Fe).size}getTrackById(e){var r;return(r=[...i(this,ce,Fe)].find(s=>s.id===e))!=null?r:null}get selectedIndex(){return[...i(this,ce,Fe)].findIndex(e=>e.selected)}get onaddtrack(){return i(this,W$1)}set onaddtrack(e){i(this,W$1)&&(this.removeEventListener("addtrack",i(this,W$1)),u$1(this,W$1,void 0)),typeof e=="function"&&(u$1(this,W$1,e),this.addEventListener("addtrack",e))}get onremovetrack(){return i(this,j$1)}set onremovetrack(e){i(this,j$1)&&(this.removeEventListener("removetrack",i(this,j$1)),u$1(this,j$1,void 0)),typeof e=="function"&&(u$1(this,j$1,e),this.addEventListener("removetrack",e))}get onchange(){return i(this,Y$1)}set onchange(e){i(this,Y$1)&&(this.removeEventListener("change",i(this,Y$1)),u$1(this,Y$1,void 0)),typeof e=="function"&&(u$1(this,Y$1,e),this.addEventListener("change",e))}};W$1=new WeakMap,j$1=new WeakMap,Y$1=new WeakMap,ce=new WeakSet,Fe=function(){return a(this).trackSet};var F$1=class extends Event{constructor(e,r){super(e),E$1(this,"rendition"),this.rendition=r.rendition}};function Qt$1(t,e){let r=a(t).media.videoRenditions;a(e).media=a(t).media,a(e).track=t;let s=a(t).renditionSet;s.add(e);let o=s.size-1;o in he$1.prototype||Object.defineProperty(he$1.prototype,o,{get(){return ve$1(this)[o]}}),queueMicrotask(()=>{t.selected&&r.dispatchEvent(new F$1("addrendition",{rendition:e}))})}function Zt(t){let e=a(t).media.videoRenditions,r=a(t).track;a(r).renditionSet.delete(t),queueMicrotask(()=>{a(t).track.selected&&e.dispatchEvent(new F$1("removerendition",{rendition:t}))})}function ei(t){let e=a(t).media.videoRenditions;!e||a(e).changeRequested||(a(e).changeRequested=!0,queueMicrotask(()=>{delete a(e).changeRequested,a(t).track.selected&&e.dispatchEvent(new Event("change"))}))}function ve$1(t){return[...a(t).media.videoTracks].filter(e=>e.selected).flatMap(e=>[...a(e).renditionSet])}var H,K$1,$$1,he$1=class extends EventTarget{constructor(){super(...arguments),c$1(this,H,void 0),c$1(this,K$1,void 0),c$1(this,$$1,void 0)}[Symbol.iterator](){return ve$1(this).values()}get length(){return ve$1(this).length}getRenditionById(e){var r;return(r=ve$1(this).find(s=>`${s.id}`==`${e}`))!=null?r:null}get selectedIndex(){return ve$1(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[r,s]of ve$1(this).entries())s.selected=r===e}get onaddrendition(){return i(this,H)}set onaddrendition(e){i(this,H)&&(this.removeEventListener("addrendition",i(this,H)),u$1(this,H,void 0)),typeof e=="function"&&(u$1(this,H,e),this.addEventListener("addrendition",e))}get onremoverendition(){return i(this,K$1)}set onremoverendition(e){i(this,K$1)&&(this.removeEventListener("removerendition",i(this,K$1)),u$1(this,K$1,void 0)),typeof e=="function"&&(u$1(this,K$1,e),this.addEventListener("removerendition",e))}get onchange(){return i(this,$$1)}set onchange(e){i(this,$$1)&&(this.removeEventListener("change",i(this,$$1)),u$1(this,$$1,void 0)),typeof e=="function"&&(u$1(this,$$1,e),this.addEventListener("change",e))}};H=new WeakMap,K$1=new WeakMap,$$1=new WeakMap;var be,Ge=class{constructor(){E$1(this,"src"),E$1(this,"id"),E$1(this,"width"),E$1(this,"height"),E$1(this,"bitrate"),E$1(this,"frameRate"),E$1(this,"codec"),c$1(this,be,!1)}get selected(){return i(this,be)}set selected(t){i(this,be)!==t&&(u$1(this,be,t),ei(this))}};
vendor: 5,749 bytes, line 3826
3826be=new WeakMap;var ye,Te$1=class{constructor(){E$1(this,"id"),E$1(this,"kind"),E$1(this,"label",""),E$1(this,"language",""),E$1(this,"sourceBuffer"),c$1(this,ye,!1)}addRendition(e,r,s,o,d,L){let ge=new Ge;return ge.src=e,ge.width=r,ge.height=s,ge.frameRate=L,ge.bitrate=d,ge.codec=o,Qt$1(this,ge),ge}removeRendition(e){Zt(e)}get selected(){return i(this,ye)}set selected(e){i(this,ye)!==e&&(u$1(this,ye,e),e===!0&&Jt(this))}};ye=new WeakMap;function ti(t,e){let r=a(t).media.audioRenditions;a(e).media=a(t).media,a(e).track=t;let s=a(t).renditionSet;s.add(e);let o=s.size-1;o in le$1.prototype||Object.defineProperty(le$1.prototype,o,{get(){return Ae$1(this)[o]}}),queueMicrotask(()=>{t.enabled&&r.dispatchEvent(new F$1("addrendition",{rendition:e}))})}function ii(t){let e=a(t).media.audioRenditions,r=a(t).track;a(r).renditionSet.delete(t),queueMicrotask(()=>{a(t).track.enabled&&e.dispatchEvent(new F$1("removerendition",{rendition:t}))})}function ri(t){let e=a(t).media.audioRenditions;!e||a(e).changeRequested||(a(e).changeRequested=!0,queueMicrotask(()=>{delete a(e).changeRequested,a(t).track.enabled&&e.dispatchEvent(new Event("change"))}))}function Ae$1(t){return[...a(t).media.audioTracks].filter(e=>e.enabled).flatMap(e=>[...a(e).renditionSet])}var z$1,X$1,J$1,le$1=class extends EventTarget{constructor(){super(...arguments),c$1(this,z$1,void 0),c$1(this,X$1,void 0),c$1(this,J$1,void 0)}[Symbol.iterator](){return Ae$1(this).values()}get length(){return Ae$1(this).length}getRenditionById(e){var r;return(r=Ae$1(this).find(s=>`${s.id}`==`${e}`))!=null?r:null}get selectedIndex(){return Ae$1(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[r,s]of Ae$1(this).entries())s.selected=r===e}get onaddrendition(){return i(this,z$1)}set onaddrendition(e){i(this,z$1)&&(this.removeEventListener("addrendition",i(this,z$1)),u$1(this,z$1,void 0)),typeof e=="function"&&(u$1(this,z$1,e),this.addEventListener("addrendition",e))}get onremoverendition(){return i(this,X$1)}set onremoverendition(e){i(this,X$1)&&(this.removeEventListener("removerendition",i(this,X$1)),u$1(this,X$1,void 0)),typeof e=="function"&&(u$1(this,X$1,e),this.addEventListener("removerendition",e))}get onchange(){return i(this,J$1)}set onchange(e){i(this,J$1)&&(this.removeEventListener("change",i(this,J$1)),u$1(this,J$1,void 0)),typeof e=="function"&&(u$1(this,J$1,e),this.addEventListener("change",e))}};z$1=new WeakMap,X$1=new WeakMap,J$1=new WeakMap;var ke$1,Ue$1=class{constructor(){E$1(this,"src"),E$1(this,"id"),E$1(this,"bitrate"),E$1(this,"codec"),c$1(this,ke$1,!1)}get selected(){return i(this,ke$1)}set selected(e){i(this,ke$1)!==e&&(u$1(this,ke$1,e),ri(this))}};ke$1=new WeakMap;function dt$1(t,e){let r=t.audioTracks;a(e).media=t,a(e).renditionSet||(a(e).renditionSet=new Set);let s=a(r).trackSet;s.add(e);let o=s.size-1;o in fe$1.prototype||Object.defineProperty(fe$1.prototype,o,{get(){return[...a(this).trackSet][o]}}),queueMicrotask(()=>{r.dispatchEvent(new q("addtrack",{track:e}))})}function ct$1(t){var e;let r=(e=a(t).media)==null?void 0:e.audioTracks;r&&(a(r).trackSet.delete(t),queueMicrotask(()=>{r.dispatchEvent(new q("removetrack",{track:t}))}))}function ni(t){let e=a(t).media.audioTracks;!e||a(e).changeRequested||(a(e).changeRequested=!0,queueMicrotask(()=>{delete a(e).changeRequested,e.dispatchEvent(new Event("change"))}))}var Q$1,Z$1,ee$1,Se$1,at,fe$1=class extends EventTarget{constructor(){super(),c$1(this,Se$1),c$1(this,Q$1,void 0),c$1(this,Z$1,void 0),c$1(this,ee$1,void 0),a(this).trackSet=new Set}[Symbol.iterator](){return i(this,Se$1,at).values()}get length(){return i(this,Se$1,at).size}getTrackById(e){var r;return(r=[...i(this,Se$1,at)].find(s=>s.id===e))!=null?r:null}get onaddtrack(){return i(this,Q$1)}set onaddtrack(e){i(this,Q$1)&&(this.removeEventListener("addtrack",i(this,Q$1)),u$1(this,Q$1,void 0)),typeof e=="function"&&(u$1(this,Q$1,e),this.addEventListener("addtrack",e))}get onremovetrack(){return i(this,Z$1)}set onremovetrack(e){i(this,Z$1)&&(this.removeEventListener("removetrack",i(this,Z$1)),u$1(this,Z$1,void 0)),typeof e=="function"&&(u$1(this,Z$1,e),this.addEventListener("removetrack",e))}get onchange(){return i(this,ee$1)}set onchange(e){i(this,ee$1)&&(this.removeEventListener("change",i(this,ee$1)),u$1(this,ee$1,void 0)),typeof e=="function"&&(u$1(this,ee$1,e),this.addEventListener("change",e))}};Q$1=new WeakMap,Z$1=new WeakMap,ee$1=new WeakMap,Se$1=new WeakSet,at=function(){return a(this).trackSet};var Re$1,Ce$1=class{constructor(){E$1(this,"id"),E$1(this,"kind"),E$1(this,"label",""),E$1(this,"language",""),E$1(this,"sourceBuffer"),c$1(this,Re$1,!1)}addRendition(e,r,s){let o=new Ue$1;return o.src=e,o.codec=r,o.bitrate=s,ti(this,o),o}removeRendition(e){ii(e)}get enabled(){return i(this,Re$1)}set enabled(e){i(this,Re$1)!==e&&(u$1(this,Re$1,e),ni(this))}};Re$1=new WeakMap;var si=ut$1(globalThis.HTMLMediaElement,"video"),oi=ut$1(globalThis.HTMLMediaElement,"audio");function ai(t){if(!(t!=null&&t.prototype))return t;let e=ut$1(t,"video");(!e||`${e}`.includes("[native code]"))&&Object.defineProperty(t.prototype,"videoTracks",{get(){return bi(this)}});let r=ut$1(t,"audio");(!r||`${r}`.includes("[native code]"))&&Object.defineProperty(t.prototype,"audioTracks",{get(){return yi(this)}}),"addVideoTrack"in t.prototype||(t.prototype.addVideoTrack=function(d,L="",ge=""){let Mt=new Te$1;return Mt.kind=d,Mt.label=L,Mt.language=ge,st$1(this,Mt),Mt}),"removeVideoTrack"in t.prototype||(t.prototype.removeVideoTrack=ot$1),"addAudioTrack"in t.prototype||(t.prototype.addAudioTrack=function(d,L="",ge=""){let Mt=new Ce$1;return Mt.kind=d,Mt.label=L,Mt.language=ge,dt$1(this,Mt),Mt}),"removeAudioTrack"in t.prototype||(t.prototype.removeAudioTrack=ct$1),"videoRenditions"in t.prototype||Ob
3826ject.defineProperty(t.prototype,"videoRenditions",{get(){return s(this)}});let s=d=>{let L=a(d).videoRenditions;return L||(L=new he$1,a(L).media=d,a(d).videoRenditions=L),L};"audioRenditions"in t.prototype||Object.defineProperty(t.prototype,"audioRenditions",{get(){return o(this)}});let o=d=>{let L=a(d).audioRenditions;return L||(L=new le$1,a(L).media=d,a(d).audioRenditions=L),L};return t}function ut$1(t,e){var r;if(t!=null&&t.prototype)return(r=Object.getOwnPropertyDescriptor(t.prototype,`${e}Tracks`))==null?void 0:r.get}function bi(t){var e;let r=a(t).videoTracks;if(!r&&(r=new ue$1,a(t).videoTracks=r,si)){let s=si.call((e=t.nativeEl)!=null?e:t);for(let o of s)st$1(t,o);s.addEventListener("change",()=>{r.dispatchEvent(new Event("change"))}),s.addEventListener("addtrack",o=>{if([...r].some(d=>d instanceof Te$1)){for(let d of s)ot$1(d);return}st$1(t,o.track)}),s.addEventListener("removetrack",o=>{ot$1(o.track)})}return r}function yi(t){var e;let r=a(t).audioTracks;if(!r&&(r=new fe$1,a(t).audioTracks=r,oi)){let s=oi.call((e=t.nativeEl)!=null?e:t);for(let o of s)dt$1(t,o);s.addEventListener("change",()=>{r.dispatchEvent(new Event("change"))}),s.addEventListener("addtrack",o=>{if([...r].some(d=>d instanceof Ce$1)){for(let d of s)ct$1(d);return}dt$1(t,o.track)}),s.addEventListener("removetrack",o=>{ct$1(o.track)})}return r}bt$1.push("castchange","entercast","leavecast");var h$2={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_COOKIES:"disable-cookies",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",RENDITION_ORDER:"rendition-order",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",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"}
vendor: 5,908 bytes, line 3826
3826,Ni$1=Object.values(h$2),Vi=It$1(),qi="mux-video",_,Oe$1,We,Pe$1,je,Ye,He,Ke,Le$1,lt$1,Ot$1=class extends Xe{constructor(){super(),c$1(this,Le$1),c$1(this,_,void 0),c$1(this,Oe$1,void 0),c$1(this,We,void 0),c$1(this,Pe$1,{}),c$1(this,je,void 0),c$1(this,Ye,void 0),c$1(this,He,void 0),c$1(this,Ke,void 0),u$1(this,We,Nt$1())}static get observedAttributes(){var e;return[...Ni$1,...(e=Xe.observedAttributes)!=null?e:[]]}get preferCmcd(){var e;return(e=this.getAttribute(h$2.PREFER_CMCD))!=null?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?Xe$1.includes(e)?this.setAttribute(h$2.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${Xe$1.join()}`):this.removeAttribute(h$2.PREFER_CMCD))}get playerInitTime(){return i(this,We)}get playerSoftwareName(){var e;return(e=i(this,He))!=null?e:qi}set playerSoftwareName(e){u$1(this,He,e)}get playerSoftwareVersion(){var e;return(e=i(this,Ye))!=null?e:Vi}set playerSoftwareVersion(e){u$1(this,Ye,e)}get _hls(){var e;return(e=i(this,_))==null?void 0:e.engine}get mux(){var e;return(e=this.nativeEl)==null?void 0:e.mux}get error(){var e;return(e=wt$2(this.nativeEl))!=null?e:null}get errorTranslator(){return i(this,Ke)}set errorTranslator(e){u$1(this,Ke,e)}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(e==null?this.removeAttribute("src"):this.setAttribute("src",e))}get type(){var e;return(e=this.getAttribute(h$2.TYPE))!=null?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(h$2.TYPE,e):this.removeAttribute(h$2.TYPE))}get autoplay(){let e=this.getAttribute("autoplay");return e===null?!1:e===""?!0:e}set autoplay(e){let r=this.autoplay;e!==r&&(e?this.setAttribute("autoplay",typeof e=="string"?e:""):this.removeAttribute("autoplay"))}get preload(){let e=this.getAttribute("preload");return e===""?"auto":["none","metadata","auto"].includes(e)?e:super.preload}set preload(e){e!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(e)?this.setAttribute("preload",e):this.removeAttribute("preload"))}get debug(){return this.getAttribute(h$2.DEBUG)!=null}set debug(e){e!==this.debug&&(e?this.setAttribute(h$2.DEBUG,""):this.removeAttribute(h$2.DEBUG))}get disableCookies(){return this.hasAttribute(h$2.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(h$2.DISABLE_COOKIES,""):this.removeAttribute(h$2.DISABLE_COOKIES))}get startTime(){let e=this.getAttribute(h$2.START_TIME);if(e==null)return;let r=+e;return Number.isNaN(r)?void 0:r}set startTime(e){e!==this.startTime&&(e==null?this.removeAttribute(h$2.START_TIME):this.setAttribute(h$2.START_TIME,`${e}`))}get playbackId(){var e;return(e=this.getAttribute(h$2.PLAYBACK_ID))!=null?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(h$2.PLAYBACK_ID,e):this.removeAttribute(h$2.PLAYBACK_ID))}get maxResolution(){var e;return(e=this.getAttribute(h$2.MAX_RESOLUTION))!=null?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(h$2.MAX_RESOLUTION,e):this.removeAttribute(h$2.MAX_RESOLUTION))}get minResolution(){var e;return(e=this.getAttribute(h$2.MIN_RESOLUTION))!=null?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(h$2.MIN_RESOLUTION,e):this.removeAttribute(h$2.MIN_RESOLUTION))}get renditionOrder(){var e;return(e=this.getAttribute(h$2.RENDITION_ORDER))!=null?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(h$2.RENDITION_ORDER,e):this.removeAttribute(h$2.RENDITION_ORDER))}get customDomain(){var e;return(e=this.getAttribute(h$2.CUSTOM_DOMAIN))!=null?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(h$2.CUSTOM_DOMAIN,e):this.removeAttribute(h$2.CUSTOM_DOMAIN))}get ended(){return Ue$2(this.nativeEl,this._hls)}get envKey(){var e;return(e=this.getAttribute(h$2.ENV_KEY))!=null?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(h$2.ENV_KEY,e):this.removeAttribute(h$2.ENV_KEY))}get beaconCollectionDomain(){var e;return(e=this.getAttribute(h$2.BEACON_COLLECTION_DOMAIN))!=null?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(h$2.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(h$2.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return(e=this.getAttribute(h$2.STREAM_TYPE))!=null?e:re$1(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(h$2.STREAM_TYPE,e):this.removeAttribute(h$2.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(h$2.TARGET_LIVE_WINDOW)?+this.getAttribute(h$2.TARGET_LIVE_WINDOW):Ht$2(this.nativeEl)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(e==null?this.removeAttribute(h$2.TARGET_LIVE_WINDOW):this.setAttribute(h$2.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,r;if(this.hasAttribute(h$2.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:s}=this,o=(e=this.nativeEl.seekable.end(0))!=null?e:0,d=(r=this.nativeEl.seekable.start(0))!=null?r:0;return Math.max(d,o-s)}return _t$2(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(h$2.LIVE_EDGE_OFFSET))return+this.getAttribute(h$2.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.targetLiveWindow&&(e==null?this.removeAttribute(h$2.LIVE_EDGE_OFFSET):this.setAttribute(h$2.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return V$2(this.nativeEl)}async addCuePoints(e){return J$2(this.nativeEl,e)}get activeCuePoint(){return ee$2(this.nativeEl)}get cuePoints(){return Le$2(this.nativeEl)}getStartDate(){return Pe$2(this.nativeEl,this._hls)}get currentPdt(){return ke$2(this.nativeEl,this._hls)}get preferPlayback(){let e=this.getAttribute(h$2.PREFER_PLAYBACK);if(e===N$2.MSE||e===N$2.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===N$2.MSE||e===N$2.NATIVE?this.setAttribute(h$2.PREFER_PLAYBACK,e):this.removeAttribute(h$2.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![h$2.METADATA_URL].includes(e)).reduce((e,r)=>{let s=this.getAttribute(r);
3826return s!=null&&(e[r.replace(/^metadata-/,"").replace(/-/g,"_")]=s),e},{}),...i(this,Pe$1)}}set metadata(e){u$1(this,Pe$1,e??{}),this.mux&&this.mux.emit("hb",i(this,Pe$1))}get _hlsConfig(){return i(this,je)}set _hlsConfig(e){u$1(this,je,e)}load(){u$1(this,_,Ot$2(this,this.nativeEl,i(this,_)))}unload(){Fe$1(this.nativeEl,i(this,_)),u$1(this,_,void 0)}attributeChangedCallback(e,r,s){var o,d;switch(Xe.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,r,s),e){case h$2.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=s??void 0;break;case h$2.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=s??void 0;break;case"src":{let L=!!r,ge=!!s;!L&&ge?A(this,Le$1,lt$1).call(this):L&&!ge?this.unload():L&&ge&&(this.unload(),A(this,Le$1,lt$1).call(this));break}case"autoplay":if(s===r)break;(o=i(this,_))==null||o.setAutoplay(this.autoplay);break;case"preload":if(s===r)break;(d=i(this,_))==null||d.setPreload(s);break;case h$2.PLAYBACK_ID:this.src=Rt$2(this);break;case h$2.DEBUG:{let 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 h$2.METADATA_URL:s&&fetch(s).then(L=>L.json()).then(L=>this.metadata=L).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${s}!`));break;case h$2.STREAM_TYPE:(s==null||s!==r)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case h$2.TARGET_LIVE_WINDOW:(s==null||s!==r)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break}}connectedCallback(){var e;(e=super.connectedCallback)==null||e.call(this),this.nativeEl&&this.src&&!i(this,_)&&A(this,Le$1,lt$1).call(this)}disconnectedCallback(){this.unload()}};_=new WeakMap,Oe$1=new WeakMap,We=new WeakMap,Pe$1=new WeakMap,je=new WeakMap,Ye=new WeakMap,He=new WeakMap,Ke=new WeakMap,Le$1=new WeakSet,lt$1=async function(){i(this,Oe$1)||(await u$1(this,Oe$1,Promise.resolve()),u$1(this,Oe$1,null),this.load())};var Be$1=class extends zt(ai(Ot$1)){};ze.customElements.get("mux-video")||(ze.customElements.define("mux-video",Be$1),ze.MuxVideoElement=Be$1);var bn=Be$1,__defProp$1=Object.defineProperty,__defNormalProp$1=(t,e,r)=>e in t?__defProp$1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField$1=(t,e,r)=>(__defNormalProp$1(t,e+"",r),r),__accessCheck$1=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet$1=(t,e,r)=>(__accessCheck$1(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd$1=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet$1=(t,e,r,s)=>(__accessCheck$1(t,e,"write to private field"),e.set(t,r),r),_parts,_processor,_items,_value,_element,_attributeName,_namespaceURI,_list,list_get,_parentNode,_nodes;const ELEMENT=1,STRING=0,PART=1,defaultProcessor={processCallback(t,e,r){if(r){for(const[s,o]of e)if(s in r){const d=r[s];typeof d=="boolean"&&o instanceof AttrPart&&typeof o.element[o.attributeName]=="boolean"?o.booleanValue=d:typeof d=="function"&&o instanceof AttrPart?o.element[o.attributeName]=d:o.value=d}}}};class TemplateInstance extends GlobalThis.DocumentFragment{constructor(e,r,s=defaultProcessor){var o;super(),__privateAdd$1(this,_parts,void 0),__privateAdd$1(this,_processor,void 0),this.append(e.content.cloneNode(!0)),__privateSet$1(this,_parts,parse(this)),__privateSet$1(this,_processor,s),(o=s.createCallback)==null||o.call(s,this,__privateGet$1(this,_parts),r),s.processCallback(this,__privateGet$1(this,_parts),r)}update(e){__privateGet$1(this,_processor).processCallback(this,__privateGet$1(this,_parts),e)}}_parts=new WeakMap;_processor=new WeakMap;const parse=(t,e=[])=>{let r,s;for(let o of t.attributes||[])if(o.value.includes("{{")){const d=new AttrPartList;for([r,s]of tokenize$1(o.value))if(!r)d.append(s);else{const L=new AttrPart(t,o.name,o.namespaceURI);d.append(L),e.push([s,L])}o.value=d.toString()}for(let o of t.childNodes)if(o.nodeType===ELEMENT&&!(o instanceof HTMLTemplateElement))parse(o,e);else if(o.nodeType===ELEMENT||o.data.includes("{{")){const d=[];if(o.data)for([r,s]of tokenize$1(o.data))if(!r)d.push(new Text(s));else{const L=new ChildNodePart(t);d.push(L),e.push([s,L])}else if(o instanceof HTMLTemplateElement){const L=new InnerTemplatePart(t,o);d.push(L),e.push([L.expression,L])}o.replaceWith(...d.flatMap(L=>L.replacementNodes||[L]))}return e},mem={},tokenize$1=t=>{let e="",r=0,s=mem[t],o=0,d;if(s)return s;for(s=[];d=t[o];o++)d==="{"&&t[o+1]==="{"&&t[o-1]!=="\\"&&t[o+2]&&++r==1?(e&&s.push([STRING,e]),e="",o++):d==="}"&&t[o+1]==="}"&&t[o-1]!=="\\"&&!--r?(s.push([PART,e.trim()]),e="",o++):e+=d||"";return e&&s.push([STRING,(r>0?"{{":"")+e]),mem[t]=s},FRAGMENT=11;class Part{get value(){return""}set value(e){}toString(){return this.value}}const attrPartToList=new WeakMap;class AttrPartList{constructor(){__privateAdd$1(this,_items,[])}[Symbol.iterator](){return __privateGet$1(this,_items).values()}get length(){return __privateGet$1(this,_items).length}item(e){return __privateGet$1(this,_items)[e]}append(...e){for(const r of e)r instanceof AttrPart&&attrPartToList.set(r,this),__privateGet$1(this,_items).push(r)}toString(){return __privateGet$1(this,_items).join("")}}_items=new WeakMap;class AttrPart extends Part{constructor(e,r,s){super(),__privateAdd$1(this,_list),__privateAdd$1(this,_value,""),__privateAdd$1(this,_element,void 0),__privateAdd$1(this,_attributeName,void 0),__privateAdd$1(this,_namespaceURI,void 0),__privateSet$1(this,_element,e),__privateSet$1(this,_attributeName,r),__privateSet$1(this,_namespaceURI,s)}get attributeName(){return __privateGet$1(this,_attributeName)}get attributeNamespace(){return __privateGet$1(this,_namespaceURI)}
vendor: 4,183 bytes, line 3826
3826get element(){return __privateGet$1(this,_element)}get value(){return __privateGet$1(this,_value)}set value(e){__privateGet$1(this,_value)!==e&&(__privateSet$1(this,_value,e),!__privateGet$1(this,_list,list_get)||__privateGet$1(this,_list,list_get).length===1?e==null?__privateGet$1(this,_element).removeAttributeNS(__privateGet$1(this,_namespaceURI),__privateGet$1(this,_attributeName)):__privateGet$1(this,_element).setAttributeNS(__privateGet$1(this,_namespaceURI),__privateGet$1(this,_attributeName),e):__privateGet$1(this,_element).setAttributeNS(__privateGet$1(this,_namespaceURI),__privateGet$1(this,_attributeName),__privateGet$1(this,_list,list_get)))}get booleanValue(){return __privateGet$1(this,_element).hasAttributeNS(__privateGet$1(this,_namespaceURI),__privateGet$1(this,_attributeName))}set booleanValue(e){if(!__privateGet$1(this,_list,list_get)||__privateGet$1(this,_list,list_get).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}}_value=new WeakMap;_element=new WeakMap;_attributeName=new WeakMap;_namespaceURI=new WeakMap;_list=new WeakSet;list_get=function(){return attrPartToList.get(this)};class ChildNodePart extends Part{constructor(e,r){super(),__privateAdd$1(this,_parentNode,void 0),__privateAdd$1(this,_nodes,void 0),__privateSet$1(this,_parentNode,e),__privateSet$1(this,_nodes,r?[...r]:[new Text])}get replacementNodes(){return __privateGet$1(this,_nodes)}get parentNode(){return __privateGet$1(this,_parentNode)}get nextSibling(){return __privateGet$1(this,_nodes)[__privateGet$1(this,_nodes).length-1].nextSibling}get previousSibling(){return __privateGet$1(this,_nodes)[0].previousSibling}get value(){return __privateGet$1(this,_nodes).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){const r=e.flat().flatMap(s=>s==null?[new Text]:s.forEach?[...s]:s.nodeType===FRAGMENT?[...s.childNodes]:s.nodeType?[s]:[new Text(s)]);r.length||r.push(new Text),__privateSet$1(this,_nodes,swapdom(__privateGet$1(this,_nodes)[0].parentNode,__privateGet$1(this,_nodes),r,this.nextSibling))}}_parentNode=new WeakMap;_nodes=new WeakMap;class InnerTemplatePart extends ChildNodePart{constructor(e,r){let s=r.getAttribute("directive")||r.getAttribute("type"),o=r.getAttribute("expression")||r.getAttribute(s)||"";o.startsWith("{{")&&(o=o.trim().slice(2,-2).trim()),super(e),__publicField$1(this,"directive"),this.expression=o,this.template=r,this.directive=s}}function swapdom(t,e,r,s=null){let o=0,d,L,ge,Mt=r.length,er=e.length;for(;o<Mt&&o<er&&e[o]==r[o];)o++;for(;o<Mt&&o<er&&r[Mt-1]==e[er-1];)s=r[--er,--Mt];if(o==er)for(;o<Mt;)t.insertBefore(r[o++],s);if(o==Mt)for(;o<er;)t.removeChild(e[o++]);else{for(d=e[o];o<Mt;)ge=r[o++],L=d?d.nextSibling:s,d==ge?d=L:o<Mt&&r[o]==L?(t.replaceChild(ge,d),d=L):t.insertBefore(ge,d);for(;d!=s;)L=d.nextSibling,t.removeChild(d),d=L}return r}const pipeModifiers={string:t=>String(t)};class PartialTemplate{constructor(e){this.template=e,this.state=void 0}}const templates=new WeakMap,templateInstances=new WeakMap,Directives={partial:(t,e)=>{e[t.expression]=new PartialTemplate(t.template)},if:(t,e)=>{var r;if(evaluateExpression(t.expression,e))if(templates.get(t)!==t.template){templates.set(t,t.template);const s=new TemplateInstance(t.template,e,processor);t.replace(s),templateInstances.set(t,s)}else(r=templateInstances.get(t))==null||r.update(e);else t.replace(""),templates.delete(t),templateInstances.delete(t)}},DirectiveNames=Object.keys(Directives),processor={processCallback(t,e,r){var s,o;if(r)for(const[d,L]of e){if(L instanceof InnerTemplatePart){if(!L.directive){const Mt=DirectiveNames.find(er=>L.template.hasAttribute(er));Mt&&(L.directive=Mt,L.expression=L.template.getAttribute(Mt))}(s=Directives[L.directive])==null||s.call(Directives,L,r);continue}let ge=evaluateExpression(d,r);if(ge instanceof PartialTemplate){templates.get(L)!==ge.template?(templates.set(L,ge.template),ge=new TemplateInstance(ge.template,ge.state,processor),L.value=ge,templateInstances.set(L,ge)):(o=templateInstances.get(L))==null||o.update(ge.state);continue}ge?(L instanceof AttrPart&&L.attributeName.startsWith("aria-")&&(ge=String(ge)),L instanceof AttrPart?t
vendor: 1,819 bytes, line 3826
3826ypeof ge=="boolean"?L.booleanValue=ge:typeof ge=="function"?L.element[L.attributeName]=ge:L.value=ge:(L.value=ge,templates.delete(L),templateInstances.delete(L))):L instanceof AttrPart?L.value=void 0:(L.value=void 0,templates.delete(L),templateInstances.delete(L))}}},operators={"!":t=>!t,"!!":t=>!!t,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"??":(t,e)=>t??e,"|":(t,e)=>{var r;return(r=pipeModifiers[e])==null?void 0:r.call(pipeModifiers,t)}};function tokenizeExpression(t){return tokenize(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function evaluateExpression(t,e={}){var r,s,o,d,L,ge,Mt;const er=tokenizeExpression(t);if(er.length===0||er.some(({type:tr})=>!tr))return invalidExpression(t);if(((r=er[0])==null?void 0:r.token)===">"){const tr=e[(s=er[1])==null?void 0:s.token];if(!tr)return invalidExpression(t);const ir={...e};tr.state=ir;const rr=er.slice(2);for(let nr=0;nr<rr.length;nr+=3){const ar=(o=rr[nr])==null?void 0:o.token,sr=(d=rr[nr+1])==null?void 0:d.token,lr=(L=rr[nr+2])==null?void 0:L.token;ar&&sr==="="&&(ir[ar]=getParamValue(lr,e))}return tr}if(er.length===1)return isValidParam(er[0])?getParamValue(er[0].token,e):invalidExpression(t);if(er.length===2){const tr=(ge=er[0])==null?void 0:ge.token,ir=operators[tr];if(!ir||!isValidParam(er[1]))return invalidExpression(t);const rr=getParamValue(er[1].token,e);return ir(rr)}if(er.length===3){const tr=(Mt=er[1])==null?void 0:Mt.token,ir=operators[tr];if(!ir||!isValidParam(er[0])||!isValidParam(er[2]))return invalidExpression(t);const rr=getParamValue(er[0].token,e);if(tr==="|")return ir(rr,er[2].token);const nr=getParamValue(er[2].token,e);return ir(rr,nr)}}
3826function invalidExpression(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function isValidParam({type:t}){return["number","boolean","string","param"].includes(t)}function getParamValue(t,e){const r=t[0],s=t.slice(-1);return t==="true"||t==="false"?t==="true":r===s&&["'",'"'].includes(r)?t.slice(1,-1):isNumericString(t)?parseFloat(t):e[t]}function tokenize(t,e){let r,s,o,d=[];for(;t;){o=null,r=t.length;for(let L in e)s=e[L].exec(t),s&&s.index<r&&(o={token:s[0],type:L,matches:s.slice(1)},r=s.index);r&&d.push({token:t.substr(0,r),type:void 0}),o&&d.push(o),t=t.substr(r+(o?o.token.length:0))}return d}var __defProp=Object.defineProperty,__defNormalProp=(t,e,r)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__publicField=(t,e,r)=>(__defNormalProp(t,typeof e!="symbol"?e+"":e,r),r),__accessCheck=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},__privateGet=(t,e,r)=>(__accessCheck(t,e,"read from private field"),r?r.call(t):e.get(t)),__privateAdd=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},__privateSet=(t,e,r,s)=>(__accessCheck(t,e,"write to private field"),e.set(t,r),r),__privateMethod=(t,e,r)=>(__accessCheck(t,e,"access private method"),r),_template,_prevTemplate,_prevTemplateId,_upgradeProperty,upgradeProperty_fn,_updateTemplate,updateTemplate_fn;const observedMediaAttributes={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},prependTemplate=Document$1.createElement("template");prependTemplate.innerHTML=` 3827 <style> 3828 :host { 3829 display: inline-block; 3830 line-height: 0; 3831 } 3832 3833 media-controller { 3834 width: 100%; 3835 height: 100%; 3836 } 3837 3838 media-controller:not([mediasubtitleslist]) media-captions-selectmenu, 3839 media-captions-button:not([mediasubtitleslist]), 3840 media-rendition-selectmenu[mediarenditionunavailable], 3841 media-audio-track-selectmenu[mediaaudiotrackunavailable], 3842 media-volume-range[mediavolumeunavailable], 3843 media-airplay-button[mediaairplayunavailable], 3844 media-fullscreen-button[mediafullscreenunavailable], 3845 media-cast-button[mediacastunavailable], 3846 media-pip-button[mediapipunavailable] { 3847 display: none; 3848 } 3849 </style> 3850`;class MediaThemeElement extends GlobalThis.HTMLElement{constructor(){super(),__privateAdd(this,_upgradeProperty),__privateAdd(this,_updateTemplate),__publicField(this,"renderRoot"),__publicField(this,"renderer"),__privateAdd(this,_template,void 0),__privateAdd(this,_prevTemplate,void 0),__privateAdd(this,_prevTemplateId,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());const e=new MutationObserver(r=>{var s;this.mediaController&&!((s=this.mediaController)!=null&&s.breakpointsComputed)||r.some(o=>{const d=o.target;return d===this?!0:d.localName!=="media-controller"?!1:!!(observedMediaAttributes[o.attributeName]||o.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(MediaStateChangeEvents.BREAKPOINTS_COMPUTED,this.render),__privateMethod(this,_upgradeProperty,upgradeProperty_fn).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=__privateGet(this,_template))!=null?e:this.constructor.template}set template(e){__privateSet(this,_prevTemplateId,null),__privateSet(this,_template,e),this.createRenderer()}get props(){var e,r,s;const o=[...Array.from((r=(e=this.mediaController)==null?void 0:e.attributes)!=null?r:[]).filter(({name:L})=>observedMediaAttributes[L]||L.startsWith("breakpoint")),...Array.from(this.attributes)],d={};for(let L of o){const ge=(s=observedMediaAttributes[L.name])!=null?s:camelCase(L.name);let{value:Mt}=L;Mt!=null?(isNumericString(Mt)&&(Mt=parseFloat(Mt)),d[ge]=Mt===""?!0:Mt):d[ge]=!1}return d}attributeChangedCallback(e,r,s){e==="template"&&r!=s&&__privateMethod(this,_updateTemplate,updateTemplate_fn).call(this)}connectedCallback(){__privateMethod(this,_updateTemplate,updateTemplate_fn).call(this)}createRenderer(){this.template&&this.template!==__privateGet(this,_prevTemplate)&&(__privateSet(this,_prevTemplate,this.template),this.renderer=new TemplateInstance(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(prependTemplate.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}}_template=new WeakMap;_prevTemplate=new WeakMap;_prevTemplateId=new WeakMap;_upgradeProperty=new WeakSet;upgradeProperty_fn=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}};_updateTemplate=new WeakSet;updateTemplate_fn=function(){var t;const e=this.getAttribute("template");if(!e||e===__privateGet(this,_prevTemplateId))return;const r=this.getRootNode(),s=(t=r==null?void 0:r.getElementById)==null?void 0:t.call(r,e);if(s){__privateSet(this,_prevTemplateId,e),__privateSet(this,_template,s),this.createRenderer();return}isValidUrl(e)&&(__privateSet(this,_prevTemplateId,e),request(e).then(o=>{const d=Document$1.createElement("template");d.innerHTML=o,__privateSet(this,_template,d),this.createRenderer()}).catch(console.error))};__publicField(MediaThemeElement,"template");__publicField(MediaThemeElement,"observedAttributes",["template"]);__publicField(MediaThemeElement,"processor",processor);function isValidUrl(t){if(!/^(\/|\.\/|https?:\/\/)/.test(t))return!1;const e=/^https?:\/\//.test(t)?void 0:location.origin;try{new URL(t,e)}catch{return!1}return!0}async function request(t){const e=await fetch(t);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}GlobalThis.customElements.get("media-theme")||GlobalThis.customElements.define("media-theme",MediaThemeElement);var Ce=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},u=(t,e,r)=>(Ce(t,e,"read from private field"),r?r.call(t):e.get(t)),h$1=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},C=(t,e,r,s)=>(Ce(t,e,"write to private field"),e.set(t,r),r),f=(t,e,r)=>(Ce(t,e,"access private method"),r),W=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends W{}globalThis.DocumentFragment=t}var z=class extends W{},xe=class extends W{},Bt={get(t){},define(t,e,r){},upgrade(t){},whenDefined(t){return Promise.resolve(z)}},X,Le=class{constructor(t,e={}){h$1(this,X,void 0),C(this,X,e==null?void 0:e.detail)}get detail(){return u(this,X)}initCustomEvent(){}};X=new WeakMap;function Ut(t,e){return new z}var rt={document:{createElement:Ut},DocumentFragment,customElements:Bt,CustomEvent:Le,EventTarget:W,HTMLElement:z,HTMLVideoElement:xe},ot=typeof window>"u"||typeof globalThis.customElements>"u",c=ot?rt:globalThis,T=ot?rt.document:globalThis.document,$t="en",B={code:$t},nt="en";function l(t,e=!0){var r,s;let o=e&&(s=(r=B)==null?void 0:r[t])!=null?s:t,d=e?B.code:nt;return new Re(o,d)}var Re=class{constructor(t,e=(r=>(r=B.code)!=null?r:nt)()){this.message=t,this.locale=e}format(t){return this.message.replace(/\{(\w+)\}/g,(e,r)=>{var s;return(s=t[r])!=null?s:""})}toString(){return this.message}};function st(t){let e="";return Object.entries(t).forEach(([r,s])=>{s!=null&&(e+=`${se(r)}: ${s}; `)}),e?e.trim():void 0}function se(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function de(t){return t.replace(/[-_]([a-z])/g,(e,r)=>r.toUpperCase())}function R(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function we(t){let e=Kt(t).toString();return e?"?"+e:""}function Kt(t){let e={};for(let r in t)t[r]!=null&&(e[r]=t[r]);return new URLSearchParams(e)}function P(t){let e=(t??"").split(".")[1];if(!e)return{};let r=e.replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(atob(r).split("").map(function(o){return"%"+("00"+o.charCo
3850deAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(s)}var Oe=(t,e)=>!t||!e?!1:t.contains(e)?!0:Oe(t,e.getRootNode().host),dt="mux.com",Ft=()=>{try{return"2.4.1"}catch{}return"UNKNOWN"},Yt=Ft(),me=()=>Yt,lt=(t,{token:e,customDomain:r=dt,thumbnailTime:s}={})=>{let o=e==null?s:void 0,{aud:d}=P(e);if(!(e&&d!=="t"))return`https://image.${r}/${t}/thumbnail.webp${we({token:e,time:o})}`},mt=(t,{token:e,customDomain:r=dt}={})=>{let{aud:s}=P(e);if(!(e&&s!=="s"))return`https://image.${r}/${t}/storyboard.vtt${we({token:e,format:"webp"})}`},J=t=>{if(t){if([g.LIVE,g.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return g.LIVE}},Wt={crossorigin:"crossOrigin",playsinline:"playsInline"};function ut(t){var e;return(e=Wt[t])!=null?e:de(t)}var U,$,E,le=class{constructor(t,e){h$1(this,U,void 0),h$1(this,$,void 0),h$1(this,E,[]),C(this,U,t),C(this,$,e)}[Symbol.iterator](){return u(this,E).values()}get length(){return u(this,E).length}get value(){var t;return(t=u(this,E).join(" "))!=null?t:""}set value(t){var e;t!==this.value&&(C(this,E,[]),this.add(...(e=t==null?void 0:t.split(" "))!=null?e:[]))}toString(){return this.value}item(t){return u(this,E)[t]}values(){return u(this,E).values()}keys(){return u(this,E).keys()}forEach(t){u(this,E).forEach(t)}add(...t){var e,r;t.forEach(s=>{this.contains(s)||u(this,E).push(s)}),!(this.value===""&&!((e=u(this,U))!=null&&e.hasAttribute(`${u(this,$)}`)))&&((r=u(this,U))==null||r.setAttribute(`${u(this,$)}`,`${this.value}`))}remove(...t){var e;t.forEach(r=>{u(this,E).splice(u(this,E).indexOf(r),1)}),(e=u(this,U))==null||e.setAttribute(`${u(this,$)}`,`${this.value}`)}contains(t){return u(this,E).includes(t)}toggle(t,e){return typeof e<"u"?e?(this.add(t),!0):(this.remove(t),!1):this.contains(t)?(this.remove(t),!1):(this.add(t),!0)}replace(t,e){this.remove(t),this.add(e)}};U=new WeakMap,$=new WeakMap,E=new WeakMap;var ct=`[mux-player ${me()}]`;function N(...t){console.warn(ct,...t)}function x(...t){console.error(ct,...t)}function Se(t){var e;let r=(e=t.message)!=null?e:"";t.context&&(r+=` ${t.context}`),t.file&&(r+=` ${l("Read more: ")} 3851https://github.com/muxinc/elements/blob/main/errors/${t.file}`),N(r)}var y={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},K={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},bt=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),jt=bt$1.filter(t=>t!=="error"),Gt=Object.values(y).filter(t=>![y.PLAYSINLINE].includes(t)),qt=Object.values(K);function ht(t){t.querySelectorAll(":scope > track").forEach(e=>{var r;(r=t.media)==null||r.append(e.cloneNode())}),jt.forEach(e=>{var r;(r=t.media)==null||r.addEventListener(e,s=>{t.dispatchEvent(new Event(s.type))})})}var _e=class extends c.HTMLElement{static get observedAttributes(){return[...Gt,...qt]}constructor(){super(),this.querySelectorAll(":scope > track").forEach(e=>{var r;(r=this.media)==null||r.append(e.cloneNode())});let t=e=>{for(let r of e)r.type==="childList"&&(r.removedNodes.forEach(s=>{var o,d;let L=(o=this.media)==null?void 0:o.querySelector(`track[src="${s.src}"]`);L&&((d=this.media)==null||d.removeChild(L))}),r.addedNodes.forEach(s=>{var o;(o=this.media)==null||o.append(s.cloneNode())}))};new MutationObserver(t).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(t,e,r){var s,o;switch(t){case K.MUTED:{this.media&&(this.media.muted=r!=null,this.media.defaultMuted=r!=null);return}case K.VOLUME:{let d=(s=R(r))!=null?s:1;this.media&&(this.media.volume=d);return}case K.PLAYBACKRATE:{let d=(o=R(r))!=null?o:1;this.media&&(this.media.playbackRate=d,this.media.defaultPlaybackRate=d);return}}}play(){var t,e;return(e=(t=this.media)==null?void 0:t.play())!=null?e:Promise.reject()}pause(){var t;(t=this.media)==null||t.pause()}requestCast(t){var e;return(e=this.media)==null?void 0:e.requestCast(t)}
vendor: 6,479 bytes, lines 3851-3939
3851get media(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var t,e;return(e=(t=this.media)==null?void 0:t.paused)!=null?e:!0}get duration(){var t,e;return(e=(t=this.media)==null?void 0:t.duration)!=null?e:NaN}get ended(){var t,e;return(e=(t=this.media)==null?void 0:t.ended)!=null?e:!1}get buffered(){var t,e;return(e=(t=this.media)==null?void 0:t.buffered)!=null?e:bt}get seekable(){var t,e;return(e=(t=this.media)==null?void 0:t.seekable)!=null?e:bt}get readyState(){var t,e;return(e=(t=this.media)==null?void 0:t.readyState)!=null?e:0}get videoWidth(){var t,e;return(e=(t=this.media)==null?void 0:t.videoWidth)!=null?e:0}get videoHeight(){var t,e;return(e=(t=this.media)==null?void 0:t.videoHeight)!=null?e:0}get currentTime(){var t,e;return(e=(t=this.media)==null?void 0:t.currentTime)!=null?e:0}set currentTime(t){this.media&&(this.media.currentTime=Number(t))}get volume(){var t,e;return(e=(t=this.media)==null?void 0:t.volume)!=null?e:1}set volume(t){this.media&&(this.media.volume=Number(t))}get playbackRate(){var t,e;return(e=(t=this.media)==null?void 0:t.playbackRate)!=null?e:1}set playbackRate(t){this.media&&(this.media.playbackRate=Number(t))}get defaultPlaybackRate(){var t;return(t=R(this.getAttribute(K.PLAYBACKRATE)))!=null?t:1}set defaultPlaybackRate(t){t!=null?this.setAttribute(K.PLAYBACKRATE,`${t}`):this.removeAttribute(K.PLAYBACKRATE)}get crossOrigin(){return Q(this,y.CROSSORIGIN)}set crossOrigin(t){this.setAttribute(y.CROSSORIGIN,`${t}`)}get autoplay(){return Q(this,y.AUTOPLAY)!=null}set autoplay(t){t?this.setAttribute(y.AUTOPLAY,typeof t=="string"?t:""):this.removeAttribute(y.AUTOPLAY)}get loop(){return Q(this,y.LOOP)!=null}set loop(t){t?this.setAttribute(y.LOOP,""):this.removeAttribute(y.LOOP)}get muted(){var t,e;return(e=(t=this.media)==null?void 0:t.muted)!=null?e:!1}set muted(t){this.media&&(this.media.muted=!!t)}get defaultMuted(){return Q(this,y.MUTED)!=null}set defaultMuted(t){t?this.setAttribute(y.MUTED,""):this.removeAttribute(y.MUTED)}get playsInline(){return Q(this,y.PLAYSINLINE)!=null}set playsInline(t){x("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(t){["","none","metadata","auto"].includes(t)?this.setAttribute(y.PRELOAD,t):this.removeAttribute(y.PRELOAD)}};function Q(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Pe=_e,ft=`:host { 3852 --media-control-display: var(--controls); 3853 --media-loading-indicator-display: var(--loading-indicator); 3854 --media-dialog-display: var(--dialog); 3855 --media-play-button-display: var(--play-button); 3856 --media-live-button-display: var(--live-button); 3857 --media-seek-backward-button-display: var(--seek-backward-button); 3858 --media-seek-forward-button-display: var(--seek-forward-button); 3859 --media-mute-button-display: var(--mute-button); 3860 --media-captions-button-display: var(--captions-button); 3861 --media-captions-selectmenu-display: var(--captions-selectmenu, var(--media-captions-button-display)); 3862 --media-rendition-selectmenu-display: var(--rendition-selectmenu); 3863 --media-audio-track-selectmenu-display: var(--audio-track-selectmenu); 3864 --media-airplay-button-display: var(--airplay-button); 3865 --media-pip-button-display: var(--pip-button); 3866 --media-fullscreen-button-display: var(--fullscreen-button); 3867 --media-cast-button-display: var(--cast-button); 3868 --media-playback-rate-button-display: var(--playback-rate-button); 3869 --media-playback-rate-selectmenu-display: var(--playback-rate-selectmenu); 3870 --media-volume-range-display: var(--volume-range); 3871 --media-time-range-display: var(--time-range); 3872 --media-time-display-display: var(--time-display); 3873 --media-duration-display-display: var(--duration-display); 3874 --media-title-display-display: var(--title-display); 3875 3876 display: inline-block; 3877 width: 100%; 3878 line-height: 0; 3879} 3880 3881/* Hide custom elements that are not defined yet */ 3882:not(:defined) { 3883 display: none; 3884} 3885 3886a { 3887 color: #fff; 3888 font-size: 0.9em; 3889 text-decoration: underline; 3890} 3891 3892media-theme { 3893 width: 100%; 3894 height: 100%; 3895 direction: ltr; 3896} 3897 3898media-poster-image { 3899 width: 100%; 3900 height: 100%; 3901} 3902 3903media-poster-image:not([src]):not([placeholdersrc]) { 3904 display: none; 3905} 3906 3907::part(top), 3908[part~='top'] { 3909 --media-control-display: var(--controls, var(--top-controls)); 3910 --media-play-button-display: var(--play-button, var(--top-play-button)); 3911 --media-live-button-display: var(--live-button, var(--top-live-button)); 3912 --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button)); 3913 --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button)); 3914 --media-mute-button-display: var(--mute-button, var(--top-mute-button)); 3915 --media-captions-button-display: var(--captions-button, var(--top-captions-button)); 3916 --media-captions-selectmenu-display: var( 3917 --captions-selectmenu, 3918 var(--media-captions-button-display, var(--top-captions-selectmenu)) 3919 ); 3920 --media-rendition-selectmenu-display: var(--rendition-selectmenu, var(--top-rendition-selectmenu)); 3921 --media-audio-track-selectmenu-display: var(--audio-track-selectmenu, var(--top-audio-track-selectmenu)); 3922 --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button)); 3923 --media-pip-button-display: var(--pip-button, var(--top-pip-button)); 3924 --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button)); 3925 --media-cast-button-display: var(--cast-button, var(--top-cast-button)); 3926 --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button)); 3927 --media-playback-rate-selectmenu-display: var( 3928 --captions-selectmenu, 3929 var(--media-playback-rate-button-display, var(--top-playback-rate-selectmenu)) 3930 ); 3931 --media-volume-range-display: var(--volume-range, var(--top-volume-range)); 3932 --media-time-range-display: var(--time-range, var(--top-time-range)); 3933 --media-time-display-display: var(--time-display, var(--top-time-display)); 3934 --media-duration-display-display: var(--duration-display, var(--top-duration-display)); 3935 --media-title-display-display: var(--title-display, var(--top-title-display)); 3936} 3937 3938::part(center), 3939[part~='center'] {
3940 --media-control-display: var(--controls, var(--center-controls)); 3941 --media-play-button-display: var(--play-button, var(--center-play-button)); 3942 --media-live-button-display: var(--live-button, var(--center-live-button)); 3943 --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button)); 3944 --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button)); 3945 --media-mute-button-display: var(--mute-button, var(--center-mute-button)); 3946 --media-captions-button-display: var(--captions-button, var(--center-captions-button)); 3947 --media-captions-selectmenu-display: var( 3948 --captions-selectmenu, 3949 var(--media-captions-button-display, var(--center-captions-selectmenu)) 3950 ); 3951 --media-rendition-selectmenu-display: var(--rendition-selectmenu, var(--center-rendition-selectmenu)); 3952 --media-audio-track-selectmenu-display: var(--audio-track-selectmenu, var(--center-audio-track-selectmenu)); 3953 --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button)); 3954 --media-pip-button-display: var(--pip-button, var(--center-pip-button)); 3955 --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button)); 3956 --media-cast-button-display: var(--cast-button, var(--center-cast-button)); 3957 --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button)); 3958 --media-playback-rate-selectmenu-display: var( 3959 --playback-rate-selectmenu, 3960 var(--media-playback-rate-button-display, var(--center-playback-rate-selectmenu)) 3961 ); 3962 --media-volume-range-display: var(--volume-range, var(--center-volume-range)); 3963 --media-time-range-display: var(--time-range, var(--center-time-range)); 3964 --media-time-display-display: var(--time-display, var(--center-time-display)); 3965 --media-duration-display-display: var(--duration-display, var(--center-duration-display)); 3966} 3967 3968::part(bottom), 3969[part~='bottom'] { 3970 --media-control-display: var(--controls, var(--bottom-controls)); 3971 --media-play-button-display: var(--play-button, var(--bottom-play-button)); 3972 --media-live-button-display: var(--live-button, var(--bottom-live-button)); 3973 --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button)); 3974 --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button)); 3975 --media-mute-button-display: var(--mute-button, var(--bottom-mute-button)); 3976 --media-captions-button-display: var(--captions-button, var(--bottom-captions-button)); 3977 --media-captions-selectmenu-display: var( 3978 --captions-selectmenu, 3979 var(--media-captions-button-display, var(--bottom-captions-selectmenu)) 3980 ); 3981 --media-rendition-selectmenu-display: var(--rendition-selectmenu, var(--bottom-rendition-selectmenu)); 3982 --media-audio-track-selectmenu-display: var(--audio-track-selectmenu, var(--bottom-audio-track-selectmenu)); 3983 --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button)); 3984 --media-pip-button-display: var(--pip-button, var(--bottom-pip-button)); 3985 --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button)); 3986 --media-cast-button-display: var(--cast-button, var(--bottom-cast-button)); 3987 --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button)); 3988 --media-playback-rate-selectmenu-display: var( 3989 --playback-rate-selectmenu, 3990 var(--media-playback-rate-button-display, var(--bottom-playback-rate-selectmenu)) 3991 ); 3992 --media-volume-range-display: var(--volume-range, var(--bottom-volume-range)); 3993 --media-time-range-display: var(--time-range, var(--bottom-time-range)); 3994 --media-time-display-display: var(--time-display, var(--bottom-time-display)); 3995 --media-duration-display-display: var(--duration-display, var(--bottom-duration-display)); 3996 --media-title-display-display: var(--title-display, var(--bottom-title-display)); 3997} 3998`,yt=` 3999 :host { 4000 z-index: 100; 4001 display: var(--media-dialog-display, flex); 4002 justify-content: center; 4003 align-items: center; 4004 width: 100%; 4005 height: 100%; 4006 position: absolute; 4007 top: 0; 4008 left: 0; 4009 box-sizing: border-box; 4010 color: #fff; 4011 line-height: 18px; 4012 font-family: Arial, sans-serif; 4013 padding: var(--media-dialog-backdrop-padding, 0); 4014 background: var(--media-dialog-backdrop-background, 4015 linear-gradient(to bottom, rgba(20, 20, 30, 0.7) 50%, rgba(20, 20, 30, 0.9)) 4016 );
4017 /* Needs to use !important to prevent overwrite of media-chrome */ 4018 transition: var(--media-dialog-transition-open, visibility .2s, opacity .2s) !important; 4019 transform: var(--media-dialog-transform-open, none) !important; 4020 visibility: visible !important; 4021 opacity: 1 !important; 4022 pointer-events: auto !important; 4023 } 4024 4025 :host(:not([open])) { 4026 /* Needs to use !important to prevent overwrite of media-chrome */ 4027 transition: var(--media-dialog-transition-close, visibility .1s, opacity .1s) !important; 4028 transform: var(--media-dialog-transform-close, none) !important; 4029 visibility: hidden !important; 4030 opacity: 0 !important; 4031 pointer-events: none !important; 4032 } 4033 4034 :focus-visible { 4035 box-shadow: 0 0 0 2px rgba(27, 127, 204, 0.9); 4036 } 4037 4038 .dialog { 4039 position: relative; 4040 box-sizing: border-box; 4041 background: var(--media-dialog-background, none); 4042 padding: var(--media-dialog-padding, 10px); 4043 width: min(320px, 100%); 4044 word-wrap: break-word; 4045 max-height: 100%; 4046 overflow: auto; 4047 text-align: center; 4048 line-height: 1.4; 4049 } 4050`,vt=T.createElement("template");vt.innerHTML=` 4051 <style> 4052 ${yt} 4053 </style> 4054 4055 <div class="dialog"> 4056 <slot></slot> 4057 </div> 4058`;var I=class extends c.HTMLElement{constructor(){var t;super(),this.attachShadow({mode:"open"}),(t=this.shadowRoot)==null||t.appendChild(this.constructor.template.content.cloneNode(!0))}show(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("open",{composed:!0,bubbles:!0})),gt(this)}close(){this.hasAttribute("open")&&(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),Xt(this))}attributeChangedCallback(t,e,r){t==="open"&&e!==r&&(r!=null?this.show():this.close())}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("open")&>(this)}};I.styles=yt,I.template=vt,I.observedAttributes=["open"];function gt(t){let e=new CustomEvent("initfocus",{composed:!0,bubbles:!0,cancelable:!0});if(t.dispatchEvent(e),e.defaultPrevented)return;let r=t.querySelector("[autofocus]:not([disabled])");!r&&t.tabIndex>=0&&(r=t),r||(r=Et(t.shadowRoot)),t._previouslyFocusedElement=T.activeElement,T.activeElement instanceof HTMLElement&&T.activeElement.blur(),t.addEventListener("transitionend",()=>{r instanceof HTMLElement&&r.focus({preventScroll:!0})},{once:!0})}function Et(t){let e=["button","input","keygen","select","textarea"].map(function(s){return s+":not([disabled])"});e.push('[tabindex]:not([disabled]):not([tabindex=""])');let r=t==null?void 0:t.querySelector(e.join(", "));if(!r&&"attachShadow"in Element.prototype){let s=(t==null?void 0:t.querySelectorAll("*"))||[];for(let o=0;o<s.length&&!(s[o].tagName&&s[o].shadowRoot&&(r=Et(s[o].shadowRoot),r));o++);}return r}function Xt(t){t._previouslyFocusedElement instanceof HTMLElement&&t._previouslyFocusedElement.focus()}c.customElements.get("media-dialog")||(c.customElements.define("media-dialog",I),c.MediaDialog=I);var Ne=I,kt=T.createElement("template");kt.innerHTML=` 4059 <style> 4060 ${Ne.styles} 4061 4062 .close { 4063 background: none; 4064 color: inherit; 4065 border: none; 4066 padding: 0; 4067 font: inherit; 4068 cursor: pointer; 4069 outline: inherit; 4070 width: 28px; 4071 height: 28px; 4072 position: absolute; 4073 top: 1rem; 4074 right: 1rem; 4075 } 4076 </style> 4077 4078 <div class="dialog"> 4079 <slot></slot> 4080 </div> 4081 4082 <slot name="close"> 4083 <button class="close" tabindex="0"> 4084 <svg fill="none" viewBox="0 0 24 24" stroke="currentColor"> 4085 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> 4086 </svg> 4087 </button> 4088 </slot> 4089`;var ee=class extends Ne{constructor(){var t,e;super(),(e=(t=this.shadowRoot)==null?void 0:t.querySelector(".close"))==null||e.addEventListener("click",()=>{this.close()})}};ee.template=kt;c.customElements.get("mxp-dialog")||(c.customElements.define("mxp-dialog",ee),c.MxpDialog=ee);var te=new WeakMap,De=class Ds{constructor(e,r){this.element=e,this.type=r,this.element.addEventListener(this.type,this);let s=te.get(this.element);s&&s.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let r=te.get(this.element);
vendor: 4,649 bytes, lines 4089-4123
4089r&&r.delete(this.type)}}static for(e){te.has(e.element)||te.set(e.element,new Map);let r=e.attributeName.slice(2),s=te.get(e.element);return s&&s.has(r)?s.get(r):new Ds(e.element,r)}};function Qt(t,e){return t instanceof AttrPart&&t.attributeName.startsWith("on")?(De.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function ea(t,e){return e instanceof ue&&t instanceof ChildNodePart?(e.renderInto(t),!0):!1}function ta(t,e){return e instanceof DocumentFragment&&t instanceof ChildNodePart?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function aa(t,e){if(t instanceof AttrPart){let r=t.attributeNamespace,s=t.element.getAttributeNS(r,t.attributeName);return String(e)!==s&&(t.value=String(e)),!0}return t.value=String(e),!0}function ia(t,e){if(t instanceof AttrPart&&e instanceof Element){let r=t.element;return r[t.attributeName]!==e&&(t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),r[t.attributeName]=e),!0}return!1}function ra(t,e){if(typeof e=="boolean"&&t instanceof AttrPart){let r=t.attributeNamespace,s=t.element.hasAttributeNS(r,t.attributeName);return e!==s&&(t.booleanValue=e),!0}return!1}function oa(t,e){return e===!1&&t instanceof ChildNodePart?(t.replace(""),!0):!1}function na(t,e){ia(t,e)||ra(t,e)||Qt(t,e)||oa(t,e)||ea(t,e)||ta(t,e)||aa(t,e)}var Ie=new Map,Tt=new WeakMap,At=new WeakMap,ue=class{constructor(t,e,r){this.strings=t,this.values=e,this.processor=r,this.stringsKey=this.strings.join("�")}get template(){if(Ie.has(this.stringsKey))return Ie.get(this.stringsKey);{let t=T.createElement("template"),e=this.strings.length-1;return t.innerHTML=this.strings.reduce((r,s,o)=>r+s+(o<e?`{{ ${o} }}`:""),""),Ie.set(this.stringsKey,t),t}}renderInto(t){var e;let r=this.template;if(Tt.get(t)!==r){Tt.set(t,r);let o=new TemplateInstance(r,this.values,this.processor);At.set(t,o),t instanceof ChildNodePart?t.replace(...o.children):t.appendChild(o);return}let s=At.get(t);(e=s==null?void 0:s.update)==null||e.call(s,this.values)}},sa={processCallback(t,e,r){var s;if(r){for(let[o,d]of e)if(o in r){let L=(s=r[o])!=null?s:"";na(d,L)}}}};function O(t,...e){return new ue(t,e,sa)}function Ct(t,e){t.renderInto(e)}var Lt=t=>O` 4090 <style> 4091 ${ft} 4092 </style> 4093 ${ca(t)} 4094`,la=t=>{let e=t.hotKeys?`${t.hotKeys}`:"";return J(t.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},ma={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",DISPLAY:"display",CONTROL_BAR:"control-bar",SELECTMENU:"selectmenu",LISTBOX:"listbox",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"},ua=Object.values(ma).join(", "),ca=t=>{var e,r,s,o,d,L,ge,Mt,er,tr,ir,rr,nr,ar,sr,lr,cr,ur,or,dr,hr,pr,mr,vr,Er,Cr,Pr,kr,Mr,Ur,$r,yr,xr,gr,_r;return O` 4095 <media-theme 4096 template="${t.themeTemplate||!1}" 4097 defaultstreamtype="${(e=t.defaultStreamType)!=null?e:!1}" 4098 hotkeys="${la(t)||!1}" 4099 nohotkeys="${t.noHotKeys||!t.hasSrc||t.isDialogOpen||!1}" 4100 noautoseektolive="${!!((r=t.streamType)!=null&&r.includes(g.LIVE))&&t.targetLiveWindow!==0}" 4101 novolumepref="${t.novolumepref||!1}" 4102 disabled="${!t.hasSrc||t.isDialogOpen}" 4103 audio="${(s=t.audio)!=null?s:!1}" 4104 style="${(o=st({"--media-primary-color":t.primaryColor,"--media-secondary-color":t.secondaryColor,"--media-accent-color":t.accentColor}))!=null?o:!1}" 4105 defaultsubtitles="${!t.defaultHiddenCaptions}" 4106 forwardseekoffset="${(d=t.forwardSeekOffset)!=null?d:!1}" 4107 backwardseekoffset="${(L=t.backwardSeekOffset)!=null?L:!1}" 4108 playbackrates="${(ge=t.playbackRates)!=null?ge:!1}" 4109 defaultshowremainingtime="${(Mt=t.defaultShowRemainingTime)!=null?Mt:!1}" 4110 defaultduration="${(er=t.defaultDuration)!=null?er:!1}" 4111 hideduration="${(tr=t.hideDuration)!=null?tr:!1}" 4112 title="${(ir=t.title)!=null?ir:!1}" 4113 exportparts="${ua}" 4114 > 4115 <mux-video 4116 slot="media" 4117 target-live-window="${(rr=t.targetLiveWindow)!=null?rr:!1}" 4118 stream-type="${(nr=J(t.streamType))!=null?nr:!1}" 4119 crossorigin="${(ar=t.crossOrigin)!=null?ar:""}" 4120 playsinline 4121 autoplay="${(sr=t.autoplay)!=null?sr:!1}" 4122 muted="${(lr=t.muted)!=null?lr:!1}" 4123 loop="${(cr=t.loop)!=null?cr:!1}"
4124 preload="${(ur=t.preload)!=null?ur:!1}" 4125 debug="${(or=t.debug)!=null?or:!1}" 4126 prefer-cmcd="${(dr=t.preferCmcd)!=null?dr:!1}" 4127 disable-cookies="${(hr=t.disableCookies)!=null?hr:!1}" 4128 prefer-playback="${(pr=t.preferPlayback)!=null?pr:!1}" 4129 start-time="${t.startTime!=null?t.startTime:!1}" 4130 beacon-collection-domain="${(mr=t.beaconCollectionDomain)!=null?mr:!1}" 4131 player-software-name="${(vr=t.playerSoftwareName)!=null?vr:!1}" 4132 player-software-version="${(Er=t.playerSoftwareVersion)!=null?Er:!1}" 4133 env-key="${(Cr=t.envKey)!=null?Cr:!1}" 4134 custom-domain="${(Pr=t.customDomain)!=null?Pr:!1}" 4135 src="${t.src?t.src:t.playbackId?Rt$2(t):!1}" 4136 cast-src="${t.src?t.src:t.playbackId?Rt$2(t):!1}" 4137 exportparts="video" 4138 > 4139 ${t.storyboard?O`<track label="thumbnails" default kind="metadata" src="${t.storyboard}" />`:O``} 4140 </mux-video> 4141 <slot name="poster" slot="poster"> 4142 <media-poster-image 4143 part="poster" 4144 exportparts="poster, img" 4145 src="${t.poster===""?!1:(kr=t.poster)!=null?kr:!1}" 4146 placeholdersrc="${(Mr=t.placeholder)!=null?Mr:!1}" 4147 ></media-poster-image> 4148 </slot> 4149 <mxp-dialog 4150 no-auto-hide 4151 open="${(Ur=t.isDialogOpen)!=null?Ur:!1}" 4152 onclose="${t.onCloseErrorDialog}" 4153 oninitfocus="${t.onInitFocusDialog}" 4154 > 4155 ${($r=t.dialog)!=null&&$r.title?O`<h3>${t.dialog.title}</h3>`:O``} 4156 <p> 4157 ${(yr=t.dialog)==null?void 0:yr.message} 4158 ${(xr=t.dialog)!=null&&xr.linkUrl?O`<a 4159 href="${t.dialog.linkUrl}" 4160 target="_blank" 4161 rel="external noopener" 4162 aria-label="${(gr=t.dialog.linkText)!=null?gr:""} ${l("(opens in a new window)")}" 4163 >${(_r=t.dialog.linkText)!=null?_r:t.dialog.linkUrl}</a 4164 >`:O``} 4165 </p> 4166 </mxp-dialog> 4167 </media-theme> 4168`};function he(t,e,r,s,o){var d,L,ge;let Mt={},er={};switch(t.code){case x$1.MEDIA_ERR_NETWORK:{switch(Mt.title=l("Network Error",o),Mt.message=t.message,(d=t.data)==null?void 0:d.response.code){case 412:{Mt.title=l("Video is not currently available",o),Mt.message=l("The live stream or video file are not yet ready.",o),er.message=l("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",o),er.file="412-not-playable.md";break}case 404:{Mt.title=l("Video does not exist",o),Mt.message="",er.message=l("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",o),er.file="404-not-found.md";break}case 403:{if(Mt.title=l("Invalid playback URL",o),Mt.message=l("The video URL or playback-token are formatted with incorrect or incomplete information.",o),er.message=l("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",o),er.file="missing-signed-tokens.md",!s)break;let{exp:tr,aud:ir,sub:rr}=P(s),nr=Date.now()>tr*1e3,ar=rr!==r,sr=ir!=="v",lr={timeStyle:"medium",dateStyle:"medium"};if(nr){Mt.title=l("Video URL has expired",o),Mt.message=l("The videoâs secured playback-token has expired.",o),er.message=l("The videoâs secured playback-token has expired.",o),er.context=l("Expired at: {expiredDate}. Current time: {currentDate}.",o).format({expiredDate:new Intl.DateTimeFormat(B.code,lr).format(tr*1e3),currentDate:new Intl.DateTimeFormat(B.code,lr).format(Date.now())}),er.file="403-expired-token.md";break}if(ar){Mt.title=l("Video URL is formatted incorrectly",o),Mt.message=l("The videoâs playback ID does not match the one encoded in the playback-token.",o),er.message=l("The videoâs playback ID does not match the one encoded in the playback-token.",o),er.context=l("Specified playback ID: {playbackId} and the playback ID encoded in the playback-token: {tokenPlaybackId}",o).format({playbackId:r,tokenPlaybackId:rr}),er.file="403-playback-id-mismatch.md";break}if(sr){Mt.title=l("Video URL is formatted incorrectly",o),Mt.message=l("The playback-token is formatted with incorrect information.",o),er.message=l("The playback-token is formatted with incorrect information.",o),er.context=l("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",o).format({tokenType:ir}),er.file="403-incorrect-aud-value.md";break}er.message=l("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",o),er.file="403-malformatted-token.md";break}}break}case x$1.MEDIA_ERR_DECODE:{let{message:tr}=t;Mt={title:l("Media Error",o),message:tr},er.file="media-decode-error.md";break}case x$1.MEDIA_ERR_SRC_NOT_SUPPORTED:{let tr=(ge=(L=t.data)==null?void 0:L.response)==null?void 0:ge.code;if(tr>=400&&tr<500){t.code=x$1.MEDIA_ERR_NETWORK,t.data={response:{code:tr}},{dialog:Mt,devlog:er}=he(t,e,r,s);break}Mt={title:l("Source Not Supported",o),message:t.message},er.file="media-src-not-supported.md";break}default:Mt={title:l("Error",o),message:t.message};break}return e&&(Mt={title:l("Your device appears to be offline",o),message:l("Check your internet connection and try reloading this video.",o)}),{dialog:Mt,devlog:er}}var Rt=`<template id="media-theme-gerwig"> 4169 <style>
4170 @keyframes pre-play-hide { 4171 0% { 4172 transform: scale(1); 4173 opacity: 1; 4174 } 4175 4176 30% { 4177 transform: scale(0.7); 4178 } 4179 4180 100% { 4181 transform: scale(1.5); 4182 opacity: 0; 4183 } 4184 } 4185 4186 :host { 4187 --_primary-color: var(--media-primary-color, #fff); 4188 --_secondary-color: var(--media-secondary-color, transparent); 4189 --_accent-color: var(--media-accent-color, #fa50b5); 4190 --_text-color: var(--media-text-color, #000); 4191 4192 --media-icon-color: var(--_primary-color); 4193 --media-control-background: var(--_secondary-color); 4194 --media-control-hover-background: var(--_accent-color); 4195 --media-time-buffered-color: rgba(255, 255, 255, 0.4); 4196 --media-preview-time-text-shadow: none; 4197 --media-control-height: 14px; 4198 --media-control-padding: 6px; 4199 4200 color: var(--_primary-color); 4201 display: inline-block; 4202 width: 100%; 4203 height: 100%; 4204 } 4205 4206 :host([audio]) { 4207 --_secondary-color: var(--media-secondary-color, black); 4208 --media-preview-time-text-shadow: none; 4209 } 4210 4211 :host([audio]) ::slotted([slot='media']) { 4212 height: 0px; 4213 } 4214 4215 :host([audio]) media-loading-indicator { 4216 display: none; 4217 } 4218 4219 :host([audio]) media-controller { 4220 background: transparent; 4221 } 4222 4223 :host([audio]) media-controller::part(vertical-layer) { 4224 background: transparent; 4225 } 4226 4227 :host([audio]) media-control-bar { 4228 width: 100%; 4229 background-color: var(--media-control-background); 4230 } 4231 4232 /* 4233 * 0.433s is the transition duration for VTT Regions. 4234 * Borrowed here, so the captions don't move too fast. 4235 */ 4236 media-controller ::slotted([slot='media']) { 4237 --media-webkit-text-track-transform: translateY(0) scale(0.98); 4238 --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s; 4239 } 4240 media-controller:is([mediapaused], :not([userinactive])) ::slotted([slot='media']) { 4241 --media-webkit-text-track-transform: translateY(-50px) scale(0.98); 4242 --media-webkit-text-track-transition: transform 0.15s ease; 4243 } 4244 4245 media-time-range { 4246 --media-box-padding-left: 6px; 4247 --media-box-padding-right: 6px; 4248 --media-range-bar-color: var(--_accent-color); 4249 --media-time-range-buffered-color: var(--_primary-color); 4250 --media-range-track-color: transparent; 4251 --media-range-track-background: rgba(255, 255, 255, 0.4); 4252 --media-range-thumb-background: radial-gradient( 4253 circle, 4254 #000 0%, 4255 #000 25%, 4256 var(--_accent-color) 25%, 4257 var(--_accent-color) 4258 ); 4259 --media-range-thumb-width: 12px; 4260 --media-range-thumb-height: 12px; 4261 --media-range-thumb-transform: scale(0); 4262 --media-range-thumb-transition: transform 0.3s; 4263 --media-range-thumb-opacity: 1; 4264 --media-preview-background: var(--_primary-color); 4265 --media-box-arrow-background: var(--_primary-color); 4266 --media-preview-thumbnail-border: 5px solid var(--_primary-color); 4267 --media-preview-border-radius: 5px; 4268 --media-text-color: var(--_text-color); 4269 --media-control-hover-background: transparent; 4270 color: var(--_accent-color); 4271 padding: 0 6px; 4272 } 4273 4274 :host([audio]) media-time-range { 4275 --media-preview-time-padding: 1.5px 6px; 4276 --media-preview-box-margin: 0 0 -5px; 4277 } 4278 4279 media-time-range:hover { 4280 --media-range-thumb-transform: scale(1); 4281 } 4282 4283 media-preview-thumbnail { 4284 border-bottom-width: 0; 4285 } 4286 4287 [part~='listbox'] { 4288 border-radius: 2px; 4289 border: 1px solid rgba(0, 0, 0, 0.1); 4290 bottom: calc(100% + 16px); 4291 padding: 2.5px 10px; 4292 } 4293 4294 [part~='listbox']::part(indicator) { 4295 fill: var(--_accent-color); 4296 } 4297 4298 [part~='listbox']::part(option) { 4299 box-sizing: border-box; 4300 display: flex; 4301 align-items: center; 4302 padding: 6px 10px; 4303 min-height: 34px; 4304 } 4305 4306 [part~='listbox']::part(option-selected) { 4307 font-weight: 700; 4308 } 4309 4310 media-captions-selectmenu, 4311 media-rendition-selectmenu, 4312 media-audio-track-selectmenu, 4313 media-playback-rate-listbox[part~='listbox'] { 4314 --media-listbox-background: var(--_primary-color); 4315 --media-option-selected-background: transparent; 4316 --media-option-hover-background: transparent; 4317 --media-option-hover-outline: var(--_accent-color) solid 1px; 4318 --media-text-color: var(--_text-color); 4319 } 4320 4321 /* The icon is a circle so make it 16px high instead of 14px for more balance. */ 4322 media-audio-track-selectmenu { 4323 --media-control-padding: 5px; 4324 --media-control-height: 16px; 4325 } 4326 4327 media-playback-rate-button { 4328 --media-control-padding: 6px 3px; 4329 min-width: 4.4ch; 4330 } 4331 4332 media-playback-rate-listbox[part~='listbox'] { 4333 --media-listbox-layout: row; 4334 --media-option-selected-background: var(--_accent-color); 4335 margin-right: 6px; 4336 padding: 0; 4337 } 4338 4339 media-playback-rate-listbox[part~='listbox']::part(option) { 4340 padding: 6px 4px; 4341 } 4342 4343 media-playback-rate-listbox[part~='listbox']::part(option-selected) { 4344 color: #fff; 4345 } 4346 4347 :host(:not([audio])) media-time-range { 4348 /* Adding px is required here for calc() */ 4349 --media-range-padding: 0px; 4350 background: transparent; 4351 z-index: 10; 4352 height: 10px; 4353 bottom: -3px; 4354 width: 100%; 4355 } 4356 4357 media-control-bar :is([role='button'], [role='switch'], button) { 4358 line-height: 0; 4359 } 4360 4361 media-control-bar :is([part*='button'], [part*='range'], [part*='display']) { 4362 border-radius: 3px; 4363 } 4364 4365 .spacer { 4366 flex-grow: 1; 4367 background-color: var(--media-control-background, rgba(20, 20, 30, 0.7)); 4368 } 4369 4370 media-control-bar[slot~='top-chrome'] { 4371 min-height: 42px; 4372 pointer-events: none; 4373 } 4374 4375 media-control-bar { 4376 --gradient-steps: hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.013) 8.1%, hsl(0 0% 0% / 0.049) 15.5%, 4377 hsl(0 0% 0% / 0.104) 22.5%, hsl(0 0% 0% / 0.175) 29%, hsl(0 0% 0% / 0.259) 35.3%, hsl(0 0% 0% / 0.352) 41.2%, 4378 hsl(0 0% 0% / 0.45) 47.1%, hsl(0 0% 0% / 0.55) 52.9%, hsl(0 0% 0% / 0.648) 58.8%, hsl(0 0% 0% / 0.741) 64.7%, 4379 hsl(0 0% 0% / 0.825) 71%, hsl(0 0% 0% / 0.896) 77.5%, hsl(0 0% 0% / 0.951) 84.5%, hsl(0 0% 0% / 0.987) 91.9%, 4380 hsl(0 0% 0%) 100%; 4381 } 4382 4383 :host([title]:not([audio])) media-control-bar[slot='top-chrome']::before { 4384 content: ''; 4385 position: absolute; 4386 width: 100%; 4387 padding-bottom: min(100px, 25%); 4388 background: linear-gradient(to top, var(--gradient-steps)); 4389 opacity: 0.8; 4390 pointer-events: none; 4391 } 4392 4393 :host(:not([audio])) media-control-bar[part~='bottom']::before { 4394 content: ''; 4395 position: absolute; 4396 width: 100%; 4397 bottom: 0; 4398 left: 0; 4399 padding-bottom: min(100px, 25%); 4400 background: linear-gradient(to bottom, var(--gradient-steps)); 4401 opacity: 0.8; 4402 z-index: 1; 4403 pointer-events: none; 4404 } 4405 4406 media-control-bar[part~='bottom'] > * { 4407 z-index: 2; 4408 } 4409 4410 media-control-bar[part~='bottom'] { 4411 padding: 6px 6px; 4412 } 4413 4414 media-control-bar[slot~='top-chrome'] > * { 4415 --media-control-background: transparent; 4416 --media-control-hover-background: transparent; 4417 position: relative; 4418 } 4419 4420 media-controller::part(vertical-layer) { 4421 transition: background-color 1s; 4422 } 4423 4424 media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) { 4425 background-color: var(--controls-backdrop-color, var(--controls, transparent)); 4426 transition: background-color 0.25s; 4427 } 4428
4429 .center-controls { 4430 --media-button-icon-width: 100%; 4431 --media-button-icon-height: auto; 4432 pointer-events: none; 4433 width: 100%; 4434 display: flex; 4435 flex-flow: row; 4436 align-items: center; 4437 justify-content: center; 4438 filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25)); 4439 paint-order: stroke; 4440 stroke: rgba(102, 102, 102, 1); 4441 stroke-width: 0.3px; 4442 text-shadow: 0 0 2px rgb(0 0 0 / 0.25), 0 0 6px rgb(0 0 0 / 0.25); 4443 } 4444 4445 .center-controls media-play-button { 4446 --media-control-background: transparent; 4447 --media-control-hover-background: transparent; 4448 --media-control-padding: 0; 4449 width: 40px; 4450 } 4451 4452 [breakpointsm] .center-controls media-play-button { 4453 width: 90px; 4454 height: 90px; 4455 border-radius: 50%; 4456 transition: background 0.4s; 4457 padding: 24px; 4458 --media-control-background: #000; 4459 --media-control-hover-background: var(--_accent-color); 4460 } 4461 4462 .center-controls media-seek-backward-button, 4463 .center-controls media-seek-forward-button { 4464 --media-control-background: transparent; 4465 --media-control-hover-background: transparent; 4466 padding: 0; 4467 margin: 0 20px; 4468 width: max(33px, min(8%, 40px)); 4469 } 4470 4471 [breakpointsm]:not([audio]) .center-controls.pre-playback { 4472 display: grid; 4473 align-items: initial; 4474 justify-content: initial; 4475 height: 100%; 4476 overflow: hidden; 4477 } 4478 4479 [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button { 4480 place-self: var(--_pre-playback-place, center); 4481 grid-area: 1 / 1; 4482 margin: 16px; 4483 } 4484 4485 /* Show and hide controls or pre-playback state */ 4486 4487 [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio]) 4488 .center-controls.pre-playback 4489 media-play-button { 4490 animation: 0.3s linear forwards pre-play-hide; 4491 } 4492 4493 .autoplay-unmute { 4494 --media-control-hover-background: transparent; 4495 width: 100%; 4496 display: flex; 4497 align-items: center; 4498 justify-content: center; 4499 filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25)); 4500 } 4501 4502 .autoplay-unmute-btn { 4503 --media-control-height: 16px; 4504 border-radius: 8px; 4505 background: #000; 4506 color: var(--_primary-color); 4507 display: flex; 4508 align-items: center; 4509 padding: 8px 16px; 4510 font-size: 18px; 4511 font-weight: 500; 4512 cursor: pointer; 4513 } 4514 4515 .autoplay-unmute-btn:hover { 4516 background: var(--_accent-color); 4517 } 4518 4519 [breakpointsm] .autoplay-unmute-btn { 4520 --media-control-height: 30px; 4521 padding: 14px 24px; 4522 font-size: 26px; 4523 } 4524 4525 .autoplay-unmute-btn svg { 4526 margin: 0 6px 0 0; 4527 } 4528 4529 [breakpointsm] .autoplay-unmute-btn svg { 4530 margin: 0 10px 0 0; 4531 } 4532 4533 media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) { 4534 display: none; 4535 } 4536 4537 media-loading-indicator { 4538 --media-loading-icon-width: 100%; 4539 --media-button-icon-height: auto; 4540 display: var(--media-control-display, var(--media-loading-indicator-display, flex)); 4541 pointer-events: none; 4542 position: absolute; 4543 width: min(15%, 150px); 4544 flex-flow: row; 4545 align-items: center; 4546 justify-content: center; 4547 } 4548 4549 /* Intentionally don't target the div for transition but the children 4550 of the div. Prevents messing with media-chrome's autohide feature. */ 4551 media-loading-indicator + div * { 4552 transition: opacity 0.15s; 4553 opacity: 1; 4554 } 4555 4556 media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * { 4557 opacity: 0; 4558 transition-delay: 400ms; 4559 } 4560 4561 media-volume-range { 4562 width: min(100%, 100px); 4563 --media-range-padding-left: 10px; 4564 --media-range-padding-right: 10px; 4565 --media-range-thumb-width: 12px; 4566 --media-range-thumb-height: 12px; 4567 --media-range-thumb-background: radial-gradient( 4568 circle, 4569 #000 0%, 4570 #000 25%, 4571 var(--_primary-color) 25%, 4572 var(--_primary-color) 4573 ); 4574 --media-control-hover-background: none; 4575 } 4576 4577 media-time-display { 4578 white-space: nowrap; 4579 } 4580 4581 /* Generic style for explicitly disabled controls */ 4582 media-control-bar[part~='bottom'] [disabled], 4583 media-control-bar[part~='bottom'] [aria-disabled='true'] { 4584 opacity: 60%;
4585 cursor: not-allowed; 4586 } 4587 4588 media-text-display { 4589 --media-font-size: 16px; 4590 --media-control-padding: 14px; 4591 font-weight: 500; 4592 } 4593 4594 media-play-button.animated *:is(g, path) { 4595 transition: all 0.3s; 4596 } 4597 4598 media-play-button.animated[mediapaused] .pause-icon-pt1 { 4599 opacity: 0; 4600 } 4601 4602 media-play-button.animated[mediapaused] .pause-icon-pt2 { 4603 transform-origin: center center; 4604 transform: scaleY(0); 4605 } 4606 4607 media-play-button.animated[mediapaused] .play-icon { 4608 clip-path: inset(0 0 0 0); 4609 } 4610 4611 media-play-button.animated:not([mediapaused]) .play-icon { 4612 clip-path: inset(0 0 0 100%); 4613 } 4614 4615 media-seek-forward-button, 4616 media-seek-backward-button { 4617 --media-font-weight: 400; 4618 } 4619 4620 .mute-icon { 4621 display: inline-block; 4622 } 4623 4624 .mute-icon :is(path, g) { 4625 transition: opacity 0.5s; 4626 } 4627 4628 .muted { 4629 opacity: 0; 4630 } 4631 4632 media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high), 4633 media-mute-button[mediavolumelevel='medium'] :is(.volume-high) { 4634 opacity: 0; 4635 } 4636 4637 media-mute-button[mediavolumelevel='off'] .unmuted { 4638 opacity: 0; 4639 } 4640 4641 media-mute-button[mediavolumelevel='off'] .muted { 4642 opacity: 1; 4643 } 4644 4645 /** 4646 * Our defaults for these buttons are to hide them at small sizes 4647 * users can override this with CSS 4648 */ 4649 media-controller:not([breakpointsm]):not([audio]) { 4650 --bottom-play-button: none; 4651 --bottom-seek-backward-button: none; 4652 --bottom-seek-forward-button: none; 4653 --bottom-time-display: none; 4654 --bottom-playback-rate-selectmenu: none; 4655 --bottom-pip-button: none; 4656 } 4657 </style> 4658 4659 <template partial="TitleDisplay"> 4660 <template if="title"> 4661 <media-text-display part="top title display" class="title-display">{{title}}</media-text-display> 4662 </template> 4663 </template> 4664 4665 <template partial="PlayButton"> 4666 <media-play-button 4667 part="{{section ?? 'bottom'}} play button" 4668 disabled="{{disabled}}" 4669 aria-disabled="{{disabled}}" 4670 class="animated" 4671 > 4672 <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon"> 4673 <g class="play-icon"> 4674 <path 4675 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" 4676 /> 4677 </g> 4678 <g class="pause-icon"> 4679 <path 4680 class="pause-icon-pt1" 4681 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" 4682 /> 4683 <path 4684 class="pause-icon-pt2" 4685 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" 4686 /> 4687 </g> 4688 </svg> 4689 </media-play-button> 4690 </template> 4691 4692 <template partial="PrePlayButton"> 4693 <media-play-button 4694 part="{{section ?? 'center'}} play button pre-play" 4695 disabled="{{disabled}}" 4696 aria-disabled="{{disabled}}" 4697 > 4698 <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)"> 4699 <path 4700 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" 4701 /> 4702 </svg> 4703 </media-play-button> 4704 </template> 4705 4706 <template partial="SeekBackwardButton"> 4707 <media-seek-backward-button 4708 seekoffset="{{backwardseekoffset}}" 4709 part="{{section ?? 'bottom'}} seek-backward button" 4710 disabled="{{disabled}}" 4711 aria-disabled="{{disabled}}" 4712 > 4713 <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon"> 4714 <path 4715 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" 4716 /> 4717 <text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'"> 4718 {{backwardseekoffset}} 4719 </text> 4720 </svg> 4721 </media-seek-backward-button> 4722 </template> 4723 4724 <template partial="SeekForwardButton"> 4725 <media-seek-forward-button 4726 seekoffset="{{forwardseekoffset}}" 4727 part="{{section ?? 'bottom'}} seek-forward button" 4728 disabled="{{disabled}}" 4729 aria-disabled="{{disabled}}" 4730 > 4731 <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon"> 4732 <g> 4733 <text transform="translate(-1 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'"> 4734 {{forwardseekoffset}} 4735 </text> 4736 <path 4737 d="M18.35 11.9211L21.9136 7.2721C22.0288 7.12188 22.0288 6.87812 21.9136 6.7279L18.35 2.07888C18.2208
47371.91041 18 2.02968 18 2.26787V11.7321C18 11.9703 18.2208 12.0896 18.35 11.9211Z" 4738 /> 4739 </g> 4740 </svg> 4741 </media-seek-forward-button> 4742 </template> 4743 4744 <template partial="MuteButton"> 4745 <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 4746 <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true"> 4747 <g class="unmuted"> 4748 <path 4749 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" 4750 /> 4751 <path 4752 class="volume-low" 4753 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" 4754 /> 4755 <path 4756 class="volume-medium" 4757 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" 4758 /> 4759 <path 4760 class="volume-high" 4761 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" 4762 /> 4763 </g> 4764 <g class="muted"> 4765 <path 4766 fill-rule="evenodd" 4767 clip-rule="evenodd" 4768 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" 4769 /> 4770 <path 4771 fill-rule="evenodd" 4772 clip-rule="evenodd" 4773 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" 4774 /> 4775 </g> 4776 </svg> 4777 </media-mute-button> 4778 </template> 4779 4780 <template partial="PipButton"> 4781 <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 4782 <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon"> 4783 <path 4784 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" 4785 /> 4786 <path 4787 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" 4788 /> 4789 </svg> 4790 </media-pip-button> 4791 </template> 4792 4793 <template partial="CaptionsMenuButton"> 4794 <media-captions-selectmenu part="bottom captions selectmenu" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 4795 <media-captions-button 4796 slot="button" 4797 part="bottom captions button" 4798 disabled="{{disabled}}" 4799 aria-disabled="{{disabled}}" 4800 > 4801 <svg aria-hidden="true" viewBox="0 0 18 14" slot="on"> 4802 <path 4803 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.
4803009C3.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" 4804 /> 4805 </svg> 4806 <svg aria-hidden="true" viewBox="0 0 18 14" slot="off"> 4807 <path 4808 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" 4809 /> 4810 <path 4811 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" 4812 /> 4813 <path 4814 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" 4815 /> 4816 </svg> 4817 </media-captions-button> 4818 <media-captions-listbox slot="listbox" exportparts="option" part="bottom captions listbox"> 4819 <div slot="select-indicator"> 4820 <style> 4821 .listbox-indicator { 4822 position: relative; 4823 top: 1px; 4824 width: 0.9em; 4825 height: auto; 4826 fill: var(--_accent-color); 4827 } 4828 4829 [aria-selected='false'] .listbox-indicator { 4830 display: none; 4831 } 4832 </style> 4833 <svg viewBox="0 0 14 18" class="listbox-indicator"> 4834 <path 4835 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" 4836 fill-rule="evenodd" 4837 /> 4838 </svg> 4839 </div> 4840 </media-captions-listbox> 4841 </media-captions-select
vendor: 5,520 bytes, lines 4841-4912
4841menu> 4842 </template> 4843 4844 <template partial="AirplayButton"> 4845 <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 4846 <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon"> 4847 <path 4848 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" 4849 /> 4850 <path 4851 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" 4852 /> 4853 </svg> 4854 </media-airplay-button> 4855 </template> 4856 4857 <template partial="FullscreenButton"> 4858 <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 4859 <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter"> 4860 <path 4861 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" 4862 /> 4863 <path 4864 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" 4865 /> 4866 <path 4867 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.0153L17.9925 9.60498H16.9925Z" 4868 /> 4869 <path 4870 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" 4871 /> 4872 </svg> 4873 <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit"> 4874 <path 4875 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" 4876 /> 4877 <path 4878 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" 4879 /> 4880 <path 4881 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" 4882 /> 4883 <path 4884 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" 4885 /> 4886 </svg> 4887 </media-fullscreen-button> 4888 </template> 4889 4890 <template partial="CastButton"> 4891 <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 4892 <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter"> 4893 <path 4894 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" 4895 /> 4896 </svg> 4897 <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit"> 4898 <path 4899 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" 4900 /> 4901 <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" /> 4902 </svg> 4903 </media-cast-button> 4904 </template> 4905 4906 <template partial="LiveButton"> 4907 <media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 4908 <span slot="text">Live</span> 4909 </media-live-button> 4910 </template> 4911 4912 <template partial="PlaybackRate
4912Select"> 4913 <media-playback-rate-selectmenu 4914 part="bottom playback-rate selectmenu" 4915 disabled="{{disabled}}" 4916 aria-disabled="{{disabled}}" 4917 > 4918 <media-playback-rate-button slot="button" part="bottom playback-rate button"></media-playback-rate-button> 4919 <media-playback-rate-listbox 4920 slot="listbox" 4921 rates="{{playbackrates}}" 4922 exportparts="option" 4923 part="bottom playback-rate listbox" 4924 ></media-playback-rate-listbox> 4925 </media-playback-rate-selectmenu> 4926 </template> 4927 4928 <template partial="VolumeRange"> 4929 <media-volume-range 4930 part="bottom volume range" 4931 disabled="{{disabled}}" 4932 aria-disabled="{{disabled}}" 4933 ></media-volume-range> 4934 </template> 4935 4936 <template partial="TimeDisplay"> 4937 <media-time-display 4938 remaining="{{defaultshowremainingtime}}" 4939 showduration="{{!hideduration}}" 4940 part="bottom time display" 4941 disabled="{{disabled}}" 4942 aria-disabled="{{disabled}}" 4943 ></media-time-display> 4944 </template> 4945 4946 <template partial="TimeRange"> 4947 <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 4948 <media-preview-thumbnail slot="preview"></media-preview-thumbnail> 4949 <media-preview-chapter-display slot="preview"></media-preview-chapter-display> 4950 <media-preview-time-display slot="preview"></media-preview-time-display> 4951 <div slot="preview" part="arrow"></div> 4952 </media-time-range> 4953 </template> 4954 4955 <template partial="AudioTrackSelect"> 4956 <media-audio-track-selectmenu 4957 part="bottom audio-track selectmenu" 4958 disabled="{{disabled}}" 4959 aria-disabled="{{disabled}}" 4960 > 4961 <media-audio-track-button slot="button" part="bottom audio-track button"> 4962 <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16"> 4963 <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" /> 4964 <path 4965 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" 4966 /> 4967 </svg> 4968 </media-audio-track-button> 4969 <media-audio-track-listbox slot="listbox" exportparts="option" part="bottom audio-track listbox"> 4970 <div slot="select-indicator"> 4971 <style> 4972 .listbox-indicator { 4973 position: relative; 4974 top: 1px; 4975 width: 0.9em; 4976 height: auto; 4977 fill: var(--_accent-color); 4978 } 4979 4980 [aria-selected='false'] .listbox-indicator { 4981 display: none; 4982 } 4983 </style> 4984 <svg viewBox="0 0 14 18" class="listbox-indicator"> 4985 <path 4986 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" 4987 fill-rule="evenodd" 4988 /> 4989 </svg> 4990 </div> 4991 </media-audio-track-listbox> 4992 </media-audio-track-selectmenu> 4993 </template> 4994 4995 <template partial="RenditionSelect"> 4996 <media-rendition-selectmenu part="bottom rendition selectmenu" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 4997 <media-rendition-button slot="button" part="bottom rendition button"> 4998 <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14"> 4999 <path 5000 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" 5001 /> 5002 </svg> 5003 </media-rendition-button> 5004 <media-rendition-listbox slot="listbox" exportparts="option" part="bottom rendition listbox"> 5005 <div slot="select-indicator"> 5006 <style> 5007 .listbox-indicator { 5008 position: relative; 5009 top: 1px; 5010 width: 0.9em; 5011 height: auto; 5012 fill: var(--_accent-color); 5013 } 5014 5015 [aria-selected='false'] .listbox-indicator { 5016 display: none; 5017 } 5018 </style> 5019 <svg viewBox="0 0 14 18" class="listbox-indicator"> 5020 <path 5021 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" 5022 fill-rule="evenodd" 5023 /> 5024 </svg> 5025 </div> 5026 </media-rendition-listbox> 5027 </media-rendition-selectmenu> 5028 </template> 5029 5030 <media-controller 5031 part="controller" 5032 defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}" 5033 breakpoints="sm:470" 5034 gesturesdisabled="{{disabled}}" 5035 hotkeys="{{hotkeys}}" 5036 nohotkeys="{{nohotkeys}}" 5037 novolumepref="{{novolumepref}}" 5038 audio="{{audio}}" 5039 noautoseektolive="{{noautoseektolive}}"
5040 defaultsubtitles="{{defaultsubtitles}}" 5041 defaultduration="{{defaultduration ?? false}}" 5042 keyboardforwardseekoffset="{{forwardseekoffset}}" 5043 keyboardbackwardseekoffset="{{backwardseekoffset}}" 5044 exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer" 5045 style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}" 5046 > 5047 <slot name="media" slot="media"></slot> 5048 <slot name="poster" slot="poster"></slot> 5049 5050 <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator> 5051 5052 <template if="!audio"> 5053 <!-- Pre-playback UI --> 5054 <div slot="centered-chrome" class="center-controls pre-playback"> 5055 <template if="streamtype == 'on-demand'"> 5056 <template if="!breakpointsm"> {{>SeekBackwardButton section="center"}} </template> 5057 <template if="!breakpointsm"> {{>PlayButton section="center"}} </template> 5058 <template if="breakpointsm"> {{>PrePlayButton section="center"}} </template> 5059 <template if="!breakpointsm"> {{>SeekForwardButton section="center"}} </template> 5060 </template> 5061 5062 <template if="streamtype == 'live'"> 5063 <template if="!breakpointsm"> 5064 <template if="targetlivewindow > 0"> {{>SeekBackwardButton section="center"}} </template> 5065 </template> 5066 <template if="!breakpointsm"> {{>PlayButton section="center"}} </template> 5067 <template if="breakpointsm"> {{>PrePlayButton section="center"}} </template> 5068 <template if="!breakpointsm"> 5069 <template if="targetlivewindow > 0"> {{>SeekForwardButton section="center"}} </template> 5070 </template> 5071 </template> 5072 </div> 5073 5074 <!-- Auotplay centered unmute button --> 5075 <!-- 5076 todo: figure out how show this with available state variables 5077 needs to show when: 5078 - autoplay is enabled 5079 - playback has been successful 5080 - audio is muted 5081 - in place / instead of the pre-plaback play button 5082 - not to show again after user has interacted with this button 5083 - OR user has interacted with the mute button in the control bar 5084 --> 5085 <!-- 5086 There should be a >MuteButton to the left of the "Unmute" text, but a templating bug 5087 makes it appear even if commented out in the markup, add it back when code is un-commented 5088 --> 5089 <!-- <div slot="centered-chrome" class="autoplay-unmute"> 5090 <div role="button" class="autoplay-unmute-btn">Unmute</div> 5091 </div> --> 5092 5093 <template if="streamtype == 'on-demand'"> 5094 <template if="breakpointsm"> 5095 <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar> 5096 </template> 5097 {{>TimeRange}} 5098 <media-control-bar part="control-bar bottom"> 5099 {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}} 5100 {{>VolumeRange}} 5101 <div class="spacer"></div> 5102 {{>RenditionSelect}} {{>PlaybackRateSelect}} {{>AudioTrackSelect}} {{>CaptionsMenuButton}} {{>AirplayButton}} 5103 {{>CastButton}} {{>PipButton}} {{>FullscreenButton}} 5104 </media-control-bar> 5105 </template> 5106 5107 <template if="streamtype == 'live'"> 5108 <media-control-bar part="control-bar top" slot="top-chrome"> 5109 {{>LiveButton}} 5110 <template if="breakpointsm"> {{>TitleDisplay}} </template> 5111 </media-control-bar> 5112 <template if="targetlivewindow > 0">{{>TimeRange}}</template> 5113 <media-control-bar part="control-bar bottom"> 5114 {{>PlayButton}} 5115 <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template> 5116 {{>MuteButton}} {{>VolumeRange}} 5117 <div class="spacer"></div> 5118 {{>RenditionSelect}} {{>AudioTrackSelect}} {{>CaptionsMenuButton}} {{>AirplayButton}} {{>CastButton}} 5119 {{>PipButton}} {{>FullscreenButton}} 5120 </media-control-bar> 5121 </template> 5122 </template> 5123 5124 <template if="audio"> 5125 <template if="streamtype == 'on-demand'"> 5126 <template if="title"> 5127 <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar> 5128 </template> 5129 <media-control-bar part="control-bar bottom"> 5130 {{>PlayButton}} 5131 <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template> 5132 {{>MuteButton}} 5133 <template if="breakpointsm">{{>VolumeRange}}</template> 5134 {{>TimeDisplay}} {{>TimeRange}} 5135 <template if="breakpointsm">{{>PlaybackRateSelect}}</template> 5136 {{>AirplayButton}} {{>CastButton}} 5137 </media-control-bar> 5138 </template> 5139 5140 <template if="streamtype == 'live'"> 5141 <template if="title"> 5142 <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar> 5143 </template> 5144 <media-control-bar part="control-bar bottom"> 5145 <template if="breakpointsm"> 5146 {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}} {{>VolumeRange}} 5147 <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template> 5148 </template> 5149 <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template> 5150 <template if="!targetlivewindow"><div class="spacer"></div></template> 5151 {{>AirplayButton}} {{>CastButton}} 5152 </media-control-bar> 5153 </template> 5154 </template> 5155 5156 <slot></slot> 5157 </media-controller> 5158</template> 5159`,Ve=T.createElement("template");"innerHTML"in Ve&&(Ve.innerHTML=Rt);var wt,Ot,fe=class extends MediaThemeElement{};fe.template=(Ot=(wt=Ve.content)==null?void 0:wt.children)==null?void 0:Ot[0];c.customElements.get("media-theme-gerwig")||c.customElements.define("media-theme-gerwig",fe);var va="gerwig",M={SRC:"src",POSTER:"poster"},n={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
5159LAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-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",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"},Be=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function Ea(t,e){var r;return{src:!t.playbackId&&t.src,playbackId:t.playbackId,hasSrc:!!t.playbackId||!!t.src,poster:t.poster,storyboard:t.storyboard,storyboardSrc:t.getAttribute(n.STORYBOARD_SRC),placeholder:t.getAttribute("placeholder"),themeTemplate:ka(t),thumbnailTime:!t.tokens.thumbnail&&t.thumbnailTime,autoplay:t.autoplay,crossOrigin:t.crossOrigin,loop:t.loop,noHotKeys:t.hasAttribute(n.NOHOTKEYS),hotKeys:t.getAttribute(n.HOTKEYS),muted:t.muted,paused:t.paused,preload:t.preload,envKey:t.envKey,preferCmcd:t.preferCmcd,debug:t.debug,disableCookies:t.disableCookies,tokens:t.tokens,beaconCollectionDomain:t.beaconCollectionDomain,maxResolution:t.maxResolution,minResolution:t.minResolution,renditionOrder:t.renditionOrder,metadata:t.metadata,playerSoftwareName:t.playerSoftwareName,playerSoftwareVersion:t.playerSoftwareVersion,startTime:t.startTime,preferPlayback:t.preferPlayback,audio:t.audio,defaultStreamType:t.defaultStreamType,targetLiveWindow:t.getAttribute(h$2.TARGET_LIVE_WINDOW),streamType:J(t.getAttribute(h$2.STREAM_TYPE)),primaryColor:t.getAttribute(n.PRIMARY_COLOR),secondaryColor:t.getAttribute(n.SECONDARY_COLOR),accentColor:t.getAttribute(n.ACCENT_COLOR),forwardSeekOffset:t.forwardSeekOffset,backwardSeekOffset:t.backwardSeekOffset,defaultHiddenCaptions:t.defaultHiddenCaptions,defaultDuration:t.defaultDuration,defaultShowRemainingTime:t.defaultShowRemainingTime,hideDuration:Ta(t),playbackRates:t.getAttribute(n.PLAYBACK_RATES),customDomain:(r=t.getAttribute(h$2.CUSTOM_DOMAIN))!=null?r:void 0,title:t.getAttribute(n.TITLE),novolumepref:t.hasAttribute(n.NO_VOLUME_PREF),...e,extraSourceParams:t.extraSourceParams}}function ka(t){var e,r;let s=t.theme;if(s){let o=(r=(e=t.getRootNode())==null?void 0:e.getElementById)==null?void 0:r.call(e,s);if(o&&o instanceof HTMLTemplateElement)return o;s.startsWith("media-theme-")||(s=`media-theme-${s}`);let d=c.customElements.get(s);if(d!=null&&d.template)return d.template}}function Ta(t){var e;let r=(e=t.mediaController)==null?void 0:e.querySelector("media-time-display");return r&&getComputedStyle(r).getPropertyValue("--media-duration-display-display").trim()==="none"}function _t(t){let e=t.hasAttribute(n.TITLE)?{video_title:t.getAttribute(n.TITLE)}:{};return t.getAttributeNames().filter(r=>r.startsWith("metadata-")).reduce((r,s)=>{let o=t.getAttribute(s);return o!==null&&(r[s.replace(/^metadata-/,"").replace(/-/g,"_")]=o),r},e)}var Aa=Object.values(h$2),Ca=Object.values(M),xa=Object.values(n),La=me(),Ra="mux-player",Pt={dialog:void 0,isDialogOpen:!1},wa={redundant_streams:!0},ie,re,D,oe,Y,S,F,ve,Nt,ne,Ue,V,j,Ee,It,ke,Dt,Te,Vt,Ae,Ht,ae=class extends Pe{constructor(){super(),h$1(this,S),h$1(this,ve),h$1(this,ne),h$1(this,V),h$1(this,Ee),h$1(this,ke),h$1(this,Te),h$1(this,Ae),h$1(this,ie,!1),h$1(this,re,{}),h$1(this,D,!0),h$1(this,oe,new le(this,"hotkeys")),h$1(this,Y,{...Pt,onCloseErrorDialog:()=>f(this,ne,Ue).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:t=>{Oe(this,T.activeElement)||t.preventDefault()}}),this.attachShadow({mode:"open"}),f(this,ve,Nt).call(this),this.isConnected&&f(this,S,F).call(this)}static get observedAttributes(){var t;return[...(t=Pe.observedAttributes)!=null?t:[],...Ca,...Aa,...xa]}get mediaTheme(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("media-theme")}get mediaController(){var t,e;return(e=(t=this.mediaTheme)==null?void 0:t.shadowRoot)==null?void 0:e.querySelector("media-controller")}connectedCallback(){var t;let e=(t=this.shadowRoot)==null?void 0:t.querySelector("mux-video");e&&(e.metadata=_t(this))}attributeChangedCallback(t,e,r){switch(f(this,S,F).call(this),super.attributeChangedCallback(t,e,r),t){case n.HOTKEYS:u(this,oe).value=r;break;case n.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&N(l("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case n.THUMBNAIL_TOKEN:{let{aud:s}=P(r);r&&s!=="t"&&N(l("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case n.STORYBOARD_TOKEN:{let{aud:s}=P(r);r&&s!=="s"&&N(l("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:s}));break}case h$2.PLAYBACK_ID:{r!=null&&r.includes("?token")&&x(l("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case h$2.STREAM_TYPE:r&&![g.LIVE,g.ON_DEMAND,g.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:Se({file:"invalid-stream-type.md",message:l("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):r===g.LIVE?this.getAttribute(n.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN}[h$2.PLAYBACK_ID,M.SRC,n.PLAYBACK_TOKEN].includes(t)&&e!==r&&C(this,Y,{...u(this,Y),...Pt}),f(this,V,j).call(this,{[ut(t)]:r})}get preferCmcd(){var t;return(t=this.getAttribute(h$2.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?Xe$1.includes(t)?this.setAttribute(h$2.PREFER_CMCD,t):N(`Invalid value for preferCmcd. Must be one of ${Xe$1.join()}`):this.removeAttribute(h$2.PREFER_CMCD))}get hasPlayed(){var t,e;return(e=(t=this.mediaController)==null?void 0:t.hasAttribute(MediaUIAttributes.MEDIA_HAS_P
vendor: 8,768 bytes, line 5159
5159LAYED))!=null?e:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute(MediaUIAttributes.MEDIA_TIME_IS_LIVE)}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(n.THEME))!=null?t:va}set theme(t){this.setAttribute(n.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let e={};for(let r of t.getAttributeNames()){if(Be.includes(r))continue;let s=t.getAttribute(r);e[de(r)]=s===""?!0:s}return e}set themeProps(t){var e,r;f(this,S,F).call(this);let s={...this.themeProps,...t};for(let o in s){if(Be.includes(o))continue;let d=t==null?void 0:t[o];typeof d=="boolean"||d==null?(e=this.mediaTheme)==null||e.toggleAttribute(se(o),!!d):(r=this.mediaTheme)==null||r.setAttribute(se(o),d)}}get playbackId(){var t;return(t=this.getAttribute(h$2.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(h$2.PLAYBACK_ID,t):this.removeAttribute(h$2.PLAYBACK_ID)}get src(){var t,e;return this.playbackId?(t=Z(this,M.SRC))!=null?t:void 0:(e=this.getAttribute(M.SRC))!=null?e:void 0}set src(t){t?this.setAttribute(M.SRC,t):this.removeAttribute(M.SRC)}get poster(){var t;let e=this.getAttribute(M.POSTER);if(e!=null)return e;if(this.playbackId&&!this.audio)return lt(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(t=this.thumbnailTime)!=null?t:this.startTime,token:this.tokens.thumbnail})}set poster(t){t||t===""?this.setAttribute(M.POSTER,t):this.removeAttribute(M.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(n.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(n.STORYBOARD_SRC,t):this.removeAttribute(n.STORYBOARD_SRC)}get storyboard(){if(this.storyboardSrc&&!this.tokens.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[g.LIVE,g.UNKNOWN].includes(this.streamType)))return mt(this.playbackId,{customDomain:this.customDomain,token:this.tokens.storyboard})}get audio(){return this.hasAttribute(n.AUDIO)}set audio(t){if(!t){this.removeAttribute(n.AUDIO);return}this.setAttribute(n.AUDIO,"")}get hotkeys(){return u(this,oe)}get nohotkeys(){return this.hasAttribute(n.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(n.NOHOTKEYS);return}this.setAttribute(n.NOHOTKEYS,"")}get thumbnailTime(){return R(this.getAttribute(n.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(n.THUMBNAIL_TIME,`${t}`)}get title(){var t;return(t=this.getAttribute(n.TITLE))!=null?t:""}set title(t){t!==this.title&&(t?this.setAttribute(n.TITLE,t):this.removeAttribute("title"),super.title=t)}get placeholder(){var t;return(t=Z(this,n.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(n.PLACEHOLDER,`${t}`)}get primaryColor(){var t,e;let r=this.getAttribute(n.PRIMARY_COLOR);if(r!=null||this.mediaTheme&&(r=(e=(t=c.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_primary-color"))==null?void 0:e.trim(),r))return r}set primaryColor(t){this.setAttribute(n.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var t,e;let r=this.getAttribute(n.SECONDARY_COLOR);if(r!=null||this.mediaTheme&&(r=(e=(t=c.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_secondary-color"))==null?void 0:e.trim(),r))return r}set secondaryColor(t){this.setAttribute(n.SECONDARY_COLOR,`${t}`)}get accentColor(){var t,e;let r=this.getAttribute(n.ACCENT_COLOR);if(r!=null||this.mediaTheme&&(r=(e=(t=c.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_accent-color"))==null?void 0:e.trim(),r))return r}set accentColor(t){this.setAttribute(n.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(n.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(n.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(n.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(n.PLAYBACK_RATES))return this.getAttribute(n.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,e)=>t-e)}set playbackRates(t){if(!t){this.removeAttribute(n.PLAYBACK_RATES);return}this.setAttribute(n.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=R(this.getAttribute(n.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(n.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=R(this.getAttribute(n.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(n.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(n.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(n.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(n.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return R(this.getAttribute(n.DEFAULT_DURATION))}set defaultDuration(t){t==null?this.removeAttribute(n.DEFAULT_DURATION):this.setAttribute(n.DEFAULT_DURATION,`${t}`)}get playerSoftwareName(){var t;return(t=this.getAttribute(h$2.PLAYER_SOFTWARE_NAME))!=null?t:Ra}get playerSoftwareVersion(){var t;return(t=this.getAttribute(h$2.PLAYER_SOFTWARE_VERSION))!=null?t:La}get beaconCollectionDomain(){var t;return(t=this.getAttribute(h$2.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(h$2.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(h$2.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(h$2.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(h$2.MAX_RESOLUTION,t):this.removeAttribute(h$2.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(h$2.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(h$2.MIN_RESOLUTION,t):this.removeAttribute(h$2.MIN_RESOLUTION))}get renditionOrder(){var t;return(t=this.getAttribute(h$2.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(h$2.RENDITION_ORDER,t):this.removeAttribute(h$2.RENDITION_ORDER))}get extraSourceParams(){return this.hasAttribute(n.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(n.EXTRA_SOURCE_PARAMS)).entries()].reduce((t,[e,r])=>(t[e]=r,t),{}):wa}set extraSourceParams(t){t==null?this.removeAttribute(n.EXTRA_SOURCE_PARAMS):this.setAttribute(n.EXTRA_SOURCE_PARAMS,new URLSearchParams(t).toString())}get customDomain(){var t;return(t=this.getAttribute(h$2.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(h$2.CUSTOM_DOMAIN,t):this.removeAttribute(h$2.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Z(this,h$2.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(h$2.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(n.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(n.NO_VOLUME_PREF,""):this.removeAttribute(n.NO_VOLUME_PREF)}get debug(){return Z(this,h$2.DEBUG)!=null}set debug(t){t?this.setAttribute(h$2.DEBUG,""):this.removeAttribute(h$2.DEBUG)}get disableCookies(){return Z(this,h$2.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(h$2.DISABLE_COOKIES,""):this.removeAttribute(h$2.DISABLE_COOKIES)}get streamType(){var t,e,r;return(r=(e=this.getAttribute(h$2.STREAM_TYPE))!=null?e:(t=this.media)==null?void 0:t.streamType)!=null?r:g.UNKNOWN}set streamType(t){this.setAttribute(h$2.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,e,r;return(r=(e=this.getAttribute(n.DEFAULT_STREAM_TYPE))!=null?e:(t=this.mediaController)==null?void 0:t.getAttribute(n.DEFAULT_STREAM_TYPE))!=null?r:g.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(n.DEFAULT_STREAM_TYPE,t):this.removeAttribute(n.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,e;return this.hasAttribute(n.TARGET_LIVE_WINDOW)?+this.getAttribute(n.TARGET_LIVE_WINDOW):(e=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?e:Number.NaN}set targetLiveWindow(t){t==this.targetLiveWindow||Number.isNaN(t)&&Number.isNaN(this.targetLiveWindow)||(t==null?this.removeAttribute(n.TARGET_LIVE_WINDOW):this.setAttribute(n.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return R(Z(this,h$2.START_TIME))}set startTime(t){this.setAttribute(h$2.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(h$2.PREFER_PLAYBACK);if(t===N$2.MSE||t===N$2.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===N$2.MSE||t===N$2.NATIVE?this.setAttribute(h$2.PREFER_PLAYBACK,t):this.removeAttribute(h$2.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(f(this,S,F).call(this),!this.media){x("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={..._t(this),...t}}
5159get _hlsConfig(){var t;return(t=this.media)==null?void 0:t._hlsConfig}set _hlsConfig(t){if(f(this,S,F).call(this),!this.media){x("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=t}async addCuePoints(t){var e;if(f(this,S,F).call(this),!this.media){x("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(e=this.media)==null?void 0:e.addCuePoints(t)}get activeCuePoint(){var t;return(t=this.media)==null?void 0:t.activeCuePoint}get cuePoints(){var t,e;return(e=(t=this.media)==null?void 0:t.cuePoints)!=null?e:[]}getStartDate(){var t;return(t=this.media)==null?void 0:t.getStartDate()}get currentPdt(){var t;return(t=this.media)==null?void 0:t.currentPdt}get tokens(){let t=this.getAttribute(n.PLAYBACK_TOKEN),e=this.getAttribute(n.THUMBNAIL_TOKEN),r=this.getAttribute(n.STORYBOARD_TOKEN);return{...u(this,re),...t!=null?{playback:t}:{},...e!=null?{thumbnail:e}:{},...r!=null?{storyboard:r}:{}}}set tokens(t){C(this,re,t??{})}get playbackToken(){var t;return(t=this.getAttribute(n.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(n.PLAYBACK_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(n.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(n.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(n.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(n.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,e,r,s){var o;let d=(o=this.media)==null?void 0:o.nativeEl;if(d)return _$1(d,t,e,r,s)}removeTextTrack(t){var e;let r=(e=this.media)==null?void 0:e.nativeEl;if(r)return xe$2(r,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}};ie=new WeakMap,re=new WeakMap,D=new WeakMap,oe=new WeakMap,Y=new WeakMap,S=new WeakSet,F=function(){var t,e,r;if(!u(this,ie)){C(this,ie,!0),f(this,V,j).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof c.HTMLElement))throw""}catch{x("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof bn))throw""}catch{x("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof media_controller_default))throw""}catch{x("<media-controller> failed to upgrade!")}ht(this),f(this,Ee,It).call(this),f(this,ke,Dt).call(this),f(this,Te,Vt).call(this),C(this,D,(e=(t=this.mediaController)==null?void 0:t.hasAttribute(Attributes$e.USER_INACTIVE))!=null?e:!0),f(this,Ae,Ht).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>{f(this,V,j).call(this)})}},ve=new WeakSet,Nt=function(){var t,e;try{(t=window==null?void 0:window.CSS)==null||t.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(e=window==null?void 0:window.CSS)==null||e.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},ne=new WeakSet,Ue=function(t){Object.assign(u(this,Y),t),f(this,V,j).call(this)},V=new WeakSet,j=function(t={}){Ct(Lt(Ea(this,{...u(this,Y),...t})),this.shadowRoot)},Ee=new WeakSet,It=function(){let t=e=>{var r,s;if(!(e!=null&&e.startsWith("theme-")))return;let o=e.replace(/^theme-/,"");if(Be.includes(o))return;let d=this.getAttribute(e);d!=null?(r=this.mediaTheme)==null||r.setAttribute(o,d):(s=this.mediaTheme)==null||s.removeAttribute(o)};new MutationObserver(e=>{for(let{attributeName:r}of e)t(r)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(t)},ke=new WeakSet,Dt=function(){var t;let e=r=>{let{detail:s}=r;if(s instanceof x$1||(s=new x$1(s.message,s.code,s.fatal)),!(s!=null&&s.fatal)){N(s),s.data&&N(`${s.name} data:`,s.data);return}let{dialog:o,devlog:d}=he(s,!window.navigator.onLine,this.playbackId,this.playbackToken);d.message&&Se(d),x(s),s.data&&x(`${s.name} data:`,s.data),f(this,ne,Ue).call(this,{isDialogOpen:!0,dialog:o})};this.addEventListener("error",e),this.media&&(this.media.errorTranslator=(r={})=>{var s,o,d;if(!(((s=this.media)==null?void 0:s.error)instanceof x$1))return r;let{devlog:L}=he((o=this.media)==null?void 0:o.error,!window.navigator.onLine,this.playbackId,this.playbackToken,!1);return{player_error_code:(d=this.media)==null?void 0:d.error.code,player_error_message:L.message?String(L.message):r.player_error_message,player_error_context:L.context?String(L.context):r.player_error_context}}),(t=this.media)==null||t.addEventListener("error",r=>{var s,o;let{detail:d}=r;if(!d){let{message:L,code:ge}=(o=(s=this.media)==null?void 0:s.error)!=null?o:{};d=new x$1(L,ge)}d!=null&&d.fatal&&this.dispatchEvent(new CustomEvent("error",{detail:d}))})},Te=new WeakSet,Vt=function(){var t,e,r,s;let o=()=>f(this,V,j).call(this);(e=(t=this.media)==null?void 0:t.textTracks)==null||e.addEventListener("addtrack",o),(s=(r=this.media)==null?void 0:r.textTracks)==null||s.addEventListener("removetrack",o)},Ae=new WeakSet,Ht=function(){var t,e;if(!/Firefox/i.test(navigator.userAgent))return;let r,s=new WeakMap,o=()=>this.streamType===g.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,d=(Mt,er,tr=!1)=>
5159{o()||Array.from(Mt&&Mt.activeCues||[]).forEach(ir=>{if(!(!ir.snapToLines||ir.line<-5||ir.line>=0&&ir.line<10))if(!er||this.paused){let rr=ir.text.split(` 5160`).length,nr=-3;this.streamType===g.LIVE&&(nr=-2);let ar=nr-rr;if(ir.line===ar&&!tr)return;s.has(ir)||s.set(ir,ir.line),ir.line=ar}else setTimeout(()=>{ir.line=s.get(ir)||"auto"},500)})},L=()=>{var Mt,er;d(r,(er=(Mt=this.mediaController)==null?void 0:Mt.hasAttribute(Attributes$e.USER_INACTIVE))!=null?er:!1)},ge=()=>{var Mt,er;let tr=Array.from(((er=(Mt=this.mediaController)==null?void 0:Mt.media)==null?void 0:er.textTracks)||[]).filter(ir=>["subtitles","captions"].includes(ir.kind)&&ir.mode==="showing")[0];tr!==r&&(r==null||r.removeEventListener("cuechange",L)),r=tr,r==null||r.addEventListener("cuechange",L),d(r,u(this,D))};ge(),(t=this.textTracks)==null||t.addEventListener("change",ge),(e=this.textTracks)==null||e.addEventListener("addtrack",ge),this.addEventListener("userinactivechange",()=>{var Mt,er;let tr=(er=(Mt=this.mediaController)==null?void 0:Mt.hasAttribute(Attributes$e.USER_INACTIVE))!=null?er:!0;u(this,D)!==tr&&(C(this,D,tr),d(r,u(this,D)))})};function Z(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}c.customElements.get("mux-player")||(c.customElements.define("mux-player",ae),c.MuxPlayerElement=ae);var Ni=ae;const mux=Object.freeze(Object.defineProperty({__proto__:null,MediaError:x$1,default:Ni,getVideoAttribute:Z},Symbol.toStringTag,{value:"Module"})),mux_client_9lbogWkgZN=defineNuxtPlugin(t=>{t.vueApp.use(mux)});function touchX(t){return t.type.indexOf("mouse")!==-1?t.clientX:t.touches[0].clientX}function touchY(t){return t.type.indexOf("mouse")!==-1?t.clientY:t.touches[0].clientY}var isPassiveSupported=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch{}return t}(),vueTouchEvents={install:function(t,e){var r=Object.assign({},{disableClick:!1,tapTolerance:10,swipeTolerance:30,touchHoldTolerance:400,longTapTimeInterval:400,touchClass:"",dragFrequency:100,rollOverFrequency:100},e);function s(sr){var lr=this.$$touchObj,cr=sr.type.indexOf("touch")>=0,ur=sr.type.indexOf("mouse")>=0,or=this;cr&&(lr.lastTouchStartTime=sr.timeStamp),!(ur&&lr.lastTouchStartTime&&sr.timeStamp-lr.lastTouchStartTime<350)&&(lr.touchStarted||(ir(this),lr.touchStarted=!0,lr.touchMoved=!1,lr.swipeOutBounded=!1,lr.startX=touchX(sr),lr.startY=touchY(sr),lr.currentX=0,lr.currentY=0,lr.touchStartTime=sr.timeStamp,lr.hasSwipe=er(this,"swipe")||er(this,"swipe.left")||er(this,"swipe.right")||er(this,"swipe.top")||er(this,"swipe.bottom"),er(this,"hold")&&(lr.touchHoldTimer=setTimeout(function(){lr.touchHoldTimer=null,tr(sr,or,"hold")},lr.options.touchHoldTolerance)),tr(sr,this,"press")))}function o(sr){var lr=this.$$touchObj,cr=touchX(sr),ur=touchY(sr),or=lr.currentX!=cr||lr.currentY!=ur;if(lr.currentX=cr,lr.currentY=ur,lr.touchMoved){if(lr.hasSwipe&&!lr.swipeOutBounded){var hr=lr.options.swipeTolerance;lr.swipeOutBounded=Math.abs(lr.startX-lr.currentX)>hr&&Math.abs(lr.startY-lr.currentY)>hr}}else{var dr=lr.options.tapTolerance;lr.touchMoved=Math.abs(lr.startX-lr.currentX)>dr||Math.abs(lr.startY-lr.currentY)>dr,lr.touchMoved&&(nr(lr),tr(sr,this,"drag.once"))}if(er(this,"rollover")&&or){var pr=sr.timeStamp,mr=lr.options.rollOverFrequency;(lr.touchRollTime==null||pr>lr.touchRollTime+mr)&&(lr.touchRollTime=pr,tr(sr,this,"rollover"))}if(er(this,"drag")&&lr.touchStarted&&lr.touchMoved&&or){var pr=sr.timeStamp,mr=lr.options.dragFrequency;(lr.touchDragTime==null||pr>lr.touchDragTime+mr)&&(lr.touchDragTime=pr,tr(sr,this,"drag"))}}function d(){var sr=this.$$touchObj;nr(sr),rr(this),sr.touchStarted=sr.touchMoved=!1,sr.startX=sr.startY=0}function L(sr){var lr=this.$$touchObj,cr=sr.type.indexOf("touch")>=0,ur=sr.type.indexOf("mouse")>=0;cr&&(lr.lastTouchEndTime=sr.timeStamp);var or=cr&&!lr.touchHoldTimer;if(nr(lr),lr.touchStarted=!1,rr(this),!(ur&&lr.lastTouchEndTime&&sr.timeStamp-lr.lastTouchEndTime<350))if(tr(sr,this,"release"),lr.touchMoved){if(lr.hasSwipe&&!lr.swipeOutBounded){var dr=lr.options.swipeTolerance,hr,pr=Math.abs(lr.startY-lr.currentY),mr=Math.abs(lr.startX-lr.currentX);(pr>dr||mr>dr)&&(pr>mr?hr=lr.startY>lr.currentY?"top":"bottom":hr=lr.startX>lr.currentX?"left":"right",er(this,"swipe."+hr)?tr(sr,this,"swipe."+hr,hr):tr(sr,this,"swipe",hr))}}else if(er(this,"longtap")&&sr.timeStamp-lr.touchStartTime>lr.options.longTapTimeInterval)sr.cancelable&&sr.preventDefault(),tr(sr,this,"longtap");else if(er(this,"hold")&&or){sr.cancelable&&sr.preventDefault();return}else tr(sr,this,"tap")}function ge(){ir(this)}function Mt(){rr(this)}function er(sr,lr){var cr=sr.$$touchObj.callbacks[lr];return cr!=null&&cr.length>0}function tr(sr,lr,cr,ur){var or=lr.$$touchObj,dr=or.callbacks[cr];if(dr==null||dr.length===0)return null;for(var hr=0;hr<dr.length;hr++){var pr=dr[hr];pr.modifiers.stop&&sr.stopPropagation(),pr.modifiers.prevent&&sr.preventDefault(),!(pr.modifiers.self&&sr.target!==sr.currentTarget)&&typeof pr.value=="function"&&(ur?pr.value(ur,sr):pr.value(sr))}}function ir(sr){var lr=sr.$$touchObj.options.touchClass;lr&&sr.classList.add(lr)}function rr(sr){var lr=sr.$$touchObj.options.touchClass;lr&&sr.classList.remove(lr)}function nr(sr){sr&&sr.touchHoldTimer&&(clearTimeout(sr.touchHoldTimer),sr.touchHoldTimer=null)}function ar(sr,lr){var cr=sr.$$touchObj||{callbacks:{},hasBindTouchEvents:!1,options:r};return lr&&(cr.options=Object.assign({},cr.options,lr)),sr.$$touchObj=cr,sr.$$touchObj}t.directive("touch",{beforeMount:function(sr,lr){var cr=ar(sr),ur=isPassiveSupported?{passive:!0}:!1,or=lr.arg||"tap";switch(or){case"swipe":var dr=lr.modifiers;if(dr.left||dr.right||dr.top||dr.bottom){for(var hr in lr.modifiers)if(["left","right","top","bottom"].indexOf(hr)>=0){var pr="swipe."+hr;cr.callbacks[pr]=cr.callbacks[pr]||[],cr.callbacks[pr].push(lr)}}else cr.callbacks.swipe=cr.callbacks.swipe||[],cr.callbacks.swipe.push(lr);break;case"press":case"drag":lr.modifiers.disablePassive&&(ur=!1);default:cr.callbacks[or]=cr.callbacks[or]||[],cr.callbacks[or].push(lr)}cr.hasBindTouchEvents||(sr.addEventListener("touchstart",s,ur),sr.addEventListener("touchmove",o,ur),sr.addEventListener("touchcancel",d),sr.addEventListener("touchend",L),cr.options.disableClick||(sr.addEventListener("mousedown",s),sr.addEventListener("mousemove",o),sr.addEventListener("mouseup",L),sr.addEventListener("mouseenter",ge),sr.addEventListener("mouseleave",Mt)),cr.hasBindTouchEvents=!0)},unmounted:function(sr){nr(sr.$$touchObj),sr.removeEventListener("touchstart",s),sr.removeEventListener("touchmove",o),sr.removeEventListener("touchcancel",d),sr.removeEventListener("touchend",L),sr.$$touchObj&&!sr.$$touchObj.options.disableClick&&(sr.removeEventListener("mousedown",s),sr.removeEventListener("mousemove",o),sr.removeEventListener("mouseup",L),sr.removeEventListener("mouseenter",ge),sr.removeEventListener("mouseleave",Mt)),delete sr.$$touchObj}}),t.directive("touch-class",{beforeMount:function(sr,lr){ar(sr,{touchClass:lr.value})}}),t.directive("touch-options",{beforeMount:function(sr,lr){ar(sr,lr.value)}})}};const touchEvents_fM5I0uoijX=defineNuxtPlugin(t=>{t.vueApp.use(vueTouchEvents)}),plugins=[revive_payload_client_4sVQNw7RlN,unhead_KgADcZ0jPj,plugin$1,_0_siteConfig_7pzUtwM1Zj,payload_client_yVLowv6hDl,check_outdated_build_client_8vK7RkfGxZ,components_plugin_KR1HBZs4kY,prefetch_client_5tzzN0oIVL,plugin,plugin_t2GMTTFnMT,plugin_eTVJQYlCmx,chunk_reload_client_UciE0i6zes,lottiePlayer_client_gmQLTfQQDf,apollo_1ILFkzpYSr,auth_vT9JWWT9pN,firebase_client_zXNDa0wxFH,gsap_qE0fizvEy0,mux_client_9lbogWkgZN,touchEvents_fM5I0uoijX],useCookieControl=()=>useNuxtApp().$cookies;var CookieType=(t=>(t.NECESSARY="necessary",t.OPTIONAL="optional",t))(CookieType||{});function setCssVariables(t){for(const e in t)document.documentElement.style.setProperty(`--${e}`,t[e])}const _hoisted_1$a={class:"cookieControl"},_hoisted_2$a={class:"cookieControl__BarContainer"},_hoisted_3$a=["textContent"],_hoisted_4$9=["textContent"],_hoisted_5$a={class:"cookieControl__BarButtons"},_hoisted_6$9=["textContent"],_hoisted_7$8=["textContent"],_hoisted_8$7=["textContent"],_hoisted_9$7=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{fill:"currentColor",d:"M510.52 255.82c-69.97-.85-126.47-57.69-126.47-127.86-70.17 0-127-56.49-127.86-126.45-27.26-4.14-55.13.3-79.72 12.82l-69.13 35.22a132.221 132.221 0 00-57.79 57.81l-35.1 68.88a132.645 132.645 0 00-12.82 80.95l12.08 76.27a132.521 132.521 0 0037.16 72.96l54.77 54.76a132.036 132.036 0 0072.71 37.06l76.71 12.15c27.51 4.36 55.7-.11 80.53-12.76l69.13-35.21a132.273 132.273 0 0057.79-57.81l35.1-68.88c12.56-24.64 17.01-52.58 12.91-79.91zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"})],-1),_hoisted_10$7=[_hoisted_9$7],_hoisted_11$6=["onClick"],_hoisted_12$6=["textContent"],_hoisted_13$4={class:"cookieControl__ModalContent"},_hoisted_14$4={class:"cookieControl__ModalContentInner"},_hoisted_15$3=["textContent"],_hoisted_16$2=["textContent"],_hoisted_17$1={class:"cookieControl__ModalInputWrapper"},_hoisted_18$1=["id"],_hoisted_19$1=["id","checked","onChange"],_hoisted_20$1=["for"],_hoisted_21$1={key:0},_hoisted_22$1={key:1},_hoisted_23$1=createBaseVNode("br",null,null,-1),_hoisted_24=createBaseVNode("br",null,null,-1),_hoisted_25=["href"],_hoisted_26={class:"cookieControl__ModalButtons"},_hoisted_27=["textContent"],_hoisted_28=["textContent"],_hoisted_29=["textContent"],_sfc_main$c=defineComponent({__name:"CookieControl",props:{locale:{default:"en"}},setup(t,{expose:e}){const r=t,{cookiesEnabled:s,cookiesEnabledIds:o,isConsentGiven:d,isModalActive:L,moduleOptions:ge}=useCookieControl(),Mt=useNuxtApp(),er=new Date(Date.now()+ge.cookieExpiryOffsetMs),tr=ref$2([...s.value||[]]),ir=getAllCookieIdsString(ge),rr=useCookie(ge.cookieNameIsConsentGiven,{expires:er,...ge.cookieOptions}),nr=useCookie(ge.cookieNameCookiesEnabledIds,{expires:er,...ge.cookieOptions}),ar=computed(()=>getCookieIds(s.value||[]).sort().join("|")!==getCookieIds(tr.value).sort().join("|")),sr=computed(()=>ge.localeTexts[r.locale]),lr=()=>{vr({isConsentGiven:!0,cookiesOptionalEnabled:ge.cookies.optional})},cr=()=>{const kr=getCookieIds(tr.value);
5160vr({isConsentGiven:!0,cookiesOptionalEnabled:[...ge.cookies.necessary,...ge.cookies.optional].filter(Mr=>kr.includes(getCookieId(Mr)))})},ur=()=>{vr({isConsentGiven:!0,cookiesOptionalEnabled:ge.cookies.necessary})},or=()=>{vr({isConsentGiven:!1,cookiesOptionalEnabled:[]})},dr=kr=>`${ge.isDashInDescriptionEnabled===!1?"":"-"} ${resolveTranslatable(kr,r.locale)}`,hr=kr=>{var Mr;return kr==="functional"?(Mr=sr.value)==null?void 0:Mr.cookiesFunctional:resolveTranslatable(kr,r.locale)},pr=()=>{Mt.$cookies.locale.value=r.locale},mr=()=>{ge.closeModalOnClickOutside&&(L.value=!1)},vr=({cookiesOptionalEnabled:kr,isConsentGiven:Mr})=>{d.value=Mr,s.value=Mr?[...ge.cookies.necessary,...ge.cookies.optional.filter(Ur=>kr.includes(Ur))]:[],o.value=Mr?getCookieIds(s.value):[]},Er=kr=>{var Mr,Ur;(Ur=(Mr=kr.target)==null?void 0:Mr.nextSibling)==null||Ur.click()},Cr=kr=>{const Mr=getCookieIds(tr.value).indexOf(getCookieId(kr));Mr<0?tr.value.push(kr):tr.value.splice(Mr,1)},Pr=kr=>{var Mr;kr.key===" "&&((Mr=kr.target)==null||Mr.click())};return onBeforeMount(()=>{if(ge.colors){const kr={};for(const Mr in ge.colors)kr[`cookie-control-${Mr}`]=`${ge.colors[Mr]}`;setCssVariables(kr)}ge.isModalForced&&!d.value&&(L.value=!0)}),watch(()=>s.value,(kr,Mr)=>{var $r;if(tr.value=[...kr||[]],d.value){nr.value=getCookieIds(kr||[]).join("|");for(const yr of kr||[]){if(!yr.src)continue;const xr=document.createElement("script");xr.src=yr.src,document.getElementsByTagName("head")[0].appendChild(xr)}}else nr.value=void 0;const Ur=ge.cookies.optional.filter(yr=>!(kr||[]).includes(yr));for(const yr of Ur)if(yr.targetCookieIds){for(const xr of yr.targetCookieIds)removeCookie(xr);if(yr.src)for(const xr of[...document.head.querySelectorAll(`script[src="${yr.src}"]`)])($r=xr.parentNode)==null||$r.removeChild(xr)}},{deep:!0}),watch(d,(kr,Mr)=>{kr===void 0?rr.value=void 0:rr.value=kr?ir:"0"}),watch(()=>r.locale,kr=>{Mt.$cookies.locale.value=kr}),pr(),e({accept:lr,acceptPartial:cr,decline:ur}),(kr,Mr)=>{const Ur=__nuxt_component_2$1;return openBlock(),createBlock(Ur,null,{default:withCtx(()=>[createBaseVNode("section",_hoisted_1$a,[createVNode(Transition,{name:`cookieControl__Bar--${unref(ge).barPosition}`},{default:withCtx(()=>{var $r,yr,xr;return[!unref(d)&&!unref(ge).isModalForced?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(`cookieControl__Bar cookieControl__Bar--${unref(ge).barPosition}`)},[createBaseVNode("div",_hoisted_2$a,[createBaseVNode("div",null,[renderSlot(kr.$slots,"bar",{},()=>{var gr,_r;return[createBaseVNode("h3",{textContent:toDisplayString((gr=sr.value)==null?void 0:gr.bannerTitle)},null,8,_hoisted_3$a),createBaseVNode("p",{textContent:toDisplayString((_r=sr.value)==null?void 0:_r.bannerDescription)},null,8,_hoisted_4$9)]})]),createBaseVNode("div",_hoisted_5$a,[createBaseVNode("button",{onClick:Mr[0]||(Mr[0]=gr=>lr()),textContent:toDisplayString(($r=sr.value)==null?void 0:$r.accept)},null,8,_hoisted_6$9),unref(ge).isAcceptNecessaryButtonEnabled?(openBlock(),createElementBlock("button",{key:0,onClick:Mr[1]||(Mr[1]=gr=>ur()),textContent:toDisplayString((yr=sr.value)==null?void 0:yr.decline)},null,8,_hoisted_7$8)):createCommentVNode("",!0),createBaseVNode("button",{onClick:Mr[2]||(Mr[2]=gr=>L.value=!0),textContent:toDisplayString((xr=sr.value)==null?void 0:xr.manageCookies)},null,8,_hoisted_8$7)])])],2)):createCommentVNode("",!0)]}),_:3},8,["name"]),unref(ge).isControlButtonEnabled&&unref(d)?(openBlock(),createElementBlock("button",{key:0,"aria-label":"Cookie control",class:"cookieControl__ControlButton","data-testid":"nuxt-cookie-control-control-button",onClick:Mr[3]||(Mr[3]=$r=>L.value=!0)},_hoisted_10$7)):createCommentVNode("",!0),createVNode(Transition,{name:"cookieControl__Modal"},{default:withCtx(()=>{var $r,yr,xr,gr,_r;return[unref(L)?(openBlock(),createElementBlock("div",{key:0,class:"cookieControl__Modal",onClick:withModifiers(mr,["self"])},[ar.value?(openBlock(),createElementBlock("p",{key:0,class:"cookieControl__ModalUnsaved",textContent:toDisplayString(($r=sr.value)==null?void 0:$r.settingsUnsaved)},null,8,_hoisted_12$6)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_13$4,[createBaseVNode("div",_hoisted_14$4,[render
5160Slot(kr.$slots,"modal"),unref(ge).isModalForced?createCommentVNode("",!0):(openBlock(),createElementBlock("button",{key:0,class:"cookieControl__ModalClose",onClick:Mr[4]||(Mr[4]=wr=>L.value=!1),textContent:toDisplayString((yr=sr.value)==null?void 0:yr.close)},null,8,_hoisted_15$3)),(openBlock(!0),createElementBlock(Fragment$1,null,renderList(unref(CookieType),wr=>(openBlock(),createElementBlock(Fragment$1,{key:wr},[unref(ge).cookies[wr].length?(openBlock(),createElementBlock(Fragment$1,{key:0},[createBaseVNode("h3",{textContent:toDisplayString(sr.value&&(wr===unref(CookieType).NECESSARY?sr.value.cookiesNecessary:sr.value.cookiesOptional))},null,8,_hoisted_16$2),createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment$1,null,renderList(unref(ge).cookies[wr],Ir=>(openBlock(),createElementBlock("li",{key:Ir.id},[renderSlot(kr.$slots,"cookie",normalizeProps(guardReactiveProps({cookie:Ir})),()=>[createBaseVNode("div",_hoisted_17$1,[wr===unref(CookieType).NECESSARY&&Ir.name!=="functional"?(openBlock(),createElementBlock("input",{key:0,id:unref(resolveTranslatable)(Ir.name,r.locale),type:"checkbox",disabled:"",checked:""},null,8,_hoisted_18$1)):(openBlock(),createElementBlock("input",{key:1,id:unref(resolveTranslatable)(Ir.name,r.locale),type:"checkbox",checked:unref(getCookieIds)(tr.value).includes(unref(getCookieId)(Ir)),onChange:Hr=>Cr(Ir)},null,40,_hoisted_19$1)),createBaseVNode("button",{onClick:Mr[5]||(Mr[5]=Hr=>Er(Hr))},toDisplayString(hr(Ir.name)),1),createBaseVNode("label",{class:"cookieControl__ModalCookieName",for:unref(resolveTranslatable)(Ir.name,r.locale),tabindex:"0",onKeydown:Mr[6]||(Mr[6]=Hr=>Pr(Hr))},[createTextVNode(toDisplayString(hr(Ir.name))+" ",1),Ir.description?(openBlock(),createElementBlock("span",_hoisted_21$1,toDisplayString(dr(Ir.description)),1)):createCommentVNode("",!0),unref(ge).isCookieIdVisible&&Ir.targetCookieIds?(openBlock(),createElementBlock("span",_hoisted_22$1,[_hoisted_23$1,createTextVNode(" "+toDisplayString("IDs: "+Ir.targetCookieIds.map(Hr=>`"${Hr}"`).join(", ")),1)])):createCommentVNode("",!0),Object.entries(Ir.links||{}).length?(openBlock(!0),createElementBlock(Fragment$1,{key:2},renderList(Object.entries(Ir.links||{}),Hr=>(openBlock(),createElementBlock("span",{key:Hr[0]},[_hoisted_24,createBaseVNode("a",{href:Hr[0]},toDisplayString(Hr[1]||Hr[0]),9,_hoisted_25)]))),128)):createCommentVNode("",!0)],40,_hoisted_20$1)])])]))),128))])],64)):createCommentVNode("",!0)],64))),128)),createBaseVNode("div",_hoisted_26,[createBaseVNode("button",{onClick:Mr[7]||(Mr[7]=()=>{cr(),L.value=!1}),textContent:toDisplayString((xr=sr.value)==null?void 0:xr.save)},null,8,_hoisted_27),createBaseVNode("button",{onClick:Mr[8]||(Mr[8]=()=>{lr(),L.value=!1}),textContent:toDisplayString((gr=sr.value)==null?void 0:gr.acceptAll)},null,8,_hoisted_28),unref(ge).isModalForced?createCommentVNode("",!0):(openBlock(),createElementBlock("button",{key:0,onClick:Mr[9]||(Mr[9]=()=>{or(),L.value=!1}),textContent:toDisplayString((_r=sr.value)==null?void 0:_r.declineAll)},null,8,_hoisted_29))])])])],8,_hoisted_11$6)):createCommentVNode("",!0)]}),_:3})])]),_:3})}}}),useDevice=()=>useNuxtApp().$device,_hoisted_1$9={class:"antialiased inline-block",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"45px",height:"100%",viewBox:"0 0 400 301.04",style:{"enable-background":"new 0 0 400 301.04"}},_hoisted_2$9=createBaseVNode("g",{id:"a"},null,-1),_hoisted_3$9={id:"b"},_hoisted_4$8={id:"c"},_hoisted_5$9=["fill"],_hoisted_6$8=["fill"],_hoisted_7$7=["fill"],_sfc_main$b={__name:"Logo",props:["color"],setup(t){const e=t;return(r,s)=>{const o=__nuxt_component_1;return openBlock(),createBlock(o,{to:"/"},{default:withCtx(()=>[(openBlock(),createElementBlock("svg",_hoisted_1$9,[_hoisted_2$9,createBaseVNode("g",_hoisted_3$9,[createBaseVNode("g",_hoisted_4$8,[createBaseVNode("g",null,[createBaseVNode("path",{class:"st0",fill:e.color=="white"?"white":"black",d:`M208.97-0.01h113.02v0.27c11.03,0.95,21.59,4.38,30.98,10.17c56.55,34.79,42.64,132.53-23.32,144.71
5161 l68.18,75.69h-60.41l-67.18-74.44l0,0l-38.9-42.47h87.28c33.13,0,33.13-71.44,0-71.44h-90.58l-43.15,49.14v-0.05l-46.48,52.86 5162 L11.45-0.01h60.58l66.47,75.62l16.16-18.38l0,0l50.26-57.23H208.97z`},null,8,_hoisted_5$9),createBaseVNode("path",{class:"st0",fill:e.color=="white"?"white":"black",d:`M363.26,285.49c0.17,4.69,1.76,8.78,5.57,11.71c3.79,2.93,8.56,3.86,13.25,3.86c4.33,0,8.73-0.83,12.37-3.28 5163 c3.79-2.57,5.55-6.19,5.55-10.73c0-2.47-0.71-4.69-2.13-6.72c-1.61-2.32-3.84-3.79-6.53-4.6c-4.45-1.22-8.9-2.42-13.35-3.59 5164 c-3.3-0.88-5.87-2.74-5.87-6.41c0-2.32,1.08-4.08,3.1-5.23c1.78-0.98,3.86-1.3,5.87-1.3c5.77,0,9.85,2.25,10.44,8.17h7.16 5165 c-0.12-4.13-1.71-7.58-5.06-10.15c-3.52-2.71-7.82-3.67-12.22-3.67c-4.03,0-7.97,0.86-11.32,3.23c-3.42,2.42-5.11,5.72-5.11,9.9 5166 c0,6.36,4.03,9.66,9.88,11.27c3.37,0.93,6.72,1.83,10.1,2.76c1.15,0.32,2.64,0.66,3.74,1.08c2.81,1.05,4.13,3.18,4.13,6.16 5167 c0,2.08-0.78,3.81-2.37,5.16c-2.15,1.83-5.16,2.32-7.9,2.32c-2.98,0-6.14-0.54-8.58-2.37c-2.49-1.88-3.52-4.55-3.62-7.55h-7.11 5168 V285.49z M281.94,299.94h32.78v-6.04h-25.67v-14.52h23.32v-5.65h-23.32v-13.08h25.21v-6.04h-32.34v45.3l0,0L281.94,299.94z 5169 M180.95,299.94h6.75v-35.72h0.95l12.84,35.72h5.99l12.84-35.72h0.95v35.72h6.75v-45.3h-10.44l-12.44,36.23h-0.81l-12.76-36.23 5170 h-10.59v45.3l0,0H180.95z M89.44,299.94h7.31l4.35-12.25h19.17l4.35,12.25h7.63l-17.46-45.3h-7.95l-17.38,45.3l0,0H89.44z 5171 M110.29,261.63h0.88l7.26,20.85h-15.5l7.33-20.85l0,0H110.29z M41.55,276.54H22.82v5.18h12.32v0.49 5172 c-0.1,3.59-1.05,7.07-3.62,9.68c-2.62,2.66-6.21,3.52-9.85,3.47c-4.67-0.05-8.48-1.83-11.15-5.72c-2.52-3.64-3.4-8.02-3.4-12.4 5173 s0.86-8.75,3.4-12.4c2.69-3.89,6.45-5.72,11.15-5.72c2.93,0,5.72,0.71,8.12,2.42c2.37,1.69,3.74,3.96,4.23,6.77h6.94 5174 c-0.66-4.47-2.66-8.17-6.36-10.93c-3.79-2.84-8.26-3.91-12.93-3.91c-6.33,0-11.73,2.13-15.89,6.97 5175 c-4.11,4.77-5.77,10.54-5.77,16.8s1.69,11.95,5.77,16.72c4.18,4.84,9.53,7.02,15.89,7.02c2.49,0,5.06-0.37,7.36-1.42 5176 c2.4-1.08,4.47-2.96,6.19-4.91l0.86-0.98v7.31h5.48v-24.5L41.55,276.54z`},null,8,_hoisted_6$8),createBaseVNode("path",{class:"st0",fill:e.color=="white"?"white":"black",d:`M2.14,230.82h60.41l68.23-77.65l-30.22-34.37L2.14,230.82L2.14,230.82z M146.13,153.18l68.28,77.65h60.41 5177 L176.4,118.73l-30.24,34.42L146.13,153.18z`},null,8,_hoisted_7$7)])])])]))]),_:1})}}},GetPageBySlug=gql` 5178 query ($slug: String, $segment: String!) { 5179 Page(slug: $slug) { 5180 _id 5181 title 5182 _slug 5183 content_stack (personalize_for_segments: [$segment]) { 5184 __typename 5185 ... on Hero { 5186 heading 5187 desktop_media_asset { 5188 url 5189 playback_id 5190 duration 5191 cover 5192 description 5193 } 5194 mobile_media_asset { 5195 url 5196 playback_id 5197 duration 5198 cover 5199 } 5200 video_controls 5201 _id 5202 } 5203 ... on TextBlock { 5204 _id 5205 heading 5206 body_text 5207 cta_link{ 5208 url 5209 body 5210 } 5211 } 5212 ... on FeaturedGames { 5213 title 5214 cta { 5215 url 5216 body 5217 } 5218 game { 5219 _id 5220 title 5221 card_title 5222 game_summary 5223 _slug 5224 game_keyart_1x1{ 5225 url 5226 } 5227 game_keyart_16x9{ 5228 url 5229 } 5230 } 5231 dark_mode 5232 featured_first_game 5233 layout 5234 } 5235 ... on JoinUsSectionHomePage{ 5236 _id 5237 title 5238 body 5239 cover_image{ 5240 url 5241 } 5242 cta_1{ 5243 url 5244 body 5245 } 5246 cta_2{ 5247 url 5248 body 5249 } 5250 team_member{ 5251 name 5252 position 5253 headshot{ 5254 url 5255 } 5256 } 5257 } 5258 ... on FeaturedNews { 5259 title 5260 body_text 5261 article_card_style 5262 filter_by_category { 5263 title 5264 _slug 5265 } 5266 news{ 5267 title 5268 _slug 5269 summary 5270 cover { 5271 url 5272 } 5273 } 5274 } 5275 ... on TickerTape{ 5276 title 5277 partners_logos{ 5278 url 5279 name 5280 } 5281 } 5282 ... on ImageAndText { 5283 _id 5284 heading 5285 image { 5286 url 5287 } 5288 text 5289 image_position 5290 border 5291 lightbox 5292 image_backing 5293 cta_button{ 5294 url 5295 body 5296 type 5297 } 5298 cta_button_2{ 5299 url 5300 body 5301 type 5302 } 5303 } 5304 ... on ImageList { 5305 heading 5306 list_items { 5307 heading 5308 body_text 5309 border 5310 image { 5311 url 5312 name 5313 } 5314 } 5315 } 5316 ... on ImagesGallery { 5317 _id 5318 heading 5319 images { 5320 url 5321 name 5322 playback_id 5323 } 5324 } 5325 ... on VideoGallery { 5326 heading 5327 video_cards { 5328 caption 5329 video { 5330 playback_id 5331 } 5332 } 5333 } 5334 ... on Team { 5335 _id 5336 heading 5337 body_text 5338 team_members { 5339 name 5340 position
5341 headshot { 5342 url 5343 } 5344 } 5345 } 5346 ... on HeaderImageWithContent { 5347 full_width_image { 5348 url 5349 } 5350 header_image_position 5351 heading 5352 small_image_1 { 5353 url 5354 name 5355 } 5356 small_image_2 { 5357 url 5358 name 5359 } 5360 body_text 5361 cta_1 { 5362 body 5363 url 5364 type 5365 } 5366 cta_2 { 5367 body 5368 url 5369 type 5370 } 5371 } 5372 ... on TwoCardsCallToAction { 5373 _id 5374 heading 5375 left_card_image { 5376 url 5377 } 5378 right_card_image { 5379 url 5380 } 5381 left_card_heading 5382 right_card_heading 5383 left_card_body_text 5384 right_card_body_text 5385 right_card_cta { 5386 url 5387 body 5388 type 5389 } 5390 left_card_cta { 5391 url 5392 body 5393 type 5394 } 5395 } 5396 ... on Awards { 5397 heading 5398 awards { 5399 award_name 5400 award_body 5401 award_position 5402 award_logo { 5403 url 5404 } 5405 } 5406 } 5407 } 5408 dynamic_content{ 5409 __typename 5410 ... on Text { 5411 body 5412 text 5413 html 5414 format 5415 _id 5416 } 5417 } 5418 title_tag 5419 meta_description 5420 } 5421 } 5422`,GetGamePageBySlug=gql` 5423 query ($slug: String, $segment: String!) { 5424 GamePage(slug: $slug) { 5425 _id 5426 title 5427 _slug 5428 game_keyart_1x1 { 5429 _id 5430 url 5431 } 5432 game_keyart_16x9 { 5433 _id 5434 url 5435 } 5436 game_summary 5437 content_stack (personalize_for_segments: [$segment]) { 5438 __typename 5439 ... on Hero { 5440 heading 5441 desktop_media_asset { 5442 url 5443 playback_id 5444 duration 5445 cover 5446 description 5447 } 5448 mobile_media_asset { 5449 url 5450 playback_id 5451 duration 5452 cover 5453 } 5454 video_controls 5455 _id 5456 } 5457 ... on GameIntroduction { 5458 _id 5459 heading 5460 body_text 5461 game_availability 5462 platforms { 5463 platform_logo { 5464 url 5465 } 5466 link_to_the_platform { 5467 url 5468 body 5469 type 5470 } 5471 } 5472 } 5473 ... on TextBlock { 5474 _id 5475 heading 5476 body_text 5477 cta_link{ 5478 url 5479 body 5480 } 5481 } 5482 ... on ImageAndText { 5483 _id 5484 heading 5485 image { 5486 url 5487 } 5488 text 5489 image_position 5490 border 5491 lightbox 5492 image_backing 5493 cta_button{ 5494 url 5495 body 5496 type 5497 } 5498 } 5499 ... on DiscordSignup{ 5500 heading 5501 cta_button { 5502 url 5503 body 5504 type 5505 } 5506 } 5507 ... on ImagesGallery { 5508 _id 5509 heading 5510 images { 5511 url 5512 name 5513 playback_id 5514 } 5515 } 5516 ... on PullQuotes{ 5517 quotes 5518 source 5519 logo{ 5520 url 5521 } 5522 } 5523 ... on GameFeatures { 5524 features { 5525 _id 5526 game_feature_image { 5527 url 5528 } 5529 game_feature_title 5530 game_feature_description 5531 } 5532 } 5533 ... on Newsletter { 5534 heading 5535 body_text 5536 sendgrid_list_name 5537 } 5538 } 5539 meta_description 5540 } 5541 } 5542`;gql` 5543 query ($where: LiveEventWhereInput) { 5544 LiveEvents(where: $where) { 5545 items { 5546 _id 5547 _slug 5548 title 5549 cover { 5550 url(width: 1920) 5551 } 5552 start_day_and_time 5553 speakers { 5554 _id 5555 name 5556 profile_pic { 5557 url(preset: "Mobile") 5558 } 5559 } 5560 heading 5561 live_stream { 5562 cover(width: 384, height: 448) 5563 } 5564 } 5565 } 5566 } 5567`;gql` 5568 query ($slug: String) { 5569 LiveEvent(slug: $slug) { 5570 _id 5571 title 5572 _slug 5573 cover { 5574 url(width: 1920) 5575 } 5576 speakers { 5577 __typename 5578 bio 5579 name 5580 profile_pic { 5581 url(preset: "Mobile") 5582 } 5583 } 5584 heading 5585 live_stream_intro 5586 live_stream { 5587 _id 5588 playback_id 5589 } 5590 start_day_and_time 5591 } 5592 } 5593`;gql` 5594 query ($limit: Int, $sort: GamePageSortInput) { 5595 GamePages(limit: $limit, sort: $sort) { 5596 items { 5597 _id 5598 title 5599 _slug 5600 _publish_on 5601 game_keyart_1x1 { 5602 url 5603 } 5604 game_keyart_16x9 { 5605 url 5606 } 5607 game_summary 5608 } 5609 } 5610 } 5611`;const GetGamesList=gql` 5612 query ($slug: String) { 5613 Page(slug: $slug) { 5614 content_stack { 5615 __typename 5616 ... on FeaturedGames { 5617 _id 5618 title 5619 game { 5620 title 5621 _slug 5622 } 5623 } 5624 } 5625 } 5626 } 5627`;gql` 5628 query ($slug: String) { 5629 Page(slug: $slug) { 5630 _id 5631 title 5632 _slug 5633 stack (personalize_for_segments: [$segment]){ 5634 __typename 5635 ... on ImageAndText { 5636 _id 5637 image { 5638 url 5639 } 5640 text 5641 title 5642 image_position 5643 lightbox 5644 image_backing 5645 cta_button{ 5646 url 5647 body 5648 type 5649 } 5650 cta_button_2{ 5651 url 5652 body 5653 type 5654 } 5655 } 5656 } 5657 seo { 5658 _id 5659 title 5660 description 5661 social_media_image { 5662 _id 5663 url 5664 } 5665 } 5666 } 5667 } 5668`;const GetArticles=gql` 5669 query ($where: NewsArticleWhereInput, $skip: Int, $limit: Int) { 5670 NewsArticles(where: $where, skip: $skip, limit: $limit) { 5671 items { 5672 _id 5673 title 5674 cover { 5675 url(width: 600) 5676 cover 5677 } 5678 _slug 5679 author { 5680 name 5681 profile_pic { 5682 url 5683 } 5684 biography 5685 } 5686 _publish_on 5687 summary 5688 body { 5689 ... on Assets { 5690 items { 5691 url(width: 1920) 5692 } 5693 } 5694 ... on Text { 5695 body 5696 text 5697 html 5698 format 5699 _id 5700 } 5701 } 5702 category { 5703 title 5704 _slug 5705 } 5706 } 5707 } 5708 } 5709`,GetCategories=gql` 5710 { 5711 NewsArticles { 5712 items{ 5713 category { 5714 _id 5715 _slug 5716 icon { 5717 url 5718 } 5719 title 5720 5721 } 5722 } 5723 } 5724 } 5725`,GetNavigation=gql` 5726{ 5727 Navigation(slug: "top-navigation") { 5728 menu_items { 5729 title 5730 link_to_page { 5731 _slug 5732 } 5733 children { 5734 title 5735 link_to_page { 5736 _slug 5737 } 5738 } 5739 } 5740 } 5741} 5742`,GetFooter=gql` 5743{ 5744 SiteFooter { 5745 _id 5746 title 5747 address 5748 footer_nav { 5749 __typename 5750 menu_items { 5751 title 5752 link_to_page { 5753 _slug 5754 } 5755 children { 5756 title 5757 link_to_page { 5758 _slug 5759 } 5760 } 5761 } 5762 } 5763 social_media { 5764 x_twitter { 5765 url 5766 } 5767 x_twitter_icon { 5768 _id 5769 url 5770 } 5771 threads { 5772 url 5773 } 5774 threads_icon { 5775 _id 5776 url 5777 } 5778 instagram { 5779 url 5780 } 5781 instagram_icon { 5782 _id 5783 url 5784 } 5785 linkedin { 5786 url 5787 } 5788 linkedin_icon { 5789 _id 5790 url 5791 } 5792 youtube { 5793 url 5794 } 5795 youtube_icon { 5796 _id 5797 url 5798 } 5799 facebook { 5800 url 5801 } 5802 facebook_icon { 5803 _id 5804 url 5805 } 5806 tiktok { 5807 url 5808 } 5809 tiktok_icon { 5810 _id 5811 url 5812 } 5813 } 5814 charity_partners_logos { 5815 _id 5816 url 5817 } 5818 contact_form{ 5819 contact_form_dropdown_menu{ 5820 menu_item 5821 associated_email_addresses 5822 } 5823 } 5824 newsletter { 5825 heading 5826 body_text 5827 sendgrid_list_name 5828 } 5829 } 5830} 5831`,GetArticleBySlug=gql` 5832 query ($slug: String) { 5833 NewsArticle(slug: $slug) { 5834 _id 5835 _slug 5836 _publish_on 5837 title_tag 5838 meta_description 5839 keywords{ 5840 body 5841 } 5842 title 5843 cover { 5844 url(width: 1920) 5845 cover 5846 playback_id 5847 } 5848 category { 5849 icon { 5850 url 5851 } 5852 title 5853 _slug 5854 } 5855 author { 5856 name 5857 profile_pic { 5858 url 5859 } 5860 biography 5861 } 5862 summary 5863 body { 5864 __typename 5865 ... on Text { 5866 body 5867 text 5868 html 5869 format 5870 _id 5871 } 5872 ... on InstagramPost { 5873 url 5874 } 5875 ... on TwitterPost { 5876 url 5877 } 5878 ... on YouTubePost { 5879 url 5880 } 5881 ... on VimeoPost { 5882 url 5883 } 5884 ... on FacebookPost { 5885 url 5886 } 5887 ... on SpotifyPlaylist { 5888 url 5889 } 5890 ... on Quote { 5891 body 5892 author 5893 } 5894 ... on Assets { 5895 items { 5896 url(width: 1920) 5897 caption 5898 width 5899 height 5900 playback_id 5901 cover 5902 } 5903 } 5904 } 5905 } 5906 } 5907`,_export_sfc=(t,e)=>{const r=t.__vccOpts||t;for(const[s,o]of e)r[s]=o;return r},_withScopeId$2=t=>(pushScopeId("data-v-7bc6752f"),t=t(),popScopeId(),t),_hoisted_1$8=_withScopeId$2(()=>createBaseVNode("div",{class:"burger-btn-bg absolute md:hidden right-0 left-auto max-md:w-20 max-md:rounded-bl-3xl bg-black w-full h-full"},null,-1)),_hoisted_2$8={class:"nav-wrapper z-50 flex flex-wrap items-center justify-between px-4 h-full md:px-8 duration-500"},_hoisted_3$8=createStaticVNode('<span class="sr-only" data-v-7bc6752f>
5907Open main menu</span><svg class="w-8 overflow-visible" fill="currentColor" viewBox="0 0 31 20" xmlns="http://www.w3.org/2000/svg" data-v-7bc6752f><path id="burger-top" d="M29.9934 0.19214L29.6049 3.19214H2.9959L0.526489 0.192139L29.9934 0.19214Z" fill="white" data-v-7bc6752f></path><path id="burger-middle" d="M30.3785 8.19214L29.9901 11.1921H3.38103L0.911621 8.19214L30.3785 8.19214Z" fill="white" data-v-7bc6752f></path><path id="burger-bottom" d="M30.3785 16.1921L29.9901 19.1921H3.38103L0.911621 16.1921L30.3785 16.1921Z" fill="white" data-v-7bc6752f></path></svg>',2),_hoisted_5$8=[_hoisted_3$8],_hoisted_6$7={id:"mega-menu-full-cta",class:"items-center top-0 justify-between w-full hidden md:flex md:w-auto md:grow md:basis-auto h-full"},_hoisted_7$6={key:0,class:"overflow-hidden h-full"},_hoisted_8$6={class:"h-full md:space-x-8 pl-8 flex -ml-96 opacity-0 group-hover:ml-0 group-hover:opacity-100 duration-500 ease-out"},_hoisted_9$6={class:"text-right top-[-50vh] absolute w-full max-md:right-0 pt-28 max-h-screen gap-x-12 flex flex-col flex-wrap pr-8 text-5xl font-medium md:flex-row md:space-x-8 md:h-4 md:mt-0 sm:overflow-y-scroll"},_hoisted_10$6={class:"mb-0"},_hoisted_11$5={class:"md:space-x-8 duration-500 ease-out"},_hoisted_12$5={class:"mb-6 h-full"},_sfc_main$a={__name:"Nav",props:["theme"],async setup(t){let e,r;const{isMobile:s}=useDevice(),{$gsap:o}=useNuxtApp();useRouter();const d=useRoute(),{data:L,error:ge,refresh:Mt}=([e,r]=withAsyncContext(()=>useAsyncQuery({query:GetNavigation})),e=await e,r(),e),er=L.value.Navigation.menu_items,tr=cr=>cr.children.length>0,ir=reactive({expanded:!1}),rr=computed(()=>d.path),nr=()=>{ir.expanded?(o.to("#burger-menu-bg",{duration:.5,left:"100%",ease:"Power3.easeIn"}),o.to("#burger-top",{duration:.5,x:0,y:0,rotation:0,y:0,ease:"Power3.easeOut"}),o.to("#burger-middle",{duration:.5,x:0,opacity:1,ease:"Power3.easeOut"}),o.to("#burger-bottom",{duration:.5,rotation:0,y:0,ease:"Power3.easeOut"}),o.to("#burger-menu > ul",{duration:.5,top:"-50vh",ease:"Power3.easeIn",onComplete:()=>{ir.expanded=!ir.expanded}})):(ir.expanded=!ir.expanded,o.to("#burger-menu-bg",{duration:.5,left:0,ease:"Power3.easeOut"}),o.to("#burger-top",{duration:.5,rotation:45,y:"6px",transformOrigin:"50% 50%",ease:"Power3.easeOut"}),o.to("#burger-middle",{duration:.5,x:"100px",opacity:0,ease:"Power3.easeOut"}),o.to("#burger-bottom",{duration:.5,rotation:-45,y:"-10px",transformOrigin:"50% 50%",ease:"Power3.easeOut"}),o.to("#burger-menu > ul",{duration:.5,top:0,ease:"Power3.easeOut",onComplete:()=>{}}),document.body.style.overflow="hidden")},ar=ref$2(null),sr=ref$2(),lr=ref$2();return onMounted(()=>{if(!s){let cr=window.scrollY;window.onscroll=function(){if(window.innerWidth>960){let ur=window.scrollY;cr>ur?(sr.value.style.left="0",lr.value.style.opacity=1):ir.expanded||(sr.value.style.left="calc(-100% + 120px",lr.value.style.opacity=0),cr=ur}}}}),(cr,ur)=>{const or=__nuxt_component_1;return openBlock(),createElementBlock("nav",{class:"fixed font-titleSans md:rounded-br-3xl inline-block max-md:w-full top-0 left-0 z-20 h-20 md:h-16 transition-all duration-500 text-white",ref_key:"navBar",ref:ar},[createBaseVNode("div",{class:"nav-bg absolute max-md:w-20 rounded-br-3xl bg-black w-full h-full duration-500 ease-out",ref_key:"navBG",ref:sr},null,512),_hoisted_1$8,createBaseVNode("div",_hoisted_2$8,[createVNode(_sfc_main$b,{class:"h-full w-auto ml-0 md:pl-0 inline-block mr-12 max-md:mr-0",color:"white"}),createBaseVNode("button",{onClick:nr,id:"mega-menu-full-cta-button",type:"button",class:"inline-flex items-center text-sm md:hidden mr-0"},_hoisted_5$8),createBaseVNode("div",_hoisted_6$7,[createBaseVNode("ul",{class:"h-full items-center flex flex-col pl-4 text-sm font-medium md:flex-row md:space-x-8 md:mt-0 duration-500",ref_key:"navList",ref:lr},[unref(er)?(openBlock(!0),createElementBlock(Fragment$1,{key:0},renderList(unref(er),dr=>(openBlock(),createElementBlock("li",{class:normalizeClass(["m-0 h-full leading-[40px] flex items-center group",rr.value.includes(`/${dr.link_to_page[0]._slug}`)?"active":""])},[createVNode(or,{to:`/${dr.link_to_page[0]._slug}`,class:"nav-item block px-3 font-[900] text-[16px] lg:text-[18px] uppercase"},{default:withCtx(()=>
5907[createTextVNode(toDisplayString(dr.title),1)]),_:2},1032,["to"]),tr(dr)?(openBlock(),createElementBlock("div",_hoisted_7$6,[createBaseVNode("ul",_hoisted_8$6,[(openBlock(!0),createElementBlock(Fragment$1,null,renderList(dr.children,hr=>(openBlock(),createElementBlock("li",{class:normalizeClass(["m-0 h-full leading-[40px] flex items-center group",rr.value.includes(`/${hr.link_to_page[0]._slug}`)?"active":""])},[createVNode(or,{to:`/${hr.link_to_page[0]._slug}`,class:"nav-item block font-[900] text-[16px] lg:text-[18px] uppercase"},{default:withCtx(()=>[createTextVNode(toDisplayString(hr.title),1)]),_:2},1032,["to"])],2))),256))])])):createCommentVNode("",!0)],2))),256)):createCommentVNode("",!0)],512)])]),createBaseVNode("div",{id:"burger-menu",class:normalizeClass(["items-center h-screen absolute top-0 justify-between w-screen md:w-auto md:grow md:basis-auto md:hidden",ir.expanded?"":"hidden"])},[createBaseVNode("div",{id:"burger-menu-bg",class:"h-screen top-0 left-full opacity-100 bg-black sm:overflow-y-scroll text-right",onClick:nr}),createBaseVNode("ul",_hoisted_9$6,[unref(er)?(openBlock(!0),createElementBlock(Fragment$1,{key:0},renderList(unref(er),dr=>(openBlock(),createElementBlock("li",_hoisted_10$6,[createVNode(or,{to:`/${dr.link_to_page[0]._slug}`,class:normalizeClass(["nav-item inline-block mb-6 font-[900] uppercase",rr.value.includes(`/${dr.link_to_page[0]._slug}`)?"border-b-primary border-b-8":""]),onClick:nr},{default:withCtx(()=>[createTextVNode(toDisplayString(dr.title),1)]),_:2},1032,["to","class"]),createBaseVNode("div",null,[createBaseVNode("ul",_hoisted_11$5,[(openBlock(!0),createElementBlock(Fragment$1,null,renderList(dr.children,hr=>(openBlock(),createElementBlock("li",_hoisted_12$5,[createVNode(or,{to:`/${hr.link_to_page[0]._slug}`,class:normalizeClass([rr.value.includes(`/${hr.link_to_page[0]._slug}`)?"border-b-primary border-b-8":"","nav-item inline-block font-[900] uppercase"]),onClick:nr},{default:withCtx(()=>[createTextVNode(toDisplayString(hr.title),1)]),_:2},1032,["to","class"])]))),256))])])]))),256)):createCommentVNode("",!0)])],2)],512)}}},Nav=_export_sfc(_sfc_main$a,[["__scopeId","data-v-7bc6752f"]]);function defaultEstimatedProgress(t,e){const r=e/t*100;return 2/Math.PI*100*Math.atan(r/50)}function createLoadingIndicator(t={}){const{duration:e=2e3,throttle:r=200,hideDelay:s=500,resetDelay:o=400}=t,d=t.estimatedProgress||defaultEstimatedProgress,L=useNuxtApp(),ge=ref$2(0),Mt=ref$2(!1);let er=!1,tr,ir,rr,nr;const ar=()=>sr(0);function sr(pr=0){if(!L.isHydrating){if(pr>=100)return cr();or(),ge.value=pr<0?0:pr,r?ir=setTimeout(()=>{Mt.value=!0,dr()},r):(Mt.value=!0,dr())}}function lr(){rr=setTimeout(()=>{Mt.value=!1,nr=setTimeout(()=>{ge.value=0},o)},s)}function cr(pr={}){ge.value=100,er=!0,or(),ur(),pr.force?(ge.value=0,Mt.value=!1):lr()}function ur(){clearTimeout(rr),clearTimeout(nr)}function or(){clearTimeout(ir),cancelAnimationFrame(tr)}function dr(){er=!1;let pr;function mr(vr){if(er)return;pr??(pr=vr);const Er=vr-pr;ge.value=Math.max(0,Math.min(100,d(e,Er))),tr=requestAnimationFrame(mr)}tr=requestAnimationFrame(mr)}let hr=()=>{};{const pr=L.hook("page:loading:start",()=>{ar()}),mr=L.hook("page:loading:end",()=>{cr()}),vr=L.hook("vue:error",()=>cr());hr=()=>{vr(),pr(),mr(),or()}}return{_cleanup:hr,progress:computed(()=>ge.value),isLoading:computed(()=>Mt.value),start:ar,set:sr,finish:cr,clear:or}}function useLoadingIndicator(t={}){const e=useNuxtApp(),r=e._loadingIndicator=e._loadingIndicator||createLoadingIndicator(t);return getCurrentScope()&&(e._loadingIndicatorDeps=e._loadingIndicatorDeps||0,e._loadingIndicatorDeps++,onScopeDispose(()=>{e._loadingIndicatorDeps--,e._loadingIndicatorDeps===0&&(r._cleanup(),delete e._loadingIndicator)})),r}const __nuxt_component_2=defineComponent({name:"NuxtLoadingIndicator",props:{throttle:{type:Number,default:200},duration:{type:Number,default:2e3},height:{type:Number,default:3},color:{type:[String,Boolean],default:"repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)"},estimatedProgress:{type:Function,required:!1}},setup(t,{slots:e,expose:r}){const{progress:s,isLoading:o,start:d,finish:L,clear:ge}=useLoadingIndicator({duration:t.duration,throttle:t.throttle,estimatedProgress:t.estimatedProgress});return r({progress:s,isLoading:o,start:d,finish:L,clear:ge}),()=>h$4("div",{class:"nuxt-loading-indicator",style:{position:"fixed",top:0,right:0,left:0,pointerEvents:"none",width:"auto",height:`${t.height}px`,opacity:o.value?1:0,background:t.color||void 0,backgroundSize:`${100/s.value*100}% auto`,transform:`scaleX(${s.value}%)`,transformOrigin:"left",transition:"transform 0.1s, height 0.4s, opacity 0.4s",zIndex:999999}},e)}}),RouteProvider=defineComponent({props:{vnode:{type:Object,required:!0},route:{type:Object,required:!0},vnodeRef:Object,renderKey:String,trackRootNodes:Boolean},setup(t){const e=t.renderKey,r=t.route,s={};for(const o in t.route)Object.defineProperty(s,o,{get:()=>e===t.renderKey?t.route[o]:r[o]});return provide(PageRouteSymbol,shallowReactive(s)),()=>h$4(t.vnode,{ref:t.vnodeRef})}}),__nuxt_component_3=defineComponent({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(t,{attrs:e,expose:r}){const s=useNuxtApp(),o=ref$2(),d=inject(PageRouteSymbol,null);let L;r({pageRef:o});const ge=inject(LayoutMetaSymbol,null);let Mt;const er=s.deferHydration();if(s.isHydrating){const tr=s.hooks.hookOnce("app:error",er);useRouter$1().beforeEach(tr)}return t.pageKey&&watch(()=>t.pageKey,(tr,ir)=>{tr!==ir&&s.callHook("page:loading:start")}),()=>h$4(RouterView,{name:t.name,route:t.route,...e},{default:tr=>{const ir=haveParentRoutesRendered(d,tr.route,tr.Component),rr=d&&d.matched.length===tr.route.matched.length;if(!tr.Component){if(Mt&&!rr)return Mt;er();return}if(Mt&&ge&&!ge.isCurrent(tr.route))return Mt;if(ir&&d&&(!ge||ge!=null&&ge.isCurrent(d)))return rr?Mt:null;const nr=generateRouteKey$1(tr,t.pageKey);!s.isHydrating&&!hasChildrenRoutes(d,tr.route,tr.Component)&&L===nr&&s.callHook("page:loading:end"),L=nr;const ar=!!(t.transition??tr.route.meta.pageTransition??appPageTransition),sr=ar&&_mergeTransitionProps([t.transition,tr.route.meta.pageTransition,appPageTransition,{onAfterLeave:()=>{s.callHook("page:transition:finish",tr.Component)}}
5907].filter(Boolean)),lr=t.keepalive??tr.route.meta.keepalive??appKeepalive;return Mt=_wrapIf(Transition,ar&&sr,wrapInKeepAlive(lr,h$4(Suspense,{suspensible:!0,onPending:()=>s.callHook("page:start",tr.Component),onResolve:()=>{nextTick(()=>s.callHook("page:finish",tr.Component).then(()=>s.callHook("page:loading:end")).finally(er))}},{default:()=>{const cr=h$4(RouteProvider,{key:nr||void 0,vnode:tr.Component,route:tr.route,renderKey:nr||void 0,trackRootNodes:ar,vnodeRef:o});return lr&&(cr.type.name=tr.Component.type.name||tr.Component.type.__name||"RouteProvider"),cr}}))).default(),Mt}})}});function _mergeTransitionProps(t){const e=t.map(r=>({...r,onAfterLeave:r.onAfterLeave?toArray$1(r.onAfterLeave):void 0}));return defu(...e)}function haveParentRoutesRendered(t,e,r){if(!t)return!1;const s=e.matched.findIndex(o=>{var d;return((d=o.components)==null?void 0:d.default)===(r==null?void 0:r.type)});return!s||s===-1?!1:e.matched.slice(0,s).some((o,d)=>{var L,ge,Mt;return((L=o.components)==null?void 0:L.default)!==((Mt=(ge=t.matched[d])==null?void 0:ge.components)==null?void 0:Mt.default)})||r&&generateRouteKey$1({route:e,Component:r})!==generateRouteKey$1({route:t,Component:r})}function hasChildrenRoutes(t,e,r){return t?e.matched.findIndex(o=>{var d;return((d=o.components)==null?void 0:d.default)===(r==null?void 0:r.type)})<e.matched.length-1:!1}const useTheme=()=>useState("siteTheme",()=>"light"),useLoadingState=()=>useState("loading",()=>!0),useFetchingContent=()=>useState("fetching",()=>!1),useLightbox=()=>useState("lightbox",()=>!1),useRandomNumberGenerator=()=>useState("randomNum",()=>Math.random()),_hoisted_1$7={class:"button-wrapper flex"},_hoisted_2$7={x:"50%",y:"50%",fill:"white","text-anchor":"middle","alignment-baseline":"middle",class:"text-wrapper inline-block m-0 p-0 font-[Manrope] after:content-[''] after:absolute after:inline-block after:top-1/2 after:border-b-2 after:border-r-2 after:border-black after:dark:border-white after:group-hover:border-white after:group-hover:dark:border-black after:-rotate-45 after:h-2 after:w-2 after:opacity-0 after:-translate-y-1/2 after:ease-out after:duration-300 after:group-hover:opacity-100 after:group-hover:translate-x-4 group-hover:-translate-x-2 duration-200 ease-out"},_hoisted_3$7=["type"],_hoisted_4$7={class:"text-wrapper h-[95%] flex items-center justify-center row-start-1 col-start-1"},_hoisted_5$7={x:"50%",y:"50%",fill:"white","text-anchor":"middle","alignment-baseline":"middle",class:"text-wrapper inline-block m-0 p-0 font-[Manrope] after:content-[''] after:absolute after:inline-block after:top-1/2 after:border-b-2 after:border-r-2 after:border-black after:dark:border-white after:group-hover:border-white after:group-hover:dark:border-black after:-rotate-45 after:h-2 after:w-2 after:opacity-0 after:-translate-y-1/2 after:ease-out after:duration-300 after:group-hover:opacity-100 after:group-hover:translate-x-4 group-hover:-translate-x-2 duration-200 ease-out"},_sfc_main$9={__name:"btn",props:["url","type","link"],setup(t){const e=t,r=e.type,s=e.link,o=ref$2(),d=ref$2(),L=ref$2();return useTheme(),r=="primary"?(o.value=e.btnColor,d.value=null,L.value=e.bgColor):(o.value=e.bgColor,d.value=e.btnColor,L.value=e.btnColor),(ge,Mt)=>{const er=__nuxt_component_1;return openBlock(),createElementBlock("div",_hoisted_1$7,[unref(s)?(openBlock(),createBlock(er,{key:0,to:t.url,type:unref(r),class:"link-button min-w-52 inline-block relative overflow-hidden py-2 px-10 origin-center duration-700 border-2 rounded-full border-black dark:border-white hover:border-gray-500 hover:dark:border-black group-hover:border-gray-500 group-hover:dark:border-black text-black dark:text-white hover:text-white hover:dark:text-black group-hover:text-white group-hover:dark:text-black justify-center items-center text-center font-bold bg-white dark:bg-black bg-opacity-80 dark:bg-opacity-80 cursor-pointer after:content-[''] after:absolute after:top-0 after:left-0 after:w-full after:h-full after:bg-black dark:after:bg-white after:rounded-full after:-translate-x-full after:duration-300 hover:after:translate-x-0 group-hover:after:translate-x-0 group"},{default:withCtx(()=>[createBaseVNode("text",_hoisted_2$7,[renderSlot(ge.$slots,"default",{},void 0,!0)])]),_:3},8,["to","type"])):createCommentVNode("",!0),unref(s)?createCommentVNode("",!0):(openBlock(),createElementBlock("button",{key:1,type:unref(r),class:"inline-block min-w-52 relative overflow-hidden py-2 px-10 origin-center duration-700 border-2 rounded-full border-black dark:border-white text-black dark:text-white justify-center items-center text-center font-bold bg-white dark:bg-black bg-opacity-80 dark:bg-opacity-80 curs
5907or-pointer after:content-[''] after:absolute after:top-0 after:left-0 after:w-full after:h-full after:bg-black dark:after:bg-white after:rounded-full after:-translate-x-full after:duration-300 hover:border-gray-500 hover:dark:border-black group-hover:border-gray-500 group-hover:dark:border-black hover:text-white hover:dark:text-black group-hover:text-white group-hover:dark:text-black hover:after:translate-x-0 group-hover:after:translate-x-0 group"},[createBaseVNode("div",_hoisted_4$7,[createBaseVNode("text",_hoisted_5$7,[renderSlot(ge.$slots,"default",{},void 0,!0)])])],8,_hoisted_3$7))])}}},__nuxt_component_0$1=_export_sfc(_sfc_main$9,[["__scopeId","data-v-def3bff4"]]),endpoints={firestore:{add:t=>`/api/firestore/add?col=${t}`,set:(t,e)=>`/api/firestore/set?col=${t}&id=${e}`,delete:(t,e)=>`/api/firestore/delete?col=${t}&id=${e}`,query:t=>`/api/firestore/query?col=${t}`},sendgrid:{add:(t,e,r)=>`/api/sendgrid/add?email=${t}&name=${e}&list=${r}`},jazzhr:{getJobs:()=>"/api/jazzhr/getJobsList",getQuestions:t=>`/api/jazzhr/getQuestionnaire?id=${t}`,queryApplicants:()=>"/api/jazzhr/queryApplicants",postApplication:(t,e)=>`/api/jazzhr/postApplication?id=${t}&qid=${e}`}},_withScopeId$1=t=>(pushScopeId("data-v-6aa9e4cf"),t=t(),popScopeId(),t),_hoisted_1$6={id:"contact",class:"form-wrapper my-16 md:m-0"},_hoisted_2$6=_withScopeId$1(()=>createBaseVNode("h2",{class:"col-start-2 dark:text-white"},"GET IN TOUCH",-1)),_hoisted_3$6=_withScopeId$1(()=>createBaseVNode("p",{class:"dark:text-white"},"Ready to discuss an upcoming project? Want to know more about XR Games or the team? We'd love to hear from you:",-1)),_hoisted_4$6=["onSubmit"],_hoisted_5$6={class:"border-none"},_hoisted_6$6={class:"md:flex"},_hoisted_7$5={class:"name pt-5 md:w-[48%] md:mr-[2%]"},_hoisted_8$5={key:0,class:"error-message absolute top-0 antialiased inline-block ml-4 mb-1 text-center text-xs float-left text-red-500"},_hoisted_9$5={class:"email pt-5 md:w-[48%] md:ml-[2%]"},_hoisted_10$5={key:0,class:"error-message absolute top-0 antialiased inline-block ml-4 mb-1 text-center text-xs float-left text-red-500"},_hoisted_11$4={class:"pt-5 mt-3"},_hoisted_12$4={key:0,class:"error-message absolute top-0 antialiased inline-block ml-4 mb-1 text-center text-xs float-left text-red-500"},_hoisted_13$3=_withScopeId$1(()=>createBaseVNode("option",{value:"",disabled:"",selected:""},"Select a subject...",-1)),_hoisted_14$3=["value"],_hoisted_15$2={class:"pt-5"},_hoisted_16$1={key:0,class:"error-message antialiased inline-block ml-4 text-center text-xs text-red-500"},_hoisted_17={class:"counter text-xs float-right leading-8 dark:text-white"},_hoisted_18={class:"TsAndCs p-0 pt-5 mb-4 mt-0 mx-0"},_hoisted_19={class:"label flex cursor-pointer justify-left items-center dark:text-white"},_hoisted_20=_withScopeId$1(()=>createBaseVNode("div",{class:"checkmark left-0 h-5 w-5 border-solid border-2 border-white rounded-md -order-1 m-0"},null,-1)),_hoisted_21={key:0,class:"error-message antialiased inline-block ml-8 text-center text-primary text-xs"},_hoisted_22={id:"submitBtn",class:"LH_btn"},_hoisted_23={key:0,class:"confirmation-msg inline-block m-0 p-0 text-xs ml-4 text-center antialiased dark:text-white"},_sfc_main$8={__name:"ContactForm",props:["contactForm"],setup(t){const r=t.contactForm.contact_form_dropdown_menu,s=ref$2({value:"",allowValidation:!1}),o=ref$2({value:"",allowValidation:!1}),d=ref$2({value:"",allowValidation:!1}),L=ref$2({value:"",maxlength:2500,allowValidation:!1}),ge=ref$2({value:!1,allowValidation:!1}),Mt=ref$2(!1);let er=ref$2(!1);const tr=computed(()=>!!s.value.value),ir=computed(()=>!!o.value.value),rr=computed(()=>ar(d.value.value)),nr=computed(()=>L.value.value.length>=60),ar=or=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(or);onMounted(()=>{});const sr=async(or,dr,hr)=>{try{const{result:pr}=await $fetch(endpoints.firestore.set(or,dr),{method:"POST",body:hr});return pr}catch(pr){console.log(pr.message)}},lr=()=>{s.value.value="",s.value.allowValidation=!1,d.value.value="",d.value.allowValidation=!1,o.value.value="",o.value.allowValidation=!1,L.value.value="",L.value.allowValidation=!1},cr=()=>{for(let or=0;or<r.length;or++)if(o.value.value==r[or].menu_item)return r[or].associated_email_addresses;return"[email protected]"},ur=async()=>{Mt.value=tr.value&&rr.value&&nr.value&&ge.value.value,Mt.value?(await sr("contact",d.value.value,{name:s.value.value,subject:o.value.value,email:d.value.value,message:L.value.value,forwardTo:cr(),time:new Date().toUTCString()}),lr(),er.value=!0):ge.value||(ge.value.allowValidation=!0)};return(or,dr)=>{const hr=__nuxt_component_1,pr=__nuxt_component_0$1;return openBlock(),createElementBlock("div",_hoisted_1$6,[_hoisted_2$6,_hoisted_3$6,createBaseVNode("form",{class:"form col-start-2 w-full md:mb-0",onSubmit:withModifiers(ur,["prevent"])},[createBaseVNode("fieldset",_hoisted_5$6,[createBaseVNode("div",_hoisted_6$6,[createBaseVNode("div",_hoisted_7$5,[!unref(tr)&&unref(s).allowValidation?(openBlock(),createElementBlock("p",_hoisted_8$5,"A name is required")):createCommentVNode("",!0),withDirectives(createBaseVNode("input",{type:"text",name:"name",id:"name",placeholder:"Name",required:"","onUpdate:modelValue":dr[0]||(dr[0]=mr=>unref(s).value=mr),onBlur:dr[1]||(dr[1]=mr=>unref(s).allowValidation=!0),onFocus:dr[2]||(dr[2]=mr=>unref(s).allowValidation=!1)},null,544),[[vModelText,unref(s).value]])]),createBaseVNode("div",_hoisted_9$5,[!unref(rr)&&unref(d).allowValidation?(openBlock(),createElementBlock("p",_hoisted_10$5,"Please enter a valid email address.")):createCommentVNode("",!0),withDirectives(createBaseVNode("input",{type:"email",name:"email",id:"email",placeholder:"Email",required:"",class:normalizeClass({email:unref(d),error:!unref(d).valid}),"onUpdate:modelValue":dr[3]||(dr[3]=mr=>unref(d).value=mr),onBlur:dr[4]||(dr[4]=mr=>unref(d).allowValidation=!0),onFocus:dr[5]||(dr[5]=mr=>unref(d).allowValidation=!1)},null,34),[[vModelText,unref(d).value]])])]),createBaseVNode("div",_hoisted_11$4,[!unref(ir)&&unref(o).allowValidation?(openBlock(),createElementBlock("p",_hoisted_12$4,"A subject is required")):createCommentVNode("",!0),withDirectives(createBaseVNode("select",{name:"subject",placeholder:"Subject",required:"",class:"w-full py-3 rounded-full bg-[#fafafa] text-gray-800 font-bold outline-none border-none focus:ring-0 invali
5907d:text-gray-400","onUpdate:modelValue":dr[6]||(dr[6]=mr=>unref(o).value=mr),onBlur:dr[7]||(dr[7]=mr=>unref(o).allowValidation=!0),onFocus:dr[8]||(dr[8]=mr=>unref(o).allowValidation=!1)},[_hoisted_13$3,(openBlock(!0),createElementBlock(Fragment$1,null,renderList(unref(r),mr=>(openBlock(),createElementBlock("option",{value:mr.menu_item},toDisplayString(mr.menu_item),9,_hoisted_14$3))),256))],544),[[vModelSelect,unref(o).value]])]),createBaseVNode("div",_hoisted_15$2,[!unref(nr)&&unref(L).allowValidation?(openBlock(),createElementBlock("p",_hoisted_16$1,"Your message should be longer than 60 characters")):createCommentVNode("",!0),createBaseVNode("span",_hoisted_17,toDisplayString(unref(L).value.length)+" / "+toDisplayString(unref(L).maxlength),1),withDirectives(createBaseVNode("textarea",{class:"message",name:"textarea",required:"","onUpdate:modelValue":dr[9]||(dr[9]=mr=>unref(L).value=mr),onBlur:dr[10]||(dr[10]=mr=>unref(L).allowValidation=!0),onFocus:dr[11]||(dr[11]=mr=>unref(L).allowValidation=!1)},null,544),[[vModelText,unref(L).value]])]),createBaseVNode("div",_hoisted_18,[createBaseVNode("label",_hoisted_19,[withDirectives(createBaseVNode("input",{type:"checkbox",name:"TsAndCs","onUpdate:modelValue":dr[12]||(dr[12]=mr=>unref(ge).value=mr)},null,512),[[vModelCheckbox,unref(ge).value]]),createTextVNode(" I have read and agree to the "),createVNode(hr,{to:"/privacy-policy",class:"privacy-policy inline-block underline"},{default:withCtx(()=>[createTextVNode("privacy policy")]),_:1}),_hoisted_20]),!unref(ge).value&&unref(ge).allowValidation?(openBlock(),createElementBlock("p",_hoisted_21,"you must agree to our privacy policy")):createCommentVNode("",!0)]),createBaseVNode("div",_hoisted_22,[createVNode(pr,{class:"justify-end",link:!1,type:"submit",btnColor:"#ffffff",url:null},{default:withCtx(()=>[createTextVNode(" Submit ")]),_:1}),unref(er)?(openBlock(),createElementBlock("p",_hoisted_23,"Your message has been sent, we will get back to you soon.")):createCommentVNode("",!0)])])],40,_hoisted_4$6)])}}},__nuxt_component_0=_export_sfc(_sfc_main$8,[["__scopeId","data-v-6aa9e4cf"]]);var isEmail$1={exports:{}},assertString={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;function r(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(L){return typeof L}:r=function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},r(o)}function s(o){var d=typeof o=="string"||o instanceof String;if(!d){var L=r(o);throw o===null?L="null":L==="object"&&(L=o.constructor.name),new TypeError("Expected a string but received a ".concat(L))}}t.exports=e.default,t.exports.default=e.default})(assertString,assertString.exports);var assertStringExports=assertString.exports,isByteLength={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var r=s(assertStringExports);function s(L){return L&&L.__esModule?L:{default:L}}function o(L){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(Mt){return typeof Mt}:o=function(Mt){return Mt&&typeof Symbol=="function"&&Mt.constructor===Symbol&&Mt!==Symbol.prototype?"symbol":typeof Mt},o(L)}function d(L,ge){(0,r.default)(L);var Mt,er;o(ge)==="object"?(Mt=ge.min||0,er=ge.max):(Mt=arguments[1],er=arguments[2]);var tr=encodeURI(L).split(/%..|./).length-1;return tr>=Mt&&(typeof er>"u"||tr<=er)}t.exports=e.default,t.exports.default=e.default})(isByteLength,isByteLength.exports);var isByteLengthExports=isByteLength.exports,isFQDN={exports:{}},merge={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;for(var d in o)typeof s[d]>"u"&&(s[d]=o[d]);return s}t.exports=e.default,t.exports.default=e.default})(merge,merge.exports);var mergeExports=merge.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=L;var r=o(assertStringExports),s=o(mergeExports);
5907function o(ge){return ge&&ge.__esModule?ge:{default:ge}}var d={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function L(ge,Mt){(0,r.default)(ge),Mt=(0,s.default)(Mt,d),Mt.allow_trailing_dot&&ge[ge.length-1]==="."&&(ge=ge.substring(0,ge.length-1)),Mt.allow_wildcard===!0&&ge.indexOf("*.")===0&&(ge=ge.substring(2));var er=ge.split("."),tr=er[er.length-1];return Mt.require_tld&&(er.length<2||!Mt.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tr)||/\s/.test(tr))||!Mt.allow_numeric_tld&&/^\d+$/.test(tr)?!1:er.every(function(ir){return!(ir.length>63&&!Mt.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(ir)||/[\uff01-\uff5e]/.test(ir)||/^-|-$/.test(ir)||!Mt.allow_underscores&&/_/.test(ir))})}t.exports=e.default,t.exports.default=e.default})(isFQDN,isFQDN.exports);var isFQDNExports=isFQDN.exports,isIP={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=er;var r=s(assertStringExports);function s(tr){return tr&&tr.__esModule?tr:{default:tr}}var o="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",d="(".concat(o,"[.]){3}").concat(o),L=new RegExp("^".concat(d,"$")),ge="(?:[0-9a-fA-F]{1,4})",Mt=new RegExp("^("+"(?:".concat(ge,":){7}(?:").concat(ge,"|:)|")+"(?:".concat(ge,":){6}(?:").concat(d,"|:").concat(ge,"|:)|")+"(?:".concat(ge,":){5}(?::").concat(d,"|(:").concat(ge,"){1,2}|:)|")+"(?:".concat(ge,":){4}(?:(:").concat(ge,"){0,1}:").concat(d,"|(:").concat(ge,"){1,3}|:)|")+"(?:".concat(ge,":){3}(?:(:").concat(ge,"){0,2}:").concat(d,"|(:").concat(ge,"){1,4}|:)|")+"(?:".concat(ge,":){2}(?:(:").concat(ge,"){0,3}:").concat(d,"|(:").concat(ge,"){1,5}|:)|")+"(?:".concat(ge,":){1}(?:(:").concat(ge,"){0,4}:").concat(d,"|(:").concat(ge,"){1,6}|:)|")+"(?::((?::".concat(ge,"){0,5}:").concat(d,"|(?::").concat(ge,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function er(tr){var ir=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,r.default)(tr),ir=String(ir),ir?ir==="4"?L.test(tr):ir==="6"?Mt.test(tr):!1:er(tr,4)||er(tr,6)}t.exports=e.default,t.exports.default=e.default})(isIP,isIP.exports);var isIPExports=isIP.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=cr;var r=ge(assertStringExports),s=ge(isByteLengthExports),o=ge(isFQDNExports),d=ge(isIPExports),L=ge(mergeExports);function ge(ur){return ur&&ur.__esModule?ur:{default:ur}}var Mt={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blackl
5907isted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},er=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,tr=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,ir=/^[a-z\d]+$/,rr=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,nr=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,ar=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,sr=254;function lr(ur){var or=ur.replace(/^"(.+)"$/,"$1");if(!or.trim())return!1;var dr=/[\.";<>]/.test(or);if(dr){if(or===ur)return!1;var hr=or.split('"').length===or.split('\\"').length;if(!hr)return!1}return!0}function cr(ur,or){if((0,r.default)(ur),or=(0,L.default)(or,Mt),or.require_display_name||or.allow_display_name){var dr=ur.match(er);if(dr){var hr=dr[1];if(ur=ur.replace(hr,"").replace(/(^<|>$)/g,""),hr.endsWith(" ")&&(hr=hr.slice(0,-1)),!lr(hr))return!1}else if(or.require_display_name)return!1}if(!or.ignore_max_length&&ur.length>sr)return!1;var pr=ur.split("@"),mr=pr.pop(),vr=mr.toLowerCase();if(or.host_blacklist.includes(vr)||or.host_whitelist.length>0&&!or.host_whitelist.includes(vr))return!1;var Er=pr.join("@");if(or.domain_specific_validation&&(vr==="gmail.com"||vr==="googlemail.com")){Er=Er.toLowerCase();var Cr=Er.split("+")[0];if(!(0,s.default)(Cr.replace(/\./g,""),{min:6,max:30}))return!1;for(var Pr=Cr.split("."),kr=0;kr<Pr.length;kr++)if(!ir.test(Pr[kr]))return!1}if(or.ignore_max_length===!1&&(!(0,s.default)(Er,{max:64})||!(0,s.default)(mr,{max:254})))return!1;if(!(0,o.default)(mr,{require_tld:or.require_tld,ignore_max_length:or.ignore_max_length,allow_underscores:or.allow_underscores})){if(!or.allow_ip_domain)return!1;if(!(0,d.default)(mr)){if(!mr.startsWith("[")||!mr.endsWith("]"))return!1;var Mr=mr.slice(1,-1);if(Mr.length===0||!(0,d.default)(Mr))return!1}}if(Er[0]==='"')return Er=Er.slice(1,Er.length-1),or.allow_utf8_local_part?ar.test(Er):rr.test(Er);for(var Ur=or.allow_utf8_local_part?nr:tr,$r=Er.split("."),yr=0;yr<$r.length;yr++)if(!Ur.test($r[yr]))return!1;return!(or.blacklisted_chars&&Er.search(new RegExp("[".concat(or.blacklisted_chars,"]+"),"g"))!==-1)}t.exports=e.default,t.exports.default=e.default})(isEmail$1,isEmail$1.exports);var isEmailExports=isEmail$1.exports;const isEmail=getDefaultExportFromCjs$1(isEmailExports),_withScopeId=t=>(pushScopeId("data-v-e3505c87"),t=t(),popScopeId(),t),_hoisted_1$5={key:0,class:"col-start-2 text-black dark:text-white uppercase"},_hoisted_2$5={key:1,class:"col-start-2 text-black dark:text-white uppercase"},_hoisted_3$5={class:"text-black dark:text-white"},_hoisted_4$5=["onSubmit"],_hoisted_5$5={class:"relative pt-5"},_hoisted_6$5=_withScopeId(()=>createBaseVNode("label",{for:"person-icon",class:"sr-only"},"Your name",-1)),_hoisted_7$4={key:0,class:"error-message absolute top-0 antialiased inline-block ml-4 mb-1 text-center text-xs float-left text-red-500"},_hoisted_8$4=_withScopeId(()=>createBaseVNode("label",{for:"email-address-icon",class:"sr-only"},"Your Email",-1)),_hoisted_9$4={class:"relative pt-5 mt-3"},_hoisted_10$4=_withScopeId(()=>createBaseVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[createBaseVNode("svg",{"aria-hidden":"true",class:"w-3 h-3 text-gray-500 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[createBaseVNode("path",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z"}),createBaseVNode("path",{d:"M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"})])],-1)),_hoisted_11$3={key:0,class:"error-message absolute top-0 antialiased inline-block ml-4 mb-1 text-center text-xs float-left text-red-500"},_hoisted_12$3={class:"TsAndCs p-0 pt-5 mb-4 mt-0 mx-0"},_hoisted_13$2={class:"label flex cursor-pointer justify-left items-center dark:text-white"},_hoisted_14$2=_withScopeId(()=>createBaseVNode("div",{class:"checkmark left-0 h-5 w-5 border-solid border-2 rounded-md border-black dark:border-white -order-1 m-0"},null,-1)),_hoisted_15$1={key:0,class:"error-message antialiased inline-block ml-8 text-center text-primary text-xs"},_hoisted_16={key:0,class:"confirmation-msg inline-block m-0 p-0 text-xs text-center antialiased dark:text-white"},_sfc_main$7={__name:"NewsletterSubscribe",props:["data","layout"],setup(t){var ar;const e=t,r=computed(()=>e.data),s=(ar=r.value)==null?void 0:ar.sendgrid_list_name,o=ref$2({value:"",allowValidation:!1}),d=ref$2({value:"",allowValidation:!1}),L=ref$2(!1),ge=ref$2({value:!1,allowValidation:!1}),Mt=computed(()=>!!o.value.value),er=computed(()=>isEmail(d.value.value)),tr=ref$2(!1),ir=()=>{o.value.value="",o.value.allowValidation=!1,d.value.value="",d.value.allowValidation=!1},rr=async(sr,lr)=>{try{const{result:cr}=await $fetch(endpoints.sendgrid.add(sr,lr,s),{method:"POST",body:{email:sr,name:lr,list:s}});return cr}catch(cr){console.log(cr.message)}},nr=async()=>
5907{if(L.value=Mt.value&&er.value&&ge.value.value,L.value){const sr=await rr(d.value.value,o.value.value);ir(),sr==202&&(tr.value=!0)}else ge.value.allowValidation=!0};return(sr,lr)=>{var or,dr,hr;const cr=__nuxt_component_1,ur=__nuxt_component_0$1;return openBlock(),createElementBlock("div",{class:normalizeClass(["rounded-lg",t.layout!="column"?"grid grid-cols-site md:grid-cols-siteMd lg:grid-cols-siteLg xl:grid-cols-siteXl 2xl:grid-cols-site2Xl mb-24":"mb-12"])},[createBaseVNode("div",{class:normalizeClass(t.layout!="column"?" col-start-2 col-span-1 md:mr-8":"")},[t.layout=="column"?(openBlock(),createElementBlock("h2",_hoisted_1$5,toDisplayString((or=unref(r))==null?void 0:or.heading),1)):(openBlock(),createElementBlock("h3",_hoisted_2$5,toDisplayString((dr=unref(r))==null?void 0:dr.heading),1)),createBaseVNode("p",_hoisted_3$5,toDisplayString((hr=unref(r))==null?void 0:hr.body_text),1)],2),createBaseVNode("form",{onSubmit:withModifiers(nr,["prevent"]),class:normalizeClass(t.layout!="column"?"col-start-2 md:col-start-3 col-span-1 max-sm:row-start-2":"")},[createBaseVNode("div",_hoisted_5$5,[_hoisted_6$5,!unref(Mt)&&unref(o).allowValidation?(openBlock(),createElementBlock("p",_hoisted_7$4,"A name is required")):createCommentVNode("",!0),withDirectives(createBaseVNode("input",{required:"",type:"text",id:"person-icon","onUpdate:modelValue":lr[0]||(lr[0]=pr=>unref(o).value=pr),class:"bg-gray-50 border border-gray-300 text-gray-900 block w-full pl-8 p-2.5 dark:border-gray-600 dark:text-black",placeholder:"Name",onBlur:lr[1]||(lr[1]=pr=>unref(o).allowValidation=!0),onFocus:lr[2]||(lr[2]=pr=>unref(o).allowValidation=!1)},null,544),[[vModelText,unref(o).value]])]),_hoisted_8$4,createBaseVNode("div",_hoisted_9$4,[_hoisted_10$4,!unref(er)&&unref(d).allowValidation?(openBlock(),createElementBlock("p",_hoisted_11$3,"Please enter a valid email address.")):createCommentVNode("",!0),withDirectives(createBaseVNode("input",{required:"",type:"text",id:"email-address-icon","onUpdate:modelValue":lr[3]||(lr[3]=pr=>unref(d).value=pr),class:"bg-gray-50 border border-gray-300 text-gray-900 block w-full pl-8 p-2.5 dark:border-gray-600 dark:text-black",placeholder:"Email",onBlur:lr[4]||(lr[4]=pr=>unref(d).allowValidation=!0),onFocus:lr[5]||(lr[5]=pr=>unref(d).allowValidation=!1)},null,544),[[vModelText,unref(d).value]])]),createBaseVNode("div",_hoisted_12$3,[createBaseVNode("label",_hoisted_13$2,[withDirectives(createBaseVNode("input",{type:"checkbox",name:"TsAndCs","onUpdate:modelValue":lr[6]||(lr[6]=pr=>unref(ge).value=pr)},null,512),[[vModelCheckbox,unref(ge).value]]),createTextVNode(" I have read and agree to the "),createVNode(cr,{to:"/privacy-policy",class:"privacy-policy inline-block underline"},{default:withCtx(()=>[createTextVNode("privacy policy")]),_:1}),_hoisted_14$2]),!unref(ge).value&&unref(ge).allowValidation?(openBlock(),createElementBlock("p",_hoisted_15$1,"you must agree to our privacy policy")):createCommentVNode("",!0)]),createVNode(ur,{class:"justify-end",type:"submit",link:!1},{default:withCtx(()=>[createTextVNode("Subscribe")]),_:1}),unref(tr)?(openBlock(),createElementBlock("p",_hoisted_16,"Thank you for subscribing ð")):createCommentVNode("",!0)],42,_hoisted_4$5)],2)}}},Newsletter=_export_sfc(_sfc_main$7,[["__scopeId","data-v-e3505c87"]]),_hoisted_1$4={class:"flex justify-between items-center max-sm:w-full"},_hoisted_2$4=["href"],_hoisted_3$4=["src"],_hoisted_4$4=["href"],_hoisted_5$4=["src"],_hoisted_6$4=["href"],_hoisted_7$3=["src"],_hoisted_8$3=["href"],_hoisted_9$3=["src"],_hoisted_10$3=["href"],_hoisted_11$2=["src"],_hoisted_12$2=["href"],_hoisted_13$1=["src"],_hoisted_14$1=["href"],_hoisted_15=["src"],_sfc_main$6={__name:"SocialMedia",props:["data"],setup(t){return(e,r)=>{var s,o,d,L,ge,Mt,er,tr,ir,rr,nr,ar,sr,lr,cr,ur,or,dr,hr,pr,mr,vr,Er,Cr,Pr,kr,Mr,Ur,$r,yr,xr,gr,_r,wr,Ir;return openBlock(),createElementBlock("div",_hoisted_1$4,[(s=t.data)!=null&&s.x_twitter?(openBlock(),createElementBlock("a",{key:0,class:"max-sm:mx-3 w-6 md:w-8",href:(d=(o=t.data)==null?void 0:o.x_twitter)==null?void 0:d.url,target:"_blank"},[createBaseVNode("img",{src:(ge=(L=t.data)==null?void 0:L.x_twitter_icon)==null?void 0:ge.url,alt:"twitter-link"},null,8,_hoisted_3$4)],8,_hoisted_2$4)):createCommentVNode("",!0),(Mt=t.data)!=null&&Mt.threads?(openBlock(),createElementBlock("a",{key:1,class:"max-sm:mx-3 w-6 md:w-8",href:(tr=(er=t.data)==null?void 0:er.threads)==null?void 0:tr.url,target:"_blank"},[createBaseVNode("img",{src:(rr=(ir=t.data)==null?void 0:ir.threads_icon)==null?void 0:rr.url,alt:"threads-link"},null,8,_hoisted_5$4)],8,_hoisted_4$4)):createCommentVNode("",!0),(nr=t.data)!=null&&nr.
5907instagram?(openBlock(),createElementBlock("a",{key:2,class:"max-sm:mx-3 w-6 md:w-8",href:(sr=(ar=t.data)==null?void 0:ar.instagram)==null?void 0:sr.url,target:"_blank"},[createBaseVNode("img",{src:(cr=(lr=t.data)==null?void 0:lr.instagram_icon)==null?void 0:cr.url,alt:"instagram-link"},null,8,_hoisted_7$3)],8,_hoisted_6$4)):createCommentVNode("",!0),(ur=t.data)!=null&&ur.linkedin?(openBlock(),createElementBlock("a",{key:3,class:"max-sm:mx-3 w-6 md:w-8",href:(dr=(or=t.data)==null?void 0:or.linkedin)==null?void 0:dr.url,target:"_blank"},[createBaseVNode("img",{src:(pr=(hr=t.data)==null?void 0:hr.linkedin_icon)==null?void 0:pr.url,alt:"linkedin-link"},null,8,_hoisted_9$3)],8,_hoisted_8$3)):createCommentVNode("",!0),(mr=t.data)!=null&&mr.youtube?(openBlock(),createElementBlock("a",{key:4,class:"max-sm:mx-3 w-6 md:w-8",href:(Er=(vr=t.data)==null?void 0:vr.youtube)==null?void 0:Er.url,target:"_blank"},[createBaseVNode("img",{src:(Pr=(Cr=t.data)==null?void 0:Cr.youtube_icon)==null?void 0:Pr.url,alt:"youtube-link"},null,8,_hoisted_11$2)],8,_hoisted_10$3)):createCommentVNode("",!0),(kr=t.data)!=null&&kr.facebook?(openBlock(),createElementBlock("a",{key:5,class:"max-sm:mx-3 w-6 md:w-8",href:(Ur=(Mr=t.data)==null?void 0:Mr.facebook)==null?void 0:Ur.url,target:"_blank"},[createBaseVNode("img",{src:(yr=($r=t.data)==null?void 0:$r.facebook_icon)==null?void 0:yr.url,alt:"facebook-link"},null,8,_hoisted_13$1)],8,_hoisted_12$2)):createCommentVNode("",!0),(xr=t.data)!=null&&xr.tiktok?(openBlock(),createElementBlock("a",{key:6,class:"max-sm:mx-3 w-6 md:w-8",href:(_r=(gr=t.data)==null?void 0:gr.tiktok)==null?void 0:_r.url,target:"_blank"},[createBaseVNode("img",{src:(Ir=(wr=t.data)==null?void 0:wr.tiktok_icon)==null?void 0:Ir.url,alt:"tiktok-link"},null,8,_hoisted_15)],8,_hoisted_14$1)):createCommentVNode("",!0)])}}},_hoisted_1$3={id:"footer",class:"sticky dark grid grid-cols-site md:grid-cols-siteMd lg:grid-cols-siteLg xl:grid-cols-siteXl pt-8 top-[100vh] bg-[#181819]"},_hoisted_2$3={class:"grid grid-cols-subgrid col-start-1 gap-0 col-span-4 row-start-1 w-full"},_hoisted_3$3={class:"row-start-2 col-start-2 col-span-2 flex items-center max-sm:gap-[3%] gap-[5%] justify-center md:pt-8 max-md:col-start-2 max-md:col-span-1 max-md:flex-wrap"},_hoisted_4$3=["src"],_hoisted_5$3={class:"footer-wrapper text-white row-start-3 col-start-2 col-span-1 md:col-start-2 md:col-span-2 text-xs py-8 md:py-8"},_hoisted_6$3={class:"site-map flex w-full max-sm:flex-col md:justify-start items-center"},_hoisted_7$2={class:"flex items-center"},_hoisted_8$2={class:"menu flex flex-wrap gap-y-2 items-center ml-3 my-8"},_hoisted_9$2=createBaseVNode("span",{class:"mx-2"},"/",-1),_hoisted_10$2={class:"legals md:flex"},_hoisted_11$1={class:"text-[11px] text-gray-500 dark:text-gray-300"},_hoisted_12$1={class:"text-[11px] text-gray-500 dark:text-gray-300 ml-auto"},_sfc_main$5={__name:"Footer",async setup(t){let e,r;const s=useRoute$1();computed(()=>s.path);const{data:o,error:d,refresh:L}=([e,r]=withAsyncContext(()=>useAsyncQuery({query:GetFooter})),e=await e,r(),e),ge=o.value.SiteFooter,Mt=computed(()=>new Date().getFullYear());return(er,tr)=>{const ir=__nuxt_component_0,rr=Newsletter,nr=_sfc_main$b,ar=__nuxt_component_1,sr=_sfc_main$6;return openBlock(),createElementBlock("footer",_hoisted_1$3,[createBaseVNode("div",_hoisted_2$3,[createVNode(ir,{contactForm:unref(ge).contact_form,class:"col-start-2 row-start-1 md:pr-4 lg:pr-12"},null,8,["contactForm"]),createVNode(rr,{data:unref(o).SiteFooter.newsletter,layout:"column",class:"md:pl-4 lg:pl-12 col-start-2 md:col-start-3 col-span-1 row-start-2 md:row-start-1"},null,8,["data"])]),createBaseVNode("div",_hoisted_3$3,[(openBlock(!0),createElementBlock(Fragment$1,null,renderList(unref(o).SiteFooter.charity_partners_logos,lr=>(openBlock(),createElementBlock("div",{class:"max-md:w-[24%] max-md:mx-[5%]",key:lr._id},[createBaseVNode("img",{src:lr.url},null,8,_hoisted_4$3)]))),128))]),createBaseVNode("div",_hoisted_5$3,[createBaseVNode("div",_hoisted_6$3,[createBaseVNode("div",_hoisted_7$2,[createVNode(nr,{color:"white",class:"h-full w-16 ml-0 md:pl-0 inline-block sm:mr-0"}),createBaseVNode("div",_hoisted_8$2,[(openBlock(!0),createElementBlock(Fragment$1,null,renderList(unref(ge).footer_nav[0].menu_items,lr=>(openBlock(),createElementBlock("span",null,[createVNode(ar,{to:`/${lr.link_to_page[0]._slug}`,class:"my-4 md:my-0 inline"},{default:withCtx(()=>
5907[createTextVNode(toDisplayString(lr.title),1)]),_:2},1032,["to"]),_hoisted_9$2]))),256))])]),createVNode(sr,{data:unref(o).SiteFooter.social_media,class:"md:pl-4 md:ml-auto md:gap-16 sm:w-1/2 max-sm:my-6 max-sm:-order-1"},null,8,["data"])]),createBaseVNode("div",_hoisted_10$2,[createBaseVNode("p",_hoisted_11$1,[createTextVNode("© "+toDisplayString(unref(Mt))+" ",1),createVNode(ar,{to:"/",class:"inline-block"},{default:withCtx(()=>[createTextVNode("XR GAMES")]),_:1}),createTextVNode(". All Rights Reserved. ")]),createVNode(ar,{to:"/privacy-policy",class:"my-4 md:ml-4 md:my-0 text-gray-500"},{default:withCtx(()=>[createTextVNode("Privacy Policy")]),_:1}),createVNode(ar,{to:"/end-user-license-agreement",class:"my-4 md:ml-4 md:my-0 text-gray-500"},{default:withCtx(()=>[createTextVNode("Terms of Use")]),_:1}),createBaseVNode("p",_hoisted_12$1,toDisplayString(unref(ge).address),1)])])])}}},store=reactive({popupVisible:!1,jobs:[],games:[]}),_hoisted_1$2=["onKeydown"],_hoisted_2$2=createBaseVNode("svg",{class:"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none",fill:"#000000",height:"50%",width:"50%",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 460.775 460.775","xml:space":"preserve"},[createBaseVNode("path",{d:`M285.08,230.397L456.218,59.27c6.076-6.077,6.076-15.911,0-21.986L423.511,4.565c-2.913-2.911-6.866-4.55-10.992-4.55 5908 c-4.127,0-8.08,1.639-10.993,4.55l-171.138,171.14L59.25,4.565c-2.913-2.911-6.866-4.55-10.993-4.55 5909 c-4.126,0-8.08,1.639-10.992,4.55L4.558,37.284c-6.077,6.075-6.077,15.909,0,21.986l171.138,171.128L4.575,401.505 5910 c-6.074,6.077-6.074,15.911,0,21.986l32.709,32.719c2.911,2.911,6.865,4.55,10.992,4.55c4.127,0,8.08-1.639,10.994-4.55 5911 l171.117-171.12l171.118,171.12c2.913,2.911,6.866,4.55,10.993,4.55c4.128,0,8.081-1.639,10.992-4.55l32.709-32.719 5912 c6.074-6.075,6.074-15.909,0-21.986L285.08,230.397z`})],-1),_hoisted_3$2=[_hoisted_2$2],_hoisted_4$2=createBaseVNode("svg",{class:"-translate-x-1",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[createBaseVNode("path",{d:"M15 7L10 12L15 17",stroke:"#000000","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1),_hoisted_5$2=[_hoisted_4$2],_hoisted_6$2={class:"imgs-wrapper w-fit"},_hoisted_7$1=["src","alt"],_hoisted_8$1=["playback-id"],_hoisted_9$1=createBaseVNode("svg",{width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[createBaseVNode("path",{d:"M10 7L15 12L10 17",stroke:"#000000","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1),_hoisted_10$1=[_hoisted_9$1],_sfc_main$4={__name:"Lightbox",setup(t){const{isMobile:e}=useDevice(),r=useLightbox(),s=Array.isArray(store.images)?store.images:[store.images];let o=ref$2(store.imageIndex);const d=ref$2(),L=ref$2(),{$gsap:ge}=useNuxtApp(),Mt=rr=>{(rr.target==L.value||rr.keyCode==27)&&(store.images=null,r.value=!1)},er=()=>{o.value>0&&o.value--},tr=()=>{o.value<s.length-1&&o.value++},ir=rr=>{switch(rr.keyCode){case 39:tr();break;case 37:er();break;case 27:Mt(rr);break}};return onMounted(()=>{L.value.addEventListener("mousemove",rr=>{ge.to(d.value,{duration:.3,x:rr.clientX,y:rr.clientY})}),L.value.addEventListener("mouseout",rr=>{ge.to(d.value,{duration:.2,opacity:0})}),L.value.addEventListener("mouseover",rr=>{rr.target==L.value&&ge.to(d.value,{duration:.2,opacity:1})}),window.addEventListener("keydown",ir,null),document.documentElement.style.height="100vh",document.documentElement.style.overflow="hidden"}),onBeforeUnmount(()=>{document.documentElement.style.removeProperty("height"),document.documentElement.style.removeProperty("overflow")}),(rr,nr)=>{const ar=resolveDirective("touch");return openBlock(),createElementBlock("div",{class:"fixed max-sm:px-2 px-6 gap top-0 left-0 w-screen h-screen bg-black bg-opacity-70 flex justify-center items-center cursor-none duration-500 z-50",onClick:Mt,ref_key:"lightboxBG",ref:L,onKeydown:withKeys(Mt,["esc"]),tabindex:"0"},[createBaseVNode("div",{class:"w-12 h-12 -ml-6 -mt-6 bg-white rounded-full fixed top-0 left-0 pointer-events-none opacity-0",ref_key:"closeBtn",ref:d,onKeydown:sr=>39},_hoisted_3$2,544),unref(s).length>1&&!unref(e)?(openBlock(),createElementBlock("button",{key:0,class:"w-12 h-12 rounded-full bg-white flex-shrink-0 mr-auto",onClick:er},_hoisted_5$2)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_6$2,[(openBlock(!0),createElementBlock(Fragment$1,null,renderList(unref(s),(sr,lr)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["max-w-full w-full left-1/2 -translate-x-1/2 overflow-hidden cursor-default",lr==unref(o)||unref(o)==null?"block":"hidden"])},[sr.playback_id?(openBlock(),createElementBlock("mux-player",{key:1,"stream-type":"on-demand",class:"min-w-full max-h-screen transition-opacity bottom-0 top-auto","playback-id":sr.playback_id,autoplay:"",muted:"",loop:""},null,8,_hoisted_8$1)):withDirectives((openBlock(),createElementBlock("img",{key:0,src:sr.url,alt:sr.name,class:"mx-auto max-h-[90vh] max-w-full object-contain rounded-[30px]"},null,8,_hoisted_7$1)),[[ar,tr,"swipe",{left:!0}],[ar,er,"swipe",{right:!0}]])],2))),256))]),unref(s).length>1&&!unref(e)?(openBlock(),createElementBlock("button",{key:1,class:"w-12 h-12 rounded-full bg-white flex-shrink-0 ml-auto",onClick:tr},_hoisted_10$1)):createCommentVNode("",!0)],40,_hoisted_1$2)}}},v="5.12.1",fr=60,ip=0,op=120,w=1920,h=1080,nm="XR-loader",ddd=0,assets=[],layers=[{ddd:0,ind:1,ty:4,nm:"XR-B",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[960,540,0],ix:2,l:2},a:{a:0,k:[960,540,0],ix:1,l:2},s:{a:0,k:[150,150,100],ix:6,l:2}}
vendor: 9,758 bytes, line 5912
5912,ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[896.5,571.75],[922,543]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:38.4,s:[0]},{t:60,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:19.199,s:[0]},{t:40.80078125,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[687,811.5],ix:2},a:{a:0,k:[687,811.5],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 8",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-214.631,244.924],[-138.494,158.701]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:57.6,s:[0]},{t:81.599609375,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:33.6,s:[0]},{t:57.599609375,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[1103.994,319.549],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:3,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-279.256,318.549],[-220.119,251.576]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:43.199,s:[0]},{t:64.80078125,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:21.6,s:[0]},{t:40.80078125,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[1103.994,319.549],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:3,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[222.773,-254.275],[279.448,-318.988]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:45.6,s:[0]},{t:74.400390625,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:19.199,s:[0]},{t:45.599609375,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[666.448,761.011],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:3,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[108.239,-124.036],[190.039,-218.124]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:28.801,s:[0]},{t:48,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:19.19921875,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[666.448,761.011],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:3,cix:2,bm:0,ix:5,mn:"ADBE Vector Group",hd:!1}],ip:0,op:180,st:0,ct:1,bm:0},{ddd:0,ind:2,ty:4,nm:"XR-G",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[960,540,0],ix:2,l:2},a:{a:0,k:[960,540,0],ix:1,l:2},s:{a:0,k:[150,150,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,-10.908],[18.274,0],[0,0]],o:[[0,0],[18.417,0],[0,10.908],[0,0],[0,0]],v:[[432.998,-30.883],[509.428,-30.883],[532.377,-1.274],[509.428,30.883],[437.178,30.883]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:57.6,s:[0]},{t:96,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:26.4,s:[0]},{t:64.80078125,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[532.377,508.181],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 2",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,-56.666],[16.481,-3.211]],o:[[0,0],[10.2,0],[0,45.334],[0,0]],v:[[394.466,-65.592],[490.966,-65.592],[551.034,-.708],[502.163,65.592]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:50.4,s:[0]},{t:91.19921875,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:19.199,s:[0]},{t:60,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[550.838,507.614],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 3",np:3,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[1109.125,637],[1054.25,637]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:16.801,s:[0]},{t:36,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:24,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:3,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[1003.875,637],[954.125,637]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:26.4,s:[0]},{t:50.400390625,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:14.4,s:[0]},{t:38.400390625,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 5",np:3,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[782.375,442],[835.125,442]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:12,s:[0]},{t:36,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:24,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:3,cix:2,bm:0,ix:5,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[775,637],[824.75,637]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:21.6,s:[0]},{t:45.599609375,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:9.6,s:[0]},{t:33.599609375,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[.157,.794],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 4",np:3,cix:2,bm:0,ix:6,mn:"ADBE Vector Group",hd:!1}],ip:0,op:180,st:0,ct:1,bm:0},{ddd:0,ind:3,ty:4,nm:"XR-R",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[960,540,0],ix:2,l:2},a:{a:0,k:[960,540,0],ix:1,l:2},s:{a:0,k:[150,150,100],ix:6,l:2}}
5912,ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-211.869,-239.695],[-237.381,-268.555]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:36,s:[0]},{t:67.19921875,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:24,s:[0]},{t:55.19921875,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[1094.027,811.445],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-167.375,-189.353],[-224,-253.397]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:24,s:[0]},{t:48,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:24,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[1277,826.603],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 8",np:3,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[281.5,318.549],[195,220.451]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:40.801,s:[0]},{t:69.599609375,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:14.4,s:[0]},{t:43.19921875,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[774.5,318.549],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:3,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-225.69,-255.886],[-281.936,-318.988]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:38.4,s:[0]},{t:79.19921875,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:19.199,s:[0]},{t:60,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[1115.065,761.011],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 12",np:3,cix:2,bm:0,ix:5,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-111.19,-123.886],[-193.436,-218.488]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:48,s:[0]},{t:74.400390625,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:14.4,s:[0]},{t:40.80078125,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[1115.065,761.011],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:3,cix:2,bm:0,ix:6,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[223.194,253.076],[281.056,319.049]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:50.4,s:[0]},{t:84,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:28.801,s:[0]},{t:62.400390625,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[672.556,318.549],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 15",np:3,cix:2,bm:0,ix:7,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[109.694,123.576],[217.556,246.049]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:36,s:[0]},{t:67.19921875,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.167],y:[.167]},t:2.4,s:[0]},{t:33.599609375,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:3,ix:5},lc:1,lj:1,ml:10,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[672.556,318.549],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 14",np:3,cix:2,bm:0,ix:8,mn:"ADBE Vector Group",hd:!1}],ip:0,op:180,st:0,ct:1,bm:0}],markers=[],props={},loader={v,fr,ip,op,w,h,nm,ddd,assets,layers,markers,props},_hoisted_1$1={class:"min-h-screen antialiased font-[Titillium Web] bg-white dark:bg-black dark:text-white duration-[1500ms]"},_hoisted_2$1={id:"page-progress",class:"max-sm:hidden fixed z-50 right-0 bottom-36 px-1 py-1 origin-bottom-right left-auto -rotate-90 mix-blend-difference"},_hoisted_3$1=createBaseVNode("div",{class:"bg-black dark:bg-black -mb-5 h-5 duration-1000"},null,-1),_hoisted_4$1=createBaseVNode("p",{class:"text-sm mix-blend-difference text-white m-0"},"[PAGE_PROGRESS]",-1),_hoisted_5$1={id:"page-coordinates",class:"max-md:hidden fixed md:flex md:gap-2 lg:block right-0 md:bottom-72 lg:bottom-64 px-1 py-1 origin-bottom-right left-auto -rotate-90 z-50 mix-blend-difference"},_hoisted_6$1={class:"text-xs border border-white text-white dark:border-white rounded-full md:pr-2 w-16 mb-[1px]"},_hoisted_7=createBaseVNode("span",{class:"bg-white dark:bg-white rounded-full text-black dark:text-black md:px-1 md:py-[1px] duration-1000"},"X",-1),_hoisted_8={class:"text-xs border border-white text-white dark:border-white rounded-full md:pr-2 w-16"},_hoisted_9=createBaseVNode("span",{class:"bg-white dark:bg-white rounded-full text-black dark:text-black md:px-1 md:py-[1px] duration-1000"},"Y",-1),_hoisted_10=createBaseVNode("div",{class:"max-md:hidden w-[20vw] h-[20vw] -left-[13vw] rounded-full bg-red-600 blur-3xl absolute -top-[13vh] opacity-0 dark:opacity-60"},null,-1),_hoisted_11=createBaseVNode("div",{class:"max-md:hidden w-[20vw] h-[20vw] left-0 rounded-full bg-blue-600 blur-3xl absolute -top-[13vh] opacity-0 dark:opacity-60"},null,-1),_hoisted_12=createBaseVNode("div",{class:"max-md:hidden w-[20vw] h-[20vw] top-0 -left-[7vw] rounded-full bg-green-600 blur-3xl absolute opacity-0 dark:opacity-60"},null,-1),_hoisted_13=[_hoisted_10,_hoisted_11,_hoisted_12],_hoisted_14={key:0,class:"intro h-screen w-full fixed top-0 left-0 bg-black"},_sfc_main$3={__name:"app",setup(t){console.log("%c Created with ð¤ by Diva.agency ","font-size: 0.8rem; color: white; line-height: 4rem; background-color:#888888");const e=JSON.parse(JSON.stringify(loader)),r=ref$2(),{isMobile:s}=useDevice(),o=useRoute$1(),d=useTheme(),L=ref$2(),ge=ref$2(),Mt=ref$2(),er=useLoadingState(),tr=useLightbox(),ir=useNuxtApp(),{$gsap:rr,$ScrollTrigger:nr}=useNuxtApp(),ar=lr=>{Mt.value&&(rr.to(Mt.value,{duration:15,rotation:"360deg",repeat:-1,ease:"none",paused:!1}),rr.to(Mt.value,{duration:15,x:lr.clientX-100,y:lr.clientY-100,ease:"power2.out"}))};ir.hook("page:finish",()=>{s?setTimeout(()=>{er.value=!1,window.addEventListener("mousemove",ar)},1200):setTimeout(()=>{er.value=!1,window.addEventListener("mousemove",ar)},800)}),useHead({link:[{rel:"icon",href:"/favicon.ico"}],htmlAttrs:{class:["overflow-x-hidden"]},bodyAttrs:{class:computed(()=>[d.value,"duration-1000"])}});let sr=!1;return watch(()=>o.path,()=>{sr=!1,d.value="light"}),onMounted(()=>{let lr=document.body,cr=document.documentElement,ur,or;const dr=ref$2();window.addEventListener("scroll",()=>{cr.scrollTop>=1&&sr===!1&&(ur=Math.max(lr.scrollHeight,lr.offsetHeight,cr.clientHeight,cr.scrollHeight,cr.offsetHeight),or=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)),dr.value=ur-or,r.value.style.width=cr.scrollTop/dr.value*100+"%"},!0),window.addEventListener("mousemove",hr=>{L.value=hr.clientX,ge.value=hr.clientY}),window.addEventListener("resize",()=>{ur=Math.max(lr.scrollHeight,lr.offsetHeight,cr.clientHeight,cr.scrollHeight,cr.offsetHeight)})}),(lr,cr)=>{const ur=_sfc_main$c,or=Nav,dr=__nuxt_component_2,hr=__nuxt_component_3,pr=_sfc_main$5,mr=_sfc_main$4,vr=resolveComponent("
5912Vue3Lottie"),Er=__nuxt_component_2$1;return openBlock(),createElementBlock(Fragment$1,null,[createVNode(ur,{locale:"en"}),createBaseVNode("div",_hoisted_1$1,[createBaseVNode("div",_hoisted_2$1,[_hoisted_3$1,createBaseVNode("div",{class:"bg-white dark:bg-white w-0 -mb-5 h-5 duration-300",ref_key:"progBar",ref:r},null,512),_hoisted_4$1]),createBaseVNode("div",_hoisted_5$1,[createBaseVNode("div",_hoisted_6$1,[_hoisted_7,createTextVNode(" "+toDisplayString(unref(L)),1)]),createBaseVNode("div",_hoisted_8,[_hoisted_9,createTextVNode(" "+toDisplayString(unref(ge)),1)])]),createVNode(or),createVNode(dr,{color:"#000000"}),withDirectives(createBaseVNode("div",{class:"fixed w-fit h-fit mix-blend-screen transition-all",ref_key:"partyLights",ref:Mt},_hoisted_13,512),[[vShow,unref(d)=="dark"]]),createVNode(hr,{class:normalizeClass(["md:pt-12 max-sm:pt-24",unref(s)?"sm:pt-0":"sm:pt-24"])},null,8,["class"]),createVNode(pr,{id:"footer"}),unref(tr)?(openBlock(),createBlock(mr,{key:0})):createCommentVNode("",!0)]),unref(er)?(openBlock(),createElementBlock("div",_hoisted_14,[createVNode(Er,null,{default:withCtx(()=>[unref(e)?(openBlock(),createBlock(vr,{key:0,class:"mx-auto h-full w-[200vw] bg-black",animationData:unref(e),speed:2,loop:!1},null,8,["animationData"])):createCommentVNode("",!0)]),_:1})])):createCommentVNode("",!0)],64)}}},_hoisted_1={class:"py-10 px-24 mx-auto text-left"},_hoisted_2={class:"mx-auto w-full px-10 py-24 dark:text-white"},_hoisted_3={class:"text-center"},_hoisted_4={key:0,class:"text-center"},_hoisted_5=createBaseVNode("h2",{class:"mb-4 text-2xl font-bold text-center"},"Oops... something went wrong",-1),_hoisted_6=createBaseVNode("p",{class:"mb-6"},null,-1),_sfc_main$2={__name:"ErrorMessage",props:{err:Object},setup(t){return(e,r)=>(openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[createBaseVNode("h1",_hoisted_3,toDisplayString(t.err.statusCode),1),t.err.message?(openBlock(),createElementBlock("p",_hoisted_4,toDisplayString(t.err.message),1)):createCommentVNode("",!0)]),_hoisted_5,_hoisted_6]))}},_sfc_main$1=defineComponent({__name:"error",props:{error:Object},setup(t){const e=useTheme();return useHead({htmlAttrs:{class:["overflow-x-hidden","overscroll-none",e.value]},bodyAttrs:{class:["overscroll-none","duration-500"]}}),(r,s)=>{const o=_sfc_main$2,d=__nuxt_component_0$1;return openBlock(),createElementBlock("div",{class:normalizeClass(["container min-h-screen pt-24 antialiased md:pt-0 font-[Titillium Web] dark:text-white text-center",unref(e)])},[createVNode(Nav),createVNode(o,{err:t.error},null,8,["err"]),createVNode(d,{class:"text-center justify-center mb-16",link:!0,url:"/"},{default:withCtx(()=>[createTextVNode("Home")]),_:1}),createVNode(_sfc_main$5,{id:"footer"})],2)}}}),_sfc_main={__name:"nuxt-root",setup(t){const e=()=>null,r=useNuxtApp(),s=r.deferHydration();if(r.isHydrating){const ge=r.hooks.hookOnce("app:error",s);useRouter$1().beforeEach(ge)}const o=!1;provide(PageRouteSymbol,useRoute$1()),r.hooks.callHookWith(ge=>ge.map(Mt=>Mt()),"vue:setup");const d=useError();onErrorCaptured((ge,Mt,er)=>{if(r.hooks.callHook("vue:error",ge,Mt,er).catch(tr=>console.error("[nuxt] Error in `vue:error` hook",tr)),isNuxtError(ge)&&(ge.fatal||ge.unhandled))return r.runWithContext(()=>showError(ge)),!1});const L=!1;return(ge,Mt)=>(openBlock(),createBlock(Suspense,{onResolve:unref(s)},{default:withCtx(()=>[unref(d)?(openBlock(),createBlock(unref(_sfc_main$1),{key:0,error:unref(d)},null,8,["error"])):unref(L)?(openBlock(),createBlock(unref(e),{key:1,context:unref(L)},null,8,["context"])):unref(o)?(openBlock(),createBlock(resolveDynamicComponent(unref(o)),{key:2})):(openBlock(),createBlock(unref(_sfc_main$3),{key:3}))]),_:1},8,["onResolve"]))}};let entry;{let t;entry=async function(){var L,ge;if(t)return t;const s=!!((L=window.__NUXT__)!=null&&L.serverRendered||((ge=document.getElementById("__NUXT_DATA__"))==null?void 0:ge.dataset.ssr)==="true")?createSSRApp(_sfc_main):createApp(_sfc_main),o=createNuxtApp({vueApp:s});async function d(Mt){await o.callHook("app:error",Mt),o.payload.error=o.payload.error||createError(Mt)}s.config.errorHandler=d;try{await applyPlugins(o,plugins)}catch(Mt){d(Mt)}try{await o.hooks.callHook("app:created",s),await o.hooks.callHook("app:beforeMount",s),s.mount(vueAppRootContainer),await o.hooks.callHook("app:mounted",s),await nextTick()}catch(Mt){d(Mt)}return s.config.errorHandler===d&&(s.config.errorHandler=void 0),s},t=entry().catch(e=>{throw console.error("Error while mounting app:",e),e})}export{endpoints as $,__nuxt_component_0$1 as A,onBeforeUnmount as B,GetGamePageBySlug as C,useFetchingContent as D,useDevice as E,Fragment$1 as F,GetPageBySlug as G,useLightbox as H,resolveDirective as I,withDirectives as J,useHead as K,toValue as L,hash$1 as M,Newsletter as N,reactive as O,fetchDefaults as P,useAsyncData as Q,getDefaultExportFromCjs$1 as R,assertStringExports as S,isFQDNExports as T,isIPExports as U,mergeExports as V,isEmailExports as W,isByteLengthExports as X,loader as Y,isEmail as Z,_export_sfc as _,createError as a,resolveComponent as a0,withModifiers as a1,vModelText as a2,isRef as a3,vModelSelect as a4,vModelCheckbox as a5,Transition as a6,__nuxt_component_1 as a7,__nuxt_component_2$1 as a8,pushScopeId as a9,popScopeId as aa,useRuntimeConfig as ab,normalizeStyle as ac,GetArticleBySlug as ad,GetArticles as ae,unpackMeta as af,GetCategories as ag,onUpdated as ah,provide as ai,watch as aj,nextTick as ak,h$4 as al,onBeforeUpdate as am,useRandomNumberGenerator as an,defineNuxtRouteMiddleware as ao,navigateTo as ap,createElementBlock as b,computed as c,unref as d,useAsyncQuery as e,createBlock as f,resolveDynamicComponent as g,useTheme as h,onMounted as i,onUnmounted as j,useNuxtApp as k,useRoute as l,createBaseVNode as m,normalizeClass as n,openBlock as o,createCommentVNode as p,ref$2 as q,renderList as r,GetGamesList as s,toDisplayString as t,useRoute$1 as u,store as v,withAsyncContext as w,createVNode as x,withCtx as y,createTextVNode as z};
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.